Crate libp2p::kad

source ·
Expand description

Implementation of the libp2p-specific Kademlia protocol.

Important Discrepancies

  • Peer Discovery with Identify In other libp2p implementations, the Identify protocol might be seen as a core protocol. Rust-libp2p tries to stay as generic as possible, and does not make this assumption. This means that the Identify protocol must be manually hooked up to Kademlia through calls to Kademlia::add_address. If you choose not to use the Identify protocol, and do not provide an alternative peer discovery mechanism, a Kademlia node will not discover nodes beyond the network’s boot nodes. Without the Identify protocol, existing nodes in the kademlia network cannot obtain the listen addresses of nodes querying them, and thus will not be able to add them to their routing table.

Modules

  • Implementation of a Kademlia routing table as used by a single peer participating in a Kademlia DHT.
  • The Kademlia connection protocol upgrade and associated message types.
  • Records and record storage abstraction of the libp2p Kademlia DHT.

Structs

Enums

Constants

  • The α parameter of the Kademlia specification.
  • The k parameter of the Kademlia specification.

Type Definitions