Increase the default pruning parameters (#11558)

* Log block number and earliest available block when snapshots fail to start

* Increase default pruning history to 128
Increase default pruning memory to 48Mb

* Decrease SNAPSHOT_PERIOD to 200 to get them snapshots started quicker

* Sync updates to defaults with the args parser

* Fix tests

* Restore the SNAPSHOT_PERIOD to 5000

* One more

* Update ethcore/src/client/config.rs
This commit is contained in:
David
2020-03-19 11:34:30 +01:00
committed by GitHub
parent 874462bfc0
commit 87fd914c94
5 changed files with 22 additions and 16 deletions

View File

@@ -860,11 +860,11 @@ usage! {
"--pruning=[METHOD]",
"Configure pruning of the state/storage trie. METHOD may be one of auto, archive, fast: archive - keep all state trie data. No pruning. fast - maintain journal overlay. Fast but 50MB used. auto - use the method most recently synced or default to fast if none synced.",
ARG arg_pruning_history: (u64) = 64u64, or |c: &Config| c.footprint.as_ref()?.pruning_history.clone(),
ARG arg_pruning_history: (u64) = 128u64, or |c: &Config| c.footprint.as_ref()?.pruning_history.clone(),
"--pruning-history=[NUM]",
"Set a minimum number of recent states to keep in memory when pruning is active.",
ARG arg_pruning_memory: (usize) = 32usize, or |c: &Config| c.footprint.as_ref()?.pruning_memory.clone(),
ARG arg_pruning_memory: (usize) = 64usize, or |c: &Config| c.footprint.as_ref()?.pruning_memory.clone(),
"--pruning-memory=[MB]",
"The ideal amount of memory in megabytes to use to store recent states. As many states as possible will be kept within this limit, and at least --pruning-history states will always be kept.",

View File

@@ -1271,8 +1271,8 @@ mod tests {
file_path: Some("blockchain.json".into()),
format: Default::default(),
pruning: Default::default(),
pruning_history: 64,
pruning_memory: 32,
pruning_history: 128,
pruning_memory: 64,
compaction: Default::default(),
tracing: Default::default(),
fat_db: Default::default(),
@@ -1294,8 +1294,8 @@ mod tests {
dirs: Default::default(),
file_path: Some("blockchain.json".into()),
pruning: Default::default(),
pruning_history: 64,
pruning_memory: 32,
pruning_history: 128,
pruning_memory: 64,
format: Default::default(),
compaction: Default::default(),
tracing: Default::default(),
@@ -1317,8 +1317,8 @@ mod tests {
dirs: Default::default(),
file_path: Some("state.json".into()),
pruning: Default::default(),
pruning_history: 64,
pruning_memory: 32,
pruning_history: 128,
pruning_memory: 64,
format: Default::default(),
compaction: Default::default(),
tracing: Default::default(),
@@ -1342,8 +1342,8 @@ mod tests {
dirs: Default::default(),
file_path: Some("blockchain.json".into()),
pruning: Default::default(),
pruning_history: 64,
pruning_memory: 32,
pruning_history: 128,
pruning_memory: 64,
format: Some(DataFormat::Hex),
compaction: Default::default(),
tracing: Default::default(),
@@ -1398,8 +1398,8 @@ mod tests {
dirs: Default::default(),
spec: Default::default(),
pruning: Default::default(),
pruning_history: 64,
pruning_memory: 32,
pruning_history: 128,
pruning_memory: 64,
daemon: None,
logger_config: Default::default(),
miner_options: Default::default(),