Bug description
It is possible to have two validators one Jailed and one Active with different consensus addresses but the same operator address. Becasue the DB table validator_info contains the unique modifier for the operator_address .
Steps to reproduce
- Create a validator with
pub key 1, operator address 1, and self delegate address 1
- Stop the validator and let it be jailed
- Undelegate from the validator
- Run BDJuno and let it sync the data (and keep it running)
- Create a validator with
pub key 2, operator address 1, and self delegate address 1
- Check BDJuno logic the
violates unique constraint "validator_info_operator_address_key" error will there
- Try to update validators state using the cli
bdjuno parse staking validators --home .bdjuno, the same error will error out.
Expected behavior
The BDJuno should save both validators.