Skip to content

Commit 819344e

Browse files
committed
fix(download): skip blob sidecar download when Fulu fork is active
The logic now checks if the "fulu" fork is active for the current epoch. If Fulu is active, blob sidecars are no longer included in blocks, so the download is skipped to prevent unnecessary operations and potential errors.
1 parent 997e26e commit 819344e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

pkg/beacon/download.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,15 @@ func (d *Default) fetchBundle(ctx context.Context, root phase0.Root, upstream *N
352352
denebFork, err := sp.ForkEpochs.GetByName("deneb")
353353
if err == nil && denebFork != nil {
354354
if denebFork.Active(epoch) {
355-
// Download and store blob sidecars
356-
if err := d.downloadAndStoreBlobSidecars(ctx, slot, upstream); err != nil {
357-
return nil, fmt.Errorf("failed to download and store blob sidecars: %w", err)
355+
// Check if Fulu is active - if so, don't fetch blobs as they're no longer in blocks
356+
fuluFork, fuluErr := sp.ForkEpochs.GetByName("fulu")
357+
if fuluErr == nil && fuluFork != nil && fuluFork.Active(epoch) {
358+
d.log.WithField("epoch", epoch).Debug("Skipping blob sidecar download - Fulu fork active")
359+
} else {
360+
// Download and store blob sidecars
361+
if err := d.downloadAndStoreBlobSidecars(ctx, slot, upstream); err != nil {
362+
return nil, fmt.Errorf("failed to download and store blob sidecars: %w", err)
363+
}
358364
}
359365
}
360366
}

0 commit comments

Comments
 (0)