Skip to content

Commit 4abc534

Browse files
authored
chore: bump reth to 1.10.0 (#65)
1 parent 94a731a commit 4abc534

16 files changed

Lines changed: 138 additions & 70 deletions

File tree

Cargo.toml

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["crates/*"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.16.0-rc.4"
6+
version = "0.16.0-rc.5"
77
edition = "2024"
88
rust-version = "1.88"
99
authors = ["init4"]
@@ -34,34 +34,34 @@ debug = false
3434
incremental = false
3535

3636
[workspace.dependencies]
37-
signet-blobber = { version = "0.16.0-rc.2", path = "crates/blobber" }
38-
signet-block-processor = { version = "0.16.0-rc.2", path = "crates/block-processor" }
39-
signet-db = { version = "0.16.0-rc.2", path = "crates/db" }
40-
signet-genesis = { version = "0.16.0-rc.2", path = "crates/genesis" }
41-
signet-node = { version = "0.16.0-rc.2", path = "crates/node" }
42-
signet-node-config = { version = "0.16.0-rc.2", path = "crates/node-config" }
43-
signet-node-tests = { version = "0.16.0-rc.2", path = "crates/node-tests" }
44-
signet-node-types = { version = "0.16.0-rc.2", path = "crates/node-types" }
45-
signet-rpc = { version = "0.16.0-rc.2", path = "crates/rpc" }
37+
signet-blobber = { version = "0.16.0-rc.5", path = "crates/blobber" }
38+
signet-block-processor = { version = "0.16.0-rc.5", path = "crates/block-processor" }
39+
signet-db = { version = "0.16.0-rc.5", path = "crates/db" }
40+
signet-genesis = { version = "0.16.0-rc.5", path = "crates/genesis" }
41+
signet-node = { version = "0.16.0-rc.5", path = "crates/node" }
42+
signet-node-config = { version = "0.16.0-rc.5", path = "crates/node-config" }
43+
signet-node-tests = { version = "0.16.0-rc.5", path = "crates/node-tests" }
44+
signet-node-types = { version = "0.16.0-rc.5", path = "crates/node-types" }
45+
signet-rpc = { version = "0.16.0-rc.5", path = "crates/rpc" }
4646

4747
init4-bin-base = { version = "0.18.0-rc.1", features = ["alloy"] }
4848

49-
signet-bundle = "0.16.0-rc.1"
50-
signet-constants = "0.16.0-rc.1"
51-
signet-evm = "0.16.0-rc.1"
52-
signet-extract = "0.16.0-rc.1"
53-
signet-test-utils = "0.16.0-rc.1"
54-
signet-tx-cache = "0.16.0-rc.1"
55-
signet-types = "0.16.0-rc.1"
56-
signet-zenith = "0.16.0-rc.1"
57-
signet-journal = "0.16.0-rc.1"
49+
signet-bundle = "0.16.0-rc.5"
50+
signet-constants = "0.16.0-rc.5"
51+
signet-evm = "0.16.0-rc.5"
52+
signet-extract = "0.16.0-rc.5"
53+
signet-test-utils = "0.16.0-rc.5"
54+
signet-tx-cache = "0.16.0-rc.5"
55+
signet-types = "0.16.0-rc.5"
56+
signet-zenith = "0.16.0-rc.5"
57+
signet-journal = "0.16.0-rc.5"
5858

5959
# ajj
6060
ajj = { version = "0.3.4" }
6161

6262
# trevm
63-
trevm = { version = "0.31.2", features = ["full_env_cfg"] }
64-
revm-inspectors = "0.32.0" # should be 1 more than trevm version, usually
63+
trevm = { version = "0.33.0", features = ["full_env_cfg"] }
64+
revm-inspectors = "0.33.0" # should be 1 more than trevm version, usually
6565

6666
# Alloy periphery crates
6767
alloy = { version = "1.4.0", features = [
@@ -74,23 +74,29 @@ alloy = { version = "1.4.0", features = [
7474
alloy-contract = { version = "1.4.0", features = ["pubsub"] }
7575

7676
# Reth
77-
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
78-
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
79-
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
80-
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
81-
reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
82-
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
83-
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
84-
reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
85-
reth-exex-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
86-
reth-network-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
87-
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
88-
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
89-
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
90-
reth-prune-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
91-
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
92-
reth-stages-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
93-
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
77+
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
78+
reth-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
79+
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
80+
reth-codecs = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
81+
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
82+
reth-db-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
83+
reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
84+
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
85+
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
86+
reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
87+
reth-exex-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
88+
reth-libmdbx = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
89+
reth-network-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
90+
reth-network-peers = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
91+
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
92+
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
93+
reth-prune-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
94+
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
95+
reth-stages-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
96+
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.10.0" }
97+
98+
# need to pin vergen to avoid multiple versions of virgen-lib
99+
vergen = "=9.0.6"
94100

95101
# Foundry periphery
96102
foundry-blob-explorers = "0.17"

crates/block-processor/src/alias.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use alloy::{
33
primitives::{Address, map::HashSet},
44
};
55
use eyre::OptionExt;
6-
use reth::providers::{StateProvider, StateProviderFactory};
6+
use reth::providers::{StateProviderBox, StateProviderFactory};
77
use std::sync::{Arc, Mutex};
88

99
/// Simple trait to allow checking if an address should be aliased.
@@ -17,7 +17,7 @@ pub trait AliasOracle {
1717
/// associated with it, and if so, whether that bytecode matches the pattern
1818
/// for a 7702 delegation contract. If it is a delegation contract, it is not
1919
/// aliased; otherwise, it is aliased.
20-
impl AliasOracle for Box<dyn StateProvider> {
20+
impl AliasOracle for StateProviderBox {
2121
fn should_alias(&self, address: Address) -> eyre::Result<bool> {
2222
// No account at this address.
2323
let Some(acct) = self.basic_account(&address)? else { return Ok(false) };
@@ -66,7 +66,7 @@ pub trait AliasOracleFactory: Send + Sync + 'static {
6666
}
6767

6868
impl AliasOracleFactory for Box<dyn StateProviderFactory> {
69-
type Oracle = Box<dyn StateProvider>;
69+
type Oracle = StateProviderBox;
7070

7171
fn create(&self) -> eyre::Result<Self::Oracle> {
7272
// NB: This becomes a problem if anyone ever birthday attacks a

crates/block-processor/src/metrics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use alloy::consensus::BlockHeader;
1818
use metrics::{Counter, Histogram, counter, describe_counter, describe_histogram, histogram};
1919
use signet_evm::BlockResult;
20-
use signet_extract::{Extractable, Extracts, HasTxns};
20+
use signet_extract::{Extractable, Extracts};
2121
use signet_types::{MagicSig, MagicSigInfo};
2222
use std::sync::LazyLock;
2323

crates/block-processor/src/v1/processor.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,12 @@ where
212212

213213
let ru_info = provider.get_extraction_results(start..=current)?;
214214

215-
let inner =
216-
Chain::<Host>::new(provider.recovered_block_range(start..=current)?, net_outcome, None);
215+
let inner = Chain::<Host>::new(
216+
provider.recovered_block_range(start..=current)?,
217+
net_outcome,
218+
Default::default(),
219+
Default::default(),
220+
);
217221

218222
Ok(Some(RuChain { inner, ru_info }))
219223
}

crates/db/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ tracing.workspace = true
3131
futures-util = "0.3.31"
3232
tokio.workspace = true
3333
auto_impl = "1.3.0"
34+
vergen.workspace = true
3435

3536
[dev-dependencies]
3637
serde_json.workspace = true

crates/db/src/consistency.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,20 @@ where
143143
tables::Receipts<<EthPrimitives as NodePrimitives>::Receipt>,
144144
>(self, segment, highest_tx, highest_block)?
145145
}
146+
StaticFileSegment::TransactionSenders => {
147+
ensure_invariants::<_, tables::TransactionSenders>(
148+
self,
149+
segment,
150+
highest_tx,
151+
highest_block,
152+
)?
153+
}
154+
StaticFileSegment::AccountChangeSets => ensure_invariants::<
155+
_,
156+
tables::AccountChangeSets,
157+
>(
158+
self, segment, highest_tx, highest_block
159+
)?,
146160
} {
147161
update_last_good_height(unwind);
148162
}
@@ -213,7 +227,10 @@ where
213227
.get_stage_checkpoint(match segment {
214228
StaticFileSegment::Headers => StageId::Headers,
215229
StaticFileSegment::Transactions => StageId::Bodies,
216-
StaticFileSegment::Receipts => StageId::Execution,
230+
StaticFileSegment::Receipts | StaticFileSegment::AccountChangeSets => {
231+
StageId::Execution
232+
}
233+
StaticFileSegment::TransactionSenders => StageId::SenderRecovery,
217234
})?
218235
.unwrap_or_default()
219236
.block_number;

crates/db/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ pub use tables::{
3535

3636
mod traits;
3737
pub use traits::{DbProviderExt, RuWriter};
38+
39+
// TEMP: remove when reth @ 1.10.1 is released
40+
use vergen as _;

crates/db/src/provider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ where
481481
// Update pipeline stages
482482
self.update_pipeline_stages(target, true)?;
483483

484-
let chain = Chain::new(blocks, execution_state, None);
484+
let chain = Chain::new(blocks, execution_state, Default::default(), Default::default());
485485

486486
debug!("Succesfully reverted blocks and updated pipeline stages");
487487

crates/db/tests/common/mod.rs

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
use alloy::genesis::Genesis;
22
use reth::{
33
chainspec::ChainSpec,
4-
providers::{ProviderFactory, providers::StaticFileProvider},
4+
providers::{
5+
ProviderFactory,
6+
providers::{RocksDBProvider, StaticFileProvider},
7+
},
8+
};
9+
use reth_db::test_utils::{
10+
create_test_rocksdb_dir, create_test_rw_db, create_test_static_files_dir,
511
};
6-
use reth_db::test_utils::{create_test_rw_db, create_test_static_files_dir};
712
use reth_exex_test_utils::TmpDB as TmpDb;
813
use signet_node_types::SignetNodeTypes;
914
use std::sync::{Arc, OnceLock};
@@ -23,11 +28,12 @@ pub fn chain_spec() -> Arc<ChainSpec> {
2328

2429
/// Create a provider factory with a chain spec
2530
pub fn create_test_provider_factory() -> ProviderFactory<SignetNodeTypes<TmpDb>> {
26-
let (static_dir, _) = create_test_static_files_dir();
2731
let db = create_test_rw_db();
28-
ProviderFactory::new(
29-
db,
30-
chain_spec(),
31-
StaticFileProvider::read_write(static_dir.keep()).expect("static file provider"),
32-
)
32+
let (static_dir, _) = create_test_static_files_dir();
33+
let (rocksdb_dir, _) = create_test_rocksdb_dir();
34+
35+
let sfp = StaticFileProvider::read_write(static_dir.keep()).expect("static file provider");
36+
let rocks_db = RocksDBProvider::builder(rocksdb_dir.keep()).build().unwrap();
37+
38+
ProviderFactory::new(db, chain_spec(), sfp, rocks_db).expect("provider factory")
3339
}

crates/node-config/src/core.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use alloy::genesis::Genesis;
2+
use eyre::Context;
23
use init4_bin_base::utils::{calc::SlotCalculator, from_env::FromEnv};
3-
use reth::providers::providers::StaticFileProvider;
4+
use reth::providers::providers::{RocksDBProvider, StaticFileProvider};
45
use reth_chainspec::ChainSpec;
56
use reth_node_api::NodePrimitives;
67
use signet_blobber::BlobFetcherConfig;
@@ -151,6 +152,21 @@ impl SignetNodeConfig {
151152
self.database_path.as_ref().to_owned().into()
152153
}
153154

155+
/// Get the RocksDB path as a String.
156+
pub fn rocksdb_path_string(&self) -> String {
157+
format!("{}-rocksdb", &self.database_path)
158+
}
159+
160+
/// Get the RocksDB path.
161+
pub fn rocksdb_path(&self) -> PathBuf {
162+
self.rocksdb_path_string().into()
163+
}
164+
165+
/// Open the RocksDB database.
166+
pub fn open_rocks_db(&self) -> eyre::Result<RocksDBProvider> {
167+
RocksDBProvider::builder(self.rocksdb_path()).build().wrap_err("Failed to open RocksDB")
168+
}
169+
154170
/// Get the URL to which to forward raw transactions.
155171
pub fn forward_url(&self) -> Option<reqwest::Url> {
156172
self.forward_url

0 commit comments

Comments
 (0)