Add the PeerId of the wantList owner to the protobuf message #2605
Labels
kind/enhancement
A net-new feature or improvement to an existing feature
topic/bitswap
Topic bitswap
Currently,
bitswap
leverages the information that swarm has about a connection in order to understand where the incoming wantList are coming from. This creates a dependency that in order for the protocol to work properly, Stream Multiplexing and Identify (a.k.a Id protocol) need to be in place, otherwise, the listener won't be aware of who is sending the want list.Since IPFS is designed to work across a panoply of devices with different capabilities and with transports that won't always offer Stream Multiplexing (which is a requirement for the Identify protocol), I propose that we add to the wantList message protobuf one more field that includes the peerId of the sender of that wantList (which is also the same message used to send blocks).
This change won't cause any breaking change in go-ipfs. However, if we don't add it, I'll need to change how js-libp2p-swarm works, because the way it is designed favours creating a complete opaque box on how the connection was established to a given peer.
The text was updated successfully, but these errors were encountered: