Skip to content

Commit d47efc4

Browse files
chee-chyuanclaude
andcommitted
fix: resolve compilation errors and CI failures from triedb cherry-pick
- Fix compilation: add StorageArgs field to NodeConfig and NodeCommand, export StorageArgs from args module, restore with_storage and storage_settings methods on NodeConfig - Fix clippy: backtick TrieDB in doc comments, swap if-not-else branches, use if-let instead of is_some+unwrap, remove useless .into() conversions, remove redundant clones and let bindings, use bool::then, make const fn, remove unnecessary to_string on to_string_lossy - Fix CI workflows: add liburing-dev to clippy/docs/udeps/doctest jobs - Fix feature propagation: propagate asm-keccak to reth-provider and alloy-primitives, jemalloc to rocksdb, test-utils to reth-trie-common - Fix wasm: add triedb-affected crates to wasm exclude list - Fix deny: add reth-bsc-triedb git repo to allow-git - Fix deps: add reth-tasks dev-dep to reth-db-common, make triedb deps optional behind std feature in reth-trie-common - Regenerate CLI docs for new --statedb.triedb flag Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f4f7443 commit d47efc4

35 files changed

Lines changed: 533 additions & 364 deletions

File tree

.github/scripts/check_wasm.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ exclude_crates=(
2121
reth-dns-discovery
2222
reth-downloaders
2323
reth-e2e-test-utils
24+
reth-engine-primitives # reth-trie-common/std -> rust-eth-triedb
2425
reth-engine-service
26+
reth-ethereum-engine-primitives # reth-trie-common/std -> rust-eth-triedb
2527
reth-execution-cache
2628
reth-engine-tree
2729
reth-engine-util
@@ -34,12 +36,14 @@ exclude_crates=(
3436
reth-ipc
3537
reth-net-nat
3638
reth-network
39+
reth-network-api # reth-trie-common/std -> rust-eth-triedb
3740
reth-node-api
3841
reth-node-builder
3942
reth-node-core
4043
reth-node-ethereum
4144
reth-node-events
4245
reth-node-metrics
46+
reth-node-types # reth-trie-common/std -> rust-eth-triedb
4347
reth-rpc
4448
reth-rpc-api
4549
reth-rpc-api-testing-util
@@ -50,6 +54,7 @@ exclude_crates=(
5054
reth-rpc-eth-api
5155
reth-rpc-eth-types
5256
reth-rpc-layer
57+
reth-rpc-server-types # reth-trie-common/std -> rust-eth-triedb
5358
reth-stages
5459
reth-engine-local
5560
reth-ress-protocol
@@ -62,6 +67,7 @@ exclude_crates=(
6267
reth-libmdbx # mdbx
6368
reth-mdbx-sys # mdbx
6469
reth-payload-builder # reth-metrics
70+
reth-payload-builder-primitives # reth-trie-common/std -> rust-eth-triedb
6571
reth-provider # tokio
6672
reth-prune # tokio
6773
reth-prune-static-files # reth-provider
@@ -70,6 +76,7 @@ exclude_crates=(
7076
reth-static-file # tokio
7177
reth-transaction-pool # c-kzg
7278
reth-payload-util # reth-transaction-pool
79+
reth-trie-db # rust-eth-triedb (rocksdb/jemalloc)
7380
reth-trie-parallel # tokio
7481
reth-trie-sparse-parallel # rayon
7582
reth-testing-utils

.github/workflows/lint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ jobs:
5454
- uses: Swatinem/rust-cache@v2
5555
with:
5656
cache-on-failure: true
57+
- name: Install liburing-dev
58+
run: sudo apt-get update && sudo apt-get install -y liburing-dev
5759
- run: cargo clippy --workspace --lib --examples --tests --benches --all-features --locked
5860
env:
5961
RUSTFLAGS: -D warnings
@@ -145,6 +147,8 @@ jobs:
145147
- uses: Swatinem/rust-cache@v2
146148
with:
147149
cache-on-failure: true
150+
- name: Install liburing-dev
151+
run: sudo apt-get update && sudo apt-get install -y liburing-dev
148152
- run: cargo docs --document-private-items
149153
env:
150154
# Keep in sync with ./book.yml:jobs.build
@@ -178,6 +182,8 @@ jobs:
178182
with:
179183
cache-on-failure: true
180184
- uses: taiki-e/install-action@cargo-udeps
185+
- name: Install liburing-dev
186+
run: sudo apt-get update && sudo apt-get install -y liburing-dev
181187
- run: cargo udeps --workspace --lib --examples --tests --benches --all-features --locked
182188

183189
book:

.github/workflows/unit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ jobs:
102102
- uses: Swatinem/rust-cache@v2
103103
with:
104104
cache-on-failure: true
105+
- name: Install liburing-dev
106+
run: sudo apt-get update && sudo apt-get install -y liburing-dev
105107
- name: Run doctests
106108
run: cargo test --doc --workspace --all-features
107109

Cargo.lock

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

bin/reth-bb/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ asm-keccak = [
8787
"alloy-evm/asm-keccak",
8888
"revm/asm-keccak",
8989
"revm-primitives/asm-keccak",
90+
"reth-provider/asm-keccak",
9091
]
9192

9293
min-debug-logs = [

bin/reth/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ asm-keccak = [
113113
"reth-ethereum-cli/asm-keccak",
114114
"reth-node-ethereum/asm-keccak",
115115
"alloy-primitives/asm-keccak",
116+
"reth-provider/asm-keccak",
116117
]
117118
keccak-cache-global = [
118119
"reth-node-core/keccak-cache-global",

crates/chain-state/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ test-utils = [
7878
"alloy-signer",
7979
"alloy-signer-local",
8080
"rand",
81+
"rayon",
8182
"revm-state",
8283
"reth-chainspec/test-utils",
8384
"reth-primitives-traits/test-utils",

crates/chain-state/src/test_utils.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use alloy_signer::SignerSync;
99
use alloy_signer_local::PrivateKeySigner;
1010
use core::marker::PhantomData;
1111
use rand::Rng;
12+
use rayon::iter::IntoParallelRefIterator;
1213
use reth_chainspec::{ChainSpec, EthereumHardfork, MIN_TRANSACTION_GAS};
1314
use reth_ethereum_primitives::{
1415
Block, BlockBody, EthPrimitives, Receipt, Transaction, TransactionSigned,
@@ -293,7 +294,7 @@ impl<N: NodePrimitives> TestBlockBuilder<N> {
293294

294295
let hashed_state = reth_trie::HashedPostState::from_bundle_state::<
295296
reth_trie::KeccakKeyHasher,
296-
>(bundle.state.iter())
297+
>(bundle.state.par_iter())
297298
.into_sorted();
298299

299300
let block_receipts = if receipts.is_empty() {

crates/cli/commands/src/node.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use reth_node_core::{
1111
args::{
1212
DatabaseArgs, DatadirArgs, DebugArgs, DevArgs, EngineArgs, EraArgs, MetricArgs,
1313
NetworkArgs, PayloadBuilderArgs, PruningArgs, RpcServerArgs, StateDbArgs, StaticFilesArgs,
14-
TxPoolArgs,
14+
StorageArgs, TxPoolArgs,
1515
},
1616
node_config::NodeConfig,
1717
version,
@@ -119,6 +119,10 @@ pub struct NodeCommand<C: ChainSpecParser, Ext: clap::Args + fmt::Debug = NoArgs
119119
#[command(flatten, next_help_heading = "StateDB")]
120120
pub statedb: StateDbArgs,
121121

122+
/// Storage layout configuration (v1/v2)
123+
#[command(flatten, next_help_heading = "Storage")]
124+
pub storage: StorageArgs,
125+
122126
/// Additional cli arguments
123127
#[command(flatten, next_help_heading = "Extension")]
124128
pub ext: Ext,
@@ -175,6 +179,7 @@ where
175179
era,
176180
static_files,
177181
statedb,
182+
storage,
178183
ext,
179184
} = self;
180185

@@ -199,6 +204,7 @@ where
199204
era,
200205
static_files,
201206
statedb,
207+
storage,
202208
};
203209

204210
let data_dir = node_config.datadir();

0 commit comments

Comments
 (0)