NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #2672 most downloaded on crates.io
Kademlia protocol for libp2p
Last release 26 days ago
11 Sep 2026
Ships unpredictably
gaps range from 1 weeks to 1.2 years
Most releases are documented
notes for 49 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
8 years old
79 releases · first in 2019
Use futures-timer instead of tokio's timer for stream timeouts so the bounded Delay works on wasm32; tokio's timer has no driver in the browser and pa
Use futures-timer instead of tokio's timer for stream timeouts so the bounded Delay works on
wasm32; tokio's timer has no driver in the browser and panics at runtime.
See PR 6488.
Raise MSRV to 1.88.0. See PR 6273.
Revert migration to quick-protobuf, migrate back to prost.
See PR 6363.
Remove no longer constructed GetRecordError::QuorumFailed. See PR 6106
One column per quarter.
Nothing published for this version
Remove deprecated default constructor for ProtocolConfig. See PR 5774.
mode getter on Behaviour.
See PR 5573.Behavior::find_closest_local_peers().
See PR 5645.cargo clippy warnings in rustc 1.84.0-beta.1.
See PR 5700.KBuckets.
See PR 5715.ProtocolConfig.
See PR 5774.Behavior::get_providers and Behavior::provider_peers.
See PR 5980.<!-- Update to libp2p-core v0.43.0 -->
Emit ToSwarm::NewExternalAddrOfPeer. See PR 5549
ToSwarm::NewExternalAddrOfPeer.
See PR 5549Use new provider record update strategy to prevent Sybil attack. See PR 5536.
Make it mandatory to provide protocol names when creating a kad::Config. Deprecate kad::Config::default(), replaced by kad::Config::new(StreamProtocol…
GetClosestPeers query results.
See PR 5475FIND_NODE response: now includes a list of closest peers when querying the recipient peer ID. Previously, this request yielded an empty response.
See PR 5270.kad::Config.
Deprecate kad::Config::default(), replaced by kad::Config::new(StreamProtocol).
See PR 5122.jobs_query_capacity accurately.
See PR 5148.Copy for kbucket::key::Key<T>.
See PR 5317.
⁻ KBucket size can now be modified without changing the K_VALUE.
See PR 5414.web-time instead of instant.
See PR 5347.
<!-- Update to libp2p-swarm v0.45.0 -->NoKnownPeers error on automatic bootstrap.
See PR 5349.K_VALUE peers in it,
trigger when a new listen address is discovered and we have no connected peers.
See PR 5474.The progress of the close query iterator shall be decided by ANY of the new peers. See PR 4932.
Fix a bug where calling Behaviour::remove_address with an address not in the peer's bucket would remove the peer from the routing table if the bucket
Remove deprecated kad::Config::set_connection_idle_timeout in favor of SwarmBuilder::idle_connection_timeout. See PR 4659.
kad::Config::set_connection_idle_timeout in favor of SwarmBuilder::idle_connection_timeout.
See PR 4659.ModeChanged event whenever we automatically reconfigure the mode.
See PR 4503.record module private.
See PR 4035.libp2p::kad module and referring to symbols as kad::Behaviour etc.
See PR 4733.Deprecate kad::Config::set_connection_idle_timeout in favor of SwarmBuilder::idle_connection_timeout. See [PR 4675].
Kademlia symbols to follow naming convention.
See PR 4547.NodeStatus.
See PR 4645.kad::Config::set_connection_idle_timeout in favor of SwarmBuilder::idle_connection_timeout.
See PR 4675.<!-- Internal changes
KeepAlive::Until-->
Migrate to quick-protobuf-codec crate for codec logic. See [PR 4501].
quick-protobuf-codec crate for codec logic.
See PR 4501.Implement common traits on RoutingUpdate. See [PR 4270].
Prevent simultaneous dials to peers. See [PR 4224].
Allow to explicitly set Mode::{Client,Server}. See [PR 4132]
Mode::{Client,Server}.
See PR 4132Expose KBucketDistance. See [PR 4109].
KBucketDistance.
See PR 4109.Remove deprecated public modules handler, protocol and kbucket. See [PR 3896].
Raise MSRV to 1.65. See PR 3715.
Remove deprecated public modules handler, protocol and kbucket.
See PR 3896.
Automatically configure client/server mode based on external addresses.
If we have or learn about an external address of our node, e.g. through Swarm::add_external_address or automated through libp2p-autonat, we operate in server-mode and thus allow inbound requests.
By default, a node is in client-mode and only allows outbound requests.
If you want to maintain the status quo, i.e. always operate in server mode, make sure to add at least one external address through Swarm::add_external_address.
See also Kademlia specification for an introduction to Kademlia client/server mode.
See PR 3877.
Preserve existing KeepAlive::Until timeout instead of continuously setting new KeepAlive::Until(Instant::now() + self.config.idle_timeout). See [PR 38
KeepAlive::Until timeout instead of continuously setting new KeepAlive::Until(Instant::now() + self.config.idle_timeout).
See PR 3801.Deprecate handler, kbucket, protocol, record modules to make them private. See [PR 3738].
Migrate from prost to quick-protobuf. This removes protoc dependency. See [PR 3312].
prost to quick-protobuf. This removes protoc dependency. See PR 3312.Update to libp2p-swarm v0.42.0.
Skip unparsable multiaddr in Peer::addrs. See [PR 3280].
Peer::addrs. See PR 3280.Update to libp2p-swarm v0.41.0.
Update to libp2p-core v0.38.0.
Update to libp2p-swarm v0.41.0.
Replace Kademlia's NetworkBehaviour implementation inject_* methods with the new on_* methods.
See PR 3011.
Replace KademliaHandler's ConnectionHandler implementation inject_* methods with the new on_* methods.
See PR 3085.
Update rust-version to reflect the actual MSRV: 1.62.0. See PR 3090.
Fix bad state transition on incoming AddProvider messages.
This would eventually lead to warning that says: "New inbound substream to PeerId exceeds inbound substream limit. No older substream waiting to be reused."
See PR 3152.
Refactor APIs to be streaming.
KademliaEvent::OutboundQueryCompleted to KademliaEvent::OutboundQueryProgressedOutboundQueryCompleted, there are now multiple events emitted, allowing the user to process them as they come in (via the new OutboundQueryProgressed). See ProgressStep to identify the final OutboundQueryProgressed of a single query.OutboundQueryProgressed of the query, a caller needs to call query.finish().put_record_to on the QueryInfo::GetRecord.cache_candidates to cache a record to a close peer that did not return the record on the foregone query.
See PR 2712.Remove deprecated set_protocol_name() from KademliaConfig & KademliaProtocolConfig. Use set_protocol_names() instead. See [PR 2866].
Add support for multiple protocol names. Update Kademlia, KademliaConfig, and KademliaProtocolConfig accordingly. See [Issue 2837]. See [PR 2846].
Add support for multiple protocol names. Update Kademlia, KademliaConfig,
and KademliaProtocolConfig accordingly. See Issue 2837. See PR 2846.
Update to libp2p-swarm v0.39.0.
Update to libp2p-core v0.36.0.
Update prost requirement from 0.10 to 0.11 which no longer installs the protoc Protobuf compiler. Thus you will need protoc installed locally. See [PR
Update prost requirement from 0.10 to 0.11 which no longer installs the protoc Protobuf compiler. Thus you will need protoc installed locally. See PR 2788.
Update to libp2p-swarm v0.38.0.
Update to libp2p-core v0.35.0.
Update to libp2p-swarm v0.37.0.
Update to libp2p-core v0.34.0.
Update to libp2p-swarm v0.37.0.
Limit # of inbound streams to 32. [See PR 2699].
Update to libp2p-swarm v0.36.0.
Update to libp2p-core v0.33.0.
Update to libp2p-swarm v0.36.0.
Derive Error for GetRecordError (see PR 2614).
Update to libp2p-swarm v0.35.0.
libp2p-swarm v0.35.0.Update to libp2p-swarm v0.34.0.
Update to libp2p-core v0.32.0.
Update to libp2p-swarm v0.34.0.
Require owned key in get_record() method (see PR 2477).
Merge NetworkBehaviour's inject_* paired methods (see PR 2445).
Migrate to Rust edition 2021 (see [PR 2339]).
Use instant and futures-timer instead of wasm-timer (see [PR 2245]).
Use instant and futures-timer instead of wasm-timer (see PR 2245).
Rename KademliaEvent::InboundRequestServed to KademliaEvent::InboundRequest and move
InboundPutRecordRequest into InboundRequest::PutRecord and InboundAddProviderRequest into
InboundRequest::AddProvider (see PR 2297).
Populate the key field when converting KadRequestMsg::PutValue to proto::Message (see PR 2309).
Update dependencies.
Make default features of libp2p-core optional. PR 2181
Nothing published for this version
Nothing published for this version
Expose inbound request information (see [PR 2087]). Note: KademliaEvent::QueryResult is renamed to KademliaEvent::OutboundQueryCompleted.
Update dependencies.
Expose inbound request information (see PR 2087). Note:
KademliaEvent::QueryResult is renamed to
KademliaEvent::OutboundQueryCompleted.
Expose whether KademliaEvent::RoutingUpdated is triggered with new peer (see
PR 2087).
Expose kbucket range on KademliaEvent::RoutingUpdated (see PR 2087).
Remove false debug_assert on connected_peers (see PR 2120).
Return correct number of remaining bootstrap requests (see PR 2125).
- Update libp2p-swarm.
libp2p-swarm.Add KademliaCaching and KademliaConfig::set_caching to configure whether Kademlia should track, in lookups, the closest nodes to a key that did not re
Add KademliaCaching and KademliaConfig::set_caching to configure
whether Kademlia should track, in lookups, the closest nodes to a key
that did not return a record, via GetRecordOk::cache_candidates.
As before, if a lookup used a quorum of 1, these candidates will
automatically be sent the found record. Otherwise, with a lookup
quorum of > 1, the candidates can be used with Kademlia::put_record_to
after selecting one of the return records to cache. As is the current
behaviour, caching is enabled by default with a max_peers of 1, i.e.
it only tracks the closest node to the key that did not return a record.
Add Kademlia::put_record_to for storing a record at specific nodes,
e.g. for write-back caching after a successful read with quorum > 1.
Update libp2p-swarm.
Update dependencies.
- Update dependencies.
- Update dependencies.
Add From impls for kbucket::Key. PR 1909.
kbucket::Key.
PR 1909.Update libp2p-core and libp2p-swarm.
libp2p-core and libp2p-swarm.Update libp2p-core and libp2p-swarm.
Update libp2p-core and libp2p-swarm.
Have two ProviderRecords be equal iff their key and provider fields are
equal. PR 1850.
Upon newly established connections, delay routing table updates until after the configured protocol name has been confirmed by the connection handler,
Upon newly established connections, delay routing table updates until after the configured protocol name has been confirmed by the connection handler, i.e. until after at least one substream has been successfully negotiated. In configurations with different protocol names, this avoids undesirable nodes being included in the local routing table at least temporarily. PR 1821.
Update dependencies.
Update libp2p-core and libp2p-swarm.
Update libp2p-core and libp2p-swarm.
Update sha2 dependency.
Increase default max packet size from 4KiB to 16KiB. See issue 1622.
Increase default max packet size from 4KiB to 16KiB. See issue 1622.
Add Distance::log2 (PR 1719).
Update libp2p-swarm and libp2p-core.
Explicitly convert from u8 to usize in BucketIndex::range to prevent type inference issues (PR 1716).
BucketIndex::range to prevent type
inference issues (PR 1716).Store addresses in provider records. See PR 1708.
Remove KademliaEvent::Discovered (PR 1632)
Remove KademliaEvent::Discovered
(PR 1632)
More control and insight for k-buckets
(PR 1628).
In particular, Kademlia::kbuckets_entries has been removed and
replaced by Kademlia::kbuckets/Kademlia::kbucket which provide
more information than just the peer IDs. Furthermore Kademlia::add_address
now returns a result and two new events, KademliaEvent::RoutablePeer
and KademliaEvent::PendingRoutablePeer are introduced (but are not
required to be acted upon in order to retain existing behaviour).
For more details, see the PR description.
- Maintenance release (PR 1623).
Optionally require iterative queries to use disjoint paths based on S/Kademlia for increased resiliency in the presence of potentially adversarial nod
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →