Skip to content

Commit

Permalink
chore: replace trie-common dep with alloy-trie (#13652)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Jan 4, 2025
1 parent 2c94d7b commit 72eabe0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

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

5 changes: 1 addition & 4 deletions crates/chainspec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ workspace = true
# reth
reth-ethereum-forks.workspace = true
reth-network-peers.workspace = true
reth-trie-common.workspace = true
alloy-trie = { workspace = true, features = ["ethereum"] }
reth-primitives-traits.workspace = true

# ethereum
Expand Down Expand Up @@ -52,20 +52,17 @@ std = [
"reth-ethereum-forks/std",
"derive_more/std",
"reth-network-peers/std",
"reth-trie-common/std",
"serde_json/std"
]
arbitrary = [
"alloy-chains/arbitrary",
"reth-ethereum-forks/arbitrary",
"reth-primitives-traits/arbitrary",
"reth-trie-common/arbitrary",
"alloy-consensus/arbitrary",
"alloy-eips/arbitrary",
"alloy-primitives/arbitrary",
"alloy-trie/arbitrary"
]
test-utils = [
"reth-primitives-traits/test-utils",
"reth-trie-common/test-utils"
]
13 changes: 5 additions & 8 deletions crates/chainspec/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use alloy_eips::{
};
use alloy_genesis::Genesis;
use alloy_primitives::{address, b256, Address, BlockNumber, B256, U256};
use alloy_trie::root::state_root_ref_unhashed;
use derive_more::From;
use reth_ethereum_forks::{
ChainHardforks, DisplayHardforks, EthereumHardfork, EthereumHardforks, ForkCondition,
Expand All @@ -28,7 +29,6 @@ use reth_network_peers::{
sepolia_nodes, NodeRecord,
};
use reth_primitives_traits::SealedHeader;
use reth_trie_common::root::state_root_ref_unhashed;

/// The Ethereum mainnet spec
pub static MAINNET: LazyLock<Arc<ChainSpec>> = LazyLock::new(|| {
Expand Down Expand Up @@ -1023,17 +1023,14 @@ pub fn test_fork_ids(spec: &ChainSpec, cases: &[(Head, ForkId)]) {

#[cfg(test)]
mod tests {
use core::ops::Deref;
use std::{collections::HashMap, str::FromStr};

use super::*;
use alloy_chains::Chain;
use alloy_genesis::{ChainConfig, GenesisAccount};
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_trie_common::TrieAccount;

use super::*;
use std::{collections::HashMap, str::FromStr};

fn test_hardfork_fork_ids(spec: &ChainSpec, cases: &[(EthereumHardfork, ForkId)]) {
for (hardfork, expected_id) in cases {
Expand Down
1 change: 0 additions & 1 deletion crates/optimism/consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ reth-chainspec.workspace = true
reth-consensus-common.workspace = true
reth-consensus.workspace = true
reth-primitives.workspace = true
reth-trie-common.workspace = true

# op-reth
reth-optimism-forks.workspace = true
Expand Down

0 comments on commit 72eabe0

Please sign in to comment.