This repository was archived by the owner on Mar 5, 2024. It is now read-only.
change consensus deselection weighting #1468
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change lays the foundation for additional tunability in the election process, specifically with the goal of removing low performers more quickly from the group. This flexibility is achieved through two changes:
election_penalty_history_percentage
which is used during scoring of existing group members before selecting members for removal. This value controls whether and how much the previous penalties contribute to the score:([election_penalty_history_percentage] * [total existing penalty]) + [current epoch performance penalty] + [current epoch tenure penalty]
These changes are guarded behind election_version = 7. No changes are made in the logic for selection new validators into CG. It continues to be weighted random based on the total penalty score at time of the election.
To achieve the goal of more quickly removing low performers, I suggest that
election_penalty_history_percentage
= 0. This causes the deselection to be based entirely on performance in the existing group which in my opinion is the most important consideration for a well functioning CG. In the long-run, this will still provide equal rewards for equal performance. If all validators have perform perfectly during an epoch, the odds of being removed are equal. That said, governance processes should be used to select the value of this new var and are outside the scope of this PR.