Skip to content

Commit

Permalink
Caplin: Fixed not calling FCU due to faulty blob handling (#9779)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Giulio2002 authored and yperbasis committed Mar 27, 2024
1 parent 0f0a445 commit 472616b
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions cl/phase1/stages/clstages.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,14 +564,23 @@ func ConsensusClStages(ctx context.Context,
errCh <- err
return
}
blobs, err := network2.RequestBlobsFrantically(ctx, cfg.rpc, ids)
if err != nil {
errCh <- err
return
}
if _, _, err = blob_storage.VerifyAgainstIdentifiersAndInsertIntoTheBlobStore(ctx, cfg.blobStore, ids, blobs.Responses, forkchoice.VerifyHeaderSignatureAgainstForkChoiceStoreFunction(cfg.forkChoice, cfg.beaconCfg, cfg.genesisCfg.GenesisValidatorRoot)); err != nil {
errCh <- err
return
var inserted uint64

for inserted != uint64(ids.Len()) {
select {
case <-ctx.Done():
return
default:
}
blobs, err := network2.RequestBlobsFrantically(ctx, cfg.rpc, ids)
if err != nil {
errCh <- err
return
}
if _, inserted, err = blob_storage.VerifyAgainstIdentifiersAndInsertIntoTheBlobStore(ctx, cfg.blobStore, ids, blobs.Responses, forkchoice.VerifyHeaderSignatureAgainstForkChoiceStoreFunction(cfg.forkChoice, cfg.beaconCfg, cfg.genesisCfg.GenesisValidatorRoot)); err != nil {
errCh <- err
return
}
}

select {
Expand Down

0 comments on commit 472616b

Please sign in to comment.