Skip to content

Commit 472616b

Browse files
Giulio2002yperbasis
authored andcommitted
Caplin: Fixed not calling FCU due to faulty blob handling (#9779)
This is kind of a low priority issue. We need blobs corresponding to each blocks, but before we were not checking if we received all of them, now we ask until the request returns the desired amount.
1 parent 0f0a445 commit 472616b

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)