confio / poe-contracts

Tgrade PoE smart contracts
Apache License 2.0
25 stars 11 forks source link

tgrade-valset: Wrong automatic jailing logic #184

Closed maurolacy closed 2 years ago

maurolacy commented 2 years ago

If verify_validators is enabled, non-signing validators must be jailed only if they are not already jailed. If not, it'll be effectively impossible for them to get out of jail, because their jailing expiration date will be continuously moved forward.

https://github.com/confio/poe-contracts/blob/5c1ac97551f99c44c72f310a4a3d08d3856486e1/contracts/tgrade-valset/src/contract.rs#L712-L713

Write a test to confirm / reproduce this bug, and the fix.

maurolacy commented 2 years ago

Closing as not needed / already solved (see #187).