Skip to content

Commit 5dea87c

Browse files
authored
Chore: bump reth 1.8, rust 1.90 (#24)
* chore: bump versions * fix: make OneStep::run return Pin future
1 parent 2f54ec3 commit 5dea87c

File tree

18 files changed

+262
-215
lines changed

18 files changed

+262
-215
lines changed

Cargo.toml

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[workspace]
22
members = [
3-
".", # The main rblib library
4-
"src/pipelines/macros",
5-
"src/test_utils/macros",
3+
".", # The main rblib library
4+
"src/pipelines/macros",
5+
"src/test_utils/macros",
66
]
77
resolver = "2"
88

99
[workspace.package]
1010
version = "0.3.1"
1111
edition = "2024"
12-
rust-version = "1.87"
12+
rust-version = "1.90"
1313
license = "MIT"
1414
homepage = "https://github.com/flashbots/rblib"
1515
repository = "https://github.com/flashbots/rblib"
@@ -52,41 +52,41 @@ doctest = false
5252
default = ["optimism", "jemalloc"]
5353

5454
jemalloc = [
55-
"dep:tikv-jemallocator",
56-
"reth-origin/jemalloc",
57-
"reth-optimism-cli?/jemalloc",
55+
"dep:tikv-jemallocator",
56+
"reth-origin/jemalloc",
57+
"reth-optimism-cli?/jemalloc",
5858
]
5959

6060
jemalloc-prof = [
61-
"jemalloc",
62-
"tikv-jemallocator?/profiling",
63-
"reth-origin/jemalloc-prof",
61+
"jemalloc",
62+
"tikv-jemallocator?/profiling",
63+
"reth-origin/jemalloc-prof",
6464
]
6565

6666
optimism = [
67-
"op-alloy",
68-
"reth-optimism-node",
69-
"reth-optimism-chainspec",
70-
"reth-optimism-forks",
71-
"reth-optimism-primitives",
72-
"reth-node-builder/op",
73-
"reth-payload-util",
74-
"reth-optimism-cli",
75-
"rblib-tests-macros?/optimism",
67+
"op-alloy",
68+
"reth-optimism-node",
69+
"reth-optimism-chainspec",
70+
"reth-optimism-forks",
71+
"reth-optimism-primitives",
72+
"reth-node-builder/op",
73+
"reth-payload-util",
74+
"reth-optimism-cli",
75+
"rblib-tests-macros?/optimism",
7676
]
7777

7878
test-utils = [
79-
"nanoid",
80-
"tokio/full",
81-
"alloy-genesis",
82-
"rand",
83-
"reth-ipc",
84-
"reth-ethereum/test-utils",
85-
"reth-optimism-rpc/client",
86-
"rblib-tests-macros",
87-
"jsonrpsee-core",
88-
"tracing-subscriber",
89-
"ctor",
79+
"nanoid",
80+
"tokio/full",
81+
"alloy-genesis",
82+
"rand",
83+
"reth-ipc",
84+
"reth-ethereum/test-utils",
85+
"reth-optimism-rpc/client",
86+
"rblib-tests-macros",
87+
"jsonrpsee-core",
88+
"tracing-subscriber",
89+
"ctor",
9090
]
9191

9292
long-pipelines-syntax = []
@@ -108,55 +108,55 @@ futures = "0.3"
108108
tokio = "1.47"
109109
tokio-stream = "0.1.17"
110110
serde = "1.0"
111-
jsonrpsee = "0.25.1"
111+
jsonrpsee = "0.26.0"
112112
parking_lot = "0.12"
113113
metrics = "0.24.0"
114114

115-
alloy-origin = { version = "1.0.27", package = "alloy", features = [
116-
"k256",
117-
"rpc-types-mev",
115+
# Alloy dependencies
116+
alloy-origin = { version = "1.0.37", package = "alloy", features = [
117+
"k256",
118+
"rpc-types-mev",
118119
] }
119-
alloy-evm = "0.18.2"
120-
alloy-serde = "1.0.27"
121-
122-
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
123-
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
124-
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
120+
alloy-evm = "0.21.2"
121+
alloy-serde = "1.0.37"
125122

126123
# Reth dependencies
127-
reth-origin = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0", package = "reth" }
128-
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
129-
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
130-
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
131-
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
132-
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
133-
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0" }
134-
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0", features = [
135-
"node",
136-
"evm",
124+
reth-origin = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", package = "reth" }
125+
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
126+
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
127+
reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
128+
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
129+
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
130+
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
131+
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", features = [
132+
"node",
133+
"evm",
137134
] }
138-
139-
# optimism dependencies (optional)
140-
op-alloy = { version = "0.18.14", features = ["full"], optional = true }
141-
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0", optional = true }
142-
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0", optional = true }
143-
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0", optional = true }
144-
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0", optional = true }
145-
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0", optional = true }
146-
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0", optional = true }
147-
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0", optional = true }
135+
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
136+
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
137+
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
138+
reth-ipc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", optional = true }
139+
140+
# Reth-optimism dependencies (optional)
141+
op-alloy = { version = "0.20.0", features = ["full"], optional = true }
142+
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", optional = true }
143+
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", optional = true }
144+
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", optional = true }
145+
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", optional = true }
146+
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", optional = true }
147+
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", optional = true }
148+
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", optional = true }
148149

149150
# test-utils
150151
rblib-tests-macros = { path = "src/test_utils/macros", optional = true }
151-
reth-ipc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.6.0", optional = true }
152-
jsonrpsee-core = { version = "0.25.1", optional = true }
152+
jsonrpsee-core = { version = "0.26.0", optional = true, features = ["client"] }
153153
nanoid = { version = "0.4", optional = true }
154154
alloy-genesis = { version = "1.0", default-features = false, optional = true }
155155
rand = { version = "0.9", optional = true }
156156
ctor = { version = "0.5", optional = true }
157157
tracing-subscriber = { version = "0.3", features = [
158-
"env-filter",
159-
"json",
158+
"env-filter",
159+
"json",
160160
], optional = true }
161161

162162
[target.'cfg(unix)'.dependencies]
@@ -165,8 +165,8 @@ tikv-jemallocator = { version = "0.6", optional = true }
165165
[dev-dependencies]
166166
rblib = { path = ".", features = ["test-utils"] }
167167

168-
[patch.crates-io]
169-
alloy-primitives = { git = "https://github.com/alloy-rs/core", rev = "8c5713c20e3ed08cf09634ea5cb696d7021002a8" }
168+
#[patch.crates-io]
169+
#alloy-primitives = { git = "https://github.com/alloy-rs/core", rev = "8c5713c20e3ed08cf09634ea5cb696d7021002a8" }
170170

171171
[lints]
172172
workspace = true

src/payload/checkpoint.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ use {
22
super::exec::IntoExecutable,
33
crate::{alloy, prelude::*, reth},
44
alloy::{
5-
consensus::crypto::RecoveryError,
5+
consensus::{crypto::RecoveryError, transaction::TxHashRef},
66
primitives::{Address, B256, StorageValue},
77
},
88
core::fmt::{Debug, Display},
99
reth::{
10-
core::primitives::SignedTransaction,
1110
errors::ProviderError,
1211
primitives::Recovered,
1312
revm::{
@@ -153,21 +152,21 @@ impl<P: Platform> Checkpoint<P> {
153152
/// If this checkpoint is created from a single transaction, returns a
154153
/// reference to this transaction. Otherwise, returns `None`.
155154
pub fn as_transaction(&self) -> Option<&Recovered<types::Transaction<P>>> {
156-
if let Mutation::Executable(result) = &self.inner.mutation {
157-
if let Executable::Transaction(tx) = result.source() {
158-
return Some(tx);
159-
}
155+
if let Mutation::Executable(result) = &self.inner.mutation
156+
&& let Executable::Transaction(tx) = result.source()
157+
{
158+
return Some(tx);
160159
}
161160
None
162161
}
163162

164163
/// If this checkpoint is created from a bundle, returns a reference to this
165164
/// bundle. Otherwise, returns `None`.
166165
pub fn as_bundle(&self) -> Option<&types::Bundle<P>> {
167-
if let Mutation::Executable(result) = &self.inner.mutation {
168-
if let Executable::Bundle(bundle) = result.source() {
169-
return Some(bundle);
170-
}
166+
if let Mutation::Executable(result) = &self.inner.mutation
167+
&& let Executable::Bundle(bundle) = result.source()
168+
{
169+
return Some(bundle);
171170
}
172171
None
173172
}

src/payload/exec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use {
22
crate::{alloy, prelude::*, reth},
33
alloy::{
4-
consensus::crypto::RecoveryError,
4+
consensus::{crypto::RecoveryError, transaction::TxHashRef},
55
primitives::{B256, TxHash},
66
},
77
reth::{

src/payload/ext/checkpoint.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
use {
22
crate::{
33
alloy::{
4-
consensus::Transaction,
4+
consensus::transaction::{Transaction, TxHashRef},
55
primitives::{Address, B256, U256},
66
},
77
prelude::*,
8-
reth::{
9-
errors::ProviderError,
10-
ethereum::primitives::SignedTransaction,
11-
primitives::Recovered,
12-
revm::DatabaseRef,
13-
},
8+
reth::{errors::ProviderError, primitives::Recovered, revm::DatabaseRef},
149
},
1510
itertools::Itertools,
1611
std::time::Instant,

src/payload/ext/span.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
use crate::{
2-
alloy::{consensus::Transaction, primitives::TxHash},
2+
alloy::{
3+
consensus::transaction::{Transaction, TxHashRef},
4+
primitives::TxHash,
5+
},
36
prelude::*,
4-
reth::{ethereum::primitives::SignedTransaction, primitives::Recovered},
7+
reth::primitives::Recovered,
58
};
69

710
/// Quality of Life extensions for the `Span` type.

src/pipelines/macros/src/metrics/set.rs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ pub(crate) fn metrics_set_derive(input: TokenStream) -> TokenStream {
6464
let mut describe: Option<String> = None;
6565

6666
for attr in &field.attrs {
67-
if attr.path().is_ident("metric") {
68-
if let Err(e) = parse_metric_attr(attr, &mut rename, &mut describe) {
69-
return e.to_compile_error().into();
70-
}
67+
if attr.path().is_ident("metric")
68+
&& let Err(e) = parse_metric_attr(attr, &mut rename, &mut describe)
69+
{
70+
return e.to_compile_error().into();
7171
}
7272
}
7373

@@ -188,17 +188,16 @@ enum MetricKind {
188188
}
189189

190190
fn classify(ty: &Type) -> MetricKind {
191-
if let Type::Path(tp) = ty {
192-
if let Some(seg) = tp.path.segments.last() {
193-
if matches!(seg.arguments, PathArguments::None) {
194-
return match seg.ident.to_string().as_str() {
195-
"Counter" => MetricKind::Counter,
196-
"Gauge" => MetricKind::Gauge,
197-
"Histogram" => MetricKind::Histogram,
198-
_ => MetricKind::Other,
199-
};
200-
}
201-
}
191+
if let Type::Path(tp) = ty
192+
&& let Some(seg) = tp.path.segments.last()
193+
&& matches!(seg.arguments, PathArguments::None)
194+
{
195+
return match seg.ident.to_string().as_str() {
196+
"Counter" => MetricKind::Counter,
197+
"Gauge" => MetricKind::Gauge,
198+
"Histogram" => MetricKind::Histogram,
199+
_ => MetricKind::Other,
200+
};
202201
}
203202
MetricKind::Other
204203
}

src/platform/bundle.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use {
22
crate::{alloy, prelude::*, reth},
33
alloy::{
4-
consensus::BlockHeader,
4+
consensus::{BlockHeader, transaction::TxHashRef},
55
eips::{Decodable2718, Encodable2718},
66
network::eip2718::Eip2718Error,
77
primitives::{B256, Keccak256, TxHash},
@@ -14,7 +14,6 @@ use {
1414
reth::{
1515
ethereum::primitives::{
1616
Recovered,
17-
SignedTransaction,
1817
SignerRecoverable,
1918
crypto::RecoveryError,
2019
},

src/platform/ethereum/pool.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ impl<P: Platform> Iterator for FixedTransactions<P> {
7272
let nonce = pooled.nonce();
7373
let sender_id = self.senders.sender_id_or_create(pooled.sender());
7474

75-
if let Some(id) = self.invalid.get(&sender_id) {
76-
if id.nonce <= nonce {
77-
// transaction or one of its ancestors is marked as invalid, skip it
78-
continue;
79-
}
75+
if let Some(id) = self.invalid.get(&sender_id)
76+
&& id.nonce <= nonce
77+
{
78+
// transaction or one of its ancestors is marked as invalid, skip it
79+
continue;
8080
}
8181

8282
let wrapper = ValidPoolTransaction {

src/platform/ext/bundle.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use {super::*, reth::ethereum::primitives::SignedTransaction};
1+
use super::*;
22

33
/// Extension trait for [`types::Bundle`] that improves Dev Ex when
44
/// working with platform-agnostic bundles.

src/platform/ext/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use {
55
crate::{alloy, prelude::*, reth},
66
alloy::{
7+
consensus::transaction::TxHashRef,
78
network::{TransactionBuilder, TxSignerSync, UnbuiltTransactionError},
89
signers::Signature,
910
},

0 commit comments

Comments
 (0)