Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ipfs/go-bitswap] Wantlist Race A #97

Open
Stebalien opened this issue Apr 17, 2019 · 0 comments
Open

[ipfs/go-bitswap] Wantlist Race A #97

Stebalien opened this issue Apr 17, 2019 · 0 comments
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@Stebalien
Copy link
Member

Forked from ipfs/go-bitswap#99.

Problem

So, the following could be happening:

  1. Peer A connects to peer B, ends up with two connections.
  2. Peer A sends want to peer B.
  3. Peer B sends block to peer A and removes the block from the wantlist.
  4. The connection used in (3) gets killed and the block gets lost in transit.

However, the peers are never disconnected so peer A never resends the wantlist.

Solution

  • When sending a block, we could move the want to some "suspended" wantlist. If we don't receive an unwant from that user within a period of time, we could send the block again.
  • We should better track block send errors. As far as I can tell, we never retry but we really should. Ideally, if we keep failing, we'd close the peer's inbound wantlist stream to signal "go away".
@Stebalien Stebalien added the kind/bug A bug in existing code (including security flaws) label Apr 17, 2019
@Jorropo Jorropo changed the title Wantlist Race A [ipfs/go-bitswap] Wantlist Race A Jan 27, 2023
@Jorropo Jorropo transferred this issue from ipfs/go-bitswap Jan 27, 2023
guseggert pushed a commit that referenced this issue Mar 15, 2023
Jorropo pushed a commit to ipfs/go-libipfs-rapide that referenced this issue Mar 23, 2023
Jorropo pushed a commit to ipfs/go-libipfs-rapide that referenced this issue Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

1 participant