Skip to content
Draft
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
2,882 changes: 1,453 additions & 1,429 deletions Cargo.lock

Large diffs are not rendered by default.

171 changes: 94 additions & 77 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,106 +43,106 @@ incremental = false
unreachable_pub = "warn"

[workspace.dependencies]
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-rpc-engine-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-trie-parallel = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1", features = [
reth = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-chain-state = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-cli = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-cli-commands = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-cli-util = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-db = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-db-common = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-errors = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-payload-builder = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-node-api = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-rpc-engine-api = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-node-ethereum = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-trie = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-trie-parallel = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-basic-payload-builder = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-node-core = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-primitives = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-primitives-traits = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-provider = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702", features = [
"test-utils",
] }

reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-execution-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-tracing-otlp = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-ipc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-chainspec = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-storage-api = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-rpc-api = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-evm = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-evm-ethereum = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-execution-errors = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-exex = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-tasks = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-metrics = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-trie-db = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-payload-primitives = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-transaction-pool = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-execution-types = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-revm = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-payload-builder-primitives = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-payload-util = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-rpc-layer = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-network-peers = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-testing-utils = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-node-builder = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-rpc-eth-types = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-tracing-otlp = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-ipc = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }

# reth optimism
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-optimism-txpool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1" }
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.1", features = [
reth-optimism-primitives = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-optimism-consensus = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-optimism-cli = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-optimism-forks = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-optimism-evm = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-optimism-node = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-optimism-payload-builder = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-optimism-chainspec = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-optimism-txpool = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702" }
reth-optimism-rpc = { git = "https://github.com/noot/reth", rev = "00d352d37c3f3ba7c23f370964b92cd13ce08702", features = [
"client",
] }

revm = { version = "29.0.1", features = [
revm = { version = "30.0", features = [
"std",
"secp256k1",
"optional_balance_check",
], default-features = false }
revm-inspectors = { version = "0.30.0", default-features = false }
op-revm = { version = "10.1.0", default-features = false }
op-revm = { version = "11.0.0", default-features = false }

ethereum_ssz_derive = "0.9.0"
ethereum_ssz = "0.9.0"

alloy-primitives = { version = "1.3.1", default-features = false }
alloy-rlp = "0.3.10"
alloy-chains = "0.2.5"
alloy-contract = { version = "1.0.35" }
alloy-evm = { version = "0.21.0", default-features = false }
alloy-provider = { version = "1.0.35", features = [
alloy-contract = { version = "1.0.37" }
alloy-evm = { version = "0.21.2", default-features = false }
alloy-provider = { version = "1.0.37", features = [
"ipc",
"pubsub",
"txpool-api",
"engine-api",
] }
alloy-pubsub = { version = "1.0.35" }
alloy-eips = { version = "1.0.35" }
alloy-rpc-types = { version = "1.0.35" }
alloy-json-rpc = { version = "1.0.35" }
alloy-transport-http = { version = "1.0.35" }
alloy-network = { version = "1.0.35" }
alloy-network-primitives = { version = "1.0.35" }
alloy-transport = { version = "1.0.35" }
alloy-node-bindings = { version = "1.0.35" }
alloy-consensus = { version = "1.0.35", features = ["kzg"] }
alloy-serde = { version = "1.0.35" }
alloy-pubsub = { version = "1.0.37" }
alloy-eips = { version = "1.0.37" }
alloy-rpc-types = { version = "1.0.37" }
alloy-json-rpc = { version = "1.0.37" }
alloy-transport-http = { version = "1.0.37" }
alloy-network = { version = "1.0.37" }
alloy-network-primitives = { version = "1.0.37" }
alloy-transport = { version = "1.0.37" }
alloy-node-bindings = { version = "1.0.37" }
alloy-consensus = { version = "1.0.37", features = ["kzg"] }
alloy-serde = { version = "1.0.37" }
alloy-sol-types = { version = "1.2.1", features = ["json"] }
alloy-rpc-types-beacon = { version = "1.0.35", features = ["ssz"] }
alloy-rpc-types-engine = { version = "1.0.35", features = ["ssz"] }
alloy-rpc-types-eth = { version = "1.0.35" }
alloy-signer-local = { version = "1.0.35" }
alloy-rpc-client = { version = "1.0.35" }
alloy-genesis = { version = "1.0.35" }
alloy-rpc-types-beacon = { version = "1.0.37", features = ["ssz"] }
alloy-rpc-types-engine = { version = "1.0.37", features = ["ssz"] }
alloy-rpc-types-eth = { version = "1.0.37" }
alloy-signer-local = { version = "1.0.37" }
alloy-rpc-client = { version = "1.0.37" }
alloy-genesis = { version = "1.0.37" }
alloy-trie = { version = "0.9.1" }

# optimism
Expand All @@ -166,16 +166,16 @@ parking_lot = { version = "0.12.3" }
tokio = { version = "1.40.0" }
auto_impl = { version = "1.2.0" }
reqwest = { version = "0.12.8" }
serde = { version = "1.0.210" }
serde_json = { version = "1.0.128" }
serde = { version = "1.0" }
serde_json = { version = "1.0" }
serde_with = { version = "3.8.1" }
secp256k1 = { version = "0.30" }
derive_more = { version = "2" }
tokio-stream = "0.1.16"
tokio-util = "0.7.12"
url = "2.5.2"
warp = "0.3.7"
flate2 = "1.0.35"
flate2 = "1.0.37"
prometheus = "0.13.4"
ctor = "0.2"
dashmap = "6.1"
Expand All @@ -192,3 +192,20 @@ time = { version = "0.3.36", features = ["macros", "formatting", "parsing"] }
vergen = "9.0.4"
vergen-git2 = "1.0.5"
opentelemetry = { version = "0.29.1", features = ["trace"] }

[patch.crates-io]
alloy-evm = { git = "https://github.com/noot/evm", rev = "f58c9c2e6397744939f8da9f0d5c4f0e5cd69d2e" }
alloy-op-evm = { git = "https://github.com/noot/evm", rev = "f58c9c2e6397744939f8da9f0d5c4f0e5cd69d2e" }
revm-inspectors = { git = "https://github.com/noot/revm-inspectors", rev = "84bcd1cb78c3c9dd84ad7a50a6a9e13333704598" }
revm = { git = "https://github.com/bluealloy/revm", rev = "a9b4ea798aba62bfc4ff869147d764f4467aecd4" }
op-revm = { git = "https://github.com/bluealloy/revm", rev = "a9b4ea798aba62bfc4ff869147d764f4467aecd4" }

revm-bytecode = { git = "https://github.com/bluealloy/revm", rev = "a9b4ea798aba62bfc4ff869147d764f4467aecd4" }
revm-database = { git = "https://github.com/bluealloy/revm", rev = "a9b4ea798aba62bfc4ff869147d764f4467aecd4" }
revm-state = { git = "https://github.com/bluealloy/revm", rev = "a9b4ea798aba62bfc4ff869147d764f4467aecd4" }
revm-primitives = { git = "https://github.com/bluealloy/revm", rev = "a9b4ea798aba62bfc4ff869147d764f4467aecd4" }
revm-interpreter = { git = "https://github.com/bluealloy/revm", rev = "a9b4ea798aba62bfc4ff869147d764f4467aecd4" }
revm-inspector = { git = "https://github.com/bluealloy/revm", rev = "a9b4ea798aba62bfc4ff869147d764f4467aecd4" }
revm-context = { git = "https://github.com/bluealloy/revm", rev = "a9b4ea798aba62bfc4ff869147d764f4467aecd4" }
revm-context-interface = { git = "https://github.com/bluealloy/revm", rev = "a9b4ea798aba62bfc4ff869147d764f4467aecd4" }
revm-database-interface = { git = "https://github.com/bluealloy/revm", rev = "a9b4ea798aba62bfc4ff869147d764f4467aecd4" }
2 changes: 1 addition & 1 deletion crates/op-rbuilder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ ureq = "2.10"
reqwest = "0.12.23"
k256 = "0.13.4"

rollup-boost = { git = "http://github.com/flashbots/rollup-boost", rev = "b86af43969557bee18f17ec1d6bcd3e984f910b2" }
rollup-boost = { git = "http://github.com/flashbots/rollup-boost", rev = "b5caff73878dbde5917a475201b8766affe22ce1" }

nanoid = { version = "0.4", optional = true }
reth-ipc = { workspace = true, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/op-rbuilder/src/args/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ pub struct FlashblocksArgs {

/// Port for the flashblocks p2p node
#[arg(
long = "flasblocks.p2p_port",
long = "flashblocks.p2p_port",
env = "FLASHBLOCK_P2P_PORT",
default_value = "9009"
)]
Expand Down
10 changes: 9 additions & 1 deletion crates/op-rbuilder/src/builders/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ pub struct OpPayloadBuilderCtx<ExtraCtx: Debug + Default = ()> {
}

impl<ExtraCtx: Debug + Default> OpPayloadBuilderCtx<ExtraCtx> {
pub(super) fn with_cancel(self, cancel: CancellationToken) -> Self {
Self { cancel, ..self }
}

pub(super) fn with_extra_ctx(self, extra_ctx: ExtraCtx) -> Self {
Self { extra_ctx, ..self }
}

/// Returns the parent block the payload will be build on.
pub(super) fn parent(&self) -> &SealedHeader {
&self.config.parent_header
Expand Down Expand Up @@ -330,7 +338,7 @@ impl<ExtraCtx: Debug + Default> OpPayloadBuilderCtx<ExtraCtx> {
let tx_da_limit = self.da_config.max_da_tx_size();
let mut evm = self.evm_config.evm_with_env(&mut *db, self.evm_env.clone());

info!(
debug!(
target: "payload_builder",
message = "Executing best transactions",
block_da_limit = ?block_da_limit,
Expand Down
75 changes: 75 additions & 0 deletions crates/op-rbuilder/src/builders/flashblocks/ctx.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
use crate::{
builders::{BuilderConfig, OpPayloadBuilderCtx, flashblocks::FlashblocksConfig},
gas_limiter::AddressGasLimiter,
metrics::OpRBuilderMetrics,
traits::ClientBounds,
};
use op_revm::OpSpecId;
use reth_basic_payload_builder::PayloadConfig;
use reth_evm::EvmEnv;
use reth_optimism_chainspec::OpChainSpec;
use reth_optimism_evm::{OpEvmConfig, OpNextBlockEnvAttributes};
use reth_optimism_payload_builder::{OpPayloadBuilderAttributes, config::OpDAConfig};
use reth_optimism_primitives::OpTransactionSigned;
use std::sync::Arc;
use tokio_util::sync::CancellationToken;

#[derive(Debug, Clone)]
pub(super) struct OpPayloadSyncerCtx {
/// The type that knows how to perform system calls and configure the evm.
evm_config: OpEvmConfig,
/// The DA config for the payload builder
da_config: OpDAConfig,
/// The chainspec
chain_spec: Arc<OpChainSpec>,
/// Max gas that can be used by a transaction.
max_gas_per_txn: Option<u64>,
}

impl OpPayloadSyncerCtx {
pub(super) fn new<Client>(
client: &Client,
builder_config: BuilderConfig<FlashblocksConfig>,
evm_config: OpEvmConfig,
) -> eyre::Result<Self>
where
Client: ClientBounds,
{
let chain_spec = client.chain_spec();
Ok(Self {
evm_config,
da_config: builder_config.da_config.clone(),
chain_spec,
max_gas_per_txn: builder_config.max_gas_per_txn,
})
}

pub(super) fn evm_config(&self) -> &OpEvmConfig {
&self.evm_config
}

pub(super) fn into_op_payload_builder_ctx(
self,
payload_config: PayloadConfig<OpPayloadBuilderAttributes<OpTransactionSigned>>,
evm_env: EvmEnv<OpSpecId>,
block_env_attributes: OpNextBlockEnvAttributes,
cancel: CancellationToken,
metrics: Arc<OpRBuilderMetrics>,
address_gas_limiter: AddressGasLimiter,
) -> OpPayloadBuilderCtx {
OpPayloadBuilderCtx {
evm_config: self.evm_config,
da_config: self.da_config,
chain_spec: self.chain_spec,
config: payload_config,
evm_env,
block_env_attributes,
cancel,
builder_signer: None,
metrics,
extra_ctx: (),
max_gas_per_txn: self.max_gas_per_txn,
address_gas_limiter,
}
}
}
1 change: 1 addition & 0 deletions crates/op-rbuilder/src/builders/flashblocks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use service::FlashblocksServiceBuilder;
mod best_txs;
mod builder_tx;
mod config;
mod ctx;
mod p2p;
mod payload;
mod payload_handler;
Expand Down
Loading
Loading