Skip to content

networking: Update litep2p network backend to v0.9.4 #8373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 1, 2025

Conversation

lexnv
Copy link
Contributor

@lexnv lexnv commented Apr 29, 2025

Litep2p Release

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)

lexnv added 3 commits April 29, 2025 13:49
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv added A4-backport-stable2412 Pull request must be backported to the stable2412 release branch A4-backport-stable2503 Pull request must be backported to the stable2503 release branch labels Apr 29, 2025
@lexnv lexnv self-assigned this Apr 29, 2025
@lexnv lexnv added this to Networking Apr 29, 2025
@lexnv lexnv added the T0-node This PR/Issue is related to the topic “node”. label Apr 29, 2025
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
lexnv and others added 3 commits May 1, 2025 10:58
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv enabled auto-merge May 1, 2025 08:13
@lexnv lexnv added this pull request to the merge queue May 1, 2025
Merged via the queue into master with commit 9869517 May 1, 2025
239 of 249 checks passed
@lexnv lexnv deleted the lexnv/chore-release-litep2p-0.9.4 branch May 1, 2025 10:32
@github-project-automation github-project-automation bot moved this to Blocked ⛔️ in Networking May 1, 2025
@paritytech-release-backport-bot

Created backport PR for stable2412:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-8373-to-stable2412
git worktree add --checkout .worktree/backport-8373-to-stable2412 backport-8373-to-stable2412
cd .worktree/backport-8373-to-stable2412
git reset --hard HEAD^
git cherry-pick -x 9869517b4dc851469e6d854a263f82ff32133524
git push --force-with-lease

@paritytech-release-backport-bot

Created backport PR for stable2503:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-8373-to-stable2503
git worktree add --checkout .worktree/backport-8373-to-stable2503 backport-8373-to-stable2503
cd .worktree/backport-8373-to-stable2503
git reset --hard HEAD^
git cherry-pick -x 9869517b4dc851469e6d854a263f82ff32133524
git push --force-with-lease

EgorPopelyaev pushed a commit that referenced this pull request May 1, 2025
Backport #8373 into `stable2503` from lexnv.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
Co-authored-by: Alexandru Vasile <alexandru.vasile@parity.io>
lexnv added a commit that referenced this pull request May 8, 2025
Backport #8373 into `stable2412` from lexnv.

See the
[documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md)
on how to use this bot.

<!--
  # To be used by other automation, do not modify:
  original-pr-number: #${pull_number}
-->

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
Co-authored-by: Alexandru Vasile <alexandru.vasile@parity.io>
castillax pushed a commit that referenced this pull request May 12, 2025
# Litep2p Release

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](paritytech/litep2p#376))
- identify: Improve identify message decoding
([#379](paritytech/litep2p#379))
- crypto/noise: Set timeout limits for the noise handshake
([#373](paritytech/litep2p#373))
- kad: Improve robustness of addresses from the routing table
([#369](paritytech/litep2p#369))
- kad: Bound kademlia messages to the replication factor
([#371](paritytech/litep2p#371))
- codec: Decode smaller payloads for identity to None
([#362](paritytech/litep2p#362))

### Added

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

### Changed

- features: Move quic related dependencies under feature flag
([#359](paritytech/litep2p#359))
- tests/substrate: Remove outdated substrate specific conformace testing
([#370](paritytech/litep2p#370))
- ci: Update stable dependencies
([#375](paritytech/litep2p#375))
- build(deps): bump hex-literal from 0.4.1 to 1.0.0
([#381](paritytech/litep2p#381))
- build(deps): bump tokio from 1.44.1 to 1.44.2 in /fuzz/structure-aware
([#378](paritytech/litep2p#378))
- build(deps): bump Swatinem/rust-cache from 2.7.7 to 2.7.8
([#363](paritytech/litep2p#363))
- build(deps): bump tokio from 1.43.0 to 1.43.1
([#368](paritytech/litep2p#368))
- build(deps): bump openssl from 0.10.70 to 0.10.72
([#366](paritytech/litep2p#366))

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Dmitry Markin <dmitry@markin.tech>
wilwade added a commit to frequency-chain/frequency that referenced this pull request May 23, 2025
# Goal
The goal of this PR is to upgrade to the most recent commit of the
Polkadot SDK `stable2503 branch`

This is a PR into a branch that was forked at the same point as v1.16.1

A separate PR will do the update for `main`

See all Polkadot SDK changes:
paritytech/polkadot-sdk@5f2e7ab...e69da2e

Interesting Backported Code:
- paritytech/polkadot-sdk#8162
- paritytech/polkadot-sdk#8198
- paritytech/polkadot-sdk#7913
- paritytech/polkadot-sdk#8373
- paritytech/polkadot-sdk#8400
- paritytech/polkadot-sdk#8447
- paritytech/polkadot-sdk#8503
- paritytech/polkadot-sdk#8514
-
paritytech/polkadot-sdk@e69da2e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A4-backport-stable2412 Pull request must be backported to the stable2412 release branch A4-backport-stable2503 Pull request must be backported to the stable2503 release branch T0-node This PR/Issue is related to the topic “node”.
Projects
Status: Blocked ⛔️
Development

Successfully merging this pull request may close these issues.

3 participants