Download checkpoint blobs during checkpoint sync (#5252)

* MVP implementation (untested)

* update store checkpoint sync test

* update cli help

* Merge pull request #5253 from realbigsean/checkpoint-blobs-sean

Checkpoint blobs sean

* Warn only if blobs are missing from server

* Merge remote-tracking branch 'origin/unstable' into checkpoint-blobs

* Verify checkpoint blobs

* Move blob verification earlier
This commit is contained in:
Michael Sproul
2024-02-19 13:22:23 +11:00
committed by GitHub
parent e22c9eed8f
commit c9702cb0a1
10 changed files with 122 additions and 11 deletions

View File

@@ -512,9 +512,10 @@ pub fn get_config<E: EthSpec>(
client_config.genesis = if eth2_network_config.genesis_state_is_known() {
// Set up weak subjectivity sync, or start from the hardcoded genesis state.
if let (Some(initial_state_path), Some(initial_block_path)) = (
if let (Some(initial_state_path), Some(initial_block_path), opt_initial_blobs_path) = (
cli_args.value_of("checkpoint-state"),
cli_args.value_of("checkpoint-block"),
cli_args.value_of("checkpoint-blobs"),
) {
let read = |path: &str| {
use std::fs::File;
@@ -530,10 +531,12 @@ pub fn get_config<E: EthSpec>(
let anchor_state_bytes = read(initial_state_path)?;
let anchor_block_bytes = read(initial_block_path)?;
let anchor_blobs_bytes = opt_initial_blobs_path.map(read).transpose()?;
ClientGenesis::WeakSubjSszBytes {
anchor_state_bytes,
anchor_block_bytes,
anchor_blobs_bytes,
}
} else if let Some(remote_bn_url) = cli_args.value_of("checkpoint-sync-url") {
let url = SensitiveUrl::parse(remote_bn_url)