@aztec/stdlib 2.0.0-nightly.20250903 → 2.0.0-rc.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 +1 -1
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +2 -2
- package/dest/epoch-helpers/index.d.ts +6 -2
- package/dest/epoch-helpers/index.d.ts.map +1 -1
- package/dest/epoch-helpers/index.js +6 -0
- package/dest/fees/transaction_fee.d.ts.map +1 -1
- package/dest/fees/transaction_fee.js +3 -0
- package/dest/interfaces/aztec-node-admin.d.ts +25 -2
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +2 -1
- package/dest/interfaces/server.d.ts +1 -0
- package/dest/interfaces/server.d.ts.map +1 -1
- package/dest/interfaces/server.js +1 -0
- package/dest/interfaces/slasher.d.ts +4 -0
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +1 -0
- package/dest/interfaces/validator.d.ts +60 -0
- package/dest/interfaces/validator.d.ts.map +1 -0
- package/dest/interfaces/validator.js +10 -0
- package/dest/rollup/block_constant_data.d.ts +4 -4
- package/dest/rollup/block_constant_data.d.ts.map +1 -1
- package/dest/rollup/block_constant_data.js +4 -4
- package/dest/tests/factories.d.ts +2 -1
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +5 -1
- package/dest/tx/tree_snapshots.d.ts +4 -4
- package/dest/tx/tree_snapshots.d.ts.map +1 -1
- package/dest/validators/schemas.d.ts +42 -4
- package/dest/validators/schemas.d.ts.map +1 -1
- package/dest/validators/schemas.js +5 -4
- package/dest/validators/types.d.ts +8 -10
- package/dest/validators/types.d.ts.map +1 -1
- package/package.json +9 -8
- package/src/avm/avm.ts +2 -5
- package/src/epoch-helpers/index.ts +16 -2
- package/src/fees/transaction_fee.ts +11 -0
- package/src/interfaces/aztec-node-admin.ts +6 -1
- package/src/interfaces/server.ts +1 -0
- package/src/interfaces/slasher.ts +2 -0
- package/src/interfaces/validator.ts +70 -0
- package/src/rollup/block_constant_data.ts +3 -3
- package/src/tests/factories.ts +6 -0
- package/src/tx/tree_snapshots.ts +4 -4
- package/src/validators/schemas.ts +6 -4
- package/src/validators/types.ts +9 -10
package/src/tx/tree_snapshots.ts
CHANGED
|
@@ -12,10 +12,10 @@ import { AppendOnlyTreeSnapshot } from '../trees/append_only_tree_snapshot.js';
|
|
|
12
12
|
*/
|
|
13
13
|
export class TreeSnapshots {
|
|
14
14
|
constructor(
|
|
15
|
-
public
|
|
16
|
-
public
|
|
17
|
-
public
|
|
18
|
-
public
|
|
15
|
+
public l1ToL2MessageTree: AppendOnlyTreeSnapshot,
|
|
16
|
+
public noteHashTree: AppendOnlyTreeSnapshot,
|
|
17
|
+
public nullifierTree: AppendOnlyTreeSnapshot,
|
|
18
|
+
public publicDataTree: AppendOnlyTreeSnapshot,
|
|
19
19
|
) {}
|
|
20
20
|
|
|
21
21
|
static get schema() {
|
|
@@ -4,6 +4,7 @@ import { z } from 'zod';
|
|
|
4
4
|
|
|
5
5
|
import type {
|
|
6
6
|
SingleValidatorStats,
|
|
7
|
+
ValidatorMissedStats,
|
|
7
8
|
ValidatorStats,
|
|
8
9
|
ValidatorStatusHistory,
|
|
9
10
|
ValidatorStatusInSlot,
|
|
@@ -35,19 +36,20 @@ const ValidatorTimeStatSchema = z.object({
|
|
|
35
36
|
date: z.string(),
|
|
36
37
|
});
|
|
37
38
|
|
|
38
|
-
const
|
|
39
|
+
const ValidatorMissedStatsSchema = z.object({
|
|
39
40
|
currentStreak: schemas.Integer,
|
|
40
41
|
rate: z.number().optional(),
|
|
41
42
|
count: schemas.Integer,
|
|
42
|
-
|
|
43
|
+
total: schemas.Integer,
|
|
44
|
+
}) satisfies ZodFor<ValidatorMissedStats>;
|
|
43
45
|
|
|
44
46
|
export const ValidatorStatsSchema = z.object({
|
|
45
47
|
address: schemas.EthAddress,
|
|
46
48
|
lastProposal: ValidatorTimeStatSchema.optional(),
|
|
47
49
|
lastAttestation: ValidatorTimeStatSchema.optional(),
|
|
48
50
|
totalSlots: schemas.Integer,
|
|
49
|
-
missedProposals:
|
|
50
|
-
missedAttestations:
|
|
51
|
+
missedProposals: ValidatorMissedStatsSchema,
|
|
52
|
+
missedAttestations: ValidatorMissedStatsSchema,
|
|
51
53
|
history: ValidatorStatusHistorySchema,
|
|
52
54
|
}) satisfies ZodFor<ValidatorStats>;
|
|
53
55
|
|
package/src/validators/types.ts
CHANGED
|
@@ -11,21 +11,20 @@ export type ValidatorStatusInSlot =
|
|
|
11
11
|
|
|
12
12
|
export type ValidatorStatusHistory = { slot: bigint; status: ValidatorStatusInSlot }[];
|
|
13
13
|
|
|
14
|
+
export type ValidatorMissedStats = {
|
|
15
|
+
currentStreak: number;
|
|
16
|
+
rate?: number;
|
|
17
|
+
count: number;
|
|
18
|
+
total: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
14
21
|
export type ValidatorStats = {
|
|
15
22
|
address: EthAddress;
|
|
16
23
|
lastProposal?: { timestamp: bigint; slot: bigint; date: string };
|
|
17
24
|
lastAttestation?: { timestamp: bigint; slot: bigint; date: string };
|
|
18
25
|
totalSlots: number;
|
|
19
|
-
missedProposals:
|
|
20
|
-
|
|
21
|
-
rate?: number;
|
|
22
|
-
count: number;
|
|
23
|
-
};
|
|
24
|
-
missedAttestations: {
|
|
25
|
-
currentStreak: number;
|
|
26
|
-
rate?: number;
|
|
27
|
-
count: number;
|
|
28
|
-
};
|
|
26
|
+
missedProposals: ValidatorMissedStats;
|
|
27
|
+
missedAttestations: ValidatorMissedStats;
|
|
29
28
|
history: ValidatorStatusHistory;
|
|
30
29
|
};
|
|
31
30
|
|