Skip to content

gossipsub peer sharing #2391

@Frederik-Baetens

Description

@Frederik-Baetens

I'm trying to build a system where nodes connect to a set of known nodes to join the gossipsub network.

However, it seems like these peers don't reach out to eachother after establishing a connection to the known nodes.

Is there any way to get some sort of peer sharing & automatic connection handling?

I saw this pr and it mentions peer eXchange being held up by an addition to the spec which has been merged for a while now, but i'm not sure if that spec has been implemented yet.

An example of what i'm trying to do (adapted from the libp2p examples): https://github.com/Frederik-Baetens/libp2p-tokiochat

It allows starting the first node with cargo run. The following nodes are then connected with cargo run -- *multiaddr of first node*

I'd like the additional nodes to find eachother, and for the chat application to keep working after the first node has been shut down. Currently I get an insufficientpeers error after the original node gets shut down.

Am I supposed to implement this functionality myself based on things like https://docs.rs/libp2p/latest/libp2p/core/struct.Network.html#method.connected_peers ? Or could this be made to work of the box?

Older issue about this: #1559

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions