Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 0 additions & 10 deletions crates/consensus/common/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ pub fn validate_4844_header_standalone<H: BlockHeader>(
blob_params: BlobParams,
) -> Result<(), ConsensusError> {
let blob_gas_used = header.blob_gas_used().ok_or(ConsensusError::BlobGasUsedMissing)?;
let excess_blob_gas = header.excess_blob_gas().ok_or(ConsensusError::ExcessBlobGasMissing)?;

if header.parent_beacon_block_root().is_none() {
return Err(ConsensusError::ParentBeaconBlockRootMissing)
Expand All @@ -198,15 +197,6 @@ pub fn validate_4844_header_standalone<H: BlockHeader>(
})
}

// `excess_blob_gas` must also be a multiple of `DATA_GAS_PER_BLOB`. This will be checked later
// (via `calc_excess_blob_gas`), but it doesn't hurt to catch the problem sooner.
if excess_blob_gas % DATA_GAS_PER_BLOB != 0 {
return Err(ConsensusError::ExcessBlobGasNotMultipleOfBlobGasPerBlob {
excess_blob_gas,
blob_gas_per_blob: DATA_GAS_PER_BLOB,
})
}

if blob_gas_used > blob_params.max_blob_gas_per_block() {
return Err(ConsensusError::BlobGasUsedExceedsMaxBlobGasPerBlock {
blob_gas_used,
Expand Down
11 changes: 0 additions & 11 deletions crates/consensus/consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,17 +320,6 @@ pub enum ConsensusError {
blob_gas_per_blob: u64,
},

/// Error when excess blob gas is not a multiple of blob gas per blob.
#[error(
"excess blob gas {excess_blob_gas} is not a multiple of blob gas per blob {blob_gas_per_blob}"
)]
ExcessBlobGasNotMultipleOfBlobGasPerBlob {
/// The actual excess blob gas.
excess_blob_gas: u64,
/// The blob gas per blob.
blob_gas_per_blob: u64,
},

/// Error when the blob gas used in the header does not match the expected blob gas used.
#[error("blob gas used mismatch: {0}")]
BlobGasUsedDiff(GotExpected<u64>),
Expand Down
Loading