-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent amendment majority "flapping" (Version: 1.9.4) #4350
Comments
Crosspost from XRPLF mattermost: What if we mapped validator keys to on-ledger accounts and made votes first class objects. Then flag ledgers are just used to tally them This provides the same persistence mechanism everything else on the ledger has (by making it part of the ledger) and we also open the door for further changes for the price of a transactor amendment (rather than a consensus amendment.) There’s a tool to turn validator pubkey into account ids here https://github.com/RichardAH/xrpl-tools/tree/master/validator-address-tool Other benefits include: validators could manage their votes inside a wallet by sending a txn to change their vote. The voting history is preserved in full history servers. Tallying of the votes at flag ledger should ignore nUNL and only use actual UNL. Votes should be accompanied by some sort of UNL hash and the validator's current rippled version number so that other validators have a better idea of which votes might cause a fork. |
This commit implements a new amendment that follows one of the recommendations in XRPLF#4350 to reduce the flapping of amendments when there is validator outage and support drops below 80% required majority. The new threshold for deactivation of the countdown timer of an an amendment is to go below 65% support.
I tried to assign this issue to @a-noni-mousse, who opened #4364 to address this, but I was unable to. Perhaps @intelliot can do it? |
I can't assign to @a-noni-mousse because they are not a collaborator for this repo. I invited them for read-only access; if they accept, then I think we may be able to assign them. |
This commit implements a new amendment that follows one of the recommendations in XRPLF#4350 to reduce the flapping of amendments when there is validator outage and support drops below 80% required majority. A new FlappingAmendment vector is used to track amendments that lose majority and add delay of one flag ledger.
This commit implements a new amendment that follows one of the recommendations in XRPLF#4350 to reduce the flapping of amendments when there is validator outage and support drops below 80% required majority. A new FlappingAmendment vector is used to track amendments that lose majority and add delay of one flag ledger.
Amendment flapping usually occurs when an amendment is on the verge of gaining majority, and a validator not in favor of the amendment goes offline. If fixAmendmentFlapping activates then two changes occur: 1. The number of validators in the UNL determines the required threshold for an amendment to gain majority. 2. The AmendmentTable keeps a record of the most recent Amendment vote received from each trusted validator in the UNL. If no validation arrives from a given validator, then the AmendmentTable assumes that the previously received vote has not changed. Fixes XRPLF#4350
Amendment flapping usually occurs when an amendment is on the verge of gaining majority, and a validator not in favor of the amendment goes offline. If fixAmendmentFlapping activates then two changes occur: 1. The number of validators in the UNL determines the required threshold for an amendment to gain majority. 2. The AmendmentTable keeps a record of the most recent Amendment vote received from each trusted validator in the UNL. If no validation arrives from a given validator, then the AmendmentTable assumes that the previously received vote has not changed. Fixes XRPLF#4350
Amendment "flapping" (an amendment repeatedly gaining and losing majority) usually occurs when an amendment is on the verge of gaining majority, and a validator not in favor of the amendment goes offline or loses sync. This fix makes two changes: 1. The number of validators in the UNL determines the threshold required for an amendment to gain majority. 2. The AmendmentTable keeps a record of the most recent Amendment vote received from each trusted validator (and, with `trustChanged`, stays up-to-date when the set of trusted validators changes). If no validation arrives from a given validator, then the AmendmentTable assumes that the previously-received vote has not changed. In other words, when missing an `STValidation` from a remote validator, each server now uses the last vote seen. There is a 24 hour timeout for recorded validator votes. These changes do not require an amendment because they do not impact transaction processing, but only the threshold at which each individual validator decides to propose an EnableAmendment pseudo-transaction. Fix #4350
…LF#4410) Amendment "flapping" (an amendment repeatedly gaining and losing majority) usually occurs when an amendment is on the verge of gaining majority, and a validator not in favor of the amendment goes offline or loses sync. This fix makes two changes: 1. The number of validators in the UNL determines the threshold required for an amendment to gain majority. 2. The AmendmentTable keeps a record of the most recent Amendment vote received from each trusted validator (and, with `trustChanged`, stays up-to-date when the set of trusted validators changes). If no validation arrives from a given validator, then the AmendmentTable assumes that the previously-received vote has not changed. In other words, when missing an `STValidation` from a remote validator, each server now uses the last vote seen. There is a 24 hour timeout for recorded validator votes. These changes do not require an amendment because they do not impact transaction processing, but only the threshold at which each individual validator decides to propose an EnableAmendment pseudo-transaction. Fix XRPLF#4350
Summary
Improve the way amendment majorities are calculated in order to reduce the amount of "flapping" (an amendment repeatedly gaining and losing majority in a short period of time).
Motivation
An amendment can repeatedly gain and lose majority many times in a short period of time. Often, this occurs when an amendment is on the verge of gaining majority, and a validator not in favor of the amendment goes offline. The majority-calculating logic This creates noise and uncertainty about whether the amendment is on track to become activated.
Solution
A few different potential solutions have been proposed.
Currently, an amendment majority is calculated by dividing the number of Yeas (numerator) by the # of trusted validations received in that round (denominator). With 35 validators, an amendment that has 28 Yeas will not have "majority". But when one of the validators saying "Nay" misses a validation, then the calculation becomes 28/34, and the amendment gains majority. When the "Nay" validator resumes issuing validations, the amendment then loses majority. For example, at the time of writing, this is occurring to "CheckCashMakesTrustLine" (98DECF327BF79997AEC178323AD51A830E457BFC6D454DAF3E46E5EC42DC619F).
Instead of using "the # of trusted validations received in that round" as the denominator, the logic could instead use "the # of validators on my UNL".
Paths Not Taken
There could be a different threshold that must be met before an amendment loses majority (vs gaining majority). For example, amendments could gain majority with "Yeas" from > 80% of validators, and not lose majority until <= 65% of validators are saying "Yea".
The text was updated successfully, but these errors were encountered: