mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
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:
@@ -486,11 +486,22 @@ 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 fulu_enabled = weak_subj_block.fork_name_unchecked().fulu_enabled();
|
||||||
|
if fulu_enabled && blobs.is_empty() {
|
||||||
|
// Blobs expected for this block, but the checkpoint server is not able to serve them.
|
||||||
|
// This is expected from Fulu, as only supernodes are able to serve blobs.
|
||||||
|
// We can consider using backfill to retrieve the data columns from the p2p network,
|
||||||
|
// but we can ignore this fow now until we have validator custody backfill
|
||||||
|
// implemented as we'll likely be able to reuse the logic.
|
||||||
|
// https://github.com/sigp/lighthouse/issues/6837
|
||||||
|
} else {
|
||||||
let commitments = weak_subj_block
|
let commitments = weak_subj_block
|
||||||
.message()
|
.message()
|
||||||
.body()
|
.body()
|
||||||
.blob_kzg_commitments()
|
.blob_kzg_commitments()
|
||||||
.map_err(|e| format!("Blobs provided but block does not reference them: {e:?}"))?;
|
.map_err(|e| {
|
||||||
|
format!("Blobs provided but block does not reference them: {e:?}")
|
||||||
|
})?;
|
||||||
if blobs.len() != commitments.len() {
|
if blobs.len() != commitments.len() {
|
||||||
return Err(format!(
|
return Err(format!(
|
||||||
"Wrong number of blobs, expected: {}, got: {}",
|
"Wrong number of blobs, expected: {}, got: {}",
|
||||||
@@ -506,6 +517,7 @@ where
|
|||||||
return Err("Checkpoint blob does not match block commitment".into());
|
return Err("Checkpoint blob does not match block commitment".into());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Set the store's split point *before* storing genesis so that genesis is stored
|
// Set the store's split point *before* storing genesis so that genesis is stored
|
||||||
// immediately in the freezer DB.
|
// immediately in the freezer DB.
|
||||||
|
|||||||
Reference in New Issue
Block a user