diff --git a/crates/storage/db/src/static_file/masks.rs b/crates/storage/db/src/static_file/masks.rs index d5b221c461a6..f89a0eac1d4e 100644 --- a/crates/storage/db/src/static_file/masks.rs +++ b/crates/storage/db/src/static_file/masks.rs @@ -1,10 +1,10 @@ use crate::{ add_static_file_mask, static_file::mask::{ColumnSelectorOne, ColumnSelectorTwo}, - BlockBodyIndices, BlockOmmers, BlockWithdrawals, HeaderTerminalDifficulties, + BlockBodyIndices, BlockWithdrawals, HeaderTerminalDifficulties, }; use alloy_primitives::BlockHash; -use reth_db_api::table::Table; +use reth_db_api::{models::StoredBlockOmmers, table::Table}; // HEADER MASKS add_static_file_mask! { @@ -46,13 +46,13 @@ add_static_file_mask! { // BLOCK_META MASKS add_static_file_mask! { #[doc = "Mask for a `StoredBlockBodyIndices` from BlockMeta static file segment"] - BodyIndiceMask, ::Value, 0b001 + BodyIndicesMask, ::Value, 0b001 } add_static_file_mask! { - #[doc = "Mask for a `StoredBlockWithdrawals` from BlockMeta static file segment"] - OmmerMask, H, 0b010 + #[doc = "Mask for a `StoredBlockOmmers` from BlockMeta static file segment"] + OmmersMask, StoredBlockOmmers, 0b010 } add_static_file_mask! { #[doc = "Mask for a `StoredBlockWithdrawals` from BlockMeta static file segment"] - WithdrawalMask, ::Value, 0b100 + WithdrawalsMask, ::Value, 0b100 } diff --git a/crates/storage/provider/src/providers/static_file/jar.rs b/crates/storage/provider/src/providers/static_file/jar.rs index 8be60b27eb2c..a5a9ff42fe8e 100644 --- a/crates/storage/provider/src/providers/static_file/jar.rs +++ b/crates/storage/provider/src/providers/static_file/jar.rs @@ -16,17 +16,15 @@ use reth_chainspec::ChainInfo; use reth_db::{ models::StoredBlockBodyIndices, static_file::{ - BlockHashMask, BodyIndiceMask, HeaderMask, HeaderWithHashMask, OmmerMask, ReceiptMask, - StaticFileCursor, TDWithHashMask, TotalDifficultyMask, TransactionMask, WithdrawalMask, + BlockHashMask, BodyIndicesMask, HeaderMask, HeaderWithHashMask, OmmersMask, ReceiptMask, + StaticFileCursor, TDWithHashMask, TotalDifficultyMask, TransactionMask, WithdrawalsMask, }, table::{Decompress, Value}, }; use reth_node_types::{FullNodePrimitives, NodePrimitives}; use reth_primitives::{transaction::recover_signers, SealedHeader, TransactionMeta}; use reth_primitives_traits::SignedTransaction; -use reth_storage_api::{ - BlockBodyIndicesProvider, BlockReader, OmmersProvider, WithdrawalsProvider, -}; +use reth_storage_api::{BlockBodyIndicesProvider, OmmersProvider, WithdrawalsProvider}; use reth_storage_errors::provider::{ProviderError, ProviderResult}; use std::{ fmt::Debug, @@ -366,7 +364,7 @@ impl WithdrawalsProvider for StaticFileJarProvider<'_, N> { _: u64, ) -> ProviderResult> { if let Some(num) = id.as_number() { - return Ok(self.cursor()?.get_one::(num.into())?.map(|s| s.withdrawals)) + return Ok(self.cursor()?.get_one::(num.into())?.map(|s| s.withdrawals)) } // Only accepts block number quries Err(ProviderError::UnsupportedProvider) @@ -383,7 +381,7 @@ impl> OmmersProvider for StaticFileJar if let Some(num) = id.as_number() { return Ok(self .cursor()? - .get_one::>(num.into())? + .get_one::>(num.into())? .map(|s| s.ommers)) } // Only accepts block number quries @@ -393,6 +391,6 @@ impl> OmmersProvider for StaticFileJar impl BlockBodyIndicesProvider for StaticFileJarProvider<'_, N> { fn block_body_indices(&self, num: u64) -> ProviderResult> { - self.cursor()?.get_one::(num.into()) + self.cursor()?.get_one::(num.into()) } } diff --git a/crates/storage/provider/src/providers/static_file/manager.rs b/crates/storage/provider/src/providers/static_file/manager.rs index d2cceafdb847..9465cbb849e8 100644 --- a/crates/storage/provider/src/providers/static_file/manager.rs +++ b/crates/storage/provider/src/providers/static_file/manager.rs @@ -1671,12 +1671,12 @@ impl WithdrawalsProvider for StaticFileProvider { fn withdrawals_by_block( &self, id: BlockHashOrNumber, - _: u64, + timestamp: u64, ) -> ProviderResult> { if let Some(num) = id.as_number() { return self .get_segment_provider_from_block(StaticFileSegment::BlockMeta, num, None) - .and_then(|provider| provider.withdrawals_by_block(num)) + .and_then(|provider| provider.withdrawals_by_block(id, timestamp)) .or_else(|err| { if let ProviderError::MissingStaticFileBlock(_, _) = err { Ok(None)