Skip to content

Signed Peer Records #776

@yusefnapora

Description

@yusefnapora

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:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions