Skip to content

Commit

Permalink
Caplin: Added Blob Sidecar PastFinalization Check (#10851)
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 committed Jul 3, 2024
1 parent 8e052bd commit c8e522f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cl/phase1/network/services/blob_sidecar_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,15 @@ func (b *blobSidecarService) ProcessMessage(ctx context.Context, subnetId *uint6
currentSlot := b.ethClock.GetCurrentSlot()
sidecarSlot := msg.SignedBlockHeader.Header.Slot
// [IGNORE] The block is not from a future slot (with a MAXIMUM_GOSSIP_CLOCK_DISPARITY allowance) -- i.e. validate that
//signed_beacon_block.message.slot <= current_slot (a client MAY queue future blocks for processing at the appropriate slot).
// signed_beacon_block.message.slot <= current_slot (a client MAY queue future blocks for processing at the appropriate slot).
if currentSlot < sidecarSlot && !b.ethClock.IsSlotCurrentSlotWithMaximumClockDisparity(sidecarSlot) {
return ErrIgnore
}

if b.forkchoiceStore.FinalizedSlot() >= sidecarSlot {
return ErrIgnore
}

blockRoot, err := msg.SignedBlockHeader.Header.HashSSZ()
if err != nil {
return err
Expand Down

0 comments on commit c8e522f

Please sign in to comment.