PackageTrack
Sign in Get early access

litep2p

Peer-to-peer networking library

0.15.0 5.4M downloads/mo #4376 most downloaded on crates.io paritytech/litep2p

What this package is like to depend on

Last release 6 days ago

17 Aug 2026

Ships fairly regularly

a new release about every 3 weeks

Nearly every release is documented

notes for 36 of 36 stable releases

Nothing withdrawn

no release was ever pulled

3 years old

37 releases · first in 2023

15 releases in the last 12 months

see the full history below

Release timeline

37 releases · Apr 2023 to Aug 2026
2024 2025 2026
Release Pre-release

Releases

latest 37
  1. 0.15.0 17 Aug 2026
    Release notes

    This release focuses on WebRTC. It is the first release with official WebRTC support. Expect things to break and get fixed in subsequent point releases.

    This release is also semver breaking on the error API. Error::CannotReadSystemDnsConfig now carries an opaque DnsInitError instead of a hickory-resolver error type, and the new Error::DnsResolverInit variant reports resolver construction failures. Error is now #[non_exhaustive], so external match expressions over it require a wildcard arm. Together these changes keep hickory-resolver out of the public API, making future resolver bumps semver compatible.

    Added

    • webrtc: support wildcard listen addresses (#640)
    • bitswap: enable Keccak and BLAKE2b hashers for CIDs (#641)

    Changed

    • deps: bump hickory-resolver and str0m (#642)
    • deps: bump str0m to 0.22 (#639)
    • webrtc: use a shared 16 KiB buffer for the WebRtcTransport stream (#623)

    Fixed

    • dns: stop leaking hickory error types in litep2p's public API (#643)
    • webrtc: enforce strict client network identity verification (#637)
    • webrtc: fix input backpressure (#626)
    • webrtc: properly handle str0m::Event::Closed (#627)
    Open source →
    Release notes

    This release focuses on WebRTC. It is the first release with official WebRTC support. Expect things to break and get fixed in subsequent point releases.

    This release is also semver breaking on the error API. Error::CannotReadSystemDnsConfig now carries an opaque DnsInitError instead of a hickory-resolver error type, and the new Error::DnsResolverInit variant reports resolver construction failures. Error is now #[non_exhaustive], so external match expressions over it require a wildcard arm. Together these changes keep hickory-resolver out of the public API, making future resolver bumps semver compatible.

    Added

    • webrtc: support wildcard listen addresses (#640)
    • bitswap: enable Keccak and BLAKE2b hashers for CIDs (#641)

    Changed

    • deps: bump hickory-resolver and str0m (#642)
    • deps: bump str0m to 0.22 (#639)
    • webrtc: use a shared 16 KiB buffer for the WebRtcTransport stream (#623)

    Fixed

    • dns: stop leaking hickory error types in litep2p's public API (#643)
    • webrtc: enforce strict client network identity verification (#637)
    • webrtc: fix input backpressure (#626)
    • webrtc: properly handle str0m::Event::Closed (#627)
    Open source →
  2. 0.14.3 22 Jun 2026
    Release notes

    This patch release is dedicated entirely to strengthening the WebRTC transport layer, specifically focusing on connection resilience and build stability.

    Fixed

    • fix(webrtc): decode errors during opening phase are not recoverable (#622)
    • fix(webrtc): build vendored OpenSSL for str0m (#620)
    • fix(webrtc): time out inbound and outbound opening data channels (#617)
    Open source →
    Release notes

    This patch release is dedicated entirely to strengthening the WebRTC transport layer, specifically focusing on connection resilience and build stability.

    Fixed

    • fix(webrtc): decode errors during opening phase are not recoverable (#622)
    • fix(webrtc): build vendored OpenSSL for str0m (#620)
    • fix(webrtc): time out inbound and outbound opening data channels (#617)
    Open source →
  3. 0.14.2 12 Jun 2026
    Release notes

    This release hardens the Bitswap and WebRTC protocols against silent failure modes that could leave connections or pending work stuck without ever being reported to higher-level protocols.

    Bitswap now handles SubstreamOpenFailure, DialFailure, and ConnectionClosed events, bringing it in line with the other protocols. Previously, a failed outbound substream would leave responses stacking onto a dead queue, causing the peer to silently stop being served until the local node was restarted.

    WebRTC replaces several unwrap/expect calls in the connection event loop with proper error propagation, and now reports substream open failures to upper layers when the RTC association is no longer healthy, preventing protocols from hanging on a substream that will never open.

    Fixed

    • bitswap: Handle substream open and connection failures to avoid stuck pending responses (#618)
    • webrtc: Avoid panics and properly close opening substreams (#616)
    Open source →
    Release notes

    This release hardens the Bitswap and WebRTC protocols against silent failure modes that could leave connections or pending work stuck without ever being reported to higher-level protocols.

    Bitswap now handles SubstreamOpenFailure, DialFailure, and ConnectionClosed events, bringing it in line with the other protocols. Previously, a failed outbound substream would leave responses stacking onto a dead queue, causing the peer to silently stop being served until the local node was restarted.

    WebRTC replaces several unwrap/expect calls in the connection event loop with proper error propagation, and now reports substream open failures to upper layers when the RTC association is no longer healthy, preventing protocols from hanging on a substream that will never open.

    Fixed

    • bitswap: Handle substream open and connection failures to avoid stuck pending responses (#618)
    • webrtc: Avoid panics and properly close opening substreams (#616)
    Open source →
  4. 0.14.1 10 Jun 2026
    Release notes

    This release focuses on advancing the WebRTC transport layer toward production readiness, along with stability patches and CI improvements.

    WebRTC has received substantial upgrades, including multiple listening addresses, backpressure handling, a spec-compliant multistream-select implementation, and critical bug fixes. While the implementation is still considered experimental, it is significantly closer to being production-ready.

    Additionally, this release mitigates overflow issues for long-running mDNS nodes and introduces QUIC support for DNS dialing.

    Added

    • feat(webrtc): update how webrtc certificate is handled (#610)
    • feat(webrtc): introduce WebRtcListener to support multiple listen addresses (#579)
    • feat(webrtc): producer backpressure (#575)
    • feat(webrtc): multistream-select protocol implementation (#573)
    • Add automated publishing to crates.io (#599)
    • support for dialing DNS addresses with QUIC (#542)

    Changed

    • refactor(webrtc): update str0m dep (#569)
    • Replace unwrap/expect with proper error propagation (#535)
    • webrtc: Decode webrtc message from multiple SCTP messages (#594)

    Fixed

    • fix(webrtx): ICE issue + substream shutdown procedure (#586)
    • fix(webrtc): use Protocol::WebRTCDirect after Multiaddr version bump (#578)
    • webrtc: Fix memory leak by detecting closed connections (#608)
    • mdns: Avoid overflows on long running nodes (#585)
    Open source →
    Release notes

    This release focuses on advancing the WebRTC transport layer toward production readiness, along with stability patches and CI improvements.

    WebRTC has received substantial upgrades, including multiple listening addresses, backpressure handling, a spec-compliant multistream-select implementation, and critical bug fixes. While the implementation is still considered experimental, it is significantly closer to being production-ready.

    Additionally, this release mitigates overflow issues for long-running mDNS nodes and introduces QUIC support for DNS dialing.

    Added

    • feat(webrtc): update how webrtc certificate is handled (#610)
    • feat(webrtc): introduce WebRtcListener to support multiple listen addresses (#579)
    • feat(webrtc): producer backpressure (#575)
    • feat(webrtc): multistream-select protocol implementation (#573)
    • Add automated publishing to crates.io (#599)
    • support for dialing DNS addresses with QUIC (#542)

    Changed

    • refactor(webrtc): update str0m dep (#569)
    • Replace unwrap/expect with proper error propagation (#535)
    • webrtc: Decode webrtc message from multiple SCTP messages (#594)

    Fixed

    • fix(webrtx): ICE issue + substream shutdown procedure (#586)
    • fix(webrtc): use Protocol::WebRTCDirect after Multiaddr version bump (#578)
    • webrtc: Fix memory leak by detecting closed connections (#608)
    • mdns: Avoid overflows on long running nodes (#585)
    Open source →
  5. 0.14.0 11 May 2026
    Release notes

    This release updates several core dependencies, aligns clippy rules with the latest Rust version, and enhances observability for notification protocols.

    Notably, this version introduces a breaking change to error handling: the PeerId::from_bytes method now returns a specialized ParseError instead of a multihash::Error.

    Changed

    • deps: upgrade multiaddr 0.18, multihash 0.19, libp2p 0.56 (#564)

    Fixed

    • fix clippy errors and warnings (#565)

    Added

    • notification: Expose protocol name through trace logs (#563)
    Open source →
  6. 0.13.3 09 Mar 2026
    Release notes

    This release bumps the rust yamux dependency to 0.13.10 to align with the latest upstream version, which includes important stability fixes.

    Open source →
  7. 0.13.2 02 Mar 2026
    Release notes

    [0.13.2] - 2026-03-02

    This is a hotfix release fixing ping protocol panic in debug builds. The release also includes WebRTC fixes.

    Fixed

    • webrtc/fix: Ensure delay future is awaited (#548)
    • ping: Fix panic in debug builds (#551)
    • webrtc: Ensure nonstun packets cannot panic transport layer (#550)
    • webrtc: Avoid memory leaks by cleaning stale hashmap entries (#549)
    Open source →
    Release notes

    This is a hotfix release fixing ping protocol panic in debug builds. The release also includes WebRTC fixes.

    Fixed

    • webrtc/fix: Ensure delay future is awaited (#548)
    • ping: Fix panic in debug builds (#551)
    • webrtc: Ensure nonstun packets cannot panic transport layer (#550)
    • webrtc: Avoid memory leaks by cleaning stale hashmap entries (#549)
    Open source →
  8. 0.13.1 27 Feb 2026
    Release notes

    [0.13.1] - 2026-02-27

    This release includes multiple fixes of transports and protocols, fixing connection stability issues with other libraries (specifically, smoldot) and increasing success rates of dialing & opening substreams, especially in extreme cases when remote nodes have a lot of private addresses published to the DHT.

    Fixed

    • ping: Conform to the spec & exclude from connection keep-alive (#416)
    • transport: Make accept async to close the gap on service races (#525)
    • transport: Limit dial concurrency and bound total dialing time (#538)
    • webrtc: Support FIN/FIN_ACK handshake for substream shutdown (#513)
    • transport: Expose failed addresses to the transport manager (#529)

    Changed

    • manager: Prioritize public addresses for dialing (#530)
    Open source →
    Release notes

    This release includes multiple fixes of transports and protocols, fixing connection stability issues with other librariies (specifically, smoldot) and increasing success rates of dialing & opening substreams, especially in extreme cases when remote nodes have a lot of private addresses published to the DHT.

    Fixed

    • ping: Conform to the spec & exclude from connection keep-alive (#416)
    • transport: Make accept async to close the gap on service races (#525)
    • transport: Limit dial concurrency and bound total dialing time (#538)
    • webrtc: Support FIN/FIN_ACK handshake for substream shutdown (#513)
    • transport: Expose failed addresses to the transport manager (#529)

    Changed

    • manager: Prioritize public addresses for dialing (#530)
    Open source →
  9. 0.13.0 21 Jan 2026
    Release notes

    [0.13.0] - 2026-01-21

    This release brings multiple fixes to both the transport and application-level protocols.

    Specifically, it enhances WebSocket stability by resolving AsyncWrite errors and ensuring that partial writes during the negotiation phase no longer trigger connection failures.

    At the same time, Bitswap client functionality is introduced, which makes this release semver breaking.

    Added

    • Add Bitswap client (#501)

    Fixed

    • notif/fix: Avoid CPU busy loops on litep2p full shutdown (#521)
    • protocol: Ensure transport manager knows about closed connections (#515)
    • substream: Decrement the bytes counter to avoid excessive flushing (#511)
    • crypto/noise: Improve stability of websockets by fixing AsyncWrite implementation (#518)
    • bitswap: Split block responses into batches under 2 MiB (#516)
    • crypto/noise: Fix connection negotiation logic on partial writes (#519)
    • substream/fix: Fix partial reads for ProtocolCodec::Identity (#512)
    • webrtc: Avoid panics returning error instead (#509)
    • bitswap: e2e test & max payload fix (#508)
    • tcp: Exit connections when events fail to propagate to protocols (#506)
    • webrtc: Avoid future being dropped when channel is full (#483)
    Open source →
    Release notes

    This release brings multiple fixes to both the transport and application-level protocols.

    Specifically, it enhances WebSocket stability by resolving AsyncWrite errors and ensuring that partial writes during the negotiation phase no longer trigger connection failures.

    At the same time, Bitswap client functionality is introduced, which makes this release semver breaking.

    Added

    • Add Bitswap client (#501)

    Fixed

    • notif/fix: Avoid CPU busy loops on litep2p full shutdown (#521)
    • protocol: Ensure transport manager knows about closed connections (#515)
    • substream: Decrement the bytes counter to avoid excessive flushing (#511)
    • crypto/noise: Improve stability of websockets by fixing AsyncWrite implementation (#518)
    • bitswap: Split block responses into batches under 2 MiB (#516)
    • crypto/noise: Fix connection negotiation logic on partial writes (#519)
    • substream/fix: Fix partial reads for ProtocolCodec::Identity (#512)
    • webrtc: Avoid panics returning error instead (#509)
    • bitswap: e2e test & max payload fix (#508)
    • tcp: Exit connections when events fail to propagate to protocols (#506)
    • webrtc: Avoid future being dropped when channel is full (#483)
    Open source →
  10. 0.12.3 16 Dec 2025
    Release notes

    This release improves the robustness of the multistream-select negotiation over WebRTC transport and fixes inbound bandwidth metering on substreams. It also enhances the dialing success rate by improving the transport dialing logic. Additionally, it re-exports CID's multihash to facilitate the construction of CID V1.

    Changed

    • transports: Improves the robustness and success rate of connection dialing (#495)
    • types: Re-export cid's multihash to construct CID V1 (#491)

    Fixed

    • fix: multistream-select negotiation on outbound substream over webrtc (#465)
    • substream: Fix inbound bandwidth metering (#499)
    Open source →
  11. 0.12.2 28 Nov 2025
    Release notes

    This release allows all Bitswap CIDs (v1) to pass regardless of the used hash. It also enhances local address checks in the transport manager.

    Changed

    • transport-service: Enhance logging with protocol names (#485)
    • bitswap: Reexports for CID (#486)
    • Allow all the Bitswap CIDs (v1) to pass regardless of used hash (#482)
    • transport/manager: Enhance local address checks (#480)
    Open source →
  12. 0.12.1 21 Nov 2025
    Release notes

    This release adds support for connecting to multiple Kademlia DHT networks. The change is backward-compatible, no client code modifications should be needed compared to v0.12.0.

    Changed

    • kad: Allow connecting to more than one DHT network (#473)
    • service: Log services that have closed (#474)

    Fixed

    • update simple-dns (#470)
    Open source →
  13. 0.12.0 11 Nov 2025
    Release notes

    This release adds KademliaEvent::PutRecordSuccess & KademliaEvent::AddProviderSuccess events to Kademlia, allowing to track whether publishing a record or a provider was successfull. While PutRecordSuccess was present in the previous versions of litep2p, it was actually never emitted. Note that AddProviderSuccess and QueryFailed are also generated during automatic provider refresh, so those may be emitted for QueryIds not known to the client code.

    Added

    • kademlia: Track success of ADD_PROVIDER queries (#432)
    • kademlia: Workaround for dealing with not implemented PUT_VALUE ACKs (#430)
    • kademlia: Track success of PUT_VALUE queries (#427)

    Fixed

    • Identify: gracefully close substream after sending payload (#466)
    • fix: transport context polling order (#456)

    Changed

    • refactor: implement builder pattern for TransportManager (#453)
    Open source →
  14. 0.11.1 28 Oct 2025
    Release notes

    This release ensures that polling the yamux controller after an error does not lead to unexpected behavior.

    Fixed

    • yamux/control: Ensure poll next inbound is not called after errors (#445)
    Open source →
  15. 0.11.0 20 Oct 2025
    Release notes

    This release adds support for RSA remote network identity keys gated behind rsa feature. It also fixes mDNS initialization in the environment with no multicast addresses available and Bitswap compatibility with kubo IPFS client >= v0.37.0.

    Added

    • Support RSA remote network identity keys (#423)

    Fixed

    • bitswap: Reuse inbound substream for subsequent requests (#447)
    • mDNS: Do not fail initialization if the socket could not be created (#434)
    • Make RemotePublicKey public to enable signature verification (#435)
    • improve error handling in webRTC-related noise function (#377)

    Changed

    • Upgrade rcgen 0.10.0 -> 0.14.5 (#450)
    • chore: update str0m dependency, update code based on breaking changes (#422)
    Open source →
  16. 0.10.0 22 Jul 2025
    Release notes

    This release adds the ability to use system DNS resolver and change Kademlia DNS memory store capacity. It also fixes the Bitswap protocol implementation and correctly handles the dropped notification substreams by unregistering them from the protocol list.

    Added

    • kad: Expose memory store configuration (#407)
    • transport: Allow changing DNS resolver config (#384)

    Fixed

    • notification: Unregister dropped protocols (#391)
    • bitswap: Fix protocol implementation (#402)
    • transport-manager: stricter supported multiaddress check (#403)
    Open source →
  17. 0.9.5 26 May 2025
    Release notes

    This release primarily focuses on strengthening the stability of the websocket transport. We've resolved an issue where higher-level buffering was causing the Noise protocol to fail when decoding messages.

    We've also significantly improved connectivity between litep2p and Smoldot (the Substrate-based light client). Empty frames are now handled correctly, preventing handshake timeouts and ensuring smoother communication.

    Finally, we've carried out several dependency updates to keep the library current with the latest versions of its underlying components.

    Fixed

    • substream/fix: Allow empty payloads with 0-length frame (#395)
    • websocket: Fix connection stability on decrypt messages (#393)

    Changed

    • crypto/noise: Show peerIDs that fail to decode (#392)
    • cargo: Bump yamux to 0.13.5 and tokio to 1.45.0 (#396)
    • ci: Enforce and apply clippy rules (#388)
    • build(deps): bump ring from 0.16.20 to 0.17.14 (#389)
    • Update hickory-resolver 0.24.2 -> 0.25.2 (#386)
    Open source →
  18. 0.9.4 01 May 2025
    Release notes

    This release brings several improvements and fixes to litep2p, advancing its stability and readiness for production use.

    Performance Improvements

    This release addresses an issue where notification protocols failed to exit on handle drop, lowering CPU usage in scenarios like minimal-relay-chains from 7% to 0.1%.

    Robustness Improvements

    • Kademlia:

      • Optimized address store by sorting addresses based on dialing score, bounding memory consumption and improving efficiency.
      • Limited FIND_NODE responses to the replication factor, reducing data stored in the routing table.
      • Address store improvements enhance robustness against routing table alterations.
    • Identify Codec:

      • Enhanced message decoding to manage malformed or unexpected messages gracefully.
    • Bitswap:

      • Introduced a write timeout for sending frames, preventing protocol hangs or delays.

    Testing and Reliability

    • Fuzzing Harness: Added a fuzzing harness by SRLabs to uncover and resolve potential issues, improving code robustness. Thanks to @R9295 for the contribution!

    • Testing Enhancements: Improved notification state machine testing. Thanks to Dominique (@Imod7) for the contribution!

    Dependency Management

    • Updated all dependencies for stable feature flags (default and "websocket") to their latest versions.

    • Reorganized dependencies under specific feature flags, shrinking the default feature set and avoiding exposure of outdated dependencies from experimental features.

    Fixed

    • notifications: Exit protocols on handle drop to save up CPU of minimal-relay-chains (#376)
    • identify: Improve identify message decoding (#379)
    • crypto/noise: Set timeout limits for the noise handshake (#373)
    • kad: Improve robustness of addresses from the routing table (#369)
    • kad: Bound kademlia messages to the replication factor (#371)
    • codec: Decode smaller payloads for identity to None (#362)

    Added

    • bitswap: Add write timeout for sending frames (#361)
    • notif/tests: check test state (#360)
    • SRLabs: Introduce simple fuzzing harness (#367)
    • SRLabs: Introduce Fuzzing Harness (#365)

    Changed

    • features: Move quic related dependencies under feature flag (#359)
    • tests/substrate: Remove outdated substrate specific conformace testing (#370)
    • ci: Update stable dependencies (#375)
    • build(deps): bump hex-literal from 0.4.1 to 1.0.0 (#381)
    • build(deps): bump tokio from 1.44.1 to 1.44.2 in /fuzz/structure-aware (#378)
    • build(deps): bump Swatinem/rust-cache from 2.7.7 to 2.7.8 (#363)
    • build(deps): bump tokio from 1.43.0 to 1.43.1 (#368)
    • build(deps): bump openssl from 0.10.70 to 0.10.72 (#366)
    Open source →
  19. 0.9.3 11 Mar 2025
    Release notes

    This release introduces an API for setting the maximum kademlia message size.

    Changed

    • kad: Set upper limits for kademlia messages (#357)
    Open source →
  20. 0.9.2 10 Mar 2025
    Release notes

    This release downgrades a spamming log message to debug level and adds tests for the WebSocket stream implementation.

    Thanks to @dharjeezy for contributing to this release by avoiding to clone the Kademlia peers when yielding the closest nodes!

    Changed

    • manager: Downgrade refusing to add address log to debug (#355)
    • Clone only needed KademliaPeers when yielding closest nodes (#326)

    Added

    • websocket/stream/tests: Add tests for the stream implementation (#329)
    Open source →
  21. 0.9.1 20 Feb 2025
    Release notes

    This release enhances compatibility between litep2p and libp2p by using the latest Yamux upstream version. Additionally, it includes various improvements and fixes to boost the stability and performance of the WebSocket stream and the multistream-select protocol.

    Changed

    • yamux: Switch to upstream implementation while keeping the controller API (#320)
    • req-resp: Replace SubstreamSet with FuturesStream (#321)
    • cargo: Bring up to date multiple dependencies (#324)
    • build(deps): bump hickory-proto from 0.24.1 to 0.24.3 (#323)
    • build(deps): bump openssl from 0.10.66 to 0.10.70 (#322)

    Fixed

    • websocket/stream: Fix unexpected EOF on Poll::Pending state poisoning (#327)
    • websocket/stream: Avoid memory allocations on flushing (#325)
    • multistream-select: Enforce io::error instead of empty protocols (#318)
    • multistream: Do not wait for negotiation in poll_close (#319)
    Open source →
  22. 0.9.0 15 Jan 2025
    Release notes

    This release provides partial results to speed up GetRecord queries in the Kademlia protocol.

    Changed

    • kad: Provide partial results to speedup GetRecord queries (#315)
    Open source →
  23. 0.8.4 12 Dec 2024
    Release notes

    This release aims to make the MDNS component more robust by fixing a bug that caused the MDNS service to fail to register opened substreams. Additionally, the release includes several improvements to the identify protocol, replacing FuturesUnordered with FuturesStream for better performance.

    Fixed

    • mdns/fix: Failed to register opened substream (#301)

    Changed

    • identify: Replace FuturesUnordered with FuturesStream (#302)
    • chore: Update hickory-resolver to version 0.24.2 (#304)
    • ci: Ensure cargo-machete is working with rust version from CI (#303)
    Open source →
  24. 0.8.3 03 Dec 2024
    Release notes

    This release includes two fixes for small memory leaks happening on edge-cases in the notification and request-response protocols.

    Fixed

    • req-resp: Fix memory leak of pending substreams (#297)
    • notification: Fix memory leak of pending substreams (#296)
    Open source →
  25. 0.8.2 27 Nov 2024
    Release notes

    This release ensures that the provided peer identity is verified at the crypto/noise protocol level, enhancing security and preventing potential misuses. The release also includes a fix that caused TransportService component to panic on debug builds.

    Fixed

    • req-resp: Fix panic on connection closed for substream open failure (#291)
    • crypto/noise: Verify crypto/noise signature payload (#278)

    Changed

    • transport_service/logs: Provide less details for trace logs (#292)
    Open source →
  26. 0.8.1 14 Nov 2024
    Release notes

    This release includes key fixes that enhance the stability and performance of the litep2p library, focusing on long-running stability and improvements to polling mechanisms.

    Long Running Stability Improvements

    This issue caused long-running nodes to reject all incoming connections, impacting overall stability.

    Addressed a bug in the connection limits functionality that incorrectly tracked connections due for rejection. This issue caused an artificial increase in inbound peers, which were not being properly removed from the connection limit count. This fix ensures more accurate tracking and management of peer connections #286.

    Polling implementation fixes

    This release provides multiple fixes to the polling mechanism, improving how connections and events are processed:

    • Resolved an overflow issue in TransportContext's polling index for streams, preventing potential crashes.
    • Fixed a delay in the manager's poll_next function that prevented immediate polling of newly added futures.
    • Corrected an issue where the listener did not return Poll::Ready(None) when it was closed, ensuring proper signal handling.

    Fixed

    • manager: Fix connection limits tracking of rejected connections (#286)
    • transport: Fix waking up on filtered events from poll_next (#287)
    • transports: Fix missing Poll::Ready(None) event from listenener (#285)
    • manager: Avoid overflow on stream implementation for TransportContext (#283)
    • manager: Log when polling returns Ready(None) (#284)
    Open source →
  27. 0.8.0 04 Nov 2024
    Release notes

    This release adds support for content provider advertisement and discovery to Kademlia protocol implementation (see libp2p spec). Additionally, the release includes several improvements and memory leak fixes to enhance the stability and performance of the litep2p library.

    Content Provider Advertisement and Discovery

    Litep2p now supports content provider advertisement and discovery through the Kademlia protocol. Content providers can publish their records to the network, and other nodes can discover and retrieve these records using the GET_PROVIDERS query.

        // Start providing a record to the network.
        // This stores the record in the local provider store and starts advertising it to the network.
        kad_handle.start_providing(key.clone());
    
        // Wait for some condition to stop providing...
    
        // Stop providing a record to the network.
        // The record is removed from the local provider store and stops advertising it to the network.
        // Please note that the record will be removed from the network after the TTL expires.
        kad_provider.stop_providing(key.clone());
    
        // Retrieve providers for a record from the network.
        // This returns a query ID that is later producing the result when polling the `Kademlia` instance.
        let query_id = kad_provider.get_providers(key.clone());
    

    Added

    • kad: Providers part 8: unit, e2e, and libp2p conformance tests (#258)
    • kad: Providers part 7: better types and public API, public addresses & known providers (#246)
    • kad: Providers part 6: stop providing (#245)
    • kad: Providers part 5: GET_PROVIDERS query (#236)
    • kad: Providers part 4: refresh local providers (#235)
    • kad: Providers part 3: publish provider records (start providing) (#234)

    Changed

    • transport_service: Improve connection stability by downgrading connections on substream inactivity (#260)
    • transport: Abort canceled dial attempts for TCP, WebSocket and Quic (#255)
    • kad/executor: Add timeout for writting frames (#277)
    • kad: Avoid cloning the KademliaMessage and use reference for RoutingTable::closest (#233)
    • peer_state: Robust state machine transitions (#251)
    • address_store: Improve address tracking and add eviction algorithm (#250)
    • kad: Remove unused serde cfg (#262)
    • req-resp: Refactor to move functionality to dedicated methods (#244)
    • transport_service: Improve logs and move code from tokio::select macro (#254)

    Fixed

    • tcp/websocket/quic: Fix cancel memory leak (#272)
    • transport: Fix pending dials memory leak (#271)
    • ping: Fix memory leak of unremoved pending_opens (#274)
    • identify: Fix memory leak of unused pending_opens (#273)
    • kad: Fix not retrieving local records (#221)
    Open source →
  28. 0.7.0 05 Sep 2024
    Release notes

    This release introduces several new features, improvements, and fixes to the litep2p library. Key updates include enhanced error handling, configurable connection limits, and a new API for managing public addresses.

    Exposing Public Addresses API

    A new PublicAddresses API has been added, enabling users to manage the node's public addresses. This API allows developers to add, remove, and retrieve public addresses, which are shared with peers through the Identify protocol.

        // Public addresses are accessible from the main litep2p instance.
        let public_addresses = litep2p.public_addresses();
    
        // Add a new public address to the node.
        if let Err(err) = public_addresses.add_address(multiaddr) {
            eprintln!("Failed to add public address: {:?}", err);
        }
    
        // Remove a public address from the node.
        public_addresses.remove_address(&multiaddr);
    
        // Retrieve all public addresses of the node.
        for address in public_addresses.get_addresses() {
            println!("Public address: {}", address);
        }
    

    Breaking Change: The Identify protocol no longer includes public addresses in its configuration. Instead, use the new PublicAddresses API.

    Migration Guide:

        // Before:
        let (identify_config, identify_event_stream) = IdentifyConfig::new(
            "/substrate/1.0".to_string(),
            Some(user_agent),
            config.public_addresses,
        );
    
        // After:
        let (identify_config, identify_event_stream) =
            IdentifyConfig::new("/substrate/1.0".to_string(), Some(user_agent));
        // Public addresses must now be added using the `PublicAddresses` API:
        for address in config.public_addresses {
            if let Err(err) = public_addresses.add_address(address) {
                eprintln!("Failed to add public address: {:?}", err);
            }
        }
    

    Dial Error and List Dial Failures Event

    The DialFailure event has been enhanced with a new DialError enum for more precise error reporting when a dial attempt fails. Additionally, a ListDialFailures event has been introduced, listing all dialed addresses and their corresponding errors when multiple addresses are involved.

    Other litep2p errors, such as ParseError, AddressError, and NegotiationError, have been refactored for improved error propagation.

    Immediate Dial Error and Request-Response Rejection Reasons

    This new feature paves the way for better error handling in the litep2p library and moves away from the overarching litep2p::error::Error enum.

    The newly added ImmediateDialError enum captures errors occurring before a dial request is sent (e.g., missing peer IDs). It also enhances the RejectReason enum for request-response protocols, offering more detailed rejection reasons.

    match error {
        RequestResponseError::Rejected(reason) => {
            match reason {
                RejectReason::ConnectionClosed => "connection-closed",
                RejectReason::DialFailed(Some(ImmediateDialError::AlreadyConnected)) => "already-connected",
                _ => "other",
            }
        }
        _ => "other",
    }
    

    Connection Limits

    Developers can now set limits on the number of inbound and outbound connections to manage resources and optimize performance.

        // Configure connection limits for inbound and outbound established connections.
        let litep2p_config = Config::default()
            .with_connection_limits(ConnectionLimitsConfig::default()
                .max_incoming_connections(Some(3))
                .max_outgoing_connections(Some(2))
            );
    

    Feature Flags for Optional Transports

    The library now supports feature flags to selectively enable or disable transport protocols. By default, only the TCP transport is enabled. Optional transports include:

    • quic - Enables QUIC transport.
    • websocket - Enables WebSocket transport.
    • webrtc - Enables WebRTC transport.

    Configurable Keep-Alive Timeout

    The keep-alive timeout for connections is now configurable, providing more control over connection lifecycles.

        // Set keep alive timeout for connections.
        let litep2p_config = Config::default()
            .with_keep_alive_timeout(Duration::from_secs(30));
    

    Thanks for contributing to this @Ma233!

    Added

    • errors: Introduce immediate dial error and request-response rejection reasons (#227)
    • Expose API for PublicAddresses (#212)
    • transport: Implement TransportService::local_peer_id() (#224)
    • find_node: Optimize parallelism factor for slow to respond peers (#220)
    • kad: Handle ADD_PROVIDER & GET_PROVIDERS network requests (#213)
    • errors: Add DialError error and ListDialFailures event for better error reporting (#206)
    • kad: Add support for provider records to MemoryStore (#200)
    • transport: Add accept_pending/reject_pending for inbound connections and introduce inbound limits (#194)
    • transport/manager: Add connection limits for inbound and outbound established connections (#185)
    • kad: Add query id to log messages (#174)

    Changed

    • transport: Replace trust_dns_resolver with hickory_resolver (#223)
    • crypto/noise: Generate keypair only for Curve25519 (#214)
    • transport: Allow manual setting of keep-alive timeout (#155)
    • kad: Update connection status of an existing bucket entry (#181)
    • Make transports optional (#192)

    Fixed

    • kad: Fix substream opening and dialing race (#222)
    • query-executor: Save the task waker on empty futures (#219)
    • substream: Use write_all instead of manually writing bytes (#217)
    • minor: fix tests without websocket feature (#215)
    • Fix TCP, WebSocket, QUIC leaking connection IDs in reject() (#198)
    • transport: Fix double lock and state overwrite on disconnected peers (#179)
    • kad: Do not update memory store on incoming GetRecordSuccess (#190)
    • transport: Reject secondary connections with different connection IDs (#176)
    Open source →
  29. 0.6.2 26 Jun 2024
    Release notes

    This is a bug fixing release. Kademlia now correctly sets and forwards publisher & ttl in the DHT records.

    Fixed

    • kademlia: Preserve publisher & expiration time in DHT records (#162)
    Open source →
  30. 0.6.1 20 Jun 2024
    Release notes

    This is a bug fixing and security release. curve255190-dalek has been upgraded to v4.1.3, see dalek-cryptography/curve25519-dalek#659 for details.

    Fixed

    • kad: Set default ttl 36h for kad records (#154)
    • chore: update ed25519-dalek to v2.1.1 (#122)
    • Bump curve255190-dalek 4.1.2 -> 4.1.3 (#159)
    Open source →
  31. 0.6.0 14 Jun 2024
    Release notes

    This release introduces breaking changes into kad module. The API has been extended as following:

    • An event KademliaEvent::IncomingRecord has been added.
    • New methods KademliaHandle::store_record() / KademliaHandle::try_store_record() have been introduced.

    This allows implementing manual incoming DHT record validation by configuring Kademlia with IncomingRecordValidationMode::Manual.

    Also, it is now possible to enable TCP_NODELAY on sockets.

    Multiple refactorings to remove the code duplications and improve the implementation robustness have been done.

    Added

    • Support manual DHT record insertion (#135)
    • transport: Make TCP_NODELAY configurable (#146)

    Changed

    • transport: Introduce common listener for tcp and websocket (#147)
    • transport/common: Share DNS lookups between TCP and WebSocket (#151)

    Fixed

    • ping: Make ping fault tolerant wrt outbound substreams races (#133)
    • crypto/noise: Make noise fault tolerant (#142)
    • protocol/notif: Fix panic on missing peer state (#143)
    • transport: Fix erroneous handling of secondary connections (#149)
    Open source →
  32. 0.5.0 24 May 2024
    Release notes

    This is a small release that makes the FindNode command a bit more robust:

    • The FindNode command now retains the K (replication factor) best results.
    • The FindNode command has been updated to handle errors and unexpected states without panicking.

    Added

    • Add release checklist (#115)

    Changed

    • kad: Refactor FindNode query, keep K best results and add tests (#114)
    Open source →
  33. 0.4.0 23 May 2024
    Release notes

    This release introduces breaking changes to the litep2p crate, primarily affecting the kad module. Key updates include:

    • The GetRecord command now exposes all peer records, not just the latest one.
    • A new RecordType has been introduced to clearly distinguish between locally stored records and those discovered from the network.

    Significant refactoring has been done to enhance the efficiency and accuracy of the kad module. The updates are as follows:

    • The GetRecord command now exposes all peer records.
    • The GetRecord command has been updated to handle errors and unexpected states without panicking.

    Additionally, we've improved code coverage in the kad module by adding more tests.

    Added

    • Re-export multihash & multiaddr types (#79)
    • kad: Expose all peer records of GET_VALUE query (#96)

    Changed

    • multistream_select: Remove unneeded changelog.md (#116)
    • kad: Refactor GetRecord query and add tests (#97)
    • kad/store: Set memory-store on an incoming record for PutRecordTo (#88)
    • multistream: Dialer deny multiple /multistream/1.0.0 headers (#61)
    • kad: Limit MemoryStore entries (#78)
    • Refactor WebRTC code (#51)
    • Revert "Bring rustfmt.toml in sync with polkadot-sdk (#71)" (#74)
    • cargo: Update str0m from 0.4.1 to 0.5.1 (#95)

    Fixed

    • Fix clippy (#83)
    • crypto: Don't panic on unsupported key types (#84)
    Open source →
  34. 0.4.0-rc.1 23 May 2024 pre-release

    Nothing published for this version

  35. 0.3.0 05 Apr 2024
    Release notes

    Added

    • Expose reuse_port option for TCP and WebSocket transports (#69)
    • protocol/mdns: Use SO_REUSEPORT for the mDNS socket (#68)
    • Add support for protocol/agent version (#64)
    Open source →
  36. 0.2.0 05 Sep 2023
    Release notes

    This is the second release of litep2p, v0.2.0. The quality of the first release was so bad that this release is a complete rewrite of the library.

    Support is added for the following features:

    This time the architecture has been designed to be extensible and integrating new transport and/or user-level protocols should be easier. Additionally, the test coverage is higher both in terms of unit and integration tests. The project also contains conformance tests which test the behavior of litep2p against, rust-libp2p, go-libp2p and Substrate's sc-network. Currently the Substrate conformance tests are not enabled by default as they require unpublished/unaccepted changes to Substrate.

    Open source →
  37. 0.1.0 04 Apr 2023
    Release notes

    This is the first release of litep2p, v0.1.0.

    Support is added for the following:

    The code quality is atrocious but it works and the second release focuses on providing high test coverage for the library. After that is done and most of the functionality is covered (unit, integration and conformance tests, benchmarks), the focus can be turned to refactoring the code into something clean and efficient.

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive