Skip to content
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
927f23d
chore(engine-tree-ext): add empty crate skeleton
panos-xyz Apr 17, 2026
5e0f043
feat(engine-tree-ext): copy reth v2.0.0 payload_validator as MorphBas…
panos-xyz Apr 17, 2026
a6656e8
docs(engine-tree-ext): annotate workarounds with NOTE(morph) comments
panos-xyz Apr 17, 2026
0fb52cf
feat(engine-tree-ext): add gate::state_root_enforced_at helper with u…
panos-xyz Apr 17, 2026
2427e9b
refactor(node): switch reth to upstream v2.0.0 via MorphBasicEngineVa…
panos-xyz Apr 17, 2026
7782afb
fix(txpool,node): clippy/fmt cleanup after reth v2.0.0 migration
panos-xyz Apr 17, 2026
ac7629f
test(engine-tree-ext): add Jade boundary integration tests + migrate …
panos-xyz Apr 17, 2026
b1049a4
style: fmt cleanup after reth v2.0.0 test_utils migration
panos-xyz Apr 17, 2026
146aa86
fix(revm): restore original_value after cold->warm SLOAD in MorphTx V1
panos-xyz Apr 18, 2026
53907ae
fix(revm): extend SLOAD original_value fix to SSTORE cold path
panos-xyz Apr 18, 2026
75f8408
perf(payload-builder): wire PayloadExecutionCache for cross-block sta…
panos-xyz Apr 18, 2026
430c372
perf(payload-builder): wire StateRootHandle + OnStateHook for paralle…
panos-xyz Apr 18, 2026
ff511f4
refactor(evm): implement BuildNextEnv trait for MorphNextBlockEnvAttr…
panos-xyz Apr 18, 2026
4c588a5
style: fmt
panos-xyz Apr 18, 2026
c72fba2
perf(local-test): batch MDBX writes to avoid fsync contention with mo…
panos-xyz Apr 19, 2026
27fb05e
chore(evm): silence clippy unnecessary_sort_by in curie.rs test
panos-xyz Apr 22, 2026
ce8c546
fix(rpc): restore caller_gas_allowance override for eth_estimateGas L…
panos-xyz Apr 22, 2026
8557465
test(node): e2e coverage for eth_estimateGas balance cap
panos-xyz Apr 22, 2026
0b4cfc0
refactor(rpc): delegate ETH caller_gas_allowance to alloy_evm helper
panos-xyz Apr 22, 2026
3a57991
fix(rpc): scope L1 fee cap to estimateGas path only (eth_call parity)
panos-xyz Apr 23, 2026
ba7ae90
fix(rpc): drop ETH-balance gas cap on MorphTx token-fee path
panos-xyz Apr 23, 2026
6c9a9dd
fix(rpc): subtract L1 fee at wei precision on estimateGas allowance cap
panos-xyz Apr 23, 2026
2b6f7c8
fix(rpc): skip ETH-affordability short-circuit for MorphTx token-fee …
panos-xyz Apr 23, 2026
aae72ea
fix(rpc): reject ETH estimateGas at l1_fee == available with clear error
panos-xyz Apr 23, 2026
eb5155e
fix(revm): skip fee deduction when disable_fee_charge is set
panos-xyz Apr 23, 2026
17c680f
chore(engine-api): drop unused pre-unfork state-root gate helpers
panos-xyz Apr 23, 2026
2bc7288
chore(docker): default RUSTFLAGS to target-cpu=x86-64-v3
panos-xyz Apr 23, 2026
d14282a
chore(ops): expose reth RPC namespace in local-test and docker-compose
panos-xyz Apr 23, 2026
b22219c
docs(local-test): document Storage V2 and engine persistence tuning
panos-xyz Apr 23, 2026
ce8a69d
perf(bin): enable jemalloc global allocator by default
panos-xyz Apr 23, 2026
c63b750
perf: switch payload-builder and engine-api timers to FastInstant
panos-xyz Apr 23, 2026
b4152b5
test(txpool): re-enable validator unit tests disabled during unfork
panos-xyz Apr 23, 2026
da48570
refactor: simplify post-unfork code
panos-xyz Apr 24, 2026
555727a
fix(consensus): treat missing withdraw-trie expectation as SkipValida…
panos-xyz Apr 24, 2026
06b522c
fix(rpc): bound EVM-call-mode token allowance via fee_limit/gas_cap
panos-xyz Apr 24, 2026
0272219
fix(rpc): floor token→eth conversion and clamp EVM-call-mode fee_limi…
panos-xyz Apr 24, 2026
1d6814f
fix(engine-api): tighten state machine race-safety
panos-xyz Apr 24, 2026
6da7885
perf(payload-builder): switch PayloadBuildingBreaker timer to FastIns…
panos-xyz Apr 24, 2026
8b3f9e3
perf(engine-api): skip L1 message decode + ECDSA recover when computi…
panos-xyz Apr 24, 2026
f1ca7d4
chore: drop history-narrating comments and dead error variant
panos-xyz Apr 24, 2026
b6cb7ad
fix: keep finalized<=safe invariant + remove flaky payload-build sleep
panos-xyz Apr 24, 2026
6283889
test(node): regression for mainnet block 19720219 SLOAD/SSTORE bug
panos-xyz Apr 24, 2026
90786c0
fix(ci): unblock cargo-deny + CodeQL on PR #98
panos-xyz Apr 24, 2026
32c9918
chore(deps): cargo update full lockfile + drop stale advisory ignores
panos-xyz Apr 25, 2026
554ee67
chore(local-test): disable NAT discovery in reth-start
panos-xyz Apr 27, 2026
43c54fd
chore: bump MSRV to 1.93
panos-xyz Apr 27, 2026
17eac01
chore: bump MSRV to 1.95
panos-xyz Apr 27, 2026
f5a2a3a
chore(local-test): disable external NAT probes
panos-xyz May 6, 2026
58b96ce
chore: adapt to reth v2.2.0
panos-xyz May 9, 2026
5c19446
test(rpc): cover Morph receipt conversion paths
panos-xyz May 9, 2026
06ad105
test(chainspec): guard Amsterdam gas semantics
panos-xyz May 9, 2026
0f16e4a
Merge main into unfork reth PR
panos-xyz May 9, 2026
53b494e
Merge branch 'main' into feat/unfork-reth-retroactive-trust
panos-xyz May 9, 2026
e8f539e
fix(deny): allow upstream discv5 git dependency
panos-xyz May 9, 2026
e75a054
Merge branch 'main' into feat/unfork-reth-retroactive-trust
panos-xyz May 9, 2026
b629ae0
fix(reference-index): adapt table decompression errors
panos-xyz May 9, 2026
e2897d8
chore(lockfile): refresh workspace package version
panos-xyz May 9, 2026
642bcf6
fix(local-test): fully reset reth state
panos-xyz May 10, 2026
754db32
fix(ci): update reference index test builder usage
panos-xyz May 10, 2026
9242f5e
fix(exex): batch reference index notifications
panos-xyz May 10, 2026
3b64bd6
fix(engine): read canonical head from provider
panos-xyz May 11, 2026
9eb0c4b
Merge branch 'main' into feat/unfork-reth-retroactive-trust
panos-xyz May 13, 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
2,839 changes: 1,424 additions & 1,415 deletions Cargo.lock

Large diffs are not rendered by default.

151 changes: 80 additions & 71 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ members = [
"crates/chainspec",
"crates/consensus",
"crates/engine-api",
"crates/engine-tree-ext",
"crates/evm",
"crates/node",
"crates/rpc",
Expand Down Expand Up @@ -45,6 +46,7 @@ all = "warn"
morph-chainspec = { path = "crates/chainspec", default-features = false }
morph-consensus = { path = "crates/consensus", default-features = false }
morph-engine-api = { path = "crates/engine-api", default-features = false }
morph-engine-tree-ext = { path = "crates/engine-tree-ext", default-features = false }
morph-evm = { path = "crates/evm", default-features = false }
morph-node = { path = "crates/node"}
morph-payload-builder = { path = "crates/payload/builder", default-features = false }
Expand All @@ -54,86 +56,93 @@ morph-rpc = { path = "crates/rpc" }
morph-revm = { path = "crates/revm", default-features = false }
morph-txpool = { path = "crates/txpool", default-features = false }

reth-basic-payload-builder = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-chain-state = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-chainspec = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-cli = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-cli-commands = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-cli-util = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-codecs = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-codecs-derive = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-consensus = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-consensus-common = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-db = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-db-api = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-e2e-test-utils = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-engine-local = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-engine-primitives = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-engine-tree = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-errors = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-eth-wire-types = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-ethereum = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-ethereum-cli = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-ethereum-consensus = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-ethereum-engine-primitives = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-ethereum-primitives = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329", default-features = false }
reth-evm = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-evm-ethereum = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-execution-types = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-metrics = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-network-peers = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-node-api = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-node-builder = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-node-core = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-node-ethereum = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-node-metrics = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-payload-builder = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-payload-primitives = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-payload-util = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-primitives-traits = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329", default-features = false }
reth-provider = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-rpc = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-rpc-api = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-rpc-builder = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-rpc-convert = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-rpc-eth-api = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-rpc-eth-types = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-rpc-server-types = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-storage-api = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-tasks = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-tracing = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-trie = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-transaction-pool = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-zstd-compressors = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329", default-features = false }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-codecs = { version = "0.1.0", default-features = false }
reth-codecs-derive = "0.1.0"
reth-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-consensus-common = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-db-api = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-engine-local = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-engine-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-engine-tree = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-ethereum-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-ethereum-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-ethereum-engine-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0", default-features = false }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-node-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-primitives-traits = { version = "=0.1.0", default-features = false }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-rpc-convert = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-tracing = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-zstd-compressors = { version = "0.1.0", default-features = false }
reth-execution-cache = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-trie-parallel = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0" }
reth-trie-sparse = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0", default-features = false }

reth-revm = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329", features = [
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v2.0.0", features = [
"std",
"optional-checks",
] }
revm = { version = "33.1.0", features = [
revm = { version = "36.0.0", features = [
"optional_fee_charge",
"optional_eip7623",
], default-features = false }

alloy = { version = "1.4.3", default-features = false }
alloy-consensus = { version = "1.4.3", default-features = false }
alloy-contract = { version = "1.4.3", default-features = false }
alloy-eips = { version = "1.4.3", default-features = false }
alloy-evm = "0.25.1"
alloy-genesis = "1.4.3"
alloy = { version = "1.8.2", default-features = false }
alloy-consensus = { version = "1.8.2", default-features = false }
alloy-contract = { version = "1.8.2", default-features = false }
alloy-eip7928 = { version = "0.3.0", default-features = false }
alloy-eips = { version = "1.8.2", default-features = false }
alloy-evm = { version = "0.30.0", default-features = false }
alloy-genesis = "1.8.2"
alloy-hardforks = "0.4.5"
alloy-network = { version = "1.4.3", default-features = false }
alloy-primitives = { version = "1.5.0", default-features = false }
alloy-provider = { version = "1.4.3", default-features = false }
alloy-rlp = "0.3.10"
alloy-rpc-types-engine = "1.4.3"
alloy-rpc-types-eth = { version = "1.4.3" }
alloy-serde = "1.4.3"
alloy-signer = "1.4.3"
alloy-signer-local = "1.4.3"
alloy-sol-types = "1.5.0"
alloy-transport = "1.4.3"
alloy-chains = { version = "0.2.5", default-features = false }
alloy-network = { version = "1.8.2", default-features = false }
alloy-primitives = { version = "1.5.6", default-features = false }
alloy-provider = { version = "1.8.2", default-features = false }
alloy-rlp = "0.3.13"
alloy-rpc-types-engine = "1.8.2"
alloy-rpc-types-eth = { version = "1.8.2" }
alloy-serde = "1.8.2"
alloy-signer = "1.8.2"
alloy-signer-local = "1.8.2"
alloy-sol-types = { version = "1.5.6", default-features = false }
alloy-transport = "1.8.2"
alloy-chains = { version = "0.2.33", default-features = false }
crossbeam-channel = "0.5.13"
revm-primitives = { version = "22.1.0", default-features = false }
arbitrary = { version = "1.3", features = ["derive"] }
async-lock = "3.4.1"
async-trait = "0.1"
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ COPY --from=planner /app/recipe.json recipe.json
ARG BUILD_PROFILE=release
ENV BUILD_PROFILE=$BUILD_PROFILE

# Extra Cargo flags
ARG RUSTFLAGS=""
# Extra Cargo flags. Default target-cpu=x86-64-v3 matches upstream reth
# (Haswell / Excavator+) for AVX2 / BMI2 / POPCNT on trie/keccak hot paths.
# Override with `--build-arg RUSTFLAGS=""` for older CPUs.
ARG RUSTFLAGS="-C target-cpu=x86-64-v3"
ENV RUSTFLAGS="$RUSTFLAGS"

# Build dependencies (cached layer)
Expand Down
13 changes: 13 additions & 0 deletions bin/morph-reth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,16 @@ reth-rpc-server-types.workspace = true
clap.workspace = true
eyre.workspace = true
tracing.workspace = true

[features]
default = ["jemalloc"]

jemalloc = [
"reth-cli-util/jemalloc",
"reth-ethereum-cli/jemalloc",
]
jemalloc-prof = [
"jemalloc",
"reth-cli-util/jemalloc-prof",
"reth-ethereum-cli/jemalloc-prof",
]
12 changes: 12 additions & 0 deletions bin/morph-reth/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
//! This is the main entry point for the Morph L2 execution layer client.
//! It extends reth with Morph-specific functionality.

#[global_allocator]
static ALLOC: reth_cli_util::allocator::Allocator = reth_cli_util::allocator::new_allocator();

// Required for `override_allocator_on_supported_platforms` — ensures the linker
// pulls in tikv_jemalloc_sys symbols so jemalloc takes over malloc/free.
#[cfg(all(feature = "jemalloc", unix))]
use reth_cli_util::allocator::tikv_jemalloc_sys as _;

#[cfg(all(feature = "jemalloc-prof", unix))]
#[unsafe(export_name = "malloc_conf")]
static MALLOC_CONF: &[u8] = b"prof:true,prof_active:true,lg_prof_sample:19\0";

use clap::Parser;
use morph_chainspec::{MorphChainSpec, MorphChainSpecParser};
use morph_consensus::MorphConsensus;
Expand Down
47 changes: 43 additions & 4 deletions crates/consensus/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use morph_primitives::{
Block, BlockBody, MorphHeader, MorphReceipt, MorphTxEnvelope,
transaction::morph_transaction::MORPH_TX_VERSION_1,
};
use reth_consensus::{Consensus, ConsensusError, FullConsensus, HeaderValidator};
use reth_consensus::{Consensus, ConsensusError, FullConsensus, HeaderValidator, ReceiptRootBloom};
use reth_consensus_common::validation::{
validate_against_parent_hash_number, validate_body_against_header,
};
Expand Down Expand Up @@ -346,6 +346,7 @@ impl FullConsensus<morph_primitives::MorphPrimitives> for MorphConsensus {
&self,
block: &RecoveredBlock<Block>,
result: &BlockExecutionResult<MorphReceipt>,
receipt_root_bloom: Option<ReceiptRootBloom>,
) -> Result<(), ConsensusError> {
// Verify the block gas used
let cumulative_gas_used = result
Expand All @@ -366,8 +367,19 @@ impl FullConsensus<morph_primitives::MorphPrimitives> for MorphConsensus {
});
}

// Verify the receipts logs bloom and root
verify_receipts(block.receipts_root(), block.logs_bloom(), &result.receipts)?;
// Verify the receipts logs bloom and root.
// Use pre-computed (root, bloom) from the executor when available to avoid
// redundant hashing; fall back to computing from receipts otherwise.
if let Some((receipts_root, logs_bloom)) = receipt_root_bloom {
verify_receipts_precomputed(
block.receipts_root(),
block.logs_bloom(),
receipts_root,
logs_bloom,
)?;
} else {
verify_receipts(block.receipts_root(), block.logs_bloom(), &result.receipts)?;
}

Ok(())
}
Expand Down Expand Up @@ -624,6 +636,33 @@ fn validate_morph_txs(txs: &[MorphTxEnvelope], is_jade: bool) -> Result<(), Cons
/// 2. Calculates the logs bloom by combining all receipt blooms
/// 3. Compares both against the expected values from the block header
#[inline]
fn verify_receipts_precomputed(
expected_receipts_root: B256,
expected_logs_bloom: Bloom,
receipts_root: B256,
logs_bloom: Bloom,
) -> Result<(), ConsensusError> {
if receipts_root != expected_receipts_root {
return Err(ConsensusError::BodyReceiptRootDiff(
GotExpected {
got: receipts_root,
expected: expected_receipts_root,
}
.into(),
));
}
if logs_bloom != expected_logs_bloom {
return Err(ConsensusError::BodyBloomLogDiff(
GotExpected {
got: logs_bloom,
expected: expected_logs_bloom,
}
.into(),
));
}
Ok(())
}

fn verify_receipts(
expected_receipts_root: B256,
expected_logs_bloom: Bloom,
Expand Down Expand Up @@ -1891,7 +1930,7 @@ mod tests {
let recovered =
reth_primitives_traits::RecoveredBlock::new_unhashed(block, vec![Address::ZERO]);

let post_result = consensus.validate_block_post_execution(&recovered, &result);
let post_result = consensus.validate_block_post_execution(&recovered, &result, None);
assert!(matches!(
post_result,
Err(ConsensusError::BlockGasUsed { .. })
Expand Down
1 change: 0 additions & 1 deletion crates/engine-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ morph-primitives = { workspace = true, features = ["reth-codec"] }
reth-metrics.workspace = true
reth-node-api.workspace = true
reth-payload-builder.workspace = true
reth-payload-primitives.workspace = true
reth-primitives-traits.workspace = true
reth-provider.workspace = true
reth-rpc-api.workspace = true
Expand Down
Loading
Loading