Skip to content

[P2P] Background router peer discovery #712

@jessicadaugherty

Description

@jessicadaugherty

Objective

Implement peer discovery using LibP2P's Kademlia algorithm and investigate if dynamic peer churn is included in LibP2P by default or needs to be implemented separately.

Origin Document

V1 P2P Specification

LibP2P research

LibP2P Implementation

Goals

  • Integrate LibP2P's Kademlia algorithm for peer discovery, ensuring seamless peer joining and fallback to basic discovery
    • Allowing new peers to contact existing bootstrap peers and retrieve peer lists
    • Allowing peers to disconnect and rely on the maintenance routine for broadcasting unavailability
  • Investigate and document if dynamic peer churn comes by default with LibP2P or if it needs to be implemented separately

Deliverable

  • Implement LibP2P's Kademlia algorithm for peer discovery
    • Implement the join process for new peers, enabling them to contact bootstrap peers and retrieve peer lists, followed by raintree propagation of a Join Message
    • Implement the leave process, allowing peers to disconnect and relying on the maintenance routine for broadcasting unavailability
  • Determine whether dynamic peer churn comes by default with the Kademlia algorithm, or if it needs to be implemented separately

Non-goals / Non-deliverables

  • Modification of the Kademlia algorithm itself
  • Implementing other peer discovery methods outside of the Kademlia algorithm

General issue deliverables

  • Update the appropriate CHANGELOG
  • Update any relevant READMEs (local and/or global)
  • Update any relevant global documentation & references
  • If applicable, update the source code tree explanation
  • If applicable, add or update a state, sequence or flowchart diagram using mermaid

Testing Methodology

  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @jessicadaugherty

Metadata

Metadata

Labels

p2pP2P specific changestriageIt requires some decision-making at team level (it can't be worked on as it stands)

Type

No type

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions