diff --git a/beacon_node/src/cli.rs b/beacon_node/src/cli.rs index 3d867320c..76ace261d 100644 --- a/beacon_node/src/cli.rs +++ b/beacon_node/src/cli.rs @@ -279,6 +279,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> { .help("Specifies the server for a web3 connection to the Eth1 chain. Also enables the --eth1 flag. Defaults to http://127.0.0.1:8545.") .takes_value(true) ) + .arg( + Arg::with_name("eth1-blocks-per-log-query") + .long("eth1-blocks-per-log-query") + .value_name("BLOCKS") + .help("Specifies the number of blocks that a deposit log query should span. \ + This will reduce the size of responses from the Eth1 endpoint.") + .default_value("1000") + .takes_value(true) + ) .arg( Arg::with_name("slots-per-restore-point") .long("slots-per-restore-point") diff --git a/beacon_node/src/config.rs b/beacon_node/src/config.rs index b0e00c4ef..e5a10ed47 100644 --- a/beacon_node/src/config.rs +++ b/beacon_node/src/config.rs @@ -197,6 +197,12 @@ pub fn get_config( client_config.eth1.endpoint = val.to_string(); } + if let Some(val) = cli_args.value_of("eth1-blocks-per-log-query") { + client_config.eth1.blocks_per_log_query = val + .parse() + .map_err(|_| "eth1-blocks-per-log-query is not a valid integer".to_string())?; + } + if let Some(freezer_dir) = cli_args.value_of("freezer-dir") { client_config.freezer_db_path = Some(PathBuf::from(freezer_dir)); }