refactor(e2e): skip initial sequencer in p2p and epochs tests#22535
Merged
spalladino merged 6 commits intoApr 21, 2026
Conversation
Tests that create their own validator nodes no longer need the initial sequencer from setup(). For P2P tests, the initial node is now a lightweight archiver with no sequencer/validator/P2P. For epochs tests, account deployment is deferred until validator nodes are running. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace dontStartSequencer with skipInitialSequencer as a clean setup-only option. Use SchnorrHardcodedKeyAccountContract for tests that need accounts without on-chain deployment, avoiding the need to start/stop sequencers during setup. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- EpochsTestContext.setup auto-creates/registers hardcoded account when skipInitialSequencer is set (no manual handling in each test) - Move schnorr_hardcoded_account_contract.ts from e2e_epochs/ to fixtures/ - Delete unused deployTestAccounts/registerTestAccounts methods - Remove unnecessary setupWalletOnNode calls in P2P tests that don't need the wallet on a P2P node - Remove redundant disableValidator: false from createValidatorConfig - Move cross-chain contract deploy to test body in epochs_mbps.parallel Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- epochs_invalidate_block: query validator node for slash offenses (initial node has no slasher) - add_rollup: fund regular Schnorr accounts alongside hardcoded account in P2P setup - data_withholding_slash: send L2 txs through validator node (setupAccount no longer deploys) - preferred_gossip_network: exclude P2P-disabled initial node from peer expectations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…failures gossip_network_no_cheat: With skipInitialSequencer, the first blocks built by validators can fail to checkpoint (P2P not yet connected), causing block pruning that invalidates tx references. Fix by allowing empty blocks (minTxsPerBlock: 0) and waiting for the first checkpoint to be published before submitting transactions. epochs_mbps_redistribution: With skipInitialSequencer, the first block was empty because sequencers built it before any txs arrived in the mempool, wasting a sub-slot and pushing late txs into the next checkpoint where redistribution doesn't carry over. Fix by sending the first early tx to the mempool before starting sequencers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 21, 2026
chrismarino
pushed a commit
to chrismarino/aztec-packages
that referenced
this pull request
May 5, 2026
BEGIN_COMMIT_OVERRIDE fix(kv-store): ensure LMDB cursor is closed on iteration abort (AztecProtocol#22509) fix(telemetry-client): use appropriate histogram buckets for L1 gas prices (AztecProtocol#22512) fix(telemetry-client): log warning when BatchSpanProcessor drops spans (AztecProtocol#22511) fix(stdlib): wrap HA signer databaseUrl in SecretValue (AztecProtocol#22510) fix(prover-client): don't mark in-progress epoch N jobs as stale when epoch N+1 starts (AztecProtocol#22508) chore: (A-730) graceful shutdown for services in node startup failure path (AztecProtocol#22112) fix(prover-client): reject stale job promises and count timeouts toward retry limit (AztecProtocol#21842) feat(archiver): validate historical L1 log availability at startup (AztecProtocol#22644) fix(archiver): do not query MessageSent events by blockhash (AztecProtocol#22641) refactor(e2e): skip initial sequencer in p2p and epochs tests (AztecProtocol#22535) fix: handle missing L1 finalized block on devnets (AztecProtocol#22663) fix(world-state): treat historical block 0 queries as historical, not latest (AztecProtocol#22679) fix(sequencer): re-check parent checkpoint validity before pipelined L1 submission (AztecProtocol#22586) fix(world-state): make block 0 a first-class historical block (AztecProtocol#22711) chore: show all running versions (AztecProtocol#22376) chore: fix prettier inside worktrees (AztecProtocol#22557) feat: use optimized verifier for rollup (AztecProtocol#21840) fix(kv-store): skip pool creation on ephemeral deleteDb to unstick browser tests (AztecProtocol#22693) chore: rm claude lockfile (AztecProtocol#22718) fix(e2e): wait for first checkpoint in fee_asset_price_oracle_gossip test (AztecProtocol#22719) chore(prover-node): track estimated L1 fee when proof publishing is disabled (AztecProtocol#22691) fix(ci): rerun squashed PR check on base branch change (AztecProtocol#22713) feat(archiver): decouple calldata from blob fetching in L1 synchronizer (AztecProtocol#22716) refactor(e2e): enable pipelining in e2e_epochs tests (AztecProtocol#22544) feat(p2p): reject and evict txs with insufficient max fee per gas (AztecProtocol#22118) refactor(world-state): always index block 0 regardless of initial tree size (AztecProtocol#22724) fix(e2e): fix redistribution test (AztecProtocol#22729) END_COMMIT_OVERRIDE
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.
Motivation
E2e tests that spin up their own validator nodes (P2P and epochs suites) were unnecessarily starting a sequencer on the initial setup node and waiting for it to mine block 1. With the genesis timestamp support from #22359, this initial block is no longer needed. The initial sequencer also interfered with P2P topology (sharing a validator key with test nodes) and wasted time in setup.
Approach
Added a
dontStartSequenceroption to the e2esetup()function that skips sequencer startup and block-1 waiting on the initial node. For P2P tests, the initial node becomes a lightweight archiver (no sequencer, no validator, no P2P), and the wallet is pointed at a test node for transaction propagation. For epochs tests, account deployment is deferred until validator nodes are running, then sequencers are stopped so the test body can restart them with specific configurations.Changes
dontStartSequenceroption toSetupOptions. When set, passes it through toAztecNodeService.createAndSync()and skips block progression logicsetupWalletOnNode()methoddeployTestAccounts()helper for deferred account deployment. CleansdontStartSequencerfrom config so validator nodes don't inherit itsetupWalletOnNode(nodes[0])beforesetupAccount(). Removed now-unnecessary sequencer stop inreex.test.tsdontStartSequencer: true, deferred account deployment viadeployTestAccounts(), and stop-then-restart pattern for sequencers.epochs_ha_synckept original approach (HA pairs withskipPublishingCheckpointsPercentneed the initial sequencer for reliable account deployment)