feat: integrate blob_params_at_timestamp (#14128)

This commit is contained in:
joshieDo
2025-01-31 18:18:34 +00:00
committed by GitHub
parent 214f3b3b8e
commit d3acdda21b
11 changed files with 55 additions and 58 deletions

View File

@ -9,7 +9,7 @@
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
use alloy_consensus::EMPTY_OMMER_ROOT_HASH;
use alloy_eips::{eip7840::BlobParams, merge::ALLOWED_FUTURE_BLOCK_TIME_SECONDS};
use alloy_eips::merge::ALLOWED_FUTURE_BLOCK_TIME_SECONDS;
use alloy_primitives::U256;
use reth_chainspec::{EthChainSpec, EthereumHardforks};
use reth_consensus::{
@ -192,13 +192,7 @@ where
)?;
// ensure that the blob gas fields for this block
if self.chain_spec.is_cancun_active_at_timestamp(header.timestamp()) {
let blob_params = if self.chain_spec.is_prague_active_at_timestamp(header.timestamp()) {
BlobParams::prague()
} else {
BlobParams::cancun()
};
if let Some(blob_params) = self.chain_spec.blob_params_at_timestamp(header.timestamp()) {
validate_against_parent_4844(header.header(), parent.header(), blob_params)?;
}