@aztec/bb-prover 2.1.0-rc.9 → 3.0.0-devnet.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/avm_proving_tests/avm_proving_tester.d.ts +6 -4
- package/dest/avm_proving_tests/avm_proving_tester.d.ts.map +1 -1
- package/dest/avm_proving_tests/avm_proving_tester.js +18 -12
- package/dest/bb/execute.d.ts +1 -9
- package/dest/bb/execute.d.ts.map +1 -1
- package/dest/bb/execute.js +11 -77
- package/dest/honk.d.ts +1 -1
- package/dest/honk.js +2 -2
- package/dest/instrumentation.d.ts +2 -2
- package/dest/instrumentation.d.ts.map +1 -1
- package/dest/prover/client/bb_private_kernel_prover.d.ts +3 -3
- package/dest/prover/client/bb_private_kernel_prover.d.ts.map +1 -1
- package/dest/prover/client/bb_private_kernel_prover.js +1 -1
- package/dest/prover/client/native/bb_native_private_kernel_prover.d.ts +2 -2
- package/dest/prover/client/native/bb_native_private_kernel_prover.d.ts.map +1 -1
- package/dest/prover/client/wasm/bb_wasm_private_kernel_prover.d.ts +2 -2
- package/dest/prover/client/wasm/bb_wasm_private_kernel_prover.d.ts.map +1 -1
- package/dest/prover/client/wasm/bb_wasm_private_kernel_prover.js +3 -5
- package/dest/prover/proof_utils.d.ts +4 -4
- package/dest/prover/proof_utils.d.ts.map +1 -1
- package/dest/prover/proof_utils.js +36 -19
- package/dest/prover/server/bb_prover.d.ts +21 -32
- package/dest/prover/server/bb_prover.d.ts.map +1 -1
- package/dest/prover/server/bb_prover.js +64 -141
- package/dest/test/delay_values.d.ts.map +1 -1
- package/dest/test/delay_values.js +30 -20
- package/dest/test/test_circuit_prover.d.ts +20 -30
- package/dest/test/test_circuit_prover.d.ts.map +1 -1
- package/dest/test/test_circuit_prover.js +74 -56
- package/dest/verifier/bb_verifier.d.ts +2 -4
- package/dest/verifier/bb_verifier.d.ts.map +1 -1
- package/dest/verifier/bb_verifier.js +19 -24
- package/package.json +17 -18
- package/src/avm_proving_tests/avm_proving_tester.ts +26 -16
- package/src/bb/execute.ts +8 -75
- package/src/honk.ts +1 -1
- package/src/instrumentation.ts +2 -2
- package/src/prover/client/bb_private_kernel_prover.ts +7 -5
- package/src/prover/client/native/bb_native_private_kernel_prover.ts +5 -3
- package/src/prover/client/wasm/bb_wasm_private_kernel_prover.ts +6 -6
- package/src/prover/proof_utils.ts +47 -25
- package/src/prover/server/bb_prover.ts +229 -288
- package/src/test/delay_values.ts +30 -20
- package/src/test/test_circuit_prover.ts +217 -142
- package/src/verifier/bb_verifier.ts +31 -30
- package/dest/stats.d.ts +0 -4
- package/dest/stats.d.ts.map +0 -1
- package/dest/stats.js +0 -45
- package/src/stats.ts +0 -47
|
@@ -4,16 +4,18 @@ import { type AvmCircuitInputs, AvmCircuitPublicInputs } from '@aztec/stdlib/avm
|
|
|
4
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
5
|
import type { MerkleTreeWriteOperations } from '@aztec/stdlib/interfaces/server';
|
|
6
6
|
import type { GlobalVariables } from '@aztec/stdlib/tx';
|
|
7
|
+
import { NativeWorldStateService } from '@aztec/world-state';
|
|
7
8
|
import { type BBResult, type BBSuccess } from '../bb/execute.js';
|
|
8
9
|
export declare class AvmProvingTester extends PublicTxSimulationTester {
|
|
9
|
-
private bbWorkingDirectory;
|
|
10
10
|
private checkCircuitOnly;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
private bbWorkingDirectory;
|
|
12
|
+
constructor(checkCircuitOnly: boolean, contractDataSource: SimpleContractDataSource, merkleTrees: MerkleTreeWriteOperations, globals?: GlobalVariables, metrics?: TestExecutorMetrics);
|
|
13
|
+
static new(worldStateService: NativeWorldStateService, // make sure to close this later
|
|
14
|
+
checkCircuitOnly?: boolean, globals?: GlobalVariables, metrics?: TestExecutorMetrics): Promise<AvmProvingTester>;
|
|
13
15
|
prove(avmCircuitInputs: AvmCircuitInputs, txLabel?: string): Promise<BBResult>;
|
|
14
16
|
verify(proofRes: BBSuccess, publicInputs: AvmCircuitPublicInputs): Promise<BBResult>;
|
|
15
17
|
proveVerify(avmCircuitInputs: AvmCircuitInputs, txLabel?: string): Promise<void>;
|
|
16
|
-
simProveVerify(sender: AztecAddress, setupCalls: TestEnqueuedCall[], appCalls: TestEnqueuedCall[], teardownCall: TestEnqueuedCall | undefined, expectRevert: boolean | undefined, feePayer?: AztecAddress, privateInsertions?: TestPrivateInsertions, txLabel?: string): Promise<PublicTxResult>;
|
|
18
|
+
simProveVerify(sender: AztecAddress, setupCalls: TestEnqueuedCall[], appCalls: TestEnqueuedCall[], teardownCall: TestEnqueuedCall | undefined, expectRevert: boolean | undefined, feePayer?: AztecAddress, privateInsertions?: TestPrivateInsertions, txLabel?: string, disableRevertCheck?: boolean): Promise<PublicTxResult>;
|
|
17
19
|
executeTxWithLabel(txLabel: string, sender: AztecAddress, setupCalls?: TestEnqueuedCall[], appCalls?: TestEnqueuedCall[], teardownCall?: TestEnqueuedCall, feePayer?: AztecAddress, privateInsertions?: TestPrivateInsertions): Promise<PublicTxResult>;
|
|
18
20
|
simProveVerifyAppLogic(appCall: TestEnqueuedCall, expectRevert?: boolean, txLabel?: string): Promise<void>;
|
|
19
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avm_proving_tester.d.ts","sourceRoot":"","sources":["../../src/avm_proving_tests/avm_proving_tester.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAA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CAAC,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAiB7E,WAAW,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,GAAE,MAAsB;IAQ/E,cAAc,CACzB,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,gBAAgB,EAAE,EAC9B,QAAQ,EAAE,gBAAgB,EAAE,EAC5B,YAAY,EAAE,gBAAgB,GAAG,SAAS,EAC1C,YAAY,EAAE,OAAO,GAAG,SAAS,EACjC,QAAQ,eAAS,EACjB,iBAAiB,CAAC,EAAE,qBAAqB,EACzC,OAAO,GAAE,MAAsB,EAC/B,kBAAkB,GAAE,OAAe,GAClC,OAAO,CAAC,cAAc,CAAC;IAyBJ,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,YAAY,EACpB,UAAU,CAAC,EAAE,gBAAgB,EAAE,EAC/B,QAAQ,CAAC,EAAE,gBAAgB,EAAE,EAC7B,YAAY,CAAC,EAAE,gBAAgB,EAC/B,QAAQ,CAAC,EAAE,YAAY,EACvB,iBAAiB,CAAC,EAAE,qBAAqB;IAe9B,sBAAsB,CACjC,OAAO,EAAE,gBAAgB,EACzB,YAAY,CAAC,EAAE,OAAO,EACtB,OAAO,GAAE,MAAsB;CAalC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Timer } from '@aztec/foundation/timer';
|
|
2
2
|
import { PublicTxSimulationTester, SimpleContractDataSource } from '@aztec/simulator/public/fixtures';
|
|
3
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
-
import { NativeWorldStateService } from '@aztec/world-state';
|
|
5
4
|
import fs from 'node:fs/promises';
|
|
6
5
|
import { tmpdir } from 'node:os';
|
|
7
6
|
import path from 'path';
|
|
8
7
|
import { BB_RESULT, VK_FILENAME, generateAvmProof, verifyAvmProof } from '../bb/execute.js';
|
|
9
|
-
const BB_PATH = path.resolve('../../barretenberg/cpp/build/bin/bb');
|
|
8
|
+
const BB_PATH = path.resolve('../../barretenberg/cpp/build/bin/bb-avm');
|
|
10
9
|
// An InterceptingLogger that records all log messages and forwards them to a wrapped logger.
|
|
11
10
|
class InterceptingLogger {
|
|
12
11
|
logs = [];
|
|
@@ -59,18 +58,19 @@ class InterceptingLogger {
|
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
export class AvmProvingTester extends PublicTxSimulationTester {
|
|
62
|
-
bbWorkingDirectory;
|
|
63
61
|
checkCircuitOnly;
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
bbWorkingDirectory;
|
|
63
|
+
constructor(checkCircuitOnly, contractDataSource, merkleTrees, globals, metrics){
|
|
64
|
+
super(merkleTrees, contractDataSource, globals, metrics), this.checkCircuitOnly = checkCircuitOnly, this.bbWorkingDirectory = '';
|
|
66
65
|
}
|
|
67
|
-
static async new(checkCircuitOnly = false, globals, metrics) {
|
|
68
|
-
const bbWorkingDirectory = await fs.mkdtemp(path.join(tmpdir(), 'bb-'));
|
|
66
|
+
static async new(worldStateService, checkCircuitOnly = false, globals, metrics) {
|
|
69
67
|
const contractDataSource = new SimpleContractDataSource();
|
|
70
|
-
const merkleTrees = await
|
|
71
|
-
return new AvmProvingTester(
|
|
68
|
+
const merkleTrees = await worldStateService.fork();
|
|
69
|
+
return new AvmProvingTester(checkCircuitOnly, contractDataSource, merkleTrees, globals, metrics);
|
|
72
70
|
}
|
|
73
71
|
async prove(avmCircuitInputs, txLabel = 'unlabeledTx') {
|
|
72
|
+
// We use a new working directory for each proof.
|
|
73
|
+
this.bbWorkingDirectory = await fs.mkdtemp(path.join(tmpdir(), 'bb-'));
|
|
74
74
|
const interceptingLogger = new InterceptingLogger(this.logger);
|
|
75
75
|
// Then we prove.
|
|
76
76
|
const proofRes = await generateAvmProof(BB_PATH, this.bbWorkingDirectory, avmCircuitInputs, interceptingLogger, this.checkCircuitOnly);
|
|
@@ -97,6 +97,10 @@ export class AvmProvingTester extends PublicTxSimulationTester {
|
|
|
97
97
|
times[match[1]] = parseInt(match[2]);
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
|
+
// Throw if logs did not contain any times.
|
|
101
|
+
if (Object.keys(times).length === 0) {
|
|
102
|
+
throw new Error('AVM stdout did not contain any proving times in the stats!');
|
|
103
|
+
}
|
|
100
104
|
// Hack to make labels match.
|
|
101
105
|
const txLabelWithCount = `${txLabel}/${this.txCount - 1}`;
|
|
102
106
|
// I need to cast because TS doesnt realize metrics is protected not private.
|
|
@@ -128,9 +132,11 @@ export class AvmProvingTester extends PublicTxSimulationTester {
|
|
|
128
132
|
const verificationRes = await this.verify(provingRes, avmCircuitInputs.publicInputs);
|
|
129
133
|
expect(verificationRes.status).toBe(BB_RESULT.SUCCESS);
|
|
130
134
|
}
|
|
131
|
-
async simProveVerify(sender, setupCalls, appCalls, teardownCall, expectRevert, feePayer = sender, privateInsertions, txLabel = 'unlabeledTx') {
|
|
135
|
+
async simProveVerify(sender, setupCalls, appCalls, teardownCall, expectRevert, feePayer = sender, privateInsertions, txLabel = 'unlabeledTx', disableRevertCheck = false) {
|
|
132
136
|
const simRes = await this.simulateTx(sender, setupCalls, appCalls, teardownCall, feePayer, privateInsertions, txLabel);
|
|
133
|
-
|
|
137
|
+
if (!disableRevertCheck) {
|
|
138
|
+
expect(simRes.revertCode.isOK()).toBe(expectRevert ? false : true);
|
|
139
|
+
}
|
|
134
140
|
const opString = this.checkCircuitOnly ? 'Check circuit' : 'Proving and verification';
|
|
135
141
|
const avmCircuitInputs = simRes.avmProvingRequest.inputs;
|
|
136
142
|
const timer = new Timer();
|
|
@@ -139,7 +145,7 @@ export class AvmProvingTester extends PublicTxSimulationTester {
|
|
|
139
145
|
return simRes;
|
|
140
146
|
}
|
|
141
147
|
async executeTxWithLabel(txLabel, sender, setupCalls, appCalls, teardownCall, feePayer, privateInsertions) {
|
|
142
|
-
return await this.simProveVerify(sender, setupCalls ?? [], appCalls ?? [], teardownCall,
|
|
148
|
+
return await this.simProveVerify(sender, setupCalls ?? [], appCalls ?? [], teardownCall, undefined, feePayer, privateInsertions, txLabel, true);
|
|
143
149
|
}
|
|
144
150
|
async simProveVerifyAppLogic(appCall, expectRevert, txLabel = 'unlabeledTx') {
|
|
145
151
|
await this.simProveVerify(/*sender=*/ AztecAddress.fromNumber(42), /*setupCalls=*/ [], [
|
package/dest/bb/execute.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export declare const PROOF_FILENAME = "proof";
|
|
|
7
7
|
export declare const AVM_INPUTS_FILENAME = "avm_inputs.bin";
|
|
8
8
|
export declare const AVM_BYTECODE_FILENAME = "avm_bytecode.bin";
|
|
9
9
|
export declare const AVM_PUBLIC_INPUTS_FILENAME = "avm_public_inputs.bin";
|
|
10
|
-
export declare const CLIENT_IVC_PROOF_FILE_NAME = "proof";
|
|
11
10
|
export declare enum BB_RESULT {
|
|
12
11
|
SUCCESS = 0,
|
|
13
12
|
FAILURE = 1,
|
|
@@ -61,14 +60,7 @@ export declare function executeBbClientIvcProof(pathToBB: string, workingDirecto
|
|
|
61
60
|
* @param log - A logging function
|
|
62
61
|
* @returns An object containing a result indication, the location of the proof and the duration taken
|
|
63
62
|
*/
|
|
64
|
-
export declare function generateProof(pathToBB: string, workingDirectory: string, circuitName: string, bytecode: Buffer, inputWitnessFile: string, flavor: UltraHonkFlavor, log: Logger): Promise<BBFailure | BBSuccess>;
|
|
65
|
-
/**
|
|
66
|
-
* Used for generating proofs of the tube circuit
|
|
67
|
-
* It is assumed that the working directory is a temporary and/or random directory used solely for generating this proof.
|
|
68
|
-
*
|
|
69
|
-
* @returns An object containing a result indication, the location of the proof and the duration taken
|
|
70
|
-
*/
|
|
71
|
-
export declare function generateTubeProof(pathToBB: string, workingDirectory: string, vkPath: string, log: LogFn): Promise<BBFailure | BBSuccess>;
|
|
63
|
+
export declare function generateProof(pathToBB: string, workingDirectory: string, circuitName: string, bytecode: Buffer, verificationKey: Buffer, inputWitnessFile: string, flavor: UltraHonkFlavor, log: Logger): Promise<BBFailure | BBSuccess>;
|
|
72
64
|
/**
|
|
73
65
|
* Used for generating AVM proofs.
|
|
74
66
|
* It is assumed that the working directory is a temporary and/or random directory used solely for generating this proof.
|
package/dest/bb/execute.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../src/bb/execute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAMlF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AACtD,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AACpD,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AACxD,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../src/bb/execute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAMlF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AACtD,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AACpD,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AACxD,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAElE,oBAAY,SAAS;IACnB,OAAO,IAAA;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,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"}
|
package/dest/bb/execute.js
CHANGED
|
@@ -9,7 +9,6 @@ export const PROOF_FILENAME = 'proof';
|
|
|
9
9
|
export const AVM_INPUTS_FILENAME = 'avm_inputs.bin';
|
|
10
10
|
export const AVM_BYTECODE_FILENAME = 'avm_bytecode.bin';
|
|
11
11
|
export const AVM_PUBLIC_INPUTS_FILENAME = 'avm_public_inputs.bin';
|
|
12
|
-
export const CLIENT_IVC_PROOF_FILE_NAME = 'proof';
|
|
13
12
|
export var BB_RESULT = /*#__PURE__*/ function(BB_RESULT) {
|
|
14
13
|
BB_RESULT[BB_RESULT["SUCCESS"] = 0] = "SUCCESS";
|
|
15
14
|
BB_RESULT[BB_RESULT["FAILURE"] = 1] = "FAILURE";
|
|
@@ -203,7 +202,7 @@ function getArgs(flavor) {
|
|
|
203
202
|
* @param inputWitnessFile - The circuit input witness
|
|
204
203
|
* @param log - A logging function
|
|
205
204
|
* @returns An object containing a result indication, the location of the proof and the duration taken
|
|
206
|
-
*/ export async function generateProof(pathToBB, workingDirectory, circuitName, bytecode, inputWitnessFile, flavor, log) {
|
|
205
|
+
*/ export async function generateProof(pathToBB, workingDirectory, circuitName, bytecode, verificationKey, inputWitnessFile, flavor, log) {
|
|
207
206
|
// Check that the working directory exists
|
|
208
207
|
try {
|
|
209
208
|
await fs.access(workingDirectory);
|
|
@@ -213,8 +212,9 @@ function getArgs(flavor) {
|
|
|
213
212
|
reason: `Working directory ${workingDirectory} does not exist`
|
|
214
213
|
};
|
|
215
214
|
}
|
|
216
|
-
// The bytecode is written to e.g. /workingDirectory/
|
|
215
|
+
// The bytecode is written to e.g. /workingDirectory/ParityBaseArtifact-bytecode
|
|
217
216
|
const bytecodePath = `${workingDirectory}/${circuitName}-bytecode`;
|
|
217
|
+
const vkPath = `${workingDirectory}/${circuitName}-vk`;
|
|
218
218
|
// The proof is written to e.g. /workingDirectory/ultra_honk/proof
|
|
219
219
|
const outputPath = `${workingDirectory}`;
|
|
220
220
|
const binaryPresent = await fs.access(pathToBB, fs.constants.R_OK).then((_)=>true).catch((_)=>false);
|
|
@@ -225,16 +225,19 @@ function getArgs(flavor) {
|
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
227
|
try {
|
|
228
|
-
// Write the bytecode to the working directory
|
|
229
|
-
await
|
|
230
|
-
|
|
228
|
+
// Write the bytecode and vk to the working directory
|
|
229
|
+
await Promise.all([
|
|
230
|
+
fs.writeFile(bytecodePath, bytecode),
|
|
231
|
+
fs.writeFile(vkPath, verificationKey)
|
|
232
|
+
]);
|
|
231
233
|
const args = getArgs(flavor).concat([
|
|
232
234
|
'--disable_zk',
|
|
233
|
-
'--write_vk',
|
|
234
235
|
'-o',
|
|
235
236
|
outputPath,
|
|
236
237
|
'-b',
|
|
237
238
|
bytecodePath,
|
|
239
|
+
'-k',
|
|
240
|
+
vkPath,
|
|
238
241
|
'-w',
|
|
239
242
|
inputWitnessFile,
|
|
240
243
|
'-v'
|
|
@@ -271,75 +274,6 @@ function getArgs(flavor) {
|
|
|
271
274
|
};
|
|
272
275
|
}
|
|
273
276
|
}
|
|
274
|
-
/**
|
|
275
|
-
* Used for generating proofs of the tube circuit
|
|
276
|
-
* It is assumed that the working directory is a temporary and/or random directory used solely for generating this proof.
|
|
277
|
-
*
|
|
278
|
-
* @returns An object containing a result indication, the location of the proof and the duration taken
|
|
279
|
-
*/ export async function generateTubeProof(pathToBB, workingDirectory, vkPath, log) {
|
|
280
|
-
// Check that the working directory exists
|
|
281
|
-
try {
|
|
282
|
-
await fs.access(workingDirectory);
|
|
283
|
-
} catch {
|
|
284
|
-
return {
|
|
285
|
-
status: 1,
|
|
286
|
-
reason: `Working directory ${workingDirectory} does not exist`
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
// Paths for the inputs
|
|
290
|
-
const proofPath = join(workingDirectory, CLIENT_IVC_PROOF_FILE_NAME);
|
|
291
|
-
// The proof is written to e.g. /workingDirectory/proof
|
|
292
|
-
const outputPath = workingDirectory;
|
|
293
|
-
const filePresent = async (file)=>await fs.access(file, fs.constants.R_OK).then((_)=>true).catch((_)=>false);
|
|
294
|
-
const binaryPresent = await filePresent(pathToBB);
|
|
295
|
-
if (!binaryPresent) {
|
|
296
|
-
return {
|
|
297
|
-
status: 1,
|
|
298
|
-
reason: `Failed to find bb binary at ${pathToBB}`
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
try {
|
|
302
|
-
if (!await filePresent(proofPath)) {
|
|
303
|
-
return {
|
|
304
|
-
status: 1,
|
|
305
|
-
reason: `Client IVC input files not present in ${workingDirectory}`
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
const args = [
|
|
309
|
-
'-o',
|
|
310
|
-
outputPath,
|
|
311
|
-
'-k',
|
|
312
|
-
vkPath,
|
|
313
|
-
'-v'
|
|
314
|
-
];
|
|
315
|
-
const timer = new Timer();
|
|
316
|
-
const logFunction = (message)=>{
|
|
317
|
-
log(`TubeCircuit (prove) BB out - ${message}`);
|
|
318
|
-
};
|
|
319
|
-
const result = await executeBB(pathToBB, 'prove_tube', args, logFunction);
|
|
320
|
-
const durationMs = timer.ms();
|
|
321
|
-
if (result.status == 0) {
|
|
322
|
-
return {
|
|
323
|
-
status: 0,
|
|
324
|
-
durationMs,
|
|
325
|
-
proofPath: outputPath,
|
|
326
|
-
pkPath: undefined,
|
|
327
|
-
vkDirectoryPath: outputPath
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
// Not a great error message here but it is difficult to decipher what comes from bb
|
|
331
|
-
return {
|
|
332
|
-
status: 1,
|
|
333
|
-
reason: `Failed to generate proof. Exit code ${result.exitCode}. Signal ${result.signal}.`,
|
|
334
|
-
retry: !!result.signal
|
|
335
|
-
};
|
|
336
|
-
} catch (error) {
|
|
337
|
-
return {
|
|
338
|
-
status: 1,
|
|
339
|
-
reason: `${error}`
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
277
|
/**
|
|
344
278
|
* Used for generating AVM proofs.
|
|
345
279
|
* It is assumed that the working directory is a temporary and/or random directory used solely for generating this proof.
|
|
@@ -649,7 +583,7 @@ export async function generateContractForVerificationKey(pathToBB, vkFilePath, c
|
|
|
649
583
|
reason: `Working directory ${workingDirectory} does not exist`
|
|
650
584
|
};
|
|
651
585
|
}
|
|
652
|
-
// The bytecode is written to e.g. /workingDirectory/
|
|
586
|
+
// The bytecode is written to e.g. /workingDirectory/ParityBaseArtifact-bytecode
|
|
653
587
|
const bytecodePath = `${workingDirectory}/${circuitName}-bytecode`;
|
|
654
588
|
const binaryPresent = await fs.access(pathToBB, fs.constants.R_OK).then((_)=>true).catch((_)=>false);
|
|
655
589
|
if (!binaryPresent) {
|
package/dest/honk.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ServerProtocolArtifact } from '@aztec/noir-protocol-circuits-types/server';
|
|
2
2
|
export type UltraHonkFlavor = 'ultra_honk' | 'ultra_keccak_honk' | 'ultra_starknet_honk' | 'ultra_rollup_honk';
|
|
3
3
|
declare const UltraKeccakHonkCircuits: ["RootRollupArtifact"];
|
|
4
|
-
declare const UltraHonkCircuits: ["
|
|
4
|
+
declare const UltraHonkCircuits: ["ParityBaseArtifact", "ParityRootArtifact"];
|
|
5
5
|
export type UltraKeccakHonkServerProtocolArtifact = (typeof UltraKeccakHonkCircuits)[number];
|
|
6
6
|
export type UltraHonkServerProtocolArtifact = (typeof UltraHonkCircuits)[number];
|
|
7
7
|
export type UltraRollupHonkServerProtocolArtifact = Exclude<Exclude<ServerProtocolArtifact, UltraKeccakHonkServerProtocolArtifact>, UltraHonkServerProtocolArtifact>;
|
package/dest/honk.js
CHANGED
|
@@ -2,8 +2,8 @@ const UltraKeccakHonkCircuits = [
|
|
|
2
2
|
'RootRollupArtifact'
|
|
3
3
|
];
|
|
4
4
|
const UltraHonkCircuits = [
|
|
5
|
-
'
|
|
6
|
-
'
|
|
5
|
+
'ParityBaseArtifact',
|
|
6
|
+
'ParityRootArtifact'
|
|
7
7
|
];
|
|
8
8
|
export function getUltraHonkFlavorForCircuit(artifact) {
|
|
9
9
|
// STARKNET: how to allow for the distinction between keccak/starknet? ultra_keccak_honk is returned in both cases
|
|
@@ -21,7 +21,7 @@ export declare class ProverInstrumentation {
|
|
|
21
21
|
* @param circuitName - The name of the circuit
|
|
22
22
|
* @param timerOrMS - The duration
|
|
23
23
|
*/
|
|
24
|
-
recordDuration(metric: 'simulationDuration' | 'witGenDuration' | 'provingDuration', circuitName: CircuitName
|
|
24
|
+
recordDuration(metric: 'simulationDuration' | 'witGenDuration' | 'provingDuration', circuitName: CircuitName, timerOrMS: Timer | number): void;
|
|
25
25
|
/**
|
|
26
26
|
* Records the duration of an AVM circuit operation.
|
|
27
27
|
* @param metric - The metric to record
|
|
@@ -35,7 +35,7 @@ export declare class ProverInstrumentation {
|
|
|
35
35
|
* @param circuitName - The name of the circuit
|
|
36
36
|
* @param size - The size
|
|
37
37
|
*/
|
|
38
|
-
recordSize(metric: 'witGenInputSize' | 'witGenOutputSize' | 'proofSize' | 'circuitSize' | 'circuitPublicInputCount', circuitName: CircuitName
|
|
38
|
+
recordSize(metric: 'witGenInputSize' | 'witGenOutputSize' | 'proofSize' | 'circuitSize' | 'circuitPublicInputCount', circuitName: CircuitName, size: number): void;
|
|
39
39
|
/**
|
|
40
40
|
* Records the size of an AVM circuit operation.
|
|
41
41
|
* @param metric - The metric to record
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../src/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,MAAM,EAEZ,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,kBAAkB,CAAY;IACtC,OAAO,CAAC,cAAc,CAAY;IAClC,OAAO,CAAC,eAAe,CAAY;IAEnC,OAAO,CAAC,eAAe,CAAQ;IAC/B,OAAO,CAAC,gBAAgB,CAAQ;IAEhC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,uBAAuB,CAAQ;IAEvC,SAAgB,MAAM,EAAE,MAAM,CAAC;gBAEnB,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM;IAmDpD;;;;;OAKG;IACH,cAAc,CACZ,MAAM,EAAE,oBAAoB,GAAG,gBAAgB,GAAG,iBAAiB,EACnE,WAAW,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../src/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,MAAM,EAEZ,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,kBAAkB,CAAY;IACtC,OAAO,CAAC,cAAc,CAAY;IAClC,OAAO,CAAC,eAAe,CAAY;IAEnC,OAAO,CAAC,eAAe,CAAQ;IAC/B,OAAO,CAAC,gBAAgB,CAAQ;IAEhC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,uBAAuB,CAAQ;IAEvC,SAAgB,MAAM,EAAE,MAAM,CAAC;gBAEnB,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM;IAmDpD;;;;;OAKG;IACH,cAAc,CACZ,MAAM,EAAE,oBAAoB,GAAG,gBAAgB,GAAG,iBAAiB,EACnE,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,KAAK,GAAG,MAAM;IAQ3B;;;;;OAKG;IACH,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,iBAAiB,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,GAAG,MAAM;IAOjH;;;;;OAKG;IACH,UAAU,CACR,MAAM,EAAE,iBAAiB,GAAG,kBAAkB,GAAG,WAAW,GAAG,aAAa,GAAG,yBAAyB,EACxG,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,MAAM;IAOd;;;;;OAKG;IACH,aAAa,CACX,MAAM,EAAE,iBAAiB,GAAG,kBAAkB,GAAG,WAAW,GAAG,aAAa,GAAG,yBAAyB,EACxG,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM;CAMf"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ArtifactProvider, type ClientProtocolArtifact } from '@aztec/noir-protocol-circuits-types/types';
|
|
2
2
|
import type { Abi, WitnessMap } from '@aztec/noir-types';
|
|
3
3
|
import type { CircuitSimulator } from '@aztec/simulator/client';
|
|
4
4
|
import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
5
5
|
import type { HidingKernelToPublicPrivateInputs, HidingKernelToRollupPrivateInputs, PrivateExecutionStep, PrivateKernelCircuitPublicInputs, PrivateKernelInitCircuitPrivateInputs, PrivateKernelInnerCircuitPrivateInputs, PrivateKernelResetCircuitPrivateInputs, PrivateKernelSimulateOutput, PrivateKernelTailCircuitPrivateInputs, PrivateKernelTailCircuitPublicInputs } from '@aztec/stdlib/kernel';
|
|
6
|
-
import type {
|
|
6
|
+
import type { ClientIvcProofWithPublicInputs } from '@aztec/stdlib/proofs';
|
|
7
7
|
export declare abstract class BBPrivateKernelProver implements PrivateKernelProver {
|
|
8
8
|
protected artifactProvider: ArtifactProvider;
|
|
9
9
|
protected simulator: CircuitSimulator;
|
|
@@ -26,7 +26,7 @@ export declare abstract class BBPrivateKernelProver implements PrivateKernelProv
|
|
|
26
26
|
toBuffer: () => Buffer;
|
|
27
27
|
}, O extends PrivateKernelCircuitPublicInputs | PrivateKernelTailCircuitPublicInputs>(inputs: I, circuitType: ClientProtocolArtifact, convertInputs: (inputs: I, abi: Abi) => WitnessMap, convertOutputs: (outputs: WitnessMap, abi: Abi) => O): Promise<PrivateKernelSimulateOutput<O>>;
|
|
28
28
|
makeEmptyKernelSimulateOutput<PublicInputsType extends PrivateKernelTailCircuitPublicInputs | PrivateKernelCircuitPublicInputs>(publicInputs: PublicInputsType, circuitType: ClientProtocolArtifact): Promise<PrivateKernelSimulateOutput<PublicInputsType>>;
|
|
29
|
-
createClientIvcProof(_executionSteps: PrivateExecutionStep[]): Promise<
|
|
29
|
+
createClientIvcProof(_executionSteps: PrivateExecutionStep[]): Promise<ClientIvcProofWithPublicInputs>;
|
|
30
30
|
computeGateCountForCircuit(_bytecode: Buffer, _circuitName: string): Promise<number>;
|
|
31
31
|
}
|
|
32
32
|
//# sourceMappingURL=bb_private_kernel_prover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bb_private_kernel_prover.d.ts","sourceRoot":"","sources":["../../../src/prover/client/bb_private_kernel_prover.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"bb_private_kernel_prover.d.ts","sourceRoot":"","sources":["../../../src/prover/client/bb_private_kernel_prover.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,sBAAs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AAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,sBAAsB;IAU9D,oBAAoB,CAAC,eAAe,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,8BAA8B,CAAC;IAItG,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAG5F"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
2
|
import { convertHidingKernelPublicInputsToWitnessMapWithAbi, convertHidingKernelToRollupInputsToWitnessMapWithAbi, convertPrivateKernelInitInputsToWitnessMapWithAbi, convertPrivateKernelInitOutputsFromWitnessMapWithAbi, convertPrivateKernelInnerInputsToWitnessMapWithAbi, convertPrivateKernelInnerOutputsFromWitnessMapWithAbi, convertPrivateKernelResetInputsToWitnessMapWithAbi, convertPrivateKernelResetOutputsFromWitnessMapWithAbi, convertPrivateKernelTailForPublicOutputsFromWitnessMapWithAbi, convertPrivateKernelTailInputsToWitnessMapWithAbi, convertPrivateKernelTailOutputsFromWitnessMapWithAbi, convertPrivateKernelTailToPublicInputsToWitnessMapWithAbi, foreignCallHandler, getPrivateKernelResetArtifactName, updateResetCircuitSampleInputs } from '@aztec/noir-protocol-circuits-types/client';
|
|
3
|
-
import { mapProtocolArtifactNameToCircuitName } from '
|
|
3
|
+
import { mapProtocolArtifactNameToCircuitName } from '@aztec/noir-protocol-circuits-types/types';
|
|
4
4
|
export class BBPrivateKernelProver {
|
|
5
5
|
artifactProvider;
|
|
6
6
|
simulator;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Logger } from '@aztec/foundation/log';
|
|
2
2
|
import type { CircuitSimulator } from '@aztec/simulator/server';
|
|
3
3
|
import { type PrivateExecutionStep } from '@aztec/stdlib/kernel';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ClientIvcProofWithPublicInputs } from '@aztec/stdlib/proofs';
|
|
5
5
|
import type { BBConfig } from '../../../config.js';
|
|
6
6
|
import { BBPrivateKernelProver } from '../bb_private_kernel_prover.js';
|
|
7
7
|
/**
|
|
@@ -16,7 +16,7 @@ export declare class BBNativePrivateKernelProver extends BBPrivateKernelProver {
|
|
|
16
16
|
private constructor();
|
|
17
17
|
static new(config: BBConfig, simulator: CircuitSimulator, log?: Logger): Promise<BBNativePrivateKernelProver>;
|
|
18
18
|
private _createClientIvcProof;
|
|
19
|
-
createClientIvcProof(executionSteps: PrivateExecutionStep[]): Promise<
|
|
19
|
+
createClientIvcProof(executionSteps: PrivateExecutionStep[]): Promise<ClientIvcProofWithPublicInputs>;
|
|
20
20
|
computeGateCountForCircuit(bytecode: Buffer, circuitName: string): Promise<number>;
|
|
21
21
|
private runInDirectory;
|
|
22
22
|
}
|
|
@@ -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,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,KAAK,oBAAoB,EAAkC,MAAM,sBAAsB,CAAC;AACjG,OAAO,KAAK,EAAE,
|
|
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,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAM3E,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,CACxC,cAAc,EAAE,oBAAoB,EAAE,GACrC,OAAO,CAAC,8BAA8B,CAAC;IAQpB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAoBxG,OAAO,CAAC,cAAc;CAavB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ArtifactProvider } from '@aztec/noir-protocol-circuits-types/types';
|
|
2
2
|
import type { CircuitSimulator } from '@aztec/simulator/client';
|
|
3
3
|
import type { PrivateExecutionStep } from '@aztec/stdlib/kernel';
|
|
4
|
-
import {
|
|
4
|
+
import { ClientIvcProofWithPublicInputs } 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;
|
|
@@ -9,7 +9,7 @@ export declare abstract class BBWASMPrivateKernelProver extends BBPrivateKernelP
|
|
|
9
9
|
private threads;
|
|
10
10
|
protected log: import("@aztec/foundation/log").Logger;
|
|
11
11
|
constructor(artifactProvider: ArtifactProvider, simulator: CircuitSimulator, threads?: number, log?: import("@aztec/foundation/log").Logger);
|
|
12
|
-
createClientIvcProof(executionSteps: PrivateExecutionStep[]): Promise<
|
|
12
|
+
createClientIvcProof(executionSteps: PrivateExecutionStep[]): Promise<ClientIvcProofWithPublicInputs>;
|
|
13
13
|
computeGateCountForCircuit(_bytecode: Buffer, _circuitName: string): Promise<number>;
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=bb_wasm_private_kernel_prover.d.ts.map
|
|
@@ -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,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,
|
|
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,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AAItE,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,CACxC,cAAc,EAAE,oBAAoB,EAAE,GACrC,OAAO,CAAC,8BAA8B,CAAC;IAqBpB,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAa3G"}
|
|
@@ -2,7 +2,7 @@ import { AztecClientBackend } from '@aztec/bb.js';
|
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
3
|
import { Timer } from '@aztec/foundation/timer';
|
|
4
4
|
import { serializeWitness } from '@aztec/noir-noirc_abi';
|
|
5
|
-
import {
|
|
5
|
+
import { ClientIvcProofWithPublicInputs } from '@aztec/stdlib/proofs';
|
|
6
6
|
import { ungzip } from 'pako';
|
|
7
7
|
import { BBPrivateKernelProver } from '../bb_private_kernel_prover.js';
|
|
8
8
|
export class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
|
|
@@ -21,16 +21,14 @@ export class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
|
|
|
21
21
|
logger: this.log.verbose,
|
|
22
22
|
wasmPath: process.env.BB_WASM_PATH
|
|
23
23
|
});
|
|
24
|
-
|
|
25
|
-
// Move this sanity check inside the wasm code and remove the vk from the return value.
|
|
26
|
-
const [proof, _vk] = await backend.prove(executionSteps.map((step)=>ungzip(serializeWitness(step.witness))), executionSteps.map((step)=>step.vk));
|
|
24
|
+
const [proof] = await backend.prove(executionSteps.map((step)=>ungzip(serializeWitness(step.witness))), executionSteps.map((step)=>step.vk));
|
|
27
25
|
await backend.destroy();
|
|
28
26
|
this.log.info(`Generated ClientIVC proof`, {
|
|
29
27
|
eventName: 'client-ivc-proof-generation',
|
|
30
28
|
duration: timer.ms(),
|
|
31
29
|
proofSize: proof.length
|
|
32
30
|
});
|
|
33
|
-
return
|
|
31
|
+
return ClientIvcProofWithPublicInputs.fromBufferArray(proof);
|
|
34
32
|
}
|
|
35
33
|
async computeGateCountForCircuit(_bytecode, _circuitName) {
|
|
36
34
|
// Note we do not pass the vk to the backend. This is unneeded for gate counts.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Logger } from '@aztec/foundation/log';
|
|
2
|
-
import {
|
|
2
|
+
import { ClientIvcProofWithPublicInputs, RecursiveProof } from '@aztec/stdlib/proofs';
|
|
3
3
|
import type { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
4
4
|
/**
|
|
5
5
|
* Create a ClientIvcProof proof file.
|
|
@@ -7,13 +7,13 @@ import type { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
|
7
7
|
* @param directory the directory to read the proof from.
|
|
8
8
|
* @returns the encapsulated client ivc proof
|
|
9
9
|
*/
|
|
10
|
-
export declare function readClientIVCProofFromOutputDirectory(directory: string): Promise<
|
|
10
|
+
export declare function readClientIVCProofFromOutputDirectory(directory: string): Promise<ClientIvcProofWithPublicInputs>;
|
|
11
11
|
/**
|
|
12
12
|
* Serialize a ClientIvcProof to a proof file.
|
|
13
13
|
*
|
|
14
14
|
* @param proof the ClientIvcProof from object
|
|
15
15
|
* @param directory the directory to write in
|
|
16
16
|
*/
|
|
17
|
-
export declare function
|
|
18
|
-
export declare function
|
|
17
|
+
export declare function writeClientIVCProofToPath(clientIvcProof: ClientIvcProofWithPublicInputs, outputPath: string): Promise<void>;
|
|
18
|
+
export declare function readProofsFromOutputDirectory<PROOF_LENGTH extends number>(directory: string, vkData: VerificationKeyData, proofLength: PROOF_LENGTH, logger: Logger): Promise<RecursiveProof<PROOF_LENGTH>>;
|
|
19
19
|
//# sourceMappingURL=proof_utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proof_utils.d.ts","sourceRoot":"","sources":["../../src/prover/proof_utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"proof_utils.d.ts","sourceRoot":"","sources":["../../src/prover/proof_utils.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,8BAA8B,EAAS,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAQ7D;;;;;GAKG;AACH,wBAAsB,qCAAqC,CAAC,SAAS,EAAE,MAAM,2CAK5E;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAAC,cAAc,EAAE,8BAA8B,EAAE,UAAU,EAAE,MAAM,iBAIjH;AAuBD,wBAAsB,6BAA6B,CAAC,YAAY,SAAS,MAAM,EAC7E,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,mBAAmB,EAC3B,WAAW,EAAE,YAAY,EACzB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CA2CvC"}
|
|
@@ -1,27 +1,42 @@
|
|
|
1
|
-
import { IPA_CLAIM_SIZE, NESTED_RECURSIVE_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, PAIRING_POINTS_SIZE, ULTRA_KECCAK_PROOF_LENGTH } from '@aztec/constants';
|
|
1
|
+
import { CIVC_PROOF_LENGTH, HIDING_KERNEL_IO_PUBLIC_INPUTS_SIZE, IPA_CLAIM_SIZE, NESTED_RECURSIVE_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, PAIRING_POINTS_SIZE, ULTRA_KECCAK_PROOF_LENGTH } from '@aztec/constants';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
-
import {
|
|
3
|
+
import { ClientIvcProofWithPublicInputs, Proof, RecursiveProof } from '@aztec/stdlib/proofs';
|
|
4
4
|
import assert from 'assert';
|
|
5
5
|
import { promises as fs } from 'fs';
|
|
6
6
|
import * as path from 'path';
|
|
7
|
-
import {
|
|
7
|
+
import { PROOF_FILENAME, PUBLIC_INPUTS_FILENAME } from '../bb/execute.js';
|
|
8
8
|
/**
|
|
9
9
|
* Create a ClientIvcProof proof file.
|
|
10
10
|
*
|
|
11
11
|
* @param directory the directory to read the proof from.
|
|
12
12
|
* @returns the encapsulated client ivc proof
|
|
13
13
|
*/ export async function readClientIVCProofFromOutputDirectory(directory) {
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const proofFilename = path.join(directory, PROOF_FILENAME);
|
|
15
|
+
const binaryProof = await fs.readFile(proofFilename);
|
|
16
|
+
const proofFields = splitBufferIntoFields(binaryProof);
|
|
17
|
+
return new ClientIvcProofWithPublicInputs(proofFields);
|
|
16
18
|
}
|
|
17
19
|
/**
|
|
18
20
|
* Serialize a ClientIvcProof to a proof file.
|
|
19
21
|
*
|
|
20
22
|
* @param proof the ClientIvcProof from object
|
|
21
23
|
* @param directory the directory to write in
|
|
22
|
-
*/ export async function
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
*/ export async function writeClientIVCProofToPath(clientIvcProof, outputPath) {
|
|
25
|
+
// NB: Don't use clientIvcProof.toBuffer here because it will include the proof length.
|
|
26
|
+
const fieldsBuf = Buffer.concat(clientIvcProof.fieldsWithPublicInputs.map((field)=>field.toBuffer()));
|
|
27
|
+
await fs.writeFile(outputPath, fieldsBuf);
|
|
28
|
+
}
|
|
29
|
+
function getNumCustomPublicInputs(proofLength, vkData) {
|
|
30
|
+
let numPublicInputs = vkData.numPublicInputs;
|
|
31
|
+
if (proofLength == CIVC_PROOF_LENGTH) {
|
|
32
|
+
numPublicInputs -= HIDING_KERNEL_IO_PUBLIC_INPUTS_SIZE;
|
|
33
|
+
} else {
|
|
34
|
+
numPublicInputs -= PAIRING_POINTS_SIZE;
|
|
35
|
+
if (proofLength == NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH) {
|
|
36
|
+
numPublicInputs -= IPA_CLAIM_SIZE;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return numPublicInputs;
|
|
25
40
|
}
|
|
26
41
|
function splitBufferIntoFields(buffer) {
|
|
27
42
|
const fields = [];
|
|
@@ -30,26 +45,28 @@ function splitBufferIntoFields(buffer) {
|
|
|
30
45
|
}
|
|
31
46
|
return fields;
|
|
32
47
|
}
|
|
33
|
-
export async function
|
|
34
|
-
|
|
35
|
-
const
|
|
48
|
+
export async function readProofsFromOutputDirectory(directory, vkData, proofLength, logger) {
|
|
49
|
+
assert(proofLength == CIVC_PROOF_LENGTH || proofLength == NESTED_RECURSIVE_PROOF_LENGTH || proofLength == NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH || proofLength == ULTRA_KECCAK_PROOF_LENGTH, `Proof length must be one of the expected proof lengths, received ${proofLength}`);
|
|
50
|
+
const publicInputsFilename = path.join(directory, PUBLIC_INPUTS_FILENAME);
|
|
51
|
+
const proofFilename = path.join(directory, PROOF_FILENAME);
|
|
52
|
+
// Handle CIVC separately because bb outputs the proof fields with public inputs for CIVC.
|
|
53
|
+
const isCIVC = proofLength == CIVC_PROOF_LENGTH;
|
|
36
54
|
const [binaryPublicInputs, binaryProof] = await Promise.all([
|
|
37
|
-
fs.readFile(publicInputsFilename),
|
|
55
|
+
isCIVC ? Buffer.alloc(0) : fs.readFile(publicInputsFilename),
|
|
38
56
|
fs.readFile(proofFilename)
|
|
39
57
|
]);
|
|
40
|
-
const
|
|
41
|
-
let
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
numPublicInputs -= IPA_CLAIM_SIZE;
|
|
58
|
+
const numPublicInputs = getNumCustomPublicInputs(proofLength, vkData);
|
|
59
|
+
let fieldsWithoutPublicInputs = splitBufferIntoFields(binaryProof);
|
|
60
|
+
if (isCIVC) {
|
|
61
|
+
fieldsWithoutPublicInputs = fieldsWithoutPublicInputs.slice(numPublicInputs);
|
|
45
62
|
}
|
|
46
|
-
assert(fieldsWithoutPublicInputs.length == proofLength, `Proof length mismatch: ${fieldsWithoutPublicInputs.length} != ${proofLength}`);
|
|
63
|
+
assert(fieldsWithoutPublicInputs.length == proofLength, `Proof fields length mismatch: ${fieldsWithoutPublicInputs.length} != ${proofLength}`);
|
|
47
64
|
// Concat binary public inputs and binary proof
|
|
48
65
|
// This buffer will have the form: [binary public inputs, binary proof]
|
|
49
66
|
const binaryProofWithPublicInputs = Buffer.concat([
|
|
50
67
|
binaryPublicInputs,
|
|
51
68
|
binaryProof
|
|
52
69
|
]);
|
|
53
|
-
logger.debug(`Circuit path: ${
|
|
70
|
+
logger.debug(`Circuit path: ${directory}, proof fields length: ${fieldsWithoutPublicInputs.length}, num public inputs: ${numPublicInputs}, circuit size: ${vkData.circuitSize}`);
|
|
54
71
|
return new RecursiveProof(fieldsWithoutPublicInputs, new Proof(binaryProofWithPublicInputs, numPublicInputs), true, proofLength);
|
|
55
72
|
}
|