You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 1, 2023. It is now read-only.
When a Bitswap Session fetches a block it sends want-haves to all the peers in the session, and a single "optimistic" want-block to one of the peers. If the peer that receives the want-block responds with DONT_HAVE, the Session checks the other responses and sends want-block to any peer that responded with HAVE.
If a peer that receives a want-block doesn't respond, the Session will hang. A peer may not respond because:
It is overloaded / network issues
older versions of Bitswap do not send a response if they don't have a block
Proposed solution:
Detect timeouts in the MessageQueue (which knows which version of Bitswap the peer supports)
The MessageQueue informs the Session of timeouts, including whether it's an older version of Bitswap
When the Session gets a timeout for a CID
if it's from a peer running an older version of Bitswap, treat it as a DONT_HAVE
if it's from a peer running a newer version of Bitswap, remove the peer from the Session