mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-21 14:58:31 +00:00
Add checkpoint sync
This commit is contained in:
@@ -372,6 +372,7 @@ where
|
||||
anchor_state,
|
||||
anchor_block,
|
||||
anchor_blobs,
|
||||
None,
|
||||
genesis_state,
|
||||
)?
|
||||
}
|
||||
@@ -445,6 +446,21 @@ where
|
||||
None
|
||||
};
|
||||
|
||||
let envelope = if spec
|
||||
.fork_name_at_slot::<E>(finalized_block_slot)
|
||||
.gloas_enabled()
|
||||
{
|
||||
debug!("Downloading payload");
|
||||
remote
|
||||
.get_beacon_execution_payload_envelope(BlockId::Slot(finalized_block_slot))
|
||||
.await
|
||||
.map_err(|e| format!("Error fetching finalized blobs from remote: {e:?}"))?
|
||||
.map(|resp| resp.into_data())
|
||||
} else {
|
||||
None
|
||||
};
|
||||
debug!("Downloaded finalized payload");
|
||||
|
||||
let genesis_state = genesis_state(&runtime_context, &config).await?;
|
||||
|
||||
info!(
|
||||
@@ -454,7 +470,7 @@ where
|
||||
"Loaded checkpoint block and state"
|
||||
);
|
||||
|
||||
builder.weak_subjectivity_state(state, block, blobs, genesis_state)?
|
||||
builder.weak_subjectivity_state(state, block, blobs, envelope, genesis_state)?
|
||||
}
|
||||
ClientGenesis::DepositContract => {
|
||||
return Err("Loading genesis from deposit contract no longer supported".to_string());
|
||||
|
||||
Reference in New Issue
Block a user