Increase default slots per restore point to 2048 (#790)

This should reduce disk usage by 32x while keeping historical state queries to
less than 10s. If historical states are required quickly, the minimum SPRP of 32
can be set on the CLI.
This commit is contained in:
Michael Sproul
2020-01-10 14:42:49 +11:00
committed by GitHub
parent b3712d8e9b
commit 5a8f2dd961
3 changed files with 10 additions and 8 deletions

View File

@@ -1,5 +1,4 @@
use clap::{App, Arg, SubCommand};
use store::StoreConfig;
pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
App::new("beacon_node")
@@ -196,14 +195,8 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
.long("slots-per-restore-point")
.value_name("SLOT_COUNT")
.help("Specifies how often a freezer DB restore point should be stored. \
DO NOT CHANGE AFTER INITIALIZATION.")
DO NOT DECREASE AFTER INITIALIZATION. [default: 2048 (mainnet) or 64 (minimal)]")
.takes_value(true)
.default_value(
Box::leak(
format!("{}", StoreConfig::default().slots_per_restore_point)
.into_boxed_str()
)
)
)
/*
* The "testnet" sub-command.