chore(trie): remove reth-primitives dep (#14080)

This commit is contained in:
Dan Cline
2025-01-29 18:13:09 -05:00
committed by GitHub
parent 5a7e057636
commit 2b5cb351d5
8 changed files with 15 additions and 11 deletions

3
Cargo.lock generated
View File

@ -9335,9 +9335,10 @@ dependencies = [
"proptest",
"proptest-arbitrary-interop",
"rayon",
"reth-ethereum-primitives",
"reth-execution-errors",
"reth-metrics",
"reth-primitives",
"reth-primitives-traits",
"reth-stages-types",
"reth-storage-errors",
"reth-trie-common",

View File

@ -14,7 +14,7 @@ workspace = true
[dependencies]
# reth
reth-execution-errors.workspace = true
reth-primitives.workspace = true
reth-primitives-traits.workspace = true
reth-stages-types.workspace = true
reth-storage-errors.workspace = true
reth-trie-sparse.workspace = true
@ -46,7 +46,8 @@ triehash = { version = "0.8", optional = true }
[dev-dependencies]
# reth
reth-primitives = { workspace = true, features = ["test-utils", "arbitrary"] }
reth-primitives-traits = { workspace = true, features = ["test-utils"] }
reth-ethereum-primitives = { workspace = true, features = ["arbitrary", "std"] }
reth-trie-common = { workspace = true, features = ["test-utils", "arbitrary"] }
# trie
@ -67,12 +68,14 @@ serde = [
"alloy-eips/serde",
"revm/serde",
"reth-trie-common/serde",
"reth-primitives-traits/serde",
]
test-utils = [
"triehash",
"revm/test-utils",
"reth-primitives/test-utils",
"reth-primitives-traits/test-utils",
"reth-trie-common/test-utils",
"reth-ethereum-primitives/test-utils",
"reth-trie-sparse/test-utils",
"reth-stages-types/test-utils",
]

View File

@ -1,9 +1,10 @@
#![allow(missing_docs, unreachable_pub)]
use alloy_consensus::ReceiptWithBloom;
use alloy_primitives::B256;
use criterion::{criterion_group, criterion_main, Criterion};
use proptest::{prelude::*, strategy::ValueTree, test_runner::TestRunner};
use proptest_arbitrary_interop::arb;
use reth_primitives::{Receipt, ReceiptWithBloom};
use reth_ethereum_primitives::Receipt;
use reth_trie::triehash::KeccakHasher;
use std::hint::black_box;
@ -47,7 +48,6 @@ mod implementations {
use alloy_eips::eip2718::Encodable2718;
use alloy_rlp::Encodable;
use alloy_trie::root::adjust_index_for_rlp;
use reth_primitives::Receipt;
use reth_trie_common::{HashBuilder, Nibbles};
pub fn trie_hash_ordered_trie_root(receipts: &[ReceiptWithBloom<Receipt>]) -> B256 {

View File

@ -1,5 +1,5 @@
use alloy_primitives::{B256, U256};
use reth_primitives::Account;
use reth_primitives_traits::Account;
use reth_storage_errors::db::DatabaseError;
/// Implementation of hashed state cursor traits for the post state.

View File

@ -1,6 +1,6 @@
use super::{HashedCursor, HashedCursorFactory, HashedStorageCursor};
use alloy_primitives::{B256, U256};
use reth_primitives::Account;
use reth_primitives_traits::Account;
use reth_storage_errors::db::DatabaseError;
/// Noop hashed cursor factory.

View File

@ -4,7 +4,7 @@ use crate::{
HashedStorageSorted,
};
use alloy_primitives::{map::B256HashSet, B256, U256};
use reth_primitives::Account;
use reth_primitives_traits::Account;
use reth_storage_errors::db::DatabaseError;
/// The hashed cursor factory for the post state.

View File

@ -9,7 +9,7 @@ use alloy_primitives::{
};
use itertools::Itertools;
use rayon::prelude::{IntoParallelIterator, ParallelIterator};
use reth_primitives::Account;
use reth_primitives_traits::Account;
use reth_trie_common::KeyHasher;
use revm::db::{AccountStatus, BundleAccount};
use std::borrow::Cow;

View File

@ -1,6 +1,6 @@
use alloy_primitives::{Address, B256, U256};
use alloy_rlp::encode_fixed_size;
use reth_primitives::Account;
use reth_primitives_traits::Account;
use reth_trie_common::triehash::KeccakHasher;
/// Re-export of [triehash].