fix(e2e): resolve flaky proposer-not-found in equivocation_offenses duplicate_proposal test#24557
Merged
spalladino merged 1 commit intoJul 6, 2026
Conversation
…fenses test advanceToEpochBeforeProposer checked 20 epochs for the target proposer. With a 2-slot epoch and warmupSlots=1 each attempt inspects a single slot, and with a 4-member committee the target is that slot's proposer with probability 1/4 (proposer index is keccak(epoch, slot, seed) mod committee size, independent per attempt). The miss probability over 20 attempts is (3/4)^20 ~= 0.32%, which showed up as a real CI flake. 50 attempts bound it at ~6e-7; each attempt is only a committee query plus an anvil warp.
Collaborator
Author
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
spalladino
approved these changes
Jul 6, 2026
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.
Problem
multi-node/slashing/duplicate_proposal › slashes validator who sends duplicate proposals(yarn-project/end-to-end/src/multi-node/slashing/equivocation_offenses.test.ts) flaked in CI on the unrelated PR #24556 with:Evidence: http://ci.aztec-labs.com/eb0b4e658e28440c (the sibling
duplicate_attestationcase in the same file passed in the same run).Root cause
Pure statistics — no logic bug.
advanceToEpochBeforeProposer(yarn-project/end-to-end/src/multi-node/slashing/setup.tson this branch) scans upcoming epochs for one where the target validator is the proposer, giving up aftermaxAttempts = 20epochs. The test calls it with the default.This suite uses a 2-slot epoch with
warmupSlots = 1, so each epoch attempt inspects exactly one candidate slot. The proposer for a slot iskeccak256(abi.encode(epoch, slot, seed)) % committeeSize, and with the suite's 4-member committee (COMMITTEE_SIZE = NUM_VALIDATORS = 4insetup.ts) each attempt is an independent 1/4 draw. Miss probability over 20 attempts:(3/4)^20 ≈ 0.32%, i.e. roughly 1 in 315 runs — matching the observed occasional flake.Fix
Raise the default
maxAttemptsfrom 20 to 50, bounding the miss probability at(3/4)^50 ≈ 5.7e-7(~1 in 1.8M). Each attempt is only a committee query plus an anvil timestamp warp, so the expected attempt count stays ~4 and the extra headroom costs essentially nothing. The raised default also covers this helper's other callers with the same exposure (broadcasted_invalid_block_proposal_slash,broadcasted_invalid_checkpoint_proposal_slash), none of which overridemaxAttempts.Relationship to PR #24548
This is the same failure mode fixed by #24548 for the
duplicate_attestationflake, but #24548 does not cover this call site: its patch touchesyarn-project/end-to-end/src/e2e_p2p/shared.ts, a file that does not exist onmerge-train/spartan-v5(on this branch the helper lives inmulti-node/slashing/setup.ts, and there is noe2e_p2p/directory). #24548's head branch was cut from anext-layout tree while targetingmerge-train/spartan-v5, which is why GitHub reports it as dirty with ~4k changed files — it needs a rebase onto the branch it targets, at which point its fix would land in this same file. This PR applies the fix directly to themerge-train/spartan-v5copy of the helper.No tracked issue exists for this flake.
Created by claudebox · group:
slackbot