Malicious consumer can slash same validator for downtime multiple times
Problem
A malicious consumer could send multiple SlashPackets for the same validator for the same downtime infraction, which would result in that validator being slashed multiple times.
Closing criteria
Add logic on the provider that drops SlashPackets for downtime infraction for the same validator that were received from the same consumer without the validator having the chance to Unjail itself.
TODOs
- [x] Labels have been added for issue
- [x] Issue has been added to the ICS project
Potential solution (from discussion with @smarshall-spitzbart):
- Keep an
outstandingDowntimebool per validator per consumer chain (the bool is not needed if it'sfalse). - When receiving a
SlashPacketfor downtime, setoutstandingDowntimetotrue. - When a validator Unjails itself, set
outstandingDowntimetofalse.
As there is no Unjail hook in the SDK, we could either add one, or just check for newly bonded validators in the set of validator updates received from staking.
Isn't it a duplicate of #417?
Isn't it a duplicate of #417?
It may be. Could you please converge them into a single issue?
Indeed it was a duplicate issue, thanks @sainoe
Closing as a malicious consumer chain could always jail an opted in validator without that validator actually being down.