Feat: Introduce db_models crate into storage-api crate and update imports (#14640)

This commit is contained in:
Udoagwa Franklin
2025-02-21 19:43:19 +01:00
committed by GitHub
parent ae96ee9632
commit 2101ae8918
8 changed files with 11 additions and 6 deletions

1
Cargo.lock generated
View File

@ -9578,6 +9578,7 @@ dependencies = [
"auto_impl", "auto_impl",
"reth-chainspec", "reth-chainspec",
"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",

View File

@ -13,6 +13,7 @@ workspace = true
[dependencies] [dependencies]
# reth # reth
reth-db-models.workspace = true
reth-chainspec.workspace = true reth-chainspec.workspace = true
reth-db-api.workspace = true reth-db-api.workspace = true
reth-execution-types.workspace = true reth-execution-types.workspace = true

View File

@ -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_api::models::AccountBeforeTx; use reth_db_models::AccountBeforeTx;
use reth_primitives_traits::Account; use reth_primitives_traits::Account;
use reth_storage_errors::provider::ProviderResult; use reth_storage_errors::provider::ProviderResult;

View File

@ -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_api::models::StoredBlockBodyIndices; use reth_db_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.

View File

@ -6,11 +6,12 @@ use core::marker::PhantomData;
use reth_chainspec::{ChainSpecProvider, EthereumHardforks}; use reth_chainspec::{ChainSpecProvider, EthereumHardforks};
use reth_db_api::{ use reth_db_api::{
cursor::{DbCursorRO, DbCursorRW}, cursor::{DbCursorRO, DbCursorRW},
models::{StoredBlockOmmers, StoredBlockWithdrawals}, models::StoredBlockOmmers,
tables, tables,
transaction::{DbTx, DbTxMut}, transaction::{DbTx, DbTxMut},
DbTxUnwindExt, DbTxUnwindExt,
}; };
use reth_db_models::StoredBlockWithdrawals;
use reth_ethereum_primitives::TransactionSigned; use reth_ethereum_primitives::TransactionSigned;
use reth_primitives_traits::{ use reth_primitives_traits::{
Block, BlockBody, FullBlockHeader, FullNodePrimitives, SignedTransaction, Block, BlockBody, FullBlockHeader, FullNodePrimitives, SignedTransaction,

View File

@ -2,7 +2,8 @@ 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_api::models::{AccountBeforeTx, BlockNumberAddress}; use reth_db_api::models::BlockNumberAddress;
use reth_db_models::AccountBeforeTx;
use reth_primitives_traits::{Account, StorageEntry}; use reth_primitives_traits::{Account, StorageEntry};
use reth_storage_errors::provider::ProviderResult; use reth_storage_errors::provider::ProviderResult;

View File

@ -1,7 +1,8 @@
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_api::models::{AccountBeforeTx, BlockNumberAddress}; use reth_db_api::models::BlockNumberAddress;
use reth_db_models::AccountBeforeTx;
use reth_primitives_traits::StorageEntry; use reth_primitives_traits::StorageEntry;
use reth_storage_errors::provider::ProviderResult; use reth_storage_errors::provider::ProviderResult;

View File

@ -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_api::models::{AccountBeforeTx, StoredBlockBodyIndices}; use reth_db_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,