Skip to content

refactor(e2e): relocate no-node straggler tests#24344

Open
spalladino wants to merge 4 commits into
spl/e2e-consolidation-2from
spl/e2e-no-node-relocations
Open

refactor(e2e): relocate no-node straggler tests#24344
spalladino wants to merge 4 commits into
spl/e2e-consolidation-2from
spl/e2e-no-node-relocations

Conversation

@spalladino

@spalladino spalladino commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Relocates the remaining "no-node" straggler tests at the end-to-end/src/ root (tests that don't use the e2e setup() fixture, so they run no Aztec node) to live with the code they actually exercise.

Moved

  • e2e_multi_validator/utils.tscomposed/web3signer/multi_validator_keystore_utils.ts. The e2e_multi_validator test was already relocated to multi-node/block-production on the consolidation PR, leaving this utils.ts stranded. Its sole consumer is the web3signer keystore test, so it now lives next to it. The empty e2e_multi_validator/ directory and its two dangling commented-out bootstrap.sh references (pointing at the removed directory) are gone.

  • e2e_cheat_codes.test.ts → folded into ethereum/src/test/eth_cheat_codes.test.ts. This test exercises EthCheatCodes directly against a raw anvil with no Aztec node. EthCheatCodes and startAnvil are both defined in @aztec/ethereum (only re-exported by @aztec/aztec/testing), and @aztec/ethereum already has an EthCheatCodes suite plus all needed test deps (viem, foundation). Its mine / timestamp / load-store / etch / impersonate cases were merged into the existing suite, reusing its shared anvil setup. No new dependencies were added; all imports stay intra-package or downward to @aztec/foundation.

  • e2e_l1_publisher/ (e2e_l1_publisher.test.ts + write_json.ts) → sequencer-client/src/publisher/. This is a SequencerPublisher integration test: it starts its own anvil, deploys L1 contracts, and drives the publisher directly (no AztecNodeService, no PXE). Its only blocking dependency on @aztec/aztec-node was a single line — import { type AztecNodeConfig, getConfigEnvVars } from '@aztec/aztec-node' — used to build a config object, which would have created a sequencer-client ↔ aztec-node cycle. That dependency was broken by composing sub-configs already reachable from sequencer-client: the config is now built from sequencer-client's own getConfigEnvVars() (SequencerClientConfig, covering l1ChainId, l1RpcUrls, aztecSlotDuration, ethereumSlotDuration, coinbase, feeRecipient, and both sequencerPublisherPreviousL1BlockWait* fields) spread over getL1ContractsConfigEnvVars() (for lagInEpochsForValidatorSet, the one field not on SequencerClientConfig). The unused checkIntervalMs/stallTimeMs overrides are dropped. No package.json or tsconfig changes were needed — every functional dependency (@aztec/ethereum, epoch-cache, world-state, prover-client, blob-client, blob-lib, archiver, stdlib, aztec.js, l1-artifacts) was already present, with @aztec/archiver (for the ArchiverDataSource type) already a devDependency. sendL1ToL2Message has 6+ other end-to-end consumers, so the fixture stays put and is copied as a local test helper (l1_to_l2_messaging.ts) with getLogger() swapped for createLogger from @aztec/foundation/log.

    Test-lane note: the test runs in sequencer-client's standard test lane (default jest config, testRegex over src/**.test.ts), alongside the existing anvil + L1-deploy integration test fee_predictor.test.ts. So this does not introduce a new test profile to the package — sequencer-client already runs heavy anvil-backed tests in that lane.

.test_patterns.yml

The e2e_l1_publisher flake entry (src/e2e_l1_publisher/e2e_l1_publisher.test.ts) was removed, since that path no longer exists. None of the other relocated root tests had .test_patterns.yml entries; they were only matched by the generic src/e2e_!(...).test.ts / src/e2e_*/*.test.ts globs in bootstrap.sh, so their removal leaves no dangling per-file lines.

Part of A-1176

The e2e_multi_validator test was relocated to multi-node/block-production
on the consolidation PR, leaving src/e2e_multi_validator/utils.ts stranded.
Its sole consumer is the web3signer keystore test, so move it there and
drop the now-empty directory and its dangling bootstrap.sh references.

Part of A-1176
src/e2e_cheat_codes.test.ts exercises EthCheatCodes directly against a raw
anvil with no Aztec node. EthCheatCodes and startAnvil are defined in
@aztec/ethereum (only re-exported by @aztec/aztec/testing), so the test
belongs there. Merge its mine/timestamp/load-store/etch/impersonate cases
into the existing ethereum/src/test/eth_cheat_codes.test.ts suite, reusing
its shared anvil setup. No new dependencies; all imports stay intra-package
or downward to @aztec/foundation.

Part of A-1176
@spalladino spalladino added the S-do-not-merge Status: Do not merge this PR label Jun 26, 2026
This SequencerPublisher integration test starts its own anvil and drives
the publisher directly, so it belongs alongside the publisher rather than
in end-to-end. Its only blocking dependency was a single
`import { type AztecNodeConfig, getConfigEnvVars } from '@aztec/aztec-node'`
used to build a config object, which created a sequencer-client <-> aztec-node
cycle if the test moved.

That dependency is broken by composing sub-configs already reachable from
sequencer-client: the config is now built from sequencer-client's own
getConfigEnvVars() (SequencerClientConfig: l1ChainId, l1RpcUrls,
aztecSlotDuration, ethereumSlotDuration, coinbase, feeRecipient, and both
sequencerPublisherPreviousL1BlockWait* fields) spread over
getL1ContractsConfigEnvVars() (for lagInEpochsForValidatorSet, which is not
part of SequencerClientConfig). The unused checkIntervalMs/stallTimeMs
overrides are dropped.

sendL1ToL2Message has 6+ other end-to-end consumers, so the fixture stays
put; it is copied as a local test helper (l1_to_l2_messaging.ts) with its
getLogger() swapped for createLogger from @aztec/foundation/log.

The test runs in sequencer-client's standard test lane (default jest config,
testRegex over src/**.test.ts) alongside the existing anvil-based
fee_predictor.test.ts, so no new test profile is introduced.
The move commit git-mv'd the test but did not re-stage the post-move
edits, so the committed file still imported @aztec/aztec-node (the cycle
the move was meant to break) and the old ../fixtures/l1_to_l2_messaging.js
path. Stage the edited content: aztec-node config replaced by
SequencerClientConfig + L1ContractsConfig composition, and the local
helper imports.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-do-not-merge Status: Do not merge this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant