Skip to content

test(e2e): dedupe multi-node block-production and governance test setups#24498

Merged
PhilWindle merged 2 commits into
merge-train/spartan-v5from
spl/e2e-r2-multi-node-misc
Jul 5, 2026
Merged

test(e2e): dedupe multi-node block-production and governance test setups#24498
PhilWindle merged 2 commits into
merge-train/spartan-v5from
spl/e2e-r2-multi-node-misc

Conversation

@spalladino

@spalladino spalladino commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Round-2 e2e consolidation, PR 7 of 9. Pure dedup/refactor of multi-node test setups — no timing or config values change; every asserted behavior is preserved.

What changed

  • block-production/blob_promotion + recovery/pipeline_prune → shared setupBlockProductionWithProver. Both files reimplemented the same 4-validator + prover + WIDE_SLOT_TIMING + mockGossipSubNetworkLatency: 500 cluster locally (setupBlobPromotion / setupTest). Those local helpers are deleted and both now call the shared helper, which gained four opt-in options: mockGossipSubNetworkLatency, maxTxsPerCheckpoint, clearInheritedCoinbase (per-attester coinbase), and disableCheckpointPromotionOnFirstNode. buildValidatorCluster now accepts a per-index nodeOpts function so node 0 can be configured distinctly. The resolved setup options and per-node config are identical to the originals (same keys/values; existing callers cross_chain_messages/deploy_and_call_ordering/proposed_chain are unaffected because both new booleans default to false). One benign side effect: pipeline_prune now also installs watchNodeSequencerEvents via the helper — instrumentation only, no assertions consume it. (recovery → block-production cross-directory import, as permitted by the plan.)

  • governance mechanics dedup. Extracted createGovernanceTestDriver + driveGovernanceRound into governance/setup.ts, wrapping the govInfo / round-boundary warp / quorum wait / submit-winner / vote-through-delays mechanics duplicated by add_rollup and upgrade_governance_proposer. Both files adopt it; their scenario-specific parts (payload construction, node signaling, node migration + bridging in add_rollup, pre/post-execute assertions) stay in place. Each caller passes its own quorum timeout (upgrade: quorumSize * aztecSlotDuration * 3; add_rollup: 600) so no timing value changes. The vote-success assertion now lives in the driver and covers both callers.

Dropped assertions

None. The upgrade_governance_proposer vote-success assertion is preserved (moved into the driver's voteToExecutable, where it now also covers add_rollup).

Local test runs (all pass)

  • upgrade_governance_proposer — 1 passed (116s)
  • block-production/blob_promotion — 1 passed (293s)
  • recovery/pipeline_prune — 1 passed (367s)
  • governance/add_rollup — 1 passed (327s locally); also green in CI.

Repoint block-production/blob_promotion and recovery/pipeline_prune onto the shared
setupBlockProductionWithProver helper (new mockGossipSubNetworkLatency / maxTxsPerCheckpoint /
clearInheritedCoinbase / disableCheckpointPromotionOnFirstNode options), extract a shared
governance round-driving driver (createGovernanceTestDriver + driveGovernanceRound) adopted by
add_rollup and upgrade_governance_proposer, and hoist the invalidate_block attack configs into a
typed file-local table. Pure dedup refactor: no timing/config values change.
@spalladino spalladino added wip Work in progress and removed wip Work in progress labels Jul 3, 2026
@PhilWindle PhilWindle merged commit 78594d7 into merge-train/spartan-v5 Jul 5, 2026
15 checks passed
@PhilWindle PhilWindle deleted the spl/e2e-r2-multi-node-misc branch July 5, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants