Skip to content

Commit 353ebb7

Browse files
yperbasisGiulio2002
authored andcommitted
Caplin: Fixed not calling FCU due to faulty blob handling (erigontech#9818)
Cherry pick PR erigontech#9779 into the release Co-authored-by: Giulio rebuffo <[email protected]>
1 parent 2982e00 commit 353ebb7

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

cl/phase1/stages/clstages.go

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,23 @@ func ConsensusClStages(ctx context.Context,
564564
errCh <- err
565565
return
566566
}
567-
blobs, err := network2.RequestBlobsFrantically(ctx, cfg.rpc, ids)
568-
if err != nil {
569-
errCh <- err
570-
return
571-
}
572-
if _, _, err = blob_storage.VerifyAgainstIdentifiersAndInsertIntoTheBlobStore(ctx, cfg.blobStore, ids, blobs.Responses, forkchoice.VerifyHeaderSignatureAgainstForkChoiceStoreFunction(cfg.forkChoice, cfg.beaconCfg, cfg.genesisCfg.GenesisValidatorRoot)); err != nil {
573-
errCh <- err
574-
return
567+
var inserted uint64
568+
569+
for inserted != uint64(ids.Len()) {
570+
select {
571+
case <-ctx.Done():
572+
return
573+
default:
574+
}
575+
blobs, err := network2.RequestBlobsFrantically(ctx, cfg.rpc, ids)
576+
if err != nil {
577+
errCh <- err
578+
return
579+
}
580+
if _, inserted, err = blob_storage.VerifyAgainstIdentifiersAndInsertIntoTheBlobStore(ctx, cfg.blobStore, ids, blobs.Responses, forkchoice.VerifyHeaderSignatureAgainstForkChoiceStoreFunction(cfg.forkChoice, cfg.beaconCfg, cfg.genesisCfg.GenesisValidatorRoot)); err != nil {
581+
errCh <- err
582+
return
583+
}
575584
}
576585

577586
select {

0 commit comments

Comments
 (0)