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

Explicit Peering Agreement implementation #5268

Closed
thedevbirb opened this issue Feb 20, 2024 · 5 comments
Closed

Explicit Peering Agreement implementation #5268

thedevbirb opened this issue Feb 20, 2024 · 5 comments
Labels
enhancement New feature or request Networking

Comments

@thedevbirb
Copy link

Context

Lighthouse implements the concept of a “trusted”/”static” peer, which guarantees the ability to always remain connected to a peer ignoring defensive measures such as peer scoring, however it provides no guarantees of being part of their mesh or to send/receive full messages from them unconditionally.

Why explicit peering agreement

Gossipsub v1.1 introduces the concept of "Explicit Peering Agreement", which is an agreement that must be reached from a pair of nodes in order to “remain connected to and unconditionally forward messages to each other outside of the vagaries of the peer scoring system and other defensive measures”.

This feature if enabled in Lighthouse could allow nodes to explicitly connect to some relays networks such as Fiber or Bloxroute to boost the propagation of their blocks.

Possible implementation

In order to do that, we could simply mimic what has been done for trusted/static peers. In particular:

  • set them from the command line
  • allow them to be added and removed dynamically
  • exclude them from peer scoring or other defensive measures

Lastly this list of nodes needs to be passed to the libp2p implementation.

If there is interest, we can open a PR that implements this functionality.

@michaelsproul michaelsproul added enhancement New feature or request Networking labels Feb 25, 2024
@pawanjay176
Copy link
Member

This seems like a useful feature to have.
One thing to note however is that connecting to an explicit peer cannot be guaranteed since the peer we are connecting to might not have sufficient incoming peer slots to spare.

@mempirate
Copy link
Contributor

An explicit peering is always reciprocal and established out of band, so they are exempt from this as well. If you guys agree, we can open a PR to implement this.

@AgeManning
Copy link
Member

We have the concept of explicit peers in gossipsub already, we just haven't tied it to the CLI trusted peers.

This should be easy to add though. If you guys already have a PR, feel free to send it through, otherwise we can put one up pretty quickly.

This was referenced Feb 29, 2024
@mempirate
Copy link
Contributor

@AgeManning opened a PR! Sorry about the first one, I accidentally set stable as the base branch.

@jimmygchen
Copy link
Member

Implemented in #5333 and will be included in v5.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Networking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants