@aztec/slasher 0.0.1-commit.ec5f612 → 0.0.1-commit.ec7ac5448

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +28 -52
  2. package/dest/config.d.ts +1 -1
  3. package/dest/config.d.ts.map +1 -1
  4. package/dest/config.js +1 -13
  5. package/dest/factory/create_facade.d.ts +3 -3
  6. package/dest/factory/create_facade.d.ts.map +1 -1
  7. package/dest/factory/create_facade.js +25 -2
  8. package/dest/factory/create_implementation.d.ts +6 -7
  9. package/dest/factory/create_implementation.d.ts.map +1 -1
  10. package/dest/factory/create_implementation.js +8 -56
  11. package/dest/factory/get_settings.d.ts +4 -4
  12. package/dest/factory/get_settings.d.ts.map +1 -1
  13. package/dest/factory/get_settings.js +3 -3
  14. package/dest/factory/index.d.ts +2 -2
  15. package/dest/factory/index.d.ts.map +1 -1
  16. package/dest/factory/index.js +1 -1
  17. package/dest/generated/slasher-defaults.d.ts +2 -4
  18. package/dest/generated/slasher-defaults.d.ts.map +1 -1
  19. package/dest/generated/slasher-defaults.js +1 -3
  20. package/dest/index.d.ts +2 -3
  21. package/dest/index.d.ts.map +1 -1
  22. package/dest/index.js +1 -2
  23. package/dest/null_slasher_client.d.ts +3 -4
  24. package/dest/null_slasher_client.d.ts.map +1 -1
  25. package/dest/null_slasher_client.js +1 -4
  26. package/dest/slash_offenses_collector.d.ts +5 -8
  27. package/dest/slash_offenses_collector.d.ts.map +1 -1
  28. package/dest/slash_offenses_collector.js +9 -18
  29. package/dest/slasher_client.d.ts +112 -0
  30. package/dest/slasher_client.d.ts.map +1 -0
  31. package/dest/{tally_slasher_client.js → slasher_client.js} +26 -40
  32. package/dest/slasher_client_facade.d.ts +6 -8
  33. package/dest/slasher_client_facade.d.ts.map +1 -1
  34. package/dest/slasher_client_facade.js +6 -9
  35. package/dest/slasher_client_interface.d.ts +7 -21
  36. package/dest/slasher_client_interface.d.ts.map +1 -1
  37. package/dest/slasher_client_interface.js +1 -4
  38. package/dest/stores/offenses_store.d.ts +6 -12
  39. package/dest/stores/offenses_store.d.ts.map +1 -1
  40. package/dest/stores/offenses_store.js +5 -24
  41. package/dest/watchers/epoch_prune_watcher.d.ts +1 -1
  42. package/dest/watchers/epoch_prune_watcher.d.ts.map +1 -1
  43. package/dest/watchers/epoch_prune_watcher.js +4 -1
  44. package/package.json +9 -9
  45. package/src/config.ts +2 -13
  46. package/src/factory/create_facade.ts +32 -4
  47. package/src/factory/create_implementation.ts +24 -105
  48. package/src/factory/get_settings.ts +8 -8
  49. package/src/factory/index.ts +1 -1
  50. package/src/generated/slasher-defaults.ts +1 -3
  51. package/src/index.ts +1 -2
  52. package/src/null_slasher_client.ts +2 -6
  53. package/src/slash_offenses_collector.ts +16 -20
  54. package/src/{tally_slasher_client.ts → slasher_client.ts} +33 -49
  55. package/src/slasher_client_facade.ts +6 -11
  56. package/src/slasher_client_interface.ts +6 -21
  57. package/src/stores/offenses_store.ts +8 -33
  58. package/src/watchers/epoch_prune_watcher.ts +4 -1
  59. package/dest/empire_slasher_client.d.ts +0 -190
  60. package/dest/empire_slasher_client.d.ts.map +0 -1
  61. package/dest/empire_slasher_client.js +0 -564
  62. package/dest/stores/payloads_store.d.ts +0 -29
  63. package/dest/stores/payloads_store.d.ts.map +0 -1
  64. package/dest/stores/payloads_store.js +0 -128
  65. package/dest/tally_slasher_client.d.ts +0 -125
  66. package/dest/tally_slasher_client.d.ts.map +0 -1
  67. package/src/empire_slasher_client.ts +0 -649
  68. package/src/stores/payloads_store.ts +0 -149
@@ -1,6 +1,6 @@
1
1
  import { EthAddress } from '@aztec/aztec.js/addresses';
2
2
  import type { EpochCache } from '@aztec/epoch-cache';
3
- import { RollupContract, SlasherContract, TallySlashingProposerContract } from '@aztec/ethereum/contracts';
3
+ import { RollupContract, SlasherContract, SlashingProposerContract } from '@aztec/ethereum/contracts';
4
4
  import { maxBigint } from '@aztec/foundation/bigint';
5
5
  import { SlotNumber } from '@aztec/foundation/branded-types';
6
6
  import { compactArray, partition, times } from '@aztec/foundation/collection';
@@ -13,7 +13,6 @@ import {
13
13
  OffenseType,
14
14
  type ProposerSlashAction,
15
15
  type ProposerSlashActionProvider,
16
- type SlashPayloadRound,
17
16
  getEpochsForRound,
18
17
  getSlashConsensusVotesFromOffenses,
19
18
  } from '@aztec/stdlib/slashing';
@@ -30,8 +29,8 @@ import type { SlasherClientInterface } from './slasher_client_interface.js';
30
29
  import type { SlasherOffensesStore } from './stores/offenses_store.js';
31
30
  import type { Watcher } from './watcher.js';
32
31
 
33
- /** Settings used in the tally slasher client, loaded from the L1 contracts during initialization */
34
- export type TallySlasherSettings = Prettify<
32
+ /** Settings used in the slasher client, loaded from the L1 contracts during initialization */
33
+ export type SlasherSettings = Prettify<
35
34
  SlashRoundMonitorSettings &
36
35
  SlashOffensesCollectorSettings & {
37
36
  slashingLifetimeInRounds: number;
@@ -45,11 +44,14 @@ export type TallySlasherSettings = Prettify<
45
44
  }
46
45
  >;
47
46
 
48
- export type TallySlasherClientConfig = SlashOffensesCollectorConfig &
49
- Pick<SlasherConfig, 'slashValidatorsAlways' | 'slashValidatorsNever' | 'slashExecuteRoundsLookBack'>;
47
+ export type SlasherClientConfig = SlashOffensesCollectorConfig &
48
+ Pick<
49
+ SlasherConfig,
50
+ 'slashValidatorsAlways' | 'slashValidatorsNever' | 'slashExecuteRoundsLookBack' | 'slashMaxPayloadSize'
51
+ >;
50
52
 
51
53
  /**
52
- * The Tally Slasher client is responsible for managing slashable offenses using
54
+ * The Slasher client is responsible for managing slashable offenses using
53
55
  * the consensus-based slashing model where proposers vote on individual validator offenses.
54
56
  *
55
57
  * The client subscribes to several slash watchers that emit offenses and tracks them. When the slasher is the
@@ -73,22 +75,16 @@ export type TallySlasherClientConfig = SlashOffensesCollectorConfig &
73
75
  * - Validators that reach the quorum threshold are slashed. A vote for slashing N units is also considered
74
76
  * a vote for slashing N-1, N-2, ..., 1 units. The system slashes for the largest amount that reaches quorum.
75
77
  * - The client monitors executable rounds and triggers execution when appropriate.
76
- *
77
- * Differences from Empire model
78
- * - No fixed slash payloads - votes are for individual validator offenses encoded in bytes
79
- * - The L1 contract determines which offenses reach quorum rather than nodes agreeing on a payload
80
- * - Proposers vote directly on which validators to slash and by how much
81
- * - Uses a slash offset to vote on validators from past rounds (e.g., round N votes on round N-2)
82
78
  */
83
- export class TallySlasherClient implements ProposerSlashActionProvider, SlasherClientInterface {
79
+ export class SlasherClient implements ProposerSlashActionProvider, SlasherClientInterface {
84
80
  protected unwatchCallbacks: (() => void)[] = [];
85
81
  protected roundMonitor: SlashRoundMonitor;
86
82
  protected offensesCollector: SlashOffensesCollector;
87
83
 
88
84
  constructor(
89
- private config: TallySlasherClientConfig,
90
- private settings: TallySlasherSettings,
91
- private tallySlashingProposer: TallySlashingProposerContract,
85
+ private config: SlasherClientConfig,
86
+ private settings: SlasherSettings,
87
+ private slashingProposer: SlashingProposerContract,
92
88
  private slasher: SlasherContract,
93
89
  private rollup: RollupContract,
94
90
  watchers: Watcher[],
@@ -102,14 +98,14 @@ export class TallySlasherClient implements ProposerSlashActionProvider, SlasherC
102
98
  }
103
99
 
104
100
  public async start() {
105
- this.log.debug('Starting Tally Slasher client...');
101
+ this.log.debug('Starting slasher client...');
106
102
 
107
103
  this.roundMonitor.start();
108
104
  await this.offensesCollector.start();
109
105
 
110
106
  // Listen for RoundExecuted events
111
107
  this.unwatchCallbacks.push(
112
- this.tallySlashingProposer.listenToRoundExecuted(
108
+ this.slashingProposer.listenToRoundExecuted(
113
109
  ({ round, slashCount, l1BlockHash }) =>
114
110
  void this.handleRoundExecuted(round, slashCount, l1BlockHash).catch(err =>
115
111
  this.log.error('Error handling round executed', err),
@@ -120,15 +116,13 @@ export class TallySlasherClient implements ProposerSlashActionProvider, SlasherC
120
116
  // Check for round changes
121
117
  this.unwatchCallbacks.push(this.roundMonitor.listenToNewRound(round => this.handleNewRound(round)));
122
118
 
123
- this.log.info(`Started tally slasher client`);
119
+ this.log.info(`Started slasher client`);
124
120
  return Promise.resolve();
125
121
  }
126
122
 
127
- /**
128
- * Stop the tally slasher client
129
- */
123
+ /** Stop the slasher client */
130
124
  public async stop() {
131
- this.log.debug('Stopping Tally Slasher client...');
125
+ this.log.debug('Stopping slasher client...');
132
126
 
133
127
  for (const unwatchCallback of this.unwatchCallbacks) {
134
128
  unwatchCallback();
@@ -137,7 +131,7 @@ export class TallySlasherClient implements ProposerSlashActionProvider, SlasherC
137
131
  this.roundMonitor.stop();
138
132
  await this.offensesCollector.stop();
139
133
 
140
- this.log.info('Tally Slasher client stopped');
134
+ this.log.info('Slasher client stopped');
141
135
  }
142
136
 
143
137
  /** Returns the current config */
@@ -152,11 +146,11 @@ export class TallySlasherClient implements ProposerSlashActionProvider, SlasherC
152
146
 
153
147
  /** Triggered on a time basis when we enter a new slashing round. Clears expired offenses. */
154
148
  protected async handleNewRound(round: bigint) {
155
- this.log.info(`Starting new tally slashing round ${round}`);
149
+ this.log.info(`Starting new slashing round ${round}`);
156
150
  await this.offensesCollector.handleNewRound(round);
157
151
  }
158
152
 
159
- /** Called when we see a RoundExecuted event on the TallySlashingProposer (just for logging). */
153
+ /** Called when we see a RoundExecuted event on the SlashingProposer (just for logging). */
160
154
  protected async handleRoundExecuted(round: bigint, slashCount: bigint, l1BlockHash: Hex) {
161
155
  const slashes = await this.rollup.getSlashEvents(l1BlockHash);
162
156
  this.log.info(`Slashing round ${round} has been executed with ${slashCount} slashes`, { slashes });
@@ -237,7 +231,7 @@ export class TallySlasherClient implements ProposerSlashActionProvider, SlasherC
237
231
  this.log.debug(`Testing if slashing round ${executableRound} is executable`, logData);
238
232
 
239
233
  try {
240
- const roundInfo = await this.tallySlashingProposer.getRound(executableRound);
234
+ const roundInfo = await this.slashingProposer.getRound(executableRound);
241
235
  logData = { ...logData, roundInfo };
242
236
  if (roundInfo.isExecuted) {
243
237
  this.log.verbose(`Round ${executableRound} has already been executed`, logData);
@@ -251,7 +245,7 @@ export class TallySlasherClient implements ProposerSlashActionProvider, SlasherC
251
245
  }
252
246
 
253
247
  // Check if round is ready to execute at the given slot
254
- const isReadyToExecute = await this.tallySlashingProposer.isRoundReadyToExecute(executableRound, slotNumber);
248
+ const isReadyToExecute = await this.slashingProposer.isRoundReadyToExecute(executableRound, slotNumber);
255
249
  if (!isReadyToExecute) {
256
250
  this.log.warn(
257
251
  `Round ${executableRound} is not ready to execute at slot ${slotNumber} according to contract check`,
@@ -261,14 +255,14 @@ export class TallySlasherClient implements ProposerSlashActionProvider, SlasherC
261
255
  }
262
256
 
263
257
  // Check if the round yields any slashing at all
264
- const { actions: slashActions, committees } = await this.tallySlashingProposer.getTally(executableRound);
258
+ const { actions: slashActions, committees } = await this.slashingProposer.getTally(executableRound);
265
259
  if (slashActions.length === 0) {
266
260
  this.log.verbose(`Round ${executableRound} does not resolve in any slashing`, logData);
267
261
  return undefined;
268
262
  }
269
263
 
270
264
  // Check if the slash payload is vetoed
271
- const payload = await this.tallySlashingProposer.getPayload(executableRound);
265
+ const payload = await this.slashingProposer.getPayload(executableRound);
272
266
  const isVetoed = await this.slasher.isPayloadVetoed(payload.address);
273
267
  if (isVetoed) {
274
268
  this.log.warn(`Round ${executableRound} payload is vetoed (skipping execution)`, {
@@ -349,24 +343,22 @@ export class TallySlasherClient implements ProposerSlashActionProvider, SlasherC
349
343
  return undefined;
350
344
  }
351
345
 
352
- const offensesToSlashLog = offensesToSlash.map(offense => ({
353
- ...offense,
354
- amount: offense.amount.toString(),
355
- }));
356
346
  this.log.info(`Voting to slash ${offensesToSlash.length} offenses`, {
357
347
  slotNumber,
358
348
  currentRound,
359
349
  slashedRound,
360
- offensesToSlash: offensesToSlashLog,
350
+ offensesToSlash,
361
351
  });
362
352
 
363
353
  const committees = await this.collectCommitteesActiveDuringRound(slashedRound);
364
354
  const epochsForCommittees = getEpochsForRound(slashedRound, this.settings);
355
+ const { slashMaxPayloadSize } = this.config;
365
356
  const votes = getSlashConsensusVotesFromOffenses(
366
357
  offensesToSlash,
367
358
  committees,
368
359
  epochsForCommittees.map(e => BigInt(e)),
369
- this.settings,
360
+ { ...this.settings, maxSlashedValidators: slashMaxPayloadSize },
361
+ this.log,
370
362
  );
371
363
  if (votes.every(v => v === 0)) {
372
364
  this.log.warn(`Computed votes for offenses are all zero. Skipping vote.`, {
@@ -404,17 +396,9 @@ export class TallySlasherClient implements ProposerSlashActionProvider, SlasherC
404
396
  );
405
397
  }
406
398
 
407
- /**
408
- * Get slash payloads is NOT SUPPORTED in tally model
409
- * @throws Error indicating this operation is not supported
410
- */
411
- public getSlashPayloads(): Promise<SlashPayloadRound[]> {
412
- return Promise.reject(new Error('Tally slashing model does not support slash payloads'));
413
- }
414
-
415
399
  /**
416
400
  * Gather offenses to be slashed on a given round.
417
- * In tally slashing, round N slashes validators from round N - slashOffsetInRounds.
401
+ * Round N slashes validators from round N - slashOffsetInRounds.
418
402
  * @param round - The round to get offenses for, defaults to current round
419
403
  * @returns Array of pending offenses for the round with offset applied
420
404
  */
@@ -427,9 +411,9 @@ export class TallySlasherClient implements ProposerSlashActionProvider, SlasherC
427
411
  return await this.offensesStore.getOffensesForRound(targetRound);
428
412
  }
429
413
 
430
- /** Returns all pending offenses stored */
431
- public getPendingOffenses(): Promise<Offense[]> {
432
- return this.offensesStore.getPendingOffenses();
414
+ /** Returns all offenses stored */
415
+ public getOffenses(): Promise<Offense[]> {
416
+ return this.offensesStore.getOffenses();
433
417
  }
434
418
 
435
419
  /**
@@ -2,13 +2,12 @@ import { EpochCache } from '@aztec/epoch-cache';
2
2
  import { RollupContract } from '@aztec/ethereum/contracts';
3
3
  import type { ViemClient } from '@aztec/ethereum/types';
4
4
  import type { SlotNumber } from '@aztec/foundation/branded-types';
5
- import { EthAddress } from '@aztec/foundation/eth-address';
6
5
  import { createLogger } from '@aztec/foundation/log';
7
6
  import { DateProvider } from '@aztec/foundation/timer';
8
- import type { DataStoreConfig } from '@aztec/kv-store/config';
9
7
  import { AztecLMDBStoreV2 } from '@aztec/kv-store/lmdb-v2';
10
8
  import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
11
- import type { Offense, ProposerSlashAction, SlashPayloadRound } from '@aztec/stdlib/slashing';
9
+ import type { DataStoreConfig } from '@aztec/stdlib/kv-store';
10
+ import type { Offense, ProposerSlashAction } from '@aztec/stdlib/slashing';
12
11
 
13
12
  import { createSlasherImplementation } from './factory/create_implementation.js';
14
13
  import type { SlasherClientInterface } from './slasher_client_interface.js';
@@ -27,11 +26,11 @@ export class SlasherClientFacade implements SlasherClientInterface {
27
26
  private config: SlasherConfig & DataStoreConfig & { ethereumSlotDuration: number },
28
27
  private rollup: RollupContract,
29
28
  private l1Client: ViemClient,
30
- private slashFactoryAddress: EthAddress | undefined,
31
29
  private watchers: Watcher[],
32
30
  private epochCache: EpochCache,
33
31
  private dateProvider: DateProvider,
34
32
  private kvStore: AztecLMDBStoreV2,
33
+ private rollupRegisteredAtL2Slot: SlotNumber,
35
34
  private logger = createLogger('slasher'),
36
35
  ) {}
37
36
 
@@ -62,16 +61,12 @@ export class SlasherClientFacade implements SlasherClientInterface {
62
61
  this.watchers.forEach(watcher => watcher.updateConfig?.(config));
63
62
  }
64
63
 
65
- public getSlashPayloads(): Promise<SlashPayloadRound[]> {
66
- return this.client?.getSlashPayloads() ?? Promise.reject(new Error('Slasher client not initialized'));
67
- }
68
-
69
64
  public gatherOffensesForRound(round?: bigint): Promise<Offense[]> {
70
65
  return this.client?.gatherOffensesForRound(round) ?? Promise.reject(new Error('Slasher client not initialized'));
71
66
  }
72
67
 
73
- public getPendingOffenses(): Promise<Offense[]> {
74
- return this.client?.getPendingOffenses() ?? Promise.reject(new Error('Slasher client not initialized'));
68
+ public getOffenses(): Promise<Offense[]> {
69
+ return this.client?.getOffenses() ?? Promise.reject(new Error('Slasher client not initialized'));
75
70
  }
76
71
 
77
72
  public getProposerActions(slotNumber: SlotNumber): Promise<ProposerSlashAction[]> {
@@ -83,11 +78,11 @@ export class SlasherClientFacade implements SlasherClientInterface {
83
78
  this.config,
84
79
  this.rollup,
85
80
  this.l1Client,
86
- this.slashFactoryAddress,
87
81
  this.watchers,
88
82
  this.epochCache,
89
83
  this.dateProvider,
90
84
  this.kvStore,
85
+ this.rollupRegisteredAtL2Slot,
91
86
  this.logger,
92
87
  );
93
88
  }
@@ -1,11 +1,8 @@
1
1
  import type { SlotNumber } from '@aztec/foundation/branded-types';
2
2
  import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
3
- import type { Offense, ProposerSlashAction, SlashPayloadRound } from '@aztec/stdlib/slashing';
3
+ import type { Offense, ProposerSlashAction } from '@aztec/stdlib/slashing';
4
4
 
5
- /**
6
- * Common interface for slasher clients used by the Aztec node.
7
- * Both Empire and Consensus slasher clients implement this interface.
8
- */
5
+ /** Common interface for slasher clients used by the Aztec node. */
9
6
  export interface SlasherClientInterface {
10
7
  /** Start the slasher client */
11
8
  start(): Promise<void>;
@@ -13,25 +10,13 @@ export interface SlasherClientInterface {
13
10
  /** Stop the slasher client */
14
11
  stop(): Promise<void>;
15
12
 
16
- /**
17
- * Get slash payloads for the Empire model.
18
- * The Consensus model should throw an error when this is called.
19
- */
20
- getSlashPayloads(): Promise<SlashPayloadRound[]>;
21
-
22
- /**
23
- * Gather offenses for a given round, defaults to current.
24
- * Used by both Empire and Consensus models.
25
- */
13
+ /** Gather offenses for a given round, defaults to current. */
26
14
  gatherOffensesForRound(round?: bigint): Promise<Offense[]>;
27
15
 
28
- /** Returns all pending offenses */
29
- getPendingOffenses(): Promise<Offense[]>;
16
+ /** Returns all offenses */
17
+ getOffenses(): Promise<Offense[]>;
30
18
 
31
- /**
32
- * Update the configuration.
33
- * Used by both Empire and Consensus models.
34
- */
19
+ /** Update the configuration. */
35
20
  updateConfig(config: Partial<SlasherConfig>): void;
36
21
 
37
22
  /**
@@ -1,5 +1,5 @@
1
1
  import { createLogger } from '@aztec/aztec.js/log';
2
- import type { AztecAsyncKVStore, AztecAsyncMap, AztecAsyncMultiMap, AztecAsyncSet } from '@aztec/kv-store';
2
+ import type { AztecAsyncKVStore, AztecAsyncMap, AztecAsyncMultiMap } from '@aztec/kv-store';
3
3
  import {
4
4
  type Offense,
5
5
  type OffenseIdentifier,
@@ -14,10 +14,7 @@ export class SlasherOffensesStore {
14
14
  /** Map from offense key to offense data */
15
15
  private offenses: AztecAsyncMap<string, Buffer>;
16
16
 
17
- /** Map from offense key to whether the offense has been executed (only used for empire based slashing) */
18
- private offensesSlashed: AztecAsyncSet<string>;
19
-
20
- /** Multimap from round to offense keys (only used for consensus based slashing) */
17
+ /** Multimap from round to offense keys */
21
18
  private roundsOffenses: AztecAsyncMultiMap<string, string>;
22
19
 
23
20
  private log = createLogger('slasher:store:offenses');
@@ -32,18 +29,13 @@ export class SlasherOffensesStore {
32
29
  ) {
33
30
  this.offenses = kvStore.openMap('offenses');
34
31
  this.roundsOffenses = kvStore.openMultiMap('rounds-offenses');
35
- this.offensesSlashed = kvStore.openSet('offenses-slashed');
36
32
  }
37
33
 
38
- /** Returns all offenses not marked as slashed */
39
- public async getPendingOffenses(): Promise<Offense[]> {
34
+ /** Returns all offenses */
35
+ public async getOffenses(): Promise<Offense[]> {
40
36
  const offenses: Offense[] = [];
41
- for await (const [key, buffer] of this.offenses.entriesAsync()) {
42
- if (await this.offensesSlashed.hasAsync(key)) {
43
- continue; // Skip executed offenses
44
- }
45
- const offense = deserializeOffense(buffer);
46
- offenses.push(offense);
37
+ for await (const [, buffer] of this.offenses.entriesAsync()) {
38
+ offenses.push(deserializeOffense(buffer));
47
39
  }
48
40
  return offenses;
49
41
  }
@@ -61,20 +53,14 @@ export class SlasherOffensesStore {
61
53
  return offenses;
62
54
  }
63
55
 
64
- /** Returns whether an offense is pending (ie not marked as slashed) */
65
- public async hasPendingOffense(offense: OffenseIdentifier): Promise<boolean> {
66
- const key = this.getOffenseKey(offense);
67
- return (await this.offenses.getAsync(key)) !== undefined && !(await this.offensesSlashed.hasAsync(key));
68
- }
69
-
70
56
  /** Returns whether we have seen this offense */
71
57
  public async hasOffense(offense: OffenseIdentifier): Promise<boolean> {
72
58
  const key = this.getOffenseKey(offense);
73
59
  return (await this.offenses.getAsync(key)) !== undefined;
74
60
  }
75
61
 
76
- /** Adds a new offense (defaults to pending, but will be slashed if markAsSlashed had been called for it) */
77
- public async addPendingOffense(offense: Offense): Promise<void> {
62
+ /** Adds a new offense */
63
+ public async addOffense(offense: Offense): Promise<void> {
78
64
  const key = this.getOffenseKey(offense);
79
65
  const round = getRoundForOffense(offense, this.settings);
80
66
  await this.kvStore.transactionAsync(async () => {
@@ -84,16 +70,6 @@ export class SlasherOffensesStore {
84
70
  this.log.trace(`Adding pending offense ${key} for round ${round}`);
85
71
  }
86
72
 
87
- /** Marks the given offenses as slashed (regardless of whether they are known or not) */
88
- public async markAsSlashed(offenses: OffenseIdentifier[]): Promise<void> {
89
- await this.kvStore.transactionAsync(async () => {
90
- for (const offense of offenses) {
91
- const key = this.getOffenseKey(offense);
92
- await this.offensesSlashed.add(key);
93
- }
94
- });
95
- }
96
-
97
73
  /** Prunes all offenses expired from the store */
98
74
  public async clearExpiredOffenses(currentRound: bigint): Promise<number> {
99
75
  const expirationRounds = this.settings.slashOffenseExpirationRounds ?? 0;
@@ -125,7 +101,6 @@ export class SlasherOffensesStore {
125
101
  for (const key of expiredOffenseKeys) {
126
102
  this.log.trace(`Deleting offense ${key}`);
127
103
  await this.offenses.delete(key);
128
- await this.offensesSlashed.delete(key);
129
104
  }
130
105
  for (const roundKey of expiredRoundKeys) {
131
106
  this.log.trace(`Deleting round info for ${roundKey}`);
@@ -211,7 +211,10 @@ export class EpochPruneWatcher extends (EventEmitter as new () => WatcherEmitter
211
211
  }
212
212
 
213
213
  const gv = blockFromL1.header.globalVariables;
214
- const { block, failedTxs, numTxs } = await checkpointBuilder.buildBlock(txs, gv.blockNumber, gv.timestamp, {});
214
+ const { block, failedTxs, numTxs } = await checkpointBuilder.buildBlock(txs, gv.blockNumber, gv.timestamp, {
215
+ isBuildingProposal: false,
216
+ minValidTxs: 0,
217
+ });
215
218
 
216
219
  if (numTxs !== txs.length) {
217
220
  // This should be detected by state mismatch, but this makes it easier to debug.
@@ -1,190 +0,0 @@
1
- import { EmpireSlashingProposerContract, RollupContract, SlasherContract } from '@aztec/ethereum/contracts';
2
- import { SlotNumber } from '@aztec/foundation/branded-types';
3
- import { EthAddress } from '@aztec/foundation/eth-address';
4
- import type { DateProvider } from '@aztec/foundation/timer';
5
- import type { L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
6
- import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
7
- import { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
8
- import { type Offense, type ProposerSlashAction, type ProposerSlashActionProvider, type SlashPayload, type SlashPayloadRound } from '@aztec/stdlib/slashing';
9
- import { type SlashOffensesCollectorSettings } from './slash_offenses_collector.js';
10
- import type { SlasherClientInterface } from './slasher_client_interface.js';
11
- import type { SlasherOffensesStore } from './stores/offenses_store.js';
12
- import type { SlasherPayloadsStore } from './stores/payloads_store.js';
13
- import type { Watcher } from './watcher.js';
14
- /** Used to track executable payloads for each round */
15
- export type PayloadWithRound = {
16
- payload: EthAddress;
17
- round: bigint;
18
- };
19
- /** Node configuration for the empire slasher */
20
- export type EmpireSlasherConfig = SlasherConfig;
21
- /** Settings used in the empire slasher client, loaded from the L1 contracts during initialization */
22
- export type EmpireSlasherSettings = {
23
- slashingExecutionDelayInRounds: number;
24
- slashingPayloadLifetimeInRounds: number;
25
- slashingRoundSize: number;
26
- slashingQuorumSize: number;
27
- } & Pick<L1RollupConstants, 'epochDuration' | 'proofSubmissionEpochs' | 'l1GenesisTime' | 'slotDuration' | 'l1StartBlock' | 'ethereumSlotDuration'> & SlashOffensesCollectorSettings;
28
- /**
29
- * The Empire Slasher client is responsible for managing slashable offenses and slash payloads
30
- * using the Empire slashing model where fixed payloads are created and voted on.
31
- *
32
- * The client subscribes to several slash watchers that emit offenses and tracks them. When the slasher is the
33
- * proposer, it aggregates pending offenses from previous rounds and creates slash payloads, or votes for previous
34
- * slash payloads.
35
- * Voting is handled by the sequencer publisher, the slasher client does not interact with L1 directly.
36
- * The client also monitors slash payloads created by other nodes, and executes them when they become submittable.
37
- *
38
- * Payload creation and selection
39
- * - At each L2 slot in a slashing round, the proposer for that L2 slot may vote for an existing slashing payload or
40
- * create one of their own. Note that anyone can create a slash payload on L1, but nodes will only follow payloads
41
- * from proposers; we could enforce this on L1, but we do not want to make any changes there if we can avoid it.
42
- * - If it is the first L2 slot in the slashing round, there is nothing to vote for, so the proposer creates a slash
43
- * payload and votes for it.
44
- * - On their turn, each proposer computes a score for each payload in the round. This score is a function of the
45
- * total offences slashed, how many votes it has received so far, and how far into the round we are. The score for a
46
- * payload is zero if the proposer disagrees with it (see "agreement" below).
47
- * - The proposer also computes the score for the payload they would create. If the resulting score is higher than
48
- * any existing payload, it creates the payload. Otherwise, it votes for the one with the highest score.
49
- *
50
- * Collecting offences
51
- * - Whenever a node spots a slashable offence, they store it and add it to a local collection of "pending
52
- * offences". When a proposer needs to create a slash payload, they include all pending offences from previous
53
- * rounds. This means an offence is **only slashable in the next round it happened** (or a future one).
54
- * - Each offence also carries an epoch or block identifier, so we can differentiate two offences of the same kind by
55
- * the same validator.
56
- * - When a slash payload is flagged as executable (as in it got enough votes to be executed), nodes remove all
57
- * slashed offences in the payload from their collection of pending offences.
58
- * - Pending offences expire after a configurable time. This is to minimize divergences. For instance, a validator
59
- * that has to be slashed due to inactivity 50 epochs ago will only be considered for slashing by nodes that were
60
- * online 50 epochs ago. We propose using the validator exit window as expiration time, any value higher means that
61
- * we may try slashing validators that have exited the set already.
62
- *
63
- * Agreement and scoring
64
- * - A proposer will *agree* with a slash payload if it *agrees* with every offence in the payload, all
65
- * *uncontroversial* offences from the past round are included, and it is below a configurable maximum size.
66
- * - An *uncontroversial* offence is one where every node agrees that a slash is in order, regardless of any p2p
67
- * network partitions. The only uncontroversial offence we have now is "proposing a block on L1 with invalid
68
- * attestations".
69
- * - A proposer will *agree* with a given offence if it is present in its list of "pending offences", and the
70
- * slashing amount is within a configurable min-max range.
71
- * - Slash payloads need a maximum size to ensure they can don't exceed the maximum L1 gas per tx when executed.
72
- * This is configurable but depends on the L1 contracts implementation. When creating a payload, if there are too
73
- * many pending offences to fit, proposers favor the offences with the highest slashing amount first, tie-breaking by
74
- * choosing the most recent ones.
75
- * - The scoring function will boost proposals with more agreed slashes, as well as proposals with more votes, and
76
- * will disincentivize the creation of new proposals as the end of the round nears. This function will NOT be
77
- * enforced on L1.
78
- *
79
- * Execution
80
- * - Once a slash payload becomes executable, the next proposer is expected to execute it. If they don't, the
81
- * following does, and so on. No gas rebate is given.
82
- */
83
- export declare class EmpireSlasherClient implements ProposerSlashActionProvider, SlasherClientInterface {
84
- private config;
85
- private settings;
86
- private slashFactoryContract;
87
- private slashingProposer;
88
- private slasher;
89
- private rollup;
90
- private dateProvider;
91
- private offensesStore;
92
- private payloadsStore;
93
- private log;
94
- protected executablePayloads: PayloadWithRound[];
95
- private unwatchCallbacks;
96
- private overridePayloadActive;
97
- private offensesCollector;
98
- private roundMonitor;
99
- constructor(config: EmpireSlasherConfig, settings: EmpireSlasherSettings, slashFactoryContract: SlashFactoryContract, slashingProposer: EmpireSlashingProposerContract, slasher: SlasherContract, rollup: RollupContract, watchers: Watcher[], dateProvider: DateProvider, offensesStore: SlasherOffensesStore, payloadsStore: SlasherPayloadsStore, log?: import("@aztec/foundation/log").Logger);
100
- start(): Promise<void>;
101
- /**
102
- * Allows consumers to stop the instance of the slasher client.
103
- * 'ready' will now return 'false' and the running promise that keeps the client synced is interrupted.
104
- */
105
- stop(): Promise<void>;
106
- /** Returns the current config */
107
- getConfig(): EmpireSlasherConfig;
108
- /**
109
- * Update the config of the slasher client
110
- * @param config - The new config
111
- */
112
- updateConfig(config: Partial<SlasherConfig>): void;
113
- getSlashPayloads(): Promise<SlashPayloadRound[]>;
114
- /**
115
- * Triggered on a time basis when we enter a new slashing round.
116
- * Clears expired payloads and offenses from stores.
117
- */
118
- protected handleNewRound(round: bigint): Promise<void>;
119
- /**
120
- * Called when we see a PayloadSubmittable event on the SlashProposer.
121
- * Adds the proposal to the list of executable ones.
122
- */
123
- protected handleProposalExecutable(payloadAddress: EthAddress, round: bigint): Promise<void>;
124
- /**
125
- * Called when we see a PayloadSubmitted event on the SlashProposer.
126
- * Removes the proposal from the list of executable ones.
127
- */
128
- protected handleProposalExecuted(payload: EthAddress, round: bigint): Promise<void>;
129
- /**
130
- * Called when we see a SignalCast event on the SlashProposer.
131
- * Adds a vote for the given payload in the round.
132
- * Retrieves the proposal if we have not seen it before.
133
- */
134
- protected handleProposalSignalled(payloadAddress: EthAddress, round: bigint, signaller: EthAddress): Promise<void>;
135
- /**
136
- * Create a slash payload for the given round from pending offenses
137
- * @param round - The round to create the payload for, defaults to the current round
138
- * @returns The payload data or undefined if no offenses to slash
139
- */
140
- gatherOffensesForRound(round?: bigint): Promise<Offense[]>;
141
- /** Returns all pending offenses stored */
142
- getPendingOffenses(): Promise<Offense[]>;
143
- /** Get uncontroversial offenses that are expected to be present on the given round. */
144
- protected getPendingUncontroversialOffensesForRound(round: bigint): Promise<Offense[]>;
145
- /**
146
- * Calculate score for a slash payload, bumping the votes by one, so we get the score as if we voted for it.
147
- * @param payload - The payload to score
148
- * @param votes - Number of votes the payload has received
149
- * @returns The score for the payload
150
- */
151
- protected calculatePayloadScore(payload: Pick<SlashPayloadRound, 'votes' | 'slashes'>): bigint;
152
- /**
153
- * Get the actions the proposer should take for slashing
154
- * @param slotNumber - The current slot number
155
- * @returns The actions to take
156
- */
157
- getProposerActions(slotNumber: SlotNumber): Promise<ProposerSlashAction[]>;
158
- /** Returns an execute payload action if there are any payloads ready to be executed */
159
- protected getExecutePayloadAction(slotNumber: SlotNumber): Promise<ProposerSlashAction | undefined>;
160
- /** Returns a vote or create payload action based on payload scoring */
161
- protected getProposePayloadActions(slotNumber: SlotNumber): Promise<ProposerSlashAction[]>;
162
- /**
163
- * Check if we agree with a payload:
164
- * - We must agree with every offense in the payload
165
- * - All uncontroversial offenses from past rounds must be included
166
- * - Payload must be below maximum size
167
- * - Slash amounts must be within acceptable ranges
168
- */
169
- protected agreeWithPayload(payload: SlashPayload, round: bigint, cachedUncontroversialOffenses?: Offense[]): Promise<boolean>;
170
- /**
171
- * Returns whether the given offense can be included in the given round.
172
- * Depends on the offense round range and whether we include offenses from past rounds.
173
- */
174
- private isOffenseForRound;
175
- /**
176
- * Returns the range (inclusive) of rounds in which we could expect an offense to be found.
177
- * Lower bound is determined by all offenses that should have been captured before the start of a round,
178
- * which depends on the offense type (eg INACTIVITY is captured once an epoch ends, DATA_WITHHOLDING is
179
- * captured after the epoch proof submission window for the epoch for which the data was withheld).
180
- * Upper bound is determined by the expiration rounds for an offense, which is a config setting.
181
- */
182
- private getRoundRangeForOffense;
183
- /** Returns the acceptable range for slash amount given a set of offenses. */
184
- private getSlashAmountValidRange;
185
- /** Get minimum acceptable amount for an offense type */
186
- private getMinAmountForOffense;
187
- /** Get maximum acceptable amount for an offense type */
188
- private getMaxAmountForOffense;
189
- }
190
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1waXJlX3NsYXNoZXJfY2xpZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZW1waXJlX3NsYXNoZXJfY2xpZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSw4QkFBOEIsRUFBRSxjQUFjLEVBQUUsZUFBZSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFFNUcsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBRTdELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUUzRCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUM1RCxPQUFPLEtBQUssRUFBRSxpQkFBaUIsR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