Skip to content

fix(test): fix reload_keystore flaky test by including all validators in initial keystore#21827

Closed
AztecBot wants to merge 1 commit intonextfrom
claudebox/fix-spartan-merge-train
Closed

fix(test): fix reload_keystore flaky test by including all validators in initial keystore#21827
AztecBot wants to merge 1 commit intonextfrom
claudebox/fix-spartan-merge-train

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

Summary

Fixes the e2e_sequencer/reload_keystore.test.ts failure in merge-train/spartan CI.

Root cause: The test staked 4 validators but only loaded 3 into the keystore. When the 4th validator was selected as proposer (via hash-based RANDAO selection), the sequencer silently skipped block building — producing zero visible logs at VERBOSE level. The pipeline refactor (#21026) changed the timestamp used for committee resolution from epoch-start to slot-start, which altered the deterministic proposer ordering established by #21749's fix.

Fix: Include all 4 staked validators in the initial keystore so the sequencer can always propose regardless of proposer selection. The "add new validator" test is preserved by adding a non-staked phantom validator during keystore reload, which verifies:

  • The phantom validator appears in the keystore after reload
  • The publisher factory can create a publisher for the phantom validator
  • Coinbase/feeRecipient updates take effect for all validators
  • Block production uses the reloaded coinbases

Test plan

  • e2e_sequencer/reload_keystore.test.ts passes locally (32s, down from 322s timeout)

ClaudeBox log: https://claudebox.work/s/14c53acc733d6973?run=1

… in initial keystore

The test was failing because the sequencer couldn't propose when the
4th validator (not in keystore) was selected as proposer. With the
pipeline refactor (PR #21026) changing committee timestamp resolution,
the deterministic BN254 keys no longer guaranteed a favorable proposer
ordering.

Fix: include all 4 staked validators in the initial keystore so the
sequencer can always propose. Test 'add new validator' functionality
by adding a non-staked phantom validator during keystore reload.
@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Mar 19, 2026
Base automatically changed from merge-train/spartan to next March 20, 2026 22:34
@AztecBot
Copy link
Copy Markdown
Collaborator Author

Automatically closing this stale claudebox draft PR (no updates for 5+ days). Re-open if still needed.

@AztecBot AztecBot closed this Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant