-
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
EnableAmendment timer starts at 77.78% (Version: [rippled 1.5.0]) #3396
Comments
Thanks for opening an issue. You aren't reading it incorrectly. A couple of people had already reached out to me about the The answer boils down to two things: First, for historical and largely obsolete reasons, the calculation for the majority is done in base 256, with the quorum threshold set to So the code calculates
Now, if you plug that into a calculator you'll see it works out to 28.6875. So what's wrong? The code is using integer arithmetic, which "truncates toward zero’’. Basically, you can think of it as "rounding down to the nearest integer" and what is the nearest integer that is strictly smaller? It's 28. For a little deeper dive into this check out this excellent StackOverflow answer. The second, problem is that the code checks whether an amendment has achieved the required quorum by using greater than or equal to instead of strictly greater than. Ref:
While the behavior of the code is well-defined in terms of C/C++, it's not ideal from a human perspective and certainly complicates the understanding of quorum when it comes to amendments. I believe that this issue needs to be addressed in a future release of |
Add majority timer configuration FIXES: XRPLF#3396
*Add majority timer configuration *FIXES: XRPLF#3396
* The amendment ballot counting code contained a minor technical flaw, caused by the use of integer arithmetic and rounding semantics, that could allow amendments to reach majority with slightly less than 80% support. This commit introduces an amendment which, if enabled, will ensure that activation requires at least 80% support. * This commit also introduces a configuration option to adjust the amendment activation hysteresis. This option is useful on test networks, but should not be used on the main network as is a network-wide consensus parameter that should not be changed on a per-server basis; doing so can result in a hard-fork. * Fixes XRPLF#3396
* The amendment ballot counting code contained a minor technical flaw, caused by the use of integer arithmetic and rounding semantics, that could allow amendments to reach majority with slightly less than 80% support. This commit introduces an amendment which, if enabled, will ensure that activation requires at least 80% support. * This commit also introduces a configuration option to adjust the amendment activation hysteresis. This option is useful on test networks, but should not be used on the main network as is a network-wide consensus parameter that should not be changed on a per-server basis; doing so can result in a hard-fork. * Fixes XRPLF#3396
Improve amendment processing and activation logic: * The amendment ballot counting code contained a minor technical flaw, caused by the use of integer arithmetic and rounding semantics, that could allow amendments to reach majority with slightly less than 80% support. This commit introduces an amendment which, if enabled, will ensure that activation requires at least 80% support. * This commit also introduces a configuration option to adjust the amendment activation hysteresis. This option is useful on test networks, but should not be used on the main network as is a network-wide consensus parameter that should not be changed on a per-server basis; doing so can result in a hard-fork. * Fixes ripple#3396
Issue Description
I may be reading this incorrectly - but I think the 14 day timer to enable an amendment starts at
77.78%
(28 Ayes out of 36 as of today). 28 Ayes of 36 is only77.78%
agreement. Amendment process doc says this must be80%
or above.Observed this behavior with
RequireFullyCanonicalSig
amendment which is hovering around 27 Ayes at the moment. Once it achieved 28 Ayes (=77.78%
agreement), the validator inserted an EnableAmendment transaction and the 14 day timer started.Steps to Reproduce
Run:
on the validator when an amendment has 28 Ayes out of 36.
Expected Result
majority
property is not set.Actual Result
majority
property is set (see screenshot above).Environment
rippled-1.5.0
Supporting Files
The text was updated successfully, but these errors were encountered: