refactor(e2e): relocate no-node straggler tests#24344
Open
spalladino wants to merge 4 commits into
Open
Conversation
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
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.
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.
Relocates the remaining "no-node" straggler tests at the
end-to-end/src/root (tests that don't use the e2esetup()fixture, so they run no Aztec node) to live with the code they actually exercise.Moved
e2e_multi_validator/utils.ts→composed/web3signer/multi_validator_keystore_utils.ts. Thee2e_multi_validatortest was already relocated tomulti-node/block-productionon the consolidation PR, leaving thisutils.tsstranded. Its sole consumer is the web3signer keystore test, so it now lives next to it. The emptye2e_multi_validator/directory and its two dangling commented-outbootstrap.shreferences (pointing at the removed directory) are gone.e2e_cheat_codes.test.ts→ folded intoethereum/src/test/eth_cheat_codes.test.ts. This test exercisesEthCheatCodesdirectly against a raw anvil with no Aztec node.EthCheatCodesandstartAnvilare both defined in@aztec/ethereum(only re-exported by@aztec/aztec/testing), and@aztec/ethereumalready has anEthCheatCodessuite 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 aSequencerPublisherintegration test: it starts its own anvil, deploys L1 contracts, and drives the publisher directly (noAztecNodeService, no PXE). Its only blocking dependency on@aztec/aztec-nodewas a single line —import { type AztecNodeConfig, getConfigEnvVars } from '@aztec/aztec-node'— used to build a config object, which would have created asequencer-client ↔ aztec-nodecycle. That dependency was broken by composing sub-configs already reachable fromsequencer-client: the config is now built fromsequencer-client's owngetConfigEnvVars()(SequencerClientConfig, coveringl1ChainId,l1RpcUrls,aztecSlotDuration,ethereumSlotDuration,coinbase,feeRecipient, and bothsequencerPublisherPreviousL1BlockWait*fields) spread overgetL1ContractsConfigEnvVars()(forlagInEpochsForValidatorSet, the one field not onSequencerClientConfig). The unusedcheckIntervalMs/stallTimeMsoverrides 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 theArchiverDataSourcetype) already a devDependency.sendL1ToL2Messagehas 6+ other end-to-end consumers, so the fixture stays put and is copied as a local test helper (l1_to_l2_messaging.ts) withgetLogger()swapped forcreateLoggerfrom@aztec/foundation/log.Test-lane note: the test runs in
sequencer-client's standard test lane (default jest config,testRegexoversrc/**.test.ts), alongside the existing anvil + L1-deploy integration testfee_predictor.test.ts. So this does not introduce a new test profile to the package —sequencer-clientalready runs heavy anvil-backed tests in that lane..test_patterns.ymlThe
e2e_l1_publisherflake 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.ymlentries; they were only matched by the genericsrc/e2e_!(...).test.ts/src/e2e_*/*.test.tsglobs inbootstrap.sh, so their removal leaves no dangling per-file lines.Part of A-1176