Skip to content
Merged
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
212 changes: 106 additions & 106 deletions rust/Cargo.lock

Large diffs are not rendered by default.

146 changes: 73 additions & 73 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -364,79 +364,79 @@ reth-rpc-traits = { version = "0.8.1", default-features = false }
reth-zstd-compressors = { version = "0.8.1", default-features = false }

# ==================== RETH CRATES (git) ====================
reth = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-basic-payload-builder = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-chain-state = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-chainspec = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-cli = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-cli-commands = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-cli-runner = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-cli-util = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-consensus = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-consensus-common = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-db = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-db-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-db-common = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-downloaders = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-e2e-test-utils = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-engine-local = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-engine-primitives = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-engine-tree = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-errors = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-eth-wire = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-eth-wire-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-ethereum = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-ethereum-cli = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-ethereum-consensus = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-ethereum-forks = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-ethereum-primitives = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-evm = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-evm-ethereum = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-exex = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-exex-test-utils = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-execution-errors = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-execution-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-fs-util = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-ipc = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-metrics = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-network = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-network-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-network-peers = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-node-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-node-builder = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-node-core = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-node-ethereum = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-node-events = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-node-metrics = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-payload-builder = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-payload-builder-primitives = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-payload-primitives = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-payload-util = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-payload-validator = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-provider = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-prune = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-prune-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-revm = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-rpc = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-rpc-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-rpc-builder = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-rpc-engine-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-rpc-eth-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-rpc-eth-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-rpc-server-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-stages = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-stages-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-static-file = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-static-file-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-storage-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-storage-errors = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-storage-overlay = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-tasks = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-tracing = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-transaction-pool = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-trie = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth-trie-common = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0", default-features = false }
reth-trie-db = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-0" }
reth = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-basic-payload-builder = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-chain-state = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-chainspec = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-cli = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-cli-commands = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-cli-runner = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-cli-util = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-consensus = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-consensus-common = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-db = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-db-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-db-common = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-downloaders = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-e2e-test-utils = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-engine-local = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-engine-primitives = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-engine-tree = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-errors = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-eth-wire = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-eth-wire-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-ethereum = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-ethereum-cli = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-ethereum-consensus = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-ethereum-forks = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-ethereum-primitives = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-evm = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-evm-ethereum = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-exex = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-exex-test-utils = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-execution-errors = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-execution-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-fs-util = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-ipc = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-metrics = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-network = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-network-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-network-peers = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-node-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-node-builder = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-node-core = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-node-ethereum = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-node-events = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-node-metrics = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-payload-builder = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-payload-builder-primitives = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-payload-primitives = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-payload-util = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-payload-validator = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-provider = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-prune = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-prune-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-revm = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-rpc = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-rpc-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-rpc-builder = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-rpc-engine-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-rpc-eth-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-rpc-eth-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-rpc-server-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-stages = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-stages-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-static-file = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-static-file-types = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-storage-api = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-storage-errors = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-storage-overlay = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-tasks = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-tracing = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-transaction-pool = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-trie = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }
reth-trie-common = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1", default-features = false }
reth-trie-db = { git = "https://github.com/ethereum-optimism/reth", tag = "op-v2.7.0-1" }

# ==================== REVM (latest: op-reth versions) ====================
revm = { version = "43.0.3", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions rust/op-reth/crates/consensus/src/validation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use reth_optimism_forks::OpHardforks;
use reth_optimism_primitives::DepositReceipt;
use reth_primitives_traits::{BlockBody, GotExpected, receipt::gas_spent_by_transactions};

/// UPSTREAM-MIRROR(copy): reth@op-v2.7.0-0
/// UPSTREAM-MIRROR(copy): reth@op-v2.7.0-1
/// `reth_consensus_common::validation::validate_body_against_header`
///
/// Copies the generic body/header checks and replaces withdrawals-root handling after Isthmus.
Expand Down Expand Up @@ -86,7 +86,7 @@ where
Ok(())
}

/// UPSTREAM-MIRROR(copy): reth@op-v2.7.0-0
/// UPSTREAM-MIRROR(copy): reth@op-v2.7.0-1
/// `reth_ethereum_consensus::validation::validate_block_post_execution`
///
/// Copies upstream post-execution validation with OP receipt roots and Jovian DA accounting.
Expand Down Expand Up @@ -164,7 +164,7 @@ pub fn validate_block_post_execution<R: DepositReceipt>(
Ok(())
}

/// UPSTREAM-MIRROR(copy): reth@op-v2.7.0-0 `reth_ethereum_consensus::validation::verify_receipts`
/// UPSTREAM-MIRROR(copy): reth@op-v2.7.0-1 `reth_ethereum_consensus::validation::verify_receipts`
///
/// Copies the upstream helper, substituting OP receipt-root calculation.
/// Verify the calculated receipts root against the expected receipts root.
Expand Down
2 changes: 1 addition & 1 deletion rust/op-reth/crates/evm/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl<ChainSpec> OpBlockAssembler<ChainSpec> {
}

impl<ChainSpec: OpHardforks> OpBlockAssembler<ChainSpec> {
/// UPSTREAM-MIRROR(copy): reth@op-v2.7.0-0
/// UPSTREAM-MIRROR(copy): reth@op-v2.7.0-1
/// `reth_evm_ethereum::EthBlockAssembler::assemble_block`
///
/// Copies upstream block assembly with OP receipt roots, withdrawals, and DA fields.
Expand Down
35 changes: 30 additions & 5 deletions rust/op-reth/crates/evm/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct OpNextBlockEnvAttributes {
impl<H: alloy_consensus::BlockHeader> reth_rpc_eth_api::helpers::pending_block::BuildPendingEnv<H>
for OpNextBlockEnvAttributes
{
/// UPSTREAM-MIRROR(copy): reth@op-v2.7.0-0
/// UPSTREAM-MIRROR(copy): reth@op-v2.7.0-1
/// `reth_rpc_eth_api::helpers::pending_block::NextBlockEnvAttributes::build_pending_env`
///
/// Copies upstream pending-environment defaults for the OP attribute type, except that
Expand All @@ -35,17 +35,21 @@ impl<H: alloy_consensus::BlockHeader> reth_rpc_eth_api::helpers::pending_block::
block_overrides: Option<&alloy_rpc_types_eth::BlockOverrides>,
) -> Self {
let mut attributes = Self {
timestamp: parent.timestamp().saturating_add(12),
// The timestamp selects the hardfork rules, so it must be overridden before the EVM
// environment is derived from these attributes.
timestamp: block_overrides
.and_then(|overrides| overrides.time)
.unwrap_or_else(|| parent.timestamp().saturating_add(12)),
suggested_fee_recipient: parent.beneficiary(),
prev_randao: B256::random(),
gas_limit: parent.gas_limit(),
parent_beacon_block_root: parent.parent_beacon_block_root(),
extra_data: parent.extra_data().clone(),
};

// Only the beacon root override must be applied here: it is consumed during EVM
// environment construction. All other `BlockOverrides` fields are applied directly
// to the constructed environment by the caller, matching the upstream
// Besides the timestamp, only the beacon root override must be applied here: it is
// consumed during EVM environment construction. All other `BlockOverrides` fields are
// applied directly to the constructed environment by the caller, matching the upstream
// `NextBlockEnvAttributes::build_pending_env` behavior.
if attributes.parent_beacon_block_root.is_some() &&
let Some(beacon_root) = block_overrides.and_then(|overrides| overrides.beacon_root)
Expand All @@ -69,3 +73,24 @@ impl From<OpFlashblockPayloadBase> for OpNextBlockEnvAttributes {
}
}
}

#[cfg(all(test, feature = "rpc"))]
mod tests {
use super::OpNextBlockEnvAttributes;
use alloy_consensus::Header;
use alloy_rpc_types_eth::BlockOverrides;
use reth_primitives_traits::SealedHeader;
use reth_rpc_eth_api::helpers::pending_block::BuildPendingEnv;

#[test]
fn build_pending_env_takes_timestamp_from_block_overrides() {
let parent = SealedHeader::seal_slow(Header { timestamp: 1_000, ..Default::default() });

let overrides = BlockOverrides { time: Some(1_003), ..Default::default() };
let attributes = OpNextBlockEnvAttributes::build_pending_env(&parent, Some(&overrides));
assert_eq!(attributes.timestamp, 1_003);

let attributes = OpNextBlockEnvAttributes::build_pending_env(&parent, None);
assert_eq!(attributes.timestamp, 1_012);
}
}
Loading
Loading