MsgCreateValidator should not allow a self delegation of 0 consensus power #8908
Closed
Description
opened on Mar 17, 2021
Summary
The MsgCreateValidator
does not check if the PotentialConsensusPower
of the self delegation is 0. It checks if the self delegation is positive, but if the self delegation is less than the PowerReduction, the consensus power will be 0. This results in the validator set being nil after running gentx with too low of an amount.
The error returned in this situation:
Error: error during handshake: error on replay: validator set is nil in genesis and still empty after InitChain
This error is very confusing for users since the gentx was clearly ran and the msg create validator is clearly included in genesis. It is pretty hard to debug as well
Alternatively, we could just add this check to the client code if for some reason this modification isn't safe to make in x/staking
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Metadata
Assignees
Labels
No labels
Activity