Integrate libp2p: peer discovery · Issue #177 · braidpool/braidpool · GitHub
Skip to content

Integrate libp2p: peer discovery #177

Description

@mcelrath
  1. Use Kademlia to obtain a list of peers
  2. Connect to each peer and send a ping message
  3. Write a peer selection function that will use a heuristic on both latency (recorded from the ping messages) and Kademlia xor distance to obtain a set of peers spanning the entire range in latency.
  4. Start some data structures to keep statics on peers:
    a. Connection attempts/successes
    b. Connection drops
    c. Garbled/undecodable messages/packet loss
    d. Running tally of latency, and the std. deviation of latency
    e. Did we have to hole punch this peer?
  5. Cache the peer data structure by writing it in ~/.braidpool so it survives restarts.

With hole punching it's important to find a peer that is "between" both peers in terms of latency. Determine if there's anything we can add in the peer data structure that is useful for this.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions