@aztec/end-to-end 0.87.4 → 0.87.6

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.
@@ -1,6 +1,6 @@
1
1
  import type { ContractFunctionInteraction, DeployMethod, DeployOptions, Logger, ProfileMethodOptions } from '@aztec/aztec.js';
2
2
  import { type PrivateExecutionStep } from '@aztec/stdlib/kernel';
3
- import type { ProvingTimings, SimulationTimings } from '@aztec/stdlib/tx';
3
+ import type { ProvingStats, ProvingTimings, SimulationStats, SimulationTimings } from '@aztec/stdlib/tx';
4
4
  import type { GithubActionBenchmarkResult } from '../utils.js';
5
5
  declare const logLevel: readonly ["silent", "fatal", "error", "warn", "info", "verbose", "debug", "trace"];
6
6
  type LogLevel = (typeof logLevel)[number];
@@ -28,7 +28,7 @@ export declare class ProxyLogger {
28
28
  getLogs(): Log[];
29
29
  }
30
30
  export type ProverType = 'wasm' | 'native';
31
- type OracleRecording = {
31
+ type CallRecording = {
32
32
  calls: number;
33
33
  max: number;
34
34
  min: number;
@@ -38,7 +38,7 @@ type OracleRecording = {
38
38
  type Step = Pick<PrivateExecutionStep, 'functionName' | 'gateCount'> & {
39
39
  time: number;
40
40
  accGateCount?: number;
41
- oracles: Record<string, OracleRecording>;
41
+ oracles: Record<string, CallRecording>;
42
42
  };
43
43
  type ClientFlowBenchmark = {
44
44
  name: string;
@@ -46,13 +46,14 @@ type ClientFlowBenchmark = {
46
46
  witgen: number;
47
47
  };
48
48
  maxMemory: number;
49
+ rpc: Record<string, CallRecording>;
49
50
  proverType: ProverType;
50
51
  minimumTrace: StructuredTrace;
51
52
  totalGateCount: number;
52
53
  steps: Step[];
53
54
  error: string | undefined;
54
55
  };
55
- export declare function generateBenchmark(flow: string, logs: Log[], timings: ProvingTimings | SimulationTimings, privateExecutionSteps: PrivateExecutionStep[], proverType: ProverType, error: string | undefined): ClientFlowBenchmark;
56
+ export declare function generateBenchmark(flow: string, logs: Log[], stats: ProvingStats | SimulationStats, privateExecutionSteps: PrivateExecutionStep[], proverType: ProverType, error: string | undefined): ClientFlowBenchmark;
56
57
  export declare function convertProfileToGHBenchmark(benchmark: ClientFlowBenchmark): GithubActionBenchmarkResult[];
57
58
  export declare function captureProfile(label: string, interaction: ContractFunctionInteraction | DeployMethod, opts?: Omit<ProfileMethodOptions & DeployOptions, 'profileMode'>, expectedSteps?: number): Promise<import("@aztec/aztec.js").TxProfileResult>;
58
59
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"benchmark.d.ts","sourceRoot":"","sources":["../../../src/bench/client_flows/benchmark.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,YAAY,EACZ,aAAa,EACb,MAAM,EACN,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,oBAAoB,EAAkC,MAAM,sBAAsB,CAAC;AACjG,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAM1E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAI/D,QAAA,MAAM,QAAQ,oFAAqF,CAAC;AACpG,KAAK,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1C,MAAM,MAAM,GAAG,GAAG;IAChB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AAEF,QAAA,MAAM,UAAU,gKAYN,CAAC;AAEX,KAAK,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C,KAAK,eAAe,GAAG;KACpB,CAAC,IAAI,QAAQ,GAAG,MAAM;CACxB,CAAC;AAEF,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAc;IACr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KAAK,EAAE,YAAY,GAAG,eAAe,EACrC,qBAAqB,EAAE,oBAAoB,EAAE,EAC7C,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,mBAAmB,CAsErB;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,mBAAmB,GAAG,2BAA2B,EAAE,CAmDzG;AAED,wBAAsB,cAAc,CAClC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,2BAA2B,GAAG,YAAY,EACvD,IAAI,CAAC,EAAE,IAAI,CAAC,oBAAoB,GAAG,aAAa,EAAE,aAAa,CAAC,EAChE,aAAa,CAAC,EAAE,MAAM,sDAoCvB"}
@@ -103,7 +103,7 @@ function getMaxMemory(logs) {
103
103
  });
104
104
  return Math.max(...usage);
105
105
  }
106
- export function generateBenchmark(flow, logs, timings, privateExecutionSteps, proverType, error) {
106
+ export function generateBenchmark(flow, logs, stats, privateExecutionSteps, proverType, error) {
107
107
  let maxMemory = 0;
108
108
  let minimumTrace;
109
109
  try {
@@ -136,6 +136,7 @@ export function generateBenchmark(flow, logs, timings, privateExecutionSteps, pr
136
136
  }
137
137
  ];
138
138
  }, []);
139
+ const timings = stats.timings;
139
140
  const totalGateCount = steps[steps.length - 1].accGateCount;
140
141
  return {
141
142
  name: flow,
@@ -146,6 +147,18 @@ export function generateBenchmark(flow, logs, timings, privateExecutionSteps, pr
146
147
  unaccounted: timings.unaccounted,
147
148
  witgen: timings.perFunction.reduce((acc, fn)=>acc + fn.time, 0)
148
149
  },
150
+ rpc: Object.entries(stats.nodeRPCCalls ?? {}).reduce((acc, [RPCName, RPCCalls])=>{
151
+ const total = RPCCalls.times.reduce((sum, time)=>sum + time, 0);
152
+ const calls = RPCCalls.times.length;
153
+ acc[RPCName] = {
154
+ calls,
155
+ max: Math.max(...RPCCalls.times),
156
+ min: Math.min(...RPCCalls.times),
157
+ total,
158
+ avg: total / calls
159
+ };
160
+ return acc;
161
+ }, {}),
149
162
  maxMemory,
150
163
  proverType,
151
164
  minimumTrace: minimumTrace,
@@ -155,6 +168,7 @@ export function generateBenchmark(flow, logs, timings, privateExecutionSteps, pr
155
168
  };
156
169
  }
157
170
  export function convertProfileToGHBenchmark(benchmark) {
171
+ const totalRPCCalls = Object.values(benchmark.rpc).reduce((acc, call)=>acc + call.calls, 0);
158
172
  const benches = [
159
173
  {
160
174
  name: `${benchmark.name}/witgen`,
@@ -180,6 +194,11 @@ export function convertProfileToGHBenchmark(benchmark) {
180
194
  name: `${benchmark.name}/total_gate_count`,
181
195
  value: benchmark.totalGateCount,
182
196
  unit: 'gates'
197
+ },
198
+ {
199
+ name: `${benchmark.name}/rpc`,
200
+ value: totalRPCCalls,
201
+ unit: 'calls'
183
202
  }
184
203
  ];
185
204
  if (benchmark.timings.proving) {
@@ -210,7 +229,7 @@ export async function captureProfile(label, interaction, opts, expectedSteps) {
210
229
  if (expectedSteps !== undefined && result.executionSteps.length !== expectedSteps) {
211
230
  throw new Error(`Expected ${expectedSteps} execution steps, got ${result.executionSteps.length}`);
212
231
  }
213
- const benchmark = generateBenchmark(label, logs, result.timings, result.executionSteps, 'wasm', undefined);
232
+ const benchmark = generateBenchmark(label, logs, result.stats, result.executionSteps, 'wasm', undefined);
214
233
  const ivcFolder = process.env.CAPTURE_IVC_FOLDER;
215
234
  if (ivcFolder) {
216
235
  logger.info(`Capturing client ivc execution profile for ${label}`);
@@ -8,10 +8,10 @@ import { readFile, readdir, writeFile } from 'node:fs/promises';
8
8
  import { join } from 'node:path';
9
9
  import { ProxyLogger, generateBenchmark } from './benchmark.js';
10
10
  async function createProver(config = {}, log) {
11
- const simulationProvider = new WASMSimulator();
11
+ const simulator = new WASMSimulator();
12
12
  if (!config.bbBinaryPath || !config.bbWorkingDirectory) {
13
13
  return {
14
- prover: new BBWASMBundlePrivateKernelProver(simulationProvider, 16, log),
14
+ prover: new BBWASMBundlePrivateKernelProver(simulator, 16, log),
15
15
  type: 'wasm'
16
16
  };
17
17
  } else {
@@ -20,7 +20,7 @@ async function createProver(config = {}, log) {
20
20
  prover: await BBNativePrivateKernelProver.new({
21
21
  bbSkipCleanup: false,
22
22
  ...bbConfig
23
- }, simulationProvider, log),
23
+ }, simulator, log),
24
24
  type: 'native'
25
25
  };
26
26
  }
@@ -63,7 +63,7 @@ async function main() {
63
63
  vk: stepsFromFile[i].vk,
64
64
  timings: {
65
65
  witgen: step.timings.witgen,
66
- gateCount: step.timings.witgen
66
+ gateCount: step.timings.gateCount
67
67
  }
68
68
  }));
69
69
  let error;
@@ -80,10 +80,10 @@ async function main() {
80
80
  // Extract logs from this run from the proxy and write them to disk unconditionally
81
81
  currentLogs = proxyLogger.getLogs();
82
82
  await writeFile(join(ivcFolder, flow, 'logs.json'), JSON.stringify(currentLogs, null, 2));
83
- if (!profile.timings.proving) {
84
- profile.timings.proving = provingTime;
83
+ if (!profile.stats.timings.proving) {
84
+ profile.stats.timings.proving = provingTime;
85
85
  }
86
- const benchmark = generateBenchmark(flow, currentLogs, profile.timings, privateExecutionSteps, proverType, error);
86
+ const benchmark = generateBenchmark(flow, currentLogs, profile.stats, privateExecutionSteps, proverType, error);
87
87
  await writeFile(join(ivcFolder, flow, 'benchmark.json'), JSON.stringify(benchmark, null, 2));
88
88
  proxyLogger.flushLogs();
89
89
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/fixtures/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EAKxB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,KAAK,eAAe,EAAsC,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,SAAS,EAEd,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,MAAM,EAMZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEvE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EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,EACpF,SAAS,EAAE,SAAS,EACpB,mBAAmB,GAAE,kBAAkB,EAAO,uBA6C/C;AAWD,wBAAsB,uBAAuB,CAC3C,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,KAAK,MAAM,EAAE,EACzB,aAAa,EAAE,GAAG,8BAUnB"}
@@ -20,8 +20,8 @@ import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
20
20
  import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree';
21
21
  import { protocolContractTreeRoot } from '@aztec/protocol-contracts';
22
22
  import { createProverNode } from '@aztec/prover-node';
23
- import { createPXEServiceWithSimulationProvider, getPXEServiceConfig } from '@aztec/pxe/server';
24
- import { MemoryCircuitRecorder, SimulationProviderRecorderWrapper, WASMSimulator } from '@aztec/simulator/client';
23
+ import { createPXEServiceWithSimulator, getPXEServiceConfig } from '@aztec/pxe/server';
24
+ import { MemoryCircuitRecorder, SimulatorRecorderWrapper, WASMSimulator } from '@aztec/simulator/client';
25
25
  import { FileCircuitRecorder } from '@aztec/simulator/testing';
26
26
  import { getContractClassFromArtifact, getContractInstanceFromDeployParams } from '@aztec/stdlib/contract';
27
27
  import { getConfigEnvVars as getTelemetryConfig, initTelemetryClient } from '@aztec/telemetry-client';
@@ -96,10 +96,10 @@ export const setupL1Contracts = async (l1RpcUrls, account, logger, args = {}, ch
96
96
  if (!configuredDataDirectory) {
97
97
  pxeServiceConfig.dataDirectory = path.join(tmpdir(), randomBytes(8).toString('hex'));
98
98
  }
99
- const simulationProvider = new WASMSimulator();
99
+ const simulator = new WASMSimulator();
100
100
  const recorder = process.env.CIRCUIT_RECORD_DIR ? new FileCircuitRecorder(process.env.CIRCUIT_RECORD_DIR) : new MemoryCircuitRecorder();
101
- const simulationProviderWithRecorder = new SimulationProviderRecorderWrapper(simulationProvider, recorder);
102
- const pxe = await createPXEServiceWithSimulationProvider(aztecNode, simulationProviderWithRecorder, pxeServiceConfig, {
101
+ const simulatorWithRecorder = new SimulatorRecorderWrapper(simulator, recorder);
102
+ const pxe = await createPXEServiceWithSimulator(aztecNode, simulatorWithRecorder, pxeServiceConfig, {
103
103
  useLogSuffix
104
104
  });
105
105
  const teardown = async ()=>{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/end-to-end",
3
- "version": "0.87.4",
3
+ "version": "0.87.6",
4
4
  "type": "module",
5
5
  "exports": "./dest/index.js",
6
6
  "inherits": [
@@ -25,39 +25,39 @@
25
25
  "formatting": "run -T prettier --check ./src && run -T eslint ./src"
26
26
  },
27
27
  "dependencies": {
28
- "@aztec/accounts": "0.87.4",
29
- "@aztec/archiver": "0.87.4",
30
- "@aztec/aztec": "0.87.4",
31
- "@aztec/aztec-node": "0.87.4",
32
- "@aztec/aztec.js": "0.87.4",
33
- "@aztec/bb-prover": "0.87.4",
34
- "@aztec/blob-lib": "0.87.4",
35
- "@aztec/blob-sink": "0.87.4",
36
- "@aztec/bot": "0.87.4",
37
- "@aztec/cli": "0.87.4",
38
- "@aztec/constants": "0.87.4",
39
- "@aztec/entrypoints": "0.87.4",
40
- "@aztec/epoch-cache": "0.87.4",
41
- "@aztec/ethereum": "0.87.4",
42
- "@aztec/foundation": "0.87.4",
43
- "@aztec/kv-store": "0.87.4",
44
- "@aztec/l1-artifacts": "0.87.4",
45
- "@aztec/merkle-tree": "0.87.4",
46
- "@aztec/noir-contracts.js": "0.87.4",
47
- "@aztec/noir-noirc_abi": "0.87.4",
48
- "@aztec/noir-protocol-circuits-types": "0.87.4",
49
- "@aztec/noir-test-contracts.js": "0.87.4",
50
- "@aztec/p2p": "0.87.4",
51
- "@aztec/protocol-contracts": "0.87.4",
52
- "@aztec/prover-client": "0.87.4",
53
- "@aztec/prover-node": "0.87.4",
54
- "@aztec/pxe": "0.87.4",
55
- "@aztec/sequencer-client": "0.87.4",
56
- "@aztec/simulator": "0.87.4",
57
- "@aztec/stdlib": "0.87.4",
58
- "@aztec/telemetry-client": "0.87.4",
59
- "@aztec/validator-client": "0.87.4",
60
- "@aztec/world-state": "0.87.4",
28
+ "@aztec/accounts": "0.87.6",
29
+ "@aztec/archiver": "0.87.6",
30
+ "@aztec/aztec": "0.87.6",
31
+ "@aztec/aztec-node": "0.87.6",
32
+ "@aztec/aztec.js": "0.87.6",
33
+ "@aztec/bb-prover": "0.87.6",
34
+ "@aztec/blob-lib": "0.87.6",
35
+ "@aztec/blob-sink": "0.87.6",
36
+ "@aztec/bot": "0.87.6",
37
+ "@aztec/cli": "0.87.6",
38
+ "@aztec/constants": "0.87.6",
39
+ "@aztec/entrypoints": "0.87.6",
40
+ "@aztec/epoch-cache": "0.87.6",
41
+ "@aztec/ethereum": "0.87.6",
42
+ "@aztec/foundation": "0.87.6",
43
+ "@aztec/kv-store": "0.87.6",
44
+ "@aztec/l1-artifacts": "0.87.6",
45
+ "@aztec/merkle-tree": "0.87.6",
46
+ "@aztec/noir-contracts.js": "0.87.6",
47
+ "@aztec/noir-noirc_abi": "0.87.6",
48
+ "@aztec/noir-protocol-circuits-types": "0.87.6",
49
+ "@aztec/noir-test-contracts.js": "0.87.6",
50
+ "@aztec/p2p": "0.87.6",
51
+ "@aztec/protocol-contracts": "0.87.6",
52
+ "@aztec/prover-client": "0.87.6",
53
+ "@aztec/prover-node": "0.87.6",
54
+ "@aztec/pxe": "0.87.6",
55
+ "@aztec/sequencer-client": "0.87.6",
56
+ "@aztec/simulator": "0.87.6",
57
+ "@aztec/stdlib": "0.87.6",
58
+ "@aztec/telemetry-client": "0.87.6",
59
+ "@aztec/validator-client": "0.87.6",
60
+ "@aztec/world-state": "0.87.6",
61
61
  "@iarna/toml": "^2.2.5",
62
62
  "@jest/globals": "^29.5.0",
63
63
  "@noble/curves": "^1.0.0",
@@ -7,7 +7,7 @@ import type {
7
7
  } from '@aztec/aztec.js';
8
8
  import { createLogger } from '@aztec/foundation/log';
9
9
  import { type PrivateExecutionStep, serializePrivateExecutionSteps } from '@aztec/stdlib/kernel';
10
- import type { ProvingTimings, SimulationTimings } from '@aztec/stdlib/tx';
10
+ import type { ProvingStats, ProvingTimings, SimulationStats, SimulationTimings } from '@aztec/stdlib/tx';
11
11
 
12
12
  import assert from 'node:assert';
13
13
  import { mkdir, writeFile } from 'node:fs/promises';
@@ -94,24 +94,30 @@ export class ProxyLogger {
94
94
 
95
95
  export type ProverType = 'wasm' | 'native';
96
96
 
97
- type OracleRecording = {
97
+ type CallRecording = {
98
+ // Number of times the function has been called
98
99
  calls: number;
100
+ // Maximum time taken by the function (in ms)
99
101
  max: number;
102
+ // Minimum time taken by the function (in ms)
100
103
  min: number;
104
+ // Average time taken by the function (in ms)
101
105
  avg: number;
106
+ // Total time spent in the function, computed as sum of all calls (in ms)
102
107
  total: number;
103
108
  };
104
109
 
105
110
  type Step = Pick<PrivateExecutionStep, 'functionName' | 'gateCount'> & {
106
111
  time: number;
107
112
  accGateCount?: number;
108
- oracles: Record<string, OracleRecording>;
113
+ oracles: Record<string, CallRecording>;
109
114
  };
110
115
 
111
116
  type ClientFlowBenchmark = {
112
117
  name: string;
113
118
  timings: Omit<ProvingTimings & SimulationTimings, 'perFunction'> & { witgen: number };
114
119
  maxMemory: number;
120
+ rpc: Record<string, CallRecording>;
115
121
  proverType: ProverType;
116
122
  minimumTrace: StructuredTrace;
117
123
  totalGateCount: number;
@@ -158,7 +164,7 @@ function getMaxMemory(logs: Log[]): number {
158
164
  export function generateBenchmark(
159
165
  flow: string,
160
166
  logs: Log[],
161
- timings: ProvingTimings | SimulationTimings,
167
+ stats: ProvingStats | SimulationStats,
162
168
  privateExecutionSteps: PrivateExecutionStep[],
163
169
  proverType: ProverType,
164
170
  error: string | undefined,
@@ -194,11 +200,12 @@ export function generateBenchmark(
194
200
  };
195
201
  return acc;
196
202
  },
197
- {} as Record<string, OracleRecording>,
203
+ {} as Record<string, CallRecording>,
198
204
  ),
199
205
  },
200
206
  ];
201
207
  }, []);
208
+ const timings = stats.timings;
202
209
  const totalGateCount = steps[steps.length - 1].accGateCount;
203
210
  return {
204
211
  name: flow,
@@ -209,6 +216,21 @@ export function generateBenchmark(
209
216
  unaccounted: timings.unaccounted,
210
217
  witgen: timings.perFunction.reduce((acc, fn) => acc + fn.time, 0),
211
218
  },
219
+ rpc: Object.entries(stats.nodeRPCCalls ?? {}).reduce(
220
+ (acc, [RPCName, RPCCalls]) => {
221
+ const total = RPCCalls.times.reduce((sum, time) => sum + time, 0);
222
+ const calls = RPCCalls.times.length;
223
+ acc[RPCName] = {
224
+ calls,
225
+ max: Math.max(...RPCCalls.times),
226
+ min: Math.min(...RPCCalls.times),
227
+ total,
228
+ avg: total / calls,
229
+ };
230
+ return acc;
231
+ },
232
+ {} as Record<string, CallRecording>,
233
+ ),
212
234
  maxMemory,
213
235
  proverType,
214
236
  minimumTrace: minimumTrace!,
@@ -219,6 +241,7 @@ export function generateBenchmark(
219
241
  }
220
242
 
221
243
  export function convertProfileToGHBenchmark(benchmark: ClientFlowBenchmark): GithubActionBenchmarkResult[] {
244
+ const totalRPCCalls = Object.values(benchmark.rpc).reduce((acc, call) => acc + call.calls, 0);
222
245
  const benches = [
223
246
  {
224
247
  name: `${benchmark.name}/witgen`,
@@ -247,6 +270,11 @@ export function convertProfileToGHBenchmark(benchmark: ClientFlowBenchmark): Git
247
270
  value: benchmark.totalGateCount,
248
271
  unit: 'gates',
249
272
  },
273
+ {
274
+ name: `${benchmark.name}/rpc`,
275
+ value: totalRPCCalls,
276
+ unit: 'calls',
277
+ },
250
278
  ];
251
279
  if (benchmark.timings.proving) {
252
280
  benches.push({
@@ -278,7 +306,7 @@ export async function captureProfile(
278
306
  if (expectedSteps !== undefined && result.executionSteps.length !== expectedSteps) {
279
307
  throw new Error(`Expected ${expectedSteps} execution steps, got ${result.executionSteps.length}`);
280
308
  }
281
- const benchmark = generateBenchmark(label, logs, result.timings, result.executionSteps, 'wasm', undefined);
309
+ const benchmark = generateBenchmark(label, logs, result.stats, result.executionSteps, 'wasm', undefined);
282
310
 
283
311
  const ivcFolder = process.env.CAPTURE_IVC_FOLDER;
284
312
  if (ivcFolder) {
@@ -5,7 +5,7 @@ import { createLogger, logger } from '@aztec/foundation/log';
5
5
  import { Timer } from '@aztec/foundation/timer';
6
6
  import { WASMSimulator } from '@aztec/simulator/client';
7
7
  import type { PrivateExecutionStep } from '@aztec/stdlib/kernel';
8
- import type { ProvingTimings, SimulationTimings } from '@aztec/stdlib/tx';
8
+ import type { ProvingStats, ProvingTimings, SimulationStats } from '@aztec/stdlib/tx';
9
9
 
10
10
  import { Decoder } from 'msgpackr';
11
11
  import { readFile, readdir, writeFile } from 'node:fs/promises';
@@ -16,13 +16,13 @@ import { type Log, type ProverType, ProxyLogger, generateBenchmark } from './ben
16
16
  type NativeProverConfig = { bbBinaryPath?: string; bbWorkingDirectory?: string };
17
17
 
18
18
  async function createProver(config: NativeProverConfig = {}, log: Logger) {
19
- const simulationProvider = new WASMSimulator();
19
+ const simulator = new WASMSimulator();
20
20
  if (!config.bbBinaryPath || !config.bbWorkingDirectory) {
21
- return { prover: new BBWASMBundlePrivateKernelProver(simulationProvider, 16, log), type: 'wasm' as ProverType };
21
+ return { prover: new BBWASMBundlePrivateKernelProver(simulator, 16, log), type: 'wasm' as ProverType };
22
22
  } else {
23
23
  const bbConfig = config as Required<NativeProverConfig>;
24
24
  return {
25
- prover: await BBNativePrivateKernelProver.new({ bbSkipCleanup: false, ...bbConfig }, simulationProvider, log),
25
+ prover: await BBNativePrivateKernelProver.new({ bbSkipCleanup: false, ...bbConfig }, simulator, log),
26
26
  type: 'native' as ProverType,
27
27
  };
28
28
  }
@@ -55,7 +55,7 @@ async function main() {
55
55
  });
56
56
  const profileFile = await readFile(join(ivcFolder, flow, 'profile.json'));
57
57
  const profile = JSON.parse(profileFile.toString()) as {
58
- timings: ProvingTimings | SimulationTimings;
58
+ stats: ProvingStats | SimulationStats;
59
59
  steps: {
60
60
  functionName: string;
61
61
  gateCount: number;
@@ -71,7 +71,7 @@ async function main() {
71
71
  vk: stepsFromFile[i].vk,
72
72
  timings: {
73
73
  witgen: step.timings.witgen,
74
- gateCount: step.timings.witgen,
74
+ gateCount: step.timings.gateCount,
75
75
  },
76
76
  }));
77
77
 
@@ -89,10 +89,10 @@ async function main() {
89
89
  // Extract logs from this run from the proxy and write them to disk unconditionally
90
90
  currentLogs = proxyLogger.getLogs();
91
91
  await writeFile(join(ivcFolder, flow, 'logs.json'), JSON.stringify(currentLogs, null, 2));
92
- if (!(profile.timings as ProvingTimings).proving) {
93
- (profile.timings as ProvingTimings).proving = provingTime;
92
+ if (!(profile.stats.timings as ProvingTimings).proving) {
93
+ (profile.stats.timings as ProvingTimings).proving = provingTime;
94
94
  }
95
- const benchmark = generateBenchmark(flow, currentLogs, profile.timings, privateExecutionSteps, proverType, error);
95
+ const benchmark = generateBenchmark(flow, currentLogs, profile.stats, privateExecutionSteps, proverType, error);
96
96
  await writeFile(join(ivcFolder, flow, 'benchmark.json'), JSON.stringify(benchmark, null, 2));
97
97
  proxyLogger.flushLogs();
98
98
  }
@@ -54,12 +54,12 @@ import { type ProverNode, type ProverNodeConfig, createProverNode } from '@aztec
54
54
  import {
55
55
  type PXEService,
56
56
  type PXEServiceConfig,
57
- createPXEServiceWithSimulationProvider,
57
+ createPXEServiceWithSimulator,
58
58
  getPXEServiceConfig,
59
59
  } from '@aztec/pxe/server';
60
60
  import type { SequencerClient } from '@aztec/sequencer-client';
61
61
  import type { TestSequencerClient } from '@aztec/sequencer-client/test';
62
- import { MemoryCircuitRecorder, SimulationProviderRecorderWrapper, WASMSimulator } from '@aztec/simulator/client';
62
+ import { MemoryCircuitRecorder, SimulatorRecorderWrapper, WASMSimulator } from '@aztec/simulator/client';
63
63
  import { FileCircuitRecorder } from '@aztec/simulator/testing';
64
64
  import { getContractClassFromArtifact, getContractInstanceFromDeployParams } from '@aztec/stdlib/contract';
65
65
  import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
@@ -170,17 +170,14 @@ export async function setupPXEService(
170
170
  pxeServiceConfig.dataDirectory = path.join(tmpdir(), randomBytes(8).toString('hex'));
171
171
  }
172
172
 
173
- const simulationProvider = new WASMSimulator();
173
+ const simulator = new WASMSimulator();
174
174
  const recorder = process.env.CIRCUIT_RECORD_DIR
175
175
  ? new FileCircuitRecorder(process.env.CIRCUIT_RECORD_DIR)
176
176
  : new MemoryCircuitRecorder();
177
- const simulationProviderWithRecorder = new SimulationProviderRecorderWrapper(simulationProvider, recorder);
178
- const pxe = await createPXEServiceWithSimulationProvider(
179
- aztecNode,
180
- simulationProviderWithRecorder,
181
- pxeServiceConfig,
182
- { useLogSuffix },
183
- );
177
+ const simulatorWithRecorder = new SimulatorRecorderWrapper(simulator, recorder);
178
+ const pxe = await createPXEServiceWithSimulator(aztecNode, simulatorWithRecorder, pxeServiceConfig, {
179
+ useLogSuffix,
180
+ });
184
181
 
185
182
  const teardown = async () => {
186
183
  if (!configuredDataDirectory) {