chore: replace trie-common dep with alloy-trie (#13652)

This commit is contained in:
Matthias Seitz
2025-01-04 18:04:40 +01:00
committed by GitHub
parent 2c94d7bbaa
commit 72eabe0579
4 changed files with 6 additions and 15 deletions

2
Cargo.lock generated
View File

@ -6747,7 +6747,6 @@ dependencies = [
"reth-ethereum-forks", "reth-ethereum-forks",
"reth-network-peers", "reth-network-peers",
"reth-primitives-traits", "reth-primitives-traits",
"reth-trie-common",
"serde_json", "serde_json",
] ]
@ -8416,7 +8415,6 @@ dependencies = [
"reth-optimism-forks", "reth-optimism-forks",
"reth-optimism-primitives", "reth-optimism-primitives",
"reth-primitives", "reth-primitives",
"reth-trie-common",
"tracing", "tracing",
] ]

View File

@ -14,7 +14,7 @@ workspace = true
# reth # reth
reth-ethereum-forks.workspace = true reth-ethereum-forks.workspace = true
reth-network-peers.workspace = true reth-network-peers.workspace = true
reth-trie-common.workspace = true alloy-trie = { workspace = true, features = ["ethereum"] }
reth-primitives-traits.workspace = true reth-primitives-traits.workspace = true
# ethereum # ethereum
@ -52,14 +52,12 @@ std = [
"reth-ethereum-forks/std", "reth-ethereum-forks/std",
"derive_more/std", "derive_more/std",
"reth-network-peers/std", "reth-network-peers/std",
"reth-trie-common/std",
"serde_json/std" "serde_json/std"
] ]
arbitrary = [ arbitrary = [
"alloy-chains/arbitrary", "alloy-chains/arbitrary",
"reth-ethereum-forks/arbitrary", "reth-ethereum-forks/arbitrary",
"reth-primitives-traits/arbitrary", "reth-primitives-traits/arbitrary",
"reth-trie-common/arbitrary",
"alloy-consensus/arbitrary", "alloy-consensus/arbitrary",
"alloy-eips/arbitrary", "alloy-eips/arbitrary",
"alloy-primitives/arbitrary", "alloy-primitives/arbitrary",
@ -67,5 +65,4 @@ arbitrary = [
] ]
test-utils = [ test-utils = [
"reth-primitives-traits/test-utils", "reth-primitives-traits/test-utils",
"reth-trie-common/test-utils"
] ]

View File

@ -18,6 +18,7 @@ use alloy_eips::{
}; };
use alloy_genesis::Genesis; use alloy_genesis::Genesis;
use alloy_primitives::{address, b256, Address, BlockNumber, B256, U256}; use alloy_primitives::{address, b256, Address, BlockNumber, B256, U256};
use alloy_trie::root::state_root_ref_unhashed;
use derive_more::From; use derive_more::From;
use reth_ethereum_forks::{ use reth_ethereum_forks::{
ChainHardforks, DisplayHardforks, EthereumHardfork, EthereumHardforks, ForkCondition, ChainHardforks, DisplayHardforks, EthereumHardfork, EthereumHardforks, ForkCondition,
@ -28,7 +29,6 @@ use reth_network_peers::{
sepolia_nodes, NodeRecord, sepolia_nodes, NodeRecord,
}; };
use reth_primitives_traits::SealedHeader; use reth_primitives_traits::SealedHeader;
use reth_trie_common::root::state_root_ref_unhashed;
/// The Ethereum mainnet spec /// The Ethereum mainnet spec
pub static MAINNET: LazyLock<Arc<ChainSpec>> = LazyLock::new(|| { pub static MAINNET: LazyLock<Arc<ChainSpec>> = LazyLock::new(|| {
@ -1023,17 +1023,14 @@ pub fn test_fork_ids(spec: &ChainSpec, cases: &[(Head, ForkId)]) {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use core::ops::Deref; use super::*;
use std::{collections::HashMap, str::FromStr};
use alloy_chains::Chain; use alloy_chains::Chain;
use alloy_genesis::{ChainConfig, GenesisAccount}; use alloy_genesis::{ChainConfig, GenesisAccount};
use alloy_primitives::{b256, hex}; use alloy_primitives::{b256, hex};
use alloy_trie::EMPTY_ROOT_HASH; use alloy_trie::{TrieAccount, EMPTY_ROOT_HASH};
use core::ops::Deref;
use reth_ethereum_forks::{ForkCondition, ForkHash, ForkId, Head}; use reth_ethereum_forks::{ForkCondition, ForkHash, ForkId, Head};
use reth_trie_common::TrieAccount; use std::{collections::HashMap, str::FromStr};
use super::*;
fn test_hardfork_fork_ids(spec: &ChainSpec, cases: &[(EthereumHardfork, ForkId)]) { fn test_hardfork_fork_ids(spec: &ChainSpec, cases: &[(EthereumHardfork, ForkId)]) {
for (hardfork, expected_id) in cases { for (hardfork, expected_id) in cases {

View File

@ -17,7 +17,6 @@ reth-chainspec.workspace = true
reth-consensus-common.workspace = true reth-consensus-common.workspace = true
reth-consensus.workspace = true reth-consensus.workspace = true
reth-primitives.workspace = true reth-primitives.workspace = true
reth-trie-common.workspace = true
# op-reth # op-reth
reth-optimism-forks.workspace = true reth-optimism-forks.workspace = true