-
Remove deprecated
Transport::with_bandwidth_logging,SwarmBuilder::with_bandwidth_loggingandTransportExt. See PR 5766. -
Introduce
libp2p-webrtc-websysbehindwebrtc-websysfeature flag. See PR 5819. -
Introduce
libp2p-peer-store. See PR 5724. -
Make the
*-websysvariants (libp2p-webrtc-websys,libp2p-websocket-websys,libp2p-webtransport-websys) only available on wasm32 target architecture. See PR 5891. -
Remove QUIC from the
async-stdswarm builder, asasync-stdsupport was removed fromlibp2p-quictransport. See PR 5954 -
Remove DNS from the
async-stdswarm builder, asasync-stdsupport was removed fromlibp2p-dnstransport. See PR 5959
-
Raise MSRV to 1.83.0. See PR 5650.
-
Add
with_connection_timeoutonSwarmBuilderto allow configuration of the connection_timeout parameter. See PR 5575. -
Deprecate
voidcrate. See PR 5676. -
Update default for idle-connection-timeout to 10s. See PR 4967.
-
Expose swarm builder phase errors. See PR 5726.
-
Deprecate
ConnectionHandler::{InboundOpenInfo, OutboundOpenInfo}associated type.
Previously, users could tag pending sub streams with custom data and retrieve the data after the substream has been negotiated. But substreams themselves are completely interchangeable, users should instead track additional data insideConnectionHandlerafter negotiation.
See PR 5242.
- Update individual crates.
- Update to
libp2p-metrics0.15.0.
- Update to
-
Update individual crates.
- Update to
libp2p-kadv0.46.0. - Update to
libp2p-identifyv0.45.0.
- Update to
-
Raise MSRV to 1.73. See PR 5266.
-
Implement refactored
Transport. See PR 4568. -
Move
address_translationfromlibp2p-coretolibp2p-swarmandlibp2p-identify. To now get address translation behaviour, i.e. discovery of extern address (candidates) based on connecting to other peers, one needs to uselibp2p-identifynow. This pertains to you if your nodes can be behind NATs and they aren't aware of their true external address. See PR 4568. -
Use
web-timeinstead ofinstant. See PR 5347. -
Remove redundant async signature from builder methods. See PR 5468.
- Allow
SwarmBuilder::with_bandwidth_metricsafterSwarmBuilder::with_websocket. See PR 4937.
- Allow
SwarmBuilder::with_quic_configto be called withoutwith_tcpfirst. See PR 4821. - Introduce
SwarmBuilder::with_dns_config. See PR 4808.
- Raise MSRV to 1.73. See PR 4692.
- Remove deprecated
libp2p-wasm-ext. Users should uselibp2p-websocket-websysinstead. See PR 4694. - Remove deprecated
libp2p-deflate. See issue 4522 for details. See PR 4729. - Remove deprecated
development_transport. Uselibp2p::SwarmBuilderinstead. See PR 4732. - Introduce
SwarmBuilder::with_bandwidth_metricsexposing Prometheus bandwidth metrics per transport protocol stack and direction (in-/ outbound). DeprecateTransport::with_bandwidth_loggingandSwarmBuilder::with_bandwidth_loggingin favor of the newSwarmBuilder::with_bandwidth_metrics. See PR 4727.
-
Introduce
libp2p::websocket_websysmodule behindwebsocket-websysfeature flag. This supersedes the existinglibp2p::wasm_extmodule which is now deprecated. See PR 3679. -
Introduce a new
libp2p::SwarmBuilderin favor of the now deprecatedlibp2p::swarm::SwarmBuilder. Seelibp2p::SwarmBuilderdocs on how to use the new builder. Also see PR 4120. -
Update
libp2p-identityversion to 0.2.6. Under the hood, we feature-flaggedlibp2p-identity'sranddependency but it is enabled by default when usinglibp2p. See PR 4349.
- Add
libp2p-quicstable release.
-
Include gossipsub when compiling for wasm. See PR 4217.
-
Add
jsonfeature which exposesrequest_response::json. See PR 4188. -
Add support for UPnP via the IGD protocol. See PR 4156.
-
Add
libp2p-memory-connection-limitsproviding memory usage based connection limit configurations. See PR 4281.
- Add
libp2p-webtransport-websysproviding WebTransport for WASM environments. See PR 4015.
-
Raise MSRV to 1.65. See PR 3715.
-
Protocol names are now required to be valid UTF8 strings. We delete the
ProtocolNametrait fromlibp2p::coreand replace it with a requirement forAsRef<str>. At the same time, we introduceStreamProtocol, a newtype inlibp2p::swarm. This newtype enforces additional variants like a leading forward-slash. We encourage users to useStreamProtocolwhen implementingUpgradeInfo. See PR 3746. -
Rename
NetworkBehaviour::OutEventtoNetworkBehaviour::ToSwarm,ConnectionHandler::InEventtoConnectionHandler::FromBehaviour,ConnectionHandler::OutEventtoConnectionHandler::ToBehaviour. See PR 3848. -
Remove deprecated
mplexmodule. You can still depend onlibp2p-mplexdirectly but we strongly encourage to migrate toyamux. This also removesmplexfrom thedevelopment_transportandtokio_development_transportfunctions. See PR 3920. -
Remove
libp2p-perfprotocol. To uselibp2p-perfone needs to import it directly. See PR 3990. -
Remove
libp2p-quicandlibp2p-webrtcprotocols. These are in alpha status and should be depended on directly. See PR 4041.
- Deprecate the
mplexfeature. The recommended baseline stream multiplexer isyamux. See PR 3689.
-
Introduce
libp2p::connection_limitsmodule. See PR 3386. -
Deprecate the
quicandwebrtcfeature. These two crates are only in alpha state. To properly communicate this to users, we want them to add the dependency directly which makes thealphaversion visible. See PR 3580. -
Introduce
libp2p::allow_block_listmodule and deprecatelibp2p::Swarm::ban_peer_id. See PR 3590. -
Introduce
libp2p::perfmodule. See PR 3693.
-
Depend on
libp2p-tlsv0.1.0. -
Introduce
ed25519feature. For backwards-compatibility, theed25519identity keys are still available without activating this feature. However, going forward, you should explicitly activate it to avoid compile errors going forward. See PR 3350.
-
Enable
NetworkBehaviours to manage connections. This deprecatesNetworkBehaviour::new_handlerandNetworkBehaviour::addresses_of_peer. Due to limitations in the Rust compiler, these deprecations may not show up for you, nevertheless they will be removed in a future release. Seelibp2p-swarm's CHANGELOG for details. -
Count bandwidth at the application level. Previously
BandwidthLoggingwould implementTransportand now implementsStreamMuxer(PR 3180).BandwidthLogging::newnow requires a 2nd argument:Arc<BandwidthSinks>- Remove
BandwidthFuture - Rename
BandwidthConnecLoggingtoInstrumentedStream
-
Remove
SimpleProtocoldue to being unused. Seelibp2p::core::upgradefor alternatives. See PR 3191. -
Bump MSRV to 1.65.0.
-
Update individual crates.
-
Update to
libp2p-dcutrv0.9.0. -
Update to
libp2p-pingv0.42.0. -
Update to
libp2p-request-responsev0.24.0. -
Update to
libp2p-kadv0.43.0. -
Update to
libp2p-floodsubv0.42.0. -
Update to
libp2p-autonatv0.10.0. -
Update to
libp2p-relayv0.15.0. -
Update to
libp2p-identifyv0.42.0. -
Update to
libp2p-rendezvousv0.12.0. -
Update to
libp2p-metricsv0.12.0. -
Update to
libp2p-swarmv0.42.0. -
Update to
libp2p-mdnsv0.43.0. -
Update to
libp2p-gossipsubv0.44.0. -
Update to
libp2p-yamuxv0.43.0. -
Update to
libp2p-mplexv0.39.0. -
Update to
libp2p-wasm-extv0.39.0. -
Update to
libp2p-plaintextv0.39.0. -
Update to
libp2p-noisev0.42.0. -
Update to
libp2p-corev0.39.0.
-
This is a large release. After > 4 years, rust-libp2p ships with an (alpha) QUIC implementation. The necessary TLS logic is extracted into its own crate, and can thus be used detached from QUIC, e.g. on top of TCP as an alternative to Noise. In addition to these two transports, this release adds a third, namely WebRTC (browser-to-server). But that is definitely not it. See below for the many other changes packed into this release.
- Introduce
libp2p-tlsv0.1.0-alpha. See PR 2945. - Introduce
libp2p-quicv0.7.0-alpha. See PR 2289. - Introduce
libp2p-webrtcv0.4.0-alpha. See PR 2289. - Remove deprecated features:
tcp-tokio,mdns-tokio,dns-tokio,tcp-async-io,mdns-async-io,dns-async-std. See PR 3001. - Remove
NetworkBehaviourmacro export from root crate in favor of re-exported macro fromlibp2p::swarm. Change your import fromlibp2p::NetworkBehaviourtolibp2p::swarm::NetworkBehaviour. See PR 3055. - Feature-gate
NetworkBehaviourmacro behindmacrosfeature flag. See PR 3055. - Update individual crates.
- Update to
libp2p-autonatv0.89.0. - Update to
libp2p-corev0.38.0. - Update to
libp2p-dcutrv0.8.0. - Update to
libp2p-deflatev0.38.0. - Update to
libp2p-dnsv0.38.0. - Update to
libp2p-floodsubv0.41.0. - Update to
libp2p-gossipsubv0.43.0. - Update to
libp2p-identifyv0.41.0. - Update to
libp2p-kadv0.42.0. - Update to
libp2p-mdnsv0.42.0. - Update to
libp2p-metricsv0.11.0. - Update to
libp2p-mplexv0.38.0. - Update to
libp2p-noisev0.41.0. - Update to
libp2p-pingv0.41.0. - Update to
libp2p-plaintextv0.38.0. - Update to
libp2p-pnetv0.22.2. - Update to
libp2p-relayv0.14.0. - Update to
libp2p-rendezvousv0.11.0. - Update to
libp2p-request-responsev0.23.0. - Update to
libp2p-swarmv0.41.0. - Update to
libp2p-tcpv0.38.0. - Update to
libp2p-udsv0.37.0. - Update to
libp2p-wasm-extv0.38.0. - Update to
libp2p-websocketv0.40.0. - Update to
libp2p-yamuxv0.42.0.
- Update to
-
Remove default features. You need to enable required features explicitly now. As a quick workaround, you may want to use the new
fullfeature which activates all features. See PR 2918. -
Introduce
tokioandasync-stdfeatures and deprecate the following ones:tcp-tokioin favor oftcp+tokiomdns-tokioin favor ofmdns+tokiodns-tokioin favor ofdns+tokiotcp-async-ioin favor oftcp+async-stdmdns-async-ioin favor ofmdns+async-stddns-async-stdin favor ofdns+async-std
See PR 2962.
-
Update individual crates.
- Update to
libp2p-autonatv0.8.0. - Update to
libp2p-corev0.37.0. - Update to
libp2p-dcutrv0.7.0. - Update to
libp2p-deflatev0.37.0. - Update to
libp2p-dnsv0.37.0. - Update to
libp2p-floodsubv0.40.0. - Update to
libp2p-gossipsubv0.42.0. - Update to
libp2p-identifyv0.40.0. - Update to
libp2p-kadv0.41.0. - Update to
libp2p-mdnsv0.41.0. - Update to
libp2p-metricsv0.10.0. - Update to
libp2p-mplexv0.37.0. - Update to
libp2p-noisev0.40.0. - Update to
libp2p-pingv0.40.0. - Update to
libp2p-plaintextv0.37.0. - Update to
libp2p-relayv0.13.0. - Update to
libp2p-rendezvousv0.10.0. - Update to
libp2p-request-responsev0.22.0. - Update to
libp2p-swarm-derivev0.30.1. - Update to
libp2p-swarmv0.40.0. - Update to
libp2p-tcpv0.37.0. - Update to
libp2p-udsv0.36.0. - Update to
libp2p-wasm-extv0.37.0. - Update to
libp2p-websocketv0.39.0. - Update to
libp2p-yamuxv0.41.0.
- Update to
-
Update to
libp2p-corev0.36.0. -
Update to
libp2p-swarm-derivev0.30.0. -
Update to
libp2p-dcutrv0.6.0. -
Update to
libp2p-rendezvousv0.9.0. -
Update to
libp2p-pingv0.39.0. -
Update to
libp2p-identifyv0.39.0. -
Update to
libp2p-floodsubv0.39.0. -
Update to
libp2p-relayv0.12.0. -
Update to
libp2p-metricsv0.9.0. -
Update to
libp2p-kadv0.40.0. -
Update to
libp2p-autonatv0.7.0. -
Update to
libp2p-request-responsev0.21.0.
-
Update to
libp2p-dcutrv0.5.0. -
Update to
libp2p-derivev0.29.0. -
Update to
libp2p-rendezvousv0.8.0. -
Update to
libp2p-pingv0.38.0. -
Update to
libp2p-identifyv0.38.0. -
Update to
libp2p-floodsubv0.38.0. -
Update to
libp2p-relayv0.11.0. -
Update to
libp2p-metricsv0.8.0. -
Update to
libp2p-kadv0.39.0. -
Update to
libp2p-autonatv0.6.0. -
Update to
libp2p-request-responsev0.20.0. -
Update to
libp2p-swarmv0.38.0.
- Update to
libp2p-derivev0.28.0.
- Semver bump Rust from
1.56.1to1.60.0. See PR 2646. - Added weak dependencies for features. See PR 2646.
- Update individual crates.
- Update to
libp2p-autonatv0.5.0. - Update to
libp2p-corev0.34.0. - Update to
libp2p-dcutrv0.4.0. - Update to
libp2p-floodsubv0.37.0. - Update to
libp2p-identifyv0.37.0. - Update to
libp2p-kadv0.38.0. - Update to
libp2p-metricsv0.7.0. - Update to
libp2p-mplexv0.34.0. - Update to
libp2p-noisev0.37.0. - Update to
libp2p-pingv0.37.0. - Update to
libp2p-plaintextv0.34.0. - Update to
libp2p-relayv0.10.0. - Update to
libp2p-rendezvousv0.7.0. - Update to
libp2p-request-responsev0.19.0. - Update to
libp2p-swarmv0.37.0. - Update to
libp2p-wasm-extv0.34.0. - Update to
libp2p-yamuxv0.38.0. - Update to
libp2p-udsv0.33.0.
- Update to
- Update individual crates.
- Update to
libp2p-dcutrv0.3.1. - Update to
libp2p-identifyv0.36.1. - Update to
libp2p-kadv0.37.1. - Update to
libp2p-relayv0.9.1. - Update to
libp2p-swarmv0.36.1.
- Update to
- Update individual crates.
- Update to
libp2p-plaintextv0.33.0. - Update to
libp2p-noisev0.36.0. - Update to
libp2p-wasm-extv0.33.0. - Update to
libp2p-yamuxv0.37.0. - Update to
libp2p-mplexv0.33.0. - Update to
libp2p-dcutrv0.3.0. - Update to
libp2p-rendezvousv0.6.0. - Update to
libp2p-pingv0.36.0. - Update to
libp2p-identifyv0.36.0. - Update to
libp2p-floodsubv0.36.0. - Update to
libp2p-relayv0.9.0. - Update to
libp2p-metricsv0.6.0. - Update to
libp2p-kadv0.37.0. - Update to
libp2p-autonatv0.4.0. - Update to
libp2p-request-responsev0.18.0. - Update to
libp2p-swarmv0.36.0. - Update to
libp2p-corev0.33.0.
- Update to
- Update individual crates.
- Update to
libp2p-dcutrv0.2.0. - Update to
libp2p-dnsv0.32.1. - Update to
libp2p-rendezvousv0.5.0. - Update to
libp2p-pingv0.35.0. - Update to
libp2p-identifyv0.35.0. - Update to
libp2p-floodsubv0.35.0. - Update to
libp2p-relayv0.8.0. - Update to
libp2p-metricsv0.5.0. - Update to
libp2p-kadv0.36.0. - Update to
libp2p-autonatv0.3.0. - Update to
libp2p-request-responsev0.17.0. - Update to
libp2p-swarmv0.35.0.
- Update to
-
Update individual crates.
- Update to
libp2p-autonatv0.2.0. - Update to
libp2p-corev0.32.0. - Update to
libp2p-deflatev0.32.0. - Update to
libp2p-dnsv0.32.0. - Update to
libp2p-floodsubv0.34.0. - Update to
libp2p-gossipsubv0.36.0. - Update to
libp2p-identifyv0.34.0. - Update to
libp2p-kadv0.35.0. - Update to
libp2p-mdnsv0.35.0. - Update to
libp2p-metricsv0.4.0. - Update to
libp2p-mplexv0.32.0. - Update to
libp2p-noisev0.35.0. - Update to
libp2p-pingv0.34.0. - Update to
libp2p-plaintextv0.32.0. - Update to
libp2p-relayv0.7.0. - Update to
libp2p-rendezvousv0.4.0. - Update to
libp2p-request-responsev0.16.0. - Update to
libp2p-swarmv0.34.0. - Update to
libp2p-derivev0.27.0. - Update to
libp2p-tcpv0.32.0. - Update to
libp2p-udsv0.32.0. - Update to
libp2p-wasm-extv0.32.0. - Update to
libp2p-websocketv0.34.0. - Update to
libp2p-yamuxv0.36.0.
- Update to
-
Update to
parking_lotv0.12.0. See PR 2463. -
Drop support for gossipsub in the wasm32-unknown-unknown target (see PR 2506).
-
Update individual crates.
libp2p-autonatlibp2p-corelibp2p-deflatelibp2p-dnslibp2p-floodsublibp2p-gossipsublibp2p-identifylibp2p-kadlibp2p-mdns(breaking compatibility with previous versions)libp2p-metricslibp2p-mplexlibp2p-noiselibp2p-pinglibp2p-plaintextlibp2p-relaylibp2p-rendezvouslibp2p-request-responselibp2p-swarm-derivelibp2p-swarmlibp2p-tcplibp2p-udslibp2p-wasm-extlibp2p-websocketlibp2p-yamux
-
Migrate to Rust edition 2021 (see PR 2339).
- Update individual crates.
libp2p-floodsublibp2p-gossipsublibp2p-identifylibp2p-kadlibp2p-mdnslibp2p-metricslibp2p-pinglibp2p-relaylibp2p-rendezvouslibp2p-request-responselibp2p-swarm-derivelibp2p-swarmlibp2p-websocket
- Forward
wasm-bindgenfeature tofutures-timer,instant,parking_lot,getrandom/jsandrand/wasm-bindgen.
-
Update individual crates.
libp2p-corelibp2p-deflatelibp2p-dnslibp2p-floodsublibp2p-gossipsublibp2p-identifylibp2p-kadlibp2p-mdnslibp2p-mplexlibp2p-noiselibp2p-pinglibp2p-plaintextlibp2p-relaylibp2p-request-responselibp2p-swarmlibp2p-tcplibp2p-udslibp2p-wasm-extlibp2p-websocketlibp2p-yamux
-
Re-export the
wasm-bindgenfeature fromparking_lot, solibp2pusers can opt-in to that crate's Wasm support. See PR 2180. -
Add
libp2p-metrics.
- Update individual crates.
libp2p-swarm-derive
- Update individual crates.
libp2p-corelibp2p-deflatelibp2p-dnslibp2p-floodsublibp2p-gossipsublibp2p-identifylibp2p-kadlibp2p-mdnslibp2p-mplexlibp2p-noiselibp2p-pinglibp2p-plaintextlibp2p-relaylibp2p-request-responselibp2p-swarmlibp2p-tcplibp2p-udslibp2p-wasm-extlibp2p-websocketlibp2p-yamux
- Update individual crates.
libp2p-corelibp2p-gossipsublibp2p-noiselibp2p-pnetlibp2p-wasm-ext
- Update individual crates.
libp2p-swarm-derive
-
Update individual crates.
libp2p-corelibp2p-dnslibp2p-floodsublibp2p-gossipsublibp2p-kadlibp2p-mdnslibp2p-pinglibp2p-relaylibp2p-request-responselibp2p-swarmlibp2p-wasm-extlibp2p-yamux
-
Drop support for
wasm32-unknown-unknownin favor ofwasm32-unknown-emscriptenandwasm32-wasiPR 2038.
-
Consolidate top-level utility functions for constructing development transports. There is now just
development_transport()(available with default features) andtokio_development_transport()(available when the corresponding tokio features are enabled). Furthermore, these are nowasync fns. The minor variations that also includedpnetsupport have been removed. PR 1927 -
Update libp2p crates.
-
Do not leak default features from libp2p crates. PR 1986.
-
Add
libp2p-relaytolibp2pfacade crate.
- Update
libp2p-yamuxto latest patch version.
-
Use
libp2p-swarm-derive, the formerlibp2p-core-derive. -
Update
libp2p-deflate,libp2p-gossipsub,libp2p-mdns,libp2p-request-response,libp2p-swarmandlibp2p-tcp.
-
Update
libp2p-coreand all dependent crates. -
The
tcp-async-stdfeature is nowtcp-async-io, still enabled by default.
- Update
libp2p-coreand all dependent crates.
- Update
libp2p-websocket.
- Update minimum patch version of
libp2p-websocket.
-
Update
libp2p-request-response. -
Update to
libp2p-mdns-0.26. -
Update
libp2p-websocketminimum patch version.
- Bump minimum
libp2p-corepatch version.
- Bump minimum
libp2p-tcppatch version.
- Update
multistream-selectand all dependent crates.
- Update
libp2p-plaintext.
- Update
libp2p-mdns,libp2p-tcpandlibp2p-udsas well aslibp2p-coreand all its dependers.
- Update
libp2p-core.
- Update
libp2p-core,libp2p-floodsub,libp2p-gossipsub,libp2p-mplex,libp2p-noise,libp2p-plaintext,libp2p-pnet,libp2p-request-response,libp2p-swarm,libp2p-tcp,libp2p-websocketandparity-multiaddr.
- Update to
libp2p-core0.22.1.
- Update
libp2p-yamuxto0.25.0. Step 4 of 4 in a multi-release upgrade process. See thelibp2p-yamuxCHANGELOG for details.
- Update
libp2p-yamuxto0.24.0. Step 3 of 4 in a multi-release upgrade process. See thelibp2p-yamuxCHANGELOG for details.
- Update
libp2p-yamuxto0.23.0. Step 2 of 4 in a multi-release upgrade process. See thelibp2p-yamuxCHANGELOG for details.
-
Remove the deprecated
libp2p-seciodependency. To continue to use SECIO, add an explicit dependency onlibp2p-secio. However, transitioning tolibp2p-noiseis strongly recommended. -
Update
libp2p-yamuxto0.22.0. This version starts a multi-release upgrade process. See thelibp2p-yamuxCHANGELOG for details. -
Bump
libp2p-noiseto0.24. See thelibp2p-noisechangelog for details about theLegacyConfig. -
The
ProtocolsHandlerinlibp2p-swarmhas a new associated typeInboundOpenInfo(PR 1714).
- Update
libp2p-core,libp2p-gossipsub,libp2p-kad,libp2p-mdns,libp2p-ping,libp2p-request-response,libp2p-swarmand dependent crates.
NOTE: For a smooth upgrade path from 0.21 to > 0.22
on an existing deployment, this version must not be skipped
or the provided legacy configuration for libp2p-noise used!
-
Bump
libp2p-noisedependency to0.22. See thelibp2p-noisechangelog for details about theLegacyConfig. -
Refactored bandwidth logging (PR 1670).
NOTE: For a smooth upgrade path from 0.21 to > 0.22
on an existing deployment using libp2p-noise, this version
must not be skipped!
- Bump
libp2p-noisedependency to0.21.
- Bump
libp2p-websocketslower bound.
-
Conditional compilation fixes for the
wasm32-wasitarget (PR 1633). -
New
libp2p-request-responsecrate (PR 1596). -
Updated libp2p dependencies.
-
Temporarily pin all
async-stddependencies to< 1.6. PR 1589 -
libp2p-core-derive: Fully qualified std::result::Result in macro PR 1587
-
libp2p-core,libp2p-swarm: Added support for multiple dialing attempts per peer, with a configurable limit. PR 1506 -
libp2p-core:PeerIds that use the identity hashing will now be properly displayed using the string representation of an identity multihash, rather than the canonical SHA 256 representation. PR 1576 -
libp2p-core: Updated to multihash 0.11.0. PR 1566 -
libp2p-core: Make the number of events buffered to/from tasks configurable. PR 1574 -
libp2p-dns,parity-multiaddr: Added support for the/dnsmultiaddr protocol. Additionally, themultiaddr::from_urlfunction will now use/dnsinstead of/dns4. PR 1575 -
libp2p-noise: Added theX25519Specprotocol suite which uses libp2p-noise-spec compliant signatures on static keys as well as the/noiseprotocol upgrade, hence providing a libp2p-noise-spec compliantXXhandshake.IKandIXare still supported withX25519Specthough not guaranteed to be interoperable with other libp2p implementations as these handshake patterns are not currently included in the libp2p-noise-spec. TheX25519Specimplementation will eventually replace the currentX25519implementation, with the former being removed. To upgrade without interruptions, you may temporarily includeNoiseConfigs for both implementations as alternatives in your transport upgrade pipeline. -
libp2p-kad: Consider fixed (K_VALUE) amount of peers at closest query initialization. UnlessKademliaConfig::set_replication_factoris used change has no effect. PR 1536 -
libp2p-kad: Provide more insight into, and control of, the execution of queries. All query results are now wrapped inKademliaEvent::QueryResult. As a side-effect of these changes and for as long as the record storage API is not asynchronous, local storage errors onput_recordare reported synchronously in aResult, instead of being reported asynchronously by an event. PR 1567 -
libp2p-tcp,libp2p: Made thelibp2p-tcp/async-stdfeature flag disabled by default, and split thelibp2p/tcpfeature in two:tcp-async-stdandtcp-tokio.tcp-async-stdis still enabled by default. PR 1471 -
libp2p-tcp: On listeners started with an IPv6 multi-address the socket optionIPV6_V6ONLYis set to true. Instead of relying on IPv4-mapped IPv6 address support, two listeners can be started if IPv4 and IPv6 should both be supported. IPv4 listener addresses are not affected by this change. PR 1555
libp2p-swarm: Make sure inject_dial_failure is called in all situations. PR 1549
-
libp2p-core: Treat connection limit errors as pending connection errors. PR 1546 -
libp2p-core-derive: Disambiguate calls toNetworkBehaviour::inject_event. PR 1543 -
libp2p-floodsub: Allow sent messages seen as subscribed. PR 1520 -
libp2p-kad: Return peers independent of record existence. PR 1544 -
libp2p-wasm-ext: Fix "parsed is null" errors being thrown. PR 1535
-
libp2p-core: Finished "identity hashing" for peer IDs migration. PR 1460 -
libp2p-core: Removepoll_broadcast. PR 1527 -
libp2p-core,libp2p-swarm: Report addresses of closed listeners. PR 1485 -
libp2p-core: Support for multiple connections per peer and configurable connection limits. See PR #1440, PR #1519 and issue #912 for details. -
libp2p-swarm: Pass the cause of closing a listener toinject_listener_closed. PR 1517 -
libp2p-swarm: Support for multiple connections per peer and configurable connection limits. See PR #1440, PR #1519 and issue #912 for details. -
libp2p-swarm: TheSwarmEventnow returns more events. PR 1515 -
libp2p-swarm: Newprotocols_handler::multimodule. PR 1497 -
libp2p-swarm: Allow configuration of outbound substreams. PR 1521 -
libp2p-kad: Providers returned from a lookup are now deduplicated. PR 1528 -
libp2p-kad: Allow customising the maximum packet size. PR 1502 -
libp2p-kad: Allow customising the (libp2p) connection keep-alive timeout. PR 1477 -
libp2p-kad: Avoid storing records that are expired upon receipt (optimisation). PR 1496 -
libp2p-kad: Fixed potential panic on computing record expiry. PR 1492 -
libp2p-mplex: Guard against use of underlyingSinkupon error or connection close. PR 1529 -
multistream-select: Upgrade to stable futures. PR 1484 -
multihash: Removed the crate in favour of the upstream crate. PR 1472
- Fixed yamux connections not properly closing and being stuck in the
CLOSE_WAITstate. - Added a
websocket_transport()function inlibp2p-wasm-ext, behind a Cargo feature. - Fixed ambiguity in
IntoProtocolsHandler::selectvsProtocolsHandler::selectin theNetworkBehaviourcustom derive.
- Fixed wrong representation of
PeerIds being used inKademlia::get_closest_peers. - Implemented
FusedStreamforSwarm.
- Removed the
Substreamassociated type from theProtocolsHandlertrait. The type of the substream is now alwayslibp2p::swarm::NegotiatedSubstream. - As a consequence of the previous change, most of the implementations of the
NetworkBehaviourtrait provided by libp2p (Ping,Identify,Kademlia,Floodsub,Gossipsub) have lost a generic parameter. - Removed the first generic parameter (the transport) from
SwarmandExpandedSwarm. The transport is now abstracted away in the internals of the swarm. - The
Sendand'staticbounds are now enforced directly on theProtocolsHandlertrait and its associatedInboundUpgradeandOutboundUpgradeimplementations. - Modified
PeerIds to compare equal across the identity and SHA256 hashes. As a consequence, theBorrowimplementation ofPeerIdnow always returns the bytes representation of a multihash with a SHA256 hash. - Modified libp2p-floodsub to no longer hash the topic. The new behaviour is now compatible with go-libp2p and js-libp2p, but is a breaking change with regards to rust-libp2p.
- Added libp2p-pnet. It makes it possible to protect networks with a pre-shared key (PSK).
- Modified the
poll_methodparameter of theNetworkBehaviourcustom derive. The expected method now takes an additional parameter of typeimpl PollParametersto be consistent with theNetworkBehaviour::pollmethod. - libp2p-noise now compiles for WASM targets.
- Changed libp2p-noise to grow its memory buffers dynamically. This should reduce the overall memory usage of connections that use the noise encryption.
- Fixed libp2p-gossipsub to no longer close the connection if the inbound substream is closed by the remote.
- All crates prefixed with
libp2p-now use the same version number. - Added a new variant
ListenerEvent::Errorfor listeners to report non-fatal errors.libp2p-tcpuses this variant to report errors that happen on remote sockets before they have been accepted and errors when trying to determine the local machine's IP address.
- Added
libp2p-gossipsub. - Added
SwarmBuilder::executorto allow configuring which tasks executor to use. - Added
TokioTcpConfiginlibp2p-tcpandTokioUdsConfiginlibp2p-udsbehindtokiofeatures. These structs usetokioand require atokioruntime executor to be configured viaSwarmBuilder::executor. - Changed the
OutboundUpgradeandInboundUpgradetraits to no longer be passed aNegotiated<C>but just aC. TheNegotiatedis now in the trait bounds requirements ofProtocolsHandler. - Fixed
libp2p-wasm-extreturningErr(WouldBlock)rather thanPending. - Fixed
libp2p-dnsnot segregating DNS4 and DNS6. - Removed some unnecessary
Unpinrequirements on futures. - Changed
Mdns::newto no longer beasync. - Fixed
libp2p-kadkeeping connections alive when it shouldn't. - Fixed
InboundUpgradenot always properly implemented onNoiseConfig.
- Upgraded the crate to stable futures.
- Use varints instead of fixed sized (4 byte) integers to delimit plaintext 2.0 messages to align implementation with the specification.
- Refactored the
core::upgrademodule to provide async functions. - Changed the
Streamtrait implementation ofSwarmto no longer return aResult. - Added the
Swarm::nextandSwarm::next_eventfunctions and theSwarmEventenum. - Changed
ProtocolsHandler::pollto no longer return an error. Instead,ProtocolsHandlerEventhas a newClosevariant which corresponds to what an error represented before. - Changed all the traits that have a
pollfunction (i.e.NetworkBehaviour,ProtocolsHandler,NodeHandler) to have an additional&mut Contextparameter, to reflect the changes in theFuturetrait. - Revamped the API of
libp2p_websockets::framed. - Added protocol string to
Error::UnknownProtocolString.
- Fixed the
libp2p-noisehandshake not flushing the underlying stream before waiting for a response. - Fixed semver issue with the
protobufcrate.
- Maintenance release to bump dependencies and deal with an accidental breaking change in multihash 0.1.4.
- Reworked the transport upgrade API. See libp2p#1240 for more information.
- Added a parameter allowing to choose the protocol negotiation protocol when upgrading a connection or a substream. See libp2p#1245 for more information.
- Added an alternative
multistream-selectprotocol calledV1Lazy. - Added
PlainText2Configthat implements the/plaintext/2.0.0protocol. - Refactored
libp2p-identify. Some items have been renamed. - Now accepting
PeerIds using theidentityhashing algorithm as valid. - Removed
libp2p-observedandlibp2p-ratelimit. - Fixed mDNS long peer IDs not being transmitted properly.
- Added some
Debugtrait implementations. - Fixed potential arithmetic overflows in
libp2p-kadandmultistream-select.
- In some situations,
multistream-selectwill now assume that protocol negotiation immediately succeeds. If it turns out that it failed, an error is generated when reading or writing from/to the stream. - Replaced
listen_addrwithlocal_addrin events related to incoming connections. The address no longer has to match a previously-reported address. - Listeners now have an identifier and can be stopped.
- Added
NetworkBehaviour::inject_listener_errorandNetworkBehaviour::inject_listener_closed. For diagnostic purposes, listeners can now report errors on incoming connections, such as when callingaccept(2)fails. - Fixed tasks sometimes not being notified when a network event happens in
libp2p-mplex. - Fixed a memory leak in
libp2p-kad. - Added
Toggle::is_enabled(). - Removed
IdentifyTransport.
libp2p-kad: Completed the core functionality of the record storage API, thereby extending theRecordStorefor provider records. All records expire by default and are subject to regular republication and caching as per the Kademlia spec(s). Expiration and publication intervals are configurable through theKademliaConfig.libp2p-kad: The routing table now never stores peers without a known (listen) address. In particular, on receiving a new inbound connection, the Kademlia behaviour now emitsKademliaEvent::UnroutablePeerto indicate that in order for the peer to be added to the routing table and hence considered a reachable node in the DHT, a listen address of the peer must be discovered and reported viaKademlia::add_address. This is usually achieved through the use of theIdentifyprotocol on the same connection(s).libp2p-kad: Documentation updates.- Extracted the
swarmandprotocols_handler-related contents fromlibp2p-coreto a newlibp2p-swarmcrate. - Renamed
RawSwarmtoNetwork. - Added
Floodsub::publish_any. - Replaced unbounded channels with bounded ones at the boundary between the
Network(formerlyRawSwarm) andNodeHandler. The node handlers will now wait if the main task is busy, instead of continuing to push events to the channel. - Fixed the
address_translationfunction ignoring/dnsaddresses.
PollParametersis now a trait instead of a struct.- The
Swarmcan now be customized with connection information. - Fixed write-only substreams now delivering data properly.
- Fixed the TCP listener accidentally shutting down if an incoming socket was closed too quickly.
- Improved the heuristics for determining external multiaddresses based on reports.
- Various fixes to Kademlia iterative queries and the WebSockets transport.
EitherOutputnow implementsStreamandSinkif their variants also implement these traits.libp2p::websocket::error::Errornow implementsSync.
- Major fixes and performance improvements to libp2p-kad.
- Initial prototype for record storage in libp2p-kad.
- Rewrote the implementation of WebSockets. It now properly supports WebSockets Secure (WSS).
- Removed
BrowserWsConfig. Please uselibp2p::wasm_ext::ExtTransportinstead. - Added a
Pathparameter tomultiaddr::Protocol::WSandWSS. The string representation when a path is present is respectivelyx-parity-ws/<path>andx-parity-wss/<path>where<path>is percent-encoded. - Fixed an issue with
libp2p-tcpwhere the wrong listened address was returned, if the actual address was loopback. - Added
core::upgrade::OptionalUpgrade. - Added some utility functions in
core::identity::secp256k1. - It is now possible to inject an artificial connection in the
RawSwarm.
- Fixed a vulnerability in ED25519 signatures verification in libp2p-core.
- Crate now successfully runs from within the browser when compiled to WASM.
- Modified the constructors of
NoiseConfigto accept any type of public key. The Noise handshake has consequently been modified. - Changed the
StreamMuxertrait to have anErrorassociated type. - The
Swarmnow ranks externally-visible multiaddresses by how often they have been reported, ensuring that weird or malicious reports don't affect connectivity too much. - Added
IntoProtocolsHandler::inbound_protocol. Must return the same value as whatProtocolsHandler::listen_protocolwould return. IntoProtocolsHandler::into_handlernow takes a second parameter with the&ConnectedPointto the node we are connected to.- Replaced the
secp256k1crate withlibsecp256k1. - Fixed
Kademlia::add_providingtaking aPeerIdinstead of aMultihash. - Fixed various bugs in the implementation of
Kademlia. - Added
OneSubstreamMuxer. - Added the
libp2p-wasm-extcrate. - Added
multiaddr::from_url. - Added
OptionalTransport.
- Fixed a vulnerability in ED25519 signatures verification in libp2p-core.
- Fixed the inactive connections shutdown mechanism not working.
Transport::listen_onmust now return aStreamthat producesListenEvents. This makes it possible to notify about listened addresses at a later point in time.Transport::listen_onno longer returns an address we're listening on. This is done throughListenEvents. All otherlisten_onmethods have been updated accordingly.- Added
NetworkBehaviour::inject_new_listen_addr,NetworkBehaviour::inject_expired_listen_addrandNetworkBehaviour::inject_new_external_addr. ProtocolsHandler::listen_protocolandProtocolsHandlerEvent::OutboundSubstreamRequestmust now return aSubstreamProtocolstruct containing a timeout for the upgrade.Ping::newnow requires aPingConfig, which can be created withPingConfig::new.- Removed
Transport::nat_traversalin favour of a stand-aloneaddress_translationfunction inlibp2p-core. - Reworked the API of
Multiaddr. - Removed the
ToMultiaddrtrait in favour ofTryFrom. - Added
Swarm::ban_peer_idandSwarm::unban_peer_id. - The
TPeerIdgeneric parameter ofRawSwarmis nowTConnInfoand must now implement aConnectionInfotrait. - Reworked the
PingEvent. - Renamed
KeepAlive::ForevertoYesandKeepAlive::NowtoNo.
- Replaced
NetworkBehaviour::inject_dial_failurewithinject_dial_failureandinject_addr_reach_failure. The former is called when we have finished trying to dial a node without success, while the latter is called when we have failed to reach a specific address. - Fixed Kademlia storing a different hash than the reference implementation.
- Lots of bugfixes in Kademlia.
- Modified the
InboundUpgradeandOutboundUpgradetrait to take aNegotiated<TSocket>instead ofTSocket. PollParameters::external_addressesnow returnsMultiaddres as reference instead of by value.- Added
Swarm::external_addresses. - Added a
core::swarm::toggle::Togglethat allows having a disabledNetworkBehaviour.
- Moved the
SecioKeypairstruct incore/identityand renamed it toKeypair. - mplex now supports half-closed substreams.
- Renamed
StreamMuxer::shutdown()toclose(). - Closing a muxer with the
close()method (formerlyshutdown) now "destroys" all the existing substreams. Afterclose()as been called, they all return either EOF or an error. - The
shutdown_substream()method now closes only the writing side of the substream, and you can continue reading from it until EOF or until you delete it. This was actually already more or less the case before, but it wasn't properly reflected in the API or the documentation. poll_inbound()andpoll_outbound()no longer return anOption, asNonewas the same as returning an error.- Removed the
NodeClosedevents and renamedNodeErrortoNodeClosed. From the API's point of view, a connection now always closes with an error. - Added the
NodeHandlerWrapperErrorenum that describes an error generated by the protocols handlers grouped together. It is eitherUselessTimeoutorHandler. This allows properly reporting closing a connection because it is useless. - Removed
NodeHandler::inject_inbound_closed,NodeHandler::inject_outbound_closed,NodeHandler::shutdown, andProtocolsHandler::shutdown. The handler is now dropped when a shutdown process starts. This should greatly simplify writing a handler. StreamMuxer::closenow impliesflush_all.- Removed the
Shutdownenum fromstream_muxer. - Removed
ProtocolsHandler::fuse(). - Reworked some API of
core/nodes/node.rsandcore/nodes/handled_node.rs. - The core now works even outside of a tokio context.
- Fixed periodic pinging not working.
- Fixed wrong version of libp2p-noise.
- The
multiaddr!macro has been moved to themultiaddrcrate and is now reexported under the namebuild_multiaddr!. - Modified the functions in
upgrade::transferto be more convenient to use. - Now properly sending external addresses in the identify protocol.
- Fixed duplicate addresses being reported in identify and Kademlia.
- Fixed infinite looping in the functions in
upgrade::transfer. - Fixed infinite loop on graceful node shutdown with the
ProtocolsHandlerSelect. - Fixed various issues with nodes dialing each other simultaneously.
- Added the
StreamMuxer::is_remote_acknowledged()method. - Added a
BandwidthLoggingtransport wrapper that logs the bandwidth consumption. - The addresses to try dialing when dialing a node is now refreshed by the
Swarmwhen necessary. - Lots of modifications to the semi-private structs in
core/nodes. - Added
IdentifyEvent::SendBack, when we send back our information. - Rewrote the
MemoryTransportto be similar to theTcpConfig.
- Added
NetworkBehaviour::inject_replacedthat is called whenever we replace a connection with a different connection to the same peer. - Fixed various issues with Kademlia.
- Removed the
topologymodule and everything it contained, including theTopologytrait. - Added
libp2p-noisethat supports Noise handshakes, as an alternative tolibp2p-secio. - Updated
ringto version 0.14. - Creating a
Swarmnow expects thePeerIdof the local node, instead of aTopology. - Added
NetworkBehaviour::addresses_of_peerthat returns the addresses aNetworkBehaviourknows about a given peer. This exists as a replacement for the topology. - The
KademliaandMdnsbehaviours now report and store the list of addresses they discover. - You must now call
Floodsub::add_node_to_partial_view()andFloodsub::remove_node_from_partial_viewto add/remove nodes from the list of nodes that floodsub must send messages to. - Added
NetworkBehaviour::inject_dial_failurethat is called when we fail to dial an address. ProtocolsHandler::connection_keep_alive()now returns aKeepAliveenum that provides more fine grained control.- The
NodeHandlerWrapperno longer has a 5 seconds inactivity timeout. This is now handled entirely byProtocolsHandler::connection_keep_alive(). - Now properly denying connections incoming from the same
PeerIdas ours. - Added a
SwarmBuilder. Theincoming_limitmethod lets you configure the number of simultaneous incoming connections. - Removed
FloodsubHandler,PingListenHandlerandPeriodicPingHandler. - The structs in
core::nodesare now generic over thePeerId. - Added
SecioKeypair::ed25519_raw_key(). - Fix improper connection shutdown in
ProtocolsHandler.
- Fixed improper dependencies versions causing deriving
NetworkBehaviourto generate an error.
- Added the
IntoNodeHandlerandIntoProtocolsHandlertraits, allowing node handlers and protocol handlers to know thePeerIdof the node they are interacting with.
- The
Transporttrait now has anErrorassociated type instead of always usingstd::io::Error. - Merged
PeriodicPingandPingListeninto onePingbehaviour. Floodsubnow generatesFloodsubEvents instead of direct floodsub messages.- Added
ProtocolsHandler::connection_keep_alive. If all the handlers returnfalse, then the connection to the remote node will automatically be gracefully closed after a few seconds. - The crate now successfully compiles for the
wasm32-unknown-unknowntarget. - Updated
ringto version 0.13. - Updated
secp256k1to version 0.12. - The enum returned by
RawSwarm::peer()can now returnLocalNode. This makes it impossible to accidentally attempt to dial the local node. - Removed
Transport::map_err_dial. - Removed the
Resultfrom some connection-related methods in theRawSwarm, as they could never error. - If a node doesn't respond to pings, we now generate an error on the connection instead of trying to gracefully close it.