mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(storage-api): reduce dependence on reth-db (#14539)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -9490,7 +9490,6 @@ dependencies = [
|
|||||||
"reth-chainspec",
|
"reth-chainspec",
|
||||||
"reth-db",
|
"reth-db",
|
||||||
"reth-db-api",
|
"reth-db-api",
|
||||||
"reth-db-models",
|
|
||||||
"reth-ethereum-primitives",
|
"reth-ethereum-primitives",
|
||||||
"reth-execution-types",
|
"reth-execution-types",
|
||||||
"reth-primitives-traits",
|
"reth-primitives-traits",
|
||||||
|
|||||||
@ -25,7 +25,7 @@ pub use accounts::*;
|
|||||||
pub use blocks::*;
|
pub use blocks::*;
|
||||||
pub use integer_list::IntegerList;
|
pub use integer_list::IntegerList;
|
||||||
pub use reth_db_models::{
|
pub use reth_db_models::{
|
||||||
blocks::StaticFileBlockWithdrawals, AccountBeforeTx, ClientVersion, StoredBlockBodyIndices,
|
AccountBeforeTx, ClientVersion, StaticFileBlockWithdrawals, StoredBlockBodyIndices,
|
||||||
StoredBlockWithdrawals,
|
StoredBlockWithdrawals,
|
||||||
};
|
};
|
||||||
pub use sharded_key::ShardedKey;
|
pub use sharded_key::ShardedKey;
|
||||||
|
|||||||
@ -14,7 +14,6 @@ workspace = true
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
# reth
|
# reth
|
||||||
reth-chainspec.workspace = true
|
reth-chainspec.workspace = true
|
||||||
reth-db-models.workspace = true
|
|
||||||
reth-db-api.workspace = true
|
reth-db-api.workspace = true
|
||||||
reth-execution-types.workspace = true
|
reth-execution-types.workspace = true
|
||||||
reth-primitives-traits.workspace = true
|
reth-primitives-traits.workspace = true
|
||||||
|
|||||||
@ -5,7 +5,7 @@ use alloc::{
|
|||||||
use alloy_primitives::{Address, BlockNumber};
|
use alloy_primitives::{Address, BlockNumber};
|
||||||
use auto_impl::auto_impl;
|
use auto_impl::auto_impl;
|
||||||
use core::ops::{RangeBounds, RangeInclusive};
|
use core::ops::{RangeBounds, RangeInclusive};
|
||||||
use reth_db_models::AccountBeforeTx;
|
use reth_db_api::models::AccountBeforeTx;
|
||||||
use reth_primitives_traits::Account;
|
use reth_primitives_traits::Account;
|
||||||
use reth_storage_errors::provider::ProviderResult;
|
use reth_storage_errors::provider::ProviderResult;
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
use alloc::vec::Vec;
|
use alloc::vec::Vec;
|
||||||
use alloy_primitives::BlockNumber;
|
use alloy_primitives::BlockNumber;
|
||||||
use core::ops::RangeInclusive;
|
use core::ops::RangeInclusive;
|
||||||
use reth_db_models::StoredBlockBodyIndices;
|
use reth_db_api::models::StoredBlockBodyIndices;
|
||||||
use reth_storage_errors::provider::ProviderResult;
|
use reth_storage_errors::provider::ProviderResult;
|
||||||
|
|
||||||
/// Client trait for fetching block body indices related data.
|
/// Client trait for fetching block body indices related data.
|
||||||
|
|||||||
@ -4,10 +4,10 @@ use alloy_consensus::Header;
|
|||||||
use alloy_primitives::BlockNumber;
|
use alloy_primitives::BlockNumber;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use reth_chainspec::{ChainSpecProvider, EthereumHardforks};
|
use reth_chainspec::{ChainSpecProvider, EthereumHardforks};
|
||||||
use reth_db::{
|
use reth_db::tables;
|
||||||
|
use reth_db_api::{
|
||||||
cursor::{DbCursorRO, DbCursorRW},
|
cursor::{DbCursorRO, DbCursorRW},
|
||||||
models::{StoredBlockOmmers, StoredBlockWithdrawals},
|
models::{StoredBlockOmmers, StoredBlockWithdrawals},
|
||||||
tables,
|
|
||||||
transaction::{DbTx, DbTxMut},
|
transaction::{DbTx, DbTxMut},
|
||||||
DbTxUnwindExt,
|
DbTxUnwindExt,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,7 +2,7 @@ use alloc::collections::{BTreeMap, BTreeSet};
|
|||||||
use alloy_primitives::{map::HashMap, Address, BlockNumber, B256};
|
use alloy_primitives::{map::HashMap, Address, BlockNumber, B256};
|
||||||
use auto_impl::auto_impl;
|
use auto_impl::auto_impl;
|
||||||
use core::ops::{RangeBounds, RangeInclusive};
|
use core::ops::{RangeBounds, RangeInclusive};
|
||||||
use reth_db::models::{AccountBeforeTx, BlockNumberAddress};
|
use reth_db_api::models::{AccountBeforeTx, BlockNumberAddress};
|
||||||
use reth_primitives_traits::{Account, StorageEntry};
|
use reth_primitives_traits::{Account, StorageEntry};
|
||||||
use reth_storage_errors::provider::ProviderResult;
|
use reth_storage_errors::provider::ProviderResult;
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ pub trait HashingWriter: Send + Sync {
|
|||||||
range: impl RangeBounds<BlockNumber>,
|
range: impl RangeBounds<BlockNumber>,
|
||||||
) -> ProviderResult<BTreeMap<B256, Option<Account>>>;
|
) -> ProviderResult<BTreeMap<B256, Option<Account>>>;
|
||||||
|
|
||||||
/// Inserts all accounts into [reth_db::tables::AccountsHistory] table.
|
/// Inserts all accounts into the `AccountsHistory` table.
|
||||||
///
|
///
|
||||||
/// # Returns
|
/// # Returns
|
||||||
///
|
///
|
||||||
@ -39,7 +39,7 @@ pub trait HashingWriter: Send + Sync {
|
|||||||
accounts: impl IntoIterator<Item = (Address, Option<Account>)>,
|
accounts: impl IntoIterator<Item = (Address, Option<Account>)>,
|
||||||
) -> ProviderResult<BTreeMap<B256, Option<Account>>>;
|
) -> ProviderResult<BTreeMap<B256, Option<Account>>>;
|
||||||
|
|
||||||
/// Unwind and clear storage hashing
|
/// Unwind and clear storage hashing.
|
||||||
///
|
///
|
||||||
/// # Returns
|
/// # Returns
|
||||||
///
|
///
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
use alloy_primitives::{Address, BlockNumber, B256};
|
use alloy_primitives::{Address, BlockNumber, B256};
|
||||||
use auto_impl::auto_impl;
|
use auto_impl::auto_impl;
|
||||||
use core::ops::{RangeBounds, RangeInclusive};
|
use core::ops::{RangeBounds, RangeInclusive};
|
||||||
use reth_db::models::{AccountBeforeTx, BlockNumberAddress};
|
use reth_db_api::models::{AccountBeforeTx, BlockNumberAddress};
|
||||||
use reth_primitives_traits::StorageEntry;
|
use reth_primitives_traits::StorageEntry;
|
||||||
use reth_storage_errors::provider::ProviderResult;
|
use reth_storage_errors::provider::ProviderResult;
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ use core::{
|
|||||||
ops::{RangeBounds, RangeInclusive},
|
ops::{RangeBounds, RangeInclusive},
|
||||||
};
|
};
|
||||||
use reth_chainspec::{ChainInfo, ChainSpecProvider, EthChainSpec, MAINNET};
|
use reth_chainspec::{ChainInfo, ChainSpecProvider, EthChainSpec, MAINNET};
|
||||||
use reth_db_models::{AccountBeforeTx, StoredBlockBodyIndices};
|
use reth_db_api::models::{AccountBeforeTx, StoredBlockBodyIndices};
|
||||||
use reth_ethereum_primitives::EthPrimitives;
|
use reth_ethereum_primitives::EthPrimitives;
|
||||||
use reth_primitives_traits::{
|
use reth_primitives_traits::{
|
||||||
Account, Bytecode, NodePrimitives, RecoveredBlock, SealedBlock, SealedHeader,
|
Account, Bytecode, NodePrimitives, RecoveredBlock, SealedBlock, SealedHeader,
|
||||||
|
|||||||
Reference in New Issue
Block a user