Add batch size CLI flags

This commit is contained in:
Paul Hauner
2023-07-07 14:39:45 +10:00
parent 596df1850d
commit 15ed85d6f9
4 changed files with 44 additions and 5 deletions

View File

@@ -1163,4 +1163,25 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.default_value("12288")
.takes_value(true)
)
.arg(
Arg::with_name("beacon-processor-attestation-batch-size")
.long("beacon-processor-gossip-attestation-batch")
.value_name("INTEGER")
.help("Specifies the number of gossip attestations in a signature verification batch. \
Higher values may reduce CPU usage in a healthy network whilst lower values may \
increase CPU usage in an unhealthy network.")
.default_value("64")
.takes_value(true)
)
.arg(
Arg::with_name("beacon-processor-aggregate-batch-size")
.long("beacon-processor-gossip-aggregate-batch")
.value_name("INTEGER")
.help("Specifies the number of gossip aggregate attestations in a signature \
verification batch. \
Higher values may reduce CPU usage in a healthy network whilst lower values may \
increase CPU usage in an unhealthy network.")
.default_value("64")
.takes_value(true)
)
}

View File

@@ -819,6 +819,14 @@ pub fn get_config<E: EthSpec>(
clap_utils::parse_required(cli_args, "beacon-processor-work-queue")?;
client_config.beacon_processor.max_scheduled_work_queue_len =
clap_utils::parse_required(cli_args, "beacon-processor-reprocess-queue")?;
client_config
.beacon_processor
.max_gossip_attestation_batch_size =
clap_utils::parse_required(cli_args, "beacon-processor-attestation-batch-size")?;
client_config
.beacon_processor
.max_gossip_aggregate_batch_size =
clap_utils::parse_required(cli_args, "beacon-processor-aggregate-batch-size")?;
Ok(client_config)
}