network: handle stream creation on existing conns#6572
Merged
algorandskiy merged 8 commits intoalgorand:masterfrom Mar 5, 2026
Merged
network: handle stream creation on existing conns#6572algorandskiy merged 8 commits intoalgorand:masterfrom
algorandskiy merged 8 commits intoalgorand:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6572 +/- ##
===========================================
- Coverage 63.53% 47.80% -15.74%
===========================================
Files 486 646 +160
Lines 67821 88108 +20287
===========================================
- Hits 43089 42116 -973
- Misses 21143 43224 +22081
+ Partials 3589 2768 -821
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
algorandskiy
commented
Feb 27, 2026
gmalouf
reviewed
Feb 27, 2026
Contributor
gmalouf
left a comment
There was a problem hiding this comment.
We should talk through the gossip fanout multiplier
gmalouf
previously approved these changes
Feb 27, 2026
algorandskiy
commented
Mar 2, 2026
412114a to
17bd044
Compare
cce
reviewed
Mar 4, 2026
cce
reviewed
Mar 5, 2026
Co-authored-by: cce <51567+cce@users.noreply.github.com>
cce
approved these changes
Mar 5, 2026
gmalouf
approved these changes
Mar 5, 2026
This was referenced Mar 10, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
TestP2PNetworkDHTCapabilitiesfailure (andTestCapabilities_Varyingfailure) showed the following race:Connecteddoes not create a streamFixed by calling
handleConnecteddirectly and splitting peerID and direction checks - for direct call these might prevent from stream establishing.Changed
ReadtoReadFullin p2p metadata exchange code in order to workaround possible p2p transport level fragmentation for remote nodes.Updated
streamManager.streamsmaps clean up - now it should not have any stale (reset or abandoned streams)While testing with DHT enabled, found it can consume all conns fast and lot letting regular conns to get through. It gets fixes eventually when the dialer will be trying active conns but takes longer. Bumped limits to
GossipFanuot *3when DHT is on.Test Plan
Added new unit tests
Run both tests repeatedly to make sure no failures anymore