mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +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
@@ -79,6 +79,7 @@ impl<E: EthSpec> ProductionBeaconNode<E> {
|
||||
let spec = context.eth2_config().spec.clone();
|
||||
let genesis_eth1_config = client_config.eth1.clone();
|
||||
let client_genesis = client_config.genesis.clone();
|
||||
let store_config = client_config.store.clone();
|
||||
let log = context.log.clone();
|
||||
|
||||
let db_path_res = client_config.create_db_path();
|
||||
@@ -90,7 +91,11 @@ impl<E: EthSpec> ProductionBeaconNode<E> {
|
||||
Ok(ClientBuilder::new(context.eth_spec_instance.clone())
|
||||
.runtime_context(context)
|
||||
.chain_spec(spec)
|
||||
.disk_store(&db_path, &freezer_db_path_res?)?
|
||||
.disk_store(
|
||||
&db_path,
|
||||
&freezer_db_path_res?,
|
||||
store_config.slots_per_restore_point,
|
||||
)?
|
||||
.background_migrator()?)
|
||||
})
|
||||
.and_then(move |builder| {
|
||||
|
||||
Reference in New Issue
Block a user