consensus/istanbul: bound backlog and ROUND CHANGE retention - #1053
Open
da1suk8 wants to merge 2 commits into
Open
consensus/istanbul: bound backlog and ROUND CHANGE retention#1053da1suk8 wants to merge 2 commits into
da1suk8 wants to merge 2 commits into
Conversation
Limit retained future messages per sender and globally by count and payload size. Reject distant future sequences and release backlog accounting when messages leave.
Retain only a bounded future-round window and a quorum of distinct senders per round. Reject rounds that cannot be represented by the bucket key.
da1suk8
marked this pull request as ready for review
August 27, 2026 05:08
da1suk8
requested review from
hyunsooda,
ian0371 and
yoomee1313
as code owners
August 27, 2026 05:08
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.
Proposed changes
Adds retention limits to the Istanbul future-message backlog and to
roundChangeSet, so that memory used for retained messages stays boundedregardless of traffic.
(1024 messages / 128 MiB).
the accounting and queue storage once a sender's messages are processed or
discarded.
requiredMessageCountdistinct senders per round bucket.Trace, since they are expected under load.Byte accounting is used alongside message counts because a PREPREPARE carries an
entire block, so a count-only limit does not bound memory.
The quorum and wire protocol are unchanged.
Types of changes
Checklist
I have read the CLA Document and I hereby sign the CLAin first time contribute after having read CLA$ make test)Related issues
Complements #1029, which bounds Istanbul message ingress concurrency rather than
retained message memory.
Further comments
Distant ROUND CHANGE entries are rejected rather than evicting retained round
buckets, so that the near-round buckets needed for catch-up are kept. This
intentionally trades catch-up beyond the round window for bounded memory.
Nodes that are behind the backlog sequence window recover through block
synchronization.