mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(blockchain-tree): replace reth-primitives with alloy-eips (#11276)
Signed-off-by: Abhishekkochar <abhishekkochar2@gmail.com>
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6394,6 +6394,7 @@ name = "reth-blockchain-tree"
|
||||
version = "1.0.7"
|
||||
dependencies = [
|
||||
"alloy-consensus",
|
||||
"alloy-eips",
|
||||
"alloy-genesis",
|
||||
"alloy-primitives",
|
||||
"aquamarine",
|
||||
|
||||
@ -32,6 +32,7 @@ reth-node-types.workspace = true
|
||||
|
||||
# ethereum
|
||||
alloy-primitives.workspace = true
|
||||
alloy-eips.workspace = true
|
||||
|
||||
# common
|
||||
parking_lot.workspace = true
|
||||
|
||||
@ -183,8 +183,9 @@ impl BlockBuffer {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::BlockBuffer;
|
||||
use alloy_eips::BlockNumHash;
|
||||
use alloy_primitives::BlockHash;
|
||||
use reth_primitives::{BlockNumHash, SealedBlockWithSenders};
|
||||
use reth_primitives::SealedBlockWithSenders;
|
||||
use reth_testing_utils::generators::{self, random_block, BlockParams, Rng};
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@ -2,10 +2,11 @@
|
||||
|
||||
use super::state::SidechainId;
|
||||
use crate::canonical_chain::CanonicalChain;
|
||||
use alloy_eips::BlockNumHash;
|
||||
use alloy_primitives::{BlockHash, BlockNumber};
|
||||
use linked_hash_set::LinkedHashSet;
|
||||
use reth_execution_types::Chain;
|
||||
use reth_primitives::{BlockNumHash, SealedBlockWithSenders};
|
||||
use reth_primitives::SealedBlockWithSenders;
|
||||
use std::collections::{btree_map, hash_map, BTreeMap, BTreeSet, HashMap, HashSet};
|
||||
|
||||
/// Internal indices of the blocks and chains.
|
||||
|
||||
@ -5,6 +5,7 @@ use crate::{
|
||||
state::{SidechainId, TreeState},
|
||||
AppendableChain, BlockIndices, BlockchainTreeConfig, ExecutionData, TreeExternals,
|
||||
};
|
||||
use alloy_eips::{BlockNumHash, ForkBlock};
|
||||
use alloy_primitives::{BlockHash, BlockNumber, B256, U256};
|
||||
use reth_blockchain_tree_api::{
|
||||
error::{BlockchainTreeError, CanonicalError, InsertBlockError, InsertBlockErrorKind},
|
||||
@ -16,8 +17,8 @@ use reth_execution_errors::{BlockExecutionError, BlockValidationError};
|
||||
use reth_execution_types::{Chain, ExecutionOutcome};
|
||||
use reth_node_types::NodeTypesWithDB;
|
||||
use reth_primitives::{
|
||||
BlockNumHash, EthereumHardfork, ForkBlock, GotExpected, Hardforks, Receipt, SealedBlock,
|
||||
SealedBlockWithSenders, SealedHeader, StaticFileSegment,
|
||||
EthereumHardfork, GotExpected, Hardforks, Receipt, SealedBlock, SealedBlockWithSenders,
|
||||
SealedHeader, StaticFileSegment,
|
||||
};
|
||||
use reth_provider::{
|
||||
providers::ProviderNodeTypes, BlockExecutionWriter, BlockNumReader, BlockWriter,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//! [`ExecutionDataProvider`] implementations used by the tree.
|
||||
|
||||
use alloy_eips::ForkBlock;
|
||||
use alloy_primitives::{BlockHash, BlockNumber};
|
||||
use reth_primitives::ForkBlock;
|
||||
use reth_provider::{BlockExecutionForkProvider, ExecutionDataProvider, ExecutionOutcome};
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
use alloy_eips::BlockNumHash;
|
||||
use alloy_primitives::{BlockHash, BlockNumber};
|
||||
use reth_primitives::BlockNumHash;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
/// This keeps track of (non-finalized) blocks of the canonical chain.
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
|
||||
use super::externals::TreeExternals;
|
||||
use crate::BundleStateDataRef;
|
||||
use alloy_eips::ForkBlock;
|
||||
use alloy_primitives::{BlockHash, BlockNumber, U256};
|
||||
use reth_blockchain_tree_api::{
|
||||
error::{BlockchainTreeError, InsertBlockErrorKind},
|
||||
@ -14,7 +15,7 @@ use reth_consensus::{Consensus, ConsensusError, PostExecutionInput};
|
||||
use reth_evm::execute::{BlockExecutorProvider, Executor};
|
||||
use reth_execution_errors::BlockExecutionError;
|
||||
use reth_execution_types::{Chain, ExecutionOutcome};
|
||||
use reth_primitives::{ForkBlock, GotExpected, SealedBlockWithSenders, SealedHeader};
|
||||
use reth_primitives::{GotExpected, SealedBlockWithSenders, SealedHeader};
|
||||
use reth_provider::{
|
||||
providers::{BundleStateProvider, ConsistentDbView, ProviderNodeTypes},
|
||||
FullExecutionDataProvider, ProviderError, StateRootProvider, TryIntoHistoricalStateProvider,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
use alloy_eips::BlockNumHash;
|
||||
use alloy_primitives::{BlockHash, BlockNumber};
|
||||
use reth_blockchain_tree_api::{
|
||||
self,
|
||||
@ -5,7 +6,7 @@ use reth_blockchain_tree_api::{
|
||||
BlockValidationKind, BlockchainTreeEngine, BlockchainTreeViewer, CanonicalOutcome,
|
||||
InsertPayloadOk,
|
||||
};
|
||||
use reth_primitives::{BlockNumHash, Receipt, SealedBlock, SealedBlockWithSenders, SealedHeader};
|
||||
use reth_primitives::{Receipt, SealedBlock, SealedBlockWithSenders, SealedHeader};
|
||||
use reth_provider::{
|
||||
BlockchainTreePendingStateProvider, CanonStateNotificationSender, CanonStateNotifications,
|
||||
CanonStateSubscriptions, FullExecutionDataProvider,
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
//! Wrapper around `BlockchainTree` that allows for it to be shared.
|
||||
|
||||
use super::BlockchainTree;
|
||||
use alloy_eips::BlockNumHash;
|
||||
use alloy_primitives::{BlockHash, BlockNumber};
|
||||
use parking_lot::RwLock;
|
||||
use reth_blockchain_tree_api::{
|
||||
@ -10,7 +11,7 @@ use reth_blockchain_tree_api::{
|
||||
};
|
||||
use reth_evm::execute::BlockExecutorProvider;
|
||||
use reth_node_types::NodeTypesWithDB;
|
||||
use reth_primitives::{BlockNumHash, Receipt, SealedBlock, SealedBlockWithSenders, SealedHeader};
|
||||
use reth_primitives::{Receipt, SealedBlock, SealedBlockWithSenders, SealedHeader};
|
||||
use reth_provider::{
|
||||
providers::ProviderNodeTypes, BlockchainTreePendingStateProvider, CanonStateSubscriptions,
|
||||
FullExecutionDataProvider, ProviderError,
|
||||
|
||||
Reference in New Issue
Block a user