-
Notifications
You must be signed in to change notification settings - Fork 13
Drop spammable messages beyond max allowed lookahead rounds #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #258 +/- ##
==========================================
+ Coverage 71.66% 71.91% +0.25%
==========================================
Files 31 32 +1
Lines 2333 2386 +53
==========================================
+ Hits 1672 1716 +44
- Misses 532 539 +7
- Partials 129 131 +2
|
396869b to
fbf4f9f
Compare
|
My comments are essentially nits so need not block you merging. I would appreciate you taking the time to explore whether a more robust predicate is possible, though. |
The gPBFT rebroadcast design revision introduced an improvement whereby "spammable" messages, i.e. `COMMIT` for bottom, for future rounds should be dropped by the participants. The specification leaves room for implementers to optionally retain some number of such messages to reduce reliance on the need for rebroadcast and ultimately help reach consensus in fewer rounds. The work here: 1. introduces `WithMaxLookaheadRounds` configuration option to `gpbft` package, defaulting to zero if unset. 2. drops all spammable messages belonging to rounds that are beyond the configured max lookahead rounds. A `Spam` adversary is introduced to replicate the conditions at which max lookahead rounds would start dropping messages. A set of tests then use the `Spam` adversary to assert that honest participants reach expected consensus despite the presence of spam messages. Note that there are no APIs to assert that the upper lookahead bound is respected by the implementation. A TODO is left to revisit this once telemetry is introduced whereby tests can observe future message queue size metrics to assert a configured lookahead is indeed respected. Resolves #240
fbf4f9f to
a5b82d3
Compare
|
Fuzz test failed on commit a5b82d3. To troubleshoot locally, download the seed corpus using GitHub CLI by running: gh run download 9189781334 -n testdataAleternatively, download directly from here. |
The gPBFT rebroadcast design revision introduced an improvement whereby "spammable" messages, i.e.
COMMITfor bottom, for future rounds should be dropped by the participants. The specification leaves room for implementers to optionally retain some number of such messages to reduce reliance on the need for rebroadcast and ultimately help reach consensus in fewer rounds.The work here:
WithMaxLookaheadRoundsconfiguration option togpbftpackage, defaulting to zero if unset.A
Spamadversary is introduced to replicate the conditions at which max lookahead rounds would start dropping messages. A set of tests then use theSpamadversary to assert that honest participants reach expected consensus despite the presence of spam messages.Note that there are no APIs to assert that the upper lookahead bound is respected by the implementation. A TODO is left to revisit this once telemetry is introduced whereby tests can observe future message queue size metrics to assert a configured lookahead is indeed respected.
Resolves #240