mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(trie): remove reth-primitives dep (#14080)
This commit is contained in:
3
Cargo.lock
generated
3
Cargo.lock
generated
@ -9335,9 +9335,10 @@ dependencies = [
|
|||||||
"proptest",
|
"proptest",
|
||||||
"proptest-arbitrary-interop",
|
"proptest-arbitrary-interop",
|
||||||
"rayon",
|
"rayon",
|
||||||
|
"reth-ethereum-primitives",
|
||||||
"reth-execution-errors",
|
"reth-execution-errors",
|
||||||
"reth-metrics",
|
"reth-metrics",
|
||||||
"reth-primitives",
|
"reth-primitives-traits",
|
||||||
"reth-stages-types",
|
"reth-stages-types",
|
||||||
"reth-storage-errors",
|
"reth-storage-errors",
|
||||||
"reth-trie-common",
|
"reth-trie-common",
|
||||||
|
|||||||
@ -14,7 +14,7 @@ workspace = true
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
# reth
|
# reth
|
||||||
reth-execution-errors.workspace = true
|
reth-execution-errors.workspace = true
|
||||||
reth-primitives.workspace = true
|
reth-primitives-traits.workspace = true
|
||||||
reth-stages-types.workspace = true
|
reth-stages-types.workspace = true
|
||||||
reth-storage-errors.workspace = true
|
reth-storage-errors.workspace = true
|
||||||
reth-trie-sparse.workspace = true
|
reth-trie-sparse.workspace = true
|
||||||
@ -46,7 +46,8 @@ triehash = { version = "0.8", optional = true }
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
# reth
|
# 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"] }
|
reth-trie-common = { workspace = true, features = ["test-utils", "arbitrary"] }
|
||||||
|
|
||||||
# trie
|
# trie
|
||||||
@ -67,12 +68,14 @@ serde = [
|
|||||||
"alloy-eips/serde",
|
"alloy-eips/serde",
|
||||||
"revm/serde",
|
"revm/serde",
|
||||||
"reth-trie-common/serde",
|
"reth-trie-common/serde",
|
||||||
|
"reth-primitives-traits/serde",
|
||||||
]
|
]
|
||||||
test-utils = [
|
test-utils = [
|
||||||
"triehash",
|
"triehash",
|
||||||
"revm/test-utils",
|
"revm/test-utils",
|
||||||
"reth-primitives/test-utils",
|
"reth-primitives-traits/test-utils",
|
||||||
"reth-trie-common/test-utils",
|
"reth-trie-common/test-utils",
|
||||||
|
"reth-ethereum-primitives/test-utils",
|
||||||
"reth-trie-sparse/test-utils",
|
"reth-trie-sparse/test-utils",
|
||||||
"reth-stages-types/test-utils",
|
"reth-stages-types/test-utils",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
#![allow(missing_docs, unreachable_pub)]
|
#![allow(missing_docs, unreachable_pub)]
|
||||||
|
use alloy_consensus::ReceiptWithBloom;
|
||||||
use alloy_primitives::B256;
|
use alloy_primitives::B256;
|
||||||
use criterion::{criterion_group, criterion_main, Criterion};
|
use criterion::{criterion_group, criterion_main, Criterion};
|
||||||
use proptest::{prelude::*, strategy::ValueTree, test_runner::TestRunner};
|
use proptest::{prelude::*, strategy::ValueTree, test_runner::TestRunner};
|
||||||
use proptest_arbitrary_interop::arb;
|
use proptest_arbitrary_interop::arb;
|
||||||
use reth_primitives::{Receipt, ReceiptWithBloom};
|
use reth_ethereum_primitives::Receipt;
|
||||||
use reth_trie::triehash::KeccakHasher;
|
use reth_trie::triehash::KeccakHasher;
|
||||||
use std::hint::black_box;
|
use std::hint::black_box;
|
||||||
|
|
||||||
@ -47,7 +48,6 @@ mod implementations {
|
|||||||
use alloy_eips::eip2718::Encodable2718;
|
use alloy_eips::eip2718::Encodable2718;
|
||||||
use alloy_rlp::Encodable;
|
use alloy_rlp::Encodable;
|
||||||
use alloy_trie::root::adjust_index_for_rlp;
|
use alloy_trie::root::adjust_index_for_rlp;
|
||||||
use reth_primitives::Receipt;
|
|
||||||
use reth_trie_common::{HashBuilder, Nibbles};
|
use reth_trie_common::{HashBuilder, Nibbles};
|
||||||
|
|
||||||
pub fn trie_hash_ordered_trie_root(receipts: &[ReceiptWithBloom<Receipt>]) -> B256 {
|
pub fn trie_hash_ordered_trie_root(receipts: &[ReceiptWithBloom<Receipt>]) -> B256 {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
use alloy_primitives::{B256, U256};
|
use alloy_primitives::{B256, U256};
|
||||||
use reth_primitives::Account;
|
use reth_primitives_traits::Account;
|
||||||
use reth_storage_errors::db::DatabaseError;
|
use reth_storage_errors::db::DatabaseError;
|
||||||
|
|
||||||
/// Implementation of hashed state cursor traits for the post state.
|
/// Implementation of hashed state cursor traits for the post state.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
use super::{HashedCursor, HashedCursorFactory, HashedStorageCursor};
|
use super::{HashedCursor, HashedCursorFactory, HashedStorageCursor};
|
||||||
use alloy_primitives::{B256, U256};
|
use alloy_primitives::{B256, U256};
|
||||||
use reth_primitives::Account;
|
use reth_primitives_traits::Account;
|
||||||
use reth_storage_errors::db::DatabaseError;
|
use reth_storage_errors::db::DatabaseError;
|
||||||
|
|
||||||
/// Noop hashed cursor factory.
|
/// Noop hashed cursor factory.
|
||||||
|
|||||||
@ -4,7 +4,7 @@ use crate::{
|
|||||||
HashedStorageSorted,
|
HashedStorageSorted,
|
||||||
};
|
};
|
||||||
use alloy_primitives::{map::B256HashSet, B256, U256};
|
use alloy_primitives::{map::B256HashSet, B256, U256};
|
||||||
use reth_primitives::Account;
|
use reth_primitives_traits::Account;
|
||||||
use reth_storage_errors::db::DatabaseError;
|
use reth_storage_errors::db::DatabaseError;
|
||||||
|
|
||||||
/// The hashed cursor factory for the post state.
|
/// The hashed cursor factory for the post state.
|
||||||
|
|||||||
@ -9,7 +9,7 @@ use alloy_primitives::{
|
|||||||
};
|
};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use rayon::prelude::{IntoParallelIterator, ParallelIterator};
|
use rayon::prelude::{IntoParallelIterator, ParallelIterator};
|
||||||
use reth_primitives::Account;
|
use reth_primitives_traits::Account;
|
||||||
use reth_trie_common::KeyHasher;
|
use reth_trie_common::KeyHasher;
|
||||||
use revm::db::{AccountStatus, BundleAccount};
|
use revm::db::{AccountStatus, BundleAccount};
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
use alloy_primitives::{Address, B256, U256};
|
use alloy_primitives::{Address, B256, U256};
|
||||||
use alloy_rlp::encode_fixed_size;
|
use alloy_rlp::encode_fixed_size;
|
||||||
use reth_primitives::Account;
|
use reth_primitives_traits::Account;
|
||||||
use reth_trie_common::triehash::KeccakHasher;
|
use reth_trie_common::triehash::KeccakHasher;
|
||||||
|
|
||||||
/// Re-export of [triehash].
|
/// Re-export of [triehash].
|
||||||
|
|||||||
Reference in New Issue
Block a user