POC: aggregate post-block sync acknowledgements - #983
Draft
randomblocker wants to merge 2 commits into
Draft
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
This is a deliberately non-production POC for reducing the quadratic post-block synchronization burst in the current PoRBFT path.
The stabilisation branch currently lets every block signer publish the block, then lets each non-signing recipient broadcast its sync status to every peer. This branch puts that behavior behind a disabled-by-default flag and tests a smaller path:
syncDatain the block response;It does not change transaction validation, block construction, voting, or finality.
Empirical result
The same isolated six-node topology was measured in legacy and aggregate modes over five complete blocks, excluding startup traffic. The topology used a four-member shard and two non-signing recipients at a 20-second cadence.
That is an 84.1% reduction, exactly matching the source-derived model. All six nodes remained at the same height across both samples.
A recovery check stopped node 6 while the chain advanced, restarted it, and observed it automatically converge with node 1 at height 10 through the retained recovery path.
The guarded lightweight transport harness then ran five bursts each at 100, 250 and 500 virtual peers with simulated 20–300 ms latency, 5% transient failures and bounded retries:
Every delivery was admitted after bounded retries. The 500-peer aggregate was 34.4 KB and total sender traffic was 18.1 MB per block. A real multi-host test is still required; the emulator proves transport-path scaling but does not reproduce hundreds of databases, consensus engines, OmniProtocol connections or WAN kernels.
Safety and review gates
BLOCK_SYNC_AGGREGATION_ENABLEDdefaults tofalse. The POC must not be enabled on a public network yet.Before production use, maintainers must decide and implement:
Receivers fail closed unless the aggregate is bounded, matches a locally verified block, comes from a signer of that block, and names only known identities committed to the block peerlist/signatures. Applying an aggregate changes sync hints only; it never authenticates a peer or marks one online.
Included tooling
Validation
git diff --checkpassed.Some existing consensus tests mix Jest APIs with
bun:testimports and cannot all execute under one runner; that pre-existing runner incompatibility is not changed by this POC.