@aztec/stdlib 1.0.0-nightly.20250730 → 1.0.0-nightly.20250801
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/dest/block/l2_block.d.ts +1 -0
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block.js +1 -0
- package/dest/block/l2_block_source.d.ts +413 -1
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/block/l2_block_source.js +21 -0
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +4 -2
- package/dest/interfaces/aztec-node-admin.d.ts +52 -2
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +2 -1
- package/dest/interfaces/configs.d.ts +5 -0
- package/dest/interfaces/configs.d.ts.map +1 -1
- package/dest/interfaces/configs.js +2 -1
- package/dest/interfaces/server.d.ts +2 -1
- package/dest/interfaces/server.d.ts.map +1 -1
- package/dest/interfaces/server.js +2 -1
- package/dest/interfaces/slasher.d.ts +70 -0
- package/dest/interfaces/slasher.d.ts.map +1 -0
- package/dest/interfaces/slasher.js +19 -0
- package/dest/messaging/l2_to_l1_membership.d.ts +4 -1
- package/dest/messaging/l2_to_l1_membership.d.ts.map +1 -1
- package/dest/messaging/l2_to_l1_membership.js +49 -54
- package/dest/tx/tx_effect.d.ts +2 -2
- package/dest/tx/tx_effect.d.ts.map +1 -1
- package/dest/tx/tx_effect.js +3 -18
- package/dest/tx/validator/tx_validator.d.ts +4 -4
- package/package.json +7 -7
- package/src/block/l2_block.ts +2 -0
- package/src/block/l2_block_source.ts +43 -1
- package/src/interfaces/archiver.ts +3 -1
- package/src/interfaces/aztec-node-admin.ts +5 -4
- package/src/interfaces/configs.ts +3 -0
- package/src/interfaces/server.ts +2 -1
- package/src/interfaces/slasher.ts +41 -0
- package/src/messaging/l2_to_l1_membership.ts +76 -85
- package/src/tx/tx_effect.ts +5 -20
package/dest/block/l2_block.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AAO;IAIvC;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;;;;;;OAQG;WACU,MAAM,CACjB,UAAU,EAAE,MAAM,EAClB,WAAW,SAAI,EACf,mBAAmB,SAAI,EACvB,oBAAoB,SAAI,EACxB,MAAM,GAAE,EAAE,GAAG,SAAqB,EAClC,UAAU,GAAE,MAAM,GAAG,SAAqB,EAC1C,UAAU,GAAE,MAAM,GAAG,SAAqB,GACzC,OAAO,CAAC,OAAO,CAAC;IAUnB;;;OAGG;IACH,MAAM,CAAC,KAAK,IAAI,OAAO;IAIvB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED;;;OAGG;IACU,IAAI,IAAI,OAAO,CAAC,EAAE,CAAC;IAOhC;;;OAGG;IACH,QAAQ;;;;;;;;;IAuBR,WAAW,IAAI,SAAS;IAUxB,MAAM,CAAC,KAAK,EAAE,OAAO;CAGtB;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
package/dest/block/l2_block.js
CHANGED
|
@@ -103,6 +103,7 @@ import { makeAppendOnlyTreeSnapshot, makeHeader } from './l2_block_code_to_purge
|
|
|
103
103
|
}
|
|
104
104
|
toBlockInfo() {
|
|
105
105
|
return {
|
|
106
|
+
blockHash: this.blockHash?.toString(),
|
|
106
107
|
archive: this.archive.root.toString(),
|
|
107
108
|
blockNumber: this.number,
|
|
108
109
|
slotNumber: Number(this.header.getSlot()),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import { type ZodFor } from '@aztec/foundation/schemas';
|
|
2
3
|
import type { TypedEventEmitter } from '@aztec/foundation/types';
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
import type { L1RollupConstants } from '../epoch-helpers/index.js';
|
|
@@ -7,7 +8,7 @@ import type { IndexedTxEffect } from '../tx/indexed_tx_effect.js';
|
|
|
7
8
|
import type { TxHash } from '../tx/tx_hash.js';
|
|
8
9
|
import type { TxReceipt } from '../tx/tx_receipt.js';
|
|
9
10
|
import type { L2Block } from './l2_block.js';
|
|
10
|
-
import
|
|
11
|
+
import { PublishedL2Block } from './published_l2_block.js';
|
|
11
12
|
/**
|
|
12
13
|
* Interface of classes allowing for the retrieval of L2 blocks.
|
|
13
14
|
*/
|
|
@@ -101,9 +102,420 @@ export interface L2BlockSource {
|
|
|
101
102
|
getL1Constants(): Promise<L1RollupConstants>;
|
|
102
103
|
/** Latest synced L1 timestamp. */
|
|
103
104
|
getL1Timestamp(): Promise<bigint>;
|
|
105
|
+
/**
|
|
106
|
+
* Returns whether the latest block in the pending chain on L1 is invalid (ie its attestations are incorrect).
|
|
107
|
+
* Note that invalid blocks do not get synced, so the latest block returned by the block source is always a valid one.
|
|
108
|
+
*/
|
|
109
|
+
isPendingChainInvalid(): Promise<boolean>;
|
|
110
|
+
/**
|
|
111
|
+
* Returns the status of the pending chain validation.
|
|
112
|
+
* This includes whether the chain is valid, and if not, the reason for invalidation.
|
|
113
|
+
*/
|
|
114
|
+
getPendingChainValidationStatus(): Promise<ValidateBlockResult>;
|
|
104
115
|
/** Force a sync. */
|
|
105
116
|
syncImmediate(): Promise<void>;
|
|
106
117
|
}
|
|
118
|
+
/** Result type for validating a block attestations */
|
|
119
|
+
export type ValidateBlockResult = {
|
|
120
|
+
valid: true;
|
|
121
|
+
block?: PublishedL2Block;
|
|
122
|
+
} | {
|
|
123
|
+
valid: false;
|
|
124
|
+
block: PublishedL2Block;
|
|
125
|
+
committee: EthAddress[];
|
|
126
|
+
reason: 'insufficient-attestations';
|
|
127
|
+
} | {
|
|
128
|
+
valid: false;
|
|
129
|
+
block: PublishedL2Block;
|
|
130
|
+
committee: EthAddress[];
|
|
131
|
+
reason: 'invalid-attestation';
|
|
132
|
+
invalidIndex: number;
|
|
133
|
+
};
|
|
134
|
+
export declare const ValidateBlockResultSchema: z.ZodUnion<[z.ZodObject<{
|
|
135
|
+
valid: z.ZodLiteral<true>;
|
|
136
|
+
block: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
block: z.ZodEffects<z.ZodObject<{
|
|
138
|
+
archive: z.ZodEffects<z.ZodObject<{
|
|
139
|
+
root: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
140
|
+
nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
root: import("@aztec/foundation/schemas").Fr;
|
|
143
|
+
nextAvailableLeafIndex: number;
|
|
144
|
+
}, {
|
|
145
|
+
root: string;
|
|
146
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
147
|
+
}>, import("../trees/append_only_tree_snapshot.js").AppendOnlyTreeSnapshot, {
|
|
148
|
+
root: string;
|
|
149
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
150
|
+
}>;
|
|
151
|
+
header: ZodFor<BlockHeader>;
|
|
152
|
+
body: ZodFor<import("./body.js").Body>;
|
|
153
|
+
}, "strip", z.ZodTypeAny, {
|
|
154
|
+
archive: import("../trees/append_only_tree_snapshot.js").AppendOnlyTreeSnapshot;
|
|
155
|
+
header: BlockHeader;
|
|
156
|
+
body: import("./body.js").Body;
|
|
157
|
+
}, {
|
|
158
|
+
archive: {
|
|
159
|
+
root: string;
|
|
160
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
161
|
+
};
|
|
162
|
+
header?: any;
|
|
163
|
+
body?: any;
|
|
164
|
+
}>, L2Block, {
|
|
165
|
+
archive: {
|
|
166
|
+
root: string;
|
|
167
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
168
|
+
};
|
|
169
|
+
header?: any;
|
|
170
|
+
body?: any;
|
|
171
|
+
}>;
|
|
172
|
+
l1: z.ZodObject<{
|
|
173
|
+
blockNumber: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
174
|
+
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
175
|
+
blockHash: z.ZodString;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
blockNumber: bigint;
|
|
178
|
+
timestamp: bigint;
|
|
179
|
+
blockHash: string;
|
|
180
|
+
}, {
|
|
181
|
+
blockNumber: string | number | bigint;
|
|
182
|
+
timestamp: string | number | bigint;
|
|
183
|
+
blockHash: string;
|
|
184
|
+
}>;
|
|
185
|
+
attestations: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
186
|
+
address: z.ZodType<EthAddress, any, string>;
|
|
187
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, import("./index.js").Signature, string>;
|
|
188
|
+
}, "strip", z.ZodTypeAny, {
|
|
189
|
+
address: EthAddress;
|
|
190
|
+
signature: import("./index.js").Signature;
|
|
191
|
+
}, {
|
|
192
|
+
address: string;
|
|
193
|
+
signature: string;
|
|
194
|
+
}>, import("./index.js").CommitteeAttestation, {
|
|
195
|
+
address: string;
|
|
196
|
+
signature: string;
|
|
197
|
+
}>, "many">;
|
|
198
|
+
}, "strip", z.ZodTypeAny, {
|
|
199
|
+
block: L2Block;
|
|
200
|
+
l1: {
|
|
201
|
+
blockNumber: bigint;
|
|
202
|
+
timestamp: bigint;
|
|
203
|
+
blockHash: string;
|
|
204
|
+
};
|
|
205
|
+
attestations: import("./index.js").CommitteeAttestation[];
|
|
206
|
+
}, {
|
|
207
|
+
block: {
|
|
208
|
+
archive: {
|
|
209
|
+
root: string;
|
|
210
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
211
|
+
};
|
|
212
|
+
header?: any;
|
|
213
|
+
body?: any;
|
|
214
|
+
};
|
|
215
|
+
l1: {
|
|
216
|
+
blockNumber: string | number | bigint;
|
|
217
|
+
timestamp: string | number | bigint;
|
|
218
|
+
blockHash: string;
|
|
219
|
+
};
|
|
220
|
+
attestations: {
|
|
221
|
+
address: string;
|
|
222
|
+
signature: string;
|
|
223
|
+
}[];
|
|
224
|
+
}>>;
|
|
225
|
+
}, "strip", z.ZodTypeAny, {
|
|
226
|
+
valid: true;
|
|
227
|
+
block?: {
|
|
228
|
+
block: L2Block;
|
|
229
|
+
l1: {
|
|
230
|
+
blockNumber: bigint;
|
|
231
|
+
timestamp: bigint;
|
|
232
|
+
blockHash: string;
|
|
233
|
+
};
|
|
234
|
+
attestations: import("./index.js").CommitteeAttestation[];
|
|
235
|
+
} | undefined;
|
|
236
|
+
}, {
|
|
237
|
+
valid: true;
|
|
238
|
+
block?: {
|
|
239
|
+
block: {
|
|
240
|
+
archive: {
|
|
241
|
+
root: string;
|
|
242
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
243
|
+
};
|
|
244
|
+
header?: any;
|
|
245
|
+
body?: any;
|
|
246
|
+
};
|
|
247
|
+
l1: {
|
|
248
|
+
blockNumber: string | number | bigint;
|
|
249
|
+
timestamp: string | number | bigint;
|
|
250
|
+
blockHash: string;
|
|
251
|
+
};
|
|
252
|
+
attestations: {
|
|
253
|
+
address: string;
|
|
254
|
+
signature: string;
|
|
255
|
+
}[];
|
|
256
|
+
} | undefined;
|
|
257
|
+
}>, z.ZodObject<{
|
|
258
|
+
valid: z.ZodLiteral<false>;
|
|
259
|
+
block: z.ZodObject<{
|
|
260
|
+
block: z.ZodEffects<z.ZodObject<{
|
|
261
|
+
archive: z.ZodEffects<z.ZodObject<{
|
|
262
|
+
root: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
263
|
+
nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
264
|
+
}, "strip", z.ZodTypeAny, {
|
|
265
|
+
root: import("@aztec/foundation/schemas").Fr;
|
|
266
|
+
nextAvailableLeafIndex: number;
|
|
267
|
+
}, {
|
|
268
|
+
root: string;
|
|
269
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
270
|
+
}>, import("../trees/append_only_tree_snapshot.js").AppendOnlyTreeSnapshot, {
|
|
271
|
+
root: string;
|
|
272
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
273
|
+
}>;
|
|
274
|
+
header: ZodFor<BlockHeader>;
|
|
275
|
+
body: ZodFor<import("./body.js").Body>;
|
|
276
|
+
}, "strip", z.ZodTypeAny, {
|
|
277
|
+
archive: import("../trees/append_only_tree_snapshot.js").AppendOnlyTreeSnapshot;
|
|
278
|
+
header: BlockHeader;
|
|
279
|
+
body: import("./body.js").Body;
|
|
280
|
+
}, {
|
|
281
|
+
archive: {
|
|
282
|
+
root: string;
|
|
283
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
284
|
+
};
|
|
285
|
+
header?: any;
|
|
286
|
+
body?: any;
|
|
287
|
+
}>, L2Block, {
|
|
288
|
+
archive: {
|
|
289
|
+
root: string;
|
|
290
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
291
|
+
};
|
|
292
|
+
header?: any;
|
|
293
|
+
body?: any;
|
|
294
|
+
}>;
|
|
295
|
+
l1: z.ZodObject<{
|
|
296
|
+
blockNumber: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
297
|
+
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
298
|
+
blockHash: z.ZodString;
|
|
299
|
+
}, "strip", z.ZodTypeAny, {
|
|
300
|
+
blockNumber: bigint;
|
|
301
|
+
timestamp: bigint;
|
|
302
|
+
blockHash: string;
|
|
303
|
+
}, {
|
|
304
|
+
blockNumber: string | number | bigint;
|
|
305
|
+
timestamp: string | number | bigint;
|
|
306
|
+
blockHash: string;
|
|
307
|
+
}>;
|
|
308
|
+
attestations: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
309
|
+
address: z.ZodType<EthAddress, any, string>;
|
|
310
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, import("./index.js").Signature, string>;
|
|
311
|
+
}, "strip", z.ZodTypeAny, {
|
|
312
|
+
address: EthAddress;
|
|
313
|
+
signature: import("./index.js").Signature;
|
|
314
|
+
}, {
|
|
315
|
+
address: string;
|
|
316
|
+
signature: string;
|
|
317
|
+
}>, import("./index.js").CommitteeAttestation, {
|
|
318
|
+
address: string;
|
|
319
|
+
signature: string;
|
|
320
|
+
}>, "many">;
|
|
321
|
+
}, "strip", z.ZodTypeAny, {
|
|
322
|
+
block: L2Block;
|
|
323
|
+
l1: {
|
|
324
|
+
blockNumber: bigint;
|
|
325
|
+
timestamp: bigint;
|
|
326
|
+
blockHash: string;
|
|
327
|
+
};
|
|
328
|
+
attestations: import("./index.js").CommitteeAttestation[];
|
|
329
|
+
}, {
|
|
330
|
+
block: {
|
|
331
|
+
archive: {
|
|
332
|
+
root: string;
|
|
333
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
334
|
+
};
|
|
335
|
+
header?: any;
|
|
336
|
+
body?: any;
|
|
337
|
+
};
|
|
338
|
+
l1: {
|
|
339
|
+
blockNumber: string | number | bigint;
|
|
340
|
+
timestamp: string | number | bigint;
|
|
341
|
+
blockHash: string;
|
|
342
|
+
};
|
|
343
|
+
attestations: {
|
|
344
|
+
address: string;
|
|
345
|
+
signature: string;
|
|
346
|
+
}[];
|
|
347
|
+
}>;
|
|
348
|
+
committee: z.ZodArray<z.ZodType<EthAddress, any, string>, "many">;
|
|
349
|
+
reason: z.ZodLiteral<"insufficient-attestations">;
|
|
350
|
+
}, "strip", z.ZodTypeAny, {
|
|
351
|
+
valid: false;
|
|
352
|
+
block: {
|
|
353
|
+
block: L2Block;
|
|
354
|
+
l1: {
|
|
355
|
+
blockNumber: bigint;
|
|
356
|
+
timestamp: bigint;
|
|
357
|
+
blockHash: string;
|
|
358
|
+
};
|
|
359
|
+
attestations: import("./index.js").CommitteeAttestation[];
|
|
360
|
+
};
|
|
361
|
+
committee: EthAddress[];
|
|
362
|
+
reason: "insufficient-attestations";
|
|
363
|
+
}, {
|
|
364
|
+
valid: false;
|
|
365
|
+
block: {
|
|
366
|
+
block: {
|
|
367
|
+
archive: {
|
|
368
|
+
root: string;
|
|
369
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
370
|
+
};
|
|
371
|
+
header?: any;
|
|
372
|
+
body?: any;
|
|
373
|
+
};
|
|
374
|
+
l1: {
|
|
375
|
+
blockNumber: string | number | bigint;
|
|
376
|
+
timestamp: string | number | bigint;
|
|
377
|
+
blockHash: string;
|
|
378
|
+
};
|
|
379
|
+
attestations: {
|
|
380
|
+
address: string;
|
|
381
|
+
signature: string;
|
|
382
|
+
}[];
|
|
383
|
+
};
|
|
384
|
+
committee: string[];
|
|
385
|
+
reason: "insufficient-attestations";
|
|
386
|
+
}>, z.ZodObject<{
|
|
387
|
+
valid: z.ZodLiteral<false>;
|
|
388
|
+
block: z.ZodObject<{
|
|
389
|
+
block: z.ZodEffects<z.ZodObject<{
|
|
390
|
+
archive: z.ZodEffects<z.ZodObject<{
|
|
391
|
+
root: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
392
|
+
nextAvailableLeafIndex: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
393
|
+
}, "strip", z.ZodTypeAny, {
|
|
394
|
+
root: import("@aztec/foundation/schemas").Fr;
|
|
395
|
+
nextAvailableLeafIndex: number;
|
|
396
|
+
}, {
|
|
397
|
+
root: string;
|
|
398
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
399
|
+
}>, import("../trees/append_only_tree_snapshot.js").AppendOnlyTreeSnapshot, {
|
|
400
|
+
root: string;
|
|
401
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
402
|
+
}>;
|
|
403
|
+
header: ZodFor<BlockHeader>;
|
|
404
|
+
body: ZodFor<import("./body.js").Body>;
|
|
405
|
+
}, "strip", z.ZodTypeAny, {
|
|
406
|
+
archive: import("../trees/append_only_tree_snapshot.js").AppendOnlyTreeSnapshot;
|
|
407
|
+
header: BlockHeader;
|
|
408
|
+
body: import("./body.js").Body;
|
|
409
|
+
}, {
|
|
410
|
+
archive: {
|
|
411
|
+
root: string;
|
|
412
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
413
|
+
};
|
|
414
|
+
header?: any;
|
|
415
|
+
body?: any;
|
|
416
|
+
}>, L2Block, {
|
|
417
|
+
archive: {
|
|
418
|
+
root: string;
|
|
419
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
420
|
+
};
|
|
421
|
+
header?: any;
|
|
422
|
+
body?: any;
|
|
423
|
+
}>;
|
|
424
|
+
l1: z.ZodObject<{
|
|
425
|
+
blockNumber: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
426
|
+
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
427
|
+
blockHash: z.ZodString;
|
|
428
|
+
}, "strip", z.ZodTypeAny, {
|
|
429
|
+
blockNumber: bigint;
|
|
430
|
+
timestamp: bigint;
|
|
431
|
+
blockHash: string;
|
|
432
|
+
}, {
|
|
433
|
+
blockNumber: string | number | bigint;
|
|
434
|
+
timestamp: string | number | bigint;
|
|
435
|
+
blockHash: string;
|
|
436
|
+
}>;
|
|
437
|
+
attestations: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
438
|
+
address: z.ZodType<EthAddress, any, string>;
|
|
439
|
+
signature: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, `0x${string}`, string>, `0x${string}`, string>, import("./index.js").Signature, string>;
|
|
440
|
+
}, "strip", z.ZodTypeAny, {
|
|
441
|
+
address: EthAddress;
|
|
442
|
+
signature: import("./index.js").Signature;
|
|
443
|
+
}, {
|
|
444
|
+
address: string;
|
|
445
|
+
signature: string;
|
|
446
|
+
}>, import("./index.js").CommitteeAttestation, {
|
|
447
|
+
address: string;
|
|
448
|
+
signature: string;
|
|
449
|
+
}>, "many">;
|
|
450
|
+
}, "strip", z.ZodTypeAny, {
|
|
451
|
+
block: L2Block;
|
|
452
|
+
l1: {
|
|
453
|
+
blockNumber: bigint;
|
|
454
|
+
timestamp: bigint;
|
|
455
|
+
blockHash: string;
|
|
456
|
+
};
|
|
457
|
+
attestations: import("./index.js").CommitteeAttestation[];
|
|
458
|
+
}, {
|
|
459
|
+
block: {
|
|
460
|
+
archive: {
|
|
461
|
+
root: string;
|
|
462
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
463
|
+
};
|
|
464
|
+
header?: any;
|
|
465
|
+
body?: any;
|
|
466
|
+
};
|
|
467
|
+
l1: {
|
|
468
|
+
blockNumber: string | number | bigint;
|
|
469
|
+
timestamp: string | number | bigint;
|
|
470
|
+
blockHash: string;
|
|
471
|
+
};
|
|
472
|
+
attestations: {
|
|
473
|
+
address: string;
|
|
474
|
+
signature: string;
|
|
475
|
+
}[];
|
|
476
|
+
}>;
|
|
477
|
+
committee: z.ZodArray<z.ZodType<EthAddress, any, string>, "many">;
|
|
478
|
+
reason: z.ZodLiteral<"invalid-attestation">;
|
|
479
|
+
invalidIndex: z.ZodNumber;
|
|
480
|
+
}, "strip", z.ZodTypeAny, {
|
|
481
|
+
valid: false;
|
|
482
|
+
block: {
|
|
483
|
+
block: L2Block;
|
|
484
|
+
l1: {
|
|
485
|
+
blockNumber: bigint;
|
|
486
|
+
timestamp: bigint;
|
|
487
|
+
blockHash: string;
|
|
488
|
+
};
|
|
489
|
+
attestations: import("./index.js").CommitteeAttestation[];
|
|
490
|
+
};
|
|
491
|
+
committee: EthAddress[];
|
|
492
|
+
reason: "invalid-attestation";
|
|
493
|
+
invalidIndex: number;
|
|
494
|
+
}, {
|
|
495
|
+
valid: false;
|
|
496
|
+
block: {
|
|
497
|
+
block: {
|
|
498
|
+
archive: {
|
|
499
|
+
root: string;
|
|
500
|
+
nextAvailableLeafIndex: string | number | bigint;
|
|
501
|
+
};
|
|
502
|
+
header?: any;
|
|
503
|
+
body?: any;
|
|
504
|
+
};
|
|
505
|
+
l1: {
|
|
506
|
+
blockNumber: string | number | bigint;
|
|
507
|
+
timestamp: string | number | bigint;
|
|
508
|
+
blockHash: string;
|
|
509
|
+
};
|
|
510
|
+
attestations: {
|
|
511
|
+
address: string;
|
|
512
|
+
signature: string;
|
|
513
|
+
}[];
|
|
514
|
+
};
|
|
515
|
+
committee: string[];
|
|
516
|
+
reason: "invalid-attestation";
|
|
517
|
+
invalidIndex: number;
|
|
518
|
+
}>]>;
|
|
107
519
|
/**
|
|
108
520
|
* L2BlockSource that emits events upon pending / proven chain changes.
|
|
109
521
|
* see L2BlockSourceEvents for the events emitted.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"l2_block_source.d.ts","sourceRoot":"","sources":["../../src/block/l2_block_source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACr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.js';
|
|
4
|
+
export const ValidateBlockResultSchema = z.union([
|
|
5
|
+
z.object({
|
|
6
|
+
valid: z.literal(true),
|
|
7
|
+
block: PublishedL2Block.schema.optional()
|
|
8
|
+
}),
|
|
9
|
+
z.object({
|
|
10
|
+
valid: z.literal(false),
|
|
11
|
+
block: PublishedL2Block.schema,
|
|
12
|
+
committee: z.array(schemas.EthAddress),
|
|
13
|
+
reason: z.literal('insufficient-attestations')
|
|
14
|
+
}),
|
|
15
|
+
z.object({
|
|
16
|
+
valid: z.literal(false),
|
|
17
|
+
block: PublishedL2Block.schema,
|
|
18
|
+
committee: z.array(schemas.EthAddress),
|
|
19
|
+
reason: z.literal('invalid-attestation'),
|
|
20
|
+
invalidIndex: z.number()
|
|
21
|
+
})
|
|
22
|
+
]);
|
|
2
23
|
/** Creates an L2 block id */ export function makeL2BlockId(number, hash) {
|
|
3
24
|
if (number !== 0 && !hash) {
|
|
4
25
|
throw new Error(`Hash is required for non-genesis blocks (got block number ${number})`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/interfaces/archiver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D,OAAO,EAAE,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/interfaces/archiver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D,OAAO,EAAE,KAAK,aAAa,EAA2C,MAAM,6BAA6B,CAAC;AAE1G,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAOnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,aAAa,GAAG,YAAY,GAAG,kBAAkB,GAAG,mBAAmB,EACvE,OAAO,GAAG,MAAM,CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CAiDvD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { L2Block } from '../block/l2_block.js';
|
|
3
|
-
import { L2TipsSchema } from '../block/l2_block_source.js';
|
|
3
|
+
import { L2TipsSchema, ValidateBlockResultSchema } from '../block/l2_block_source.js';
|
|
4
4
|
import { PublishedL2Block } from '../block/published_l2_block.js';
|
|
5
5
|
import { ContractClassPublicSchema, ContractInstanceWithAddressSchema } from '../contract/index.js';
|
|
6
6
|
import { L1RollupConstantsSchema } from '../epoch-helpers/index.js';
|
|
@@ -47,5 +47,7 @@ export const ArchiverApiSchema = {
|
|
|
47
47
|
getDebugFunctionName: z.function().args(schemas.AztecAddress, schemas.FunctionSelector).returns(optional(z.string())),
|
|
48
48
|
getL1Constants: z.function().args().returns(L1RollupConstantsSchema),
|
|
49
49
|
getL1Timestamp: z.function().args().returns(schemas.BigInt),
|
|
50
|
-
syncImmediate: z.function().args().returns(z.void())
|
|
50
|
+
syncImmediate: z.function().args().returns(z.void()),
|
|
51
|
+
isPendingChainInvalid: z.function().args().returns(z.boolean()),
|
|
52
|
+
getPendingChainValidationStatus: z.function().args().returns(ValidateBlockResultSchema)
|
|
51
53
|
};
|
|
@@ -4,6 +4,7 @@ import type { ApiSchemaFor } from '../schemas/schemas.js';
|
|
|
4
4
|
import { type ComponentsVersions } from '../versioning/index.js';
|
|
5
5
|
import { type SequencerConfig } from './configs.js';
|
|
6
6
|
import { type ProverConfig } from './prover-client.js';
|
|
7
|
+
import { type SlasherConfig } from './slasher.js';
|
|
7
8
|
/**
|
|
8
9
|
* Aztec node admin API.
|
|
9
10
|
*/
|
|
@@ -33,10 +34,10 @@ export interface AztecNodeAdmin {
|
|
|
33
34
|
/** Resumes archiver and world state syncing. */
|
|
34
35
|
resumeSync(): Promise<void>;
|
|
35
36
|
}
|
|
36
|
-
export type AztecNodeAdminConfig = SequencerConfig & ProverConfig & {
|
|
37
|
+
export type AztecNodeAdminConfig = SequencerConfig & ProverConfig & SlasherConfig & {
|
|
37
38
|
maxTxPoolSize: number;
|
|
38
39
|
};
|
|
39
|
-
export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
40
|
+
export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
40
41
|
transactionPollingIntervalMS: z.ZodOptional<z.ZodNumber>;
|
|
41
42
|
maxTxsPerBlock: z.ZodOptional<z.ZodNumber>;
|
|
42
43
|
minTxsPerBlock: z.ZodOptional<z.ZodNumber>;
|
|
@@ -84,6 +85,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
84
85
|
enforceTimeTable: z.ZodOptional<z.ZodBoolean>;
|
|
85
86
|
fakeProcessingDelayPerTxMs: z.ZodOptional<z.ZodNumber>;
|
|
86
87
|
attestationPropagationTime: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
skipCollectingAttestations: z.ZodOptional<z.ZodBoolean>;
|
|
87
89
|
}, {
|
|
88
90
|
nodeUrl: z.ZodOptional<z.ZodString>;
|
|
89
91
|
realProofs: z.ZodBoolean;
|
|
@@ -92,6 +94,22 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
92
94
|
proverTestDelayMs: z.ZodNumber;
|
|
93
95
|
proverTestDelayFactor: z.ZodNumber;
|
|
94
96
|
proverAgentCount: z.ZodNumber;
|
|
97
|
+
}>, {
|
|
98
|
+
slashOverridePayload: z.ZodOptional<z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>>;
|
|
99
|
+
slashPayloadTtlSeconds: z.ZodNumber;
|
|
100
|
+
slashPruneEnabled: z.ZodBoolean;
|
|
101
|
+
slashPrunePenalty: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
102
|
+
slashPruneMaxPenalty: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
103
|
+
slashInvalidBlockEnabled: z.ZodBoolean;
|
|
104
|
+
slashInvalidBlockPenalty: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
105
|
+
slashInvalidBlockMaxPenalty: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
106
|
+
slashInactivityEnabled: z.ZodBoolean;
|
|
107
|
+
slashInactivityCreateTargetPercentage: z.ZodNumber;
|
|
108
|
+
slashInactivitySignalTargetPercentage: z.ZodNumber;
|
|
109
|
+
slashInactivityCreatePenalty: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
110
|
+
slashInactivityMaxPenalty: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
111
|
+
slashProposerRoundPollingIntervalSeconds: z.ZodNumber;
|
|
112
|
+
slasherPrivateKey: z.ZodType<import("@aztec/foundation/config").SecretValue<string | undefined>, any, any>;
|
|
95
113
|
}>, {
|
|
96
114
|
maxTxPoolSize: z.ZodNumber;
|
|
97
115
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -100,6 +118,20 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
100
118
|
proverTestDelayMs: number;
|
|
101
119
|
proverTestDelayFactor: number;
|
|
102
120
|
proverAgentCount: number;
|
|
121
|
+
slashPayloadTtlSeconds: number;
|
|
122
|
+
slashPruneEnabled: boolean;
|
|
123
|
+
slashPrunePenalty: bigint;
|
|
124
|
+
slashPruneMaxPenalty: bigint;
|
|
125
|
+
slashInvalidBlockEnabled: boolean;
|
|
126
|
+
slashInvalidBlockPenalty: bigint;
|
|
127
|
+
slashInvalidBlockMaxPenalty: bigint;
|
|
128
|
+
slashInactivityEnabled: boolean;
|
|
129
|
+
slashInactivityCreateTargetPercentage: number;
|
|
130
|
+
slashInactivitySignalTargetPercentage: number;
|
|
131
|
+
slashInactivityCreatePenalty: bigint;
|
|
132
|
+
slashInactivityMaxPenalty: bigint;
|
|
133
|
+
slashProposerRoundPollingIntervalSeconds: number;
|
|
134
|
+
slasherPrivateKey: import("@aztec/foundation/config").SecretValue<string | undefined>;
|
|
103
135
|
maxTxPoolSize: number;
|
|
104
136
|
coinbase?: import("@aztec/foundation/schemas").EthAddress | undefined;
|
|
105
137
|
feeRecipient?: import("../aztec-address/index.js").AztecAddress | undefined;
|
|
@@ -128,14 +160,29 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
128
160
|
enforceTimeTable?: boolean | undefined;
|
|
129
161
|
fakeProcessingDelayPerTxMs?: number | undefined;
|
|
130
162
|
attestationPropagationTime?: number | undefined;
|
|
163
|
+
skipCollectingAttestations?: boolean | undefined;
|
|
131
164
|
proverId?: import("@aztec/foundation/schemas").Fr | undefined;
|
|
132
165
|
nodeUrl?: string | undefined;
|
|
166
|
+
slashOverridePayload?: import("@aztec/foundation/schemas").EthAddress | undefined;
|
|
133
167
|
}, {
|
|
134
168
|
realProofs: boolean;
|
|
135
169
|
proverTestDelayType: "fixed" | "realistic";
|
|
136
170
|
proverTestDelayMs: number;
|
|
137
171
|
proverTestDelayFactor: number;
|
|
138
172
|
proverAgentCount: number;
|
|
173
|
+
slashPayloadTtlSeconds: number;
|
|
174
|
+
slashPruneEnabled: boolean;
|
|
175
|
+
slashPrunePenalty: string | number | bigint;
|
|
176
|
+
slashPruneMaxPenalty: string | number | bigint;
|
|
177
|
+
slashInvalidBlockEnabled: boolean;
|
|
178
|
+
slashInvalidBlockPenalty: string | number | bigint;
|
|
179
|
+
slashInvalidBlockMaxPenalty: string | number | bigint;
|
|
180
|
+
slashInactivityEnabled: boolean;
|
|
181
|
+
slashInactivityCreateTargetPercentage: number;
|
|
182
|
+
slashInactivitySignalTargetPercentage: number;
|
|
183
|
+
slashInactivityCreatePenalty: string | number | bigint;
|
|
184
|
+
slashInactivityMaxPenalty: string | number | bigint;
|
|
185
|
+
slashProposerRoundPollingIntervalSeconds: number;
|
|
139
186
|
maxTxPoolSize: number;
|
|
140
187
|
coinbase?: any;
|
|
141
188
|
feeRecipient?: any;
|
|
@@ -164,8 +211,11 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
164
211
|
enforceTimeTable?: boolean | undefined;
|
|
165
212
|
fakeProcessingDelayPerTxMs?: number | undefined;
|
|
166
213
|
attestationPropagationTime?: number | undefined;
|
|
214
|
+
skipCollectingAttestations?: boolean | undefined;
|
|
167
215
|
proverId?: any;
|
|
168
216
|
nodeUrl?: string | undefined;
|
|
217
|
+
slashOverridePayload?: string | undefined;
|
|
218
|
+
slasherPrivateKey?: any;
|
|
169
219
|
}>;
|
|
170
220
|
export declare const AztecNodeAdminApiSchema: ApiSchemaFor<AztecNodeAdmin>;
|
|
171
221
|
export declare function createAztecNodeAdminClient(url: string, versions?: Partial<ComponentsVersions>, fetch?: typeof defaultFetch): AztecNodeAdmin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aztec-node-admin.d.ts","sourceRoot":"","sources":["../../src/interfaces/aztec-node-admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAE1F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,KAAK,kBAAkB,EAAgC,MAAM,wBAAwB,CAAC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aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9G,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEU,CAAC;AAElD,eAAO,MAAM,uBAAuB,EAAE,YAAY,CAAC,cAAc,CAOhE,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,OAAO,CAAC,kBAAkB,CAAM,EAC1C,KAAK,sBAAe,GACnB,cAAc,CAMhB"}
|
|
@@ -3,7 +3,8 @@ import { z } from 'zod';
|
|
|
3
3
|
import { getVersioningResponseHandler } from '../versioning/index.js';
|
|
4
4
|
import { SequencerConfigSchema } from './configs.js';
|
|
5
5
|
import { ProverConfigSchema } from './prover-client.js';
|
|
6
|
-
|
|
6
|
+
import { SlasherConfigSchema } from './slasher.js';
|
|
7
|
+
export const AztecNodeAdminConfigSchema = SequencerConfigSchema.merge(ProverConfigSchema).merge(SlasherConfigSchema).merge(z.object({
|
|
7
8
|
maxTxPoolSize: z.number()
|
|
8
9
|
}));
|
|
9
10
|
export const AztecNodeAdminApiSchema = {
|