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

Signed Peer Records #776

Closed
8 of 10 tasks
yusefnapora opened this issue Jan 23, 2020 · 2 comments
Closed
8 of 10 tasks

Signed Peer Records #776

yusefnapora opened this issue Jan 23, 2020 · 2 comments
Assignees
Labels
Milestone

Comments

@yusefnapora
Copy link
Contributor

yusefnapora commented Jan 23, 2020

This is a meta-issue to track the progress of implementing the signed Peer Records proposed in libp2p/specs#217 and #761

Core implementation

The basic functionality is currently spread through three open PRs in various repos:

  • Signed envelopes & routing records go-libp2p-core#73

    • defines Envelope and PeerRecord types and signing / marshaling logic
    • adds a CertifiedAddrBook interface to add addresses from PeerRecords to the Peerstore
    • adds two new event types:
      • EvtLocalAddressesUpdated is sent when our listen addresses change. Includes a snapshot of current listen addrs, and may also have diffs against the previous state.
      • EvtLocalPeerRecordUpdated is sent when we have a new signed PeerRecord to distribute to other peers.
  • Certified addresses go-libp2p-peerstore#98

    • implements the CertifiedAddrBook interface in the memory and datastore AddrBooks
  • go-libp2p exchange signed routing records in identify #747

    • updates the IDService to exchange signed PeerRecords during the identify protocol, and add records for remote peers to the peerstore
    • changes the way identify/push is triggered by getting the event bus into the mix:
      • updates BasicHost to emit EvtLocalAddressesUpdated events when it detects a change in listen addresses instead of directly triggering an identify/push
      • adds a peerRecordManager component to the IDService, which listens for EvtLocalAddressesUpdated and creates new signed PeerRecords, which it sends out on the event bus in an EvtLocalPeerRecordUpdated
      • updates the IDService to listen for EvtLocalPeerRecordUpdated and trigger an identify/push update

These should be merged in order, and we should tag new releases and update the dependencies in the peerstore and go-libp2p PRs to stop pointing at specific branch commits. So the merge strategy is:

Components that will use PeerRecords

Once the above PRs are landed, we can integrate signed PeerRecords into various libp2p components:

@jacobheun jacobheun added the Epic label Jan 23, 2020
@jacobheun jacobheun added this to the Working Kademlia milestone Jan 23, 2020
@jacobheun jacobheun changed the title Tracking issue for signed Peer Record implementation Signed Peer Records Jan 23, 2020
@raulk
Copy link
Member

raulk commented Jan 31, 2020

@raulk
Copy link
Member

raulk commented May 20, 2020

go-libp2p v0.9.0, launched yesterday, introduced support for signed peer records. Read all about it: https://github.com/libp2p/go-libp2p/releases/tag/v0.9.0.

@raulk raulk closed this as completed May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants