Compare commits

...

4 Commits

Author SHA1 Message Date
nisdas
5b24334d2d Merge branch 'develop' of https://github.com/prysmaticlabs/geth-sharding into exitReconstructionEarly 2025-02-12 15:50:14 +08:00
nisdas
c003b1c1e3 changelog 2025-02-12 15:50:06 +08:00
nisdas
fcd07b640f Exit Reconstruction Early 2025-02-12 15:43:49 +08:00
nisdas
e4606a1332 Exit Reconstruction Early 2025-02-12 15:42:41 +08:00
2 changed files with 16 additions and 0 deletions

View File

@@ -87,11 +87,24 @@ func (s *Service) reconstructAndBroadcastBlobs(ctx context.Context, block interf
log.WithError(err).Error("Failed to read commitments from block")
return
}
// Exit early if there are no commitments in block.
if len(cmts) == 0 {
return
}
var blobUnseen bool
for i := range cmts {
if summary.HasIndex(uint64(i)) {
blobExistedInDBTotal.Inc()
} else {
blobUnseen = true
}
}
// If all blobs have been seen via gossip, we can exit the reconstruction
// routine early as there is nothing to fetch from the EL.
if !blobUnseen {
return
}
// Reconstruct blob sidecars from the EL
blobSidecars, err := s.cfg.executionReconstructor.ReconstructBlobSidecars(ctx, block, blockRoot, summary.HasIndex)

View File

@@ -0,0 +1,3 @@
### Changed
- Exit Blob Reconstruction early in the event we have already seen them.