@aztec/stdlib 0.87.5 → 0.87.7
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/abi/decoder.d.ts +1 -1
- package/dest/abi/decoder.d.ts.map +1 -1
- package/dest/abi/decoder.js +4 -3
- package/dest/interfaces/prover-agent.d.ts +31 -6
- package/dest/interfaces/prover-agent.d.ts.map +1 -1
- package/dest/interfaces/prover-agent.js +15 -6
- package/dest/kernel/private_kernel_prover_output.d.ts +3 -0
- package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
- package/dest/logs/pending_tagged_log.d.ts +1 -1
- package/dest/logs/pending_tagged_log.js +1 -1
- package/dest/tx/private_execution_result.d.ts +6 -0
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/profiling.d.ts +254 -4
- package/dest/tx/profiling.d.ts.map +1 -1
- package/dest/tx/profiling.js +62 -30
- package/dest/tx/proven_tx.d.ts +43 -21
- package/dest/tx/proven_tx.d.ts.map +1 -1
- package/dest/tx/proven_tx.js +5 -5
- package/dest/tx/simulated_tx.d.ts +4 -4
- package/dest/tx/simulated_tx.d.ts.map +1 -1
- package/dest/tx/simulated_tx.js +8 -8
- package/package.json +7 -7
- package/src/abi/decoder.ts +5 -4
- package/src/interfaces/prover-agent.ts +9 -10
- package/src/kernel/private_kernel_prover_output.ts +1 -0
- package/src/logs/pending_tagged_log.ts +1 -1
- package/src/tx/private_execution_result.ts +1 -1
- package/src/tx/profiling.ts +64 -28
- package/src/tx/proven_tx.ts +3 -3
- package/src/tx/simulated_tx.ts +6 -6
package/dest/tx/profiling.js
CHANGED
|
@@ -3,9 +3,15 @@ import { optional } from '@aztec/foundation/schemas';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { PrivateExecutionStepSchema } from '../kernel/private_kernel_prover_output.js';
|
|
5
5
|
import { AbiDecodedSchema } from '../schemas/schemas.js';
|
|
6
|
+
const NodeStatsSchema = z.record(z.string(), z.object({
|
|
7
|
+
times: z.array(z.number())
|
|
8
|
+
}));
|
|
6
9
|
const FunctionTimingSchema = z.object({
|
|
7
10
|
functionName: z.string(),
|
|
8
|
-
time: z.number()
|
|
11
|
+
time: z.number(),
|
|
12
|
+
oracles: optional(z.record(z.string(), z.object({
|
|
13
|
+
times: z.array(z.number())
|
|
14
|
+
})))
|
|
9
15
|
});
|
|
10
16
|
export const ProvingTimingsSchema = z.object({
|
|
11
17
|
sync: optional(z.number()),
|
|
@@ -14,6 +20,10 @@ export const ProvingTimingsSchema = z.object({
|
|
|
14
20
|
unaccounted: z.number(),
|
|
15
21
|
total: z.number()
|
|
16
22
|
});
|
|
23
|
+
export const ProvingStatsSchema = z.object({
|
|
24
|
+
timings: ProvingTimingsSchema,
|
|
25
|
+
nodeRPCCalls: optional(NodeStatsSchema)
|
|
26
|
+
});
|
|
17
27
|
export const SimulationTimingsSchema = z.object({
|
|
18
28
|
sync: z.number(),
|
|
19
29
|
publicSimulation: optional(z.number()),
|
|
@@ -22,18 +32,22 @@ export const SimulationTimingsSchema = z.object({
|
|
|
22
32
|
unaccounted: z.number(),
|
|
23
33
|
total: z.number()
|
|
24
34
|
});
|
|
35
|
+
export const SimulationStatsSchema = z.object({
|
|
36
|
+
timings: SimulationTimingsSchema,
|
|
37
|
+
nodeRPCCalls: NodeStatsSchema
|
|
38
|
+
});
|
|
25
39
|
export class TxProfileResult {
|
|
26
40
|
executionSteps;
|
|
27
|
-
|
|
28
|
-
constructor(executionSteps,
|
|
41
|
+
stats;
|
|
42
|
+
constructor(executionSteps, stats){
|
|
29
43
|
this.executionSteps = executionSteps;
|
|
30
|
-
this.
|
|
44
|
+
this.stats = stats;
|
|
31
45
|
}
|
|
32
46
|
static get schema() {
|
|
33
47
|
return z.object({
|
|
34
48
|
executionSteps: z.array(PrivateExecutionStepSchema),
|
|
35
|
-
|
|
36
|
-
}).transform(({ executionSteps,
|
|
49
|
+
stats: ProvingStatsSchema
|
|
50
|
+
}).transform(({ executionSteps, stats })=>new TxProfileResult(executionSteps, stats));
|
|
37
51
|
}
|
|
38
52
|
static random() {
|
|
39
53
|
return new TxProfileResult([
|
|
@@ -53,45 +67,63 @@ export class TxProfileResult {
|
|
|
53
67
|
}
|
|
54
68
|
}
|
|
55
69
|
], {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
time: 1
|
|
70
|
+
nodeRPCCalls: {
|
|
71
|
+
getBlockHeader: {
|
|
72
|
+
times: [
|
|
73
|
+
1
|
|
74
|
+
]
|
|
62
75
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
76
|
+
},
|
|
77
|
+
timings: {
|
|
78
|
+
sync: 1,
|
|
79
|
+
proving: 1,
|
|
80
|
+
perFunction: [
|
|
81
|
+
{
|
|
82
|
+
functionName: 'random',
|
|
83
|
+
time: 1
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
unaccounted: 1,
|
|
87
|
+
total: 4
|
|
88
|
+
}
|
|
66
89
|
});
|
|
67
90
|
}
|
|
68
91
|
}
|
|
69
92
|
export class UtilitySimulationResult {
|
|
70
93
|
result;
|
|
71
|
-
|
|
72
|
-
constructor(result,
|
|
94
|
+
stats;
|
|
95
|
+
constructor(result, stats){
|
|
73
96
|
this.result = result;
|
|
74
|
-
this.
|
|
97
|
+
this.stats = stats;
|
|
75
98
|
}
|
|
76
99
|
static get schema() {
|
|
77
100
|
return z.object({
|
|
78
101
|
result: AbiDecodedSchema,
|
|
79
|
-
|
|
80
|
-
}).transform(({ result,
|
|
102
|
+
stats: optional(SimulationStatsSchema)
|
|
103
|
+
}).transform(({ result, stats })=>new UtilitySimulationResult(result, stats));
|
|
81
104
|
}
|
|
82
105
|
static random() {
|
|
83
106
|
return new UtilitySimulationResult(Fr.random().toBigInt(), {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
functionName: 'random',
|
|
90
|
-
time: 1
|
|
107
|
+
nodeRPCCalls: {
|
|
108
|
+
getBlockHeader: {
|
|
109
|
+
times: [
|
|
110
|
+
1
|
|
111
|
+
]
|
|
91
112
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
113
|
+
},
|
|
114
|
+
timings: {
|
|
115
|
+
sync: 1,
|
|
116
|
+
publicSimulation: 1,
|
|
117
|
+
validation: 1,
|
|
118
|
+
perFunction: [
|
|
119
|
+
{
|
|
120
|
+
functionName: 'random',
|
|
121
|
+
time: 1
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
unaccounted: 1,
|
|
125
|
+
total: 5
|
|
126
|
+
}
|
|
95
127
|
});
|
|
96
128
|
}
|
|
97
129
|
}
|
package/dest/tx/proven_tx.d.ts
CHANGED
|
@@ -3,99 +3,121 @@ import { z } from 'zod';
|
|
|
3
3
|
import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
|
|
4
4
|
import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
|
|
5
5
|
import { PrivateExecutionResult } from './private_execution_result.js';
|
|
6
|
-
import { type
|
|
6
|
+
import { type ProvingStats } from './profiling.js';
|
|
7
7
|
import { Tx } from './tx.js';
|
|
8
8
|
export declare class TxProvingResult {
|
|
9
9
|
privateExecutionResult: PrivateExecutionResult;
|
|
10
10
|
publicInputs: PrivateKernelTailCircuitPublicInputs;
|
|
11
11
|
clientIvcProof: ClientIvcProof;
|
|
12
|
-
|
|
13
|
-
constructor(privateExecutionResult: PrivateExecutionResult, publicInputs: PrivateKernelTailCircuitPublicInputs, clientIvcProof: ClientIvcProof,
|
|
12
|
+
stats?: ProvingStats | undefined;
|
|
13
|
+
constructor(privateExecutionResult: PrivateExecutionResult, publicInputs: PrivateKernelTailCircuitPublicInputs, clientIvcProof: ClientIvcProof, stats?: ProvingStats | undefined);
|
|
14
14
|
toTx(): Tx;
|
|
15
15
|
static get schema(): z.ZodEffects<z.ZodObject<{
|
|
16
16
|
privateExecutionResult: import("@aztec/foundation/schemas").ZodFor<PrivateExecutionResult>;
|
|
17
17
|
publicInputs: z.ZodType<PrivateKernelTailCircuitPublicInputs, any, string>;
|
|
18
18
|
clientIvcProof: z.ZodType<ClientIvcProof, any, string>;
|
|
19
19
|
timings: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodObject<{
|
|
20
|
-
sync: z.ZodNumber
|
|
21
|
-
|
|
22
|
-
validation: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodNumber>;
|
|
20
|
+
sync: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodNumber>;
|
|
21
|
+
proving: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodNumber>;
|
|
23
22
|
perFunction: z.ZodArray<z.ZodObject<{
|
|
24
23
|
functionName: z.ZodString;
|
|
25
24
|
time: z.ZodNumber;
|
|
25
|
+
oracles: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
26
|
+
times: z.ZodArray<z.ZodNumber, "many">;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
times: number[];
|
|
29
|
+
}, {
|
|
30
|
+
times: number[];
|
|
31
|
+
}>>>;
|
|
26
32
|
}, "strip", z.ZodTypeAny, {
|
|
27
33
|
functionName: string;
|
|
28
34
|
time: number;
|
|
35
|
+
oracles?: Record<string, {
|
|
36
|
+
times: number[];
|
|
37
|
+
}> | undefined;
|
|
29
38
|
}, {
|
|
30
39
|
functionName: string;
|
|
31
40
|
time: number;
|
|
41
|
+
oracles?: Record<string, {
|
|
42
|
+
times: number[];
|
|
43
|
+
}> | undefined;
|
|
32
44
|
}>, "many">;
|
|
33
45
|
unaccounted: z.ZodNumber;
|
|
34
46
|
total: z.ZodNumber;
|
|
35
47
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
sync: number;
|
|
37
48
|
perFunction: {
|
|
38
49
|
functionName: string;
|
|
39
50
|
time: number;
|
|
51
|
+
oracles?: Record<string, {
|
|
52
|
+
times: number[];
|
|
53
|
+
}> | undefined;
|
|
40
54
|
}[];
|
|
41
55
|
unaccounted: number;
|
|
42
56
|
total: number;
|
|
43
|
-
|
|
44
|
-
|
|
57
|
+
sync?: number | undefined;
|
|
58
|
+
proving?: number | undefined;
|
|
45
59
|
}, {
|
|
46
|
-
sync: number;
|
|
47
60
|
perFunction: {
|
|
48
61
|
functionName: string;
|
|
49
62
|
time: number;
|
|
63
|
+
oracles?: Record<string, {
|
|
64
|
+
times: number[];
|
|
65
|
+
}> | undefined;
|
|
50
66
|
}[];
|
|
51
67
|
unaccounted: number;
|
|
52
68
|
total: number;
|
|
53
|
-
|
|
54
|
-
|
|
69
|
+
sync?: number | undefined;
|
|
70
|
+
proving?: number | undefined;
|
|
55
71
|
}>>;
|
|
56
72
|
}, "strip", z.ZodTypeAny, {
|
|
57
73
|
publicInputs: PrivateKernelTailCircuitPublicInputs;
|
|
58
74
|
clientIvcProof: ClientIvcProof;
|
|
59
75
|
privateExecutionResult: PrivateExecutionResult;
|
|
60
76
|
timings?: {
|
|
61
|
-
sync: number;
|
|
62
77
|
perFunction: {
|
|
63
78
|
functionName: string;
|
|
64
79
|
time: number;
|
|
80
|
+
oracles?: Record<string, {
|
|
81
|
+
times: number[];
|
|
82
|
+
}> | undefined;
|
|
65
83
|
}[];
|
|
66
84
|
unaccounted: number;
|
|
67
85
|
total: number;
|
|
68
|
-
|
|
69
|
-
|
|
86
|
+
sync?: number | undefined;
|
|
87
|
+
proving?: number | undefined;
|
|
70
88
|
} | undefined;
|
|
71
89
|
}, {
|
|
72
90
|
publicInputs: string;
|
|
73
91
|
clientIvcProof: string;
|
|
74
92
|
timings?: {
|
|
75
|
-
sync: number;
|
|
76
93
|
perFunction: {
|
|
77
94
|
functionName: string;
|
|
78
95
|
time: number;
|
|
96
|
+
oracles?: Record<string, {
|
|
97
|
+
times: number[];
|
|
98
|
+
}> | undefined;
|
|
79
99
|
}[];
|
|
80
100
|
unaccounted: number;
|
|
81
101
|
total: number;
|
|
82
|
-
|
|
83
|
-
|
|
102
|
+
sync?: number | undefined;
|
|
103
|
+
proving?: number | undefined;
|
|
84
104
|
} | undefined;
|
|
85
105
|
privateExecutionResult?: any;
|
|
86
106
|
}>, TxProvingResult, {
|
|
87
107
|
publicInputs: string;
|
|
88
108
|
clientIvcProof: string;
|
|
89
109
|
timings?: {
|
|
90
|
-
sync: number;
|
|
91
110
|
perFunction: {
|
|
92
111
|
functionName: string;
|
|
93
112
|
time: number;
|
|
113
|
+
oracles?: Record<string, {
|
|
114
|
+
times: number[];
|
|
115
|
+
}> | undefined;
|
|
94
116
|
}[];
|
|
95
117
|
unaccounted: number;
|
|
96
118
|
total: number;
|
|
97
|
-
|
|
98
|
-
|
|
119
|
+
sync?: number | undefined;
|
|
120
|
+
proving?: number | undefined;
|
|
99
121
|
} | undefined;
|
|
100
122
|
privateExecutionResult?: any;
|
|
101
123
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proven_tx.d.ts","sourceRoot":"","sources":["../../src/tx/proven_tx.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAkC,MAAM,+BAA+B,CAAC;AACvG,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"proven_tx.d.ts","sourceRoot":"","sources":["../../src/tx/proven_tx.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAkC,MAAM,+BAA+B,CAAC;AACvG,OAAO,EAAE,KAAK,YAAY,EAAwB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,qBAAa,eAAe;IAEjB,sBAAsB,EAAE,sBAAsB;IAC9C,YAAY,EAAE,oCAAoC;IAClD,cAAc,EAAE,cAAc;IAC9B,KAAK,CAAC,EAAE,YAAY;gBAHpB,sBAAsB,EAAE,sBAAsB,EAC9C,YAAY,EAAE,oCAAoC,EAClD,cAAc,EAAE,cAAc,EAC9B,KAAK,CAAC,EAAE,YAAY,YAAA;IAG7B,IAAI,IAAI,EAAE;IAYV,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAShB;IAED,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC;WAIhC,MAAM;CAOpB"}
|
package/dest/tx/proven_tx.js
CHANGED
|
@@ -3,18 +3,18 @@ import { z } from 'zod';
|
|
|
3
3
|
import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
|
|
4
4
|
import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
|
|
5
5
|
import { PrivateExecutionResult, collectSortedContractClassLogs } from './private_execution_result.js';
|
|
6
|
-
import {
|
|
6
|
+
import { ProvingTimingsSchema } from './profiling.js';
|
|
7
7
|
import { Tx } from './tx.js';
|
|
8
8
|
export class TxProvingResult {
|
|
9
9
|
privateExecutionResult;
|
|
10
10
|
publicInputs;
|
|
11
11
|
clientIvcProof;
|
|
12
|
-
|
|
13
|
-
constructor(privateExecutionResult, publicInputs, clientIvcProof,
|
|
12
|
+
stats;
|
|
13
|
+
constructor(privateExecutionResult, publicInputs, clientIvcProof, stats){
|
|
14
14
|
this.privateExecutionResult = privateExecutionResult;
|
|
15
15
|
this.publicInputs = publicInputs;
|
|
16
16
|
this.clientIvcProof = clientIvcProof;
|
|
17
|
-
this.
|
|
17
|
+
this.stats = stats;
|
|
18
18
|
}
|
|
19
19
|
toTx() {
|
|
20
20
|
const contractClassLogs = collectSortedContractClassLogs(this.privateExecutionResult);
|
|
@@ -26,7 +26,7 @@ export class TxProvingResult {
|
|
|
26
26
|
privateExecutionResult: PrivateExecutionResult.schema,
|
|
27
27
|
publicInputs: PrivateKernelTailCircuitPublicInputs.schema,
|
|
28
28
|
clientIvcProof: ClientIvcProof.schema,
|
|
29
|
-
timings: optional(
|
|
29
|
+
timings: optional(ProvingTimingsSchema)
|
|
30
30
|
}).transform(TxProvingResult.from);
|
|
31
31
|
}
|
|
32
32
|
static from(fields) {
|
|
@@ -3,7 +3,7 @@ import type { FieldsOf } from '@aztec/foundation/types';
|
|
|
3
3
|
import type { GasUsed } from '../gas/gas_used.js';
|
|
4
4
|
import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
|
|
5
5
|
import { PrivateExecutionResult } from './private_execution_result.js';
|
|
6
|
-
import { type
|
|
6
|
+
import { type SimulationStats } from './profiling.js';
|
|
7
7
|
import { NestedProcessReturnValues, PublicSimulationOutput } from './public_simulation_output.js';
|
|
8
8
|
import { Tx } from './tx.js';
|
|
9
9
|
export declare class PrivateSimulationResult {
|
|
@@ -17,12 +17,12 @@ export declare class TxSimulationResult {
|
|
|
17
17
|
privateExecutionResult: PrivateExecutionResult;
|
|
18
18
|
publicInputs: PrivateKernelTailCircuitPublicInputs;
|
|
19
19
|
publicOutput?: PublicSimulationOutput | undefined;
|
|
20
|
-
|
|
21
|
-
constructor(privateExecutionResult: PrivateExecutionResult, publicInputs: PrivateKernelTailCircuitPublicInputs, publicOutput?: PublicSimulationOutput | undefined,
|
|
20
|
+
stats?: SimulationStats | undefined;
|
|
21
|
+
constructor(privateExecutionResult: PrivateExecutionResult, publicInputs: PrivateKernelTailCircuitPublicInputs, publicOutput?: PublicSimulationOutput | undefined, stats?: SimulationStats | undefined);
|
|
22
22
|
get gasUsed(): GasUsed;
|
|
23
23
|
static get schema(): ZodFor<TxSimulationResult>;
|
|
24
24
|
static from(fields: Omit<FieldsOf<TxSimulationResult>, 'gasUsed'>): TxSimulationResult;
|
|
25
|
-
static fromPrivateSimulationResultAndPublicOutput(privateSimulationResult: PrivateSimulationResult, publicOutput?: PublicSimulationOutput,
|
|
25
|
+
static fromPrivateSimulationResultAndPublicOutput(privateSimulationResult: PrivateSimulationResult, publicOutput?: PublicSimulationOutput, stats?: SimulationStats): TxSimulationResult;
|
|
26
26
|
static random(): Promise<TxSimulationResult>;
|
|
27
27
|
getPrivateReturnValues(): NestedProcessReturnValues;
|
|
28
28
|
toSimulatedTx(): Tx;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulated_tx.d.ts","sourceRoot":"","sources":["../../src/tx/simulated_tx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAY,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAKxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AAE9G,OAAO,EAEL,sBAAsB,EAEvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"simulated_tx.d.ts","sourceRoot":"","sources":["../../src/tx/simulated_tx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAY,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAKxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,oCAAoC,EAAE,MAAM,wDAAwD,CAAC;AAE9G,OAAO,EAEL,sBAAsB,EAEvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAClG,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,qBAAa,uBAAuB;IAEzB,sBAAsB,EAAE,sBAAsB;IAC9C,YAAY,EAAE,oCAAoC;gBADlD,sBAAsB,EAAE,sBAAsB,EAC9C,YAAY,EAAE,oCAAoC;IAG3D,sBAAsB;IAItB,aAAa,IAAI,EAAE;CAWpB;AAED,qBAAa,kBAAkB;IAEpB,sBAAsB,EAAE,sBAAsB;IAC9C,YAAY,EAAE,oCAAoC;IAClD,YAAY,CAAC,EAAE,sBAAsB;IACrC,KAAK,CAAC,EAAE,eAAe;gBAHvB,sBAAsB,EAAE,sBAAsB,EAC9C,YAAY,EAAE,oCAAoC,EAClD,YAAY,CAAC,EAAE,sBAAsB,YAAA,EACrC,KAAK,CAAC,EAAE,eAAe,YAAA;IAGhC,IAAI,OAAO,IAAI,OAAO,CASrB;IAED,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,kBAAkB,CAAC,CAS9C;IAED,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,CAAC;IASjE,MAAM,CAAC,0CAA0C,CAC/C,uBAAuB,EAAE,uBAAuB,EAChD,YAAY,CAAC,EAAE,sBAAsB,EACrC,KAAK,CAAC,EAAE,eAAe;WAUZ,MAAM;IAQnB,sBAAsB;IAItB,aAAa,IAAI,EAAE;IAInB,qBAAqB;CAGtB;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,eAAe,EAAE,sBAAsB,GAAG,yBAAyB,CAWhH"}
|
package/dest/tx/simulated_tx.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Gas } from '../gas/gas.js';
|
|
|
4
4
|
import { PrivateKernelTailCircuitPublicInputs } from '../kernel/private_kernel_tail_circuit_public_inputs.js';
|
|
5
5
|
import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
|
|
6
6
|
import { PrivateExecutionResult, collectSortedContractClassLogs } from './private_execution_result.js';
|
|
7
|
-
import {
|
|
7
|
+
import { SimulationStatsSchema } from './profiling.js';
|
|
8
8
|
import { NestedProcessReturnValues, PublicSimulationOutput } from './public_simulation_output.js';
|
|
9
9
|
import { Tx } from './tx.js';
|
|
10
10
|
export class PrivateSimulationResult {
|
|
@@ -27,12 +27,12 @@ export class TxSimulationResult {
|
|
|
27
27
|
privateExecutionResult;
|
|
28
28
|
publicInputs;
|
|
29
29
|
publicOutput;
|
|
30
|
-
|
|
31
|
-
constructor(privateExecutionResult, publicInputs, publicOutput,
|
|
30
|
+
stats;
|
|
31
|
+
constructor(privateExecutionResult, publicInputs, publicOutput, stats){
|
|
32
32
|
this.privateExecutionResult = privateExecutionResult;
|
|
33
33
|
this.publicInputs = publicInputs;
|
|
34
34
|
this.publicOutput = publicOutput;
|
|
35
|
-
this.
|
|
35
|
+
this.stats = stats;
|
|
36
36
|
}
|
|
37
37
|
get gasUsed() {
|
|
38
38
|
return this.publicOutput?.gasUsed ?? {
|
|
@@ -47,14 +47,14 @@ export class TxSimulationResult {
|
|
|
47
47
|
privateExecutionResult: PrivateExecutionResult.schema,
|
|
48
48
|
publicInputs: PrivateKernelTailCircuitPublicInputs.schema,
|
|
49
49
|
publicOutput: PublicSimulationOutput.schema.optional(),
|
|
50
|
-
|
|
50
|
+
stats: optional(SimulationStatsSchema)
|
|
51
51
|
}).transform(TxSimulationResult.from);
|
|
52
52
|
}
|
|
53
53
|
static from(fields) {
|
|
54
|
-
return new TxSimulationResult(fields.privateExecutionResult, fields.publicInputs, fields.publicOutput, fields.
|
|
54
|
+
return new TxSimulationResult(fields.privateExecutionResult, fields.publicInputs, fields.publicOutput, fields.stats);
|
|
55
55
|
}
|
|
56
|
-
static fromPrivateSimulationResultAndPublicOutput(privateSimulationResult, publicOutput,
|
|
57
|
-
return new TxSimulationResult(privateSimulationResult.privateExecutionResult, privateSimulationResult.publicInputs, publicOutput,
|
|
56
|
+
static fromPrivateSimulationResultAndPublicOutput(privateSimulationResult, publicOutput, stats) {
|
|
57
|
+
return new TxSimulationResult(privateSimulationResult.privateExecutionResult, privateSimulationResult.publicInputs, publicOutput, stats);
|
|
58
58
|
}
|
|
59
59
|
static async random() {
|
|
60
60
|
return new TxSimulationResult(await PrivateExecutionResult.random(), PrivateKernelTailCircuitPublicInputs.empty(), await PublicSimulationOutput.random());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "0.87.
|
|
3
|
+
"version": "0.87.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@aztec/bb.js": "0.87.
|
|
71
|
-
"@aztec/blob-lib": "0.87.
|
|
72
|
-
"@aztec/constants": "0.87.
|
|
73
|
-
"@aztec/ethereum": "0.87.
|
|
74
|
-
"@aztec/foundation": "0.87.
|
|
75
|
-
"@aztec/noir-noirc_abi": "0.87.
|
|
70
|
+
"@aztec/bb.js": "0.87.7",
|
|
71
|
+
"@aztec/blob-lib": "0.87.7",
|
|
72
|
+
"@aztec/constants": "0.87.7",
|
|
73
|
+
"@aztec/ethereum": "0.87.7",
|
|
74
|
+
"@aztec/foundation": "0.87.7",
|
|
75
|
+
"@aztec/noir-noirc_abi": "0.87.7",
|
|
76
76
|
"@google-cloud/storage": "^7.15.0",
|
|
77
77
|
"axios": "^1.9.0",
|
|
78
78
|
"json-stringify-deterministic": "1.0.12",
|
package/src/abi/decoder.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { isAztecAddressStruct, parseSignedInt } from './utils.js';
|
|
|
7
7
|
/**
|
|
8
8
|
* The type of our decoded ABI.
|
|
9
9
|
*/
|
|
10
|
-
export type AbiDecoded = bigint | boolean | AztecAddress | AbiDecoded[] | { [key: string]: AbiDecoded };
|
|
10
|
+
export type AbiDecoded = bigint | boolean | string | AztecAddress | AbiDecoded[] | { [key: string]: AbiDecoded };
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Decodes values using a provided ABI.
|
|
@@ -58,11 +58,12 @@ class AbiDecoder {
|
|
|
58
58
|
return struct;
|
|
59
59
|
}
|
|
60
60
|
case 'string': {
|
|
61
|
-
|
|
61
|
+
let str = '';
|
|
62
62
|
for (let i = 0; i < abiType.length; i += 1) {
|
|
63
|
-
|
|
63
|
+
const charCode = Number(this.getNextField().toBigInt());
|
|
64
|
+
str += String.fromCharCode(charCode);
|
|
64
65
|
}
|
|
65
|
-
return
|
|
66
|
+
return str;
|
|
66
67
|
}
|
|
67
68
|
case 'tuple': {
|
|
68
69
|
const array = [];
|
|
@@ -2,19 +2,18 @@ import { z } from 'zod';
|
|
|
2
2
|
|
|
3
3
|
import type { ApiSchemaFor } from '../schemas/index.js';
|
|
4
4
|
|
|
5
|
-
export
|
|
6
|
-
|
|
5
|
+
export const ProverAgentStatusSchema = z.discriminatedUnion('status', [
|
|
6
|
+
z.object({ status: z.literal('stopped') }),
|
|
7
|
+
z.object({ status: z.literal('running') }),
|
|
8
|
+
z.object({ status: z.literal('proving'), jobId: z.string(), proofType: z.number(), startedAtISO: z.string() }),
|
|
9
|
+
]);
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
export type ProverAgentStatus = z.infer<typeof ProverAgentStatusSchema>;
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
export interface ProverAgentApi {
|
|
14
|
+
getStatus(): Promise<unknown>;
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
export const ProverAgentApiSchema: ApiSchemaFor<ProverAgentApi> = {
|
|
14
|
-
|
|
15
|
-
isRunning: z.function().args().returns(z.boolean()),
|
|
16
|
-
getCurrentJobs: z
|
|
17
|
-
.function()
|
|
18
|
-
.args()
|
|
19
|
-
.returns(z.array(z.object({ id: z.string(), type: z.string() }))),
|
|
18
|
+
getStatus: z.function().args().returns(ProverAgentStatusSchema),
|
|
20
19
|
};
|
|
@@ -5,7 +5,7 @@ import type { AztecAddress } from '../aztec-address/index.js';
|
|
|
5
5
|
import type { TxHash } from '../tx/tx_hash.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Represents a pending tagged log as it is stored in the pending tagged log array to which the
|
|
8
|
+
* Represents a pending tagged log as it is stored in the pending tagged log array to which the fetchTaggedLogs oracle
|
|
9
9
|
* inserts found private logs. A TS version of `pending_tagged_log.nr`.
|
|
10
10
|
*/
|
|
11
11
|
export class PendingTaggedLog {
|