Skip to content

MsgCreateValidator should not allow a self delegation of 0 consensus power #8908

Closed
@colin-axner

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions