Reimport the checkpoint sync block (#8417)

We want to not require checkpoint sync starts to include the required custody data columns, and instead fetch them from p2p.


Closes https://github.com/sigp/lighthouse/issues/6837


  The checkpoint sync slot can:
1. Be the first slot in the epoch, such that the epoch of the block == the start checkpoint epoch
2. Be in an epoch prior to the start checkpoint epoch

In both cases backfill sync already fetches that epoch worth of blocks with current code. This PR modifies the backfill import filter function to allow to re-importing the oldest block slot in the DB.

I feel this solution is sufficient unless I'm missing something. ~~I have not tested this yet!~~ Michael has tested this and it works.


Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
Lion - dapplion
2025-11-19 08:00:38 -03:00
committed by GitHub
parent 8e54f6e1a8
commit 74b8c02630
4 changed files with 52 additions and 9 deletions

View File

@@ -842,7 +842,7 @@ impl<E: EthSpec> MockBuilder<E> {
.beacon_client
.get_beacon_blocks::<E>(BlockId::Finalized)
.await
.map_err(|_| "couldn't get finalized block".to_string())?
.map_err(|e| format!("couldn't get finalized block: {e:?}"))?
.ok_or_else(|| "missing finalized block".to_string())?
.data()
.message()
@@ -855,7 +855,7 @@ impl<E: EthSpec> MockBuilder<E> {
.beacon_client
.get_beacon_blocks::<E>(BlockId::Justified)
.await
.map_err(|_| "couldn't get justified block".to_string())?
.map_err(|e| format!("couldn't get justified block: {e:?}"))?
.ok_or_else(|| "missing justified block".to_string())?
.data()
.message()