@aztec/bb-prover 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.
Files changed (28) hide show
  1. package/dest/bb/execute.d.ts.map +1 -1
  2. package/dest/bb/execute.js +15 -2
  3. package/dest/prover/client/bb_private_kernel_prover.d.ts +3 -3
  4. package/dest/prover/client/bb_private_kernel_prover.d.ts.map +1 -1
  5. package/dest/prover/client/bb_private_kernel_prover.js +5 -5
  6. package/dest/prover/client/native/bb_native_private_kernel_prover.d.ts +3 -3
  7. package/dest/prover/client/native/bb_native_private_kernel_prover.d.ts.map +1 -1
  8. package/dest/prover/client/native/bb_native_private_kernel_prover.js +5 -5
  9. package/dest/prover/client/wasm/bb_wasm_private_kernel_prover.d.ts +3 -3
  10. package/dest/prover/client/wasm/bb_wasm_private_kernel_prover.d.ts.map +1 -1
  11. package/dest/prover/client/wasm/bb_wasm_private_kernel_prover.js +3 -3
  12. package/dest/prover/client/wasm/bundle.d.ts +2 -2
  13. package/dest/prover/client/wasm/bundle.d.ts.map +1 -1
  14. package/dest/prover/client/wasm/bundle.js +2 -2
  15. package/dest/prover/client/wasm/lazy.d.ts +2 -2
  16. package/dest/prover/client/wasm/lazy.d.ts.map +1 -1
  17. package/dest/prover/client/wasm/lazy.js +2 -2
  18. package/dest/test/test_circuit_prover.d.ts +3 -3
  19. package/dest/test/test_circuit_prover.d.ts.map +1 -1
  20. package/dest/test/test_circuit_prover.js +5 -5
  21. package/package.json +18 -16
  22. package/src/bb/execute.ts +15 -2
  23. package/src/prover/client/bb_private_kernel_prover.ts +4 -8
  24. package/src/prover/client/native/bb_native_private_kernel_prover.ts +5 -5
  25. package/src/prover/client/wasm/bb_wasm_private_kernel_prover.ts +3 -3
  26. package/src/prover/client/wasm/bundle.ts +3 -3
  27. package/src/prover/client/wasm/lazy.ts +3 -3
  28. package/src/test/test_circuit_prover.ts +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"execute.d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AAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,sBAAsB,EACpC,mBAAmB,EAAE,MAAM,EAC3B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAmBhC;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,KAAK,GACT,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CA2BhC;AAkED,wBAAsB,kCAAkC,CACtD,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,KAAK,GACT,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CA8ChC;AAED;;;;;;;;GAQG;AACH,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,eAAe,GAAG,WAAW,EACrC,GAAG,EAAE,KAAK,GACT,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CA0DhC"}
@@ -3,6 +3,7 @@ import { Timer } from '@aztec/foundation/timer';
3
3
  import * as proc from 'child_process';
4
4
  import { promises as fs } from 'fs';
5
5
  import { basename, dirname, join } from 'path';
6
+ import pidusage from 'pidusage';
6
7
  export const VK_FILENAME = 'vk';
7
8
  export const VK_FIELDS_FILENAME = 'vk_fields.json';
8
9
  export const PUBLIC_INPUTS_FILENAME = 'public_inputs';
@@ -56,11 +57,23 @@ export var BB_RESULT = /*#__PURE__*/ function(BB_RESULT) {
56
57
  }
57
58
  bb.stdout.on('data', (data)=>{
58
59
  const message = data.toString('utf-8').replace(/\n$/, '');
59
- logger(message);
60
+ pidusage(bb.pid, (err, stats)=>{
61
+ if (err) {
62
+ logger(message);
63
+ } else {
64
+ logger(`${message} (mem: ${(stats.memory / 1024 / 1024).toFixed(2)}MiB)`);
65
+ }
66
+ });
60
67
  });
61
68
  bb.stderr.on('data', (data)=>{
62
69
  const message = data.toString('utf-8').replace(/\n$/, '');
63
- logger(message);
70
+ pidusage(bb.pid, (err, stats)=>{
71
+ if (err) {
72
+ logger(message);
73
+ } else {
74
+ logger(`${message} (mem: ${(stats.memory / 1024 / 1024).toFixed(2)}MiB)`);
75
+ }
76
+ });
64
77
  });
65
78
  bb.on('close', (exitCode, signal)=>{
66
79
  if (timeoutId) {
@@ -1,14 +1,14 @@
1
1
  import type { ArtifactProvider, ClientProtocolArtifact } from '@aztec/noir-protocol-circuits-types/types';
2
2
  import type { Abi, WitnessMap } from '@aztec/noir-types';
3
- import type { SimulationProvider } from '@aztec/simulator/client';
3
+ import type { CircuitSimulator } from '@aztec/simulator/client';
4
4
  import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
5
5
  import type { PrivateExecutionStep, PrivateKernelCircuitPublicInputs, PrivateKernelInitCircuitPrivateInputs, PrivateKernelInnerCircuitPrivateInputs, PrivateKernelResetCircuitPrivateInputs, PrivateKernelSimulateOutput, PrivateKernelTailCircuitPrivateInputs, PrivateKernelTailCircuitPublicInputs } from '@aztec/stdlib/kernel';
6
6
  import type { ClientIvcProof } from '@aztec/stdlib/proofs';
7
7
  export declare abstract class BBPrivateKernelProver implements PrivateKernelProver {
8
8
  protected artifactProvider: ArtifactProvider;
9
- protected simulationProvider: SimulationProvider;
9
+ protected simulator: CircuitSimulator;
10
10
  protected log: import("@aztec/foundation/log").Logger;
11
- constructor(artifactProvider: ArtifactProvider, simulationProvider: SimulationProvider, log?: import("@aztec/foundation/log").Logger);
11
+ constructor(artifactProvider: ArtifactProvider, simulator: CircuitSimulator, log?: import("@aztec/foundation/log").Logger);
12
12
  generateInitOutput(inputs: PrivateKernelInitCircuitPrivateInputs): Promise<PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>>;
13
13
  simulateInit(inputs: PrivateKernelInitCircuitPrivateInputs): Promise<PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>>;
14
14
  generateInnerOutput(inputs: PrivateKernelInnerCircuitPrivateInputs): Promise<PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>>;
@@ -1 +1 @@
1
- {"version":3,"file":"bb_private_kernel_prover.d.ts","sourceRoot":"","sources":["../../../src/prover/client/bb_private_kernel_prover.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAC1G,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,KAAK,EACV,oBAAoB,EACpB,gCAAgC,EAChC,qCAAqC,EACrC,sCAAsC,EACtC,sCAAsC,EACtC,2BAA2B,EAC3B,qCAAqC,EACrC,oCAAoC,EACrC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAK3D,8BAAsB,qBAAsB,YAAW,mBAAmB;IAEtE,SAAS,CAAC,gBAAgB,EAAE,gBAAgB;IAC5C,SAAS,CAAC,kBAAkB,EAAE,kBAAkB;IAChD,SAAS,CAAC,GAAG;gBAFH,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACtC,GAAG,yCAA4B;IAG9B,kBAAkB,CAC7B,MAAM,EAAE,qCAAqC,GAC5C,OAAO,CAAC,2BAA2B,CAAC,gCAAgC,CAAC,CAAC;IAS5D,YAAY,CACvB,MAAM,EAAE,qCAAqC,GAC5C,OAAO,CAAC,2BAA2B,CAAC,gCAAgC,CAAC,CAAC;IAS5D,mBAAmB,CA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,WAAW,EAAE,sBAAsB,EACnC,aAAa,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,KAAK,UAAU,EAClD,cAAc,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,GACnD,OAAO,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC;IA6B7B,6BAA6B,CACxC,gBAAgB,SAAS,oCAAoC,GAAG,gCAAgC,EAChG,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,sBAAsB;IAU9D,oBAAoB,CAAC,eAAe,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAItF,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAG5F"}
@@ -3,11 +3,11 @@ import { convertPrivateKernelInitInputsToWitnessMapWithAbi, convertPrivateKernel
3
3
  import { mapProtocolArtifactNameToCircuitName } from '../../stats.js';
4
4
  export class BBPrivateKernelProver {
5
5
  artifactProvider;
6
- simulationProvider;
6
+ simulator;
7
7
  log;
8
- constructor(artifactProvider, simulationProvider, log = createLogger('bb-prover')){
8
+ constructor(artifactProvider, simulator, log = createLogger('bb-prover')){
9
9
  this.artifactProvider = artifactProvider;
10
- this.simulationProvider = simulationProvider;
10
+ this.simulator = simulator;
11
11
  this.log = log;
12
12
  }
13
13
  async generateInitOutput(inputs) {
@@ -48,7 +48,7 @@ export class BBPrivateKernelProver {
48
48
  async simulateCircuitOutput(inputs, circuitType, convertInputs, convertOutputs) {
49
49
  const compiledCircuit = await this.artifactProvider.getSimulatedClientCircuitArtifactByName(circuitType);
50
50
  const witnessMap = convertInputs(inputs, compiledCircuit.abi);
51
- const outputWitness = await this.simulationProvider.executeProtocolCircuit(witnessMap, compiledCircuit, foreignCallHandler).catch((err)=>{
51
+ const outputWitness = await this.simulator.executeProtocolCircuit(witnessMap, compiledCircuit, foreignCallHandler).catch((err)=>{
52
52
  this.log.debug(`Failed to simulate ${circuitType}`, {
53
53
  circuitName: mapProtocolArtifactNameToCircuitName(circuitType),
54
54
  error: err
@@ -69,7 +69,7 @@ export class BBPrivateKernelProver {
69
69
  this.log.debug(`Generating witness for ${circuitType}`);
70
70
  const compiledCircuit = await this.artifactProvider.getClientCircuitArtifactByName(circuitType);
71
71
  const witnessMap = convertInputs(inputs, compiledCircuit.abi);
72
- const outputWitness = await this.simulationProvider.executeProtocolCircuit(witnessMap, compiledCircuit, foreignCallHandler);
72
+ const outputWitness = await this.simulator.executeProtocolCircuit(witnessMap, compiledCircuit, foreignCallHandler);
73
73
  const output = convertOutputs(outputWitness.witness, compiledCircuit.abi);
74
74
  this.log.debug(`Generated witness for ${circuitType}`, {
75
75
  eventName: 'circuit-witness-generation',
@@ -1,5 +1,5 @@
1
1
  import { type Logger } from '@aztec/foundation/log';
2
- import type { SimulationProvider } from '@aztec/simulator/server';
2
+ import type { CircuitSimulator } from '@aztec/simulator/server';
3
3
  import { type PrivateExecutionStep } from '@aztec/stdlib/kernel';
4
4
  import type { ClientIvcProof } from '@aztec/stdlib/proofs';
5
5
  import type { BBConfig } from '../../../config.js';
@@ -11,10 +11,10 @@ export declare class BBNativePrivateKernelProver extends BBPrivateKernelProver {
11
11
  private bbBinaryPath;
12
12
  private bbWorkingDirectory;
13
13
  private skipCleanup;
14
- protected simulationProvider: SimulationProvider;
14
+ protected simulator: CircuitSimulator;
15
15
  protected log: Logger;
16
16
  private constructor();
17
- static new(config: BBConfig, simulationProvider: SimulationProvider, log?: Logger): Promise<BBNativePrivateKernelProver>;
17
+ static new(config: BBConfig, simulator: CircuitSimulator, log?: Logger): Promise<BBNativePrivateKernelProver>;
18
18
  private _createClientIvcProof;
19
19
  createClientIvcProof(executionSteps: PrivateExecutionStep[]): Promise<ClientIvcProof>;
20
20
  computeGateCountForCircuit(bytecode: Buffer, circuitName: string): Promise<number>;
@@ -1 +1 @@
1
- {"version":3,"file":"bb_native_private_kernel_prover.d.ts","sourceRoot":"","sources":["../../../../src/prover/client/native/bb_native_private_kernel_prover.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,KAAK,oBAAoB,EAAkC,MAAM,sBAAsB,CAAC;AACjG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAM3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,qBAAqB;IAElE,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,kBAAkB;IAC1B,OAAO,CAAC,WAAW;cACA,kBAAkB,EAAE,kBAAkB;cACtC,GAAG;IALxB,OAAO;WAUa,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,GAAG,CAAC,EAAE,MAAM;YAWhF,qBAAqB;IAuBb,oBAAoB,CAAC,cAAc,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAQrF,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAoBxG,OAAO,CAAC,cAAc;CAavB"}
1
+ {"version":3,"file":"bb_native_private_kernel_prover.d.ts","sourceRoot":"","sources":["../../../../src/prover/client/native/bb_native_private_kernel_prover.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,KAAK,oBAAoB,EAAkC,MAAM,sBAAsB,CAAC;AACjG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAM3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,qBAAqB;IAElE,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,kBAAkB;IAC1B,OAAO,CAAC,WAAW;cACA,SAAS,EAAE,gBAAgB;cAC3B,GAAG;IALxB,OAAO;WAUa,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAG,CAAC,EAAE,MAAM;YAWrE,qBAAqB;IAuBb,oBAAoB,CAAC,cAAc,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAQrF,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAoBxG,OAAO,CAAC,cAAc;CAavB"}
@@ -13,16 +13,16 @@ import { BBPrivateKernelProver } from '../bb_private_kernel_prover.js';
13
13
  bbBinaryPath;
14
14
  bbWorkingDirectory;
15
15
  skipCleanup;
16
- simulationProvider;
16
+ simulator;
17
17
  log;
18
- constructor(bbBinaryPath, bbWorkingDirectory, skipCleanup, simulationProvider, log = createLogger('bb-prover:native')){
19
- super(new BundleArtifactProvider(), simulationProvider, log), this.bbBinaryPath = bbBinaryPath, this.bbWorkingDirectory = bbWorkingDirectory, this.skipCleanup = skipCleanup, this.simulationProvider = simulationProvider, this.log = log;
18
+ constructor(bbBinaryPath, bbWorkingDirectory, skipCleanup, simulator, log = createLogger('bb-prover:native')){
19
+ super(new BundleArtifactProvider(), simulator, log), this.bbBinaryPath = bbBinaryPath, this.bbWorkingDirectory = bbWorkingDirectory, this.skipCleanup = skipCleanup, this.simulator = simulator, this.log = log;
20
20
  }
21
- static async new(config, simulationProvider, log) {
21
+ static async new(config, simulator, log) {
22
22
  await fs.mkdir(config.bbWorkingDirectory, {
23
23
  recursive: true
24
24
  });
25
- return new BBNativePrivateKernelProver(config.bbBinaryPath, config.bbWorkingDirectory, !!config.bbSkipCleanup, simulationProvider, log);
25
+ return new BBNativePrivateKernelProver(config.bbBinaryPath, config.bbWorkingDirectory, !!config.bbSkipCleanup, simulator, log);
26
26
  }
27
27
  async _createClientIvcProof(directory, executionSteps) {
28
28
  const inputsPath = path.join(directory, 'ivc-inputs.msgpack');
@@ -1,14 +1,14 @@
1
1
  import type { ArtifactProvider } from '@aztec/noir-protocol-circuits-types/types';
2
- import type { SimulationProvider } from '@aztec/simulator/client';
2
+ import type { CircuitSimulator } from '@aztec/simulator/client';
3
3
  import type { PrivateExecutionStep } from '@aztec/stdlib/kernel';
4
4
  import { ClientIvcProof } from '@aztec/stdlib/proofs';
5
5
  import { BBPrivateKernelProver } from '../bb_private_kernel_prover.js';
6
6
  export declare abstract class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
7
7
  protected artifactProvider: ArtifactProvider;
8
- protected simulationProvider: SimulationProvider;
8
+ protected simulator: CircuitSimulator;
9
9
  private threads;
10
10
  protected log: import("@aztec/foundation/log").Logger;
11
- constructor(artifactProvider: ArtifactProvider, simulationProvider: SimulationProvider, threads?: number, log?: import("@aztec/foundation/log").Logger);
11
+ constructor(artifactProvider: ArtifactProvider, simulator: CircuitSimulator, threads?: number, log?: import("@aztec/foundation/log").Logger);
12
12
  createClientIvcProof(executionSteps: PrivateExecutionStep[]): Promise<ClientIvcProof>;
13
13
  computeGateCountForCircuit(_bytecode: Buffer, _circuitName: string): Promise<number>;
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"bb_wasm_private_kernel_prover.d.ts","sourceRoot":"","sources":["../../../../src/prover/client/wasm/bb_wasm_private_kernel_prover.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,8BAAsB,yBAA0B,SAAQ,qBAAqB;cAEtD,gBAAgB,EAAE,gBAAgB;cAClC,kBAAkB,EAAE,kBAAkB;IACzD,OAAO,CAAC,OAAO;cACI,GAAG;gBAHH,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACjD,OAAO,GAAE,MAAU,EACR,GAAG,yCAAiC;IAKnC,oBAAoB,CAAC,cAAc,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAuBrF,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAa3G"}
1
+ {"version":3,"file":"bb_wasm_private_kernel_prover.d.ts","sourceRoot":"","sources":["../../../../src/prover/client/wasm/bb_wasm_private_kernel_prover.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,8BAAsB,yBAA0B,SAAQ,qBAAqB;cAEtD,gBAAgB,EAAE,gBAAgB;cAClC,SAAS,EAAE,gBAAgB;IAC9C,OAAO,CAAC,OAAO;cACI,GAAG;gBAHH,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,gBAAgB,EACtC,OAAO,GAAE,MAAU,EACR,GAAG,yCAAiC;IAKnC,oBAAoB,CAAC,cAAc,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAuBrF,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAa3G"}
@@ -7,11 +7,11 @@ import { ungzip } from 'pako';
7
7
  import { BBPrivateKernelProver } from '../bb_private_kernel_prover.js';
8
8
  export class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
9
9
  artifactProvider;
10
- simulationProvider;
10
+ simulator;
11
11
  threads;
12
12
  log;
13
- constructor(artifactProvider, simulationProvider, threads = 1, log = createLogger('bb-prover:wasm')){
14
- super(artifactProvider, simulationProvider, log), this.artifactProvider = artifactProvider, this.simulationProvider = simulationProvider, this.threads = threads, this.log = log;
13
+ constructor(artifactProvider, simulator, threads = 1, log = createLogger('bb-prover:wasm')){
14
+ super(artifactProvider, simulator, log), this.artifactProvider = artifactProvider, this.simulator = simulator, this.threads = threads, this.log = log;
15
15
  }
16
16
  async createClientIvcProof(executionSteps) {
17
17
  const timer = new Timer();
@@ -1,6 +1,6 @@
1
- import type { SimulationProvider } from '@aztec/simulator/client';
1
+ import type { CircuitSimulator } from '@aztec/simulator/client';
2
2
  import { BBWASMPrivateKernelProver } from './bb_wasm_private_kernel_prover.js';
3
3
  export declare class BBWASMBundlePrivateKernelProver extends BBWASMPrivateKernelProver {
4
- constructor(simulationProvider: SimulationProvider, threads?: number, log?: import("@aztec/foundation/log").Logger);
4
+ constructor(simulator: CircuitSimulator, threads?: number, log?: import("@aztec/foundation/log").Logger);
5
5
  }
6
6
  //# sourceMappingURL=bundle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../../src/prover/client/wasm/bundle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAE/E,qBAAa,+BAAgC,SAAQ,yBAAyB;gBAChE,kBAAkB,EAAE,kBAAkB,EAAE,OAAO,SAAK,EAAE,GAAG,yCAAwC;CAG9G"}
1
+ {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../../../src/prover/client/wasm/bundle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAE/E,qBAAa,+BAAgC,SAAQ,yBAAyB;gBAChE,SAAS,EAAE,gBAAgB,EAAE,OAAO,SAAK,EAAE,GAAG,yCAAwC;CAGnG"}
@@ -2,7 +2,7 @@ import { createLogger } from '@aztec/foundation/log';
2
2
  import { BundleArtifactProvider } from '@aztec/noir-protocol-circuits-types/client/bundle';
3
3
  import { BBWASMPrivateKernelProver } from './bb_wasm_private_kernel_prover.js';
4
4
  export class BBWASMBundlePrivateKernelProver extends BBWASMPrivateKernelProver {
5
- constructor(simulationProvider, threads = 16, log = createLogger('bb-prover:wasm:bundle')){
6
- super(new BundleArtifactProvider(), simulationProvider, threads, log);
5
+ constructor(simulator, threads = 16, log = createLogger('bb-prover:wasm:bundle')){
6
+ super(new BundleArtifactProvider(), simulator, threads, log);
7
7
  }
8
8
  }
@@ -1,6 +1,6 @@
1
- import type { SimulationProvider } from '@aztec/simulator/client';
1
+ import type { CircuitSimulator } from '@aztec/simulator/client';
2
2
  import { BBWASMPrivateKernelProver } from './bb_wasm_private_kernel_prover.js';
3
3
  export declare class BBWASMLazyPrivateKernelProver extends BBWASMPrivateKernelProver {
4
- constructor(simulationProvider: SimulationProvider, threads?: number, log?: import("@aztec/foundation/log").Logger);
4
+ constructor(simulator: CircuitSimulator, threads?: number, log?: import("@aztec/foundation/log").Logger);
5
5
  }
6
6
  //# sourceMappingURL=lazy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../../src/prover/client/wasm/lazy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAE/E,qBAAa,6BAA8B,SAAQ,yBAAyB;gBAC9D,kBAAkB,EAAE,kBAAkB,EAAE,OAAO,SAAK,EAAE,GAAG,yCAAsC;CAG5G"}
1
+ {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../../src/prover/client/wasm/lazy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAE/E,qBAAa,6BAA8B,SAAQ,yBAAyB;gBAC9D,SAAS,EAAE,gBAAgB,EAAE,OAAO,SAAK,EAAE,GAAG,yCAAsC;CAGjG"}
@@ -2,7 +2,7 @@ import { createLogger } from '@aztec/foundation/log';
2
2
  import { LazyArtifactProvider } from '@aztec/noir-protocol-circuits-types/client/lazy';
3
3
  import { BBWASMPrivateKernelProver } from './bb_wasm_private_kernel_prover.js';
4
4
  export class BBWASMLazyPrivateKernelProver extends BBWASMPrivateKernelProver {
5
- constructor(simulationProvider, threads = 16, log = createLogger('bb-prover:wasm:lazy')){
6
- super(new LazyArtifactProvider(), simulationProvider, threads, log);
5
+ constructor(simulator, threads = 16, log = createLogger('bb-prover:wasm:lazy')){
6
+ super(new LazyArtifactProvider(), simulator, threads, log);
7
7
  }
8
8
  }
@@ -1,6 +1,6 @@
1
1
  import { AVM_PROOF_LENGTH_IN_FIELDS, NESTED_RECURSIVE_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, RECURSIVE_PROOF_LENGTH, TUBE_PROOF_LENGTH } from '@aztec/constants';
2
2
  import { type ServerProtocolArtifact } from '@aztec/noir-protocol-circuits-types/server';
3
- import { type SimulationProvider } from '@aztec/simulator/server';
3
+ import { type CircuitSimulator } from '@aztec/simulator/server';
4
4
  import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
5
5
  import { type ProofAndVerificationKey, type PublicInputsAndRecursiveProof, type ServerCircuitProver } from '@aztec/stdlib/interfaces/server';
6
6
  import type { BaseParityInputs, ParityPublicInputs, RootParityInputs } from '@aztec/stdlib/parity';
@@ -19,12 +19,12 @@ type TestDelay = {
19
19
  * Simulates circuits using the most efficient method and performs no proving.
20
20
  */
21
21
  export declare class TestCircuitProver implements ServerCircuitProver {
22
- private simulationProvider?;
22
+ private simulator?;
23
23
  private opts;
24
24
  private wasmSimulator;
25
25
  private instrumentation;
26
26
  private logger;
27
- constructor(simulationProvider?: SimulationProvider | undefined, opts?: TestDelay, telemetry?: TelemetryClient);
27
+ constructor(simulator?: CircuitSimulator | undefined, opts?: TestDelay, telemetry?: TelemetryClient);
28
28
  get tracer(): import("@aztec/telemetry-client").Tracer;
29
29
  /**
30
30
  * Simulates the base parity circuit from its inputs.
@@ -1 +1 @@
1
- {"version":3,"file":"test_circuit_prover.d.ts","sourceRoot":"","sources":["../../src/test/test_circuit_prover.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAE1B,6BAA6B,EAC7B,yCAAyC,EACzC,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EACL,KAAK,sBAAsB,EAuB5B,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EAAE,KAAK,kBAAkB,EAAsD,MAAM,yBAAyB,CAAC;AACtH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EAGzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAE,KAAK,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K,EAAE,sBAAsB,GAC5B,OAAO,CACR,6BAA6B,CAAC,iCAAiC,EAAE,OAAO,yCAAyC,CAAC,CACnH;IAYD;;;;OAIG;IAEI,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,6BAA6B,CAAC,sBAAsB,CAAC,CAAC;IAY3G,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,uBAAuB,CAAC,OAAO,0BAA0B,CAAC,CAAC;YAYpG,UAAU;IAejB,WAAW,CAAC,EAAE,EAAE,sBAAsB,EAAE,EAAE,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;YAI1D,QAAQ;CA8CvB"}
@@ -22,16 +22,16 @@ import { PROOF_DELAY_MS, WITGEN_DELAY_MS } from './delay_values.js';
22
22
  * A class for use in testing situations (e2e, unit test, etc) and temporarily for assembling a block in the sequencer.
23
23
  * Simulates circuits using the most efficient method and performs no proving.
24
24
  */ export class TestCircuitProver {
25
- simulationProvider;
25
+ simulator;
26
26
  opts;
27
27
  wasmSimulator;
28
28
  instrumentation;
29
29
  logger;
30
- constructor(simulationProvider, opts = {
30
+ constructor(simulator, opts = {
31
31
  proverTestDelayType: 'fixed',
32
32
  proverTestDelayMs: 0
33
33
  }, telemetry = getTelemetryClient()){
34
- this.simulationProvider = simulationProvider;
34
+ this.simulator = simulator;
35
35
  this.opts = opts;
36
36
  this.wasmSimulator = new WASMSimulatorWithBlobs();
37
37
  this.logger = createLogger('bb-prover:test-prover');
@@ -131,13 +131,13 @@ import { PROOF_DELAY_MS, WITGEN_DELAY_MS } from './delay_values.js';
131
131
  if ([
132
132
  'BlockRootRollupArtifact',
133
133
  'SingleTxBlockRootRollupArtifact'
134
- ].includes(artifactName) || this.simulationProvider == undefined) {
134
+ ].includes(artifactName) || this.simulator == undefined) {
135
135
  // TODO(#10323): Native ACVM simulator does not support foreign call handler so we use the wasm simulator
136
136
  // when simulating block root rollup and single tx block root rollup circuits or when the native ACVM simulator
137
137
  // is not provided.
138
138
  witness = (await this.wasmSimulator.executeProtocolCircuit(witnessMap, getSimulatedServerCircuitArtifact(artifactName), foreignCallHandler)).witness;
139
139
  } else {
140
- witness = (await this.simulationProvider.executeProtocolCircuit(witnessMap, getSimulatedServerCircuitArtifact(artifactName), undefined)).witness;
140
+ witness = (await this.simulator.executeProtocolCircuit(witnessMap, getSimulatedServerCircuitArtifact(artifactName), undefined)).witness;
141
141
  }
142
142
  const result = convertOutput(witness);
143
143
  this.instrumentation.recordDuration('simulationDuration', circuitName, timer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/bb-prover",
3
- "version": "0.87.5",
3
+ "version": "0.87.7",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -66,30 +66,32 @@
66
66
  ]
67
67
  },
68
68
  "dependencies": {
69
- "@aztec/bb.js": "0.87.5",
70
- "@aztec/constants": "0.87.5",
71
- "@aztec/foundation": "0.87.5",
72
- "@aztec/noir-noirc_abi": "0.87.5",
73
- "@aztec/noir-protocol-circuits-types": "0.87.5",
74
- "@aztec/noir-types": "0.87.5",
75
- "@aztec/simulator": "0.87.5",
76
- "@aztec/stdlib": "0.87.5",
77
- "@aztec/telemetry-client": "0.87.5",
78
- "@aztec/world-state": "0.87.5",
69
+ "@aztec/bb.js": "0.87.7",
70
+ "@aztec/constants": "0.87.7",
71
+ "@aztec/foundation": "0.87.7",
72
+ "@aztec/noir-noirc_abi": "0.87.7",
73
+ "@aztec/noir-protocol-circuits-types": "0.87.7",
74
+ "@aztec/noir-types": "0.87.7",
75
+ "@aztec/simulator": "0.87.7",
76
+ "@aztec/stdlib": "0.87.7",
77
+ "@aztec/telemetry-client": "0.87.7",
78
+ "@aztec/world-state": "0.87.7",
79
79
  "commander": "^12.1.0",
80
80
  "pako": "^2.1.0",
81
+ "pidusage": "^4.0.1",
81
82
  "source-map-support": "^0.5.21",
82
83
  "tslib": "^2.4.0"
83
84
  },
84
85
  "devDependencies": {
85
- "@aztec/ethereum": "0.87.5",
86
- "@aztec/kv-store": "0.87.5",
87
- "@aztec/noir-contracts.js": "0.87.5",
88
- "@aztec/noir-test-contracts.js": "0.87.5",
89
- "@aztec/protocol-contracts": "0.87.5",
86
+ "@aztec/ethereum": "0.87.7",
87
+ "@aztec/kv-store": "0.87.7",
88
+ "@aztec/noir-contracts.js": "0.87.7",
89
+ "@aztec/noir-test-contracts.js": "0.87.7",
90
+ "@aztec/protocol-contracts": "0.87.7",
90
91
  "@jest/globals": "^29.5.0",
91
92
  "@types/jest": "^29.5.0",
92
93
  "@types/node": "^22.15.17",
94
+ "@types/pidusage": "^2.0.5",
93
95
  "@types/source-map-support": "^0.5.10",
94
96
  "jest": "^29.5.0",
95
97
  "jest-mock-extended": "^3.0.3",
package/src/bb/execute.ts CHANGED
@@ -6,6 +6,7 @@ import type { AvmCircuitInputs, AvmCircuitPublicInputs } from '@aztec/stdlib/avm
6
6
  import * as proc from 'child_process';
7
7
  import { promises as fs } from 'fs';
8
8
  import { basename, dirname, join } from 'path';
9
+ import pidusage from 'pidusage';
9
10
 
10
11
  import type { UltraHonkFlavor } from '../honk.js';
11
12
 
@@ -97,11 +98,23 @@ export function executeBB(
97
98
 
98
99
  bb.stdout.on('data', data => {
99
100
  const message = data.toString('utf-8').replace(/\n$/, '');
100
- logger(message);
101
+ pidusage(bb.pid!, (err, stats) => {
102
+ if (err) {
103
+ logger(message);
104
+ } else {
105
+ logger(`${message} (mem: ${(stats.memory / 1024 / 1024).toFixed(2)}MiB)`);
106
+ }
107
+ });
101
108
  });
102
109
  bb.stderr.on('data', data => {
103
110
  const message = data.toString('utf-8').replace(/\n$/, '');
104
- logger(message);
111
+ pidusage(bb.pid!, (err, stats) => {
112
+ if (err) {
113
+ logger(message);
114
+ } else {
115
+ logger(`${message} (mem: ${(stats.memory / 1024 / 1024).toFixed(2)}MiB)`);
116
+ }
117
+ });
105
118
  });
106
119
  bb.on('close', (exitCode: number, signal?: string) => {
107
120
  if (timeoutId) {
@@ -16,7 +16,7 @@ import {
16
16
  } from '@aztec/noir-protocol-circuits-types/client';
17
17
  import type { ArtifactProvider, ClientProtocolArtifact } from '@aztec/noir-protocol-circuits-types/types';
18
18
  import type { Abi, WitnessMap } from '@aztec/noir-types';
19
- import type { SimulationProvider } from '@aztec/simulator/client';
19
+ import type { CircuitSimulator } from '@aztec/simulator/client';
20
20
  import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
21
21
  import type {
22
22
  PrivateExecutionStep,
@@ -37,7 +37,7 @@ import { mapProtocolArtifactNameToCircuitName } from '../../stats.js';
37
37
  export abstract class BBPrivateKernelProver implements PrivateKernelProver {
38
38
  constructor(
39
39
  protected artifactProvider: ArtifactProvider,
40
- protected simulationProvider: SimulationProvider,
40
+ protected simulator: CircuitSimulator,
41
41
  protected log = createLogger('bb-prover'),
42
42
  ) {}
43
43
 
@@ -164,7 +164,7 @@ export abstract class BBPrivateKernelProver implements PrivateKernelProver {
164
164
 
165
165
  const witnessMap = convertInputs(inputs, compiledCircuit.abi);
166
166
 
167
- const outputWitness = await this.simulationProvider
167
+ const outputWitness = await this.simulator
168
168
  .executeProtocolCircuit(witnessMap, compiledCircuit, foreignCallHandler)
169
169
  .catch((err: Error) => {
170
170
  this.log.debug(`Failed to simulate ${circuitType}`, {
@@ -200,11 +200,7 @@ export abstract class BBPrivateKernelProver implements PrivateKernelProver {
200
200
  await this.artifactProvider.getClientCircuitArtifactByName(circuitType);
201
201
 
202
202
  const witnessMap = convertInputs(inputs, compiledCircuit.abi);
203
- const outputWitness = await this.simulationProvider.executeProtocolCircuit(
204
- witnessMap,
205
- compiledCircuit,
206
- foreignCallHandler,
207
- );
203
+ const outputWitness = await this.simulator.executeProtocolCircuit(witnessMap, compiledCircuit, foreignCallHandler);
208
204
  const output = convertOutputs(outputWitness.witness, compiledCircuit.abi);
209
205
 
210
206
  this.log.debug(`Generated witness for ${circuitType}`, {
@@ -1,7 +1,7 @@
1
1
  import { runInDirectory } from '@aztec/foundation/fs';
2
2
  import { type Logger, createLogger } from '@aztec/foundation/log';
3
3
  import { BundleArtifactProvider } from '@aztec/noir-protocol-circuits-types/client/bundle';
4
- import type { SimulationProvider } from '@aztec/simulator/server';
4
+ import type { CircuitSimulator } from '@aztec/simulator/server';
5
5
  import { type PrivateExecutionStep, serializePrivateExecutionSteps } from '@aztec/stdlib/kernel';
6
6
  import type { ClientIvcProof } from '@aztec/stdlib/proofs';
7
7
 
@@ -21,19 +21,19 @@ export class BBNativePrivateKernelProver extends BBPrivateKernelProver {
21
21
  private bbBinaryPath: string,
22
22
  private bbWorkingDirectory: string,
23
23
  private skipCleanup: boolean,
24
- protected override simulationProvider: SimulationProvider,
24
+ protected override simulator: CircuitSimulator,
25
25
  protected override log = createLogger('bb-prover:native'),
26
26
  ) {
27
- super(new BundleArtifactProvider(), simulationProvider, log);
27
+ super(new BundleArtifactProvider(), simulator, log);
28
28
  }
29
29
 
30
- public static async new(config: BBConfig, simulationProvider: SimulationProvider, log?: Logger) {
30
+ public static async new(config: BBConfig, simulator: CircuitSimulator, log?: Logger) {
31
31
  await fs.mkdir(config.bbWorkingDirectory, { recursive: true });
32
32
  return new BBNativePrivateKernelProver(
33
33
  config.bbBinaryPath,
34
34
  config.bbWorkingDirectory,
35
35
  !!config.bbSkipCleanup,
36
- simulationProvider,
36
+ simulator,
37
37
  log,
38
38
  );
39
39
  }
@@ -3,7 +3,7 @@ import { createLogger } from '@aztec/foundation/log';
3
3
  import { Timer } from '@aztec/foundation/timer';
4
4
  import { serializeWitness } from '@aztec/noir-noirc_abi';
5
5
  import type { ArtifactProvider } from '@aztec/noir-protocol-circuits-types/types';
6
- import type { SimulationProvider } from '@aztec/simulator/client';
6
+ import type { CircuitSimulator } from '@aztec/simulator/client';
7
7
  import type { PrivateExecutionStep } from '@aztec/stdlib/kernel';
8
8
  import { ClientIvcProof } from '@aztec/stdlib/proofs';
9
9
 
@@ -14,11 +14,11 @@ import { BBPrivateKernelProver } from '../bb_private_kernel_prover.js';
14
14
  export abstract class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
15
15
  constructor(
16
16
  protected override artifactProvider: ArtifactProvider,
17
- protected override simulationProvider: SimulationProvider,
17
+ protected override simulator: CircuitSimulator,
18
18
  private threads: number = 1,
19
19
  protected override log = createLogger('bb-prover:wasm'),
20
20
  ) {
21
- super(artifactProvider, simulationProvider, log);
21
+ super(artifactProvider, simulator, log);
22
22
  }
23
23
 
24
24
  public override async createClientIvcProof(executionSteps: PrivateExecutionStep[]): Promise<ClientIvcProof> {
@@ -1,11 +1,11 @@
1
1
  import { createLogger } from '@aztec/foundation/log';
2
2
  import { BundleArtifactProvider } from '@aztec/noir-protocol-circuits-types/client/bundle';
3
- import type { SimulationProvider } from '@aztec/simulator/client';
3
+ import type { CircuitSimulator } from '@aztec/simulator/client';
4
4
 
5
5
  import { BBWASMPrivateKernelProver } from './bb_wasm_private_kernel_prover.js';
6
6
 
7
7
  export class BBWASMBundlePrivateKernelProver extends BBWASMPrivateKernelProver {
8
- constructor(simulationProvider: SimulationProvider, threads = 16, log = createLogger('bb-prover:wasm:bundle')) {
9
- super(new BundleArtifactProvider(), simulationProvider, threads, log);
8
+ constructor(simulator: CircuitSimulator, threads = 16, log = createLogger('bb-prover:wasm:bundle')) {
9
+ super(new BundleArtifactProvider(), simulator, threads, log);
10
10
  }
11
11
  }
@@ -1,11 +1,11 @@
1
1
  import { createLogger } from '@aztec/foundation/log';
2
2
  import { LazyArtifactProvider } from '@aztec/noir-protocol-circuits-types/client/lazy';
3
- import type { SimulationProvider } from '@aztec/simulator/client';
3
+ import type { CircuitSimulator } from '@aztec/simulator/client';
4
4
 
5
5
  import { BBWASMPrivateKernelProver } from './bb_wasm_private_kernel_prover.js';
6
6
 
7
7
  export class BBWASMLazyPrivateKernelProver extends BBWASMPrivateKernelProver {
8
- constructor(simulationProvider: SimulationProvider, threads = 16, log = createLogger('bb-prover:wasm:lazy')) {
9
- super(new LazyArtifactProvider(), simulationProvider, threads, log);
8
+ constructor(simulator: CircuitSimulator, threads = 16, log = createLogger('bb-prover:wasm:lazy')) {
9
+ super(new LazyArtifactProvider(), simulator, threads, log);
10
10
  }
11
11
  }
@@ -36,7 +36,7 @@ import {
36
36
  } from '@aztec/noir-protocol-circuits-types/server';
37
37
  import { ProtocolCircuitVks } from '@aztec/noir-protocol-circuits-types/server/vks';
38
38
  import type { WitnessMap } from '@aztec/noir-types';
39
- import { type SimulationProvider, WASMSimulatorWithBlobs, emitCircuitSimulationStats } from '@aztec/simulator/server';
39
+ import { type CircuitSimulator, WASMSimulatorWithBlobs, emitCircuitSimulationStats } from '@aztec/simulator/server';
40
40
  import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
41
41
  import {
42
42
  type ProofAndVerificationKey,
@@ -88,7 +88,7 @@ export class TestCircuitProver implements ServerCircuitProver {
88
88
  private logger = createLogger('bb-prover:test-prover');
89
89
 
90
90
  constructor(
91
- private simulationProvider?: SimulationProvider,
91
+ private simulator?: CircuitSimulator,
92
92
  private opts: TestDelay = { proverTestDelayType: 'fixed', proverTestDelayMs: 0 },
93
93
  telemetry: TelemetryClient = getTelemetryClient(),
94
94
  ) {
@@ -351,7 +351,7 @@ export class TestCircuitProver implements ServerCircuitProver {
351
351
  let witness: WitnessMap;
352
352
  if (
353
353
  ['BlockRootRollupArtifact', 'SingleTxBlockRootRollupArtifact'].includes(artifactName) ||
354
- this.simulationProvider == undefined
354
+ this.simulator == undefined
355
355
  ) {
356
356
  // TODO(#10323): Native ACVM simulator does not support foreign call handler so we use the wasm simulator
357
357
  // when simulating block root rollup and single tx block root rollup circuits or when the native ACVM simulator
@@ -365,7 +365,7 @@ export class TestCircuitProver implements ServerCircuitProver {
365
365
  ).witness;
366
366
  } else {
367
367
  witness = (
368
- await this.simulationProvider.executeProtocolCircuit(
368
+ await this.simulator.executeProtocolCircuit(
369
369
  witnessMap,
370
370
  getSimulatedServerCircuitArtifact(artifactName),
371
371
  undefined, // Native ACM simulator does not support foreign call handler