-
Notifications
You must be signed in to change notification settings - Fork 1.3k
mplex stream numbers #1601
Comments
@diasdavid I seem to remember this issue be mentioned months ago, but I can't find any reference to it. |
it might be due to incomplete work, see https://github.com/libp2p/js-libp2p-mplex/pulls //cc @jacobheun @vasco-santos |
It looks like the initiator base id is just flipped. https://github.com/libp2p/js-libp2p-mplex/blob/v0.8.0/src/internals/index.js#L83. The base id is set to 0 instead of 1 and then the stream id is incremented by 2, which is why we're seeing 2 2 in the logs Edit: After reviewing the flags, they are correct between both versions, the id on the js side looks to be the only issue. |
There was an intended change to the mplex spec that never got merged, libp2p/mplex#3. It was just merged in a little while ago. The js implementation does match the intended spec. |
According to https://github.com/libp2p/mplex#opening-a-new-stream
But it seems that
js-ipfs
is using even IDs when opening a new stream.Here's the debug output when sending the Bitswap want list. Note that
js-ipfs
was told to connect to QmTp1fwYnJxc5rUEVM2xowcDiyR61J7yvmBRUQzT4g8MHs , so it is the initiator.The text was updated successfully, but these errors were encountered: