Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
91bfda5
test: add comprehensive test coverage and E2E integration tests
panos-xyz Mar 18, 2026
f4ae49c
test: address code review feedback
panos-xyz Mar 18, 2026
4b375ba
style: fmt --all
panos-xyz Mar 18, 2026
75dd26b
test: add EVM/precompile E2E tests and precompile unit tests
panos-xyz Mar 20, 2026
1ff9646
test: add remaining E2E integration tests and config
panos-xyz Mar 20, 2026
adb9723
test: add token fee revert and fee log survival tests
panos-xyz Mar 20, 2026
5f3eace
fix: address CodeRabbit review feedback and suppress CodeQL false pos…
panos-xyz Mar 20, 2026
9244693
chore: remove redundant CodeQL workflow files
panos-xyz Mar 20, 2026
3c7011b
fix: fix circular tests and add missing branch coverage
panos-xyz Mar 20, 2026
c132b63
ci: add E2E test job to test workflow
panos-xyz Mar 20, 2026
2e6c2df
ci: increase vm.max_map_count for MDBX in E2E tests
panos-xyz Mar 20, 2026
efeb955
ci: use nextest for E2E tests to fix MDBX resource leaks
panos-xyz Mar 20, 2026
d1451f3
fix: correct nextest filter — binary(it) not test(it::)
panos-xyz Mar 20, 2026
72c9390
fix: align ExecutableL2Data hash with import-side reconstruction
panos-xyz Mar 20, 2026
c501265
style: fmt all
panos-xyz Mar 20, 2026
954a47f
fix: align L2 header fields between assemble and import paths
panos-xyz Mar 24, 2026
55265b4
style: fmt all
panos-xyz Mar 24, 2026
1748338
fix(txpool): enforce hardfork activation for EIP-7702 and MorphTx (0x7F)
panos-xyz Mar 24, 2026
3f8c44e
refactor: remove redundant hash recomputation in assemble_l2_block
panos-xyz Mar 25, 2026
59244b2
fix(rpc): skip EIP-4788 system call during trace replay for Morph L2
panos-xyz Mar 25, 2026
eb82877
fix(primitives): return baseFee as effectiveGasPrice for L1 messages
panos-xyz Mar 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[profile.default]
# Each integration test opens an MDBX environment. macOS limits concurrent
# memory-mapped files per process. Cap concurrent tests to avoid ENOMEM (error 12).
test-threads = 4

[profile.ci]
# GitHub Actions ubuntu-latest has 4 vCPUs / 16GB RAM.
# Each E2E test spawns a full reth node (MDBX + tokio runtime + rayon pools).
# Limit to 2 concurrent tests to avoid MDBX resource exhaustion.
test-threads = 2
retries = 2
fail-fast = false

# E2E integration tests spawn full nodes — each needs exclusive MDBX resources.
# threads-required = 2 means nextest counts each as needing 2 of the test-threads
# slots, so only 1 runs at a time on CI (2 slots / 2 required = 1 concurrent).
[[profile.ci.overrides]]
filter = "package(morph-node) & binary(it)"
threads-required = 2
slow-timeout = { period = "120s", terminate-after = 3 }

# Integration tests are heavier — give them more time
[[profile.default.overrides]]
filter = "package(morph-node) & binary(it)"
slow-timeout = { period = "120s", terminate-after = 3 }
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ jobs:
- name: Run Clippy
run: cargo clippy --all --all-targets -- -D warnings

- name: Run Clippy for feature-gated integration tests
run: cargo clippy -p morph-node --test it --features test-utils -- -D warnings

32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,35 @@ jobs:
- name: Run doc tests
run: cargo test --doc --all --verbose

e2e:
name: E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 15
env:
RUST_MIN_STACK: 8388608
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-e2e-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-e2e-

- name: Install nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest

- name: Run E2E tests
run: cargo nextest run --profile ci -p morph-node --test it --features test-utils

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@

CLAUDE.md

.worktrees/
113 changes: 111 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions crates/chainspec/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,54 @@ pub const L2_MESSAGE_QUEUE_ADDRESS: Address = address!("530000000000000000000000
///
/// This is slot 33, which stores the Merkle root for L2->L1 messages.
pub const L2_MESSAGE_QUEUE_WITHDRAW_TRIE_ROOT_SLOT: U256 = U256::from_limbs([33, 0, 0, 0]);

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test_chain_ids_are_distinct() {
assert_ne!(MORPH_MAINNET_CHAIN_ID, MORPH_HOODI_CHAIN_ID);
}

#[test]
fn test_chain_id_values() {
assert_eq!(MORPH_MAINNET_CHAIN_ID, 2818);
assert_eq!(MORPH_HOODI_CHAIN_ID, 2910);
}

#[test]
fn test_genesis_hashes_are_distinct() {
assert_ne!(MORPH_MAINNET_GENESIS_HASH, MORPH_HOODI_GENESIS_HASH);
assert_ne!(
MORPH_MAINNET_GENESIS_STATE_ROOT,
MORPH_HOODI_GENESIS_STATE_ROOT
);
}

#[test]
fn test_genesis_hashes_are_nonzero() {
assert_ne!(MORPH_MAINNET_GENESIS_HASH, B256::ZERO);
assert_ne!(MORPH_HOODI_GENESIS_HASH, B256::ZERO);
assert_ne!(MORPH_MAINNET_GENESIS_STATE_ROOT, B256::ZERO);
assert_ne!(MORPH_HOODI_GENESIS_STATE_ROOT, B256::ZERO);
}

#[test]
fn test_l2_message_queue_address() {
assert_eq!(
L2_MESSAGE_QUEUE_ADDRESS,
address!("5300000000000000000000000000000000000001")
);
}

#[test]
fn test_withdraw_trie_root_slot() {
assert_eq!(L2_MESSAGE_QUEUE_WITHDRAW_TRIE_ROOT_SLOT, U256::from(33));
}

#[test]
fn test_base_fee() {
assert_eq!(MORPH_BASE_FEE, 1_000_000);
}
}
Loading
Loading