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
Unlike libp2p-js, Rust libp2p does not keep track of peers we have connected to (actually, it only keeps the PeerId, but not the MultiAddr - and the PeerId by itself is pretty useless).
The goal of keeping track of connected peers is that during the peer discovery process, it is likely we will get the contact information of a hub we are already connected to at some point. Currently, this mistakenly leads Teleport to establish a second (or third, or fourth..) connection to the same Hub - which doesn't end well.
Additionally, during peer discovery, we only receive the other peer's external address - not their PeerId - hence the need to keep track of MultiAddr of peers we are already connected to.
File that will need changes: lib/hub/src/p2p/event_loop.rs fn peer_discovery_response has a TODO marked where this needs to happen.
The text was updated successfully, but these errors were encountered:
Unlike libp2p-js, Rust libp2p does not keep track of peers we have connected to (actually, it only keeps the
PeerId
, but not theMultiAddr
- and thePeerId
by itself is pretty useless).The goal of keeping track of connected peers is that during the peer discovery process, it is likely we will get the contact information of a hub we are already connected to at some point. Currently, this mistakenly leads Teleport to establish a second (or third, or fourth..) connection to the same Hub - which doesn't end well.
Additionally, during peer discovery, we only receive the other peer's external address - not their PeerId - hence the need to keep track of
MultiAddr
of peers we are already connected to.File that will need changes:
lib/hub/src/p2p/event_loop.rs
fn peer_discovery_response
has aTODO
marked where this needs to happen.The text was updated successfully, but these errors were encountered: