Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove 7685 request variants #1515

Merged
merged 3 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions crates/consensus/src/block.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Genesic Block Type
//! Block Type
use crate::{Header, Requests};
use crate::Header;
use alloc::vec::Vec;
use alloy_eips::eip4895::Withdrawal;
use alloy_rlp::{Decodable, Encodable, RlpDecodable, RlpEncodable};
Expand Down Expand Up @@ -32,8 +32,6 @@ pub struct BlockBody<T> {
pub ommers: Vec<Header>,
/// Block withdrawals.
pub withdrawals: Option<Vec<Withdrawal>>,
/// Block requests
pub requests: Option<Requests>,
}

/// We need to implement RLP traits manually because we currently don't have a way to flatten
Expand All @@ -48,7 +46,6 @@ mod block_rlp {
transactions: Vec<T>,
ommers: Vec<Header>,
withdrawals: Option<Vec<Withdrawal>>,
requests: Option<Requests>,
}

#[derive(RlpEncodable)]
Expand All @@ -58,20 +55,12 @@ mod block_rlp {
transactions: &'a Vec<T>,
ommers: &'a Vec<Header>,
withdrawals: Option<&'a Vec<Withdrawal>>,
requests: Option<&'a Requests>,
}

impl<'a, T> From<&'a Block<T>> for HelperRef<'a, T> {
fn from(block: &'a Block<T>) -> Self {
let Block { header, body: BlockBody { transactions, ommers, withdrawals, requests } } =
block;
Self {
header,
transactions,
ommers,
withdrawals: withdrawals.as_ref(),
requests: requests.as_ref(),
}
let Block { header, body: BlockBody { transactions, ommers, withdrawals } } = block;
Self { header, transactions, ommers, withdrawals: withdrawals.as_ref() }
}
}

Expand All @@ -89,8 +78,8 @@ mod block_rlp {

impl<T: Decodable> Decodable for Block<T> {
fn decode(b: &mut &[u8]) -> alloy_rlp::Result<Self> {
let Helper { header, transactions, ommers, withdrawals, requests } = Helper::decode(b)?;
Ok(Self { header, body: BlockBody { transactions, ommers, withdrawals, requests } })
let Helper { header, transactions, ommers, withdrawals } = Helper::decode(b)?;
Ok(Self { header, body: BlockBody { transactions, ommers, withdrawals } })
}
}
}
3 changes: 0 additions & 3 deletions crates/consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ pub use receipt::{
TxReceipt,
};

mod request;
pub use request::{Request, Requests};

pub mod transaction;
#[cfg(feature = "kzg")]
pub use transaction::BlobTransactionValidationError;
Expand Down
155 changes: 0 additions & 155 deletions crates/consensus/src/request.rs

This file was deleted.

Loading