Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[discovery] Connect to closest peers in the network to share peer information #704

Closed
Tracked by #703
jacobheun opened this issue Jul 13, 2020 · 2 comments
Closed
Tracked by #703
Assignees
Labels
kind/enhancement A net-new feature or improvement to an existing feature P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked

Comments

@jacobheun
Copy link
Contributor

In order for nodes on the network to be able to easily find a libp2p node, it needs to find its closest peers on the network and connect to them in order to exchange address records. This will enable other peers who don't yet know the address to search for the PeerId on the network (via the DHT, delegate routers, or other future modules). This query will result in discovering peers who know about our addresses, because we have already exchanged that information with them.

js-libp2p currently does not do this out of the box. As long as we have PeerRouting modules enabled, we should attempt to do this.

  1. When libp2p boots it should search for its closest peers and attempt to connect to them (this may require relays with Active HOP support).
  2. When libp2p changes announce addresses, it should search and connect again. This will help ensure the closest nodes on the network have the latest addresses.
  3. We should avoid querying too frequently to update. On boot we are likely to be more actively finding addresses dynamically, especially if AutoRelay/AutoNAT is enabled.
  4. We should attempt to maintain connections to our closest peers, as they will get push notifications whenever address changes occur.

Ref: ipfs/kubo#7433 (comment)

@jacobheun jacobheun added kind/enhancement A net-new feature or improvement to an existing feature P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked labels Jul 13, 2020
@vasco-santos vasco-santos self-assigned this Nov 10, 2020
@vasco-santos
Copy link
Member

This is partially implemented in [email protected].

@maschad
Copy link
Member

maschad commented Sep 28, 2023

Closing as completed

@maschad maschad closed this as completed Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

3 participants