@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.
@@ -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
- timings;
28
- constructor(executionSteps, timings){
41
+ stats;
42
+ constructor(executionSteps, stats){
29
43
  this.executionSteps = executionSteps;
30
- this.timings = timings;
44
+ this.stats = stats;
31
45
  }
32
46
  static get schema() {
33
47
  return z.object({
34
48
  executionSteps: z.array(PrivateExecutionStepSchema),
35
- timings: ProvingTimingsSchema
36
- }).transform(({ executionSteps, timings })=>new TxProfileResult(executionSteps, timings));
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
- sync: 1,
57
- proving: 1,
58
- perFunction: [
59
- {
60
- functionName: 'random',
61
- time: 1
70
+ nodeRPCCalls: {
71
+ getBlockHeader: {
72
+ times: [
73
+ 1
74
+ ]
62
75
  }
63
- ],
64
- unaccounted: 1,
65
- total: 4
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
- timings;
72
- constructor(result, timings){
94
+ stats;
95
+ constructor(result, stats){
73
96
  this.result = result;
74
- this.timings = timings;
97
+ this.stats = stats;
75
98
  }
76
99
  static get schema() {
77
100
  return z.object({
78
101
  result: AbiDecodedSchema,
79
- timings: optional(SimulationTimingsSchema)
80
- }).transform(({ result, timings })=>new UtilitySimulationResult(result, timings));
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
- sync: 1,
85
- publicSimulation: 1,
86
- validation: 1,
87
- perFunction: [
88
- {
89
- functionName: 'random',
90
- time: 1
107
+ nodeRPCCalls: {
108
+ getBlockHeader: {
109
+ times: [
110
+ 1
111
+ ]
91
112
  }
92
- ],
93
- unaccounted: 1,
94
- total: 5
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
  }
@@ -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 ProvingTimings } from './profiling.js';
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
- timings?: ProvingTimings | undefined;
13
- constructor(privateExecutionResult: PrivateExecutionResult, publicInputs: PrivateKernelTailCircuitPublicInputs, clientIvcProof: ClientIvcProof, timings?: ProvingTimings | undefined);
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
- publicSimulation: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodNumber>;
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
- validation?: number | undefined;
44
- publicSimulation?: number | undefined;
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
- validation?: number | undefined;
54
- publicSimulation?: number | undefined;
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
- validation?: number | undefined;
69
- publicSimulation?: number | undefined;
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
- validation?: number | undefined;
83
- publicSimulation?: number | undefined;
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
- validation?: number | undefined;
98
- publicSimulation?: number | undefined;
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,cAAc,EAA2B,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,qBAAa,eAAe;IAEjB,sBAAsB,EAAE,sBAAsB;IAC9C,YAAY,EAAE,oCAAoC;IAClD,cAAc,EAAE,cAAc;IAC9B,OAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAShB;IAED,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC;WAIhC,MAAM;CAOpB"}
@@ -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 { SimulationTimingsSchema } from './profiling.js';
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
- timings;
13
- constructor(privateExecutionResult, publicInputs, clientIvcProof, timings){
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.timings = timings;
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(SimulationTimingsSchema)
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 SimulationTimings } from './profiling.js';
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
- timings?: SimulationTimings | undefined;
21
- constructor(privateExecutionResult: PrivateExecutionResult, publicInputs: PrivateKernelTailCircuitPublicInputs, publicOutput?: PublicSimulationOutput | undefined, timings?: SimulationTimings | 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, timings?: SimulationTimings): TxSimulationResult;
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,oCAAo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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"}
@@ -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 { SimulationTimingsSchema } from './profiling.js';
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
- timings;
31
- constructor(privateExecutionResult, publicInputs, publicOutput, timings){
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.timings = timings;
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
- timings: optional(SimulationTimingsSchema)
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.timings);
54
+ return new TxSimulationResult(fields.privateExecutionResult, fields.publicInputs, fields.publicOutput, fields.stats);
55
55
  }
56
- static fromPrivateSimulationResultAndPublicOutput(privateSimulationResult, publicOutput, timings) {
57
- return new TxSimulationResult(privateSimulationResult.privateExecutionResult, privateSimulationResult.publicInputs, publicOutput, timings);
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.5",
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.5",
71
- "@aztec/blob-lib": "0.87.5",
72
- "@aztec/constants": "0.87.5",
73
- "@aztec/ethereum": "0.87.5",
74
- "@aztec/foundation": "0.87.5",
75
- "@aztec/noir-noirc_abi": "0.87.5",
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",
@@ -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
- const array = [];
61
+ let str = '';
62
62
  for (let i = 0; i < abiType.length; i += 1) {
63
- array.push(this.getNextField().toBigInt());
63
+ const charCode = Number(this.getNextField().toBigInt());
64
+ str += String.fromCharCode(charCode);
64
65
  }
65
- return array;
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 interface ProverAgentApi {
6
- setMaxConcurrency(maxConcurrency: number): Promise<void>;
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
- isRunning(): Promise<boolean>;
11
+ export type ProverAgentStatus = z.infer<typeof ProverAgentStatusSchema>;
9
12
 
10
- getCurrentJobs(): Promise<{ id: string; type: string }[]>;
13
+ export interface ProverAgentApi {
14
+ getStatus(): Promise<unknown>;
11
15
  }
12
16
 
13
17
  export const ProverAgentApiSchema: ApiSchemaFor<ProverAgentApi> = {
14
- setMaxConcurrency: z.function().args(z.number().min(1).int()).returns(z.void()),
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
  };
@@ -34,6 +34,7 @@ export interface PrivateExecutionStep {
34
34
  timings: {
35
35
  witgen: number;
36
36
  gateCount?: number;
37
+ oracles?: Record<string, { times: number[] }>;
37
38
  };
38
39
  }
39
40
 
@@ -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 syncPrivateState oracle
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 {
@@ -255,5 +255,5 @@ export function collectNested<T>(
255
255
  }
256
256
 
257
257
  export class PrivateExecutionProfileResult {
258
- constructor(public timings: { witgen: number }) {}
258
+ constructor(public timings: { witgen: number; oracles?: Record<string, { times: number[] }> }) {}
259
259
  }