diff --git a/crates/chain-state/src/in_memory.rs b/crates/chain-state/src/in_memory.rs index 49c20bacdc2b..8b5c8140acd7 100644 --- a/crates/chain-state/src/in_memory.rs +++ b/crates/chain-state/src/in_memory.rs @@ -640,7 +640,7 @@ impl BlockState { pub fn block_with_senders(&self) -> BlockWithSenders { let block = self.block.block().clone(); let senders = self.block.senders().clone(); - let (header, body) = block.split_header_body(); + let (header, body) = block.split(); BlockWithSenders::new_unchecked(N::Block::new(header.unseal(), body), senders) } diff --git a/crates/exex/exex/src/backfill/job.rs b/crates/exex/exex/src/backfill/job.rs index 161253d2b18c..3bb0e04ec25f 100644 --- a/crates/exex/exex/src/backfill/job.rs +++ b/crates/exex/exex/src/backfill/job.rs @@ -108,7 +108,7 @@ where // Unseal the block for execution let (block, senders) = block.into_components(); - let (header, body) = block.split_header_body(); + let (header, body) = block.split(); let (unsealed_header, hash) = header.split(); let block = P::Block::new(unsealed_header, body).with_senders_unchecked(senders); diff --git a/crates/net/p2p/src/full_block.rs b/crates/net/p2p/src/full_block.rs index fdee01ab9988..309252bb8f26 100644 --- a/crates/net/p2p/src/full_block.rs +++ b/crates/net/p2p/src/full_block.rs @@ -429,7 +429,7 @@ where // put response hashes back into bodies map since we aren't returning them as a // response for block in valid_responses { - let (header, body) = block.split_header_body(); + let (header, body) = block.split(); self.bodies.insert(header, BodyResponse::Validated(body)); } diff --git a/crates/primitives/src/block.rs b/crates/primitives/src/block.rs index 2891d1285faa..24e38997fc5e 100644 --- a/crates/primitives/src/block.rs +++ b/crates/primitives/src/block.rs @@ -5,7 +5,7 @@ use crate::{ use alloc::vec::Vec; use alloy_consensus::Header; use alloy_eips::{eip2718::Encodable2718, eip4895::Withdrawals}; -use alloy_primitives::{Address, Bytes, B256}; +use alloy_primitives::{Address, B256}; use alloy_rlp::{Decodable, Encodable, RlpDecodable, RlpEncodable}; use derive_more::{Deref, DerefMut}; #[cfg(any(test, feature = "arbitrary"))] @@ -212,25 +212,11 @@ impl SealedBlock { /// Splits the [`BlockBody`] and [`SealedHeader`] into separate components #[inline] - pub fn split_header_body(self) -> (SealedHeader, B) { + pub fn split(self) -> (SealedHeader, B) { (self.header, self.body) } } -impl SealedBlock { - /// Returns whether or not the block contains any blob transactions. - #[inline] - pub fn has_eip4844_transactions(&self) -> bool { - self.body.has_eip4844_transactions() - } - - /// Returns whether or not the block contains any eip-7702 transactions. - #[inline] - pub fn has_eip7702_transactions(&self) -> bool { - self.body.has_eip7702_transactions() - } -} - impl SealedBlock where B: reth_primitives_traits::BlockBody, @@ -369,16 +355,6 @@ where { Block::new(self.header.unseal(), self.body) } - - /// Returns a vector of encoded 2718 transactions. - /// - /// This is also known as `raw transactions`. - /// - /// See also [`Encodable2718`]. - #[doc(alias = "raw_transactions")] - pub fn encoded_2718_transactions(&self) -> Vec { - self.body.encoded_2718_transactions() - } } impl InMemorySize for SealedBlock { @@ -457,7 +433,7 @@ impl SealedBlockWithSenders { #[inline] pub fn unseal(self) -> BlockWithSenders { let (block, senders) = self.into_components(); - let (header, body) = block.split_header_body(); + let (header, body) = block.split(); let header = header.unseal(); BlockWithSenders::new_unchecked(B::new(header, body), senders) } diff --git a/crates/stages/stages/src/stages/merkle.rs b/crates/stages/stages/src/stages/merkle.rs index 4c163d8042ac..a2b4655835cc 100644 --- a/crates/stages/stages/src/stages/merkle.rs +++ b/crates/stages/stages/src/stages/merkle.rs @@ -525,7 +525,7 @@ mod tests { stage_progress, BlockParams { parent: preblocks.last().map(|b| b.hash()), ..Default::default() }, ) - .split_header_body(); + .split(); let mut header = header.unseal(); header.state_root = state_root( diff --git a/crates/storage/provider/src/test_utils/blocks.rs b/crates/storage/provider/src/test_utils/blocks.rs index 2f46ef5c1e70..9924375ecb99 100644 --- a/crates/storage/provider/src/test_utils/blocks.rs +++ b/crates/storage/provider/src/test_utils/blocks.rs @@ -232,7 +232,7 @@ fn block1(number: BlockNumber) -> (SealedBlockWithSenders, ExecutionOutcome) { b256!("5d035ccb3e75a9057452ff060b773b213ec1fc353426174068edfc3971a0b6bd") ); - let (header, mut body) = TEST_BLOCK.clone().split_header_body(); + let (header, mut body) = TEST_BLOCK.clone().split(); body.withdrawals = Some(Withdrawals::new(vec![Withdrawal::default()])); let mut header = header.unseal(); header.number = number; @@ -294,7 +294,7 @@ fn block2( b256!("90101a13dd059fa5cca99ed93d1dc23657f63626c5b8f993a2ccbdf7446b64f8") ); - let (header, mut body) = TEST_BLOCK.clone().split_header_body(); + let (header, mut body) = TEST_BLOCK.clone().split(); body.withdrawals = Some(Withdrawals::new(vec![Withdrawal::default()])); let mut header = header.unseal(); @@ -359,7 +359,7 @@ fn block3( extended.extend(execution_outcome.clone()); let state_root = bundle_state_root(&extended); - let (header, mut body) = TEST_BLOCK.clone().split_header_body(); + let (header, mut body) = TEST_BLOCK.clone().split(); body.withdrawals = Some(Withdrawals::new(vec![Withdrawal::default()])); let mut header = header.unseal(); header.number = number; @@ -448,7 +448,7 @@ fn block4( extended.extend(execution_outcome.clone()); let state_root = bundle_state_root(&extended); - let (header, mut body) = TEST_BLOCK.clone().split_header_body(); + let (header, mut body) = TEST_BLOCK.clone().split(); body.withdrawals = Some(Withdrawals::new(vec![Withdrawal::default()])); let mut header = header.unseal(); header.number = number; @@ -534,7 +534,7 @@ fn block5( extended.extend(execution_outcome.clone()); let state_root = bundle_state_root(&extended); - let (header, mut body) = TEST_BLOCK.clone().split_header_body(); + let (header, mut body) = TEST_BLOCK.clone().split(); body.withdrawals = Some(Withdrawals::new(vec![Withdrawal::default()])); let mut header = header.unseal(); header.number = number;