aztec-packages icon indicating copy to clipboard operation
aztec-packages copied to clipboard

feat!: auto-slash inactive validators

Open just-mitch opened this issue 8 months ago • 1 comments

See tracking issue for remaining work.

Contract Changes

Periphery

Pretty much to spec. The slash factory now works on payloads that take in arrays of validators, amounts, and offenses.

Governance

  • Emit an event when a proposal is executable. This could be computed offchain, but that would require replication of the smart contract logic, which seems explicitly redundant.
  • A getter on the empire base to get the current round. Reduces the need for passing machinery or making multiple calls in TS.

I will add/update solidity tests for these if we find them to be acceptable changes.

Node changes

Slasher

~Upgraded from hypomeione to spartiate.~

Moved to its own package (out of sequencer). The Aztec server creates a Sentinel, and an EpochPruneWatcher, and pushes them into a SlasherClient, which is responsible for starting, listening, and stopping them.

See the comment at the top of slasher_client.ts.

EpochPruneWatcher

As noted, it is effectively wants to slash whenever there is a reorg. See tracking issue for the caveats that will need to be implemented.

Sentinel

Now stores a consolidated performance history for validators for proven epochs. When chain-proven is emitted, the consolidated epoch performance is computed and updated. It then determines the validators that missed more than the configured percentage, and emits WANT_TO_SLASH_EVENT.

Archiver

Now emits when it detects a new proven block.

just-mitch avatar May 08 '25 18:05 just-mitch

This stack of pull requests is managed by Graphite. Learn more about stacking.

just-mitch avatar May 08 '25 18:05 just-mitch