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 B #136

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

[ipfs/go-bitswap] Wantlist Race B #136

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

Comments

@Stebalien
Copy link
Member

Forked from: ipfs/go-bitswap#99

Problem

  1. Peer A connects to peer B.
  2. Peer A sends its wantlist to peer B.
  3. Peer A disconnects from peer B.
  4. Peer B notices the disconnect, forgets peer A's wantlist.
  5. Peer A immediately reconnects to peer B.
  6. Peer A notices the disconnect, sees that it still has a connection, doesn't resend it's wantlist.

Solution

The only thing I can think of is the following: whenever the stream we're using to send wantlists closes, we (a) open a new one and (b) send the complete wantlist. Unfortunately, I really wanted to eventually move away from keeping a stream open entirely but, we'll, I can't think of a better solution.

@Stebalien Stebalien added the kind/bug A bug in existing code (including security flaws) label Apr 17, 2019
@guseggert guseggert changed the title Wantlist Race B [ipfs/go-bitswap] Wantlist Race B Jan 28, 2023
Jorropo pushed a commit that referenced this issue Mar 22, 2023
Accommodate to the `index.Generate` signature change, done in #136.
Insead of implementng a new reader that converts `io.ReaderAt` to
`io.ReadSeaker`, make `internalio.OffsetReader` partially implement
`Seek`. The "partial" refers to inability to satisfy `Seek` calls with
`io.SeekEnd` whence since the point of `internalio.OffsetReader` is that
it needs not to know the total size of a file, i.e. cannot know its end.
Instead, it panics if `Seek` is called with whence `io.SeekEnd`.

None of this matterns much since it is all placed under internal APIs.


This commit was moved from ipld/go-car@c0023ed
@Jorropo Jorropo reopened this May 29, 2023
This issue is being transferred. Timeline may not be complete until it finishes.
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

2 participants