0.46.1
- Use new provider record update strategy to prevent Sybil attack. See PR 5536.
0.46.0
- Included multiaddresses of found peers alongside peer IDs in
GetClosestPeersquery results. See PR 5475 - Changed
FIND_NODEresponse: now includes a list of closest peers when querying the recipient peer ID. Previously, this request yielded an empty response. See PR 5270. - Update to DHT republish interval and expiration time defaults to 22h and 48h respectively, rationale in libp2p/specs#451. See PR 3230.
- Use default dial conditions more consistently. See PR 4957
- QueryClose progress whenever closer in range, instead of having to be the closest. See PR 4934.
- Add periodic and automatic bootstrap. See PR 4838.
- Make it mandatory to provide protocol names when creating a
kad::Config. Deprecatekad::Config::default(), replaced bykad::Config::new(StreamProtocol). See PR 5122. - Compute
jobs_query_capacityaccurately. See PR 5148. - Derive
Copyforkbucket::key::Key<T>. See PR 5317. ⁻KBucketsize can now be modified without changing theK_VALUE. See PR 5414. - Use
web-timeinstead ofinstant. See PR 5347. - Correctly handle the
NoKnownPeerserror on automatic bootstrap. See PR 5349. - Improve automatic bootstrap triggering conditions:
trigger when the routing table is updated and we have less that
K_VALUEpeers in it, trigger when a new listen address is discovered and we have no connected peers. See PR 5474.
0.45.3
- The progress of the close query iterator shall be decided by ANY of the new peers. See PR 4932.
0.45.2
- Ensure
Multiaddrhandled and returned byBehaviourare/p2pterminated. See PR 4596.
0.45.1
- Fix a bug where calling
Behaviour::remove_addresswith an address not in the peer's bucket would remove the peer from the routing table if the bucket has only one address left. See PR 4816 - Add
std::fmt::Displayimplementation onQueryId. See PR 4814.
0.45.0
- Remove deprecated
kad::Config::set_connection_idle_timeoutin favor ofSwarmBuilder::idle_connection_timeout. See PR 4659. - Emit
ModeChangedevent whenever we automatically reconfigure the mode. See PR 4503. - Make previously "deprecated"
recordmodule private. See PR 4035. - Expose hashed bytes of KBucketKey. See PR 4698.
- Remove previously deprecated type-aliases.
Users should follow the convention of importing the
libp2p::kadmodule and referring to symbols askad::Behaviouretc. See PR 4733.
0.44.6
- Rename
Kademliasymbols to follow naming convention. See PR 4547. - Fix a bug where we didn't detect a remote peer moving into client-state. See PR 4639.
- Re-export
NodeStatus. See PR 4645. - Deprecate
kad::Config::set_connection_idle_timeoutin favor ofSwarmBuilder::idle_connection_timeout. See PR 4675.
0.44.5
- Migrate to
quick-protobuf-codeccrate for codec logic. See PR 4501.
0.44.4
- Implement common traits on
RoutingUpdate. See PR 4270. - Reduce noise of "remote supports our protocol" log. See PR 4278.
0.44.3
- Prevent simultaneous dials to peers. See PR 4224.
- Rename missed
KademliaEvent::OutboundQueryCompletedtoKademliaEvent::OutboundQueryProgressedin documentation. See PR 4257.
0.44.2
- Allow to explicitly set
Mode::{Client,Server}. See PR 4132
0.44.1
- Expose
KBucketDistance. See PR 4109.
0.44.0
Raise MSRV to 1.65. See PR 3715.
Remove deprecated public modules
handler,protocolandkbucket. 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_addressor automated throughlibp2p-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 throughSwarm::add_external_address. See also Kademlia specification for an introduction to Kademlia client/server mode. See PR 3877.
0.43.3
- Preserve existing
KeepAlive::Untiltimeout instead of continuously setting newKeepAlive::Until(Instant::now() + self.config.idle_timeout). See PR 3801.
0.43.2
- Export pub enum
RoutingUpdate. See PR 3739. - Deprecate
handler,kbucket,protocol,recordmodules to make them private. See PR 3738.
0.43.1
- Migrate from
prosttoquick-protobuf. This removesprotocdependency. See PR 3312.
0.43.0
Update to
libp2p-corev0.39.0.Update to
libp2p-swarmv0.42.0.Remove lifetime from
RecordStoreand use GATs instead. See PR 3239.Limit number of active outbound streams to 32. See PR 3287.
Bump MSRV to 1.65.0.
0.42.1
- Skip unparsable multiaddr in
Peer::addrs. See PR 3280.
0.42.0
Update to
libp2p-corev0.38.0.Update to
libp2p-swarmv0.41.0.Replace
Kademlia'sNetworkBehaviourimplementationinject_*methods with the newon_*methods. See PR 3011.Replace
KademliaHandler'sConnectionHandlerimplementationinject_*methods with the newon_*methods. See PR 3085.Update
rust-versionto reflect the actual MSRV: 1.62.0. See PR 3090.Fix bad state transition on incoming
AddProvidermessages. 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.
- Renamed
KademliaEvent::OutboundQueryCompletedtoKademliaEvent::OutboundQueryProgressed - Instead of a single event
OutboundQueryCompleted, there are now multiple events emitted, allowing the user to process them as they come in (via the newOutboundQueryProgressed). SeeProgressStepto identify the finalOutboundQueryProgressedof a single query. - To finish a query early, i.e. before the final
OutboundQueryProgressedof the query, a caller needs to callquery.finish(). - There is no more automatic caching of records. The user has to manually call
put_record_toon theQueryInfo::GetRecord.cache_candidatesto cache a record to a close peer that did not return the record on the foregone query. See PR 2712.
- Renamed
0.41.0
Remove deprecated
set_protocol_name()fromKademliaConfig&KademliaProtocolConfig. Useset_protocol_names()instead. See PR 2866.Bump rand to 0.8 and quickcheck to 1. See PR 2857.
Update to
libp2p-corev0.37.0.Update to
libp2p-swarmv0.40.0.
0.40.0
Add support for multiple protocol names. Update
Kademlia,KademliaConfig, andKademliaProtocolConfigaccordingly. See Issue 2837. See PR 2846.Update to
libp2p-swarmv0.39.0.Update to
libp2p-corev0.36.0.
0.39.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 2788.
Update to
libp2p-swarmv0.38.0.Update to
libp2p-corev0.35.0.
0.38.0
Update to
libp2p-corev0.34.0.Update to
libp2p-swarmv0.37.0.
0.37.1
- Limit # of inbound streams to 32. [See PR 2699].
0.37.0
Update to
libp2p-corev0.33.0.Update to
libp2p-swarmv0.36.0.Derive
ErrorforGetRecordError(see PR 2614).
0.36.0
- Update to
libp2p-swarmv0.35.0.
0.35.0 [2022-02-22]
Update to
libp2p-corev0.32.0.Update to
libp2p-swarmv0.34.0.Require owned key in
get_record()method (see PR 2477).Merge NetworkBehaviour's inject_* paired methods (see PR 2445).
0.34.0 [2022-01-27]
Update dependencies.
Migrate to Rust edition 2021 (see PR 2339).
Derive
CloneforKademliaEvent(see PR 2411)Derive
Serialize,Deserializeforstore::record::Key(see PR 2408)Add
get_closest_local_peerstoKademlia(see PR 2436)
0.33.0 [2021-11-16]
Use
instantandfutures-timerinstead ofwasm-timer(see PR 2245).Rename
KademliaEvent::InboundRequestServedtoKademliaEvent::InboundRequestand moveInboundPutRecordRequestintoInboundRequest::PutRecordandInboundAddProviderRequestintoInboundRequest::AddProvider(see PR 2297).Populate the
keyfield when convertingKadRequestMsg::PutValuetoproto::Message(see PR 2309).Update dependencies.
0.32.0 [2021-11-01]
Make default features of
libp2p-coreoptional. PR 2181Update dependencies.
Introduce
KademliaStoreInsertsoption, which allows to filter records (see PR 2163).Check local store when calling
Kademlia::get_providers(see PR 2221).
0.31.0 [2021-07-12]
Update dependencies.
Expose inbound request information (see PR 2087). Note:
KademliaEvent::QueryResultis renamed toKademliaEvent::OutboundQueryCompleted.Expose whether
KademliaEvent::RoutingUpdatedis triggered with new peer (see PR 2087).Expose kbucket range on
KademliaEvent::RoutingUpdated(see PR 2087).Remove false
debug_assertonconnected_peers(see PR 2120).Return correct number of remaining bootstrap requests (see PR 2125).
0.30.0 [2021-04-13]
- Update
libp2p-swarm.
0.29.0 [2021-03-17]
Add
KademliaCachingandKademliaConfig::set_cachingto configure whether Kademlia should track, in lookups, the closest nodes to a key that did not return a record, viaGetRecordOk::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 withKademlia::put_record_toafter selecting one of the return records to cache. As is the current behaviour, caching is enabled by default with amax_peersof 1, i.e. it only tracks the closest node to the key that did not return a record.Add
Kademlia::put_record_tofor storing a record at specific nodes, e.g. for write-back caching after a successful read with quorum > 1.Update
libp2p-swarm.Update dependencies.
0.28.1 [2021-02-15]
- Update dependencies.
0.28.0 [2021-01-12]
- Update dependencies.
0.27.1 [2021-01-11]
- Add From impls for
kbucket::Key. PR 1909.
0.27.0 [2020-12-17]
- Update
libp2p-coreandlibp2p-swarm.
0.26.0 [2020-11-25]
Update
libp2p-coreandlibp2p-swarm.Have two
ProviderRecords be equal iff theirkeyandproviderfields are equal. PR 1850.
0.25.0 [2020-11-09]
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.
0.24.0 [2020-10-16]
Update
libp2p-coreandlibp2p-swarm.Update
sha2dependency.
0.23.0 [2020-09-09]
Increase default max packet size from 4KiB to 16KiB. See issue 1622.
Add
Distance::log2(PR 1719).Update
libp2p-swarmandlibp2p-core.
0.22.1 [2020-08-19]
- Explicitly convert from u8 to usize in
BucketIndex::rangeto prevent type inference issues (PR 1716).
0.22.0 [2020-08-18]
Store addresses in provider records. See PR 1708.
Update
libp2p-coreandlibp2p-swarmdependencies.Add
KBucketRef::rangeexposing the minimum inclusive and maximum inclusiveDistancefor the bucket (PR 1680).Add
NetworkBehaviour::inject_address_changeimplementation (PR 1649).
0.21.0 [2020-07-01]
Remove
KademliaEvent::Discovered(PR 1632)More control and insight for k-buckets (PR 1628). In particular,
Kademlia::kbuckets_entrieshas been removed and replaced byKademlia::kbuckets/Kademlia::kbucketwhich provide more information than just the peer IDs. FurthermoreKademlia::add_addressnow returns a result and two new events,KademliaEvent::RoutablePeerandKademliaEvent::PendingRoutablePeerare introduced (but are not required to be acted upon in order to retain existing behaviour). For more details, see the PR description.
0.20.1 [2020-06-23]
- Maintenance release (PR 1623).