Morph Reth is the next-generation execution client for Morph, a decentralized Layer 2 scaling solution for Ethereum. Built on the modular Reth SDK, it provides high-performance block execution with Morph-specific features.
- L1 Message Support: Native handling of L1-to-L2 deposit messages with queue index validation
- Alt Fee Tokens: Support for paying transaction fees in alternative ERC-20 tokens
- Custom Receipt Types: Extended receipt format with L1 fee tracking
- Morph Hardforks: Full support for Morph's upgrade schedule (Bernoulli, Curie, Morph203, Viridian, Emerald)
Morph Reth is designed as a modular extension of Reth, following the SDK pattern:
morph-reth/
├── crates/
│ ├── chainspec/ # Morph chain specification and hardfork definitions
│ ├── consensus/ # L2 block validation (header, body, L1 messages)
│ ├── evm/ # EVM configuration and block execution
│ ├── payload/
│ │ ├── builder/ # Block building logic
│ │ └── types/ # Engine API types (ExecutableL2Data, etc.)
│ ├── primitives/ # Core types (transactions, receipts)
│ └── revm/ # L1 fee calculation, token fee logic
| Crate | Description |
|---|---|
morph-chainspec |
Chain specification with Morph hardfork timestamps |
morph-consensus |
Consensus validation for L2 blocks |
morph-evm |
EVM configuration and receipt builder |
morph-payload-types |
Engine API payload types |
morph-payload-builder |
Block building implementation |
morph-primitives |
Transaction and receipt types |
morph-revm |
L1 fee and token fee calculations |
- Rust 1.82.0 or later
- Cargo
git clone https://github.com/morph-l2/morph-reth.git
cd morph-reth
cargo build --release# Run all tests
cargo test --all
# Run tests for a specific crate
cargo test -p morph-consensus# Format code
cargo +nightly fmt --all
# Run clippy
cargo clippy --all --all-targets -- -D warnings
# Check documentation
cargo doc --no-deps --document-private-itemsMorph supports the following transaction types:
| Type | ID | Description |
|---|---|---|
| Legacy | 0x00 |
Standard legacy transactions |
| EIP-2930 | 0x01 |
Access list transactions |
| EIP-1559 | 0x02 |
Dynamic fee transactions |
| EIP-7702 | 0x04 |
Account abstraction transactions |
| L1 Message | 0x7e |
L1-to-L2 deposit messages |
| Alt Fee | 0x7f |
Alternative fee token transactions |
L1 messages are special deposit transactions that originate from Ethereum L1:
- Must appear at the beginning of each block
- Must have strictly sequential
queue_indexvalues - Gas is prepaid on L1, so no L2 gas fee is charged
- Cannot be sent via the mempool (sequencer only)
| Hardfork | Description |
|---|---|
| Bernoulli | Initial L2 launch |
| Curie | EIP-1559 fee market activation |
| Morph203 | Various improvements |
| Viridian | Fee vault and alt fee support |
| Emerald | Block time 300ms |
- Fork and clone the repository
- Create a new branch for your feature
- Make your changes with tests
- Ensure all checks pass:
cargo fmt,cargo clippy,cargo test - Submit a pull request