Configurable history size in master (#2606)
* split journaldb commit into two functions: journal_under and mark_canonical * use new commit mechanism in client * Configurable history size in master * Reduce DB history * Configurable history size * Set min history size * Test * Fixed a test and reduced the limit
This commit is contained in:
committed by
Gav Wood
parent
835cd13c0e
commit
f28b8352c1
@@ -77,6 +77,7 @@ notify_work = ["http://localhost:3001"]
|
||||
[footprint]
|
||||
tracing = "auto"
|
||||
pruning = "auto"
|
||||
pruning_history = 64
|
||||
cache_size_db = 64
|
||||
cache_size_blocks = 8
|
||||
cache_size_queue = 50
|
||||
|
||||
@@ -46,6 +46,7 @@ tx_queue_gas = "auto"
|
||||
[footprint]
|
||||
tracing = "on"
|
||||
pruning = "fast"
|
||||
pruning_history = 64
|
||||
cache_size_db = 128
|
||||
cache_size_blocks = 16
|
||||
cache_size_queue = 100
|
||||
|
||||
@@ -207,6 +207,8 @@ usage! {
|
||||
or |c: &Config| otry!(c.footprint).tracing.clone(),
|
||||
flag_pruning: String = "auto",
|
||||
or |c: &Config| otry!(c.footprint).pruning.clone(),
|
||||
flag_pruning_history: u64 = 64u64,
|
||||
or |c: &Config| otry!(c.footprint).pruning_history.clone(),
|
||||
flag_cache_size_db: u32 = 64u32,
|
||||
or |c: &Config| otry!(c.footprint).cache_size_db.clone(),
|
||||
flag_cache_size_blocks: u32 = 8u32,
|
||||
@@ -361,6 +363,7 @@ struct Mining {
|
||||
struct Footprint {
|
||||
tracing: Option<String>,
|
||||
pruning: Option<String>,
|
||||
pruning_history: Option<u64>,
|
||||
fast_and_loose: Option<bool>,
|
||||
cache_size: Option<u32>,
|
||||
cache_size_db: Option<u32>,
|
||||
@@ -536,6 +539,7 @@ mod tests {
|
||||
// -- Footprint Options
|
||||
flag_tracing: "auto".into(),
|
||||
flag_pruning: "auto".into(),
|
||||
flag_pruning_history: 64u64,
|
||||
flag_cache_size_db: 64u32,
|
||||
flag_cache_size_blocks: 8u32,
|
||||
flag_cache_size_queue: 50u32,
|
||||
@@ -690,6 +694,7 @@ mod tests {
|
||||
footprint: Some(Footprint {
|
||||
tracing: Some("on".into()),
|
||||
pruning: Some("fast".into()),
|
||||
pruning_history: Some(64),
|
||||
fast_and_loose: None,
|
||||
cache_size: None,
|
||||
cache_size_db: Some(128),
|
||||
|
||||
@@ -209,6 +209,8 @@ Footprint Options:
|
||||
fast - maintain journal overlay. Fast but 50MB used.
|
||||
auto - use the method most recently synced or
|
||||
default to fast if none synced (default: {flag_pruning}).
|
||||
--pruning-history NUM Set a number of recent states to keep when pruning
|
||||
is active. [default: {flag_pruning_history}].
|
||||
--cache-size-db MB Override database cache size (default: {flag_cache_size_db}).
|
||||
--cache-size-blocks MB Specify the prefered size of the blockchain cache in
|
||||
megabytes (default: {flag_cache_size_blocks}).
|
||||
|
||||
Reference in New Issue
Block a user