mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 11:41:51 +00:00
Improve freezer DB efficiency with periodic restore points (#649)
* Draft of checkpoint freezer DB * Fix bugs * Adjust root iterators for checkpoint database * Fix freezer state lookups with no slot hint * Fix split comment * Use "restore point" to refer to frozen states * Resolve some FIXMEs * Configurable slots per restore point * Document new freezer DB functions * Fix up StoreConfig * Fix new test for merge * Document SPRP default CLI flag, clarify tests
This commit is contained in:
committed by
Paul Hauner
parent
5a765396b7
commit
d0319320ce
@@ -1,4 +1,5 @@
|
||||
use clap::{App, Arg, SubCommand};
|
||||
use store::StoreConfig;
|
||||
|
||||
pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
App::new("beacon_node")
|
||||
@@ -188,6 +189,20 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.takes_value(true)
|
||||
.default_value("http://localhost:8545")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("slots-per-restore-point")
|
||||
.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.")
|
||||
.takes_value(true)
|
||||
.default_value(
|
||||
Box::leak(
|
||||
format!("{}", StoreConfig::default().slots_per_restore_point)
|
||||
.into_boxed_str()
|
||||
)
|
||||
)
|
||||
)
|
||||
/*
|
||||
* The "testnet" sub-command.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user