-
Notifications
You must be signed in to change notification settings - Fork 112
Fail to get block from connected peer #99
Comments
duplicate #65 |
So, the following could be happening:
However, the peers are never disconnected so peer A never resends the wantlist. Alternative theory:
There are probably more... |
For issue 1:
For issue 2: 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. Really... bitswap should have sessions, sequence numbers, and acks (reliable but out of order message delivery). |
(cc @hannahhoward) |
Great, but I think the receiving node should not be sent repeatedly, this should be the requesting node to maintain In fact, when the requesting node waits for the data block response, it knows the provider information. Maybe we just resend the
|
The issue here is that the responding node is preemptively removing the block from the requesting node's wantlist because it has sent the block. I'm just suggesting that we shouldn't do that and, instead, wait for the requesting node to update their own wantlist.
We should probably do this anyways just to be safe. |
I think a good first step, and this has come up a few times, is to just periodically rebroadcast the wantlist. The wantlist itself (as opposed to the blocks) is not a ton of data so sending it periodically can't be that expensive and will get the receiver an opportunity to keep their wantlist in sync with the requestor. I'll go ahead and implement this. |
Reopening as this is still a valid issue, just less of an issue. |
I've forked this into ipfs/boxo#97 and ipfs/boxo#96. |
I have a node that is connected to another node
<peer.ID Qm*ZtVMeB>
,<peer.ID Qm*ZtVMeB>
has a data blockQmUmeNvU1HN5tLk8T6ihrVRbHuF2EGw4rF1UBqoGVudFXE
, but the request has not been successful, the log is printed under loop mistake.Executing the following command on the
<peer.ID Qm*ZtVMeB>
node is expected outputI am using a private network, the ipfs verion:
The text was updated successfully, but these errors were encountered: