Skip to content

Commit 6d61e2b

Browse files
authored
chore: Release litep2p v0.9.4 (#382)
## [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](#376)) - identify: Improve identify message decoding ([#379](#379)) - crypto/noise: Set timeout limits for the noise handshake ([#373](#373)) - kad: Improve robustness of addresses from the routing table ([#369](#369)) - kad: Bound kademlia messages to the replication factor ([#371](#371)) - codec: Decode smaller payloads for identity to None ([#362](#362)) ### Added - bitswap: Add write timeout for sending frames ([#361](#361)) - notif/tests: check test state ([#360](#360)) - SRLabs: Introduce simple fuzzing harness ([#367](#367)) - SRLabs: Introduce Fuzzing Harness ([#365](#365)) ### Changed - features: Move quic related dependencies under feature flag ([#359](#359)) - tests/substrate: Remove outdated substrate specific conformace testing ([#370](#370)) - ci: Update stable dependencies ([#375](#375)) - build(deps): bump hex-literal from 0.4.1 to 1.0.0 ([#381](#381)) - build(deps): bump tokio from 1.44.1 to 1.44.2 in /fuzz/structure-aware ([#378](#378)) - build(deps): bump Swatinem/rust-cache from 2.7.7 to 2.7.8 ([#363](#363)) - build(deps): bump tokio from 1.43.0 to 1.43.1 ([#368](#368)) - build(deps): bump openssl from 0.10.70 to 0.10.72 ([#366](#366)) --------- Signed-off-by: Alexandru Vasile <[email protected]>
1 parent 9337fb6 commit 6d61e2b

File tree

4 files changed

+62
-16
lines changed

4 files changed

+62
-16
lines changed

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,66 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.9.4] - 2025-05-01
9+
10+
This release brings several improvements and fixes to litep2p, advancing its stability and readiness for production use.
11+
12+
### Performance Improvements
13+
14+
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%.
15+
16+
### Robustness Improvements
17+
18+
- Kademlia:
19+
- Optimized address store by sorting addresses based on dialing score, bounding memory consumption and improving efficiency.
20+
- Limited `FIND_NODE` responses to the replication factor, reducing data stored in the routing table.
21+
- Address store improvements enhance robustness against routing table alterations.
22+
23+
- Identify Codec:
24+
- Enhanced message decoding to manage malformed or unexpected messages gracefully.
25+
26+
- Bitswap:
27+
- Introduced a write timeout for sending frames, preventing protocol hangs or delays.
28+
29+
### Testing and Reliability
30+
31+
- Fuzzing Harness: Added a fuzzing harness by SRLabs to uncover and resolve potential issues, improving code robustness. Thanks to @R9295 for the contribution!
32+
33+
- Testing Enhancements: Improved notification state machine testing. Thanks to Dominique (@Imod7) for the contribution!
34+
35+
### Dependency Management
36+
37+
- Updated all dependencies for stable feature flags (default and "websocket") to their latest versions.
38+
39+
- Reorganized dependencies under specific feature flags, shrinking the default feature set and avoiding exposure of outdated dependencies from experimental features.
40+
41+
### Fixed
42+
43+
- notifications: Exit protocols on handle drop to save up CPU of `minimal-relay-chains` ([#376](https://github.com/paritytech/litep2p/pull/376))
44+
- identify: Improve identify message decoding ([#379](https://github.com/paritytech/litep2p/pull/379))
45+
- crypto/noise: Set timeout limits for the noise handshake ([#373](https://github.com/paritytech/litep2p/pull/373))
46+
- kad: Improve robustness of addresses from the routing table ([#369](https://github.com/paritytech/litep2p/pull/369))
47+
- kad: Bound kademlia messages to the replication factor ([#371](https://github.com/paritytech/litep2p/pull/371))
48+
- codec: Decode smaller payloads for identity to None ([#362](https://github.com/paritytech/litep2p/pull/362))
49+
50+
### Added
51+
52+
- bitswap: Add write timeout for sending frames ([#361](https://github.com/paritytech/litep2p/pull/361))
53+
- notif/tests: check test state ([#360](https://github.com/paritytech/litep2p/pull/360))
54+
- SRLabs: Introduce simple fuzzing harness ([#367](https://github.com/paritytech/litep2p/pull/367))
55+
- SRLabs: Introduce Fuzzing Harness ([#365](https://github.com/paritytech/litep2p/pull/365))
56+
57+
### Changed
58+
59+
- features: Move quic related dependencies under feature flag ([#359](https://github.com/paritytech/litep2p/pull/359))
60+
- tests/substrate: Remove outdated substrate specific conformace testing ([#370](https://github.com/paritytech/litep2p/pull/370))
61+
- ci: Update stable dependencies ([#375](https://github.com/paritytech/litep2p/pull/375))
62+
- build(deps): bump hex-literal from 0.4.1 to 1.0.0 ([#381](https://github.com/paritytech/litep2p/pull/381))
63+
- build(deps): bump tokio from 1.44.1 to 1.44.2 in /fuzz/structure-aware ([#378](https://github.com/paritytech/litep2p/pull/378))
64+
- build(deps): bump Swatinem/rust-cache from 2.7.7 to 2.7.8 ([#363](https://github.com/paritytech/litep2p/pull/363))
65+
- build(deps): bump tokio from 1.43.0 to 1.43.1 ([#368](https://github.com/paritytech/litep2p/pull/368))
66+
- build(deps): bump openssl from 0.10.70 to 0.10.72 ([#366](https://github.com/paritytech/litep2p/pull/366))
67+
868
## [0.9.3] - 2025-03-11
969

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

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "litep2p"
33
description = "Peer-to-peer networking library"
44
license = "MIT"
5-
version = "0.9.3"
5+
version = "0.9.4"
66
edition = "2021"
77

88
# cargo-machete does not detect serde_millis usage, so we ignore the warning

src/protocol/libp2p/identify.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -345,20 +345,6 @@ impl Identify {
345345

346346
tracing::trace!(target: LOG_TARGET, ?peer, ?info, "peer identified");
347347

348-
// The check ensures the provided public key is the same one as the
349-
// one exchanged during the connection establishment.
350-
if let Some(public_key) = &info.public_key {
351-
let public_key = PublicKey::from_protobuf_encoding(&public_key).map_err(|err| {
352-
tracing::debug!(target: LOG_TARGET, ?peer, ?err, "peer identified provided undecodable public key");
353-
err
354-
})?;
355-
356-
if public_key.to_peer_id() != peer {
357-
tracing::debug!(target: LOG_TARGET, ?peer, "peer identified provided invalid public key");
358-
return Err(Error::InvalidData);
359-
}
360-
}
361-
362348
let listen_addresses = info
363349
.listen_addrs
364350
.iter()

0 commit comments

Comments
 (0)