@aztec/slasher 0.0.1-commit.b2a5d0dd1 → 0.0.1-commit.b3d3157a
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 +54 -33
- package/dest/config.d.ts +1 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +27 -15
- package/dest/factory/create_facade.d.ts +2 -2
- package/dest/factory/create_facade.d.ts.map +1 -1
- package/dest/generated/slasher-defaults.d.ts +5 -3
- package/dest/generated/slasher-defaults.d.ts.map +1 -1
- package/dest/generated/slasher-defaults.js +4 -2
- package/dest/index.d.ts +5 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +4 -1
- package/dest/metrics.d.ts +7 -0
- package/dest/metrics.d.ts.map +1 -0
- package/dest/metrics.js +11 -0
- package/dest/slash_offenses_collector.d.ts +6 -2
- package/dest/slash_offenses_collector.d.ts.map +1 -1
- package/dest/slash_offenses_collector.js +46 -17
- package/dest/slasher_client.d.ts +4 -2
- package/dest/slasher_client.d.ts.map +1 -1
- package/dest/slasher_client.js +26 -7
- package/dest/stores/offenses_store.d.ts +9 -3
- package/dest/stores/offenses_store.d.ts.map +1 -1
- package/dest/stores/offenses_store.js +60 -18
- 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 +32 -15
- package/src/factory/create_facade.ts +1 -1
- package/src/generated/slasher-defaults.ts +4 -2
- package/src/index.ts +4 -1
- package/src/metrics.ts +19 -0
- package/src/slash_offenses_collector.ts +60 -18
- package/src/slasher_client.ts +35 -6
- package/src/stores/offenses_store.ts +71 -20
- 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/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 -179
- package/src/watchers/epoch_prune_watcher.ts +0 -256
package/README.md
CHANGED
|
@@ -81,16 +81,10 @@ Key features:
|
|
|
81
81
|
List of all slashable offenses in the system:
|
|
82
82
|
|
|
83
83
|
### DATA_WITHHOLDING
|
|
84
|
-
**Description**: The data
|
|
85
|
-
**Detection**:
|
|
86
|
-
**Target**:
|
|
87
|
-
**Time Unit**:
|
|
88
|
-
|
|
89
|
-
### VALID_EPOCH_PRUNED
|
|
90
|
-
**Description**: An epoch was not successfully proven within the proof submission window.
|
|
91
|
-
**Detection**: EpochPruneWatcher monitors epochs that expire without valid proofs.
|
|
92
|
-
**Target**: Committee members of the unpruned epoch.
|
|
93
|
-
**Time Unit**: Epoch-based offense.
|
|
84
|
+
**Description**: The transaction data for a published checkpoint was not made available within the tolerance window.
|
|
85
|
+
**Detection**: DataWithholdingWatcher checks each published checkpoint's txs against the local mempool once `slashDataWithholdingToleranceSlots` full slots have elapsed past the checkpoint's slot (i.e. at `slotStart(checkpoint.slot + slashDataWithholdingToleranceSlots + 1)`).
|
|
86
|
+
**Target**: Validators who attested to the checkpoint.
|
|
87
|
+
**Time Unit**: Slot-based offense (the checkpoint's slot).
|
|
94
88
|
|
|
95
89
|
### INACTIVITY
|
|
96
90
|
**Description**: A proposer failed to attest or propose blocks during their assigned slots.
|
|
@@ -116,18 +110,30 @@ List of all slashable offenses in the system:
|
|
|
116
110
|
**Target**: Block proposer.
|
|
117
111
|
**Time Unit**: Slot-based offense.
|
|
118
112
|
|
|
119
|
-
###
|
|
120
|
-
**Description**: A
|
|
121
|
-
**Detection**: AttestationsBlockWatcher tracks invalid
|
|
122
|
-
**Target**:
|
|
113
|
+
### PROPOSED_DESCENDANT_OF_CHECKPOINT_WITH_INVALID_ATTESTATIONS
|
|
114
|
+
**Description**: A proposer published a checkpoint to L1 that builds on an invalid checkpoint (one with invalid or insufficient attestations).
|
|
115
|
+
**Detection**: AttestationsBlockWatcher tracks invalid checkpoints and their descendants.
|
|
116
|
+
**Target**: Proposer of the descendant checkpoint.
|
|
123
117
|
**Time Unit**: Slot-based offense.
|
|
124
118
|
|
|
125
119
|
### DUPLICATE_PROPOSAL
|
|
126
|
-
**Description**: A proposer sent multiple block or checkpoint proposals for the same position (slot and indexWithinCheckpoint for blocks, or slot for checkpoints) with different content. Since each slot has exactly one designated proposer, sending conflicting proposals is equivocation.
|
|
127
|
-
**Detection**: Detected in
|
|
120
|
+
**Description**: A proposer sent multiple block or checkpoint proposals for the same position (slot and indexWithinCheckpoint for blocks, or slot for checkpoints) with different content. Since each slot has exactly one designated proposer, sending conflicting proposals is equivocation. This also covers the case where a proposer broadcasts one checkpoint proposal via P2P but submits a different checkpoint to L1 for the same slot.
|
|
121
|
+
**Detection**: Detected in two places. (1) The P2P layer flags duplicates when a second proposal arrives for the same position with a different archive; the AttestationPool tracks proposals by position and the first duplicate is propagated (Accept) so other validators can witness the offense. (2) CheckpointEquivocationWatcher compares the archive root of each L1-confirmed checkpoint against retained signed P2P checkpoint proposals from the same slot's proposer and flags any mismatch.
|
|
128
122
|
**Target**: Proposer who broadcast the duplicate proposal.
|
|
129
123
|
**Time Unit**: Slot-based offense.
|
|
130
124
|
|
|
125
|
+
### ATTESTED_TO_INVALID_CHECKPOINT_PROPOSAL
|
|
126
|
+
**Description**: A committee member attested to a checkpoint proposal in a slot where this node detected a slashable invalid block proposal.
|
|
127
|
+
**Detection**: ValidatorClient marks slots with invalid block proposals detected via reexecution and slashes checkpoint attesters seen for that slot. If proposal equivocation is later detected for the slot, pending bad-attestation offenses are cleared.
|
|
128
|
+
**Target**: Committee members who attested in the invalid proposal slot.
|
|
129
|
+
**Time Unit**: Slot-based offense.
|
|
130
|
+
|
|
131
|
+
### BROADCASTED_INVALID_CHECKPOINT_PROPOSAL
|
|
132
|
+
**Description**: A proposer broadcast an invalid checkpoint proposal, either one that terminates before a higher-index block proposal signed by the same proposer in the same slot, one whose signed header does not match deterministic validator recomputation, or one with a malformed fee asset price modifier. The first case also covers AZIP-7's _Submitting Block Proposal After Checkpoint_: a later block signed by the same proposer in the same slot makes the prior checkpoint retroactively invalid.
|
|
133
|
+
**Detection**: BroadcastedInvalidCheckpointProposalWatcher scans retained P2P proposal evidence and compares checkpoint archive roots to signed block proposals from the same slot and signer. ValidatorClient also validates checkpoint proposals during the all-nodes callback and emits this offense when checkpoint header recomputation fails or the signed fee asset price modifier is malformed.
|
|
134
|
+
**Target**: Proposer who broadcast the invalid checkpoint proposal.
|
|
135
|
+
**Time Unit**: Slot-based offense.
|
|
136
|
+
|
|
131
137
|
## Configuration
|
|
132
138
|
|
|
133
139
|
### L1 System Settings (L1ContractsConfig)
|
|
@@ -144,26 +150,32 @@ Considerations:
|
|
|
144
150
|
|
|
145
151
|
- The `slashingQuorumSize` should be more than half and less than the total number of validators in a round, so that we require a majority to slash. The number of validators in a round is the committee size times the number of epochs in a round.
|
|
146
152
|
- The bigger a `slashingRoundSizeInEpochs`, the bigger the upper bound on the quorum size. This increases security, as we need more validators to agree before slashing. However, it also makes slashing slower, and more expensive to execute in terms of gas.
|
|
147
|
-
- The `slashingOffsetInRounds` is required because the validators in a given slashing round must vote for _past_ offenses. Otherwise, if someone commits an offense near the end of a round, they can get away with their offense without the validators being able to collect enough votes to slash them. The offset needs to be big enough so that all offenses are discoverable, so this value should be strictly greater than the
|
|
153
|
+
- The `slashingOffsetInRounds` is required because the validators in a given slashing round must vote for _past_ offenses. Otherwise, if someone commits an offense near the end of a round, they can get away with their offense without the validators being able to collect enough votes to slash them. The offset needs to be big enough so that all offenses are discoverable, so this value should be strictly greater than the data-withholding tolerance window so that there is time to detect missing data and vote.
|
|
148
154
|
- The `slashingExecutionDelayInRounds` allows vetoers to stop an invalid slash. This should be large enough to give vetoers time to act, but strictly smaller than the validator exit window, so an offender cannot escape before they are slashed. It should also be small enough so that an offender that would be kicked out does not get picked up to be a committee member again before their slash is executed. In other words, if a validator commits a serious enough offense that we want them out of the validator set as soon as possible, the execution delay should not allow them to be chosen to participate in another committee.
|
|
149
155
|
|
|
150
156
|
### Local Node Configuration (SlasherConfig)
|
|
151
157
|
|
|
152
158
|
These settings are configured locally on each validator node:
|
|
153
159
|
|
|
160
|
+
Block and checkpoint validation settings are expected to be the same across all validators. Slashing relies on
|
|
161
|
+
validators making the same deterministic validity decisions for block and checkpoint proposals; operators should not run
|
|
162
|
+
with divergent validation limits.
|
|
163
|
+
|
|
154
164
|
- `slashGracePeriodL2Slots`: Number of initial L2 slots where slashing is disabled
|
|
155
165
|
- `slashOffenseExpirationRounds`: Number of rounds after which pending offenses expire
|
|
156
166
|
- `slashValidatorsAlways`: Array of validator addresses that should always be slashed
|
|
157
167
|
- `slashValidatorsNever`: Array of validator addresses that should never be slashed (own validator addresses are automatically added to this list)
|
|
158
168
|
- `slashInactivityTargetPercentage`: Percentage of misses during an epoch to be slashed for INACTIVITY
|
|
159
169
|
- `slashInactivityConsecutiveEpochThreshold`: How many consecutive inactive epochs are needed to trigger an INACTIVITY slash on a validator
|
|
160
|
-
- `slashPrunePenalty`: Penalty for VALID_EPOCH_PRUNED
|
|
161
170
|
- `slashDataWithholdingPenalty`: Penalty for DATA_WITHHOLDING
|
|
171
|
+
- `slashDataWithholdingToleranceSlots`: Number of full L2 slots to wait after a checkpoint's slot before declaring its txs missing
|
|
162
172
|
- `slashInactivityPenalty`: Penalty for INACTIVITY
|
|
163
173
|
- `slashBroadcastedInvalidBlockPenalty`: Penalty for BROADCASTED_INVALID_BLOCK_PROPOSAL
|
|
174
|
+
- `slashBroadcastedInvalidCheckpointProposalPenalty`: Penalty for BROADCASTED_INVALID_CHECKPOINT_PROPOSAL
|
|
164
175
|
- `slashDuplicateProposalPenalty`: Penalty for DUPLICATE_PROPOSAL
|
|
165
176
|
- `slashProposeInvalidAttestationsPenalty`: Penalty for PROPOSED_INSUFFICIENT_ATTESTATIONS and PROPOSED_INCORRECT_ATTESTATIONS
|
|
166
|
-
- `
|
|
177
|
+
- `slashProposeDescendantOfCheckpointWithInvalidAttestationsPenalty`: Penalty for PROPOSED_DESCENDANT_OF_CHECKPOINT_WITH_INVALID_ATTESTATIONS
|
|
178
|
+
- `slashAttestInvalidCheckpointProposalPenalty`: Penalty for ATTESTED_TO_INVALID_CHECKPOINT_PROPOSAL
|
|
167
179
|
- `slashUnknownPenalty`: Default penalty for unknown offense types
|
|
168
180
|
- `slashMaxPayloadSize`: Limits the number of **unique validators** (across all committees and epochs in a round) that receive non-zero votes. When this cap is hit, the lowest-severity validator-epoch pairs are zeroed out first, so the most severe slashes are always preserved. Note that multiple offenses for the same validator in the same epoch are summed and counted as a single validator entry against this limit.
|
|
169
181
|
|
|
@@ -180,25 +192,34 @@ Details about specific offenses in the system:
|
|
|
180
192
|
|
|
181
193
|
Inactivity slashing is one of the most critical, since it allows purging validators that are not fulfilling their duties, which could potentially bring the chain to a halt. This slashing must be aggressive enough to balance out the rate of the entry queue, in case the queue is filled with inactive validators. Furthermore, if enough inactive validators join the system, it may become impossible to gather enough quorum to pass any governance proposal.
|
|
182
194
|
|
|
183
|
-
Inactivity slashing is handled by the `Sentinel` which monitors performance of all validators slot-by-slot. With the multiple-blocks-per-slot model, block proposals and checkpoints are distinct concepts: proposers build multiple blocks per slot, but attestations are only for checkpoints. After each slot, the sentinel assigns one of the following to the proposer for the slot:
|
|
184
|
-
|
|
185
|
-
- `checkpoint-
|
|
186
|
-
- `checkpoint-
|
|
187
|
-
- `
|
|
195
|
+
Inactivity slashing is handled by the `Sentinel` (in `aztec-node/src/sentinel/`), which monitors performance of all validators slot-by-slot. With the multiple-blocks-per-slot model, block proposals and checkpoints are distinct concepts: proposers build multiple blocks per slot, but attestations are only for checkpoints. After each slot, the sentinel assigns one of the following to the proposer for the slot, in highest-confidence order:
|
|
196
|
+
|
|
197
|
+
- `checkpoint-mined` — a checkpoint covering this slot has landed on L1
|
|
198
|
+
- `checkpoint-valid` — the local node re-executed a checkpoint proposal for this slot successfully
|
|
199
|
+
- `checkpoint-invalid` — the local node re-executed a checkpoint proposal for this slot and rejected it (header / archive / out-hash mismatch, limit breach, etc.). Proposer-fault
|
|
200
|
+
- `checkpoint-unvalidated` — a checkpoint proposal arrived but the local node could not validate it (missing blocks/txs, timeout). Treated as proposer-fault
|
|
201
|
+
- `checkpoint-missed` — block proposals seen on P2P but no checkpoint proposal at all
|
|
202
|
+
- `blocks-missed` — no block proposals seen for this slot at all
|
|
203
|
+
|
|
204
|
+
Re-execution outcomes are read from the `CheckpointReexecutionTracker`, which the validator client populates at every early-return in `validateCheckpointProposal`. The same tracker is consumed by the data-withholding watcher via `hasReexecuted(checkpointNumber, archiveRoot)`.
|
|
205
|
+
|
|
206
|
+
Each non-proposer committee member is assigned one of:
|
|
207
|
+
- `attestation-sent` if their checkpoint attestation was seen on L1 or on the P2P network
|
|
208
|
+
- `attestation-missed` if the proposer status was `checkpoint-mined` or `checkpoint-valid` but no checkpoint attestation was seen
|
|
209
|
+
- none in any other case
|
|
188
210
|
|
|
189
|
-
|
|
190
|
-
- `attestation-sent` if there was a `checkpoint-proposed` or `checkpoint-mined` and a checkpoint attestation from this validator was seen on either on L1 or on the P2P network
|
|
191
|
-
- `attestation-missed` if there was a `checkpoint-proposed` or `checkpoint-mined` but no checkpoint attestation was seen
|
|
192
|
-
- none if the slot was a `blocks-missed`
|
|
211
|
+
`blocks-missed`, `checkpoint-missed`, `checkpoint-invalid`, and `checkpoint-unvalidated` all count as proposer inactivity for the slot.
|
|
193
212
|
|
|
194
|
-
|
|
213
|
+
The sentinel evaluates an epoch once `sentinelEpochEndBufferSlots` (default 2) L2 slots have elapsed past the epoch's last slot AND the per-slot recorder has covered that last slot. Epoch evaluation does not wait for an L1 proof — it relies on local-state evidence (the re-execution tracker plus L1 checkpoint landings) — so inactive validators are slashed promptly regardless of prover availability.
|
|
195
214
|
|
|
196
|
-
|
|
215
|
+
At end-of-epoch evaluation, for each validator such that:
|
|
197
216
|
|
|
198
217
|
```
|
|
199
|
-
total_failures = count(blocks-missed) + count(checkpoint-missed)
|
|
218
|
+
total_failures = count(blocks-missed) + count(checkpoint-missed)
|
|
219
|
+
+ count(checkpoint-invalid) + count(checkpoint-unvalidated)
|
|
220
|
+
+ count(attestation-missed)
|
|
200
221
|
total = count(checkpoint-*) + count(blocks-*) + count(attestation-*)
|
|
201
|
-
total_failures / total >=
|
|
222
|
+
total_failures / total >= slashInactivityTargetPercentage
|
|
202
223
|
```
|
|
203
224
|
|
|
204
|
-
|
|
225
|
+
they are voted to be slashed for inactivity. If `slashInactivityConsecutiveEpochThreshold` is greater than one, the above must also hold for the last `threshold` times the validator was part of a committee.
|
package/dest/config.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
|
3
3
|
export type { SlasherConfig };
|
|
4
4
|
export declare const DefaultSlasherConfig: SlasherConfig;
|
|
5
5
|
export declare const slasherConfigMappings: ConfigMappingsType<SlasherConfig>;
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFRbkUsT0FBTyxLQUFLLEVBQUUsYUFBYSxFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFJckUsWUFBWSxFQUFFLGFBQWEsRUFBRSxDQUFDO0FBRTlCLGVBQU8sTUFBTSxvQkFBb0IsRUFBRSxhQTBCbEMsQ0FBQztBQUVGLGVBQU8sTUFBTSxxQkFBcUIsRUFBRSxrQkFBa0IsQ0FBQyxhQUFhLENBc0luRSxDQUFDIn0=
|
package/dest/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAQnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAIrE,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAQnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAIrE,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B,eAAO,MAAM,oBAAoB,EAAE,aA0BlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,kBAAkB,CAAC,aAAa,CAsInE,CAAC"}
|
package/dest/config.js
CHANGED
|
@@ -5,16 +5,18 @@ export const DefaultSlasherConfig = {
|
|
|
5
5
|
slashOverridePayload: undefined,
|
|
6
6
|
slashValidatorsAlways: [],
|
|
7
7
|
slashValidatorsNever: [],
|
|
8
|
-
slashPrunePenalty: BigInt(slasherDefaultEnv.SLASH_PRUNE_PENALTY),
|
|
9
8
|
slashDataWithholdingPenalty: BigInt(slasherDefaultEnv.SLASH_DATA_WITHHOLDING_PENALTY),
|
|
9
|
+
slashDataWithholdingToleranceSlots: slasherDefaultEnv.SLASH_DATA_WITHHOLDING_TOLERANCE_SLOTS,
|
|
10
10
|
slashInactivityTargetPercentage: slasherDefaultEnv.SLASH_INACTIVITY_TARGET_PERCENTAGE,
|
|
11
11
|
slashInactivityConsecutiveEpochThreshold: slasherDefaultEnv.SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD,
|
|
12
12
|
slashBroadcastedInvalidBlockPenalty: BigInt(slasherDefaultEnv.SLASH_INVALID_BLOCK_PENALTY),
|
|
13
|
+
slashBroadcastedInvalidCheckpointProposalPenalty: BigInt(slasherDefaultEnv.SLASH_INVALID_CHECKPOINT_PROPOSAL_PENALTY),
|
|
13
14
|
slashDuplicateProposalPenalty: BigInt(slasherDefaultEnv.SLASH_DUPLICATE_PROPOSAL_PENALTY),
|
|
14
15
|
slashDuplicateAttestationPenalty: BigInt(slasherDefaultEnv.SLASH_DUPLICATE_ATTESTATION_PENALTY),
|
|
15
16
|
slashInactivityPenalty: BigInt(slasherDefaultEnv.SLASH_INACTIVITY_PENALTY),
|
|
16
17
|
slashProposeInvalidAttestationsPenalty: BigInt(slasherDefaultEnv.SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY),
|
|
17
|
-
|
|
18
|
+
slashProposeDescendantOfCheckpointWithInvalidAttestationsPenalty: BigInt(slasherDefaultEnv.SLASH_PROPOSE_DESCENDANT_OF_CHECKPOINT_WITH_INVALID_ATTESTATIONS_PENALTY),
|
|
19
|
+
slashAttestInvalidCheckpointProposalPenalty: BigInt(slasherDefaultEnv.SLASH_ATTEST_INVALID_CHECKPOINT_PROPOSAL_PENALTY),
|
|
18
20
|
slashUnknownPenalty: BigInt(slasherDefaultEnv.SLASH_UNKNOWN_PENALTY),
|
|
19
21
|
slashOffenseExpirationRounds: slasherDefaultEnv.SLASH_OFFENSE_EXPIRATION_ROUNDS,
|
|
20
22
|
slashMaxPayloadSize: slasherDefaultEnv.SLASH_MAX_PAYLOAD_SIZE,
|
|
@@ -41,21 +43,26 @@ export const slasherConfigMappings = {
|
|
|
41
43
|
parseEnv: (val)=>val.split(',').map((addr)=>addr.trim()).filter((addr)=>addr.length > 0).map((addr)=>EthAddress.fromString(addr)),
|
|
42
44
|
defaultValue: DefaultSlasherConfig.slashValidatorsNever
|
|
43
45
|
},
|
|
44
|
-
slashPrunePenalty: {
|
|
45
|
-
env: 'SLASH_PRUNE_PENALTY',
|
|
46
|
-
description: 'Penalty amount for slashing validators of a valid pruned epoch (set to 0 to disable).',
|
|
47
|
-
...bigintConfigHelper(DefaultSlasherConfig.slashPrunePenalty)
|
|
48
|
-
},
|
|
49
46
|
slashDataWithholdingPenalty: {
|
|
50
47
|
env: 'SLASH_DATA_WITHHOLDING_PENALTY',
|
|
51
|
-
description: 'Penalty
|
|
48
|
+
description: 'Penalty for data withholding (0 records offenses without slash votes).',
|
|
52
49
|
...bigintConfigHelper(DefaultSlasherConfig.slashDataWithholdingPenalty)
|
|
53
50
|
},
|
|
51
|
+
slashDataWithholdingToleranceSlots: {
|
|
52
|
+
env: 'SLASH_DATA_WITHHOLDING_TOLERANCE_SLOTS',
|
|
53
|
+
description: 'Number of full L2 slots that must elapse after a checkpoint slot before declaring its txs missing and slashing its attesters for data withholding.',
|
|
54
|
+
...numberConfigHelper(DefaultSlasherConfig.slashDataWithholdingToleranceSlots)
|
|
55
|
+
},
|
|
54
56
|
slashBroadcastedInvalidBlockPenalty: {
|
|
55
57
|
env: 'SLASH_INVALID_BLOCK_PENALTY',
|
|
56
58
|
description: 'Penalty amount for slashing a validator for an invalid block proposed via p2p.',
|
|
57
59
|
...bigintConfigHelper(DefaultSlasherConfig.slashBroadcastedInvalidBlockPenalty)
|
|
58
60
|
},
|
|
61
|
+
slashBroadcastedInvalidCheckpointProposalPenalty: {
|
|
62
|
+
env: 'SLASH_INVALID_CHECKPOINT_PROPOSAL_PENALTY',
|
|
63
|
+
description: 'Penalty amount for slashing a validator for an invalid checkpoint proposal proposed via p2p.',
|
|
64
|
+
...bigintConfigHelper(DefaultSlasherConfig.slashBroadcastedInvalidCheckpointProposalPenalty)
|
|
65
|
+
},
|
|
59
66
|
slashDuplicateProposalPenalty: {
|
|
60
67
|
env: 'SLASH_DUPLICATE_PROPOSAL_PENALTY',
|
|
61
68
|
description: 'Penalty amount for slashing a validator for sending duplicate proposals.',
|
|
@@ -89,22 +96,27 @@ export const slasherConfigMappings = {
|
|
|
89
96
|
},
|
|
90
97
|
slashInactivityPenalty: {
|
|
91
98
|
env: 'SLASH_INACTIVITY_PENALTY',
|
|
92
|
-
description: 'Penalty
|
|
99
|
+
description: 'Penalty for an inactive validator (0 records offenses without slash votes).',
|
|
93
100
|
...bigintConfigHelper(DefaultSlasherConfig.slashInactivityPenalty)
|
|
94
101
|
},
|
|
95
102
|
slashProposeInvalidAttestationsPenalty: {
|
|
96
103
|
env: 'SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY',
|
|
97
|
-
description: 'Penalty
|
|
104
|
+
description: 'Penalty for proposing invalid attestations (0 records offenses without slash votes).',
|
|
98
105
|
...bigintConfigHelper(DefaultSlasherConfig.slashProposeInvalidAttestationsPenalty)
|
|
99
106
|
},
|
|
100
|
-
|
|
101
|
-
env: '
|
|
102
|
-
description: 'Penalty
|
|
103
|
-
...bigintConfigHelper(DefaultSlasherConfig.
|
|
107
|
+
slashProposeDescendantOfCheckpointWithInvalidAttestationsPenalty: {
|
|
108
|
+
env: 'SLASH_PROPOSE_DESCENDANT_OF_CHECKPOINT_WITH_INVALID_ATTESTATIONS_PENALTY',
|
|
109
|
+
description: 'Penalty for publishing a checkpoint building on an invalid checkpoint (0 records offenses without slash votes).',
|
|
110
|
+
...bigintConfigHelper(DefaultSlasherConfig.slashProposeDescendantOfCheckpointWithInvalidAttestationsPenalty)
|
|
111
|
+
},
|
|
112
|
+
slashAttestInvalidCheckpointProposalPenalty: {
|
|
113
|
+
env: 'SLASH_ATTEST_INVALID_CHECKPOINT_PROPOSAL_PENALTY',
|
|
114
|
+
description: 'Penalty for attesting to an invalid checkpoint proposal (0 records offenses without slash votes).',
|
|
115
|
+
...bigintConfigHelper(DefaultSlasherConfig.slashAttestInvalidCheckpointProposalPenalty)
|
|
104
116
|
},
|
|
105
117
|
slashUnknownPenalty: {
|
|
106
118
|
env: 'SLASH_UNKNOWN_PENALTY',
|
|
107
|
-
description: 'Penalty
|
|
119
|
+
description: 'Penalty for an unknown offense (0 records offenses without slash votes).',
|
|
108
120
|
...bigintConfigHelper(DefaultSlasherConfig.slashUnknownPenalty)
|
|
109
121
|
},
|
|
110
122
|
slashOffenseExpirationRounds: {
|
|
@@ -10,7 +10,7 @@ import type { Watcher } from '../watcher.js';
|
|
|
10
10
|
/** Creates a slasher client facade that updates itself whenever the rollup slasher changes */
|
|
11
11
|
export declare function createSlasherFacade(config: SlasherConfig & DataStoreConfig & {
|
|
12
12
|
ethereumSlotDuration: number;
|
|
13
|
-
}, l1Contracts: Pick<L1ReaderConfig
|
|
13
|
+
}, l1Contracts: Pick<L1ReaderConfig, 'rollupAddress' | 'registryAddress'>, l1Client: ViemClient, watchers: Watcher[], dateProvider: DateProvider, epochCache: EpochCache,
|
|
14
14
|
/** List of own validator addresses to add to the slashValidatorNever list unless slashSelfAllowed is true */
|
|
15
15
|
validatorAddresses?: EthAddress[], logger?: import("@aztec/foundation/log").Logger): Promise<SlasherClientInterface>;
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|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CLFlBQVksRUFBRSxZQUFZLEVBQzFCLFVBQVUsRUFBRSxVQUFVO0FBQ3RCLDZHQUE2RztBQUM3RyxrQkFBa0IsR0FBRSxVQUFVLEVBQU8sRUFDckMsTUFBTSx5Q0FBMEIsR0FDL0IsT0FBTyxDQUFDLHNCQUFzQixDQUFDLENBa0RqQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_facade.d.ts","sourceRoot":"","sources":["../../src/factory/create_facade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAG9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,8FAA8F;AAC9F,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,aAAa,GAAG,eAAe,GAAG;IAAE,oBAAoB,EAAE,MAAM,CAAA;CAAE,EAC1E,WAAW,EAAE,IAAI,CAAC,cAAc,
|
|
1
|
+
{"version":3,"file":"create_facade.d.ts","sourceRoot":"","sources":["../../src/factory/create_facade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAG9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C,8FAA8F;AAC9F,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,aAAa,GAAG,eAAe,GAAG;IAAE,oBAAoB,EAAE,MAAM,CAAA;CAAE,EAC1E,WAAW,EAAE,IAAI,CAAC,cAAc,EAAE,eAAe,GAAG,iBAAiB,CAAC,EACtE,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,OAAO,EAAE,EACnB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU;AACtB,6GAA6G;AAC7G,kBAAkB,GAAE,UAAU,EAAO,EACrC,MAAM,yCAA0B,GAC/B,OAAO,CAAC,sBAAsB,CAAC,CAkDjC"}
|
|
@@ -3,17 +3,19 @@ export declare const slasherDefaultEnv: {
|
|
|
3
3
|
readonly SLASH_OFFENSE_EXPIRATION_ROUNDS: 4;
|
|
4
4
|
readonly SLASH_MAX_PAYLOAD_SIZE: 80;
|
|
5
5
|
readonly SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4;
|
|
6
|
-
readonly SLASH_PRUNE_PENALTY: 10000000000000000000;
|
|
7
6
|
readonly SLASH_DATA_WITHHOLDING_PENALTY: 10000000000000000000;
|
|
7
|
+
readonly SLASH_DATA_WITHHOLDING_TOLERANCE_SLOTS: 3;
|
|
8
8
|
readonly SLASH_INACTIVITY_TARGET_PERCENTAGE: 0.9;
|
|
9
9
|
readonly SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD: 1;
|
|
10
10
|
readonly SLASH_INACTIVITY_PENALTY: 10000000000000000000;
|
|
11
11
|
readonly SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY: 10000000000000000000;
|
|
12
|
-
readonly
|
|
12
|
+
readonly SLASH_PROPOSE_DESCENDANT_OF_CHECKPOINT_WITH_INVALID_ATTESTATIONS_PENALTY: 10000000000000000000;
|
|
13
|
+
readonly SLASH_ATTEST_INVALID_CHECKPOINT_PROPOSAL_PENALTY: 10000000000000000000;
|
|
13
14
|
readonly SLASH_DUPLICATE_PROPOSAL_PENALTY: 0;
|
|
14
15
|
readonly SLASH_DUPLICATE_ATTESTATION_PENALTY: 0;
|
|
15
16
|
readonly SLASH_UNKNOWN_PENALTY: 10000000000000000000;
|
|
16
17
|
readonly SLASH_INVALID_BLOCK_PENALTY: 10000000000000000000;
|
|
18
|
+
readonly SLASH_INVALID_CHECKPOINT_PROPOSAL_PENALTY: 0;
|
|
17
19
|
readonly SLASH_GRACE_PERIOD_L2_SLOTS: 0;
|
|
18
20
|
};
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xhc2hlci1kZWZhdWx0cy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2dlbmVyYXRlZC9zbGFzaGVyLWRlZmF1bHRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLHFFQUFxRTtBQUNyRSxlQUFPLE1BQU0saUJBQWlCOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Q0FrQnBCLENBQUMifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slasher-defaults.d.ts","sourceRoot":"","sources":["../../src/generated/slasher-defaults.ts"],"names":[],"mappings":"AAGA,qEAAqE;AACrE,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"slasher-defaults.d.ts","sourceRoot":"","sources":["../../src/generated/slasher-defaults.ts"],"names":[],"mappings":"AAGA,qEAAqE;AACrE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;CAkBpB,CAAC"}
|
|
@@ -4,16 +4,18 @@
|
|
|
4
4
|
SLASH_OFFENSE_EXPIRATION_ROUNDS: 4,
|
|
5
5
|
SLASH_MAX_PAYLOAD_SIZE: 80,
|
|
6
6
|
SLASH_EXECUTE_ROUNDS_LOOK_BACK: 4,
|
|
7
|
-
SLASH_PRUNE_PENALTY: 10000000000000000000,
|
|
8
7
|
SLASH_DATA_WITHHOLDING_PENALTY: 10000000000000000000,
|
|
8
|
+
SLASH_DATA_WITHHOLDING_TOLERANCE_SLOTS: 3,
|
|
9
9
|
SLASH_INACTIVITY_TARGET_PERCENTAGE: 0.9,
|
|
10
10
|
SLASH_INACTIVITY_CONSECUTIVE_EPOCH_THRESHOLD: 1,
|
|
11
11
|
SLASH_INACTIVITY_PENALTY: 10000000000000000000,
|
|
12
12
|
SLASH_PROPOSE_INVALID_ATTESTATIONS_PENALTY: 10000000000000000000,
|
|
13
|
-
|
|
13
|
+
SLASH_PROPOSE_DESCENDANT_OF_CHECKPOINT_WITH_INVALID_ATTESTATIONS_PENALTY: 10000000000000000000,
|
|
14
|
+
SLASH_ATTEST_INVALID_CHECKPOINT_PROPOSAL_PENALTY: 10000000000000000000,
|
|
14
15
|
SLASH_DUPLICATE_PROPOSAL_PENALTY: 0,
|
|
15
16
|
SLASH_DUPLICATE_ATTESTATION_PENALTY: 0,
|
|
16
17
|
SLASH_UNKNOWN_PENALTY: 10000000000000000000,
|
|
17
18
|
SLASH_INVALID_BLOCK_PENALTY: 10000000000000000000,
|
|
19
|
+
SLASH_INVALID_CHECKPOINT_PROPOSAL_PENALTY: 0,
|
|
18
20
|
SLASH_GRACE_PERIOD_L2_SLOTS: 0
|
|
19
21
|
};
|
package/dest/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export * from './config.js';
|
|
2
|
-
export * from './watchers/
|
|
2
|
+
export * from './watchers/data_withholding_watcher.js';
|
|
3
3
|
export * from './watchers/attestations_block_watcher.js';
|
|
4
|
+
export * from './watchers/attested_invalid_proposal_watcher.js';
|
|
5
|
+
export * from './watchers/broadcasted_invalid_checkpoint_proposal_watcher.js';
|
|
6
|
+
export * from './watchers/checkpoint_equivocation_watcher.js';
|
|
4
7
|
export * from './slasher_client.js';
|
|
5
8
|
export * from './slash_offenses_collector.js';
|
|
6
9
|
export * from './slasher_client_interface.js';
|
|
7
10
|
export * from './factory/index.js';
|
|
8
11
|
export * from './watcher.js';
|
|
9
12
|
export * from '@aztec/stdlib/slashing';
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLHdDQUF3QyxDQUFDO0FBQ3ZELGNBQWMsMENBQTBDLENBQUM7QUFDekQsY0FBYyxpREFBaUQsQ0FBQztBQUNoRSxjQUFjLCtEQUErRCxDQUFDO0FBQzlFLGNBQWMsK0NBQStDLENBQUM7QUFDOUQsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLHdCQUF3QixDQUFDIn0=
|
package/dest/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,iDAAiD,CAAC;AAChE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC"}
|
package/dest/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from './config.js';
|
|
2
|
-
export * from './watchers/
|
|
2
|
+
export * from './watchers/data_withholding_watcher.js';
|
|
3
3
|
export * from './watchers/attestations_block_watcher.js';
|
|
4
|
+
export * from './watchers/attested_invalid_proposal_watcher.js';
|
|
5
|
+
export * from './watchers/broadcasted_invalid_checkpoint_proposal_watcher.js';
|
|
6
|
+
export * from './watchers/checkpoint_equivocation_watcher.js';
|
|
4
7
|
export * from './slasher_client.js';
|
|
5
8
|
export * from './slash_offenses_collector.js';
|
|
6
9
|
export * from './slasher_client_interface.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
2
|
+
export declare class SlasherMetrics {
|
|
3
|
+
private readonly roundExecuted;
|
|
4
|
+
constructor(client: TelemetryClient, name?: string);
|
|
5
|
+
recordRoundExecuted(): void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWV0cmljcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL21ldHJpY3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUVMLEtBQUssZUFBZSxFQUdyQixNQUFNLHlCQUF5QixDQUFDO0FBRWpDLHFCQUFhLGNBQWM7SUFDekIsT0FBTyxDQUFDLFFBQVEsQ0FBQyxhQUFhLENBQWdCO0lBRTlDLFlBQVksTUFBTSxFQUFFLGVBQWUsRUFBRSxJQUFJLFNBQVksRUFHcEQ7SUFFTSxtQkFBbUIsSUFBSSxJQUFJLENBRWpDO0NBQ0YifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EAGrB,MAAM,yBAAyB,CAAC;AAEjC,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAE9C,YAAY,MAAM,EAAE,eAAe,EAAE,IAAI,SAAY,EAGpD;IAEM,mBAAmB,IAAI,IAAI,CAEjC;CACF"}
|
package/dest/metrics.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Metrics, createUpDownCounterWithDefault } from '@aztec/telemetry-client';
|
|
2
|
+
export class SlasherMetrics {
|
|
3
|
+
roundExecuted;
|
|
4
|
+
constructor(client, name = 'Slasher'){
|
|
5
|
+
const meter = client.getMeter(name);
|
|
6
|
+
this.roundExecuted = createUpDownCounterWithDefault(meter, Metrics.SLASHER_ROUND_EXECUTED_COUNT);
|
|
7
|
+
}
|
|
8
|
+
recordRoundExecuted() {
|
|
9
|
+
this.roundExecuted.add(1);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -3,7 +3,7 @@ import type { Prettify } from '@aztec/foundation/types';
|
|
|
3
3
|
import type { L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
|
|
4
4
|
import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
5
5
|
import type { SlasherOffensesStore } from './stores/offenses_store.js';
|
|
6
|
-
import { type WantToSlashArgs, type Watcher } from './watcher.js';
|
|
6
|
+
import { type WantToClearSlashArgs, type WantToSlashArgs, type Watcher } from './watcher.js';
|
|
7
7
|
export type SlashOffensesCollectorConfig = Prettify<Pick<SlasherConfig, 'slashGracePeriodL2Slots'>>;
|
|
8
8
|
export type SlashOffensesCollectorSettings = Prettify<Pick<L1RollupConstants, 'epochDuration'> & {
|
|
9
9
|
slashingAmounts: [bigint, bigint, bigint] | undefined;
|
|
@@ -22,6 +22,7 @@ export declare class SlashOffensesCollector {
|
|
|
22
22
|
private readonly offensesStore;
|
|
23
23
|
private readonly log;
|
|
24
24
|
private readonly unwatchCallbacks;
|
|
25
|
+
private readonly storeMutationQueue;
|
|
25
26
|
constructor(config: SlashOffensesCollectorConfig, settings: SlashOffensesCollectorSettings, watchers: Watcher[], offensesStore: SlasherOffensesStore, log?: import("@aztec/foundation/log").Logger);
|
|
26
27
|
start(): Promise<void>;
|
|
27
28
|
stop(): Promise<void>;
|
|
@@ -31,6 +32,7 @@ export declare class SlashOffensesCollector {
|
|
|
31
32
|
* @param args - the arguments from the watcher, including the validators, amounts, and offenses
|
|
32
33
|
*/
|
|
33
34
|
handleWantToSlash(args: WantToSlashArgs[]): Promise<void>;
|
|
35
|
+
handleWantToClearSlash(args: WantToClearSlashArgs[]): Promise<void>;
|
|
34
36
|
/**
|
|
35
37
|
* Triggered on a time basis when we enter a new slashing round.
|
|
36
38
|
* Clears expired offenses from stores.
|
|
@@ -38,5 +40,7 @@ export declare class SlashOffensesCollector {
|
|
|
38
40
|
handleNewRound(round: bigint): Promise<void>;
|
|
39
41
|
/** Returns whether to skip an offense if it happened during the grace period after the network upgrade */
|
|
40
42
|
private shouldSkipOffense;
|
|
43
|
+
private getOffenseLogData;
|
|
44
|
+
private enqueueStoreMutation;
|
|
41
45
|
}
|
|
42
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xhc2hfb2ZmZW5zZXNfY29sbGVjdG9yLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291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FBQyxRQUFRLENBQUMsUUFBUTtJQUN6QixPQUFPLENBQUMsUUFBUSxDQUFDLGFBQWE7SUFDOUIsT0FBTyxDQUFDLFFBQVEsQ0FBQyxHQUFHO0lBUnRCLE9BQU8sQ0FBQyxRQUFRLENBQUMsZ0JBQWdCLENBQXNCO0lBQ3ZELE9BQU8sQ0FBQyxRQUFRLENBQUMsa0JBQWtCLENBQXFCO0lBRXhELFlBQ21CLE1BQU0sRUFBRSw0QkFBNEIsRUFDcEMsUUFBUSxFQUFFLDhCQUE4QixFQUN4QyxRQUFRLEVBQUUsT0FBTyxFQUFFLEVBQ25CLGFBQWEsRUFBRSxvQkFBb0IsRUFDbkMsR0FBRyx5Q0FBNkMsRUFDL0Q7SUFFRyxLQUFLLGtCQW1CWDtJQUVZLElBQUksa0JBVWhCO0lBRUQ7Ozs7T0FJRztJQUNVLGlCQUFpQixDQUFDLElBQUksRUFBRSxlQUFlLEVBQUUsaUJBK0JyRDtJQUVZLHNCQUFzQixDQUFDLElBQUksRUFBRSxvQkFBb0IsRUFBRSxpQkFXL0Q7SUFFRDs7O09BR0c7SUFDVSxjQUFjLENBQUMsS0FBSyxFQUFFLE1BQU0saUJBS3hDO0lBRUQsMEdBQTBHO0lBQzFHLE9BQU8sQ0FBQyxpQkFBaUI7SUFLekIsT0FBTyxDQUFDLGlCQUFpQjtJQVF6QixPQUFPLENBQUMsb0JBQW9CO0NBRzdCIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slash_offenses_collector.d.ts","sourceRoot":"","sources":["../src/slash_offenses_collector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"slash_offenses_collector.d.ts","sourceRoot":"","sources":["../src/slash_offenses_collector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGlE,OAAO,KAAK,EAAE,QAAQ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,oBAAoB,EAAE,iBAW/D;IAED;;;OAGG;IACU,cAAc,CAAC,KAAK,EAAE,MAAM,iBAKxC;IAED,0GAA0G;IAC1G,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,oBAAoB;CAG7B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { SerialQueue } from '@aztec/foundation/queue';
|
|
3
|
+
import { getOffenseTypeName, getSlotForOffense } from '@aztec/stdlib/slashing';
|
|
4
|
+
import { WANT_TO_CLEAR_SLASH_EVENT, WANT_TO_SLASH_EVENT } from './watcher.js';
|
|
4
5
|
/**
|
|
5
6
|
* Collects and manages slashable offenses from watchers.
|
|
6
7
|
* This class handles the common logic for subscribing to slash watcher events,
|
|
@@ -12,6 +13,7 @@ import { WANT_TO_SLASH_EVENT } from './watcher.js';
|
|
|
12
13
|
offensesStore;
|
|
13
14
|
log;
|
|
14
15
|
unwatchCallbacks;
|
|
16
|
+
storeMutationQueue;
|
|
15
17
|
constructor(config, settings, watchers, offensesStore, log = createLogger('slasher:offenses-collector')){
|
|
16
18
|
this.config = config;
|
|
17
19
|
this.settings = settings;
|
|
@@ -19,25 +21,30 @@ import { WANT_TO_SLASH_EVENT } from './watcher.js';
|
|
|
19
21
|
this.offensesStore = offensesStore;
|
|
20
22
|
this.log = log;
|
|
21
23
|
this.unwatchCallbacks = [];
|
|
24
|
+
this.storeMutationQueue = new SerialQueue();
|
|
22
25
|
}
|
|
23
26
|
start() {
|
|
24
27
|
this.log.debug('Starting SlashOffensesCollector...');
|
|
25
|
-
|
|
28
|
+
this.storeMutationQueue.start();
|
|
29
|
+
// Subscribe to watcher slashing events.
|
|
26
30
|
for (const watcher of this.watchers){
|
|
27
|
-
const wantToSlashCallback = (args)=>
|
|
31
|
+
const wantToSlashCallback = (args)=>this.enqueueStoreMutation('wantToSlash', ()=>this.handleWantToSlash(args));
|
|
28
32
|
watcher.on(WANT_TO_SLASH_EVENT, wantToSlashCallback);
|
|
29
33
|
this.unwatchCallbacks.push(()=>watcher.removeListener(WANT_TO_SLASH_EVENT, wantToSlashCallback));
|
|
34
|
+
const wantToClearSlashCallback = (args)=>this.enqueueStoreMutation('wantToClearSlash', ()=>this.handleWantToClearSlash(args));
|
|
35
|
+
watcher.on(WANT_TO_CLEAR_SLASH_EVENT, wantToClearSlashCallback);
|
|
36
|
+
this.unwatchCallbacks.push(()=>watcher.removeListener(WANT_TO_CLEAR_SLASH_EVENT, wantToClearSlashCallback));
|
|
30
37
|
}
|
|
31
38
|
this.log.info('Started SlashOffensesCollector');
|
|
32
39
|
return Promise.resolve();
|
|
33
40
|
}
|
|
34
|
-
stop() {
|
|
41
|
+
async stop() {
|
|
35
42
|
this.log.debug('Stopping SlashOffensesCollector...');
|
|
36
43
|
for (const unwatchCallback of this.unwatchCallbacks){
|
|
37
44
|
unwatchCallback();
|
|
38
45
|
}
|
|
46
|
+
await this.storeMutationQueue.end();
|
|
39
47
|
this.log.info('SlashOffensesCollector stopped');
|
|
40
|
-
return Promise.resolve();
|
|
41
48
|
}
|
|
42
49
|
/**
|
|
43
50
|
* Called when a slash watcher emits WANT_TO_SLASH_EVENT.
|
|
@@ -52,21 +59,33 @@ import { WANT_TO_SLASH_EVENT } from './watcher.js';
|
|
|
52
59
|
epochOrSlot: arg.epochOrSlot
|
|
53
60
|
};
|
|
54
61
|
if (this.shouldSkipOffense(offense)) {
|
|
55
|
-
this.log.verbose('Skipping offense during grace period', offense);
|
|
56
|
-
continue;
|
|
57
|
-
}
|
|
58
|
-
if (await this.offensesStore.hasOffense(offense)) {
|
|
59
|
-
this.log.debug('Skipping repeated offense', offense);
|
|
62
|
+
this.log.verbose('Skipping offense during grace period', this.getOffenseLogData(offense));
|
|
60
63
|
continue;
|
|
61
64
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
this.
|
|
65
|
+
const added = await this.offensesStore.addOffense(offense);
|
|
66
|
+
if (added) {
|
|
67
|
+
if (this.settings.slashingAmounts) {
|
|
68
|
+
const minSlash = this.settings.slashingAmounts[0];
|
|
69
|
+
if (arg.amount < minSlash) {
|
|
70
|
+
this.log.warn(`Offense amount ${arg.amount} is below minimum slashing amount ${minSlash}`, this.getOffenseLogData(offense));
|
|
71
|
+
}
|
|
66
72
|
}
|
|
73
|
+
this.log.info(`Adding pending offense for validator ${arg.validator}`, this.getOffenseLogData(offense));
|
|
74
|
+
} else {
|
|
75
|
+
this.log.debug('Skipping repeated offense', this.getOffenseLogData(offense));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async handleWantToClearSlash(args) {
|
|
80
|
+
for (const arg of args){
|
|
81
|
+
const cleared = await this.offensesStore.clearOffenses(arg);
|
|
82
|
+
if (cleared > 0) {
|
|
83
|
+
this.log.info(`Cleared ${cleared} pending offenses`, {
|
|
84
|
+
offenseType: getOffenseTypeName(arg.offenseType),
|
|
85
|
+
epochOrSlot: arg.epochOrSlot,
|
|
86
|
+
validators: arg.validators?.map((validator)=>validator.toString())
|
|
87
|
+
});
|
|
67
88
|
}
|
|
68
|
-
this.log.info(`Adding pending offense for validator ${arg.validator}`, offense);
|
|
69
|
-
await this.offensesStore.addOffense(offense);
|
|
70
89
|
}
|
|
71
90
|
}
|
|
72
91
|
/**
|
|
@@ -82,4 +101,14 @@ import { WANT_TO_SLASH_EVENT } from './watcher.js';
|
|
|
82
101
|
const offenseSlot = getSlotForOffense(offense, this.settings);
|
|
83
102
|
return offenseSlot < this.settings.rollupRegisteredAtL2Slot + this.config.slashGracePeriodL2Slots;
|
|
84
103
|
}
|
|
104
|
+
getOffenseLogData(offense) {
|
|
105
|
+
return {
|
|
106
|
+
...offense,
|
|
107
|
+
validator: offense.validator.toString(),
|
|
108
|
+
offenseType: getOffenseTypeName(offense.offenseType)
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
enqueueStoreMutation(label, callback) {
|
|
112
|
+
void this.storeMutationQueue.put(callback).catch((err)=>this.log.error(`Error handling ${label}`, err));
|
|
113
|
+
}
|
|
85
114
|
}
|
package/dest/slasher_client.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type { Prettify } from '@aztec/foundation/types';
|
|
|
6
6
|
import type { SlasherConfig } from '@aztec/stdlib/interfaces/server';
|
|
7
7
|
import { type Offense, type ProposerSlashAction, type ProposerSlashActionProvider } from '@aztec/stdlib/slashing';
|
|
8
8
|
import type { Hex } from 'viem';
|
|
9
|
+
import { SlasherMetrics } from './metrics.js';
|
|
9
10
|
import { SlashOffensesCollector, type SlashOffensesCollectorConfig, type SlashOffensesCollectorSettings } from './slash_offenses_collector.js';
|
|
10
11
|
import { SlashRoundMonitor, type SlashRoundMonitorSettings } from './slash_round_monitor.js';
|
|
11
12
|
import type { SlasherClientInterface } from './slasher_client_interface.js';
|
|
@@ -59,10 +60,11 @@ export declare class SlasherClient implements ProposerSlashActionProvider, Slash
|
|
|
59
60
|
private dateProvider;
|
|
60
61
|
private offensesStore;
|
|
61
62
|
private log;
|
|
63
|
+
private readonly metrics;
|
|
62
64
|
protected unwatchCallbacks: (() => void)[];
|
|
63
65
|
protected roundMonitor: SlashRoundMonitor;
|
|
64
66
|
protected offensesCollector: SlashOffensesCollector;
|
|
65
|
-
constructor(config: SlasherClientConfig, settings: SlasherSettings, slashingProposer: SlashingProposerContract, slasher: SlasherContract, rollup: RollupContract, watchers: Watcher[], epochCache: EpochCache, dateProvider: DateProvider, offensesStore: SlasherOffensesStore, log?: import("@aztec/foundation/log").Logger);
|
|
67
|
+
constructor(config: SlasherClientConfig, settings: SlasherSettings, slashingProposer: SlashingProposerContract, slasher: SlasherContract, rollup: RollupContract, watchers: Watcher[], epochCache: EpochCache, dateProvider: DateProvider, offensesStore: SlasherOffensesStore, log?: import("@aztec/foundation/log").Logger, metrics?: SlasherMetrics);
|
|
66
68
|
start(): Promise<void>;
|
|
67
69
|
/** Stop the slasher client */
|
|
68
70
|
stop(): Promise<void>;
|
|
@@ -109,4 +111,4 @@ export declare class SlasherClient implements ProposerSlashActionProvider, Slash
|
|
|
109
111
|
*/
|
|
110
112
|
private getSlashedRound;
|
|
111
113
|
}
|
|
112
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
114
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xhc2hlcl9jbGllbnQuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9zbGFzaGVyX2NsaWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNyRCxPQUFPLEVBQUUsY0FBYyxFQUFFLGVBQWUsRUFBRSx3QkFBd0IsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBRXRHLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUc3RCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUM1RCxPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUN4RCxPQUFPLEtBQUssRUFBRSxhQUFhLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUNyRSxPQUFPLEVBQ0wsS0FBSyxPQUFPLEVBRVosS0FBSyxtQkFBbUIsRUFDeEIsS0FBSywyQkFBMkIsRUFJakMsTUFBTSx3QkFBd0IsQ0FBQztBQUdoQyxPQUFPLEtBQUssRUFBRSxHQUFHLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFFaEMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUM5QyxPQUFPLEVBQ0wsc0JBQXNCLEVBQ3RCLEtBQUssNEJBQTRCLE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