Implement EIP-7892 BPO hardforks (#7521)

[EIP-7892: Blob Parameter Only Hardforks](https://eips.ethereum.org/EIPS/eip-7892)

#7467
This commit is contained in:
ethDreamer
2025-06-02 01:54:42 -05:00
committed by GitHub
parent 94a1446ac9
commit ae30480926
9 changed files with 286 additions and 48 deletions

View File

@@ -28,7 +28,7 @@ use std::{
use tokio::time::{sleep, Sleep};
use tokio_util::time::{delay_queue, DelayQueue};
use tracing::{debug, trace};
use types::{EthSpec, ForkContext};
use types::{EthSpec, ForkContext, Slot};
/// The number of times to retry an outbound upgrade in the case of IO errors.
const IO_ERROR_RETRIES: u8 = 3;
@@ -932,9 +932,8 @@ where
}
}
RequestType::BlobsByRange(request) => {
let max_requested_blobs = request
.count
.saturating_mul(spec.max_blobs_per_block_by_fork(current_fork));
let epoch = Slot::new(request.start_slot).epoch(E::slots_per_epoch());
let max_requested_blobs = request.max_blobs_requested(epoch, spec);
let max_allowed = spec.max_request_blob_sidecars(current_fork) as u64;
if max_requested_blobs > max_allowed {
self.events_out.push(HandlerEvent::Err(HandlerErr::Inbound {