-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Staking ValidatorPowerRank should use "Potential Consensus Power" #3985
Comments
the actionable item is modify: tendermintPower := potentialPower.Int64() to tendermintPower := TokensToTendermintPower(validator.Tokens) As well as any legacy conversion necessary |
Perhaps it would make sense to make tendermintPower its own type? (Or rather "ConsensusPower" to be mechanism agnostic) |
nice, I like |
rigelrozanski
changed the title
Staking ValidatorPowerRank should use "Potential Tendermint Power"
Staking ValidatorPowerRank should use "Potential Consensus Power"
Apr 2, 2019
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Referring to "Potential Tendermint Power" as the tokens reduced by a threshold (as is currently used within the ABCI)
cosmos-sdk/types/staking.go
Line 48 in d00a15b
This issue is followup to this comment in the code which contains incorrect variable names:
cosmos-sdk/x/staking/keeper/key.go
Lines 72 to 79 in 9cf9e6f
Which was referenced recently in #2439
By using the Potential Tendermint Power we remove any Int64 overflow issues, not to mention make the variable names in the code reflective of reality (currently these variable names are misleading/incorrect - this is NOT the tendermint power, the tendermint power is equivalent to Potential Tendermint Power)
CC @alexanderbez @keichiri @cwgoes
The text was updated successfully, but these errors were encountered: