This repository was archived by the owner on Jan 16, 2026. It is now read-only.
fix(node/p2p): fixing gossip stability by limiting the number of dials to a given peer#2025
Merged
fix(node/p2p): fixing gossip stability by limiting the number of dials to a given peer#2025
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
Author
Yes! thanks for the reminder |
62b0812 to
5688cd9
Compare
2588122 to
69b40aa
Compare
5688cd9 to
1850944
Compare
1850944 to
bd74a83
Compare
bd74a83 to
2b2a7bd
Compare
2b2a7bd to
64c4969
Compare
theochap
added a commit
to ethereum-optimism/optimism
that referenced
this pull request
Dec 10, 2025
…s to a given peer (op-rs/kona#2025) ## Description This PR fixes the gossip stability issues we've experience on initial connections to the `op-node`s by preventing `kona-node`s from redialing already connected peers, or peers that have been already dialed. With that fix on, we're not experiencing the peer drops in kurtosis anymore On a side note: this PR also increases the log levels of some gossip events. ## Explanation My understanding of the situation: - The libp2p library imposes a substream limit for outgoing connections (constant, equal to 5). This is to prevent DOS vectors when creating new connections - It seems that every dial call will open a new outbound substream. - Since we're dialing peers quite often in the discovery layer, we're causing the libp2p library to reach the substream limit - When we reach the substream limit, the protocol gets disconnected and we're not advertising it to peers anymore. This causes the gossip connection to drop Relevant piece of code in libp2p : https://github.com/libp2p/rust-libp2p/blob/d3e88cfc2ec944c3e6beb7117a762452cb855e38/protocols/gossipsub/src/handler.rs#L499-L511. In our case, the outbound event is consistently the ConnectionEvent::FullyNegotiatedOutbound event, which happens on every new dial. ## Development - Close op-rs/kona#1854
theochap
added a commit
to ethereum-optimism/optimism
that referenced
this pull request
Jan 14, 2026
…s to a given peer (op-rs/kona#2025) ## Description This PR fixes the gossip stability issues we've experience on initial connections to the `op-node`s by preventing `kona-node`s from redialing already connected peers, or peers that have been already dialed. With that fix on, we're not experiencing the peer drops in kurtosis anymore On a side note: this PR also increases the log levels of some gossip events. ## Explanation My understanding of the situation: - The libp2p library imposes a substream limit for outgoing connections (constant, equal to 5). This is to prevent DOS vectors when creating new connections - It seems that every dial call will open a new outbound substream. - Since we're dialing peers quite often in the discovery layer, we're causing the libp2p library to reach the substream limit - When we reach the substream limit, the protocol gets disconnected and we're not advertising it to peers anymore. This causes the gossip connection to drop Relevant piece of code in libp2p : https://github.com/libp2p/rust-libp2p/blob/d3e88cfc2ec944c3e6beb7117a762452cb855e38/protocols/gossipsub/src/handler.rs#L499-L511. In our case, the outbound event is consistently the ConnectionEvent::FullyNegotiatedOutbound event, which happens on every new dial. ## Development - Close #1854
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes the gossip stability issues we've experience on initial connections to the
op-nodes by preventingkona-nodes from redialing already connected peers, or peers that have been already dialed.With that fix on, we're not experiencing the peer drops in kurtosis anymore
On a side note: this PR also increases the log levels of some gossip events.
Explanation
My understanding of the situation:
Relevant piece of code in libp2p : https://github.com/libp2p/rust-libp2p/blob/d3e88cfc2ec944c3e6beb7117a762452cb855e38/protocols/gossipsub/src/handler.rs#L499-L511. In our case, the outbound event is consistently the ConnectionEvent::FullyNegotiatedOutbound event, which happens on every new dial.
Development