Reduce finalization migration frequency

This commit is contained in:
Michael Sproul
2022-09-30 11:59:56 +10:00
parent a6318732cf
commit aa253ddd8f
6 changed files with 113 additions and 3 deletions

View File

@@ -539,6 +539,16 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.takes_value(true)
.default_value("true")
)
.arg(
Arg::with_name("db-migration-period")
.long("db-migration-period")
.value_name("EPOCHS")
.help("Specifies the number of epochs to wait between applying each finalization \
migration to the database. Applying migrations less frequently can lead to \
less total disk writes.")
.default_value("4")
.takes_value(true)
)
/*
* Misc.

View File

@@ -366,6 +366,11 @@ pub fn get_config<E: EthSpec>(
client_config.store.prune_payloads = prune_payloads;
}
if let Some(epochs_per_migration) = clap_utils::parse_optional(cli_args, "db-migration-period")?
{
client_config.store_migrator.epochs_per_run = epochs_per_migration;
}
/*
* Zero-ports
*