Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
90f4727
feat(reference-index): add morph-reference-index crate with MDBX stor…
panos-xyz Apr 30, 2026
b1dbc92
feat(rpc): wire morph_getTransactionHashesByReference RPC + ExEx
panos-xyz Apr 30, 2026
50654d2
chore(reference-index): fix clippy lints (collapsible_if, redundant_c…
panos-xyz Apr 30, 2026
470123b
chore: cargo fmt
panos-xyz Apr 30, 2026
f5fff3b
test(reference-index): add integration tests for backfill + query
panos-xyz Apr 30, 2026
eb1f34b
fix(reference-index): fix 5 adversarial review findings
panos-xyz Apr 30, 2026
6ce077a
fix(reference-index): fix 3 more confirmed bugs
panos-xyz Apr 30, 2026
d3ab7e4
fix(reference-index): first-ready ChainReverted must fill gap up to p…
panos-xyz Apr 30, 2026
6237a47
fix(reference-index): final sweep — reconcile None skip + monotonic F…
panos-xyz Apr 30, 2026
4afc286
fix(reference-index): InProgress+sentinel re-resolves Jade; RPC inter…
panos-xyz Apr 30, 2026
b6aa870
chore(reference-index): remove unused paired-snapshot validation
panos-xyz May 6, 2026
eb42e6c
chore(reference-index): remove unused pub methods and dead imports
panos-xyz May 6, 2026
3a2f977
chore(reference-index): simplify tracing targets, drop sleep, clean u…
panos-xyz May 7, 2026
a41b55b
Merge branch 'main' into feature/morph-reference-rpc
panos-xyz May 9, 2026
9182af6
fix(ci): satisfy clippy and cargo-deny on PR #106
panos-xyz May 9, 2026
90dd720
Merge branch 'main' into feature/morph-reference-rpc
panos-xyz May 9, 2026
a02d289
fix(ci): resolve cargo-deny advisories on PR #106
panos-xyz May 9, 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
56 changes: 42 additions & 14 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ members = [
"crates/payload/builder",
"crates/payload/types",
"crates/primitives",
"crates/reference-index",
"crates/revm",
"crates/txpool",
]
Expand Down Expand Up @@ -92,6 +93,7 @@ morph-node = { path = "crates/node"}
morph-payload-builder = { path = "crates/payload/builder", default-features = false }
morph-payload-types = { path = "crates/payload/types", default-features = false }
morph-primitives = { path = "crates/primitives", default-features = false }
morph-reference-index = { path = "crates/reference-index", default-features = false }
morph-rpc = { path = "crates/rpc" }
morph-revm = { path = "crates/revm", default-features = false }
morph-txpool = { path = "crates/txpool", default-features = false }
Expand All @@ -114,6 +116,9 @@ reth-engine-primitives = { git = "https://github.com/morph-l2/reth", rev = "1b07
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-exex = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-exex-test-utils = { git = "https://github.com/morph-l2/reth", rev = "1b0702546633c259306017717b2938f14adfe329" }
reth-exex-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" }
Expand Down
2 changes: 2 additions & 0 deletions bin/morph-reth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ morph-chainspec = { workspace = true, features = ["cli"] }
morph-consensus.workspace = true
morph-evm.workspace = true
morph-node.workspace = true
morph-reference-index.workspace = true

# Reth CLI
reth-chainspec.workspace = true
reth-cli.workspace = true
reth-cli-util.workspace = true
reth-ethereum-cli.workspace = true
Expand Down
35 changes: 33 additions & 2 deletions bin/morph-reth/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ use clap::Parser;
use morph_chainspec::{MorphChainSpec, MorphChainSpecParser};
use morph_consensus::MorphConsensus;
use morph_evm::{MorphEvmConfig, evm::MorphEvmFactory};
use morph_node::{MorphArgs, MorphNode};
use morph_node::{
MorphAddOns, MorphArgs, MorphNode,
exex::{ReferenceIndexControl, reference_index_exex},
};
use morph_reference_index::ReferenceIndexDb;
use reth_chainspec::EthChainSpec;
use reth_cli_util::sigsegv_handler;
use reth_ethereum_cli::Cli;
use reth_node_builder::Node;
use reth_rpc_server_types::DefaultRpcModuleValidator;
use std::sync::Arc;
use tracing::info;
Expand Down Expand Up @@ -43,8 +49,33 @@ fn main() {
.run_with_components::<MorphNode>(components, async move |builder, morph_args| {
info!(target: "morph::cli", "Starting Morph-Reth node");

// Open the reference index DB before launching the node so we
// can wire it into both the ExEx and the add-ons.
let chain_spec = builder.config().chain.clone();
let datadir = builder.config().datadir();
let reference_index_path = datadir.data_dir().join("morph").join("reference_index");
let chain_id = chain_spec.chain().id();
let genesis_hash = chain_spec.genesis_hash(); // from EthChainSpec trait

info!(
target: "morph::reference_index",
path = %reference_index_path.display(),
chain_id,
"opening Morph reference index database"
);
let db = ReferenceIndexDb::open(&reference_index_path, chain_id, genesis_hash)?;
let (control, startup_rx) = ReferenceIndexControl::new(db);

let exex_control = control.clone();
let node = MorphNode::new(morph_args);

let handle = builder
.node(MorphNode::new(morph_args))
.with_types::<MorphNode>()
.with_components(node.components_builder())
.with_add_ons(MorphAddOns::new().with_reference_index(control))
.install_exex("morph-reference-index", async move |ctx| {
Ok(reference_index_exex(ctx, exex_control, startup_rx))
})
.launch_with_debug_capabilities()
.await?;

Expand Down
16 changes: 10 additions & 6 deletions crates/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@ morph-evm.workspace = true
morph-payload-builder.workspace = true
morph-payload-types.workspace = true
morph-primitives = { workspace = true, features = ["reth-codec"] }
morph-reference-index.workspace = true
morph-rpc.workspace = true
morph-txpool.workspace = true

# Reth dependencies
reth-db.workspace = true
reth-db-api.workspace = true
reth-node-core.workspace = true
reth-chainspec.workspace = true
reth-engine-local.workspace = true
reth-engine-tree.workspace = true
reth-errors.workspace = true
reth-exex.workspace = true
reth-node-api.workspace = true
reth-node-builder.workspace = true
reth-node-ethereum.workspace = true
Expand All @@ -37,12 +40,15 @@ reth-primitives-traits.workspace = true
reth-provider.workspace = true
reth-rpc-builder.workspace = true
reth-rpc-eth-api.workspace = true
reth-storage-api.workspace = true
reth-tasks.workspace = true
reth-transaction-pool.workspace = true
reth-tracing.workspace = true
reth-trie.workspace = true

# Alloy
alloy-consensus.workspace = true
alloy-eips.workspace = true
alloy-genesis.workspace = true
alloy-hardforks.workspace = true
alloy-primitives.workspace = true
Expand All @@ -54,16 +60,15 @@ eyre.workspace = true
clap.workspace = true
dashmap.workspace = true
parking_lot.workspace = true
tokio = { workspace = true, features = ["sync", "rt"] }
tokio-stream.workspace = true
tracing.workspace = true

serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true

# Optional: E2E testing framework
reth-e2e-test-utils = { workspace = true, optional = true }
reth-tasks = { workspace = true, optional = true }
tokio = { workspace = true, features = ["sync"], optional = true }
alloy-eips = { workspace = true, optional = true }
alloy-rlp = { workspace = true, optional = true }
alloy-signer = { workspace = true, optional = true }
alloy-signer-local = { workspace = true, optional = true }
Expand All @@ -85,9 +90,11 @@ alloy-primitives.workspace = true
alloy-rpc-types-engine.workspace = true
alloy-rpc-types-eth.workspace = true
jsonrpsee.workspace = true
morph-chainspec.workspace = true
morph-payload-types.workspace = true
morph-primitives.workspace = true
serde_json.workspace = true
tempfile.workspace = true

[[test]]
name = "it"
Expand All @@ -98,10 +105,7 @@ required-features = ["test-utils"]
default = []
test-utils = [
"dep:reth-e2e-test-utils",
"dep:reth-tasks",
"dep:alloy-signer",
"dep:tokio",
"dep:alloy-eips",
"dep:alloy-rlp",
"dep:alloy-signer-local",
]
Loading
Loading