Finish implementing byte-based flow control - #5362
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Extends byte-based flow control to throttle all inbound traffic, not only flood messages.
Changes:
- Adds configurable total byte-reading capacity with safe read headroom.
- Updates flow-control accounting, APIs, diagnostics, and tests.
- Adds repeated TCP throttling/recovery coverage for non-flood traffic.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/overlay/test/OverlayTests.cpp |
Tests total-byte throttling and updated flood capacity. |
src/overlay/test/LoopbackPeer.cpp |
Uses renamed flood-byte capacity API. |
src/overlay/Peer.cpp |
Resumes reads when capacity becomes available. |
src/overlay/OverlayManagerImpl.h |
Renames capacity interface implementation. |
src/overlay/OverlayManagerImpl.cpp |
Renames flood-byte capacity calculation. |
src/overlay/OverlayManager.h |
Renames public capacity interface. |
src/overlay/FlowControlCapacity.h |
Makes total capacity mandatory and defines read floor. |
src/overlay/FlowControlCapacity.cpp |
Implements total byte accounting and throttling. |
src/overlay/FlowControl.cpp |
Initializes and reports total byte capacity. |
src/main/Config.h |
Declares total byte-reading configuration. |
src/main/Config.cpp |
Adds default and configuration parsing. |
docs/stellar-core_example.cfg |
Documents the new setting, but uses an incorrect default. |
marta-lokhova
previously approved these changes
Jul 23, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
marta-lokhova
approved these changes
Jul 23, 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.
A followup to #4353 to flow-control total bytes not just flood bytes.