Tendermint version: 97222eb90fc4b2882fe1859a665f2c84764c4b58
What happened: When adding a new validator that temporarily exceedes the TotalMaxVotingPower limit, Tendermint crashes
What you expected to happen: The validator should be added to the set
Have you tried the latest version: yes
How to reproduce it (as minimally and precisely as possible):
Say we have the following:
validator_1 with power = TotalMaxVotingPower - 1 and
validator_2 with power = 1
If you want to update the powers so that:
validator_2 with power = TotalMaxVotingPower - 1 and
validator_1 with power = 1
Tendermint might end up panicking due to Power Overflow
Could you clarify if you saw a panic or an error message? I believe the solution in https://github.com/tendermint/tendermint/pull/4165 is not correct and in fact we will see crashes here.
@gchaincl @tessr @melekes
Just committed 3 tests at:
https://github.com/tendermint/tendermint/blob/5e4cbd2ca5716bf11bd7777f080b85c128bb3130/types/validator_set_test.go#L1264
tests 1 and 2 fail before fix https://github.com/tendermint/tendermint/pull/4165, they return an error when they shouldn't
tests 2 and 3 fail after fix https://github.com/tendermint/tendermint/pull/4165, with 3 causing a panic.
Will work on a fix next.
Should be fixed now with https://github.com/tendermint/tendermint/pull/4183. Thanks all!
Most helpful comment
@gchaincl @tessr @melekes
Just committed 3 tests at:
https://github.com/tendermint/tendermint/blob/5e4cbd2ca5716bf11bd7777f080b85c128bb3130/types/validator_set_test.go#L1264
tests 1 and 2 fail before fix https://github.com/tendermint/tendermint/pull/4165, they return an error when they shouldn't
tests 2 and 3 fail after fix https://github.com/tendermint/tendermint/pull/4165, with 3 causing a panic.
Will work on a fix next.