Checkpoint sync without the blobs from Fulu (#7549)

Lighthouse currently requires checkpoint sync to be performed against a supernode in a PeerDAS network, as only supernodes can serve blobs.

This PR lifts that requirement, enabling Lighthouse to checkpoint sync from either a fullnode or a supernode (See https://github.com/sigp/lighthouse/issues/6837#issuecomment-2933094923)

Missing data columns for the checkpoint block isn't a big issue, but we should be able to easily implement backfill once we have the logic to backfill data columns.
This commit is contained in:
Jimmy Chen
2025-06-04 10:31:27 +10:00
committed by GitHub
parent cd83d8d95d
commit 357a8ccbb9

View File

@@ -486,24 +486,36 @@ where
// Verify that blobs (if provided) match the block. // Verify that blobs (if provided) match the block.
if let Some(blobs) = &weak_subj_blobs { if let Some(blobs) = &weak_subj_blobs {
let commitments = weak_subj_block let fulu_enabled = weak_subj_block.fork_name_unchecked().fulu_enabled();
.message() if fulu_enabled && blobs.is_empty() {
.body() // Blobs expected for this block, but the checkpoint server is not able to serve them.
.blob_kzg_commitments() // This is expected from Fulu, as only supernodes are able to serve blobs.
.map_err(|e| format!("Blobs provided but block does not reference them: {e:?}"))?; // We can consider using backfill to retrieve the data columns from the p2p network,
if blobs.len() != commitments.len() { // but we can ignore this fow now until we have validator custody backfill
return Err(format!( // implemented as we'll likely be able to reuse the logic.
"Wrong number of blobs, expected: {}, got: {}", // https://github.com/sigp/lighthouse/issues/6837
commitments.len(), } else {
blobs.len() let commitments = weak_subj_block
)); .message()
} .body()
if commitments .blob_kzg_commitments()
.iter() .map_err(|e| {
.zip(blobs.iter()) format!("Blobs provided but block does not reference them: {e:?}")
.any(|(commitment, blob)| *commitment != blob.kzg_commitment) })?;
{ if blobs.len() != commitments.len() {
return Err("Checkpoint blob does not match block commitment".into()); return Err(format!(
"Wrong number of blobs, expected: {}, got: {}",
commitments.len(),
blobs.len()
));
}
if commitments
.iter()
.zip(blobs.iter())
.any(|(commitment, blob)| *commitment != blob.kzg_commitment)
{
return Err("Checkpoint blob does not match block commitment".into());
}
} }
} }