I tried to run my chain with cosmos v0.20.0, and I found out the validators (genesis) shows the bonding status as Unbonded, except one of the validators. In my case, I have 4 validators and only the last validator (the owner with account number 3) showing Bonded.
All of them definitely are bonded since they have voting power, and their votes are showing on the log as well. When I tried to revoke and unrevoke one of those validators which shown Unbonded, it shows Bonded as expected. Also, when someone delegate to those validators, it will show Unbonded to Bonded too. There is no problem on the bonding status for a full node to become a validator.
Interesting, thanks for the catch - could you outline the exact commands you used to reproduce this bug? That would be very useful
First, I create the genesis file as usual by doing init gen-tx and init --gen-txs, then start the chain.
You can try to do these cmd to check if the validator is bonded instead of what it shown on the status (Unbonded)
mycli stake unrevoke cosmosaccaddr1hyvksj9cj7yxnkxm5pgucp3n8rw63ncwxccnaw --chain-id chain-001 --from sherrymycli stake create-validator --from newme --address-validator cosmosaccaddr19qpswqy4ucmarn99z9wsp6sxwan2qte054ceva --amount 4steak --pubkey cosmosvalpub1zcjduepq7v2rw70ag89chj5ngmayzqxppk65ep5ndqssd540uvhupl4rxz9q53mp75 --chain-id chain-001Then do the following will catch the bugs:
mycli stake delegate --address-delegator cosmosaccaddr19qpswqy4ucmarn99z9wsp6sxwan2qte054ceva --address-validator cosmosaccaddr1pvtv6y293rj5wz3ua77xaxpdm7v2raxdleyyjm --chain-id chain-001 --from sherrymycli stake unrevoke cosmosaccaddr1hyvksj9cj7yxnkxm5pgucp3n8rw63ncwxccnaw --chain-id chain-001 --from sherry2Thanks @sherry13131 I'll debug this one v soon
Either a UX bug or something more problematic:
RE: Bucky
yeh they all say unbonded
i think this is due to the “remove global shares” change. can you open an issue?
Here is the outputs:
gaiacli stake validator cosmosaccaddr182ujqw3r8p5fffjqkf0rxzj29pg5q96nxd2khq
Validator
Owner: cosmosaccaddr182ujqw3r8p5fffjqkf0rxzj29pg5q96nxd2khq
Validator: cosmosvalpub1zcjduepq2k5scsfrcyfwfqh5mshtl3vks6m925np7l2m2y0ruxa2fxrysp8sgwe8u4
Status: Unbonded
Tokens: 100.0000000000
Delegator Shares: 100.0000000000
Description: {Umbrella }
Bond Height: 0
Proposer Reward Pool:
Commission: 0/1
Max Commission Rate: 0/1
Commission Change Rate: 0/1
Commission Change Today: 0/1
Previous Bonded Tokens: 0/1
Cant unrevoke:
gaiacli stake unrevoke cosmosaccaddr182ujqw3r8p5fffjqkf0rxzj29pg5q96nxd2khq --chain-id=gaia-7001 --from=Umbrella
Defaulting to account number: 48
Defaulting to next sequence number: 0
Password to sign with 'Umbrella':
ERROR: checkTx failed: (655463) Msg 0 failed: === ABCI Log ===
Codespace: 10
Code: 103
ABCICode: 655463
Error: --= Error =--
Data: common.FmtError{format:"validator not revoked, cannot be unrevoked", args:[]interface {}(nil)}
Msg Traces:
--= /Error =--
=== /ABCI Log ===
But validator seems to be signing blocks:
"height/round/step": "1757/0/1",
"Vote{52:7E0289744CEB 1757/00/1(Prevote) 000000000000 /F9AD6E9E1C7A.../ @ 2018-07-17T17:19:00.775Z}",
Looks like delegating more steak fixes the UI:
gaiacli stake validator cosmosaccaddr182ujqw3r8p5fffjqkf0rxzj29pg5q96nxd2khq
Validator
Owner: cosmosaccaddr182ujqw3r8p5fffjqkf0rxzj29pg5q96nxd2khq
Validator: cosmosvalpub1zcjduepq2k5scsfrcyfwfqh5mshtl3vks6m925np7l2m2y0ruxa2fxrysp8sgwe8u4
Status: Bonded
Tokens: 110.0000000000
thanks @jinghiskwon looks related
WOW interesting edge case - turns out that you CAN create duplicate records in the power store due to a bug in staking genesis. Basically what I understand is happening is that multiple validators with the same initial voting power are set to be added in the genesis - because the intra-tx counter is not set during genesis (aka left at 0 default) there is nothing to distinguish the key for the power store, so only one record gets added to the power-store, and only one record is looped through when updating the full validator set. The solution is to add an intra-tx counter for the validators being included at genesis, which mean that validators located earlier on in the genesis file will be given preference if they have identical voting power to another genesis validator.
As far as I can tell this is the only genesis bug which would make a validator not-bonded, symptoms seem to match up. Seems to fix the problem when I replicated in a local testnet should be resolved in #1724
Most helpful comment
WOW interesting edge case - turns out that you CAN create duplicate records in the power store due to a bug in staking genesis. Basically what I understand is happening is that multiple validators with the same initial voting power are set to be added in the genesis - because the intra-tx counter is not set during genesis (aka left at 0 default) there is nothing to distinguish the key for the power store, so only one record gets added to the power-store, and only one record is looped through when updating the full validator set. The solution is to add an intra-tx counter for the validators being included at genesis, which mean that validators located earlier on in the genesis file will be given preference if they have identical voting power to another genesis validator.
As far as I can tell this is the only genesis bug which would make a validator not-bonded, symptoms seem to match up. Seems to fix the problem when I replicated in a local testnet should be resolved in #1724