Disallow genesis sync outside blob pruning window (#5038)

* Disallow Syncing From Genesis By Default

* Fix CLI Tests

* Perform checks in the `ClientBuilder`

* Tidy, fix tests

* Return an error based on the Deneb fork

* Fix typos

* Fix failing test

* Add missing CLI flag

* Fix CLI flags

* Add suggestion from Sean

* Fix conflict with blob sidecars epochs

---------

Co-authored-by: Mark Mackey <mark@sigmaprime.io>
This commit is contained in:
Paul Hauner
2024-01-10 06:17:01 +11:00
committed by GitHub
parent b47e3f252e
commit 12d3d237cd
6 changed files with 79 additions and 0 deletions

View File

@@ -497,6 +497,8 @@ pub fn get_config<E: EthSpec>(
None
};
client_config.allow_insecure_genesis_sync = cli_args.is_present("allow-insecure-genesis-sync");
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)) = (