@aztec/bb-prover 0.0.1-commit.72dcdcda8 → 0.0.1-commit.7689c7f

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 (58) hide show
  1. package/dest/avm_proving_tests/avm_proving_tester.d.ts +13 -8
  2. package/dest/avm_proving_tests/avm_proving_tester.d.ts.map +1 -1
  3. package/dest/avm_proving_tests/avm_proving_tester.js +152 -110
  4. package/dest/bb/bb_js_backend.d.ts +196 -0
  5. package/dest/bb/bb_js_backend.d.ts.map +1 -0
  6. package/dest/bb/bb_js_backend.js +379 -0
  7. package/dest/bb/bb_js_debug.d.ts +52 -0
  8. package/dest/bb/bb_js_debug.d.ts.map +1 -0
  9. package/dest/bb/bb_js_debug.js +176 -0
  10. package/dest/bb/file_names.d.ts +4 -0
  11. package/dest/bb/file_names.d.ts.map +1 -0
  12. package/dest/bb/file_names.js +5 -0
  13. package/dest/config.d.ts +17 -1
  14. package/dest/config.d.ts.map +1 -1
  15. package/dest/index.d.ts +3 -2
  16. package/dest/index.d.ts.map +1 -1
  17. package/dest/index.js +2 -1
  18. package/dest/prover/client/bb_private_kernel_prover.d.ts +10 -2
  19. package/dest/prover/client/bb_private_kernel_prover.d.ts.map +1 -1
  20. package/dest/prover/client/bb_private_kernel_prover.js +38 -4
  21. package/dest/prover/proof_utils.d.ts +11 -1
  22. package/dest/prover/proof_utils.d.ts.map +1 -1
  23. package/dest/prover/proof_utils.js +24 -1
  24. package/dest/prover/server/bb_prover.d.ts +4 -5
  25. package/dest/prover/server/bb_prover.d.ts.map +1 -1
  26. package/dest/prover/server/bb_prover.js +207 -78
  27. package/dest/verification_key/verification_key_data.js +1 -1
  28. package/dest/verifier/batch_chonk_verifier.d.ts +45 -0
  29. package/dest/verifier/batch_chonk_verifier.d.ts.map +1 -0
  30. package/dest/verifier/batch_chonk_verifier.js +232 -0
  31. package/dest/verifier/bb_verifier.d.ts +4 -1
  32. package/dest/verifier/bb_verifier.d.ts.map +1 -1
  33. package/dest/verifier/bb_verifier.js +134 -45
  34. package/dest/verifier/index.d.ts +2 -1
  35. package/dest/verifier/index.d.ts.map +1 -1
  36. package/dest/verifier/index.js +1 -0
  37. package/dest/verifier/queued_chonk_verifier.d.ts +2 -3
  38. package/dest/verifier/queued_chonk_verifier.d.ts.map +1 -1
  39. package/dest/verifier/queued_chonk_verifier.js +6 -5
  40. package/package.json +19 -17
  41. package/src/avm_proving_tests/avm_proving_tester.ts +53 -126
  42. package/src/bb/bb_js_backend.ts +435 -0
  43. package/src/bb/bb_js_debug.ts +227 -0
  44. package/src/bb/file_names.ts +6 -0
  45. package/src/config.ts +16 -0
  46. package/src/index.ts +2 -1
  47. package/src/prover/client/bb_private_kernel_prover.ts +115 -3
  48. package/src/prover/proof_utils.ts +41 -1
  49. package/src/prover/server/bb_prover.ts +132 -137
  50. package/src/verification_key/verification_key_data.ts +1 -1
  51. package/src/verifier/batch_chonk_verifier.ts +276 -0
  52. package/src/verifier/bb_verifier.ts +66 -76
  53. package/src/verifier/index.ts +1 -0
  54. package/src/verifier/queued_chonk_verifier.ts +6 -7
  55. package/dest/bb/execute.d.ts +0 -108
  56. package/dest/bb/execute.d.ts.map +0 -1
  57. package/dest/bb/execute.js +0 -652
  58. package/src/bb/execute.ts +0 -687
@@ -0,0 +1,232 @@
1
+ import { BackendType, Barretenberg } from '@aztec/bb.js';
2
+ import { FifoFrameReader } from '@aztec/foundation/fifo';
3
+ import { createLogger } from '@aztec/foundation/log';
4
+ import { SerialQueue } from '@aztec/foundation/queue';
5
+ import { Timer } from '@aztec/foundation/timer';
6
+ import { ProtocolCircuitVks } from '@aztec/noir-protocol-circuits-types/server/vks';
7
+ import { Unpackr } from 'msgpackr';
8
+ import { execFile } from 'node:child_process';
9
+ import { unlinkSync } from 'node:fs';
10
+ import { unlink } from 'node:fs/promises';
11
+ import * as os from 'node:os';
12
+ import * as path from 'node:path';
13
+ import { promisify } from 'node:util';
14
+ const execFileAsync = promisify(execFile);
15
+ /** Maps client protocol artifacts used for chonk verification to VK indices. */ const CHONK_VK_ARTIFACTS = [
16
+ 'HidingKernelToRollup',
17
+ 'HidingKernelToPublic'
18
+ ];
19
+ /**
20
+ * Batch verifier for Chonk IVC proofs. Uses the bb batch verifier service
21
+ * which batches IPA verification into a single SRS MSM for better throughput.
22
+ *
23
+ * Architecture:
24
+ * - Spawns a persistent `bb msgpack run` process via Barretenberg (native backend)
25
+ * - Sends proofs via the msgpack RPC protocol (ChonkBatchVerifierQueue)
26
+ * - Receives results via a named FIFO pipe (async, out-of-order)
27
+ * - Bisects batch failures to isolate individual bad proofs
28
+ */ export class BatchChonkVerifier {
29
+ config;
30
+ vkBuffers;
31
+ batchSize;
32
+ label;
33
+ bb;
34
+ fifoPath;
35
+ nextRequestId;
36
+ pendingRequests;
37
+ sendQueue;
38
+ fifoReader;
39
+ logger;
40
+ /** Maps artifact name to VK index in the batch verifier. */ vkIndexMap;
41
+ /** Bound cleanup handler for process exit signals. */ exitCleanup;
42
+ constructor(config, vkBuffers, batchSize, label){
43
+ this.config = config;
44
+ this.vkBuffers = vkBuffers;
45
+ this.batchSize = batchSize;
46
+ this.label = label;
47
+ this.nextRequestId = 0;
48
+ this.pendingRequests = new Map();
49
+ this.logger = createLogger('bb-prover:batch_chonk_verifier');
50
+ this.vkIndexMap = new Map();
51
+ this.exitCleanup = null;
52
+ this.fifoPath = path.join(os.tmpdir(), `bb-batch-${label}-${process.pid}-${Date.now()}.fifo`);
53
+ this.fifoReader = new FifoFrameReader();
54
+ this.sendQueue = new SerialQueue();
55
+ this.sendQueue.start(1);
56
+ }
57
+ /** Create and start a BatchChonkVerifier using the protocol circuit VKs. */ static async new(config, batchSize, label) {
58
+ const vkBuffers = [];
59
+ const vkIndexMap = new Map();
60
+ for (const artifact of CHONK_VK_ARTIFACTS){
61
+ const vk = ProtocolCircuitVks[artifact];
62
+ if (!vk) {
63
+ throw new Error(`Missing VK for ${artifact}`);
64
+ }
65
+ vkIndexMap.set(artifact, vkBuffers.length);
66
+ vkBuffers.push(vk.keyAsBytes);
67
+ }
68
+ const verifier = new BatchChonkVerifier(config, vkBuffers, batchSize, label);
69
+ verifier.vkIndexMap = vkIndexMap;
70
+ await verifier.start();
71
+ return verifier;
72
+ }
73
+ /** Create and start a BatchChonkVerifier with custom VKs (for testing). */ static async newForTesting(config, vks, batchSize) {
74
+ const verifier = new BatchChonkVerifier(config, vks, batchSize, 'test');
75
+ for(let i = 0; i < vks.length; i++){
76
+ verifier.vkIndexMap.set(String(i), i);
77
+ }
78
+ await verifier.start();
79
+ return verifier;
80
+ }
81
+ async start() {
82
+ this.logger.info('Starting BatchChonkVerifier');
83
+ this.bb = await Barretenberg.new({
84
+ bbPath: this.config.bbBinaryPath,
85
+ backend: BackendType.NativeUnixSocket
86
+ });
87
+ await this.bb.initSRSChonk();
88
+ await execFileAsync('mkfifo', [
89
+ this.fifoPath
90
+ ]);
91
+ this.registerExitCleanup();
92
+ await this.bb.chonkBatchVerifierStart({
93
+ vks: this.vkBuffers,
94
+ numCores: this.config.bbChonkVerifyConcurrency || 0,
95
+ batchSize: this.batchSize,
96
+ fifoPath: this.fifoPath
97
+ });
98
+ this.startFifoReader();
99
+ this.logger.info('BatchChonkVerifier started', {
100
+ fifoPath: this.fifoPath
101
+ });
102
+ }
103
+ verifyProof(tx) {
104
+ const circuit = tx.data.forPublic ? 'HidingKernelToPublic' : 'HidingKernelToRollup';
105
+ const vkIndex = this.vkIndexMap.get(circuit);
106
+ if (vkIndex === undefined) {
107
+ throw new Error(`No VK index for circuit ${circuit}`);
108
+ }
109
+ const proofWithPubInputs = tx.chonkProof.attachPublicInputs(tx.data.publicInputs().toFields());
110
+ const proofFields = proofWithPubInputs.fieldsWithPublicInputs.map((f)=>f.toBuffer());
111
+ return this.enqueueProof(vkIndex, proofFields);
112
+ }
113
+ /** Enqueue raw proof fields for verification. Used directly by tests with custom VKs. */ enqueueProof(vkIndex, proofFields) {
114
+ const totalTimer = new Timer();
115
+ const requestId = this.nextRequestId++;
116
+ const resultPromise = new Promise((resolve, reject)=>{
117
+ this.pendingRequests.set(requestId, {
118
+ resolve,
119
+ reject,
120
+ totalTimer
121
+ });
122
+ });
123
+ void this.sendQueue.put(async ()=>{
124
+ await this.bb.chonkBatchVerifierQueue({
125
+ requestId,
126
+ vkIndex,
127
+ proofFields
128
+ });
129
+ }).catch((err)=>{
130
+ const pending = this.pendingRequests.get(requestId);
131
+ if (pending) {
132
+ this.pendingRequests.delete(requestId);
133
+ pending.reject(err instanceof Error ? err : new Error(String(err)));
134
+ }
135
+ });
136
+ return resultPromise;
137
+ }
138
+ async stop() {
139
+ this.logger.info('Stopping BatchChonkVerifier');
140
+ // Stop accepting new proofs
141
+ await this.sendQueue.end();
142
+ // Stop the bb service (flushes remaining proofs)
143
+ try {
144
+ await this.bb.chonkBatchVerifierStop({});
145
+ } catch (err) {
146
+ this.logger.warn(`Error stopping batch verifier service: ${err}`);
147
+ }
148
+ // Stop FIFO reader
149
+ this.fifoReader.stop();
150
+ // Clean up FIFO file and deregister exit handler
151
+ await unlink(this.fifoPath).catch(()=>{});
152
+ this.deregisterExitCleanup();
153
+ // Reject any remaining pending requests
154
+ for (const [id, pending] of this.pendingRequests){
155
+ pending.reject(new Error('BatchChonkVerifier stopped'));
156
+ this.pendingRequests.delete(id);
157
+ }
158
+ // Destroy bb process
159
+ await this.bb.destroy();
160
+ this.logger.info('BatchChonkVerifier stopped');
161
+ }
162
+ startFifoReader() {
163
+ const unpackr = new Unpackr({
164
+ useRecords: false
165
+ });
166
+ this.fifoReader.on('frame', (payload)=>{
167
+ try {
168
+ const result = unpackr.unpack(payload);
169
+ this.handleResult(result);
170
+ } catch (err) {
171
+ this.logger.error(`FIFO: failed to decode msgpack result: ${err}`);
172
+ }
173
+ });
174
+ this.fifoReader.on('error', (err)=>{
175
+ this.logger.error(`FIFO reader error: ${err}`);
176
+ });
177
+ this.fifoReader.on('end', ()=>{
178
+ this.logger.debug('FIFO reader: stream ended');
179
+ for (const [id, pending] of this.pendingRequests){
180
+ pending.reject(new Error('FIFO stream ended unexpectedly'));
181
+ this.pendingRequests.delete(id);
182
+ }
183
+ });
184
+ this.fifoReader.start(this.fifoPath);
185
+ }
186
+ handleResult(result) {
187
+ const pending = this.pendingRequests.get(result.request_id);
188
+ if (!pending) {
189
+ this.logger.warn(`Received result for unknown request_id=${result.request_id}`);
190
+ return;
191
+ }
192
+ this.pendingRequests.delete(result.request_id);
193
+ const valid = result.status === 0; // VerifyStatus::OK
194
+ const durationMs = result.time_in_verify_ms;
195
+ const totalDurationMs = pending.totalTimer.ms();
196
+ const ivcResult = {
197
+ valid,
198
+ durationMs,
199
+ totalDurationMs
200
+ };
201
+ if (!valid) {
202
+ this.logger.warn(`Proof verification failed for request_id=${result.request_id}: ${result.error_message}`);
203
+ } else {
204
+ this.logger.debug(`Proof verified`, {
205
+ requestId: result.request_id,
206
+ durationMs: Math.ceil(durationMs),
207
+ totalDurationMs: Math.ceil(totalDurationMs)
208
+ });
209
+ }
210
+ pending.resolve(ivcResult);
211
+ }
212
+ registerExitCleanup() {
213
+ // Signal handlers must be synchronous — unlinkSync is intentional here
214
+ this.exitCleanup = ()=>{
215
+ try {
216
+ unlinkSync(this.fifoPath);
217
+ } catch {
218
+ /* ignore */ }
219
+ };
220
+ process.on('exit', this.exitCleanup);
221
+ process.on('SIGINT', this.exitCleanup);
222
+ process.on('SIGTERM', this.exitCleanup);
223
+ }
224
+ deregisterExitCleanup() {
225
+ if (this.exitCleanup) {
226
+ process.removeListener('exit', this.exitCleanup);
227
+ process.removeListener('SIGINT', this.exitCleanup);
228
+ process.removeListener('SIGTERM', this.exitCleanup);
229
+ this.exitCleanup = null;
230
+ }
231
+ }
232
+ }
@@ -8,11 +8,14 @@ import type { BBConfig } from '../config.js';
8
8
  export declare class BBCircuitVerifier implements ClientProtocolCircuitVerifier {
9
9
  private config;
10
10
  private logger;
11
+ private bbJsFactory;
11
12
  private constructor();
12
13
  stop(): Promise<void>;
13
14
  static new(config: BBConfig, logger?: Logger): Promise<BBCircuitVerifier>;
14
15
  getVerificationKeyData(circuit: ProtocolArtifact): VerificationKeyData;
16
+ /** Verify an UltraHonk proof via bb.js API (no temp files). */
15
17
  verifyProofForCircuit(circuit: ServerProtocolArtifact, proof: Proof): Promise<void>;
18
+ /** Verify a Chonk (IVC) proof from a transaction via bb.js API. */
16
19
  verifyProof(tx: Tx): Promise<IVCProofVerificationResult>;
17
20
  }
18
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmJfdmVyaWZpZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy92ZXJpZmllci9iYl92ZXJpZmllci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsS0FBSyxNQUFNLEVBQWdCLE1BQU0sdUJBQXVCLENBQUM7QUFHbEUsT0FBTyxFQUVMLEtBQUssZ0JBQWdCLEVBQ3JCLEtBQUssc0JBQXNCLEVBRTVCLE1BQU0sMkNBQTJDLENBQUM7QUFDbkQsT0FBTyxLQUFLLEVBQUUsNkJBQTZCLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUNqSCxPQUFPLEtBQUssRUFBRSxLQUFLLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUVsRCxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDdEMsT0FBTyxLQUFLLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQWE3RCxPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFJN0MscUJBQWEsaUJBQWtCLFlBQVcsNkJBQTZCO0lBRW5FLE9BQU8sQ0FBQyxNQUFNO0lBQ2QsT0FBTyxDQUFDLE1BQU07SUFGaEIsT0FBTyxlQUdIO0lBRUcsSUFBS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EAAE,gBAAgB,GAAG,mBAAmB,CAM5E;IAED,+DAA+D;IAClD,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,KAAK,iBA4B/E;IAED,mEAAmE;IACtD,WAAW,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,CAAC,CA+BpE;CACF"}
@@ -1,22 +1,92 @@
1
- import { runInDirectory } from '@aztec/foundation/fs';
1
+ function _ts_add_disposable_resource(env, value, async) {
2
+ if (value !== null && value !== void 0) {
3
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
4
+ var dispose, inner;
5
+ if (async) {
6
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
7
+ dispose = value[Symbol.asyncDispose];
8
+ }
9
+ if (dispose === void 0) {
10
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
11
+ dispose = value[Symbol.dispose];
12
+ if (async) inner = dispose;
13
+ }
14
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
15
+ if (inner) dispose = function() {
16
+ try {
17
+ inner.call(this);
18
+ } catch (e) {
19
+ return Promise.reject(e);
20
+ }
21
+ };
22
+ env.stack.push({
23
+ value: value,
24
+ dispose: dispose,
25
+ async: async
26
+ });
27
+ } else if (async) {
28
+ env.stack.push({
29
+ async: true
30
+ });
31
+ }
32
+ return value;
33
+ }
34
+ function _ts_dispose_resources(env) {
35
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
36
+ var e = new Error(message);
37
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
38
+ };
39
+ return (_ts_dispose_resources = function _ts_dispose_resources(env) {
40
+ function fail(e) {
41
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
42
+ env.hasError = true;
43
+ }
44
+ var r, s = 0;
45
+ function next() {
46
+ while(r = env.stack.pop()){
47
+ try {
48
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
49
+ if (r.dispose) {
50
+ var result = r.dispose.call(r.value);
51
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) {
52
+ fail(e);
53
+ return next();
54
+ });
55
+ } else s |= 1;
56
+ } catch (e) {
57
+ fail(e);
58
+ }
59
+ }
60
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
61
+ if (env.hasError) throw env.error;
62
+ }
63
+ return next();
64
+ })(env);
65
+ }
2
66
  import { createLogger } from '@aztec/foundation/log';
3
67
  import { Timer } from '@aztec/foundation/timer';
4
68
  import { ProtocolCircuitVks } from '@aztec/noir-protocol-circuits-types/server/vks';
5
69
  import { mapProtocolArtifactNameToCircuitName } from '@aztec/noir-protocol-circuits-types/types';
6
70
  import { promises as fs } from 'fs';
7
- import * as path from 'path';
8
- import { BB_RESULT, PROOF_FILENAME, PUBLIC_INPUTS_FILENAME, VK_FILENAME, verifyChonkProof, verifyProof } from '../bb/execute.js';
71
+ import { BBJsFactory } from '../bb/bb_js_backend.js';
9
72
  import { getUltraHonkFlavorForCircuit } from '../honk.js';
10
- import { writeChonkProofToPath } from '../prover/proof_utils.js';
11
73
  export class BBCircuitVerifier {
12
74
  config;
13
75
  logger;
76
+ bbJsFactory;
14
77
  constructor(config, logger){
15
78
  this.config = config;
16
79
  this.logger = logger;
80
+ // BB_NUM_IVC_VERIFIERS bounds the number of long-lived bb processes the pool keeps alive.
81
+ // If 0, fall back to spawning a fresh bb per verification.
82
+ this.bbJsFactory = new BBJsFactory(config.bbBinaryPath, {
83
+ poolSize: config.numConcurrentIVCVerifiers > 0 ? config.numConcurrentIVCVerifiers : undefined,
84
+ logger,
85
+ debugDir: config.bbDebugOutputDir
86
+ });
17
87
  }
18
88
  stop() {
19
- return Promise.resolve();
89
+ return this.bbJsFactory.destroy();
20
90
  }
21
91
  static async new(config, logger = createLogger('bb-prover:verifier')) {
22
92
  if (!config.bbWorkingDirectory) {
@@ -34,64 +104,76 @@ export class BBCircuitVerifier {
34
104
  }
35
105
  return vk;
36
106
  }
37
- async verifyProofForCircuit(circuit, proof) {
38
- const operation = async (bbWorkingDirectory)=>{
39
- const publicInputsFileName = path.join(bbWorkingDirectory, PUBLIC_INPUTS_FILENAME);
40
- const proofFileName = path.join(bbWorkingDirectory, PROOF_FILENAME);
41
- const verificationKeyPath = path.join(bbWorkingDirectory, VK_FILENAME);
107
+ /** Verify an UltraHonk proof via bb.js API (no temp files). */ async verifyProofForCircuit(circuit, proof) {
108
+ const env = {
109
+ stack: [],
110
+ error: void 0,
111
+ hasError: false
112
+ };
113
+ try {
42
114
  const verificationKey = this.getVerificationKeyData(circuit);
115
+ const flavor = getUltraHonkFlavorForCircuit(circuit);
43
116
  this.logger.debug(`${circuit} Verifying with key: ${verificationKey.keyAsFields.hash.toString()}`);
44
- // TODO(https://github.com/AztecProtocol/aztec-packages/issues/13189): Put this proof parsing logic in the proof class.
45
- await fs.writeFile(publicInputsFileName, proof.buffer.slice(0, proof.numPublicInputs * 32));
46
- await fs.writeFile(proofFileName, proof.buffer.slice(proof.numPublicInputs * 32));
47
- await fs.writeFile(verificationKeyPath, verificationKey.keyAsBytes);
48
- const result = await verifyProof(this.config.bbBinaryPath, proofFileName, verificationKeyPath, getUltraHonkFlavorForCircuit(circuit), this.logger);
49
- if (result.status === BB_RESULT.FAILURE) {
50
- const errorMessage = `Failed to verify ${circuit} proof!`;
51
- throw new Error(errorMessage);
117
+ // Split proof buffer into public input fields and proof fields (32-byte each)
118
+ const publicInputFields = splitBufferToFieldArrays(proof.buffer.subarray(0, proof.numPublicInputs * 32));
119
+ const proofFields = splitBufferToFieldArrays(proof.buffer.subarray(proof.numPublicInputs * 32));
120
+ const instance = _ts_add_disposable_resource(env, await this.bbJsFactory.getInstance(), true);
121
+ const { verified, durationMs } = await instance.verifyProof(proofFields, verificationKey.keyAsBytes, publicInputFields, flavor);
122
+ if (!verified) {
123
+ throw new Error(`Failed to verify ${circuit} proof!`);
52
124
  }
53
125
  this.logger.debug(`${circuit} verification successful`, {
54
126
  circuitName: mapProtocolArtifactNameToCircuitName(circuit),
55
- duration: result.durationMs,
127
+ duration: durationMs,
56
128
  eventName: 'circuit-verification',
57
129
  proofType: 'ultra-honk'
58
130
  });
59
- };
60
- await runInDirectory(this.config.bbWorkingDirectory, operation, this.config.bbSkipCleanup, this.logger);
131
+ } catch (e) {
132
+ env.error = e;
133
+ env.hasError = true;
134
+ } finally{
135
+ const result = _ts_dispose_resources(env);
136
+ if (result) await result;
137
+ }
61
138
  }
62
- async verifyProof(tx) {
139
+ /** Verify a Chonk (IVC) proof from a transaction via bb.js API. */ async verifyProof(tx) {
63
140
  const proofType = 'Chonk';
64
141
  try {
65
- const totalTimer = new Timer();
66
- let verificationDuration = 0;
67
- const circuit = tx.data.forPublic ? 'HidingKernelToPublic' : 'HidingKernelToRollup';
68
- // Block below is almost copy-pasted from verifyProofForCircuit
69
- const operation = async (bbWorkingDirectory)=>{
70
- const proofPath = path.join(bbWorkingDirectory, PROOF_FILENAME);
71
- await writeChonkProofToPath(tx.chonkProof.attachPublicInputs(tx.data.publicInputs().toFields()), proofPath);
72
- const verificationKeyPath = path.join(bbWorkingDirectory, VK_FILENAME);
142
+ const env = {
143
+ stack: [],
144
+ error: void 0,
145
+ hasError: false
146
+ };
147
+ try {
148
+ const totalTimer = new Timer();
149
+ const circuit = tx.data.forPublic ? 'HidingKernelToPublic' : 'HidingKernelToRollup';
73
150
  const verificationKey = this.getVerificationKeyData(circuit);
74
- await fs.writeFile(verificationKeyPath, verificationKey.keyAsBytes);
75
- const timer = new Timer();
76
- const result = await verifyChonkProof(this.config.bbBinaryPath, proofPath, verificationKeyPath, this.logger, this.config.bbIVCConcurrency);
77
- verificationDuration = timer.ms();
78
- if (result.status === BB_RESULT.FAILURE) {
79
- const errorMessage = `Failed to verify ${proofType} proof for ${circuit}!`;
80
- throw new Error(errorMessage);
151
+ // Reconstruct the full proof with public inputs prepended, then convert Fr[] to Uint8Array[]
152
+ const proofWithPubInputs = tx.chonkProof.attachPublicInputs(tx.data.publicInputs().toFields());
153
+ const fieldsAsBuffers = proofWithPubInputs.fieldsWithPublicInputs.map((f)=>new Uint8Array(f.toBuffer()));
154
+ const instance = _ts_add_disposable_resource(env, await this.bbJsFactory.getInstance(), true);
155
+ const { verified, durationMs } = await instance.verifyChonkProof(fieldsAsBuffers, verificationKey.keyAsBytes);
156
+ if (!verified) {
157
+ throw new Error(`Failed to verify ${proofType} proof for ${circuit}!`);
81
158
  }
82
159
  this.logger.debug(`${proofType} verification successful`, {
83
160
  circuitName: mapProtocolArtifactNameToCircuitName(circuit),
84
- duration: result.durationMs,
161
+ duration: durationMs,
85
162
  eventName: 'circuit-verification',
86
163
  proofType: 'chonk'
87
164
  });
88
- };
89
- await runInDirectory(this.config.bbWorkingDirectory, operation, this.config.bbSkipCleanup, this.logger);
90
- return {
91
- valid: true,
92
- durationMs: verificationDuration,
93
- totalDurationMs: totalTimer.ms()
94
- };
165
+ return {
166
+ valid: true,
167
+ durationMs,
168
+ totalDurationMs: totalTimer.ms()
169
+ };
170
+ } catch (e) {
171
+ env.error = e;
172
+ env.hasError = true;
173
+ } finally{
174
+ const result = _ts_dispose_resources(env);
175
+ if (result) await result;
176
+ }
95
177
  } catch (err) {
96
178
  this.logger.warn(`Failed to verify ${proofType} proof for tx ${tx.getTxHash().toString()}: ${String(err)}`);
97
179
  return {
@@ -102,3 +184,10 @@ export class BBCircuitVerifier {
102
184
  }
103
185
  }
104
186
  }
187
+ /** Split a buffer into 32-byte Uint8Array field elements. */ function splitBufferToFieldArrays(buffer) {
188
+ const fields = [];
189
+ for(let i = 0; i < buffer.length; i += 32){
190
+ fields.push(new Uint8Array(buffer.subarray(i, i + 32)));
191
+ }
192
+ return fields;
193
+ }
@@ -1,3 +1,4 @@
1
+ export * from './batch_chonk_verifier.js';
1
2
  export * from './bb_verifier.js';
2
3
  export * from './queued_chonk_verifier.js';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy92ZXJpZmllci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGtCQUFrQixDQUFDO0FBQ2pDLGNBQWMsNEJBQTRCLENBQUMifQ==
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy92ZXJpZmllci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDJCQUEyQixDQUFDO0FBQzFDLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyw0QkFBNEIsQ0FBQyJ9
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/verifier/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/verifier/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC"}
@@ -1,2 +1,3 @@
1
+ export * from './batch_chonk_verifier.js';
1
2
  export * from './bb_verifier.js';
2
3
  export * from './queued_chonk_verifier.js';
@@ -1,15 +1,14 @@
1
1
  import type { ClientProtocolCircuitVerifier, IVCProofVerificationResult } from '@aztec/stdlib/interfaces/server';
2
2
  import type { Tx } from '@aztec/stdlib/tx';
3
3
  import { type TelemetryClient } from '@aztec/telemetry-client';
4
- import type { BBConfig } from '../config.js';
5
4
  export declare class QueuedIVCVerifier implements ClientProtocolCircuitVerifier {
6
5
  private verifier;
7
6
  private telemetry;
8
7
  private logger;
9
8
  private queue;
10
9
  private metrics;
11
- constructor(config: BBConfig, verifier: ClientProtocolCircuitVerifier, telemetry?: TelemetryClient, logger?: import("@aztec/foundation/log").Logger);
10
+ constructor(verifier: ClientProtocolCircuitVerifier, concurrency: number, telemetry?: TelemetryClient, logger?: import("@aztec/foundation/log").Logger);
12
11
  verifyProof(tx: Tx): Promise<IVCProofVerificationResult>;
13
12
  stop(): Promise<void>;
14
13
  }
15
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVldWVkX2Nob25rX3ZlcmlmaWVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdmVyaWZpZXIvcXVldWVkX2Nob25rX3ZlcmlmaWVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sS0FBSyxFQUFFLDZCQUE2QixFQUFFLDBCQUEwQixFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDakgsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDM0MsT0FBTyxFQU1MLEtBQUssZUFBZSxFQUlyQixNQUFNLHlCQUF5QixDQUFDO0FBSWpDLE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQWlFN0MscUJBQWEsaUJBQWtCLFlBQVcsNkJBQTZCO0lBTW5FLE9BQU8sQ0FBQyxRQUFRO0lBQ2hCLE9BQU8sQ0FBQyxTQUFTO0lBQ2pCLE9BQU8sQ0FBQyxNQUFNO0lBUGhCLE9BQU8sQ0FBQyxLQUFLLENBQWM7SUFDM0IsT0FBTyxDQUFDLE9BQU8sQ0FBcUI7SUFFcEMsWUFDRSxNQUFNLEVBQUUsUUFBUSxFQUNSLFFBQVEsRUFBRSw2QkFBNkIsRUFDdkMsU0FBUyxHQUFFLGVBQXNDLEVBQ2pELE1BQU0seUNBQWtELEVBTWpFO0lBRVksV0FBVyxDQUFDLE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"queued_chonk_verifier.d.ts","sourceRoot":"","sources":["../../src/verifier/queued_chonk_verifier.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACjH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAML,KAAK,eAAe,EAIrB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAiE7C,qBAAa,iBAAkB,YAAW,6BAA6B;IAMnE,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,MAAM;IAPhB,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,OAAO,CAAqB;IAEpC,YACE,MAAM,EAAE,QAAQ,EACR,QAAQ,EAAE,6BAA6B,EACvC,SAAS,GAAE,eAAsC,EACjD,MAAM,yCAAkD,EAMjE;IAEY,WAAW,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAIpE;IAED,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAEpB;CACF"}
1
+ {"version":3,"file":"queued_chonk_verifier.d.ts","sourceRoot":"","sources":["../../src/verifier/queued_chonk_verifier.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACjH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAML,KAAK,eAAe,EAIrB,MAAM,yBAAyB,CAAC;AAmEjC,qBAAa,iBAAkB,YAAW,6BAA6B;IAKnE,OAAO,CAAC,QAAQ;IAEhB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,MAAM;IAPhB,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,OAAO,CAAqB;IAEpC,YACU,QAAQ,EAAE,6BAA6B,EAC/C,WAAW,EAAE,MAAM,EACX,SAAS,GAAE,eAAsC,EACjD,MAAM,yCAAkD,EAMjE;IAEY,WAAW,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAIpE;IAEK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAG1B;CACF"}
@@ -81,21 +81,22 @@ export class QueuedIVCVerifier {
81
81
  logger;
82
82
  queue;
83
83
  metrics;
84
- constructor(config, verifier, telemetry = getTelemetryClient(), logger = createLogger('bb-prover:queued_chonk_verifier')){
84
+ constructor(verifier, concurrency, telemetry = getTelemetryClient(), logger = createLogger('bb-prover:queued_chonk_verifier')){
85
85
  this.verifier = verifier;
86
86
  this.telemetry = telemetry;
87
87
  this.logger = logger;
88
88
  this.metrics = new IVCVerifierMetrics(this.telemetry, 'QueuedIVCVerifier');
89
89
  this.queue = new SerialQueue();
90
- this.logger.info(`Starting QueuedIVCVerifier with ${config.numConcurrentIVCVerifiers} concurrent verifiers`);
91
- this.queue.start(config.numConcurrentIVCVerifiers);
90
+ this.logger.info(`Starting QueuedIVCVerifier with ${concurrency} concurrent verifiers`);
91
+ this.queue.start(concurrency);
92
92
  }
93
93
  async verifyProof(tx) {
94
94
  const result = await this.queue.put(()=>this.verifier.verifyProof(tx));
95
95
  this.metrics.recordIVCVerification(result);
96
96
  return result;
97
97
  }
98
- stop() {
99
- return this.queue.end();
98
+ async stop() {
99
+ await this.queue.end();
100
+ await this.verifier.stop();
100
101
  }
101
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/bb-prover",
3
- "version": "0.0.1-commit.72dcdcda8",
3
+ "version": "0.0.1-commit.7689c7f",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -9,7 +9,8 @@
9
9
  "./client": "./dest/prover/client/bb_private_kernel_prover.js",
10
10
  "./verifier": "./dest/verifier/index.js",
11
11
  "./test": "./dest/test/index.js",
12
- "./config": "./dest/config.js"
12
+ "./config": "./dest/config.js",
13
+ "./debug": "./dest/bb/bb_js_debug.js"
13
14
  },
14
15
  "bin": {
15
16
  "bb-cli": "./dest/bb/index.js"
@@ -69,27 +70,28 @@
69
70
  ]
70
71
  },
71
72
  "dependencies": {
72
- "@aztec/bb.js": "0.0.1-commit.72dcdcda8",
73
- "@aztec/constants": "0.0.1-commit.72dcdcda8",
74
- "@aztec/foundation": "0.0.1-commit.72dcdcda8",
75
- "@aztec/noir-noirc_abi": "0.0.1-commit.72dcdcda8",
76
- "@aztec/noir-protocol-circuits-types": "0.0.1-commit.72dcdcda8",
77
- "@aztec/noir-types": "0.0.1-commit.72dcdcda8",
78
- "@aztec/simulator": "0.0.1-commit.72dcdcda8",
79
- "@aztec/stdlib": "0.0.1-commit.72dcdcda8",
80
- "@aztec/telemetry-client": "0.0.1-commit.72dcdcda8",
81
- "@aztec/world-state": "0.0.1-commit.72dcdcda8",
73
+ "@aztec/bb.js": "0.0.1-commit.7689c7f",
74
+ "@aztec/constants": "0.0.1-commit.7689c7f",
75
+ "@aztec/foundation": "0.0.1-commit.7689c7f",
76
+ "@aztec/noir-noirc_abi": "0.0.1-commit.7689c7f",
77
+ "@aztec/noir-protocol-circuits-types": "0.0.1-commit.7689c7f",
78
+ "@aztec/noir-types": "0.0.1-commit.7689c7f",
79
+ "@aztec/simulator": "0.0.1-commit.7689c7f",
80
+ "@aztec/stdlib": "0.0.1-commit.7689c7f",
81
+ "@aztec/telemetry-client": "0.0.1-commit.7689c7f",
82
+ "@aztec/world-state": "0.0.1-commit.7689c7f",
82
83
  "commander": "^12.1.0",
84
+ "msgpackr": "^1.11.2",
83
85
  "pako": "^2.1.0",
84
86
  "source-map-support": "^0.5.21",
85
87
  "tslib": "^2.4.0"
86
88
  },
87
89
  "devDependencies": {
88
- "@aztec/ethereum": "0.0.1-commit.72dcdcda8",
89
- "@aztec/kv-store": "0.0.1-commit.72dcdcda8",
90
- "@aztec/noir-contracts.js": "0.0.1-commit.72dcdcda8",
91
- "@aztec/noir-test-contracts.js": "0.0.1-commit.72dcdcda8",
92
- "@aztec/protocol-contracts": "0.0.1-commit.72dcdcda8",
90
+ "@aztec/ethereum": "0.0.1-commit.7689c7f",
91
+ "@aztec/kv-store": "0.0.1-commit.7689c7f",
92
+ "@aztec/noir-contracts.js": "0.0.1-commit.7689c7f",
93
+ "@aztec/noir-test-contracts.js": "0.0.1-commit.7689c7f",
94
+ "@aztec/protocol-contracts": "0.0.1-commit.7689c7f",
93
95
  "@jest/globals": "^30.0.0",
94
96
  "@types/jest": "^30.0.0",
95
97
  "@types/node": "^22.15.17",