fix: use timestamp derived max blob count on launch (#18590)

This commit is contained in:
Matthias Seitz
2025-09-20 07:41:56 +02:00
committed by GitHub
parent fa531761c4
commit 379db45b40

View File

@@ -992,7 +992,8 @@ impl<Client> EthTransactionValidatorBuilder<Client> {
/// Configures validation rules based on the head block's timestamp.
///
/// For example, whether the Shanghai and Cancun hardfork is activated at launch.
/// For example, whether the Shanghai and Cancun hardfork is activated at launch, or max blob
/// counts.
pub fn with_head_timestamp(mut self, timestamp: u64) -> Self
where
Client: ChainSpecProvider<ChainSpec: EthereumHardforks>,
@@ -1067,15 +1068,10 @@ impl<Client> EthTransactionValidatorBuilder<Client> {
max_tx_input_bytes,
max_tx_gas_limit,
disable_balance_check,
..
max_blob_count,
additional_tasks: _,
} = self;
let max_blob_count = if prague {
BlobParams::prague().max_blobs_per_tx
} else {
BlobParams::cancun().max_blobs_per_tx
};
let fork_tracker = ForkTracker {
shanghai: AtomicBool::new(shanghai),
cancun: AtomicBool::new(cancun),