beacon_node: add --disable-deposit-contract-sync flag (#3597)

Overrides any previous option that enables the eth1 service.
Useful for operating a `light` beacon node.

Co-authored-by: Michael Sproul <micsproul@gmail.com>
This commit is contained in:
pinkiebell
2022-10-19 22:55:49 +00:00
parent c5cd0d9b3f
commit d0efb6b18a
4 changed files with 50 additions and 1 deletions

View File

@@ -852,4 +852,12 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
failure caused by the execution layer.")
.takes_value(false)
)
.arg(
Arg::with_name("disable-deposit-contract-sync")
.long("disable-deposit-contract-sync")
.help("Explictly disables syncing of deposit logs from the execution node. \
This overrides any previous option that depends on it. \
Useful if you intend to run a non-validating beacon node.")
.takes_value(false)
)
}

View File

@@ -668,6 +668,11 @@ pub fn get_config<E: EthSpec>(
client_config.chain.enable_lock_timeouts = false;
}
// Note: This overrides any previous flags that enable this option.
if cli_args.is_present("disable-deposit-contract-sync") {
client_config.sync_eth1_chain = false;
}
if let Some(timeout) =
clap_utils::parse_optional(cli_args, "fork-choice-before-proposal-timeout")?
{