You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the code base of Substrate, this leads to these addresses with /p2p/ being propagated around and poisoning a bit everything.
I would suggest to strongly clarify everywhere a multiaddress is used whether it has or has not this /p2p/ (for example ConnectedPoint::Dialing have it but not ConnectedPoint::Listener), or better: to pass the PeerId as a separate parameter to dial, in order to have a guarantee that this /p2p/ isn't found anywhere.
The text was updated successfully, but these errors were encountered:
I would add that in my opinion it doesn't make sense for ConnectedPoint::Dialing to contain a multiaddr with a /p2p/ suffix, as this information is already always given by the context. You never have a ConnectedPoint alone, you always have one associated with a PeerId. This redundant /p2p/... just brings confusion.
Closing as stale. If it is still an issue for users, they should open another issue.
I am of the opinion that because a Multiaddr allows for /p2p, we can statically guarantee anyway that it is not present so downstream code just needs to be prepared to handle its presence.
I unfortunately can't find the corresponding PR, but since libp2p-core 0.28.0 we now pass a
/p2p/...
suffix when callingTransport::dial
.Unfortunately, this leads libp2p-kad to insert addresses with
/p2p/
in its routing table, here:rust-libp2p/protocols/kad/src/behaviour.rs
Line 1926 in 937b59d
In the code base of Substrate, this leads to these addresses with
/p2p/
being propagated around and poisoning a bit everything.I would suggest to strongly clarify everywhere a multiaddress is used whether it has or has not this
/p2p/
(for exampleConnectedPoint::Dialing
have it but notConnectedPoint::Listener
), or better: to pass thePeerId
as a separate parameter todial
, in order to have a guarantee that this/p2p/
isn't found anywhere.The text was updated successfully, but these errors were encountered: