diff --git a/Cargo.lock b/Cargo.lock index 03d1fddea..7472f3ac5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9578,6 +9578,7 @@ dependencies = [ "auto_impl", "reth-chainspec", "reth-db-api", + "reth-db-models", "reth-ethereum-primitives", "reth-execution-types", "reth-primitives-traits", diff --git a/crates/storage/storage-api/Cargo.toml b/crates/storage/storage-api/Cargo.toml index 8a29c95df..88e3f4377 100644 --- a/crates/storage/storage-api/Cargo.toml +++ b/crates/storage/storage-api/Cargo.toml @@ -13,6 +13,7 @@ workspace = true [dependencies] # reth +reth-db-models.workspace = true reth-chainspec.workspace = true reth-db-api.workspace = true reth-execution-types.workspace = true diff --git a/crates/storage/storage-api/src/account.rs b/crates/storage/storage-api/src/account.rs index 4a23c1059..b01deb359 100644 --- a/crates/storage/storage-api/src/account.rs +++ b/crates/storage/storage-api/src/account.rs @@ -5,7 +5,7 @@ use alloc::{ use alloy_primitives::{Address, BlockNumber}; use auto_impl::auto_impl; use core::ops::{RangeBounds, RangeInclusive}; -use reth_db_api::models::AccountBeforeTx; +use reth_db_models::AccountBeforeTx; use reth_primitives_traits::Account; use reth_storage_errors::provider::ProviderResult; diff --git a/crates/storage/storage-api/src/block_indices.rs b/crates/storage/storage-api/src/block_indices.rs index bfb22ecbc..5a4f1e22b 100644 --- a/crates/storage/storage-api/src/block_indices.rs +++ b/crates/storage/storage-api/src/block_indices.rs @@ -1,7 +1,7 @@ use alloc::vec::Vec; use alloy_primitives::BlockNumber; use core::ops::RangeInclusive; -use reth_db_api::models::StoredBlockBodyIndices; +use reth_db_models::StoredBlockBodyIndices; use reth_storage_errors::provider::ProviderResult; /// Client trait for fetching block body indices related data. diff --git a/crates/storage/storage-api/src/chain.rs b/crates/storage/storage-api/src/chain.rs index 83eace1a9..e308b14ec 100644 --- a/crates/storage/storage-api/src/chain.rs +++ b/crates/storage/storage-api/src/chain.rs @@ -6,11 +6,12 @@ use core::marker::PhantomData; use reth_chainspec::{ChainSpecProvider, EthereumHardforks}; use reth_db_api::{ cursor::{DbCursorRO, DbCursorRW}, - models::{StoredBlockOmmers, StoredBlockWithdrawals}, + models::StoredBlockOmmers, tables, transaction::{DbTx, DbTxMut}, DbTxUnwindExt, }; +use reth_db_models::StoredBlockWithdrawals; use reth_ethereum_primitives::TransactionSigned; use reth_primitives_traits::{ Block, BlockBody, FullBlockHeader, FullNodePrimitives, SignedTransaction, diff --git a/crates/storage/storage-api/src/hashing.rs b/crates/storage/storage-api/src/hashing.rs index 911dfbdef..38964a244 100644 --- a/crates/storage/storage-api/src/hashing.rs +++ b/crates/storage/storage-api/src/hashing.rs @@ -2,7 +2,8 @@ use alloc::collections::{BTreeMap, BTreeSet}; use alloy_primitives::{map::HashMap, Address, BlockNumber, B256}; use auto_impl::auto_impl; use core::ops::{RangeBounds, RangeInclusive}; -use reth_db_api::models::{AccountBeforeTx, BlockNumberAddress}; +use reth_db_api::models::BlockNumberAddress; +use reth_db_models::AccountBeforeTx; use reth_primitives_traits::{Account, StorageEntry}; use reth_storage_errors::provider::ProviderResult; diff --git a/crates/storage/storage-api/src/history.rs b/crates/storage/storage-api/src/history.rs index befe5b2a3..0287f1e64 100644 --- a/crates/storage/storage-api/src/history.rs +++ b/crates/storage/storage-api/src/history.rs @@ -1,7 +1,8 @@ use alloy_primitives::{Address, BlockNumber, B256}; use auto_impl::auto_impl; use core::ops::{RangeBounds, RangeInclusive}; -use reth_db_api::models::{AccountBeforeTx, BlockNumberAddress}; +use reth_db_api::models::BlockNumberAddress; +use reth_db_models::AccountBeforeTx; use reth_primitives_traits::StorageEntry; use reth_storage_errors::provider::ProviderResult; diff --git a/crates/storage/storage-api/src/noop.rs b/crates/storage/storage-api/src/noop.rs index da67b7fdc..75c0af81d 100644 --- a/crates/storage/storage-api/src/noop.rs +++ b/crates/storage/storage-api/src/noop.rs @@ -20,7 +20,7 @@ use core::{ ops::{RangeBounds, RangeInclusive}, }; use reth_chainspec::{ChainInfo, ChainSpecProvider, EthChainSpec, MAINNET}; -use reth_db_api::models::{AccountBeforeTx, StoredBlockBodyIndices}; +use reth_db_models::{AccountBeforeTx, StoredBlockBodyIndices}; use reth_ethereum_primitives::EthPrimitives; use reth_primitives_traits::{ Account, Bytecode, NodePrimitives, RecoveredBlock, SealedBlock, SealedHeader,