filecoin-project / venus

Filecoin Full Node Implementation in Go
https://venus.filecoin.io
Other
2.06k stars 459 forks source link

Graphsync fetcher intra-request parallelism #3372

Closed ZenGround0 closed 3 years ago

ZenGround0 commented 5 years ago

Description

It may be reasonable to request the same selector from multiple peers at once to fulfill a request. In the case one peer is blocking for an entire requestTimeout and other peers can serve the data then this can speed up requests by ~requestTimeout

Acceptance criteria

Design parallel peer fetches per selector within the graphsync fetcher.

Risks + pitfalls

Where to begin

Discussion with @hannahhoward @anorth @frrist

anorth commented 5 years ago

Yes I think we should do something like this in general. I know bitswap is on the other extreme, I think we want something in-between, two or three requests for the same data (which we can terminate once one peer starts responding).

This is part of a bunch of graphsync follow-on work to reach a fast and robust chain sync.