Repository navigation
test(consensus): stop the sustained-flood progress test failing on busy machines - #1626
Merged
Merged
Conversation
Keep the wall-clock budget and seed every attacker lane before consensus. Lead each lane with a maximum-cost precommit carrying a well-formed invalid signature, then sustain the existing prevote flood. Count real token-wait timers before honest votes instead of requiring wall-time utilization. Preserve the rate, work ceiling, and progress deadlines. <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> Co-Authored-By: Codex (gpt-6-astra) <[email protected]>
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
|
🕓 Review not started yet because this PR is a draft.
Commit eacb520. Normal review starts when eligible; priority review starts as soon as a slot is available. |
lklimek
marked this pull request as ready for review
November 19, 2026 20:24
lklimek
approved these changes
Nov 19, 2026
lklimek
enabled auto-merge (squash)
November 19, 2026 20:24
|
Policy satisfied — this can merge. |
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.
TL;DR
The test that checks a node still finishes a height while a vote flood is running failed randomly on busy machines. It was wrongly deciding that the flood "never loaded the node". It now checks directly that the flood made the node wait, so it no longer depends on how fast the CI machine happens to be.
Detailed discussion
Internal test-only change; no user-observable behavior changes.
Root cause.
TestLoadHeightProgressUnderSustainedFloodproved the flood loaded the node by requiring that the charged verification work exceed 50% of what the wall-clock budget allowed over the height. Under CPU contention the flood goroutines get preempted and cannot spend the budget fast enough, so the precondition failed. A typical failure:"138" is not greater than "138.03". Ondevit failed 12/20 under host load 15–19, and 15/20 with-raceandGOMAXPROCS=1. Diagnostics also showed the utilization check could pass with zero token waits, so it did not prove contention in either direction.Fix. The test keeps the real wall-clock budget, which this test exists for, and the original deadlines and rate. It now:
recordingBudgetClock), and requires at least one wait before the honest votes are sent. This replaces the >50% utilization check.The upper bound (charged work ≤ budget allowance) is kept.
Testing.
-race,GOMAXPROCS=1Negative controls (no flood; unlimited budget) fail the contention assertion 3/3 each.
Limitation. The test proves the budget was contended before the honest votes, not that it stayed saturated for the whole height.
🤖 Co-authored by Claudius the Magnificent AI Agent
🤖 Generated with Claude Code
PR Hygiene ·
eacb520internal/consensus/load_harness_test.go,internal/consensus/load_progress_test.go) — approved by lklimekWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.