Skip to content

Bump reth to 1.4.1 #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 21, 2025
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,402 changes: 850 additions & 552 deletions Cargo.lock

Large diffs are not rendered by default.

152 changes: 76 additions & 76 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace.package]
version = "0.1.0"
edition = "2021"
rust-version = "1.85"
rust-version = "1.86"
license = "MIT OR Apache-2.0"
homepage = "https://github.com/flashbots/op-rbuilder"
repository = "https://github.com/flashbots/op-rbuilder"
Expand Down Expand Up @@ -40,105 +40,105 @@ codegen-units = 1
incremental = false

[workspace.dependencies]
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-trie-parallel = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12", features = [
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-trie-parallel = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1", features = [
"test-utils",
] }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-execution-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-execution-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }

# reth optimism
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-optimism-txpool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
reth-optimism-txpool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }

# compatible with reth "v1.3.12 dependencies
revm = { version = "22.0.1", features = [
# compatible with reth "v1.4.1 dependencies
revm = { version = "23.1.0", features = [
"std",
"secp256k1",
"optional_balance_check",
], default-features = false }
revm-inspectors = { version = "0.19.0", default-features = false }
op-revm = { version = "3.0.2", default-features = false }
revm-inspectors = { version = "0.22.0", default-features = false }
op-revm = { version = "4.0.2", default-features = false }

ethereum_ssz_derive = "0.9.0"
ethereum_ssz = "0.9.0"

alloy-primitives = { version = "1.0.0", default-features = false }
alloy-primitives = { version = "1.1.0", default-features = false }
alloy-rlp = "0.3.10"
alloy-chains = "0.2.0"
alloy-evm = { version = "0.5.0", default-features = false }
alloy-provider = { version = "0.14.0", features = ["ipc", "pubsub"] }
alloy-pubsub = { version = "0.14.0" }
alloy-eips = { version = "0.14.0" }
alloy-rpc-types = { version = "0.14.0" }
alloy-json-rpc = { version = "0.14.0" }
alloy-transport-http = { version = "0.14.0" }
alloy-network = { version = "0.14.0" }
alloy-network-primitives = { version = "0.14.0" }
alloy-transport = { version = "0.14.0" }
alloy-node-bindings = { version = "0.14.0" }
alloy-consensus = { version = "0.14.0", features = ["kzg"] }
alloy-serde = { version = "0.14.0" }
alloy-rpc-types-beacon = { version = "0.14.0", features = ["ssz"] }
alloy-rpc-types-engine = { version = "0.14.0", features = ["ssz"] }
alloy-rpc-types-eth = { version = "0.14.0" }
alloy-signer-local = { version = "0.14.0" }
alloy-rpc-client = { version = "0.14.0" }
alloy-genesis = { version = "0.14.0" }
alloy-evm = { version = "0.8.0", default-features = false }
alloy-provider = { version = "1.0.3", features = ["ipc", "pubsub"] }
alloy-pubsub = { version = "1.0.3" }
alloy-eips = { version = "1.0.3" }
alloy-rpc-types = { version = "1.0.3" }
alloy-json-rpc = { version = "1.0.3" }
alloy-transport-http = { version = "1.0.3" }
alloy-network = { version = "1.0.3" }
alloy-network-primitives = { version = "1.0.3" }
alloy-transport = { version = "1.0.3" }
alloy-node-bindings = { version = "1.0.3" }
alloy-consensus = { version = "1.0.3", features = ["kzg"] }
alloy-serde = { version = "1.0.3" }
alloy-rpc-types-beacon = { version = "1.0.3", features = ["ssz"] }
alloy-rpc-types-engine = { version = "1.0.3", features = ["ssz"] }
alloy-rpc-types-eth = { version = "1.0.3" }
alloy-signer-local = { version = "1.0.3" }
alloy-rpc-client = { version = "1.0.3" }
alloy-genesis = { version = "1.0.3" }
alloy-trie = { version = "0.8.1" }

# optimism
alloy-op-evm = { version = "0.5.0", default-features = false }
op-alloy-rpc-types = { version = "0.14.1", default-features = false }
op-alloy-rpc-types-engine = { version = "0.14.1", default-features = false }
op-alloy-rpc-jsonrpsee = { version = "0.14.1", default-features = false }
op-alloy-network = { version = "0.14.1", default-features = false }
op-alloy-consensus = { version = "0.14.1", default-features = false }
alloy-op-evm = { version = "0.8.0", default-features = false }
op-alloy-rpc-types = { version = "0.16.0", default-features = false }
op-alloy-rpc-types-engine = { version = "0.16.0", default-features = false }
op-alloy-rpc-jsonrpsee = { version = "0.16.0", default-features = false }
op-alloy-network = { version = "0.16.0", default-features = false }
op-alloy-consensus = { version = "0.16.0", default-features = false }

async-trait = { version = "0.1.83" }
clap = { version = "4.4.3", features = ["derive", "env"] }
clap_builder = { version = "4.5.19" }
thiserror = { version = "1.0.64" }
eyre = { version = "0.6.12" }
jsonrpsee = { version = "0.24.4" }
jsonrpsee-types = { version = "0.24.4" }
jsonrpsee = { version = "0.25.1" }
jsonrpsee-types = { version = "0.25.1" }
parking_lot = { version = "0.12.3" }
tokio = { version = "1.40.0" }
auto_impl = { version = "1.2.0" }
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ARG FEATURES
ARG RBUILDER_BIN="op-rbuilder"

FROM rust:1.85 AS base
FROM rust:1.86 AS base
ARG TARGETPLATFORM

RUN apt-get update \
Expand Down
6 changes: 3 additions & 3 deletions crates/op-rbuilder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ thiserror.workspace = true
parking_lot.workspace = true
url.workspace = true

tower = "0.4"
tower = "0.5"
futures = "0.3"
futures-util = "0.3.31"
time = { version = "0.3.36", features = ["macros", "formatting", "parsing"] }
Expand All @@ -97,8 +97,8 @@ shellexpand = "3.1"
serde_yaml = { version = "0.9" }


# `flashblocks` branch
rollup-boost = { git = "http://github.com/flashbots/rollup-boost", rev = "6945842487ac0b0021800589d1660ec9c20cf254" }
# `msozin/flashblocks-v1.4.1` branch based on `flashblocks-rebase`
rollup-boost = { git = "http://github.com/flashbots/rollup-boost", rev = "8506dfb7d84c65746f7c88d250983658438f59e8" }

[target.'cfg(unix)'.dependencies]
tikv-jemallocator = { version = "0.6", optional = true }
Expand Down
18 changes: 14 additions & 4 deletions crates/op-rbuilder/src/payload_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use reth_evm::{
Database, Evm, EvmError, InvalidTxError,
};
use reth_execution_types::ExecutionOutcome;
use reth_node_api::{NodePrimitives, NodeTypes, TxTy};
use reth_node_api::{NodePrimitives, NodeTypes, PrimitivesTy, TxTy};
use reth_optimism_chainspec::OpChainSpec;
use reth_optimism_consensus::{calculate_receipt_root_no_memo_optimism, isthmus};
use reth_optimism_evm::{OpEvmConfig, OpNextBlockEnvAttributes};
Expand Down Expand Up @@ -123,7 +123,7 @@ impl CustomOpPayloadBuilder {
}
}

impl<Node, Pool> PayloadBuilderBuilder<Node, Pool> for CustomOpPayloadBuilder
impl<Node, Pool, Evm> PayloadBuilderBuilder<Node, Pool, Evm> for CustomOpPayloadBuilder
where
Node: FullNodeTypes<
Types: NodeTypes<
Expand All @@ -135,13 +135,18 @@ where
Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<Node::Types>>>
+ Unpin
+ 'static,
Evm: ConfigureEvm<
Primitives = PrimitivesTy<Node::Types>,
NextBlockEnvCtx = OpNextBlockEnvAttributes,
> + 'static,
{
type PayloadBuilder = OpPayloadBuilder<Pool, Node::Provider>;

async fn build_payload_builder(
self,
ctx: &BuilderContext<Node>,
pool: Pool,
_evm_config: Evm,
) -> eyre::Result<Self::PayloadBuilder> {
Ok(OpPayloadBuilder::new(
OpEvmConfig::optimism(ctx.chain_spec()),
Expand All @@ -154,7 +159,7 @@ where
}
}

impl<Node, Pool> PayloadServiceBuilder<Node, Pool> for CustomOpPayloadBuilder
impl<Node, Pool, Evm> PayloadServiceBuilder<Node, Pool, Evm> for CustomOpPayloadBuilder
where
Node: FullNodeTypes<
Types: NodeTypes<
Expand All @@ -167,16 +172,21 @@ where
+ Unpin
+ 'static,
<Pool as TransactionPool>::Transaction: OpPooledTx,
Evm: ConfigureEvm<
Primitives = PrimitivesTy<Node::Types>,
NextBlockEnvCtx = OpNextBlockEnvAttributes,
> + 'static,
{
async fn spawn_payload_builder_service(
self,
ctx: &BuilderContext<Node>,
pool: Pool,
evm_config: Evm,
) -> eyre::Result<PayloadBuilderHandle<<Node::Types as NodeTypes>::Payload>> {
tracing::info!("Spawning a custom payload builder");
let extra_block_deadline = self.extra_block_deadline;
let enable_revert_protection = self.enable_revert_protection;
let payload_builder = self.build_payload_builder(ctx, pool).await?;
let payload_builder = self.build_payload_builder(ctx, pool, evm_config).await?;
let payload_job_config = BasicPayloadJobGeneratorConfig::default();

let payload_generator = BlockPayloadJobGenerator::with_builder(
Expand Down
18 changes: 14 additions & 4 deletions crates/op-rbuilder/src/payload_builder_vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use reth_evm::{
Database, Evm, EvmError, InvalidTxError,
};
use reth_execution_types::ExecutionOutcome;
use reth_node_api::{NodePrimitives, NodeTypes, TxTy};
use reth_node_api::{NodePrimitives, NodeTypes, PrimitivesTy, TxTy};
use reth_node_builder::components::BasicPayloadServiceBuilder;
use reth_optimism_chainspec::OpChainSpec;
use reth_optimism_consensus::{calculate_receipt_root_no_memo_optimism, isthmus};
Expand Down Expand Up @@ -128,7 +128,7 @@ impl CustomOpPayloadBuilder {
}
}

impl<Node, Pool> PayloadBuilderBuilder<Node, Pool> for CustomOpPayloadBuilder
impl<Node, Pool, Evm> PayloadBuilderBuilder<Node, Pool, Evm> for CustomOpPayloadBuilder
where
Node: FullNodeTypes<
Types: NodeTypes<
Expand All @@ -141,13 +141,18 @@ where
+ Unpin
+ 'static,
<Pool as TransactionPool>::Transaction: OpPooledTx,
Evm: ConfigureEvm<
Primitives = PrimitivesTy<Node::Types>,
NextBlockEnvCtx = OpNextBlockEnvAttributes,
> + 'static,
{
type PayloadBuilder = OpPayloadBuilderVanilla<Pool, Node::Provider>;

async fn build_payload_builder(
self,
ctx: &BuilderContext<Node>,
pool: Pool,
_evm_config: Evm,
) -> eyre::Result<Self::PayloadBuilder> {
Ok(OpPayloadBuilderVanilla::new(
OpEvmConfig::optimism(ctx.chain_spec()),
Expand All @@ -159,7 +164,7 @@ where
}
}

impl<Node, Pool> PayloadServiceBuilder<Node, Pool> for CustomOpPayloadBuilder
impl<Node, Pool, Evm> PayloadServiceBuilder<Node, Pool, Evm> for CustomOpPayloadBuilder
where
Node: FullNodeTypes<
Types: NodeTypes<
Expand All @@ -172,16 +177,21 @@ where
+ Unpin
+ 'static,
<Pool as TransactionPool>::Transaction: OpPooledTx,
Evm: ConfigureEvm<
Primitives = PrimitivesTy<Node::Types>,
NextBlockEnvCtx = OpNextBlockEnvAttributes,
> + 'static,
{
async fn spawn_payload_builder_service(
self,
ctx: &BuilderContext<Node>,
pool: Pool,
evm_config: Evm,
) -> eyre::Result<PayloadBuilderHandle<<Node::Types as NodeTypes>::Payload>> {
tracing::info!("Spawning a custom payload builder");
let extra_block_deadline = self.extra_block_deadline;
let enable_revert_protection = self.enable_revert_protection;
let payload_builder = self.build_payload_builder(ctx, pool).await?;
let payload_builder = self.build_payload_builder(ctx, pool, evm_config).await?;
let payload_job_config = BasicPayloadJobGeneratorConfig::default();

let payload_generator = BlockPayloadJobGenerator::with_builder(
Expand Down
Loading
Loading