mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(chain-state): replace reth_primitives with alloy_primitives (#10975)
Signed-off-by: Abhishekkochar <abhishekkochar2@gmail.com>
This commit is contained in:
@ -21,6 +21,9 @@ reth-primitives.workspace = true
|
||||
reth-storage-api.workspace = true
|
||||
reth-trie.workspace = true
|
||||
|
||||
# alloy
|
||||
alloy-primitives.workspace = true
|
||||
|
||||
# async
|
||||
tokio = { workspace = true, features = ["sync", "macros", "rt-multi-thread"] }
|
||||
tokio-stream = { workspace = true, features = ["sync"] }
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
use alloy_primitives::BlockNumber;
|
||||
use parking_lot::RwLock;
|
||||
use reth_chainspec::ChainInfo;
|
||||
use reth_primitives::{BlockNumHash, BlockNumber, SealedHeader};
|
||||
use reth_primitives::{BlockNumHash, SealedHeader};
|
||||
use std::{
|
||||
sync::{
|
||||
atomic::{AtomicU64, Ordering},
|
||||
|
||||
@ -4,13 +4,14 @@ use crate::{
|
||||
CanonStateNotification, CanonStateNotificationSender, CanonStateNotifications,
|
||||
ChainInfoTracker, MemoryOverlayStateProvider,
|
||||
};
|
||||
use alloy_primitives::{Address, TxHash, B256};
|
||||
use parking_lot::RwLock;
|
||||
use reth_chainspec::ChainInfo;
|
||||
use reth_execution_types::{Chain, ExecutionOutcome};
|
||||
use reth_metrics::{metrics::Gauge, Metrics};
|
||||
use reth_primitives::{
|
||||
Address, BlockNumHash, Header, Receipt, Receipts, SealedBlock, SealedBlockWithSenders,
|
||||
SealedHeader, TransactionMeta, TransactionSigned, TxHash, B256,
|
||||
BlockNumHash, Header, Receipt, Receipts, SealedBlock, SealedBlockWithSenders, SealedHeader,
|
||||
TransactionMeta, TransactionSigned,
|
||||
};
|
||||
use reth_storage_api::StateProviderBox;
|
||||
use reth_trie::{updates::TrieUpdates, HashedPostState};
|
||||
@ -830,11 +831,10 @@ impl NewCanonicalChain {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::test_utils::TestBlockBuilder;
|
||||
use alloy_primitives::{BlockNumber, Bytes, StorageKey, StorageValue};
|
||||
use rand::Rng;
|
||||
use reth_errors::ProviderResult;
|
||||
use reth_primitives::{
|
||||
Account, BlockNumber, Bytecode, Bytes, Receipt, Requests, StorageKey, StorageValue,
|
||||
};
|
||||
use reth_primitives::{Account, Bytecode, Receipt, Requests};
|
||||
use reth_storage_api::{
|
||||
AccountReader, BlockHashReader, StateProofProvider, StateProvider, StateRootProvider,
|
||||
StorageRootProvider,
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
use super::ExecutedBlock;
|
||||
use alloy_primitives::{keccak256, Address, BlockNumber, Bytes, StorageKey, StorageValue, B256};
|
||||
use reth_errors::ProviderResult;
|
||||
use reth_primitives::{
|
||||
keccak256, Account, Address, BlockNumber, Bytecode, Bytes, StorageKey, StorageValue, B256,
|
||||
};
|
||||
use reth_primitives::{Account, Bytecode};
|
||||
use reth_storage_api::{
|
||||
AccountReader, BlockHashReader, StateProofProvider, StateProvider, StateProviderBox,
|
||||
StateRootProvider, StorageRootProvider,
|
||||
|
||||
@ -2,6 +2,7 @@ use crate::{
|
||||
in_memory::ExecutedBlock, CanonStateNotification, CanonStateNotifications,
|
||||
CanonStateSubscriptions,
|
||||
};
|
||||
use alloy_primitives::{Address, BlockNumber, B256, U256};
|
||||
use alloy_signer::SignerSync;
|
||||
use alloy_signer_local::PrivateKeySigner;
|
||||
use rand::{thread_rng, Rng};
|
||||
@ -10,8 +11,8 @@ use reth_execution_types::{Chain, ExecutionOutcome};
|
||||
use reth_primitives::{
|
||||
constants::{EIP1559_INITIAL_BASE_FEE, EMPTY_ROOT_HASH},
|
||||
proofs::{calculate_receipt_root, calculate_transaction_root, calculate_withdrawals_root},
|
||||
Address, BlockNumber, Header, Receipt, Receipts, Requests, SealedBlock, SealedBlockWithSenders,
|
||||
Signature, Transaction, TransactionSigned, TransactionSignedEcRecovered, TxEip1559, B256, U256,
|
||||
Header, Receipt, Receipts, Requests, SealedBlock, SealedBlockWithSenders, Signature,
|
||||
Transaction, TransactionSigned, TransactionSignedEcRecovered, TxEip1559,
|
||||
};
|
||||
use reth_trie::{root::state_root_unhashed, updates::TrieUpdates, HashedPostState};
|
||||
use revm::{db::BundleState, primitives::AccountInfo};
|
||||
|
||||
Reference in New Issue
Block a user