Enable progressive balances fast mode by default (#4971)
* Enable progressive balances fast mode by default * Fix default in chain_config
This commit is contained in:
parent
44aaf13ff0
commit
c8b2324880
@ -112,7 +112,7 @@ impl Default for ChainConfig {
|
|||||||
shuffling_cache_size: crate::shuffling_cache::DEFAULT_CACHE_SIZE,
|
shuffling_cache_size: crate::shuffling_cache::DEFAULT_CACHE_SIZE,
|
||||||
genesis_backfill: false,
|
genesis_backfill: false,
|
||||||
always_prepare_payload: false,
|
always_prepare_payload: false,
|
||||||
progressive_balances_mode: ProgressiveBalancesMode::Checked,
|
progressive_balances_mode: ProgressiveBalancesMode::Fast,
|
||||||
epochs_per_migration: crate::migrate::DEFAULT_EPOCHS_PER_MIGRATION,
|
epochs_per_migration: crate::migrate::DEFAULT_EPOCHS_PER_MIGRATION,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1228,12 +1228,12 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
|||||||
Arg::with_name("progressive-balances")
|
Arg::with_name("progressive-balances")
|
||||||
.long("progressive-balances")
|
.long("progressive-balances")
|
||||||
.value_name("MODE")
|
.value_name("MODE")
|
||||||
.help("Options to enable or disable the progressive balances cache for \
|
.help("Control the progressive balances cache mode. The default `fast` mode uses \
|
||||||
unrealized FFG progression calculation. The default `checked` mode compares \
|
the cache to speed up fork choice. A more conservative `checked` mode \
|
||||||
the progressive balances from the cache against results from the existing \
|
compares the cache's results against results without the cache. If \
|
||||||
method. If there is a mismatch, it falls back to the existing method. The \
|
there is a mismatch, it falls back to the cache-free result. Using the \
|
||||||
optimized mode (`fast`) is faster but is still experimental, and is \
|
default `fast` mode is recommended unless advised otherwise by the \
|
||||||
not recommended for mainnet usage at this time.")
|
Lighthouse team.")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.possible_values(ProgressiveBalancesMode::VARIANTS)
|
.possible_values(ProgressiveBalancesMode::VARIANTS)
|
||||||
)
|
)
|
||||||
|
@ -2443,20 +2443,20 @@ fn progressive_balances_default() {
|
|||||||
.with_config(|config| {
|
.with_config(|config| {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
config.chain.progressive_balances_mode,
|
config.chain.progressive_balances_mode,
|
||||||
ProgressiveBalancesMode::Checked
|
ProgressiveBalancesMode::Fast
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn progressive_balances_fast() {
|
fn progressive_balances_checked() {
|
||||||
CommandLineTest::new()
|
CommandLineTest::new()
|
||||||
.flag("progressive-balances", Some("fast"))
|
.flag("progressive-balances", Some("checked"))
|
||||||
.run_with_zero_port()
|
.run_with_zero_port()
|
||||||
.with_config(|config| {
|
.with_config(|config| {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
config.chain.progressive_balances_mode,
|
config.chain.progressive_balances_mode,
|
||||||
ProgressiveBalancesMode::Fast
|
ProgressiveBalancesMode::Checked
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user