Releases: paritytech/litep2p
v0.9.4
[0.9.4] - 2025-04-29
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)
v0.9.3
v0.9.2
[0.9.2] - 2025-03-10
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)
v0.9.1
[0.9.1] - 2025-01-19
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
v0.9.0
v0.8.4
[0.8.4] - 2024-12-12
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
v0.8.3
v0.8.2
[0.8.2] - 2024-11-27
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)
v0.8.1
[0.8.1] - 2024-11-14
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 listener (#285)
- manager: Avoid overflow on stream implementation for
TransportContext
(#283) - manager: Log when polling returns Ready(None) (#284)
v0.8.0
[0.8.0] - 2024-11-04
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 forRoutingTable::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)