Allow manual checkpoint sync without blobs (#8470)

Since merging this PR, we don't need `--checkpoint-blobs`, even prior to Fulu:

- https://github.com/sigp/lighthouse/pull/8417

This PR removes the mandatory check for blobs prior to Fulu, enabling simpler manual checkpoint sync.


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>

Co-Authored-By: Jimmy Chen <jimmy@sigmaprime.io>
This commit is contained in:
Michael Sproul
2025-11-27 10:00:21 +11:00
committed by GitHub
parent d6cec0ba50
commit e21a433748
2 changed files with 25 additions and 15 deletions

View File

@@ -354,15 +354,10 @@ where
let anchor_block = SignedBeaconBlock::from_ssz_bytes(&anchor_block_bytes, &spec)
.map_err(|e| format!("Unable to parse weak subj block SSZ: {:?}", e))?;
// `BlobSidecar` is no longer used from Fulu onwards (superseded by `DataColumnSidecar`),
// which will be fetched via rpc instead (unimplemented).
let is_before_fulu = !spec
.fork_name_at_slot::<E>(anchor_block.slot())
.fulu_enabled();
let anchor_blobs = if is_before_fulu && anchor_block.message().body().has_blobs() {
// Providing blobs is optional now and not providing them is recommended.
// Backfill can handle downloading the blobs or columns for the checkpoint block.
let anchor_blobs = if let Some(anchor_blobs_bytes) = anchor_blobs_bytes {
let max_blobs_len = spec.max_blobs_per_block(anchor_block.epoch()) as usize;
let anchor_blobs_bytes = anchor_blobs_bytes
.ok_or("Blobs for checkpoint must be provided using --checkpoint-blobs")?;
Some(
BlobSidecarList::from_ssz_bytes(&anchor_blobs_bytes, max_blobs_len)
.map_err(|e| format!("Unable to parse weak subj blobs SSZ: {e:?}"))?,