Closed unclezoro closed 11 months ago
@rickyyangz @HaoyangLiu
I have located the issue. The ValidatorByPowerIndex key of new validator is the same as the old one. As a result, the power index key of the old validator is overwritten. There is some bugs in building ValidatorByPowerIndex key. I'm working on how to fix it.
https://github.com/binance-chain/node/pull/515 https://github.com/binance-chain/bnc-cosmos-sdk/pull/100 Previously, I have create a PR to fix this issue. But I postponed it and forgot it later. It is my fault.
precedure: ./bnbcli create-validator --from bob --deposit "100000000000:BNB" --pubkey bcap1zcjduepqadxkdq5np7ds9hu94xghwmhdsxzc50cpp7zyn06pk5zv068pz49snkpuug --commission-rate=0 --commission-max-rate=0 --commission-max-change-rate=0 --moniker=testnode --amount "1000000000000:BNB" --voting-period=30 --chain-id bnbchain-1000 --trust-node --node http://127.0.0.1:26657 --home testnodecli
./bnbcli gov vote --proposal-id 1 --option yes --from alice --chain-id bnbchain-1000 --trust-node --node http://127.0.0.1:26657 --home testnodecli
./bnbcli create-validator --from bob --pubkey bcap1zcjduepqadxkdq5np7ds9hu94xghwmhdsxzc50cpp7zyn06pk5zv068pz49snkpuug --commission-rate=0 --commission-max-rate=0 --commission-max-change-rate=0 --moniker=testnode --amount "1000000000000:BNB" --proposal-id 1 --chain-id bnbchain-1000 --trust-node --node http://127.0.0.1:26657 --home testnodecli
Then curl 127.0.0.1:26657/valdiators, you will find the previous validator is just replaced.