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:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6404,6 +6404,7 @@ dependencies = [
|
|||||||
name = "reth-chain-state"
|
name = "reth-chain-state"
|
||||||
version = "1.0.6"
|
version = "1.0.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"alloy-primitives",
|
||||||
"alloy-signer",
|
"alloy-signer",
|
||||||
"alloy-signer-local",
|
"alloy-signer-local",
|
||||||
"auto_impl",
|
"auto_impl",
|
||||||
|
|||||||
@ -21,6 +21,9 @@ reth-primitives.workspace = true
|
|||||||
reth-storage-api.workspace = true
|
reth-storage-api.workspace = true
|
||||||
reth-trie.workspace = true
|
reth-trie.workspace = true
|
||||||
|
|
||||||
|
# alloy
|
||||||
|
alloy-primitives.workspace = true
|
||||||
|
|
||||||
# async
|
# async
|
||||||
tokio = { workspace = true, features = ["sync", "macros", "rt-multi-thread"] }
|
tokio = { workspace = true, features = ["sync", "macros", "rt-multi-thread"] }
|
||||||
tokio-stream = { workspace = true, features = ["sync"] }
|
tokio-stream = { workspace = true, features = ["sync"] }
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
|
use alloy_primitives::BlockNumber;
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use reth_chainspec::ChainInfo;
|
use reth_chainspec::ChainInfo;
|
||||||
use reth_primitives::{BlockNumHash, BlockNumber, SealedHeader};
|
use reth_primitives::{BlockNumHash, SealedHeader};
|
||||||
use std::{
|
use std::{
|
||||||
sync::{
|
sync::{
|
||||||
atomic::{AtomicU64, Ordering},
|
atomic::{AtomicU64, Ordering},
|
||||||
|
|||||||
@ -4,13 +4,14 @@ use crate::{
|
|||||||
CanonStateNotification, CanonStateNotificationSender, CanonStateNotifications,
|
CanonStateNotification, CanonStateNotificationSender, CanonStateNotifications,
|
||||||
ChainInfoTracker, MemoryOverlayStateProvider,
|
ChainInfoTracker, MemoryOverlayStateProvider,
|
||||||
};
|
};
|
||||||
|
use alloy_primitives::{Address, TxHash, B256};
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use reth_chainspec::ChainInfo;
|
use reth_chainspec::ChainInfo;
|
||||||
use reth_execution_types::{Chain, ExecutionOutcome};
|
use reth_execution_types::{Chain, ExecutionOutcome};
|
||||||
use reth_metrics::{metrics::Gauge, Metrics};
|
use reth_metrics::{metrics::Gauge, Metrics};
|
||||||
use reth_primitives::{
|
use reth_primitives::{
|
||||||
Address, BlockNumHash, Header, Receipt, Receipts, SealedBlock, SealedBlockWithSenders,
|
BlockNumHash, Header, Receipt, Receipts, SealedBlock, SealedBlockWithSenders, SealedHeader,
|
||||||
SealedHeader, TransactionMeta, TransactionSigned, TxHash, B256,
|
TransactionMeta, TransactionSigned,
|
||||||
};
|
};
|
||||||
use reth_storage_api::StateProviderBox;
|
use reth_storage_api::StateProviderBox;
|
||||||
use reth_trie::{updates::TrieUpdates, HashedPostState};
|
use reth_trie::{updates::TrieUpdates, HashedPostState};
|
||||||
@ -830,11 +831,10 @@ impl NewCanonicalChain {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::test_utils::TestBlockBuilder;
|
use crate::test_utils::TestBlockBuilder;
|
||||||
|
use alloy_primitives::{BlockNumber, Bytes, StorageKey, StorageValue};
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
use reth_errors::ProviderResult;
|
use reth_errors::ProviderResult;
|
||||||
use reth_primitives::{
|
use reth_primitives::{Account, Bytecode, Receipt, Requests};
|
||||||
Account, BlockNumber, Bytecode, Bytes, Receipt, Requests, StorageKey, StorageValue,
|
|
||||||
};
|
|
||||||
use reth_storage_api::{
|
use reth_storage_api::{
|
||||||
AccountReader, BlockHashReader, StateProofProvider, StateProvider, StateRootProvider,
|
AccountReader, BlockHashReader, StateProofProvider, StateProvider, StateRootProvider,
|
||||||
StorageRootProvider,
|
StorageRootProvider,
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
use super::ExecutedBlock;
|
use super::ExecutedBlock;
|
||||||
|
use alloy_primitives::{keccak256, Address, BlockNumber, Bytes, StorageKey, StorageValue, B256};
|
||||||
use reth_errors::ProviderResult;
|
use reth_errors::ProviderResult;
|
||||||
use reth_primitives::{
|
use reth_primitives::{Account, Bytecode};
|
||||||
keccak256, Account, Address, BlockNumber, Bytecode, Bytes, StorageKey, StorageValue, B256,
|
|
||||||
};
|
|
||||||
use reth_storage_api::{
|
use reth_storage_api::{
|
||||||
AccountReader, BlockHashReader, StateProofProvider, StateProvider, StateProviderBox,
|
AccountReader, BlockHashReader, StateProofProvider, StateProvider, StateProviderBox,
|
||||||
StateRootProvider, StorageRootProvider,
|
StateRootProvider, StorageRootProvider,
|
||||||
|
|||||||
@ -2,6 +2,7 @@ use crate::{
|
|||||||
in_memory::ExecutedBlock, CanonStateNotification, CanonStateNotifications,
|
in_memory::ExecutedBlock, CanonStateNotification, CanonStateNotifications,
|
||||||
CanonStateSubscriptions,
|
CanonStateSubscriptions,
|
||||||
};
|
};
|
||||||
|
use alloy_primitives::{Address, BlockNumber, B256, U256};
|
||||||
use alloy_signer::SignerSync;
|
use alloy_signer::SignerSync;
|
||||||
use alloy_signer_local::PrivateKeySigner;
|
use alloy_signer_local::PrivateKeySigner;
|
||||||
use rand::{thread_rng, Rng};
|
use rand::{thread_rng, Rng};
|
||||||
@ -10,8 +11,8 @@ use reth_execution_types::{Chain, ExecutionOutcome};
|
|||||||
use reth_primitives::{
|
use reth_primitives::{
|
||||||
constants::{EIP1559_INITIAL_BASE_FEE, EMPTY_ROOT_HASH},
|
constants::{EIP1559_INITIAL_BASE_FEE, EMPTY_ROOT_HASH},
|
||||||
proofs::{calculate_receipt_root, calculate_transaction_root, calculate_withdrawals_root},
|
proofs::{calculate_receipt_root, calculate_transaction_root, calculate_withdrawals_root},
|
||||||
Address, BlockNumber, Header, Receipt, Receipts, Requests, SealedBlock, SealedBlockWithSenders,
|
Header, Receipt, Receipts, Requests, SealedBlock, SealedBlockWithSenders, Signature,
|
||||||
Signature, Transaction, TransactionSigned, TransactionSignedEcRecovered, TxEip1559, B256, U256,
|
Transaction, TransactionSigned, TransactionSignedEcRecovered, TxEip1559,
|
||||||
};
|
};
|
||||||
use reth_trie::{root::state_root_unhashed, updates::TrieUpdates, HashedPostState};
|
use reth_trie::{root::state_root_unhashed, updates::TrieUpdates, HashedPostState};
|
||||||
use revm::{db::BundleState, primitives::AccountInfo};
|
use revm::{db::BundleState, primitives::AccountInfo};
|
||||||
|
|||||||
Reference in New Issue
Block a user