forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[leader election] Improve leader election for first 20 rounds (aptos-…
…labs#5683) exclude_rounds is 20 by default, which means we don't consider last 20 rounds in leader reputation history - but we do so from the same epoch - we consider everyone is caught up with the previous epoch. genesis is epoch=0, round=0 first block is epoch=1 round=1, and that is a reconfig, that triggers epoch 2. because votes in block metadata are for previous round, they are empty in that round. So in that round - only "active" node is proposer. For first 20 rounds of epoch 2, that is the only history we have - and so proposer of epoch=1 round=1 will always be elected for the first 20 rounds. That can cause issues in tests, as they might be executed over very few rounds. So removing epoch=1,round=1 from being considered for history in epoch 2. We can make this change without backward compatible gating, as this only affects first window rounds (10 * num validators), and chain will continue successfully after that (and all active chains are pass the epoch 2)
- Loading branch information
1 parent
f1ac449
commit 49d77e6
Showing
3 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters