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
1,669 changes: 876 additions & 793 deletions Cargo.lock

Large diffs are not rendered by default.

148 changes: 80 additions & 68 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,74 +56,86 @@ unused_async = "warn"

[workspace.dependencies]
# reth
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-execution-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-ipc = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-primitives = { package = "reth-ethereum-primitives", git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-primitives-traits = { version = "0.4.1", default-features = false }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0", features = ["test-utils"] }
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-tracing-otlp = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v2.3.0" }

# op-reth (moved to ethereum-optimism/optimism repo)
reth-optimism-chainspec = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0", default-features = false }
reth-optimism-cli = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0", default-features = false }
reth-optimism-consensus = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0", default-features = false }
reth-optimism-evm = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0", default-features = false }
reth-optimism-forks = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0", default-features = false }
reth-optimism-node = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0" }
reth-optimism-payload-builder = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0" }
reth-optimism-primitives = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0", default-features = false }
reth-optimism-rpc = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0", features = ["client"] }
reth-optimism-txpool = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0" }
# Rev must match op-reth's reth pin (see rust/Cargo.toml in ethereum-optimism/optimism)
# v2.4.x adds "jit" (revmc/LLVM) and "gmp" to reth's defaults; keep the v2.3.0
# default set to avoid native LLVM/GMP build requirements.
reth = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d", default-features = false, features = [
"jemalloc",
"otlp",
"otlp-logs",
"js-tracer",
"keccak-cache-global",
"asm-keccak",
"min-trace-logs",
] }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-cli = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-db = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-execution-errors = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-ipc = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-primitives = { package = "reth-ethereum-primitives", git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-primitives-traits = { version = "0.5.0", default-features = false }
reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d", features = ["test-utils"] }
# "portable" was previously enabled through reth's default features
reth-revm = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d", features = ["portable"] }
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-tracing-otlp = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", rev = "f2eecc65482af4085e43eedb27a32024bf177a0d" }

# op-reth (ethereum-optimism/optimism)
reth-optimism-chainspec = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1", default-features = false }
reth-optimism-cli = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1", default-features = false }
reth-optimism-consensus = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1", default-features = false }
reth-optimism-evm = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1", default-features = false }
reth-optimism-forks = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1", default-features = false }
reth-optimism-node = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1" }
reth-optimism-payload-builder = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1" }
reth-optimism-primitives = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1", default-features = false }
reth-optimism-rpc = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1", features = ["client"] }
reth-optimism-txpool = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1" }

# revm
revm = { version = "40.0.3", features = ["std", "secp256k1", "optional_balance_check"], default-features = false }
revm = { version = "41.0.0", features = ["std", "secp256k1", "optional_balance_check"], default-features = false }
op-revm = { version = "20.0.0", default-features = false }

# alloy
alloy-consensus = { version = "2.0.5", features = ["kzg"] }
alloy-contract = { version = "2.0.5" }
alloy-eips = { version = "2.0.5" }
alloy-evm = { version = "0.36.0", default-features = false }
alloy-json-rpc = { version = "2.0.5" }
alloy-network = { version = "2.0.5" }
alloy-consensus = { version = "2.1.1", features = ["kzg"] }
alloy-contract = { version = "2.1.1" }
alloy-eips = { version = "2.1.1" }
alloy-evm = { version = "0.37.0", default-features = false }
alloy-json-rpc = { version = "2.1.1" }
alloy-network = { version = "2.1.1" }
Comment thread
julio4 marked this conversation as resolved.
alloy-primitives = { version = "1.6.0", default-features = false, features = ["map-foldhash"] }
alloy-provider = { version = "2.0.5", features = ["ipc", "pubsub", "txpool-api", "engine-api"] }
alloy-provider = { version = "2.1.1", features = ["ipc", "pubsub", "txpool-api", "engine-api"] }
alloy-rlp = "0.3.13"
alloy-rpc-types = { version = "2.0.5" }
alloy-rpc-types-engine = { version = "2.0.5", features = ["ssz"] }
alloy-rpc-types-eth = { version = "2.0.5" }
alloy-serde = { version = "2.0.5" }
alloy-signer-local = { version = "2.0.5" }
alloy-rpc-types = { version = "2.1.1" }
alloy-rpc-types-engine = { version = "2.1.1", features = ["ssz"] }
alloy-rpc-types-eth = { version = "2.1.1" }
alloy-serde = { version = "2.1.1" }
alloy-signer-local = { version = "2.1.1" }
alloy-sol-types = { version = "1.6.0", features = ["json"] }
alloy-transport = { version = "2.0.5" }
alloy-transport = { version = "2.1.1" }

# op-alloy
alloy-op-evm = { version = "0.32.0", default-features = false }
Expand Down Expand Up @@ -206,11 +218,11 @@ tdx = { git = "https://github.com/automata-network/tdx-attestation-sdk.git", fea
# Unify op-alloy/alloy-op crates so crates.io transitive deps resolve to the same
# git versions used by the ethereum-optimism/optimism repo.
[patch.crates-io]
op-revm = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0" }
op-alloy-consensus = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0" }
op-alloy-rpc-types = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0" }
op-alloy-rpc-types-engine = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0" }
op-alloy-rpc-jsonrpsee = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0" }
op-alloy-network = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0" }
alloy-op-evm = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0" }
alloy-op-hardforks = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.0" }
op-revm = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1" }
op-alloy-consensus = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1" }
op-alloy-rpc-types = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1" }
op-alloy-rpc-types-engine = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1" }
op-alloy-rpc-jsonrpsee = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1" }
op-alloy-network = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1" }
alloy-op-evm = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1" }
alloy-op-hardforks = { git = "https://github.com/ethereum-optimism/optimism", tag = "op-reth/v2.4.1" }
14 changes: 7 additions & 7 deletions crates/op-rbuilder/benches/bench_build_candidate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use op_rbuilder::{
};
use rand::{Rng, SeedableRng, rngs::StdRng};
use reth_basic_payload_builder::PayloadConfig;
use reth_chainspec::MAINNET;
use reth_chainspec::{EthChainSpec, MAINNET};
use reth_db::{tables, transaction::DbTxMut};
use reth_optimism_chainspec::OpChainSpecBuilder;
use reth_optimism_node::OpPayloadBuilderAttributes;
Expand All @@ -54,7 +54,6 @@ use reth_transaction_pool::PoolTransaction;
use reth_trie::HashedPostState;

const SEED: u64 = 0x5eed_f1a5_b10c;
const CHAIN_ID: u64 = 8453;
const BASE_FEE: u64 = 1_000_000_000;
const BLOCK_GAS_LIMIT: u64 = 30_000_000;
const MAX_TXS: usize = 200;
Expand Down Expand Up @@ -107,13 +106,14 @@ struct BenchFixture {
impl BenchFixture {
fn new() -> Self {
let chain_spec = Arc::new(
OpChainSpecBuilder::base_mainnet()
OpChainSpecBuilder::optimism_mainnet()
.jovian_activated()
.build(),
);
Comment thread
julio4 marked this conversation as resolved.
let (mut signers, mut transactions) = generate_transactions(SEED);
let chain_id = chain_spec.chain_id();
let (mut signers, mut transactions) = generate_transactions(SEED, chain_id);
let (warm_signers, mut warm_transactions) =
generate_transactions(SEED ^ 0xa11c_e5e5_cac4_ebad);
generate_transactions(SEED ^ 0xa11c_e5e5_cac4_ebad, chain_id);
signers.extend(warm_signers);
// Priority fee descends with generation index, so pool ordering preserves the scenario
// layout that the disposition/nonce assertions below rely on.
Expand Down Expand Up @@ -380,7 +380,7 @@ fn transaction_disposition(index: usize) -> TransactionDisposition {
}
}

fn generate_transactions(seed: u64) -> (Vec<Signer>, Vec<FBPooledTransaction>) {
fn generate_transactions(seed: u64, chain_id: u64) -> (Vec<Signer>, Vec<FBPooledTransaction>) {
let mut rng = StdRng::seed_from_u64(seed);
let mut signers = Vec::with_capacity(MAX_TXS);
let mut signer_nonces = Vec::with_capacity(MAX_TXS);
Expand Down Expand Up @@ -443,7 +443,7 @@ fn generate_transactions(seed: u64) -> (Vec<Signer>, Vec<FBPooledTransaction>) {
)
};
let tx = TxEip1559 {
chain_id: CHAIN_ID,
chain_id,
nonce,
gas_limit,
max_fee_per_gas: BASE_FEE as u128 + priority_fee,
Expand Down
3 changes: 3 additions & 0 deletions crates/op-rbuilder/src/builder/assembly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ impl BlockAssemblyInput {
execution_output: Arc::new(execution_output),
trie_updates,
hashed_state: Arc::new(hashed_state),
changed_paths: None,
};
debug!(
target: "payload_builder",
Expand Down Expand Up @@ -529,6 +530,8 @@ impl BlockAssemblyInput {
withdrawals: self.withdrawals.clone().unwrap_or_default().to_vec(),
withdrawals_root: derived_block_artifacts.withdrawals_root.unwrap_or_default(),
blob_gas_used,
// This builder does not produce SDM post-exec transactions
post_exec_tx: None,
},
metadata,
};
Expand Down
1 change: 1 addition & 0 deletions crates/op-rbuilder/src/builder/fanout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ mod tests {
withdrawals: Vec::new(),
withdrawals_root: B256::ZERO,
blob_gas_used: None,
post_exec_tx: None,
},
metadata: OpFlashblockPayloadMetadata {
block_number: index,
Expand Down
2 changes: 2 additions & 0 deletions crates/op-rbuilder/src/builder/wspub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ mod golden_wire {
"8888888888888888888888888888888888888888888888888888888888888888"
),
blob_gas_used: Some(0),
post_exec_tx: None,
},
metadata: OpFlashblockPayloadMetadata {
block_number: 100,
Expand Down Expand Up @@ -443,6 +444,7 @@ mod golden_wire {
"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
),
blob_gas_used: None,
post_exec_tx: None,
},
metadata: OpFlashblockPayloadMetadata {
block_number: 100,
Expand Down
3 changes: 3 additions & 0 deletions crates/op-rbuilder/src/flashtestations/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ pub struct FlashtestationsArgs {
pub flashtestations_enabled: bool,

/// Whether to use the debug HTTP service for quotes
// Explicit `id` avoids clap argument-name collision: as of reth v2.4.x,
// the flattened `JitArgs` also defines a field named `debug` (`--jit.debug`)
#[arg(
id = "flashtestations_debug",
long = "flashtestations.debug",
default_value = "false",
env = "FLASHTESTATIONS_DEBUG"
Expand Down
4 changes: 4 additions & 0 deletions crates/op-rbuilder/src/pool/delegate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ impl<P: TransactionPool<Transaction = FBPooledTransaction> + 'static> Transactio
versioned_hashes: &[B256],
indices_bitarray: B128,
) -> Result<Vec<Option<BlobCellsAndProofsV1>>, BlobStoreError>;
fn has_blobs_for_versioned_hashes(
&self,
versioned_hashes: &[B256],
) -> Result<Vec<bool>, BlobStoreError>;
fn blob_store(&self) -> Box<dyn BlobStore>;
}
}
Expand Down
Loading