@@ -279,22 +279,42 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
279
279
. collect :: < Vec < _ > > ( ) ;
280
280
let mut send_blob_count = 0 ;
281
281
282
+ let fulu_start_slot = self
283
+ . chain
284
+ . spec
285
+ . fulu_fork_epoch
286
+ . map ( |epoch| epoch. start_slot ( T :: EthSpec :: slots_per_epoch ( ) ) ) ;
287
+
282
288
let mut blob_list_results = HashMap :: new ( ) ;
283
289
for id in request. blob_ids . as_slice ( ) {
290
+ let BlobIdentifier {
291
+ block_root : root,
292
+ index,
293
+ } = id;
294
+
284
295
// First attempt to get the blobs from the RPC cache.
285
296
if let Ok ( Some ( blob) ) = self . chain . data_availability_checker . get_blob ( id) {
297
+ // Check if the blob requested is from a Fulu slot, if so, skip the current blob id and proceed to the next
298
+ if let Some ( fulu_slot) = fulu_start_slot {
299
+ if blob. slot ( ) >= fulu_slot {
300
+ debug ! (
301
+ %peer_id,
302
+ request_root = %root,
303
+ blob_slot = %blob. slot( ) ,
304
+ %fulu_slot,
305
+ "BlobsByRoot request is at or after Fulu slot, returning empty response"
306
+ ) ;
307
+ continue ;
308
+ }
309
+ }
310
+
286
311
self . send_response (
287
312
peer_id,
288
313
inbound_request_id,
289
314
Response :: BlobsByRoot ( Some ( blob) ) ,
290
315
) ;
291
316
send_blob_count += 1 ;
292
317
} else {
293
- let BlobIdentifier {
294
- block_root : root,
295
- index,
296
- } = id;
297
-
298
318
let blob_list_result = match blob_list_results. entry ( root) {
299
319
Entry :: Vacant ( entry) => {
300
320
entry. insert ( self . chain . get_blobs_checking_early_attester_cache ( root) )
@@ -306,6 +326,20 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
306
326
Ok ( blobs_sidecar_list) => {
307
327
' inner: for blob_sidecar in blobs_sidecar_list. iter ( ) {
308
328
if blob_sidecar. index == * index {
329
+ // Same logic as above to check for Fulu slot
330
+ if let Some ( fulu_slot) = fulu_start_slot {
331
+ if blob_sidecar. slot ( ) >= fulu_slot {
332
+ debug ! (
333
+ %peer_id,
334
+ request_root = %root,
335
+ blob_slot = %blob_sidecar. slot( ) ,
336
+ %fulu_slot,
337
+ "BlobsByRoot request is at or after Fulu slot, returning empty response"
338
+ ) ;
339
+ break ' inner;
340
+ }
341
+ }
342
+
309
343
self . send_response (
310
344
peer_id,
311
345
inbound_request_id,
0 commit comments