test: add E2E integration tests for morph-node#64
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The [[test]] entry, E2E CI job, and clippy --test it step reference tests/it/main.rs which lives in the stacked PR (#64). Move these declarations there so this infrastructure PR can pass CI independently.
ab626ef to
053d540
Compare
The nextest overrides reference binary(it) which only exists after the E2E test files are added (stacked PR #64). Without the binary, nextest fails with "operator didn't match any binary names". Also remove the E2E job from test.yml for the same reason.
Add comprehensive E2E integration tests covering all morph-reth features: - sync: basic can_sync test (10 blocks via Engine API) - block_building: empty/single-tx/multi-tx/L1-msg/mixed blocks - consensus: header validation, L1 message sequencing, timestamp rules - engine: assembleL2Block, newL2Block, validateL2Block, newSafeL2Block - evm: contract deploy/state, BLOCKHASH, SELFDESTRUCT, L1 fee, revert - hardfork: Curie→Jade EVM transitions, disabled precompile stubs - l1_messages: deposit flow, sequential queue indices, gas prepaid - morph_tx: MorphTx v0 lifecycle, ERC20 token fee, revert behavior, fee log ordering, receipt fields - rpc: eth_getTransactionReceipt/ByHash Morph fields, debug_trace*, trace_* namespace - txpool: accept/reject by tx type, blob rejection, EIP-7702 gating, MorphTx version/hardfork constraints
Move E2E-specific configuration from infrastructure PR (#63) to this stacked PR where the test files actually live: - Add [[test]] name="it" to Cargo.toml - Add E2E job to test.yml (nextest with ci profile) - Add clippy --test it step to lint.yml - Fix rustfmt in rpc.rs (long assert_eq line)
053d540 to
3a45c4f
Compare
chengwenxi
left a comment
There was a problem hiding this comment.
LGTM. Comprehensive E2E test suite covering sync, block building, consensus, engine API, EVM, hardfork transitions, L1 messages, MorphTx, RPC, and txpool. Well-documented tests with clear assertions. Minor notes:
can_syncshould useflavor = "multi_thread"like other E2E tests- 500ms initial sleep before payload polling is unnecessary given the poll loop
next_l1_msg_indexskip behavior should be cross-referenced against spec
The [[test]] entry, E2E CI job, and clippy --test it step reference tests/it/main.rs which lives in the stacked PR (#64). Move these declarations there so this infrastructure PR can pass CI independently.
The nextest overrides reference binary(it) which only exists after the E2E test files are added (stacked PR #64). Without the binary, nextest fails with "operator didn't match any binary names". Also remove the E2E job from test.yml for the same reason.
* test: add E2E integration tests for morph-node Add comprehensive E2E integration tests covering all morph-reth features: - sync: basic can_sync test (10 blocks via Engine API) - block_building: empty/single-tx/multi-tx/L1-msg/mixed blocks - consensus: header validation, L1 message sequencing, timestamp rules - engine: assembleL2Block, newL2Block, validateL2Block, newSafeL2Block - evm: contract deploy/state, BLOCKHASH, SELFDESTRUCT, L1 fee, revert - hardfork: Curie→Jade EVM transitions, disabled precompile stubs - l1_messages: deposit flow, sequential queue indices, gas prepaid - morph_tx: MorphTx v0 lifecycle, ERC20 token fee, revert behavior, fee log ordering, receipt fields - rpc: eth_getTransactionReceipt/ByHash Morph fields, debug_trace*, trace_* namespace - txpool: accept/reject by tx type, blob rejection, EIP-7702 gating, MorphTx version/hardfork constraints * chore: add E2E CI config, [[test]] declaration, and fmt fix Move E2E-specific configuration from infrastructure PR (#63) to this stacked PR where the test files actually live: - Add [[test]] name="it" to Cargo.toml - Add E2E job to test.yml (nextest with ci profile) - Add clippy --test it step to lint.yml - Fix rustfmt in rpc.rs (long assert_eq line)
* test: add E2E test infrastructure and helpers Add the foundation for morph-node E2E integration tests: - test_utils module with setup(), advance_chain(), advance_empty_block() helpers, morph_payload_attributes() builder, and make_*_tx() helpers for constructing signed EIP-1559/EIP-7702/L1/MorphTx/Deploy/EIP-4844 transactions - test-genesis.json with pre-funded test accounts, L1 Gas Price Oracle Curie storage, L2TokenRegistry, and system contract state - From<EthPayloadBuilderAttributes> for MorphPayloadBuilderAttributes to enable reth E2E test framework compatibility - nextest config with CI profile (threads-required=2 for E2E isolation) - CI workflow: E2E test job using nextest, clippy with test-utils feature - test-utils feature gate for optional E2E test dependencies * fix(ci): move E2E test references to stacked PR The [[test]] entry, E2E CI job, and clippy --test it step reference tests/it/main.rs which lives in the stacked PR (#64). Move these declarations there so this infrastructure PR can pass CI independently. * ci: use nextest with improved config and concurrency - Replace `cargo test` with `cargo nextest run --profile ci` - Add E2E test job with 15min timeout - Remove hardcoded test-threads, use num-cpus for both profiles - Add slow-timeout = 30s with exponential backoff retries (ref: scroll-reth) - Add concurrency groups to cancel duplicate CI runs (ref: scroll/tempo) - Replace manual cache with Swatinem/rust-cache - Set RUST_MIN_STACK=8388608 for large test binaries * fix(ci): remove binary(it) references from nextest config and test.yml The nextest overrides reference binary(it) which only exists after the E2E test files are added (stacked PR #64). Without the binary, nextest fails with "operator didn't match any binary names". Also remove the E2E job from test.yml for the same reason. * test: add E2E integration tests for morph-node (#64) * test: add E2E integration tests for morph-node Add comprehensive E2E integration tests covering all morph-reth features: - sync: basic can_sync test (10 blocks via Engine API) - block_building: empty/single-tx/multi-tx/L1-msg/mixed blocks - consensus: header validation, L1 message sequencing, timestamp rules - engine: assembleL2Block, newL2Block, validateL2Block, newSafeL2Block - evm: contract deploy/state, BLOCKHASH, SELFDESTRUCT, L1 fee, revert - hardfork: Curie→Jade EVM transitions, disabled precompile stubs - l1_messages: deposit flow, sequential queue indices, gas prepaid - morph_tx: MorphTx v0 lifecycle, ERC20 token fee, revert behavior, fee log ordering, receipt fields - rpc: eth_getTransactionReceipt/ByHash Morph fields, debug_trace*, trace_* namespace - txpool: accept/reject by tx type, blob rejection, EIP-7702 gating, MorphTx version/hardfork constraints * chore: add E2E CI config, [[test]] declaration, and fmt fix Move E2E-specific configuration from infrastructure PR (#63) to this stacked PR where the test files actually live: - Add [[test]] name="it" to Cargo.toml - Add E2E job to test.yml (nextest with ci profile) - Add clippy --test it step to lint.yml - Fix rustfmt in rpc.rs (long assert_eq line)
Summary
Add comprehensive E2E integration tests covering all morph-reth features:
Dependencies
Test plan
cargo check -p morph-node --features test-utils --tests— compiles cleancargo nextest run -p morph-node --features test-utils --test it— all E2E tests pass