Skip to content

Commit c7b2f6a

Browse files
authored
Bump reth to 1.4.1 (#54)
* Bump reth to 1.4.1 * Fix integration * Fix test * Fix merge conflict
1 parent 1254093 commit c7b2f6a

File tree

10 files changed

+981
-663
lines changed

10 files changed

+981
-663
lines changed

Cargo.lock

Lines changed: 850 additions & 552 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[workspace.package]
22
version = "0.1.0"
33
edition = "2021"
4-
rust-version = "1.85"
4+
rust-version = "1.86"
55
license = "MIT OR Apache-2.0"
66
homepage = "https://github.com/flashbots/op-rbuilder"
77
repository = "https://github.com/flashbots/op-rbuilder"
@@ -40,105 +40,105 @@ codegen-units = 1
4040
incremental = false
4141

4242
[workspace.dependencies]
43-
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
44-
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
45-
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
46-
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
47-
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
48-
reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
49-
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
50-
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
51-
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
52-
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
53-
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
54-
reth-trie-parallel = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
55-
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
56-
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
57-
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
58-
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
59-
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12", features = [
43+
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
44+
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
45+
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
46+
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
47+
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
48+
reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
49+
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
50+
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
51+
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
52+
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
53+
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
54+
reth-trie-parallel = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
55+
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
56+
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
57+
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
58+
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
59+
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1", features = [
6060
"test-utils",
6161
] }
62-
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
63-
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
64-
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
65-
reth-execution-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
66-
reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
67-
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
68-
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
69-
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
70-
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
71-
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
72-
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
73-
reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
74-
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
75-
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
76-
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
77-
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
78-
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
62+
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
63+
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
64+
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
65+
reth-execution-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
66+
reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
67+
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
68+
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
69+
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
70+
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
71+
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
72+
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
73+
reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
74+
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
75+
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
76+
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
77+
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
78+
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
7979

8080
# reth optimism
81-
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
82-
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
83-
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
84-
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
85-
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
86-
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
87-
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
88-
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
89-
reth-optimism-txpool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.3.12" }
81+
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
82+
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
83+
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
84+
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
85+
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
86+
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
87+
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
88+
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
89+
reth-optimism-txpool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.1" }
9090

91-
# compatible with reth "v1.3.12 dependencies
92-
revm = { version = "22.0.1", features = [
91+
# compatible with reth "v1.4.1 dependencies
92+
revm = { version = "23.1.0", features = [
9393
"std",
9494
"secp256k1",
9595
"optional_balance_check",
9696
], default-features = false }
97-
revm-inspectors = { version = "0.19.0", default-features = false }
98-
op-revm = { version = "3.0.2", default-features = false }
97+
revm-inspectors = { version = "0.22.0", default-features = false }
98+
op-revm = { version = "4.0.2", default-features = false }
9999

100100
ethereum_ssz_derive = "0.9.0"
101101
ethereum_ssz = "0.9.0"
102102

103-
alloy-primitives = { version = "1.0.0", default-features = false }
103+
alloy-primitives = { version = "1.1.0", default-features = false }
104104
alloy-rlp = "0.3.10"
105105
alloy-chains = "0.2.0"
106-
alloy-evm = { version = "0.5.0", default-features = false }
107-
alloy-provider = { version = "0.14.0", features = ["ipc", "pubsub"] }
108-
alloy-pubsub = { version = "0.14.0" }
109-
alloy-eips = { version = "0.14.0" }
110-
alloy-rpc-types = { version = "0.14.0" }
111-
alloy-json-rpc = { version = "0.14.0" }
112-
alloy-transport-http = { version = "0.14.0" }
113-
alloy-network = { version = "0.14.0" }
114-
alloy-network-primitives = { version = "0.14.0" }
115-
alloy-transport = { version = "0.14.0" }
116-
alloy-node-bindings = { version = "0.14.0" }
117-
alloy-consensus = { version = "0.14.0", features = ["kzg"] }
118-
alloy-serde = { version = "0.14.0" }
119-
alloy-rpc-types-beacon = { version = "0.14.0", features = ["ssz"] }
120-
alloy-rpc-types-engine = { version = "0.14.0", features = ["ssz"] }
121-
alloy-rpc-types-eth = { version = "0.14.0" }
122-
alloy-signer-local = { version = "0.14.0" }
123-
alloy-rpc-client = { version = "0.14.0" }
124-
alloy-genesis = { version = "0.14.0" }
106+
alloy-evm = { version = "0.8.0", default-features = false }
107+
alloy-provider = { version = "1.0.3", features = ["ipc", "pubsub"] }
108+
alloy-pubsub = { version = "1.0.3" }
109+
alloy-eips = { version = "1.0.3" }
110+
alloy-rpc-types = { version = "1.0.3" }
111+
alloy-json-rpc = { version = "1.0.3" }
112+
alloy-transport-http = { version = "1.0.3" }
113+
alloy-network = { version = "1.0.3" }
114+
alloy-network-primitives = { version = "1.0.3" }
115+
alloy-transport = { version = "1.0.3" }
116+
alloy-node-bindings = { version = "1.0.3" }
117+
alloy-consensus = { version = "1.0.3", features = ["kzg"] }
118+
alloy-serde = { version = "1.0.3" }
119+
alloy-rpc-types-beacon = { version = "1.0.3", features = ["ssz"] }
120+
alloy-rpc-types-engine = { version = "1.0.3", features = ["ssz"] }
121+
alloy-rpc-types-eth = { version = "1.0.3" }
122+
alloy-signer-local = { version = "1.0.3" }
123+
alloy-rpc-client = { version = "1.0.3" }
124+
alloy-genesis = { version = "1.0.3" }
125125
alloy-trie = { version = "0.8.1" }
126126

127127
# optimism
128-
alloy-op-evm = { version = "0.5.0", default-features = false }
129-
op-alloy-rpc-types = { version = "0.14.1", default-features = false }
130-
op-alloy-rpc-types-engine = { version = "0.14.1", default-features = false }
131-
op-alloy-rpc-jsonrpsee = { version = "0.14.1", default-features = false }
132-
op-alloy-network = { version = "0.14.1", default-features = false }
133-
op-alloy-consensus = { version = "0.14.1", default-features = false }
128+
alloy-op-evm = { version = "0.8.0", default-features = false }
129+
op-alloy-rpc-types = { version = "0.16.0", default-features = false }
130+
op-alloy-rpc-types-engine = { version = "0.16.0", default-features = false }
131+
op-alloy-rpc-jsonrpsee = { version = "0.16.0", default-features = false }
132+
op-alloy-network = { version = "0.16.0", default-features = false }
133+
op-alloy-consensus = { version = "0.16.0", default-features = false }
134134

135135
async-trait = { version = "0.1.83" }
136136
clap = { version = "4.4.3", features = ["derive", "env"] }
137137
clap_builder = { version = "4.5.19" }
138138
thiserror = { version = "1.0.64" }
139139
eyre = { version = "0.6.12" }
140-
jsonrpsee = { version = "0.24.4" }
141-
jsonrpsee-types = { version = "0.24.4" }
140+
jsonrpsee = { version = "0.25.1" }
141+
jsonrpsee-types = { version = "0.25.1" }
142142
parking_lot = { version = "0.12.3" }
143143
tokio = { version = "1.40.0" }
144144
auto_impl = { version = "1.2.0" }

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
ARG FEATURES
1010
ARG RBUILDER_BIN="op-rbuilder"
1111

12-
FROM rust:1.85 AS base
12+
FROM rust:1.86 AS base
1313
ARG TARGETPLATFORM
1414

1515
RUN apt-get update \

crates/op-rbuilder/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ thiserror.workspace = true
8484
parking_lot.workspace = true
8585
url.workspace = true
8686

87-
tower = "0.4"
87+
tower = "0.5"
8888
futures = "0.3"
8989
futures-util = "0.3.31"
9090
time = { version = "0.3.36", features = ["macros", "formatting", "parsing"] }
@@ -97,8 +97,8 @@ shellexpand = "3.1"
9797
serde_yaml = { version = "0.9" }
9898

9999

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

103103
[target.'cfg(unix)'.dependencies]
104104
tikv-jemallocator = { version = "0.6", optional = true }

crates/op-rbuilder/src/payload_builder.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use reth_evm::{
3131
Database, Evm, EvmError, InvalidTxError,
3232
};
3333
use reth_execution_types::ExecutionOutcome;
34-
use reth_node_api::{NodePrimitives, NodeTypes, TxTy};
34+
use reth_node_api::{NodePrimitives, NodeTypes, PrimitivesTy, TxTy};
3535
use reth_optimism_chainspec::OpChainSpec;
3636
use reth_optimism_consensus::{calculate_receipt_root_no_memo_optimism, isthmus};
3737
use reth_optimism_evm::{OpEvmConfig, OpNextBlockEnvAttributes};
@@ -123,7 +123,7 @@ impl CustomOpPayloadBuilder {
123123
}
124124
}
125125

126-
impl<Node, Pool> PayloadBuilderBuilder<Node, Pool> for CustomOpPayloadBuilder
126+
impl<Node, Pool, Evm> PayloadBuilderBuilder<Node, Pool, Evm> for CustomOpPayloadBuilder
127127
where
128128
Node: FullNodeTypes<
129129
Types: NodeTypes<
@@ -135,13 +135,18 @@ where
135135
Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<Node::Types>>>
136136
+ Unpin
137137
+ 'static,
138+
Evm: ConfigureEvm<
139+
Primitives = PrimitivesTy<Node::Types>,
140+
NextBlockEnvCtx = OpNextBlockEnvAttributes,
141+
> + 'static,
138142
{
139143
type PayloadBuilder = OpPayloadBuilder<Pool, Node::Provider>;
140144

141145
async fn build_payload_builder(
142146
self,
143147
ctx: &BuilderContext<Node>,
144148
pool: Pool,
149+
_evm_config: Evm,
145150
) -> eyre::Result<Self::PayloadBuilder> {
146151
Ok(OpPayloadBuilder::new(
147152
OpEvmConfig::optimism(ctx.chain_spec()),
@@ -154,7 +159,7 @@ where
154159
}
155160
}
156161

157-
impl<Node, Pool> PayloadServiceBuilder<Node, Pool> for CustomOpPayloadBuilder
162+
impl<Node, Pool, Evm> PayloadServiceBuilder<Node, Pool, Evm> for CustomOpPayloadBuilder
158163
where
159164
Node: FullNodeTypes<
160165
Types: NodeTypes<
@@ -167,16 +172,21 @@ where
167172
+ Unpin
168173
+ 'static,
169174
<Pool as TransactionPool>::Transaction: OpPooledTx,
175+
Evm: ConfigureEvm<
176+
Primitives = PrimitivesTy<Node::Types>,
177+
NextBlockEnvCtx = OpNextBlockEnvAttributes,
178+
> + 'static,
170179
{
171180
async fn spawn_payload_builder_service(
172181
self,
173182
ctx: &BuilderContext<Node>,
174183
pool: Pool,
184+
evm_config: Evm,
175185
) -> eyre::Result<PayloadBuilderHandle<<Node::Types as NodeTypes>::Payload>> {
176186
tracing::info!("Spawning a custom payload builder");
177187
let extra_block_deadline = self.extra_block_deadline;
178188
let enable_revert_protection = self.enable_revert_protection;
179-
let payload_builder = self.build_payload_builder(ctx, pool).await?;
189+
let payload_builder = self.build_payload_builder(ctx, pool, evm_config).await?;
180190
let payload_job_config = BasicPayloadJobGeneratorConfig::default();
181191

182192
let payload_generator = BlockPayloadJobGenerator::with_builder(

crates/op-rbuilder/src/payload_builder_vanilla.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use reth_evm::{
3535
Database, Evm, EvmError, InvalidTxError,
3636
};
3737
use reth_execution_types::ExecutionOutcome;
38-
use reth_node_api::{NodePrimitives, NodeTypes, TxTy};
38+
use reth_node_api::{NodePrimitives, NodeTypes, PrimitivesTy, TxTy};
3939
use reth_node_builder::components::BasicPayloadServiceBuilder;
4040
use reth_optimism_chainspec::OpChainSpec;
4141
use reth_optimism_consensus::{calculate_receipt_root_no_memo_optimism, isthmus};
@@ -128,7 +128,7 @@ impl CustomOpPayloadBuilder {
128128
}
129129
}
130130

131-
impl<Node, Pool> PayloadBuilderBuilder<Node, Pool> for CustomOpPayloadBuilder
131+
impl<Node, Pool, Evm> PayloadBuilderBuilder<Node, Pool, Evm> for CustomOpPayloadBuilder
132132
where
133133
Node: FullNodeTypes<
134134
Types: NodeTypes<
@@ -141,13 +141,18 @@ where
141141
+ Unpin
142142
+ 'static,
143143
<Pool as TransactionPool>::Transaction: OpPooledTx,
144+
Evm: ConfigureEvm<
145+
Primitives = PrimitivesTy<Node::Types>,
146+
NextBlockEnvCtx = OpNextBlockEnvAttributes,
147+
> + 'static,
144148
{
145149
type PayloadBuilder = OpPayloadBuilderVanilla<Pool, Node::Provider>;
146150

147151
async fn build_payload_builder(
148152
self,
149153
ctx: &BuilderContext<Node>,
150154
pool: Pool,
155+
_evm_config: Evm,
151156
) -> eyre::Result<Self::PayloadBuilder> {
152157
Ok(OpPayloadBuilderVanilla::new(
153158
OpEvmConfig::optimism(ctx.chain_spec()),
@@ -159,7 +164,7 @@ where
159164
}
160165
}
161166

162-
impl<Node, Pool> PayloadServiceBuilder<Node, Pool> for CustomOpPayloadBuilder
167+
impl<Node, Pool, Evm> PayloadServiceBuilder<Node, Pool, Evm> for CustomOpPayloadBuilder
163168
where
164169
Node: FullNodeTypes<
165170
Types: NodeTypes<
@@ -172,16 +177,21 @@ where
172177
+ Unpin
173178
+ 'static,
174179
<Pool as TransactionPool>::Transaction: OpPooledTx,
180+
Evm: ConfigureEvm<
181+
Primitives = PrimitivesTy<Node::Types>,
182+
NextBlockEnvCtx = OpNextBlockEnvAttributes,
183+
> + 'static,
175184
{
176185
async fn spawn_payload_builder_service(
177186
self,
178187
ctx: &BuilderContext<Node>,
179188
pool: Pool,
189+
evm_config: Evm,
180190
) -> eyre::Result<PayloadBuilderHandle<<Node::Types as NodeTypes>::Payload>> {
181191
tracing::info!("Spawning a custom payload builder");
182192
let extra_block_deadline = self.extra_block_deadline;
183193
let enable_revert_protection = self.enable_revert_protection;
184-
let payload_builder = self.build_payload_builder(ctx, pool).await?;
194+
let payload_builder = self.build_payload_builder(ctx, pool, evm_config).await?;
185195
let payload_job_config = BasicPayloadJobGeneratorConfig::default();
186196

187197
let payload_generator = BlockPayloadJobGenerator::with_builder(

0 commit comments

Comments
 (0)