Skip to content

Finish implementing byte-based flow control - #5362

Merged
graydon merged 2 commits into
stellar:masterfrom
graydon:flow-control-byte-limit
Jul 23, 2026
Merged

Finish implementing byte-based flow control#5362
graydon merged 2 commits into
stellar:masterfrom
graydon:flow-control-byte-limit

Conversation

@graydon

@graydon graydon commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

A followup to #4353 to flow-control total bytes not just flood bytes.

Copilot AI review requested due to automatic review settings July 23, 2026 00:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread docs/stellar-core_example.cfg Outdated
marta-lokhova
marta-lokhova previously approved these changes Jul 23, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@graydon
graydon enabled auto-merge July 23, 2026 04:05
@graydon
graydon added this pull request to the merge queue Jul 23, 2026
Merged via the queue into stellar:master with commit 0e3d3d9 Jul 23, 2026
54 checks passed
@graydon
graydon deleted the flow-control-byte-limit branch July 23, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants