Skip to content

test: add E2E integration tests for morph-node#64

Merged
panos-xyz merged 2 commits intopanos/e2e-infrafrom
panos/e2e-tests
Mar 31, 2026
Merged

test: add E2E integration tests for morph-node#64
panos-xyz merged 2 commits intopanos/e2e-infrafrom
panos/e2e-tests

Conversation

@panos-xyz
Copy link
Copy Markdown
Contributor

Summary

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

Dependencies

Test plan

  • cargo check -p morph-node --features test-utils --tests — compiles clean
  • cargo nextest run -p morph-node --features test-utils --test it — all E2E tests pass

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 14400eb7-7399-4e2f-83ef-9d9fe738f8fd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch panos/e2e-tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

panos-xyz added a commit that referenced this pull request Mar 26, 2026
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.
panos-xyz added a commit that referenced this pull request Mar 27, 2026
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)
Copy link
Copy Markdown
Contributor

@chengwenxi chengwenxi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_sync should use flavor = "multi_thread" like other E2E tests
  • 500ms initial sleep before payload polling is unnecessary given the poll loop
  • next_l1_msg_index skip behavior should be cross-referenced against spec

@panos-xyz panos-xyz merged commit 0d2c2b5 into panos/e2e-infra Mar 31, 2026
1 check passed
@panos-xyz panos-xyz deleted the panos/e2e-tests branch March 31, 2026 13:42
panos-xyz added a commit that referenced this pull request Mar 31, 2026
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.
panos-xyz added a commit that referenced this pull request Mar 31, 2026
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.
panos-xyz added a commit that referenced this pull request Mar 31, 2026
* 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)
panos-xyz added a commit that referenced this pull request Mar 31, 2026
* 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)
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