@aztec/stdlib 3.0.0-nightly.20251128 → 3.0.0-nightly.20251201.2
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/avm/avm.d.ts +17 -9
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm_circuit_public_inputs.d.ts +5 -3
- package/dest/avm/avm_circuit_public_inputs.d.ts.map +1 -1
- package/dest/avm/avm_proving_request.d.ts +9 -5
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/block/l2_block.d.ts +3 -2
- package/dest/block/l2_block.d.ts.map +1 -1
- package/dest/block/l2_block_code_to_purge.d.ts +1 -1
- package/dest/block/l2_block_code_to_purge.d.ts.map +1 -1
- package/dest/block/l2_block_code_to_purge.js +3 -2
- package/dest/block/l2_block_header.d.ts +4 -3
- package/dest/block/l2_block_header.d.ts.map +1 -1
- package/dest/block/l2_block_header.js +1 -1
- package/dest/block/l2_block_source.d.ts +4 -4
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/epoch-helpers/index.d.ts +7 -7
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +9 -9
- package/dest/interfaces/archiver.js +1 -1
- package/dest/interfaces/aztec-node.d.ts +8 -2
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +2 -1
- package/dest/interfaces/p2p.d.ts +3 -2
- package/dest/interfaces/p2p.d.ts.map +1 -1
- package/dest/interfaces/p2p.js +1 -1
- package/dest/interfaces/proving-job.d.ts +9 -5
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +3 -3
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/kernel/private_call_data.d.ts +62 -5
- package/dest/kernel/private_call_data.d.ts.map +1 -1
- package/dest/kernel/private_call_data.js +105 -4
- package/dest/p2p/block_attestation.d.ts +4 -9
- package/dest/p2p/block_attestation.d.ts.map +1 -1
- package/dest/p2p/block_proposal.d.ts +3 -2
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +1 -1
- package/dest/p2p/consensus_payload.d.ts +4 -182
- package/dest/p2p/consensus_payload.d.ts.map +1 -1
- package/dest/p2p/consensus_payload.js +14 -25
- package/dest/rollup/checkpoint_constant_data.d.ts +11 -5
- package/dest/rollup/checkpoint_constant_data.d.ts.map +1 -1
- package/dest/rollup/checkpoint_constant_data.js +11 -4
- package/dest/rollup/checkpoint_header.d.ts +11 -5
- package/dest/rollup/checkpoint_header.d.ts.map +1 -1
- package/dest/rollup/checkpoint_header.js +18 -11
- package/dest/schemas/schemas.d.ts +6 -1
- package/dest/schemas/schemas.d.ts.map +1 -1
- package/dest/schemas/schemas.js +2 -0
- package/dest/slashing/empire.js +2 -2
- package/dest/slashing/helpers.d.ts +5 -5
- package/dest/slashing/helpers.d.ts.map +1 -1
- package/dest/slashing/helpers.js +7 -6
- package/dest/slashing/interfaces.d.ts +3 -2
- package/dest/slashing/interfaces.d.ts.map +1 -1
- package/dest/tests/factories.d.ts +1 -1
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +5 -4
- package/dest/tests/mocks.d.ts +2 -3
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +6 -12
- package/dest/trees/append_only_tree_snapshot.d.ts +1 -4
- package/dest/trees/append_only_tree_snapshot.d.ts.map +1 -1
- package/dest/trees/append_only_tree_snapshot.js +0 -9
- package/dest/tx/block_header.d.ts +4 -3
- package/dest/tx/block_header.d.ts.map +1 -1
- package/dest/tx/block_header.js +1 -1
- package/dest/tx/global_variable_builder.d.ts +3 -2
- package/dest/tx/global_variable_builder.d.ts.map +1 -1
- package/dest/tx/global_variables.d.ts +26 -8
- package/dest/tx/global_variables.d.ts.map +1 -1
- package/dest/tx/global_variables.js +27 -10
- package/dest/tx/partial_state_reference.d.ts +1 -4
- package/dest/tx/partial_state_reference.d.ts.map +1 -1
- package/dest/tx/partial_state_reference.js +0 -10
- package/dest/tx/state_reference.d.ts +1 -4
- package/dest/tx/state_reference.d.ts.map +1 -1
- package/dest/tx/state_reference.js +0 -9
- package/dest/tx/tx.d.ts +2 -2
- package/dest/tx/tx.d.ts.map +1 -1
- package/dest/tx/tx.js +1 -0
- package/dest/validators/errors.d.ts +6 -7
- package/dest/validators/errors.d.ts.map +1 -1
- package/dest/validators/errors.js +2 -4
- package/dest/validators/schemas.d.ts +102 -48
- package/dest/validators/schemas.d.ts.map +1 -1
- package/dest/validators/schemas.js +6 -6
- package/dest/validators/types.d.ts +9 -9
- package/dest/validators/types.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/block/l2_block.ts +2 -1
- package/src/block/l2_block_code_to_purge.ts +3 -2
- package/src/block/l2_block_header.ts +3 -2
- package/src/block/l2_block_source.ts +3 -3
- package/src/epoch-helpers/index.ts +19 -14
- package/src/interfaces/archiver.ts +1 -1
- package/src/interfaces/aztec-node.ts +12 -3
- package/src/interfaces/p2p.ts +4 -2
- package/src/interfaces/validator.ts +1 -2
- package/src/kernel/private_call_data.ts +130 -3
- package/src/p2p/block_attestation.ts +2 -1
- package/src/p2p/block_proposal.ts +3 -2
- package/src/p2p/consensus_payload.ts +12 -28
- package/src/rollup/checkpoint_constant_data.ts +24 -5
- package/src/rollup/checkpoint_header.ts +21 -12
- package/src/schemas/schemas.ts +7 -0
- package/src/slashing/empire.ts +2 -2
- package/src/slashing/helpers.ts +12 -9
- package/src/slashing/interfaces.ts +3 -1
- package/src/tests/factories.ts +5 -4
- package/src/tests/mocks.ts +2 -16
- package/src/trees/append_only_tree_snapshot.ts +0 -12
- package/src/tx/block_header.ts +3 -2
- package/src/tx/global_variable_builder.ts +2 -1
- package/src/tx/global_variables.ts +30 -11
- package/src/tx/partial_state_reference.ts +0 -17
- package/src/tx/state_reference.ts +0 -15
- package/src/tx/tx.ts +2 -1
- package/src/validators/errors.ts +3 -4
- package/src/validators/schemas.ts +6 -6
- package/src/validators/types.ts +8 -8
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const ValidatorStatusInSlotSchema: z.ZodEnum<["block-mined", "block-proposed", "block-missed", "attestation-sent", "attestation-missed"]>;
|
|
3
3
|
export declare const ValidatorStatusHistorySchema: z.ZodArray<z.ZodObject<{
|
|
4
|
-
slot: z.ZodPipeline<z.ZodUnion<[z.
|
|
4
|
+
slot: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>;
|
|
5
5
|
status: z.ZodEnum<["block-mined", "block-proposed", "block-missed", "attestation-sent", "attestation-missed"]>;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
slot:
|
|
7
|
+
slot: number & {
|
|
8
|
+
_branding: "SlotNumber";
|
|
9
|
+
};
|
|
8
10
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
9
11
|
}, {
|
|
10
12
|
slot: string | number | bigint;
|
|
11
13
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
12
14
|
}>, "many">;
|
|
13
15
|
export declare const ValidatorStatusHistorySchemaArray: z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
14
|
-
slot: z.ZodPipeline<z.ZodUnion<[z.
|
|
16
|
+
slot: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>;
|
|
15
17
|
status: z.ZodEnum<["block-mined", "block-proposed", "block-missed", "attestation-sent", "attestation-missed"]>;
|
|
16
18
|
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
slot:
|
|
19
|
+
slot: number & {
|
|
20
|
+
_branding: "SlotNumber";
|
|
21
|
+
};
|
|
18
22
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
19
23
|
}, {
|
|
20
24
|
slot: string | number | bigint;
|
|
21
25
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
22
26
|
}>, "many">, "many">;
|
|
23
27
|
export declare const ValidatorStatusHistorySchemaMap: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodArray<z.ZodObject<{
|
|
24
|
-
slot: z.ZodPipeline<z.ZodUnion<[z.
|
|
28
|
+
slot: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>;
|
|
25
29
|
status: z.ZodEnum<["block-mined", "block-proposed", "block-missed", "attestation-sent", "attestation-missed"]>;
|
|
26
30
|
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
slot:
|
|
31
|
+
slot: number & {
|
|
32
|
+
_branding: "SlotNumber";
|
|
33
|
+
};
|
|
28
34
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
29
35
|
}, {
|
|
30
36
|
slot: string | number | bigint;
|
|
@@ -34,11 +40,13 @@ export declare const ValidatorStatsSchema: z.ZodObject<{
|
|
|
34
40
|
address: z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>;
|
|
35
41
|
lastProposal: z.ZodOptional<z.ZodObject<{
|
|
36
42
|
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
37
|
-
slot: z.ZodPipeline<z.ZodUnion<[z.
|
|
43
|
+
slot: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>;
|
|
38
44
|
date: z.ZodString;
|
|
39
45
|
}, "strip", z.ZodTypeAny, {
|
|
40
46
|
timestamp: bigint;
|
|
41
|
-
slot:
|
|
47
|
+
slot: number & {
|
|
48
|
+
_branding: "SlotNumber";
|
|
49
|
+
};
|
|
42
50
|
date: string;
|
|
43
51
|
}, {
|
|
44
52
|
timestamp: string | number | bigint;
|
|
@@ -47,11 +55,13 @@ export declare const ValidatorStatsSchema: z.ZodObject<{
|
|
|
47
55
|
}>>;
|
|
48
56
|
lastAttestation: z.ZodOptional<z.ZodObject<{
|
|
49
57
|
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
50
|
-
slot: z.ZodPipeline<z.ZodUnion<[z.
|
|
58
|
+
slot: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>;
|
|
51
59
|
date: z.ZodString;
|
|
52
60
|
}, "strip", z.ZodTypeAny, {
|
|
53
61
|
timestamp: bigint;
|
|
54
|
-
slot:
|
|
62
|
+
slot: number & {
|
|
63
|
+
_branding: "SlotNumber";
|
|
64
|
+
};
|
|
55
65
|
date: string;
|
|
56
66
|
}, {
|
|
57
67
|
timestamp: string | number | bigint;
|
|
@@ -92,10 +102,12 @@ export declare const ValidatorStatsSchema: z.ZodObject<{
|
|
|
92
102
|
total: string | number | bigint;
|
|
93
103
|
}>;
|
|
94
104
|
history: z.ZodArray<z.ZodObject<{
|
|
95
|
-
slot: z.ZodPipeline<z.ZodUnion<[z.
|
|
105
|
+
slot: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>;
|
|
96
106
|
status: z.ZodEnum<["block-mined", "block-proposed", "block-missed", "attestation-sent", "attestation-missed"]>;
|
|
97
107
|
}, "strip", z.ZodTypeAny, {
|
|
98
|
-
slot:
|
|
108
|
+
slot: number & {
|
|
109
|
+
_branding: "SlotNumber";
|
|
110
|
+
};
|
|
99
111
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
100
112
|
}, {
|
|
101
113
|
slot: string | number | bigint;
|
|
@@ -105,12 +117,16 @@ export declare const ValidatorStatsSchema: z.ZodObject<{
|
|
|
105
117
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
106
118
|
lastProposal?: {
|
|
107
119
|
timestamp: bigint;
|
|
108
|
-
slot:
|
|
120
|
+
slot: number & {
|
|
121
|
+
_branding: "SlotNumber";
|
|
122
|
+
};
|
|
109
123
|
date: string;
|
|
110
124
|
} | undefined;
|
|
111
125
|
lastAttestation?: {
|
|
112
126
|
timestamp: bigint;
|
|
113
|
-
slot:
|
|
127
|
+
slot: number & {
|
|
128
|
+
_branding: "SlotNumber";
|
|
129
|
+
};
|
|
114
130
|
date: string;
|
|
115
131
|
} | undefined;
|
|
116
132
|
totalSlots: number;
|
|
@@ -127,7 +143,9 @@ export declare const ValidatorStatsSchema: z.ZodObject<{
|
|
|
127
143
|
total: number;
|
|
128
144
|
};
|
|
129
145
|
history: {
|
|
130
|
-
slot:
|
|
146
|
+
slot: number & {
|
|
147
|
+
_branding: "SlotNumber";
|
|
148
|
+
};
|
|
131
149
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
132
150
|
}[];
|
|
133
151
|
}, {
|
|
@@ -165,11 +183,13 @@ export declare const ValidatorsStatsSchema: z.ZodObject<{
|
|
|
165
183
|
address: z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>;
|
|
166
184
|
lastProposal: z.ZodOptional<z.ZodObject<{
|
|
167
185
|
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
168
|
-
slot: z.ZodPipeline<z.ZodUnion<[z.
|
|
186
|
+
slot: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>;
|
|
169
187
|
date: z.ZodString;
|
|
170
188
|
}, "strip", z.ZodTypeAny, {
|
|
171
189
|
timestamp: bigint;
|
|
172
|
-
slot:
|
|
190
|
+
slot: number & {
|
|
191
|
+
_branding: "SlotNumber";
|
|
192
|
+
};
|
|
173
193
|
date: string;
|
|
174
194
|
}, {
|
|
175
195
|
timestamp: string | number | bigint;
|
|
@@ -178,11 +198,13 @@ export declare const ValidatorsStatsSchema: z.ZodObject<{
|
|
|
178
198
|
}>>;
|
|
179
199
|
lastAttestation: z.ZodOptional<z.ZodObject<{
|
|
180
200
|
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
181
|
-
slot: z.ZodPipeline<z.ZodUnion<[z.
|
|
201
|
+
slot: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>;
|
|
182
202
|
date: z.ZodString;
|
|
183
203
|
}, "strip", z.ZodTypeAny, {
|
|
184
204
|
timestamp: bigint;
|
|
185
|
-
slot:
|
|
205
|
+
slot: number & {
|
|
206
|
+
_branding: "SlotNumber";
|
|
207
|
+
};
|
|
186
208
|
date: string;
|
|
187
209
|
}, {
|
|
188
210
|
timestamp: string | number | bigint;
|
|
@@ -223,10 +245,12 @@ export declare const ValidatorsStatsSchema: z.ZodObject<{
|
|
|
223
245
|
total: string | number | bigint;
|
|
224
246
|
}>;
|
|
225
247
|
history: z.ZodArray<z.ZodObject<{
|
|
226
|
-
slot: z.ZodPipeline<z.ZodUnion<[z.
|
|
248
|
+
slot: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>;
|
|
227
249
|
status: z.ZodEnum<["block-mined", "block-proposed", "block-missed", "attestation-sent", "attestation-missed"]>;
|
|
228
250
|
}, "strip", z.ZodTypeAny, {
|
|
229
|
-
slot:
|
|
251
|
+
slot: number & {
|
|
252
|
+
_branding: "SlotNumber";
|
|
253
|
+
};
|
|
230
254
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
231
255
|
}, {
|
|
232
256
|
slot: string | number | bigint;
|
|
@@ -236,12 +260,16 @@ export declare const ValidatorsStatsSchema: z.ZodObject<{
|
|
|
236
260
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
237
261
|
lastProposal?: {
|
|
238
262
|
timestamp: bigint;
|
|
239
|
-
slot:
|
|
263
|
+
slot: number & {
|
|
264
|
+
_branding: "SlotNumber";
|
|
265
|
+
};
|
|
240
266
|
date: string;
|
|
241
267
|
} | undefined;
|
|
242
268
|
lastAttestation?: {
|
|
243
269
|
timestamp: bigint;
|
|
244
|
-
slot:
|
|
270
|
+
slot: number & {
|
|
271
|
+
_branding: "SlotNumber";
|
|
272
|
+
};
|
|
245
273
|
date: string;
|
|
246
274
|
} | undefined;
|
|
247
275
|
totalSlots: number;
|
|
@@ -258,7 +286,9 @@ export declare const ValidatorsStatsSchema: z.ZodObject<{
|
|
|
258
286
|
total: number;
|
|
259
287
|
};
|
|
260
288
|
history: {
|
|
261
|
-
slot:
|
|
289
|
+
slot: number & {
|
|
290
|
+
_branding: "SlotNumber";
|
|
291
|
+
};
|
|
262
292
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
263
293
|
}[];
|
|
264
294
|
}, {
|
|
@@ -291,20 +321,24 @@ export declare const ValidatorsStatsSchema: z.ZodObject<{
|
|
|
291
321
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
292
322
|
}[];
|
|
293
323
|
}>>;
|
|
294
|
-
lastProcessedSlot: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.
|
|
295
|
-
initialSlot: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.
|
|
324
|
+
lastProcessedSlot: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>>;
|
|
325
|
+
initialSlot: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>>;
|
|
296
326
|
slotWindow: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
297
327
|
}, "strip", z.ZodTypeAny, {
|
|
298
328
|
stats: Record<string, {
|
|
299
329
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
300
330
|
lastProposal?: {
|
|
301
331
|
timestamp: bigint;
|
|
302
|
-
slot:
|
|
332
|
+
slot: number & {
|
|
333
|
+
_branding: "SlotNumber";
|
|
334
|
+
};
|
|
303
335
|
date: string;
|
|
304
336
|
} | undefined;
|
|
305
337
|
lastAttestation?: {
|
|
306
338
|
timestamp: bigint;
|
|
307
|
-
slot:
|
|
339
|
+
slot: number & {
|
|
340
|
+
_branding: "SlotNumber";
|
|
341
|
+
};
|
|
308
342
|
date: string;
|
|
309
343
|
} | undefined;
|
|
310
344
|
totalSlots: number;
|
|
@@ -321,12 +355,14 @@ export declare const ValidatorsStatsSchema: z.ZodObject<{
|
|
|
321
355
|
total: number;
|
|
322
356
|
};
|
|
323
357
|
history: {
|
|
324
|
-
slot:
|
|
358
|
+
slot: number & {
|
|
359
|
+
_branding: "SlotNumber";
|
|
360
|
+
};
|
|
325
361
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
326
362
|
}[];
|
|
327
363
|
}>;
|
|
328
|
-
lastProcessedSlot?:
|
|
329
|
-
initialSlot?:
|
|
364
|
+
lastProcessedSlot?: import("@aztec/foundation/schemas").SlotNumber | undefined;
|
|
365
|
+
initialSlot?: import("@aztec/foundation/schemas").SlotNumber | undefined;
|
|
330
366
|
slotWindow: number;
|
|
331
367
|
}, {
|
|
332
368
|
stats: Record<string, {
|
|
@@ -368,11 +404,13 @@ export declare const SingleValidatorStatsSchema: z.ZodObject<{
|
|
|
368
404
|
address: z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>;
|
|
369
405
|
lastProposal: z.ZodOptional<z.ZodObject<{
|
|
370
406
|
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
371
|
-
slot: z.ZodPipeline<z.ZodUnion<[z.
|
|
407
|
+
slot: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>;
|
|
372
408
|
date: z.ZodString;
|
|
373
409
|
}, "strip", z.ZodTypeAny, {
|
|
374
410
|
timestamp: bigint;
|
|
375
|
-
slot:
|
|
411
|
+
slot: number & {
|
|
412
|
+
_branding: "SlotNumber";
|
|
413
|
+
};
|
|
376
414
|
date: string;
|
|
377
415
|
}, {
|
|
378
416
|
timestamp: string | number | bigint;
|
|
@@ -381,11 +419,13 @@ export declare const SingleValidatorStatsSchema: z.ZodObject<{
|
|
|
381
419
|
}>>;
|
|
382
420
|
lastAttestation: z.ZodOptional<z.ZodObject<{
|
|
383
421
|
timestamp: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
384
|
-
slot: z.ZodPipeline<z.ZodUnion<[z.
|
|
422
|
+
slot: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>;
|
|
385
423
|
date: z.ZodString;
|
|
386
424
|
}, "strip", z.ZodTypeAny, {
|
|
387
425
|
timestamp: bigint;
|
|
388
|
-
slot:
|
|
426
|
+
slot: number & {
|
|
427
|
+
_branding: "SlotNumber";
|
|
428
|
+
};
|
|
389
429
|
date: string;
|
|
390
430
|
}, {
|
|
391
431
|
timestamp: string | number | bigint;
|
|
@@ -426,10 +466,12 @@ export declare const SingleValidatorStatsSchema: z.ZodObject<{
|
|
|
426
466
|
total: string | number | bigint;
|
|
427
467
|
}>;
|
|
428
468
|
history: z.ZodArray<z.ZodObject<{
|
|
429
|
-
slot: z.ZodPipeline<z.ZodUnion<[z.
|
|
469
|
+
slot: z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>;
|
|
430
470
|
status: z.ZodEnum<["block-mined", "block-proposed", "block-missed", "attestation-sent", "attestation-missed"]>;
|
|
431
471
|
}, "strip", z.ZodTypeAny, {
|
|
432
|
-
slot:
|
|
472
|
+
slot: number & {
|
|
473
|
+
_branding: "SlotNumber";
|
|
474
|
+
};
|
|
433
475
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
434
476
|
}, {
|
|
435
477
|
slot: string | number | bigint;
|
|
@@ -439,12 +481,16 @@ export declare const SingleValidatorStatsSchema: z.ZodObject<{
|
|
|
439
481
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
440
482
|
lastProposal?: {
|
|
441
483
|
timestamp: bigint;
|
|
442
|
-
slot:
|
|
484
|
+
slot: number & {
|
|
485
|
+
_branding: "SlotNumber";
|
|
486
|
+
};
|
|
443
487
|
date: string;
|
|
444
488
|
} | undefined;
|
|
445
489
|
lastAttestation?: {
|
|
446
490
|
timestamp: bigint;
|
|
447
|
-
slot:
|
|
491
|
+
slot: number & {
|
|
492
|
+
_branding: "SlotNumber";
|
|
493
|
+
};
|
|
448
494
|
date: string;
|
|
449
495
|
} | undefined;
|
|
450
496
|
totalSlots: number;
|
|
@@ -461,7 +507,9 @@ export declare const SingleValidatorStatsSchema: z.ZodObject<{
|
|
|
461
507
|
total: number;
|
|
462
508
|
};
|
|
463
509
|
history: {
|
|
464
|
-
slot:
|
|
510
|
+
slot: number & {
|
|
511
|
+
_branding: "SlotNumber";
|
|
512
|
+
};
|
|
465
513
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
466
514
|
}[];
|
|
467
515
|
}, {
|
|
@@ -509,20 +557,24 @@ export declare const SingleValidatorStatsSchema: z.ZodObject<{
|
|
|
509
557
|
total: string | number | bigint;
|
|
510
558
|
epoch: string | number | bigint;
|
|
511
559
|
}>, "many">;
|
|
512
|
-
lastProcessedSlot: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.
|
|
513
|
-
initialSlot: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.
|
|
560
|
+
lastProcessedSlot: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>>;
|
|
561
|
+
initialSlot: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodUnion<[z.ZodNumber, z.ZodBigInt, z.ZodString]>, z.ZodNumber>, import("@aztec/foundation/schemas").SlotNumber, string | number | bigint>>;
|
|
514
562
|
slotWindow: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>;
|
|
515
563
|
}, "strip", z.ZodTypeAny, {
|
|
516
564
|
validator: {
|
|
517
565
|
address: import("@aztec/foundation/schemas").EthAddress;
|
|
518
566
|
lastProposal?: {
|
|
519
567
|
timestamp: bigint;
|
|
520
|
-
slot:
|
|
568
|
+
slot: number & {
|
|
569
|
+
_branding: "SlotNumber";
|
|
570
|
+
};
|
|
521
571
|
date: string;
|
|
522
572
|
} | undefined;
|
|
523
573
|
lastAttestation?: {
|
|
524
574
|
timestamp: bigint;
|
|
525
|
-
slot:
|
|
575
|
+
slot: number & {
|
|
576
|
+
_branding: "SlotNumber";
|
|
577
|
+
};
|
|
526
578
|
date: string;
|
|
527
579
|
} | undefined;
|
|
528
580
|
totalSlots: number;
|
|
@@ -539,7 +591,9 @@ export declare const SingleValidatorStatsSchema: z.ZodObject<{
|
|
|
539
591
|
total: number;
|
|
540
592
|
};
|
|
541
593
|
history: {
|
|
542
|
-
slot:
|
|
594
|
+
slot: number & {
|
|
595
|
+
_branding: "SlotNumber";
|
|
596
|
+
};
|
|
543
597
|
status: "attestation-missed" | "attestation-sent" | "block-mined" | "block-missed" | "block-proposed";
|
|
544
598
|
}[];
|
|
545
599
|
};
|
|
@@ -550,8 +604,8 @@ export declare const SingleValidatorStatsSchema: z.ZodObject<{
|
|
|
550
604
|
_branding: "EpochNumber";
|
|
551
605
|
};
|
|
552
606
|
}[];
|
|
553
|
-
lastProcessedSlot?:
|
|
554
|
-
initialSlot?:
|
|
607
|
+
lastProcessedSlot?: import("@aztec/foundation/schemas").SlotNumber | undefined;
|
|
608
|
+
initialSlot?: import("@aztec/foundation/schemas").SlotNumber | undefined;
|
|
555
609
|
slotWindow: number;
|
|
556
610
|
}, {
|
|
557
611
|
validator: {
|
|
@@ -593,4 +647,4 @@ export declare const SingleValidatorStatsSchema: z.ZodObject<{
|
|
|
593
647
|
initialSlot?: string | number | bigint | undefined;
|
|
594
648
|
slotWindow: string | number | bigint;
|
|
595
649
|
}>;
|
|
596
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
650
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NoZW1hcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3ZhbGlkYXRvcnMvc2NoZW1hcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQ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C,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKE,CAAC;AAErC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYE,CAAC"}
|
|
@@ -8,14 +8,14 @@ export const ValidatorStatusInSlotSchema = z.enum([
|
|
|
8
8
|
'attestation-missed'
|
|
9
9
|
]);
|
|
10
10
|
export const ValidatorStatusHistorySchema = z.array(z.object({
|
|
11
|
-
slot: schemas.
|
|
11
|
+
slot: schemas.SlotNumber,
|
|
12
12
|
status: ValidatorStatusInSlotSchema
|
|
13
13
|
}));
|
|
14
14
|
export const ValidatorStatusHistorySchemaArray = z.array(ValidatorStatusHistorySchema);
|
|
15
15
|
export const ValidatorStatusHistorySchemaMap = z.record(ValidatorStatusHistorySchemaArray);
|
|
16
16
|
const ValidatorTimeStatSchema = z.object({
|
|
17
17
|
timestamp: schemas.BigInt,
|
|
18
|
-
slot: schemas.
|
|
18
|
+
slot: schemas.SlotNumber,
|
|
19
19
|
date: z.string()
|
|
20
20
|
});
|
|
21
21
|
const ValidatorMissedStatsSchema = z.object({
|
|
@@ -35,8 +35,8 @@ export const ValidatorStatsSchema = z.object({
|
|
|
35
35
|
});
|
|
36
36
|
export const ValidatorsStatsSchema = z.object({
|
|
37
37
|
stats: z.record(ValidatorStatsSchema),
|
|
38
|
-
lastProcessedSlot: schemas.
|
|
39
|
-
initialSlot: schemas.
|
|
38
|
+
lastProcessedSlot: schemas.SlotNumber.optional(),
|
|
39
|
+
initialSlot: schemas.SlotNumber.optional(),
|
|
40
40
|
slotWindow: schemas.Integer
|
|
41
41
|
});
|
|
42
42
|
export const SingleValidatorStatsSchema = z.object({
|
|
@@ -46,7 +46,7 @@ export const SingleValidatorStatsSchema = z.object({
|
|
|
46
46
|
total: schemas.Integer,
|
|
47
47
|
epoch: schemas.EpochNumber
|
|
48
48
|
})),
|
|
49
|
-
lastProcessedSlot: schemas.
|
|
50
|
-
initialSlot: schemas.
|
|
49
|
+
lastProcessedSlot: schemas.SlotNumber.optional(),
|
|
50
|
+
initialSlot: schemas.SlotNumber.optional(),
|
|
51
51
|
slotWindow: schemas.Integer
|
|
52
52
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { EpochNumber } from '@aztec/foundation/branded-types';
|
|
1
|
+
import type { EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
2
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
3
|
export type ValidatorStatusType = 'block' | 'attestation';
|
|
4
4
|
export type ValidatorStatusInSlot = 'block-mined' | 'block-proposed' | 'block-missed' | 'attestation-sent' | 'attestation-missed';
|
|
5
5
|
export type ValidatorStatusHistory = {
|
|
6
|
-
slot:
|
|
6
|
+
slot: SlotNumber;
|
|
7
7
|
status: ValidatorStatusInSlot;
|
|
8
8
|
}[];
|
|
9
9
|
export type ValidatorMissedStats = {
|
|
@@ -16,12 +16,12 @@ export type ValidatorStats = {
|
|
|
16
16
|
address: EthAddress;
|
|
17
17
|
lastProposal?: {
|
|
18
18
|
timestamp: bigint;
|
|
19
|
-
slot:
|
|
19
|
+
slot: SlotNumber;
|
|
20
20
|
date: string;
|
|
21
21
|
};
|
|
22
22
|
lastAttestation?: {
|
|
23
23
|
timestamp: bigint;
|
|
24
|
-
slot:
|
|
24
|
+
slot: SlotNumber;
|
|
25
25
|
date: string;
|
|
26
26
|
};
|
|
27
27
|
totalSlots: number;
|
|
@@ -31,8 +31,8 @@ export type ValidatorStats = {
|
|
|
31
31
|
};
|
|
32
32
|
export type ValidatorsStats = {
|
|
33
33
|
stats: Record<string, ValidatorStats>;
|
|
34
|
-
lastProcessedSlot?:
|
|
35
|
-
initialSlot?:
|
|
34
|
+
lastProcessedSlot?: SlotNumber;
|
|
35
|
+
initialSlot?: SlotNumber;
|
|
36
36
|
slotWindow: number;
|
|
37
37
|
};
|
|
38
38
|
export type ValidatorsEpochPerformance = Record<`0x${string}`, {
|
|
@@ -46,8 +46,8 @@ export type SingleValidatorStats = {
|
|
|
46
46
|
total: number;
|
|
47
47
|
epoch: EpochNumber;
|
|
48
48
|
}[];
|
|
49
|
-
lastProcessedSlot?:
|
|
50
|
-
initialSlot?:
|
|
49
|
+
lastProcessedSlot?: SlotNumber;
|
|
50
|
+
initialSlot?: SlotNumber;
|
|
51
51
|
slotWindow: number;
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy92YWxpZGF0b3JzL3R5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxVQUFVLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUMvRSxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUVoRSxNQUFNLE1BQU0sbUJBQW1CLEdBQUcsT0FBTyxHQUFHLGFBQWEsQ0FBQztBQUUxR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FBQztJQUN0QyxpQkFBaUIsQ0FBQyxFQUFFLFVBQVUsQ0FBQztJQUMvQixXQUFXLENBQUMsRUFBRSxVQUFVLENBQUM7SUFDekIsVUFBVSxFQUFFLE1BQU0sQ0FBQztDQUNwQixDQUFDO0FBRUYsTUFBTSxNQUFNLDBCQUEwQixHQUFHLE1BQU0sQ0FBQyxLQUFLLE1BQU0sRUFBRSxFQUFFO0lBQUUsTUFBTSxFQUFFLE1BQU0sQ0FBQztJQUFDLEtBQUssRUFBRSxNQUFNLENBQUE7Q0FBRSxDQUFDLENBQUM7QUFFbEcsTUFBTSxNQUFNLG9CQUFvQixHQUFHO0lBQ2pDLFNBQVMsRUFBRSxjQUFjLENBQUM7SUFDMUIsd0JBQXdCLEVBQUU7UUFBRSxNQUFNLEVBQUUsTUFBTSxDQUFDO1FBQUMsS0FBSyxFQUFFLE1BQU0sQ0FBQztRQUFDLEtBQUssRUFBRSxXQUFXLENBQUE7S0FBRSxFQUFFLENBQUM7SUFDbEYsaUJBQWlCLENBQUMsRUFBRSxVQUFVLENBQUM7SUFDL0IsV0FBVyxDQUFDLEVBQUUsVUFBVSxDQUFDO0lBQ3pCLFVBQVUsRUFBRSxNQUFNLENBQUM7Q0FDcEIsQ0FBQyJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/validators/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/validators/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,aAAa,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAC7B,aAA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B,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;IAClF,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251201.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@aws-sdk/client-s3": "^3.892.0",
|
|
75
|
-
"@aztec/bb.js": "3.0.0-nightly.
|
|
76
|
-
"@aztec/blob-lib": "3.0.0-nightly.
|
|
77
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
78
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
79
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
80
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
81
|
-
"@aztec/noir-noirc_abi": "3.0.0-nightly.
|
|
75
|
+
"@aztec/bb.js": "3.0.0-nightly.20251201.2",
|
|
76
|
+
"@aztec/blob-lib": "3.0.0-nightly.20251201.2",
|
|
77
|
+
"@aztec/constants": "3.0.0-nightly.20251201.2",
|
|
78
|
+
"@aztec/ethereum": "3.0.0-nightly.20251201.2",
|
|
79
|
+
"@aztec/foundation": "3.0.0-nightly.20251201.2",
|
|
80
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251201.2",
|
|
81
|
+
"@aztec/noir-noirc_abi": "3.0.0-nightly.20251201.2",
|
|
82
82
|
"@google-cloud/storage": "^7.15.0",
|
|
83
83
|
"axios": "^1.12.0",
|
|
84
84
|
"json-stringify-deterministic": "1.0.12",
|
package/src/block/l2_block.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type BlockBlobData, encodeBlockBlobData, encodeCheckpointBlobDataFromBlocks } from '@aztec/blob-lib/encoding';
|
|
2
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
4
|
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
4
5
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
@@ -117,7 +118,7 @@ export class L2Block {
|
|
|
117
118
|
return this.header.getBlockNumber();
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
get slot():
|
|
121
|
+
get slot(): SlotNumber {
|
|
121
122
|
return this.header.getSlot();
|
|
122
123
|
}
|
|
123
124
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
1
2
|
import { compact } from '@aztec/foundation/collection';
|
|
2
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
4
|
import { Fr } from '@aztec/foundation/fields';
|
|
@@ -25,7 +26,7 @@ export function makeL2BlockHeader(
|
|
|
25
26
|
overrides?.state ?? makeStateReference(seed + 0x600),
|
|
26
27
|
makeGlobalVariables((seed += 0x700), {
|
|
27
28
|
...(blockNumber ? { blockNumber } : {}),
|
|
28
|
-
...(slotNumber ? { slotNumber:
|
|
29
|
+
...(slotNumber ? { slotNumber: SlotNumber(slotNumber) } : {}),
|
|
29
30
|
}),
|
|
30
31
|
new Fr(seed + 0x300),
|
|
31
32
|
new Fr(seed + 0x800),
|
|
@@ -77,7 +78,7 @@ function makeGlobalVariables(seed = 1, overrides: Partial<FieldsOf<GlobalVariabl
|
|
|
77
78
|
chainId: new Fr(seed),
|
|
78
79
|
version: new Fr(seed + 1),
|
|
79
80
|
blockNumber: seed + 2,
|
|
80
|
-
slotNumber:
|
|
81
|
+
slotNumber: SlotNumber(seed + 3),
|
|
81
82
|
timestamp: BigInt(seed + 4),
|
|
82
83
|
coinbase: EthAddress.fromField(new Fr(seed + 5)),
|
|
83
84
|
feeRecipient: AztecAddress.fromField(new Fr(seed + 6)),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
1
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
3
|
import { type ZodFor, schemas } from '@aztec/foundation/schemas';
|
|
3
4
|
import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize';
|
|
@@ -72,8 +73,8 @@ export class L2BlockHeader {
|
|
|
72
73
|
return new L2BlockHeader(...L2BlockHeader.getFields(fields));
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
getSlot() {
|
|
76
|
-
return this.globalVariables.slotNumber
|
|
76
|
+
getSlot(): SlotNumber {
|
|
77
|
+
return this.globalVariables.slotNumber;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
getBlockNumber() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EpochNumber } from '@aztec/foundation/branded-types';
|
|
1
|
+
import type { EpochNumber, SlotNumber } from '@aztec/foundation/branded-types';
|
|
2
2
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
3
|
import type { Fr } from '@aztec/foundation/fields';
|
|
4
4
|
import type { TypedEventEmitter } from '@aztec/foundation/types';
|
|
@@ -113,7 +113,7 @@ export interface L2BlockSource {
|
|
|
113
113
|
/**
|
|
114
114
|
* Returns the current L2 slot number based on the currently synced L1 timestamp.
|
|
115
115
|
*/
|
|
116
|
-
getL2SlotNumber(): Promise<
|
|
116
|
+
getL2SlotNumber(): Promise<SlotNumber | undefined>;
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
119
|
* Returns the current L2 epoch number based on the currently synced L1 timestamp.
|
|
@@ -232,7 +232,7 @@ export enum L2BlockSourceEvents {
|
|
|
232
232
|
export type L2BlockProvenEvent = {
|
|
233
233
|
type: 'l2BlockProven';
|
|
234
234
|
blockNumber: bigint;
|
|
235
|
-
slotNumber:
|
|
235
|
+
slotNumber: SlotNumber;
|
|
236
236
|
epochNumber: EpochNumber;
|
|
237
237
|
};
|
|
238
238
|
|