@aztec/slasher 0.0.1-commit.85d7d01 → 0.0.1-commit.8655d4a
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.
- package/README.md +76 -79
- package/dest/config.d.ts +1 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +29 -29
- package/dest/factory/create_facade.d.ts +3 -3
- package/dest/factory/create_facade.d.ts.map +1 -1
- package/dest/factory/create_facade.js +25 -2
- package/dest/factory/create_implementation.d.ts +6 -7
- package/dest/factory/create_implementation.d.ts.map +1 -1
- package/dest/factory/create_implementation.js +8 -56
- package/dest/factory/get_settings.d.ts +4 -4
- package/dest/factory/get_settings.d.ts.map +1 -1
- package/dest/factory/get_settings.js +3 -3
- package/dest/factory/index.d.ts +2 -2
- package/dest/factory/index.d.ts.map +1 -1
- package/dest/factory/index.js +1 -1
- package/dest/generated/slasher-defaults.d.ts +5 -5
- package/dest/generated/slasher-defaults.js +5 -5
- package/dest/index.d.ts +6 -4
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +5 -3
- package/dest/null_slasher_client.d.ts +3 -4
- package/dest/null_slasher_client.d.ts.map +1 -1
- package/dest/null_slasher_client.js +1 -4
- package/dest/slash_offenses_collector.d.ts +10 -9
- package/dest/slash_offenses_collector.d.ts.map +1 -1
- package/dest/slash_offenses_collector.js +50 -30
- package/dest/slasher_client.d.ts +112 -0
- package/dest/slasher_client.d.ts.map +1 -0
- package/dest/{tally_slasher_client.js → slasher_client.js} +45 -45
- package/dest/slasher_client_facade.d.ts +6 -8
- package/dest/slasher_client_facade.d.ts.map +1 -1
- package/dest/slasher_client_facade.js +6 -9
- package/dest/slasher_client_interface.d.ts +7 -21
- package/dest/slasher_client_interface.d.ts.map +1 -1
- package/dest/slasher_client_interface.js +1 -4
- package/dest/stores/offenses_store.d.ts +12 -12
- package/dest/stores/offenses_store.d.ts.map +1 -1
- package/dest/stores/offenses_store.js +61 -38
- package/dest/watcher.d.ts +8 -1
- package/dest/watcher.d.ts.map +1 -1
- package/dest/watcher.js +1 -0
- package/dest/watchers/attestations_block_watcher.d.ts +26 -13
- package/dest/watchers/attestations_block_watcher.d.ts.map +1 -1
- package/dest/watchers/attestations_block_watcher.js +76 -61
- package/dest/watchers/attested_invalid_proposal_watcher.d.ts +42 -0
- package/dest/watchers/attested_invalid_proposal_watcher.d.ts.map +1 -0
- package/dest/watchers/attested_invalid_proposal_watcher.js +117 -0
- package/dest/watchers/broadcasted_invalid_checkpoint_proposal_watcher.d.ts +38 -0
- package/dest/watchers/broadcasted_invalid_checkpoint_proposal_watcher.d.ts.map +1 -0
- package/dest/watchers/broadcasted_invalid_checkpoint_proposal_watcher.js +138 -0
- package/dest/watchers/checkpoint_equivocation_watcher.d.ts +30 -0
- package/dest/watchers/checkpoint_equivocation_watcher.d.ts.map +1 -0
- package/dest/watchers/checkpoint_equivocation_watcher.js +69 -0
- package/dest/watchers/data_withholding_watcher.d.ts +63 -0
- package/dest/watchers/data_withholding_watcher.d.ts.map +1 -0
- package/dest/watchers/data_withholding_watcher.js +193 -0
- package/package.json +10 -10
- package/src/config.ts +35 -29
- package/src/factory/create_facade.ts +32 -4
- package/src/factory/create_implementation.ts +24 -105
- package/src/factory/get_settings.ts +8 -8
- package/src/factory/index.ts +1 -1
- package/src/generated/slasher-defaults.ts +5 -5
- package/src/index.ts +5 -3
- package/src/null_slasher_client.ts +2 -6
- package/src/slash_offenses_collector.ts +70 -32
- package/src/{tally_slasher_client.ts → slasher_client.ts} +63 -54
- package/src/slasher_client_facade.ts +6 -11
- package/src/slasher_client_interface.ts +6 -21
- package/src/stores/offenses_store.ts +73 -47
- package/src/watcher.ts +8 -0
- package/src/watchers/attestations_block_watcher.ts +88 -82
- package/src/watchers/attested_invalid_proposal_watcher.ts +168 -0
- package/src/watchers/broadcasted_invalid_checkpoint_proposal_watcher.ts +192 -0
- package/src/watchers/checkpoint_equivocation_watcher.ts +96 -0
- package/src/watchers/data_withholding_watcher.ts +225 -0
- package/dest/empire_slasher_client.d.ts +0 -190
- package/dest/empire_slasher_client.d.ts.map +0 -1
- package/dest/empire_slasher_client.js +0 -564
- package/dest/stores/payloads_store.d.ts +0 -29
- package/dest/stores/payloads_store.d.ts.map +0 -1
- package/dest/stores/payloads_store.js +0 -128
- package/dest/tally_slasher_client.d.ts +0 -125
- package/dest/tally_slasher_client.d.ts.map +0 -1
- package/dest/watchers/epoch_prune_watcher.d.ts +0 -39
- package/dest/watchers/epoch_prune_watcher.d.ts.map +0 -1
- package/dest/watchers/epoch_prune_watcher.js +0 -176
- package/src/empire_slasher_client.ts +0 -649
- package/src/stores/payloads_store.ts +0 -149
- package/src/watchers/epoch_prune_watcher.ts +0 -253
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { EpochCacheInterface } from '@aztec/epoch-cache';
|
|
2
|
+
import { merge, pick } from '@aztec/foundation/collection';
|
|
3
|
+
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
4
|
+
import {
|
|
5
|
+
type CheckpointEquivocationDetectedEvent,
|
|
6
|
+
type L2BlockSourceEventEmitter,
|
|
7
|
+
L2BlockSourceEvents,
|
|
8
|
+
} from '@aztec/stdlib/block';
|
|
9
|
+
import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
10
|
+
import { OffenseType, getOffenseTypeName } from '@aztec/stdlib/slashing';
|
|
11
|
+
|
|
12
|
+
import EventEmitter from 'node:events';
|
|
13
|
+
|
|
14
|
+
import { WANT_TO_SLASH_EVENT, type WantToSlashArgs, type Watcher, type WatcherEmitter } from '../watcher.js';
|
|
15
|
+
|
|
16
|
+
const CheckpointEquivocationWatcherConfigKeys = ['slashDuplicateProposalPenalty'] as const;
|
|
17
|
+
|
|
18
|
+
type CheckpointEquivocationWatcherConfig = Pick<
|
|
19
|
+
SlasherConfig,
|
|
20
|
+
(typeof CheckpointEquivocationWatcherConfigKeys)[number]
|
|
21
|
+
>;
|
|
22
|
+
|
|
23
|
+
type EquivocationEventSource = Pick<L2BlockSourceEventEmitter, 'events'>;
|
|
24
|
+
type ProposerLookup = Pick<EpochCacheInterface, 'getProposerAttesterAddressInSlot'>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Slashes the slot proposer for DUPLICATE_PROPOSAL when the archiver detects that a
|
|
28
|
+
* locally-stored proposed checkpoint disagrees with the L1-confirmed checkpoint at the
|
|
29
|
+
* same slot. Both are signed by the slot proposer (the proposed one by accepting it via
|
|
30
|
+
* P2P or building it locally; the L1 one by submission), so the proposer equivocated.
|
|
31
|
+
*/
|
|
32
|
+
export class CheckpointEquivocationWatcher extends (EventEmitter as new () => WatcherEmitter) implements Watcher {
|
|
33
|
+
private readonly log: Logger = createLogger('checkpoint-equivocation-watcher');
|
|
34
|
+
private readonly handler: (args: CheckpointEquivocationDetectedEvent) => void;
|
|
35
|
+
private config: CheckpointEquivocationWatcherConfig;
|
|
36
|
+
|
|
37
|
+
constructor(
|
|
38
|
+
private readonly l2BlockSource: EquivocationEventSource,
|
|
39
|
+
private readonly epochCache: ProposerLookup,
|
|
40
|
+
config: CheckpointEquivocationWatcherConfig,
|
|
41
|
+
) {
|
|
42
|
+
super();
|
|
43
|
+
this.config = pick(config, ...CheckpointEquivocationWatcherConfigKeys);
|
|
44
|
+
this.handler = event => {
|
|
45
|
+
this.onEquivocationDetected(event).catch(err =>
|
|
46
|
+
this.log.error('Failed to handle checkpoint equivocation event', err),
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
this.log.info('CheckpointEquivocationWatcher initialized');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public updateConfig(config: Partial<CheckpointEquivocationWatcherConfig>): void {
|
|
53
|
+
this.config = merge(this.config, pick(config, ...CheckpointEquivocationWatcherConfigKeys));
|
|
54
|
+
this.log.verbose('CheckpointEquivocationWatcher config updated', this.config);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public start(): Promise<void> {
|
|
58
|
+
this.l2BlockSource.events.on(L2BlockSourceEvents.CheckpointEquivocationDetected, this.handler);
|
|
59
|
+
return Promise.resolve();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
public stop(): Promise<void> {
|
|
63
|
+
this.l2BlockSource.events.off(L2BlockSourceEvents.CheckpointEquivocationDetected, this.handler);
|
|
64
|
+
return Promise.resolve();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Public for tests. */
|
|
68
|
+
public async onEquivocationDetected(event: CheckpointEquivocationDetectedEvent): Promise<void> {
|
|
69
|
+
const proposer = await this.epochCache.getProposerAttesterAddressInSlot(event.slotNumber);
|
|
70
|
+
if (!proposer) {
|
|
71
|
+
this.log.warn(`Cannot attribute checkpoint equivocation: no proposer for slot ${event.slotNumber}`, {
|
|
72
|
+
slotNumber: event.slotNumber,
|
|
73
|
+
checkpointNumber: event.checkpointNumber,
|
|
74
|
+
});
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const slashArgs: WantToSlashArgs = {
|
|
79
|
+
validator: proposer,
|
|
80
|
+
amount: this.config.slashDuplicateProposalPenalty,
|
|
81
|
+
offenseType: OffenseType.DUPLICATE_PROPOSAL,
|
|
82
|
+
epochOrSlot: BigInt(event.slotNumber),
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
this.log.info(`Detected checkpoint equivocation offense`, {
|
|
86
|
+
slotNumber: event.slotNumber,
|
|
87
|
+
checkpointNumber: event.checkpointNumber,
|
|
88
|
+
amount: slashArgs.amount,
|
|
89
|
+
offenseType: getOffenseTypeName(slashArgs.offenseType),
|
|
90
|
+
l1ArchiveRoot: event.l1ArchiveRoot.toString(),
|
|
91
|
+
proposedArchiveRoot: event.proposedArchiveRoot.toString(),
|
|
92
|
+
validator: proposer.toString(),
|
|
93
|
+
});
|
|
94
|
+
this.emit(WANT_TO_SLASH_EVENT, [slashArgs]);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import type { EpochCache } from '@aztec/epoch-cache';
|
|
2
|
+
import { CheckpointProposalHash, SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
|
+
import { compactArray, merge, pick } from '@aztec/foundation/collection';
|
|
4
|
+
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
5
|
+
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
6
|
+
import { RunningPromise } from '@aztec/foundation/promise';
|
|
7
|
+
import type { L2BlockSource } from '@aztec/stdlib/block';
|
|
8
|
+
import { getAttestationInfoFromPublishedCheckpoint } from '@aztec/stdlib/block';
|
|
9
|
+
import type { CheckpointReexecutionTracker, PublishedCheckpoint } from '@aztec/stdlib/checkpoint';
|
|
10
|
+
import type { ITxProvider, P2PApi, SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
11
|
+
import { ConsensusPayload, type CoordinationSignatureContext } from '@aztec/stdlib/p2p';
|
|
12
|
+
import { OffenseType, getOffenseTypeName } from '@aztec/stdlib/slashing';
|
|
13
|
+
import type { TxHash } from '@aztec/stdlib/tx';
|
|
14
|
+
|
|
15
|
+
import EventEmitter from 'node:events';
|
|
16
|
+
|
|
17
|
+
import { WANT_TO_SLASH_EVENT, type WantToSlashArgs, type Watcher, type WatcherEmitter } from '../watcher.js';
|
|
18
|
+
|
|
19
|
+
const DataWithholdingWatcherConfigKeys = ['slashDataWithholdingPenalty', 'slashDataWithholdingToleranceSlots'] as const;
|
|
20
|
+
|
|
21
|
+
type DataWithholdingWatcherConfig = Pick<SlasherConfig, (typeof DataWithholdingWatcherConfigKeys)[number]>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Detects data-withholding offenses by probing the local mempool for the txs in published
|
|
25
|
+
* checkpoints once they are old enough that an honest node should have collected them.
|
|
26
|
+
*
|
|
27
|
+
* Per AZIP-7: once `slashDataWithholdingToleranceSlots` full slots have elapsed after the
|
|
28
|
+
* checkpoint's slot — i.e. at `slotStart(checkpoint.slot + slashDataWithholdingToleranceSlots
|
|
29
|
+
* + 1)` — if any tx from the checkpoint's blocks is still missing locally, the checkpoint's
|
|
30
|
+
* attesters are considered at fault for not making the data available, and we emit a slash
|
|
31
|
+
* for them.
|
|
32
|
+
*
|
|
33
|
+
* The watcher ticks at quarter-eth-slot cadence (matching the Sentinel template). On boot it
|
|
34
|
+
* floors processing at the current slot — restart-time gaps are accepted and not back-filled,
|
|
35
|
+
* matching the Sentinel approach.
|
|
36
|
+
*/
|
|
37
|
+
export class DataWithholdingWatcher extends (EventEmitter as new () => WatcherEmitter) implements Watcher {
|
|
38
|
+
private runningPromise: RunningPromise;
|
|
39
|
+
private initialSlot: SlotNumber | undefined;
|
|
40
|
+
private lastCheckedSlot: SlotNumber | undefined;
|
|
41
|
+
private config: DataWithholdingWatcherConfig;
|
|
42
|
+
|
|
43
|
+
constructor(
|
|
44
|
+
private readonly epochCache: EpochCache,
|
|
45
|
+
private readonly l2BlockSource: Pick<L2BlockSource, 'getCheckpoint' | 'getSyncedL2SlotNumber'>,
|
|
46
|
+
private readonly txProvider: Pick<ITxProvider, 'hasTxs'>,
|
|
47
|
+
private readonly p2p: Pick<P2PApi, 'getCheckpointAttestationsForSlot'>,
|
|
48
|
+
private readonly reexecutionTracker: Pick<CheckpointReexecutionTracker, 'getTxsCollectedRecord'>,
|
|
49
|
+
private readonly signatureContext: CoordinationSignatureContext,
|
|
50
|
+
config: DataWithholdingWatcherConfig,
|
|
51
|
+
private readonly log: Logger = createLogger('data-withholding-watcher'),
|
|
52
|
+
) {
|
|
53
|
+
super();
|
|
54
|
+
this.config = pick(config, ...DataWithholdingWatcherConfigKeys);
|
|
55
|
+
const interval = (epochCache.getL1Constants().ethereumSlotDuration * 1000) / 4;
|
|
56
|
+
this.runningPromise = new RunningPromise(this.work.bind(this), log, interval);
|
|
57
|
+
this.log.verbose(`DataWithholdingWatcher initialized`, this.config);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
public async start(): Promise<void> {
|
|
61
|
+
// Floor processing at the archiver's synced slot rather than the wallclock — restart-time
|
|
62
|
+
// gaps before the archiver catches up are accepted and not back-filled. Falls back to the
|
|
63
|
+
// wallclock if the archiver isn't ready yet (cold start).
|
|
64
|
+
const syncedSlot = await this.l2BlockSource.getSyncedL2SlotNumber();
|
|
65
|
+
this.initialSlot = syncedSlot ?? this.epochCache.getSlotNow();
|
|
66
|
+
this.log.info(`Starting data-withholding watcher with initial slot ${this.initialSlot}`);
|
|
67
|
+
this.runningPromise.start();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public stop(): Promise<void> {
|
|
71
|
+
return this.runningPromise.stop();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
public updateConfig(config: Partial<SlasherConfig>): void {
|
|
75
|
+
this.config = merge(this.config, pick(config, ...DataWithholdingWatcherConfigKeys));
|
|
76
|
+
this.log.verbose('DataWithholdingWatcher config updated', this.config);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Runs every tick. Walks newly-eligible slots and probes their checkpoints for data
|
|
81
|
+
* availability; emits a DATA_WITHHOLDING slash for any checkpoint whose txs are missing.
|
|
82
|
+
*/
|
|
83
|
+
public async work(): Promise<void> {
|
|
84
|
+
if (this.initialSlot === undefined) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// tolerance is the number of full slots that must elapse after the checkpoint's slot
|
|
89
|
+
// before we declare its data missing. For checkpoint slot S, we therefore process S
|
|
90
|
+
// only once we are in slot `S + tolerance + 1` or later. Drive this off the archiver's
|
|
91
|
+
// synced slot rather than the wallclock so we don't make claims about slots we haven't
|
|
92
|
+
// fully ingested yet (archiver may lag behind L1).
|
|
93
|
+
const tolerance = this.config.slashDataWithholdingToleranceSlots;
|
|
94
|
+
const currentSlot = (await this.l2BlockSource.getSyncedL2SlotNumber()) ?? this.epochCache.getSlotNow();
|
|
95
|
+
if (currentSlot <= tolerance) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const targetSlot = SlotNumber(currentSlot - tolerance - 1);
|
|
100
|
+
if (targetSlot <= this.initialSlot) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const startSlot = this.lastCheckedSlot === undefined ? this.initialSlot : this.lastCheckedSlot;
|
|
105
|
+
for (let slot = SlotNumber(startSlot + 1); slot <= targetSlot; slot = SlotNumber(slot + 1)) {
|
|
106
|
+
try {
|
|
107
|
+
await this.processSlot(slot);
|
|
108
|
+
} catch (err) {
|
|
109
|
+
this.log.error(`Error processing slot ${slot} for data-withholding check`, err, { slot });
|
|
110
|
+
}
|
|
111
|
+
this.lastCheckedSlot = slot;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** Probes the checkpoint at the given slot, if any, and emits a slash on missing txs. */
|
|
116
|
+
private async processSlot(slot: SlotNumber): Promise<void> {
|
|
117
|
+
const published = await this.l2BlockSource.getCheckpoint({ slot });
|
|
118
|
+
if (!published) {
|
|
119
|
+
this.log.trace(`No published checkpoint at slot ${slot}`, { slot });
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const checkpointNumber = published.checkpoint.number;
|
|
124
|
+
|
|
125
|
+
// Per-block tx-collection records (true | false | undefined) for every block in this
|
|
126
|
+
// published checkpoint. Captured by the validator's proposal handler at the moment of
|
|
127
|
+
// tx collection (i.e. by the *re-execution* deadline). Used as a positive short-circuit
|
|
128
|
+
// only: a `true` for every block means we know the data was available locally, so this
|
|
129
|
+
// checkpoint cannot be a data-withholding offense. A `false` does *not* trigger a slash
|
|
130
|
+
// on its own — the re-execution deadline is much earlier than the data-withholding
|
|
131
|
+
// tolerance window, so missing txs at that earlier deadline may still arrive in time.
|
|
132
|
+
// Anything other than all-true falls through to the mempool probe, which respects the
|
|
133
|
+
// tolerance window.
|
|
134
|
+
const collectionRecords = published.checkpoint.blocks.map((block, idx) =>
|
|
135
|
+
this.reexecutionTracker.getTxsCollectedRecord(block.header.getSlot(), idx),
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
if (collectionRecords.every(r => r === true)) {
|
|
139
|
+
this.log.trace(`All blocks for checkpoint at slot ${slot} were collected locally; skipping`, {
|
|
140
|
+
slot,
|
|
141
|
+
checkpointNumber,
|
|
142
|
+
});
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const txHashes: TxHash[] = published.checkpoint.blocks.flatMap(block =>
|
|
147
|
+
block.body.txEffects.map(txEffect => txEffect.txHash),
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
if (txHashes.length === 0) {
|
|
151
|
+
this.log.trace(`Checkpoint at slot ${slot} has no txs`, { slot });
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const availability = await this.txProvider.hasTxs(txHashes);
|
|
156
|
+
const missingTxs = txHashes.filter((_, i) => !availability[i]);
|
|
157
|
+
if (missingTxs.length === 0) {
|
|
158
|
+
this.log.trace(`All ${txHashes.length} txs available for checkpoint at slot ${slot}`, { slot });
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const attesters = await this.extractAttesters(published);
|
|
163
|
+
|
|
164
|
+
if (attesters.length === 0) {
|
|
165
|
+
this.log.warn(`Detected data withholding at slot ${slot} but no recoverable attesters`, {
|
|
166
|
+
slot,
|
|
167
|
+
checkpointNumber,
|
|
168
|
+
missingTxs: missingTxs.map(h => h.toString()),
|
|
169
|
+
records: collectionRecords,
|
|
170
|
+
});
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
this.log.info(`Detected data withholding offense at slot ${slot}`, {
|
|
175
|
+
slot,
|
|
176
|
+
checkpointNumber,
|
|
177
|
+
amount: this.config.slashDataWithholdingPenalty,
|
|
178
|
+
offenseType: getOffenseTypeName(OffenseType.DATA_WITHHOLDING),
|
|
179
|
+
missingTxs: missingTxs.map(h => h.toString()),
|
|
180
|
+
records: collectionRecords,
|
|
181
|
+
attesters: attesters.map(a => a.toString()),
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
const args: WantToSlashArgs[] = attesters.map(validator => ({
|
|
185
|
+
validator,
|
|
186
|
+
amount: this.config.slashDataWithholdingPenalty,
|
|
187
|
+
offenseType: OffenseType.DATA_WITHHOLDING,
|
|
188
|
+
epochOrSlot: BigInt(slot),
|
|
189
|
+
}));
|
|
190
|
+
this.emit(WANT_TO_SLASH_EVENT, args);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Returns the union of:
|
|
195
|
+
* 1. attesters whose signatures landed in the published checkpoint on L1, and
|
|
196
|
+
* 2. attesters we observed signing the same proposal on p2p (the proposer publishes as
|
|
197
|
+
* soon as it has hit committee quorum, so honest peer attestations that arrive after
|
|
198
|
+
* that point are dropped — but they still vouched for the data and
|
|
199
|
+
* should be slashed for withholding it).
|
|
200
|
+
*
|
|
201
|
+
*
|
|
202
|
+
* Exposed as protected so tests can substitute a deterministic recovery without having
|
|
203
|
+
* to construct real secp256k1 signatures.
|
|
204
|
+
*/
|
|
205
|
+
protected async extractAttesters(published: PublishedCheckpoint): Promise<EthAddress[]> {
|
|
206
|
+
const fromL1 = getAttestationInfoFromPublishedCheckpoint(published, this.signatureContext)
|
|
207
|
+
.filter(info => info.status === 'recovered-from-signature')
|
|
208
|
+
.map(info => info.address);
|
|
209
|
+
|
|
210
|
+
const slot = published.checkpoint.header.slotNumber;
|
|
211
|
+
const proposalPayloadHash = CheckpointProposalHash.fromBuffer(
|
|
212
|
+
ConsensusPayload.fromCheckpoint(published.checkpoint, this.signatureContext).getPayloadHash(),
|
|
213
|
+
);
|
|
214
|
+
const fromP2p = await this.p2p
|
|
215
|
+
.getCheckpointAttestationsForSlot(slot, proposalPayloadHash)
|
|
216
|
+
.then(attestations => attestations.map(a => a.getSender()));
|
|
217
|
+
|
|
218
|
+
// Dedupe
|
|
219
|
+
const all = new Map<string, EthAddress>();
|
|
220
|
+
for (const addr of compactArray([...fromL1, ...fromP2p])) {
|
|
221
|
+
all.set(addr.toString(), addr);
|
|
222
|
+
}
|
|
223
|
+
return [...all.values()];
|
|
224
|
+
}
|
|
225
|
+
}
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1waXJlX3NsYXNoZXJfY2xpZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZW1waXJlX3NsYXNoZXJf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