Skip to content

Peer discovery with kademlia for gossipsub #2447

Closed Answered by mxinden
Frederik-Baetens asked this question in Q&A
Discussion options

You must be logged in to vote

The documentation of UnroutablePeer might help:

    /// A peer has connected for whom no listen address is known.
    ///
    /// If the peer is to be added to the routing table, a known
    /// listen address for the peer must be provided via [`Kademlia::add_address`].

I am guessing that 2 connects to 1. Given that 1 does not know the listen address (but only the ephemeral dial address) of 2, 1 does not add 2 to its routing table. Given that 1 does not add 2 to its routing table, 1 can not return 2 to 3 when 3 queries 1.

For now I recommend doing the following: Use libp2p-identify to discover a remotes listen address. Once discovered, add the remote to the Kademlia routing table with tha…

Replies: 2 comments 12 replies

Comment options

You must be logged in to vote
3 replies
@Frederik-Baetens
Comment options

@Frederik-Baetens
Comment options

@Frederik-Baetens
Comment options

Comment options

You must be logged in to vote
9 replies
@Frederik-Baetens
Comment options

@deputinizer
Comment options

@mxinden
Comment options

@deputinizer
Comment options

@mxinden
Comment options

Answer selected by Frederik-Baetens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants