Skip to content

Commit c8b2324

Browse files
Enable progressive balances fast mode by default (#4971)
* Enable progressive balances fast mode by default * Fix default in chain_config
1 parent 44aaf13 commit c8b2324

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

beacon_node/beacon_chain/src/chain_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl Default for ChainConfig {
112112
shuffling_cache_size: crate::shuffling_cache::DEFAULT_CACHE_SIZE,
113113
genesis_backfill: false,
114114
always_prepare_payload: false,
115-
progressive_balances_mode: ProgressiveBalancesMode::Checked,
115+
progressive_balances_mode: ProgressiveBalancesMode::Fast,
116116
epochs_per_migration: crate::migrate::DEFAULT_EPOCHS_PER_MIGRATION,
117117
}
118118
}

beacon_node/src/cli.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,12 +1228,12 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
12281228
Arg::with_name("progressive-balances")
12291229
.long("progressive-balances")
12301230
.value_name("MODE")
1231-
.help("Options to enable or disable the progressive balances cache for \
1232-
unrealized FFG progression calculation. The default `checked` mode compares \
1233-
the progressive balances from the cache against results from the existing \
1234-
method. If there is a mismatch, it falls back to the existing method. The \
1235-
optimized mode (`fast`) is faster but is still experimental, and is \
1236-
not recommended for mainnet usage at this time.")
1231+
.help("Control the progressive balances cache mode. The default `fast` mode uses \
1232+
the cache to speed up fork choice. A more conservative `checked` mode \
1233+
compares the cache's results against results without the cache. If \
1234+
there is a mismatch, it falls back to the cache-free result. Using the \
1235+
default `fast` mode is recommended unless advised otherwise by the \
1236+
Lighthouse team.")
12371237
.takes_value(true)
12381238
.possible_values(ProgressiveBalancesMode::VARIANTS)
12391239
)

lighthouse/tests/beacon_node.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2443,20 +2443,20 @@ fn progressive_balances_default() {
24432443
.with_config(|config| {
24442444
assert_eq!(
24452445
config.chain.progressive_balances_mode,
2446-
ProgressiveBalancesMode::Checked
2446+
ProgressiveBalancesMode::Fast
24472447
)
24482448
});
24492449
}
24502450

24512451
#[test]
2452-
fn progressive_balances_fast() {
2452+
fn progressive_balances_checked() {
24532453
CommandLineTest::new()
2454-
.flag("progressive-balances", Some("fast"))
2454+
.flag("progressive-balances", Some("checked"))
24552455
.run_with_zero_port()
24562456
.with_config(|config| {
24572457
assert_eq!(
24582458
config.chain.progressive_balances_mode,
2459-
ProgressiveBalancesMode::Fast
2459+
ProgressiveBalancesMode::Checked
24602460
)
24612461
});
24622462
}

0 commit comments

Comments
 (0)