Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,182 changes: 605 additions & 577 deletions Cargo.lock

Large diffs are not rendered by default.

152 changes: 80 additions & 72 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,86 +54,86 @@ 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 = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-chain-state = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-chainspec = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-cli = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-cli-commands = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-cli-util = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-codecs = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-codecs-derive = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-consensus = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-consensus-common = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-db = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-db-api = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-e2e-test-utils = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-engine-local = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-engine-primitives = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-engine-tree = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-errors = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-eth-wire-types = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-ethereum = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-ethereum-cli = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-ethereum-consensus = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-ethereum-engine-primitives = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-ethereum-primitives = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1", default-features = false }
reth-evm = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-evm-ethereum = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-execution-types = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-metrics = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-network-peers = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-node-api = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-node-builder = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-node-core = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-node-ethereum = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-node-metrics = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-payload-builder = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-payload-primitives = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-payload-util = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-primitives-traits = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1", default-features = false }
reth-provider = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-rpc = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-rpc-api = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-rpc-builder = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-rpc-convert = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-rpc-eth-api = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-rpc-eth-types = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-rpc-server-types = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-storage-api = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-tasks = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-tracing = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-trie = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-transaction-pool = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1" }
reth-zstd-compressors = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1", default-features = false }
reth-basic-payload-builder = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-chain-state = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-chainspec = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-cli = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-cli-commands = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-cli-util = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-codecs = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-codecs-derive = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-consensus = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-consensus-common = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-db = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-db-api = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-e2e-test-utils = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-engine-local = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-engine-primitives = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-engine-tree = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-errors = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-eth-wire-types = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-ethereum = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-ethereum-cli = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-ethereum-consensus = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-ethereum-engine-primitives = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-ethereum-primitives = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e", default-features = false }
reth-evm = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-evm-ethereum = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-execution-types = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-metrics = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-network-peers = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-node-api = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-node-builder = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-node-core = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-node-ethereum = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-node-metrics = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-payload-builder = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-payload-primitives = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-payload-util = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-primitives-traits = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e", default-features = false }
reth-provider = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-rpc = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-rpc-api = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-rpc-builder = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-rpc-convert = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-rpc-eth-api = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-rpc-eth-types = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-rpc-server-types = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-storage-api = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-tasks = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-tracing = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-trie = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-transaction-pool = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e" }
reth-zstd-compressors = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e", default-features = false }

reth-revm = { git = "https://github.com/morph-l2/reth", rev = "8057627ac9f169a0da4de44b616006a9e30382c1", features = [
reth-revm = { git = "https://github.com/morph-l2/reth", rev = "1dd722773844d1a3c50a691dc09f6cdf8e6bd00e", features = [
"std",
"optional-checks",
] }
revm = { version = "34.0.0", features = [
revm = { version = "33.1.0", features = [
"optional_fee_charge",
"optional_eip7623",
], default-features = false }

alloy = { version = "1.6.3", default-features = false }
alloy-consensus = { version = "1.6.3", default-features = false }
alloy-contract = { version = "1.6.3", default-features = false }
alloy-eips = { version = "1.6.3", default-features = false }
alloy-evm = "0.26.4"
alloy-genesis = "1.6.3"
alloy-hardforks = "0.4.7"
alloy-network = { version = "1.6.3", default-features = false }
alloy-primitives = { version = "1.5.6", default-features = false }
alloy-provider = { version = "1.6.3", default-features = false }
alloy-rlp = "0.3.13"
alloy-rpc-types-engine = "1.6.3"
alloy-rpc-types-eth = { version = "1.6.3" }
alloy-serde = "1.6.3"
alloy-signer = "1.6.3"
alloy-signer-local = "1.6.3"
alloy-sol-types = "1.5.6"
alloy-transport = "1.6.3"
alloy-chains = { version = "0.2.30", 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-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 }
arbitrary = { version = "1.3", features = ["derive"] }
async-lock = "3.4.1"
async-trait = "0.1"
Expand Down Expand Up @@ -179,3 +179,11 @@ criterion = "0.7.0"
test-case = "3"
pyroscope = "0.5.8"
pyroscope_pprofrs = "0.2.10"

# vergen 9.1.0 switched to vergen-lib 9.x, breaking vergen-git2 1.x (which uses vergen-lib 0.x).
# Pin vergen + vergen-lib to 9.0.6 so vergen and vergen-git2 share the same vergen-lib 0.1.6 instance.
[patch.crates-io]
vergen = { git = "https://github.com/rustyhorde/vergen", rev = "a43c276d2b68d05832a429cc4540755541ca4950" }
vergen-lib = { git = "https://github.com/rustyhorde/vergen", rev = "a43c276d2b68d05832a429cc4540755541ca4950" }


33 changes: 3 additions & 30 deletions crates/consensus/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use alloy_evm::block::BlockExecutionResult;
use alloy_primitives::{B256, Bloom};
use morph_chainspec::MorphChainSpec;
use morph_primitives::{Block, BlockBody, MorphHeader, MorphReceipt, MorphTxEnvelope};
use reth_consensus::{Consensus, ConsensusError, FullConsensus, HeaderValidator, ReceiptRootBloom};
use reth_consensus::{Consensus, ConsensusError, FullConsensus, HeaderValidator};
use reth_consensus_common::validation::{
validate_against_parent_hash_number, validate_body_against_header,
};
Expand Down Expand Up @@ -291,14 +291,10 @@ impl FullConsensus<morph_primitives::MorphPrimitives> for MorphConsensus {
/// 2. **Receipts Root**: The computed receipts root must match the header's.
/// 3. **Logs Bloom**: The combined bloom filter of all receipts must match
/// the header's `logs_bloom` field.
///
/// If `receipt_root_bloom` is provided, the implementation uses the pre-computed
/// receipt root and logs bloom instead of computing them from the receipts.
fn validate_block_post_execution(
&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 @@ -319,31 +315,8 @@ impl FullConsensus<morph_primitives::MorphPrimitives> for MorphConsensus {
});
}

// If pre-computed receipt root and logs bloom are provided, use them directly
if let Some((receipts_root, logs_bloom)) = receipt_root_bloom {
if receipts_root != block.receipts_root() {
return Err(ConsensusError::BodyReceiptRootDiff(
GotExpected {
got: receipts_root,
expected: block.receipts_root(),
}
.into(),
));
}

if logs_bloom != block.logs_bloom() {
return Err(ConsensusError::BodyBloomLogDiff(
GotExpected {
got: logs_bloom,
expected: block.logs_bloom(),
}
.into(),
));
}
} else {
// Verify the receipts logs bloom and root
verify_receipts(block.receipts_root(), block.logs_bloom(), &result.receipts)?;
}
// Verify the receipts logs bloom and root
verify_receipts(block.receipts_root(), block.logs_bloom(), &result.receipts)?;

Ok(())
}
Expand Down
4 changes: 0 additions & 4 deletions crates/evm/src/block/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,4 @@ where
fn evm(&self) -> &Self::Evm {
&self.evm
}

fn receipts(&self) -> &[Self::Receipt] {
&self.receipts
}
}
10 changes: 4 additions & 6 deletions crates/evm/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ impl ConfigureEvm for MorphEvmConfig {

let mut cfg_env = CfgEnv::<MorphHardfork>::default()
.with_chain_id(self.chain_spec().chain().id())
.with_spec_and_mainnet_gas_params(spec)
.with_disable_eip7623(true);
.with_spec(spec);
cfg_env.disable_eip7623 = true;

// Disable EIP-7825 transaction gas limit cap
// Morph allows transactions with gas limit > 16777216 (EIP-7825 cap)
Expand Down Expand Up @@ -83,8 +83,8 @@ impl ConfigureEvm for MorphEvmConfig {

let mut cfg_env = CfgEnv::<MorphHardfork>::default()
.with_chain_id(self.chain_spec().chain().id())
.with_spec_and_mainnet_gas_params(spec)
.with_disable_eip7623(true);
.with_spec(spec);
cfg_env.disable_eip7623 = true;

// Disable EIP-7825 transaction gas limit cap
// Morph allows transactions with gas limit > 16777216 (EIP-7825 cap)
Expand Down Expand Up @@ -127,7 +127,6 @@ impl ConfigureEvm for MorphEvmConfig {
block: &'a SealedBlock<Block>,
) -> Result<EthBlockExecutionCtx<'a>, Self::Error> {
Ok(EthBlockExecutionCtx {
tx_count_hint: Some(block.body().transactions.len()),
parent_hash: block.header().parent_hash(),
parent_beacon_block_root: block.header().parent_beacon_block_root(),
ommers: &[],
Expand All @@ -142,7 +141,6 @@ impl ConfigureEvm for MorphEvmConfig {
attributes: Self::NextBlockEnvCtx,
) -> Result<EthBlockExecutionCtx<'_>, Self::Error> {
Ok(EthBlockExecutionCtx {
tx_count_hint: None,
parent_hash: parent.hash(),
parent_beacon_block_root: attributes.parent_beacon_block_root,
ommers: &[],
Expand Down
7 changes: 1 addition & 6 deletions crates/node/src/add_ons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,7 @@ where
{
/// Creates a new [`MorphAddOns`] with default configuration.
pub fn new() -> Self {
Self::with_geth_rpc_url(None)
}

/// Creates a new [`MorphAddOns`] with an optional geth RPC URL for state root validation.
pub fn with_geth_rpc_url(geth_rpc_url: Option<String>) -> Self {
let pvb = MorphEngineValidatorBuilder::default().with_geth_rpc_url(geth_rpc_url);
let pvb = MorphEngineValidatorBuilder::default();
Self {
inner: RpcAddOns::new(
MorphEthApiBuilder::default(),
Expand Down
Loading
Loading