chore: phase out reth-primitives from storage-api (#14462)

This commit is contained in:
Matthias Seitz
2025-02-13 11:00:00 +01:00
committed by GitHub
parent cfb91e94dd
commit f425a4dbcd
6 changed files with 14 additions and 12 deletions

View File

@ -17,7 +17,6 @@ reth-chainspec.workspace = true
reth-db-models.workspace = true
reth-db-api.workspace = true
reth-execution-types.workspace = true
reth-primitives.workspace = true
reth-primitives-traits.workspace = true
reth-prune-types.workspace = true
reth-stages-types.workspace = true
@ -26,6 +25,7 @@ reth-trie.workspace = true
reth-trie-db.workspace = true
reth-db.workspace = true
revm.workspace = true
reth-ethereum-primitives.workspace = true
# ethereum
alloy-eips.workspace = true
@ -43,7 +43,7 @@ std = [
"alloy-eips/std",
"alloy-primitives/std",
"alloy-rpc-types-engine/std",
"reth-primitives/std",
"reth-ethereum-primitives/std",
"reth-primitives-traits/std",
"revm/std",
"reth-stages-types/std",

View File

@ -6,7 +6,7 @@ use alloc::{sync::Arc, vec::Vec};
use alloy_eips::{BlockHashOrNumber, BlockId, BlockNumberOrTag};
use alloy_primitives::{BlockNumber, B256};
use core::ops::RangeInclusive;
use reth_primitives::{RecoveredBlock, SealedBlock, SealedHeader};
use reth_primitives_traits::{RecoveredBlock, SealedBlock, SealedHeader};
use reth_storage_errors::provider::ProviderResult;
/// A helper enum that represents the origin of the requested block.

View File

@ -11,7 +11,7 @@ use reth_db::{
transaction::{DbTx, DbTxMut},
DbTxUnwindExt,
};
use reth_primitives::TransactionSigned;
use reth_ethereum_primitives::TransactionSigned;
use reth_primitives_traits::{
Block, BlockBody, FullBlockHeader, FullNodePrimitives, SignedTransaction,
};
@ -93,7 +93,7 @@ impl<T, H> Default for EthStorage<T, H> {
}
}
impl<Provider, T, H> BlockBodyWriter<Provider, reth_primitives::BlockBody<T, H>>
impl<Provider, T, H> BlockBodyWriter<Provider, alloy_consensus::BlockBody<T, H>>
for EthStorage<T, H>
where
Provider: DBProvider<Tx: DbTxMut>,
@ -103,7 +103,7 @@ where
fn write_block_bodies(
&self,
provider: &Provider,
bodies: Vec<(u64, Option<reth_primitives::BlockBody<T, H>>)>,
bodies: Vec<(u64, Option<alloy_consensus::BlockBody<T, H>>)>,
_write_to: StorageLocation,
) -> ProviderResult<()> {
let mut ommers_cursor = provider.tx_ref().cursor_write::<tables::BlockOmmers<H>>()?;
@ -150,7 +150,7 @@ where
T: SignedTransaction,
H: FullBlockHeader,
{
type Block = reth_primitives::Block<T, H>;
type Block = alloy_consensus::Block<T, H>;
fn read_block_bodies(
&self,
@ -182,7 +182,7 @@ where
provider.ommers(header.number().into())?.unwrap_or_default()
};
bodies.push(reth_primitives::BlockBody { transactions, ommers, withdrawals });
bodies.push(alloy_consensus::BlockBody { transactions, ommers, withdrawals });
}
Ok(bodies)

View File

@ -3,7 +3,7 @@ use alloy_primitives::{map::HashMap, Address, BlockNumber, B256};
use auto_impl::auto_impl;
use core::ops::{RangeBounds, RangeInclusive};
use reth_db::models::{AccountBeforeTx, BlockNumberAddress};
use reth_primitives::{Account, StorageEntry};
use reth_primitives_traits::{Account, StorageEntry};
use reth_storage_errors::provider::ProviderResult;
/// Hashing Writer

View File

@ -21,8 +21,10 @@ use core::{
};
use reth_chainspec::{ChainInfo, ChainSpecProvider, EthChainSpec, MAINNET};
use reth_db_models::{AccountBeforeTx, StoredBlockBodyIndices};
use reth_primitives::{EthPrimitives, RecoveredBlock, SealedBlock};
use reth_primitives_traits::{Account, Bytecode, NodePrimitives, SealedHeader};
use reth_ethereum_primitives::EthPrimitives;
use reth_primitives_traits::{
Account, Bytecode, NodePrimitives, RecoveredBlock, SealedBlock, SealedHeader,
};
use reth_prune_types::{PruneCheckpoint, PruneSegment};
use reth_stages_types::{StageCheckpoint, StageId};
use reth_storage_errors::provider::{ProviderError, ProviderResult};