You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of slashing message info to the virtual-staking contract, the infraction time has to be sent as well.
Infraction time is:
The current block time for offline misbehaviours.
The evidence's infraction time, for double signing misbehaviours.
This is important since the infraction time time is used on the external-staking contract to filter out slashing of un delegations (for pending undelegations that started before the infraction)
This hasn't been done yet because the infraction time is not passed to the Slash() handler. So, this requires interfacing with / decorating HandleEquivocationEvidence() (that is, the evidence keeper), where that info is still present.
For offline infractions, the current block time can be sent in place of the evidence historical infraction time. This can (perhaps) be done in the SlashWithInfractionHeight decorator.
As discussed offline, a good way to do this could be:
Decorating the evidence keeper / HandleEquivocationEvidence, and first calling the real equivocation evidence handler in the decorator.
Then, checking if the validator is now jailed / tombstoned, and building a full slash message for the contracts in case it is.
The good thing about this is that the original evidence handler can be called unmodified. And, that it isn't necessary to reproduce / copy its logic in the decorator.
For robustness, you can check for jailing / slashing before calling the real handler, then check again after calling it, and only generate a slash message if there's a state transition to jailing / tombstoning.
Related to / follow up of #125.
As part of slashing message info to the virtual-staking contract, the infraction time has to be sent as well.
Infraction time is:
This is important since the infraction time time is used on the external-staking contract to filter out slashing of un delegations (for pending undelegations that started before the infraction)
See also: osmosis-labs/mesh-security#177
The text was updated successfully, but these errors were encountered: