mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user