Skip to content
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
7 changes: 7 additions & 0 deletions .github/scripts/check_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ exclude_crates=(
reth-dns-discovery
reth-downloaders
reth-e2e-test-utils
reth-engine-primitives # reth-trie-common/std -> rust-eth-triedb
reth-engine-service
reth-ethereum-engine-primitives # reth-trie-common/std -> rust-eth-triedb
reth-execution-cache
reth-engine-tree
reth-engine-util
Expand All @@ -34,12 +36,14 @@ exclude_crates=(
reth-ipc
reth-net-nat
reth-network
reth-network-api # reth-trie-common/std -> rust-eth-triedb
reth-node-api
reth-node-builder
reth-node-core
reth-node-ethereum
reth-node-events
reth-node-metrics
reth-node-types # reth-trie-common/std -> rust-eth-triedb
reth-rpc
reth-rpc-api
reth-rpc-api-testing-util
Expand All @@ -50,6 +54,7 @@ exclude_crates=(
reth-rpc-eth-api
reth-rpc-eth-types
reth-rpc-layer
reth-rpc-server-types # reth-trie-common/std -> rust-eth-triedb
reth-stages
reth-engine-local
reth-ress-protocol
Expand All @@ -62,6 +67,7 @@ exclude_crates=(
reth-libmdbx # mdbx
reth-mdbx-sys # mdbx
reth-payload-builder # reth-metrics
reth-payload-builder-primitives # reth-trie-common/std -> rust-eth-triedb
reth-provider # tokio
reth-prune # tokio
reth-prune-static-files # reth-provider
Expand All @@ -70,6 +76,7 @@ exclude_crates=(
reth-static-file # tokio
reth-transaction-pool # c-kzg
reth-payload-util # reth-transaction-pool
reth-trie-db # rust-eth-triedb (rocksdb/jemalloc)
reth-trie-parallel # tokio
reth-trie-sparse-parallel # rayon
reth-testing-utils
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install liburing-dev
run: sudo apt-get update && sudo apt-get install -y liburing-dev
- run: cargo clippy --workspace --lib --examples --tests --benches --all-features --locked
env:
RUSTFLAGS: -D warnings
Expand Down Expand Up @@ -145,6 +147,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install liburing-dev
run: sudo apt-get update && sudo apt-get install -y liburing-dev
- run: cargo docs --document-private-items
env:
# Keep in sync with ./book.yml:jobs.build
Expand Down Expand Up @@ -178,6 +182,8 @@ jobs:
with:
cache-on-failure: true
- uses: taiki-e/install-action@cargo-udeps
- name: Install liburing-dev
run: sudo apt-get update && sudo apt-get install -y liburing-dev
- run: cargo udeps --workspace --lib --examples --tests --benches --all-features --locked

book:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install liburing-dev
run: sudo apt-get update && sudo apt-get install -y liburing-dev
- name: Run doctests
run: cargo test --doc --workspace --all-features

Expand Down
87 changes: 87 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,13 @@ reth-trie-parallel = { path = "crates/trie/parallel" }
reth-trie-sparse = { path = "crates/trie/sparse", default-features = false }
reth-zstd-compressors = { version = "0.1.0", default-features = false }

# triedb
# Note: To enable io-uring support, add `io-uring = ["rust-eth-triedb/io-uring"]` to the [features] section
# of any crate that depends on rust-eth-triedb. Then enable the io-uring feature at the root (bin/reth).
rust-eth-triedb = { git = "https://github.com/bnb-chain/reth-bsc-triedb.git", tag = "v0.0.1" }
rust-eth-triedb-common = { git = "https://github.com/bnb-chain/reth-bsc-triedb.git", tag = "v0.0.1", package = "rust-eth-triedb-common" }
rust-eth-triedb-state-trie = { git = "https://github.com/bnb-chain/reth-bsc-triedb.git", tag = "v0.0.1", package = "rust-eth-triedb-state-trie" }

# revm
revm = { version = "36.0.0", default-features = false }
revm-bytecode = { version = "9.0.0", default-features = false }
Expand Down Expand Up @@ -701,6 +708,15 @@ vergen-git2 = "9.1.0"
# networking
ipnet = "2.11"

# Patch rust-eth-triedb's dependencies to use local reth crates
[patch."https://github.com/bnb-chain/reth-bsc-triedb.git"]
reth-metrics = { path = "crates/metrics" }

# Patch bnb-chain/reth.git dependencies to use local reth crates
# This is needed because rust-eth-triedb depends on bnb-chain/reth.git
[patch."https://github.com/bnb-chain/reth.git"]
reth-metrics = { path = "crates/metrics" }

[patch.crates-io]
# alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
# alloy-contract = { git = "https://github.com/alloy-rs/alloy", rev = "3049f232fbb44d1909883e154eb38ec5962f53a3" }
Expand Down
1 change: 1 addition & 0 deletions bin/reth-bb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ asm-keccak = [
"alloy-evm/asm-keccak",
"revm/asm-keccak",
"revm-primitives/asm-keccak",
"reth-provider/asm-keccak",
]

min-debug-logs = [
Expand Down
9 changes: 9 additions & 0 deletions bin/reth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,21 @@ asm-keccak = [
"reth-ethereum-cli/asm-keccak",
"reth-node-ethereum/asm-keccak",
"alloy-primitives/asm-keccak",
"reth-provider/asm-keccak",
]
keccak-cache-global = [
"reth-node-core/keccak-cache-global",
"reth-node-ethereum/keccak-cache-global",
"alloy-primitives/keccak-cache-global",
]

# io-uring feature enables io-uring support for rust-eth-triedb
# This feature is automatically propagated to all crates that depend on rust-eth-triedb
# Each crate using rust-eth-triedb should add: io-uring = ["rust-eth-triedb/io-uring"]
io-uring = [
"reth-provider/io-uring",
"reth-node-builder/io-uring",
]
jemalloc = [
"reth-cli-util/jemalloc",
"reth-node-core/jemalloc",
Expand Down
1 change: 1 addition & 0 deletions crates/chain-state/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ test-utils = [
"alloy-signer",
"alloy-signer-local",
"rand",
"rayon",
"revm-state",
"reth-chainspec/test-utils",
"reth-primitives-traits/test-utils",
Expand Down
3 changes: 2 additions & 1 deletion crates/chain-state/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use alloy_signer::SignerSync;
use alloy_signer_local::PrivateKeySigner;
use core::marker::PhantomData;
use rand::Rng;
use rayon::iter::IntoParallelRefIterator;
use reth_chainspec::{ChainSpec, EthereumHardfork, MIN_TRANSACTION_GAS};
use reth_ethereum_primitives::{
Block, BlockBody, EthPrimitives, Receipt, Transaction, TransactionSigned,
Expand Down Expand Up @@ -293,7 +294,7 @@ impl<N: NodePrimitives> TestBlockBuilder<N> {

let hashed_state = reth_trie::HashedPostState::from_bundle_state::<
reth_trie::KeccakKeyHasher,
>(bundle.state.iter())
>(bundle.state.par_iter())
.into_sorted();

let block_receipts = if receipts.is_empty() {
Expand Down
5 changes: 5 additions & 0 deletions crates/cli/commands/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ reth-primitives-traits.workspace = true
reth-discv4.workspace = true
reth-discv5.workspace = true

# triedb
rust-eth-triedb.workspace = true

# ethereum
alloy-eips.workspace = true
alloy-primitives.workspace = true
Expand Down Expand Up @@ -111,6 +114,8 @@ reth-provider = { workspace = true, features = ["test-utils"] }
tempfile.workspace = true

[features]
default = []
io-uring = ["rust-eth-triedb/io-uring"]
arbitrary = [
"dep:proptest",
"dep:arbitrary",
Expand Down
Loading
Loading