exchain icon indicating copy to clipboard operation
exchain copied to clipboard

The value of delegator shares on a validator couldn't be zero once in a while

Open banishee opened this issue 4 years ago • 0 comments

Summary of Bug

1. Describe

A private network was running on my own test machines, then I found a situation that looks wired. The value of delegator shares on a validator couldn't be zero once in a while, even if there are none of delegators adding shares on that validator

For example:

  • Step 1: query the value of delegator shares on one of validators
$ okchaincli query staking validators 
[
  {
    "operator_address": "okchainvaloper1qy4e490rwctehf2xvvjqsmhn4cp4fmyepadax6",
 ……
    "jailed": true,
    "status": 0,
    "delegator_shares": "217679375.96579041",   
 ……
    "unbonding_height": "83804",
    "unbonding_time": "2020-07-20T09:04:40.574657261Z",
    "min_self_delegation": "10000.00000000"
  },
 ……
]
  • Step 2: query the list of delegators who added shares to the validator, but the result may be null
$ okchaincli query staking shares-added-to okchainvaloper1qy4e490rwctehf2xvvjqsmhn4cp4fmyepadax6
null

2. Impact

  • Some validators who are destroyed can't be removed from the validator set
  • the value of delegator share may increase for no reason

3. Recover

Version

before https://github.com/okex/okchain/commit/5af033480fbfa89ebdd34578e68bf08cb2cedaf4, I suspect

Steps to Reproduce

  • Actually, there is only a very tiny possibility of reproducing this situation
  • I am not sure it was my own problem with the local config environment of okchaincli, or not.

For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

banishee avatar Jul 20 '20 09:07 banishee