Skip to content

Fix incorrect peer port autodetection and substream limit exceeded errors #3451

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 6 commits into from
Mar 25, 2025

Conversation

teor2345
Copy link
Member

This PR updates our substrate fork to include 3 network connection/stream bug fixes:

A peer address autodetection fix, which works around a libp2p bug that pollutes the peer set with ephemeral outbound ports:

Peer connection substream fixes, which correctly detect and react to I/O errors on connections by closing substreams:

Close #3450

Some updates were required to other dependencies to resolve lockfile version conflicts.

Code contributor checklist:

@teor2345 teor2345 added bug Something isn't working networking Subspace networking (DSN) labels Mar 24, 2025
@teor2345 teor2345 self-assigned this Mar 24, 2025
@teor2345 teor2345 requested a review from nazar-pc as a code owner March 24, 2025 02:23
@teor2345 teor2345 enabled auto-merge March 24, 2025 02:23
@teor2345 teor2345 disabled auto-merge March 24, 2025 02:23
@teor2345 teor2345 requested a review from vedhavyas March 24, 2025 02:23
Copy link
Contributor

@vedhavyas vedhavyas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like of the 3 PR from upstream, one of the them is already in [stable2412-2](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-stable2412-2)

Can we not ask upstream to backport the remaining two into the another stable2412 release ?

We can then pull the release instead

@nazar-pc
Copy link
Member

Can we not ask upstream to backport the remaining two into the another stable2412 release ?

They will not backport it because upstream stable2412 uses older libp2p version from 2023. I backported libp2p upgrade that I did from master to our fork, so we are not stuck with it for another half a year.

@teor2345 teor2345 force-pushed the conn-stream-fixes branch from 13c7c4d to ce58e8c Compare March 25, 2025 00:10
@teor2345 teor2345 enabled auto-merge March 25, 2025 03:44
@teor2345 teor2345 added this pull request to the merge queue Mar 25, 2025
Merged via the queue into main with commit 9017151 Mar 25, 2025
10 checks passed
@teor2345 teor2345 deleted the conn-stream-fixes branch March 25, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working networking Subspace networking (DSN)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libp2p_kad::handler: New inbound substream to peer exceeds inbound substream limit
3 participants