From 22443e7e5dddffa4e9a741c6b9dcd6fa179d4622 Mon Sep 17 00:00:00 2001 From: Brennan Date: Wed, 6 Nov 2024 09:06:44 -0800 Subject: [PATCH] increase ticks per slot for test (#3491) --- local-cluster/tests/local_cluster.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/local-cluster/tests/local_cluster.rs b/local-cluster/tests/local_cluster.rs index eeb0a1899bcb71..5a216b0878aa0c 100644 --- a/local-cluster/tests/local_cluster.rs +++ b/local-cluster/tests/local_cluster.rs @@ -1546,9 +1546,16 @@ fn test_wait_for_max_stake() { // make a root and derive the new leader schedule in time. let stakers_slot_offset = slots_per_epoch.saturating_mul(MAX_LEADER_SCHEDULE_EPOCH_OFFSET); // Reduce this so that we can complete the test faster by advancing through - // slots/epochs faster. But don't make it too small because it can make us - // susceptible to skipped slots and the cluster getting stuck. - let ticks_per_slot = 16; + // slots/epochs faster. But don't make it too small because it can cause the + // test to fail in two important ways: + // 1. Increase likelihood of skipped slots, which can prevent rooting and + // lead to not generating leader schedule in time and cluster getting + // stuck. + // 2. Make the cluster advance through too many epochs before all the + // validators spin up, which can lead to not properly observing gossip + // votes, not repairing missing slots, and some subset of nodes getting + // stuck. + let ticks_per_slot = 32; let num_validators = 4; let mut config = ClusterConfig { cluster_lamports: DEFAULT_CLUSTER_LAMPORTS,