iroh-topic-tracker
Serverless, decentralized peer discovery for iroh-gossip topics using experimental DHT Signed Peer Announcements.
This crate uses the implementation of the experimental Draft BEP (PR #174) for announcing and discovering cryptographically signed peer identities (Ed25519 public keys) on the Mainline DHT by @Nuhvi. This enables overlay networks like Iroh to discover peers without centralized trackers, utilizing signed announcements to verify identity before connection.
Architecture
Instead of announcing IP addresses, peers announce their EndpointId (Ed25519 public key) signed with a timestamp. This allows for secure, trackerless discovery where connection establishment and NAT traversal are handled entirely by Iroh.
sequenceDiagram
participant A as Node A
participant DHT as Mainline DHT (Extended)
participant B as Node B
Note over A, B: Topic InfoHash = hash(topic)
A->>DHT: announce_signed_peer(InfoHash, NodeId_A, Sig)
B->>DHT: get_signed_peers(InfoHash)
DHT-->>B: Returns: [(NodeId_A, Sig, Timestamp)]
B->>B: Verify Signature & Timestamp
B->>A: Iroh Direct Connection (Holepunch)
A->>B: iroh-gossip takes over
Features
- Ed25519 signature based discovery using
announce_signed_peer/get_signed_peersextensions. - Relies on public DHT nodes supporting the extension (e.g. Mainline DHT with PR #174, there are two atm to my knowledge + all iroh-topic-tracker participants).
- Prevents identity spoofing via Ed25519 signatures.
Usage
Add to Cargo.toml:
[]
= "1"
= "0.101"
= "0.2.0"
Subscribe to a topic with automatic discovery:
use Duration;
use StreamExt;
use ;
use Gossip;
use ;
async
References
License
Dual-licensed under Apache 2.0 and MIT.