@aztec/bb-prover 0.85.0 → 0.86.0
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 +1 -2
- package/dest/avm_proving_tests/avm_proving_tester.d.ts.map +1 -1
- package/dest/avm_proving_tests/avm_proving_tester.js +1 -2
- package/dest/bb/execute.d.ts +1 -1
- package/dest/bb/execute.d.ts.map +1 -1
- package/dest/bb/execute.js +18 -14
- package/dest/honk.d.ts +1 -1
- package/dest/honk.d.ts.map +1 -1
- package/dest/honk.js +1 -0
- package/dest/prover/client/bb_private_kernel_prover.d.ts.map +1 -0
- package/dest/prover/{bb_private_kernel_prover.js → client/bb_private_kernel_prover.js} +8 -11
- package/dest/prover/{bb_native_private_kernel_prover.d.ts → client/native/bb_native_private_kernel_prover.d.ts} +3 -4
- package/dest/prover/client/native/bb_native_private_kernel_prover.d.ts.map +1 -0
- package/dest/prover/{bb_native_private_kernel_prover.js → client/native/bb_native_private_kernel_prover.js} +7 -21
- package/dest/{wasm → prover/client/wasm}/bb_wasm_private_kernel_prover.d.ts +1 -1
- package/dest/prover/client/wasm/bb_wasm_private_kernel_prover.d.ts.map +1 -0
- package/dest/{wasm → prover/client/wasm}/bb_wasm_private_kernel_prover.js +3 -2
- package/dest/prover/client/wasm/bundle.d.ts.map +1 -0
- package/dest/{wasm → prover/client/wasm}/bundle.js +1 -1
- package/dest/prover/client/wasm/lazy.d.ts.map +1 -0
- package/dest/{wasm → prover/client/wasm}/lazy.js +1 -1
- package/dest/prover/index.d.ts +1 -2
- package/dest/prover/index.d.ts.map +1 -1
- package/dest/prover/index.js +1 -2
- package/dest/prover/{bb_prover.d.ts → server/bb_prover.d.ts} +2 -2
- package/dest/prover/server/bb_prover.d.ts.map +1 -0
- package/dest/prover/{bb_prover.js → server/bb_prover.js} +11 -13
- package/dest/test/test_circuit_prover.d.ts.map +1 -1
- package/dest/test/test_circuit_prover.js +2 -2
- package/package.json +18 -21
- package/src/avm_proving_tests/avm_proving_tester.ts +5 -2
- package/src/bb/execute.ts +9 -21
- package/src/honk.ts +2 -1
- package/src/prover/{bb_private_kernel_prover.ts → client/bb_private_kernel_prover.ts} +8 -11
- package/src/prover/{bb_native_private_kernel_prover.ts → client/native/bb_native_private_kernel_prover.ts} +8 -30
- package/src/{wasm → prover/client/wasm}/bb_wasm_private_kernel_prover.ts +6 -2
- package/src/{wasm → prover/client/wasm}/bundle.ts +1 -1
- package/src/{wasm → prover/client/wasm}/lazy.ts +1 -1
- package/src/prover/index.ts +1 -2
- package/src/prover/{bb_prover.ts → server/bb_prover.ts} +12 -14
- package/src/test/test_circuit_prover.ts +14 -10
- package/dest/prover/bb_native_private_kernel_prover.d.ts.map +0 -1
- package/dest/prover/bb_private_kernel_prover.d.ts.map +0 -1
- package/dest/prover/bb_prover.d.ts.map +0 -1
- package/dest/wasm/bb_wasm_private_kernel_prover.d.ts.map +0 -1
- package/dest/wasm/bundle.d.ts.map +0 -1
- package/dest/wasm/lazy.d.ts.map +0 -1
- /package/dest/prover/{bb_private_kernel_prover.d.ts → client/bb_private_kernel_prover.d.ts} +0 -0
- /package/dest/{wasm → prover/client/wasm}/bundle.d.ts +0 -0
- /package/dest/{wasm → prover/client/wasm}/lazy.d.ts +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { PublicTxSimulationTester, type TestEnqueuedCall } from '@aztec/simulator/public/fixtures';
|
|
2
|
-
import { SimpleContractDataSource } from '@aztec/simulator/server';
|
|
1
|
+
import { PublicTxSimulationTester, SimpleContractDataSource, type TestEnqueuedCall } from '@aztec/simulator/public/fixtures';
|
|
3
2
|
import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
|
|
4
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
4
|
import type { MerkleTreeWriteOperations } from '@aztec/stdlib/interfaces/server';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avm_proving_tester.d.ts","sourceRoot":"","sources":["../../src/avm_proving_tests/avm_proving_tester.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"avm_proving_tester.d.ts","sourceRoot":"","sources":["../../src/avm_proving_tests/avm_proving_tester.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,gBAAgB,EACtB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAEjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAQxD,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,SAAS,EAMf,MAAM,kBAAkB,CAAC;AAK1B,qBAAa,gBAAiB,SAAQ,wBAAwB;IAE1D,OAAO,CAAC,kBAAkB;IAC1B,OAAO,CAAC,gBAAgB;gBADhB,kBAAkB,EAAE,MAAM,EAC1B,gBAAgB,EAAE,OAAO,EACjC,UAAU,EAAE,yBAAyB,EACrC,kBAAkB,EAAE,wBAAwB,EAC5C,OAAO,CAAC,EAAE,eAAe;WAMd,GAAG,CAAC,gBAAgB,GAAE,OAAe,EAAE,OAAO,CAAC,EAAE,eAAe;IAQvE,KAAK,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAe5D,MAAM,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC;IAgBvC,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;IAWN,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,EAAE,YAAY,CAAC,EAAE,OAAO;CAWtF;AAED,qBAAa,kBAAmB,SAAQ,wBAAwB;IAE5D,OAAO,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,MAAM,EAClC,kBAAkB,EAAE,wBAAwB,EAC5C,WAAW,EAAE,yBAAyB,EACtC,OAAO,CAAC,EAAE,eAAe;WAKd,GAAG,CAAC,OAAO,CAAC,EAAE,eAAe;IAQpC,OAAO,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAU9D,QAAQ,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC;IAczC,gBAAgB,CAC3B,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;CAYpB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { PublicTxSimulationTester } from '@aztec/simulator/public/fixtures';
|
|
2
|
-
import { SimpleContractDataSource } from '@aztec/simulator/server';
|
|
1
|
+
import { PublicTxSimulationTester, SimpleContractDataSource } from '@aztec/simulator/public/fixtures';
|
|
3
2
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
3
|
import { makeAvmCircuitInputs } from '@aztec/stdlib/testing';
|
|
5
4
|
import { VerificationKeyData } from '@aztec/stdlib/vks';
|
package/dest/bb/execute.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ type BBExecResult = {
|
|
|
55
55
|
* @returns The completed partial witness outputted from the circuit
|
|
56
56
|
*/
|
|
57
57
|
export declare function executeBB(pathToBB: string, command: string, args: string[], logger: LogFn, timeout?: number, resultParser?: (code: number) => boolean): Promise<BBExecResult>;
|
|
58
|
-
export declare function executeBbClientIvcProof(pathToBB: string, workingDirectory: string,
|
|
58
|
+
export declare function executeBbClientIvcProof(pathToBB: string, workingDirectory: string, inputsPath: string, log: LogFn, writeVk?: boolean): Promise<BBFailure | BBSuccess>;
|
|
59
59
|
/**
|
|
60
60
|
* Used for generating proofs of noir circuits.
|
|
61
61
|
* 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,kBAAkB,mBAAmB,CAAC;AACnD,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AACtD,eAAO,MAAM,6BAA6B,8BAA8B,CAAC;AACzE,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AACzD,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AACpD,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AACxD,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAClE,eAAO,MAAM,0BAA0B,UAAU,CAAC;AAElD,oBAAY,SAAS;IACnB,OAAO,IAAA;IACP,OAAO,IAAA;IACP,eAAe,IAAA;CAChB;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC,eAAe,CAAC;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM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E,eAAe,GAAG,WAAW,EACrC,GAAG,EAAE,KAAK,GACT,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CA0DhC"}
|
package/dest/bb/execute.js
CHANGED
|
@@ -86,7 +86,7 @@ export var BB_RESULT = /*#__PURE__*/ function(BB_RESULT) {
|
|
|
86
86
|
signal: undefined
|
|
87
87
|
}));
|
|
88
88
|
}
|
|
89
|
-
export async function executeBbClientIvcProof(pathToBB, workingDirectory,
|
|
89
|
+
export async function executeBbClientIvcProof(pathToBB, workingDirectory, inputsPath, log, writeVk = false) {
|
|
90
90
|
// Check that the working directory exists
|
|
91
91
|
try {
|
|
92
92
|
await fs.access(workingDirectory);
|
|
@@ -107,28 +107,23 @@ export async function executeBbClientIvcProof(pathToBB, workingDirectory, byteco
|
|
|
107
107
|
}
|
|
108
108
|
try {
|
|
109
109
|
// Write the bytecode to the working directory
|
|
110
|
-
log(`
|
|
111
|
-
|
|
110
|
+
log(`inputsPath ${inputsPath}`);
|
|
111
|
+
const timer = new Timer();
|
|
112
|
+
const logFunction = (message)=>{
|
|
113
|
+
log(`bb - ${message}`);
|
|
114
|
+
};
|
|
112
115
|
const args = [
|
|
113
116
|
'-o',
|
|
114
117
|
outputPath,
|
|
115
|
-
'
|
|
116
|
-
|
|
117
|
-
'-w',
|
|
118
|
-
witnessStackPath,
|
|
118
|
+
'--ivc_inputs_path',
|
|
119
|
+
inputsPath,
|
|
119
120
|
'-v',
|
|
120
121
|
'--scheme',
|
|
121
|
-
'client_ivc'
|
|
122
|
-
'--input_type',
|
|
123
|
-
'runtime_stack'
|
|
122
|
+
'client_ivc'
|
|
124
123
|
];
|
|
125
124
|
if (writeVk) {
|
|
126
125
|
args.push('--write_vk');
|
|
127
126
|
}
|
|
128
|
-
const timer = new Timer();
|
|
129
|
-
const logFunction = (message)=>{
|
|
130
|
-
log(`bb - ${message}`);
|
|
131
|
-
};
|
|
132
127
|
const result = await executeBB(pathToBB, 'prove', args, logFunction);
|
|
133
128
|
const durationMs = timer.ms();
|
|
134
129
|
if (result.status == 0) {
|
|
@@ -173,6 +168,15 @@ function getArgs(flavor) {
|
|
|
173
168
|
'keccak'
|
|
174
169
|
];
|
|
175
170
|
}
|
|
171
|
+
case 'ultra_starknet_honk':
|
|
172
|
+
{
|
|
173
|
+
return [
|
|
174
|
+
'--scheme',
|
|
175
|
+
'ultra_honk',
|
|
176
|
+
'--oracle_hash',
|
|
177
|
+
'starknet'
|
|
178
|
+
];
|
|
179
|
+
}
|
|
176
180
|
case 'ultra_rollup_honk':
|
|
177
181
|
{
|
|
178
182
|
return [
|
package/dest/honk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ServerProtocolArtifact } from '@aztec/noir-protocol-circuits-types/server';
|
|
2
|
-
export type UltraHonkFlavor = 'ultra_honk' | 'ultra_keccak_honk' | 'ultra_rollup_honk';
|
|
2
|
+
export type UltraHonkFlavor = 'ultra_honk' | 'ultra_keccak_honk' | 'ultra_starknet_honk' | 'ultra_rollup_honk';
|
|
3
3
|
declare const UltraKeccakHonkCircuits: ["RootRollupArtifact"];
|
|
4
4
|
declare const UltraHonkCircuits: ["BaseParityArtifact", "RootParityArtifact"];
|
|
5
5
|
export type UltraKeccakHonkServerProtocolArtifact = (typeof UltraKeccakHonkCircuits)[number];
|
package/dest/honk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"honk.d.ts","sourceRoot":"","sources":["../src/honk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAEzF,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"honk.d.ts","sourceRoot":"","sources":["../src/honk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAEzF,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,mBAAmB,GAAG,qBAAqB,GAAG,mBAAmB,CAAC;AAE/G,QAAA,MAAM,uBAAuB,wBAAqE,CAAC;AACnG,QAAA,MAAM,iBAAiB,8CAA2F,CAAC;AAEnH,MAAM,MAAM,qCAAqC,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC7F,MAAM,MAAM,+BAA+B,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AACjF,MAAM,MAAM,qCAAqC,GAAG,OAAO,CACzD,OAAO,CAAC,sBAAsB,EAAE,qCAAqC,CAAC,EACtE,+BAA+B,CAChC,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,qCAAqC,GAAG,mBAAmB,CAAC;AACnH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,+BAA+B,GAAG,YAAY,CAAC;AACtG,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,qCAAqC,GAAG,mBAAmB,CAAC;AACnH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,sBAAsB,GAAG,eAAe,CAAC"}
|
package/dest/honk.js
CHANGED
|
@@ -6,6 +6,7 @@ const UltraHonkCircuits = [
|
|
|
6
6
|
'RootParityArtifact'
|
|
7
7
|
];
|
|
8
8
|
export function getUltraHonkFlavorForCircuit(artifact) {
|
|
9
|
+
// STARKNET: how to allow for the distinction between keccak/starknet? ultra_keccak_honk is returned in both cases
|
|
9
10
|
if (isUltraKeccakHonkCircuit(artifact)) {
|
|
10
11
|
return 'ultra_keccak_honk';
|
|
11
12
|
} else if (UltraHonkCircuits.includes(artifact)) {
|
|
@@ -0,0 +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,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1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
-
import { Timer } from '@aztec/foundation/timer';
|
|
3
2
|
import { convertPrivateKernelInitInputsToWitnessMapWithAbi, convertPrivateKernelInitOutputsFromWitnessMapWithAbi, convertPrivateKernelInnerInputsToWitnessMapWithAbi, convertPrivateKernelInnerOutputsFromWitnessMapWithAbi, convertPrivateKernelResetInputsToWitnessMapWithAbi, convertPrivateKernelResetOutputsFromWitnessMapWithAbi, convertPrivateKernelTailForPublicOutputsFromWitnessMapWithAbi, convertPrivateKernelTailInputsToWitnessMapWithAbi, convertPrivateKernelTailOutputsFromWitnessMapWithAbi, convertPrivateKernelTailToPublicInputsToWitnessMapWithAbi, foreignCallHandler, getPrivateKernelResetArtifactName, updateResetCircuitSampleInputs } from '@aztec/noir-protocol-circuits-types/client';
|
|
4
|
-
import { mapProtocolArtifactNameToCircuitName } from '
|
|
3
|
+
import { mapProtocolArtifactNameToCircuitName } from '../../stats.js';
|
|
5
4
|
export class BBPrivateKernelProver {
|
|
6
5
|
artifactProvider;
|
|
7
6
|
simulationProvider;
|
|
@@ -49,7 +48,6 @@ export class BBPrivateKernelProver {
|
|
|
49
48
|
async simulateCircuitOutput(inputs, circuitType, convertInputs, convertOutputs) {
|
|
50
49
|
const compiledCircuit = await this.artifactProvider.getSimulatedClientCircuitArtifactByName(circuitType);
|
|
51
50
|
const witnessMap = convertInputs(inputs, compiledCircuit.abi);
|
|
52
|
-
const timer = new Timer();
|
|
53
51
|
const outputWitness = await this.simulationProvider.executeProtocolCircuit(witnessMap, compiledCircuit, foreignCallHandler).catch((err)=>{
|
|
54
52
|
this.log.debug(`Failed to simulate ${circuitType}`, {
|
|
55
53
|
circuitName: mapProtocolArtifactNameToCircuitName(circuitType),
|
|
@@ -57,11 +55,11 @@ export class BBPrivateKernelProver {
|
|
|
57
55
|
});
|
|
58
56
|
throw err;
|
|
59
57
|
});
|
|
60
|
-
const output = convertOutputs(outputWitness, compiledCircuit.abi);
|
|
58
|
+
const output = convertOutputs(outputWitness.witness, compiledCircuit.abi);
|
|
61
59
|
this.log.debug(`Simulated ${circuitType}`, {
|
|
62
60
|
eventName: 'circuit-simulation',
|
|
63
61
|
circuitName: mapProtocolArtifactNameToCircuitName(circuitType),
|
|
64
|
-
duration:
|
|
62
|
+
duration: outputWitness.duration,
|
|
65
63
|
inputSize: inputs.toBuffer().length,
|
|
66
64
|
outputSize: output.toBuffer().length
|
|
67
65
|
});
|
|
@@ -71,22 +69,21 @@ export class BBPrivateKernelProver {
|
|
|
71
69
|
this.log.debug(`Generating witness for ${circuitType}`);
|
|
72
70
|
const compiledCircuit = await this.artifactProvider.getClientCircuitArtifactByName(circuitType);
|
|
73
71
|
const witnessMap = convertInputs(inputs, compiledCircuit.abi);
|
|
74
|
-
const timer = new Timer();
|
|
75
72
|
const outputWitness = await this.simulationProvider.executeProtocolCircuit(witnessMap, compiledCircuit, foreignCallHandler);
|
|
76
|
-
const output = convertOutputs(outputWitness, compiledCircuit.abi);
|
|
73
|
+
const output = convertOutputs(outputWitness.witness, compiledCircuit.abi);
|
|
77
74
|
this.log.debug(`Generated witness for ${circuitType}`, {
|
|
78
75
|
eventName: 'circuit-witness-generation',
|
|
79
76
|
circuitName: mapProtocolArtifactNameToCircuitName(circuitType),
|
|
80
|
-
duration:
|
|
77
|
+
duration: outputWitness.duration,
|
|
81
78
|
inputSize: inputs.toBuffer().length,
|
|
82
79
|
outputSize: output.toBuffer().length
|
|
83
80
|
});
|
|
84
|
-
const verificationKey =
|
|
81
|
+
const verificationKey = await this.artifactProvider.getCircuitVkByName(circuitType);
|
|
85
82
|
const bytecode = Buffer.from(compiledCircuit.bytecode, 'base64');
|
|
86
83
|
const kernelOutput = {
|
|
87
84
|
publicInputs: output,
|
|
88
85
|
verificationKey,
|
|
89
|
-
outputWitness,
|
|
86
|
+
outputWitness: outputWitness.witness,
|
|
90
87
|
bytecode
|
|
91
88
|
};
|
|
92
89
|
return kernelOutput;
|
|
@@ -94,7 +91,7 @@ export class BBPrivateKernelProver {
|
|
|
94
91
|
async makeEmptyKernelSimulateOutput(publicInputs, circuitType) {
|
|
95
92
|
const kernelProofOutput = {
|
|
96
93
|
publicInputs,
|
|
97
|
-
verificationKey:
|
|
94
|
+
verificationKey: await this.artifactProvider.getCircuitVkByName(circuitType),
|
|
98
95
|
outputWitness: new Map(),
|
|
99
96
|
bytecode: Buffer.from([])
|
|
100
97
|
};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
/// <reference types="node" resolution-mode="require"/>
|
|
3
3
|
import { type Logger } from '@aztec/foundation/log';
|
|
4
4
|
import type { SimulationProvider } from '@aztec/simulator/server';
|
|
5
|
-
import type
|
|
5
|
+
import { type PrivateExecutionStep } from '@aztec/stdlib/kernel';
|
|
6
6
|
import type { ClientIvcProof } from '@aztec/stdlib/proofs';
|
|
7
|
-
import type { BBConfig } from '
|
|
8
|
-
import { BBPrivateKernelProver } from '
|
|
7
|
+
import type { BBConfig } from '../../../config.js';
|
|
8
|
+
import { BBPrivateKernelProver } from '../bb_private_kernel_prover.js';
|
|
9
9
|
/**
|
|
10
10
|
* This proof creator implementation uses the native bb binary.
|
|
11
11
|
*/
|
|
@@ -17,7 +17,6 @@ export declare class BBNativePrivateKernelProver extends BBPrivateKernelProver {
|
|
|
17
17
|
protected log: Logger;
|
|
18
18
|
private constructor();
|
|
19
19
|
static new(config: BBConfig, simulationProvider: SimulationProvider, log?: Logger): Promise<BBNativePrivateKernelProver>;
|
|
20
|
-
private _createClientIvcProofFiles;
|
|
21
20
|
private _createClientIvcProof;
|
|
22
21
|
createClientIvcProof(executionSteps: PrivateExecutionStep[]): Promise<ClientIvcProof>;
|
|
23
22
|
computeGateCountForCircuit(bytecode: Buffer, circuitName: string): Promise<number>;
|
|
@@ -0,0 +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,13 +1,12 @@
|
|
|
1
1
|
import { runInDirectory } from '@aztec/foundation/fs';
|
|
2
2
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
-
import { serializeWitness } from '@aztec/noir-noirc_abi';
|
|
4
3
|
import { BundleArtifactProvider } from '@aztec/noir-protocol-circuits-types/client/bundle';
|
|
5
|
-
import {
|
|
4
|
+
import { serializePrivateExecutionSteps } from '@aztec/stdlib/kernel';
|
|
6
5
|
import { promises as fs } from 'fs';
|
|
7
6
|
import path from 'path';
|
|
8
|
-
import { BB_RESULT, computeGateCountForCircuit, executeBbClientIvcProof } from '
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { BB_RESULT, computeGateCountForCircuit, executeBbClientIvcProof } from '../../../bb/execute.js';
|
|
8
|
+
import { readClientIVCProofFromOutputDirectory } from '../../proof_utils.js';
|
|
9
|
+
import { BBPrivateKernelProver } from '../bb_private_kernel_prover.js';
|
|
11
10
|
/**
|
|
12
11
|
* This proof creator implementation uses the native bb binary.
|
|
13
12
|
*/ export class BBNativePrivateKernelProver extends BBPrivateKernelProver {
|
|
@@ -25,23 +24,10 @@ import { readClientIVCProofFromOutputDirectory } from './proof_utils.js';
|
|
|
25
24
|
});
|
|
26
25
|
return new BBNativePrivateKernelProver(config.bbBinaryPath, config.bbWorkingDirectory, !!config.bbSkipCleanup, simulationProvider, log);
|
|
27
26
|
}
|
|
28
|
-
// TODO(#7371): This is duplicated.
|
|
29
|
-
// Longer term we won't use this hacked together msgpack format
|
|
30
|
-
// Leaving duplicated as this eventually bb will provide a serialization
|
|
31
|
-
// helper for passing to a generic msgpack RPC endpoint.
|
|
32
|
-
async _createClientIvcProofFiles(directory, executionSteps) {
|
|
33
|
-
const acirPath = path.join(directory, 'acir.msgpack');
|
|
34
|
-
const witnessPath = path.join(directory, 'witnesses.msgpack');
|
|
35
|
-
await fs.writeFile(acirPath, encode(executionSteps.map((map)=>map.bytecode)));
|
|
36
|
-
await fs.writeFile(witnessPath, encode(executionSteps.map((map)=>serializeWitness(map.witness))));
|
|
37
|
-
return {
|
|
38
|
-
acirPath,
|
|
39
|
-
witnessPath
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
27
|
async _createClientIvcProof(directory, executionSteps) {
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
const inputsPath = path.join(directory, 'ivc-inputs.msgpack');
|
|
29
|
+
await fs.writeFile(inputsPath, serializePrivateExecutionSteps(executionSteps));
|
|
30
|
+
const provingResult = await executeBbClientIvcProof(this.bbBinaryPath, directory, inputsPath, this.log.info);
|
|
45
31
|
if (provingResult.status === BB_RESULT.FAILURE) {
|
|
46
32
|
this.log.error(`Failed to generate client ivc proof`);
|
|
47
33
|
throw new Error(provingResult.reason);
|
|
@@ -4,7 +4,7 @@ import type { ArtifactProvider } from '@aztec/noir-protocol-circuits-types/types
|
|
|
4
4
|
import type { SimulationProvider } from '@aztec/simulator/client';
|
|
5
5
|
import type { PrivateExecutionStep } from '@aztec/stdlib/kernel';
|
|
6
6
|
import { ClientIvcProof } from '@aztec/stdlib/proofs';
|
|
7
|
-
import { BBPrivateKernelProver } from '../
|
|
7
|
+
import { BBPrivateKernelProver } from '../bb_private_kernel_prover.js';
|
|
8
8
|
export declare abstract class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
|
|
9
9
|
protected artifactProvider: ArtifactProvider;
|
|
10
10
|
protected simulationProvider: SimulationProvider;
|
|
@@ -0,0 +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"}
|
|
@@ -4,7 +4,7 @@ import { Timer } from '@aztec/foundation/timer';
|
|
|
4
4
|
import { serializeWitness } from '@aztec/noir-noirc_abi';
|
|
5
5
|
import { ClientIvcProof } from '@aztec/stdlib/proofs';
|
|
6
6
|
import { ungzip } from 'pako';
|
|
7
|
-
import { BBPrivateKernelProver } from '../
|
|
7
|
+
import { BBPrivateKernelProver } from '../bb_private_kernel_prover.js';
|
|
8
8
|
export class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
|
|
9
9
|
artifactProvider;
|
|
10
10
|
simulationProvider;
|
|
@@ -23,7 +23,7 @@ export class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
|
|
|
23
23
|
});
|
|
24
24
|
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1297): the vk is not provided to the network anymore.
|
|
25
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))));
|
|
26
|
+
const [proof, _vk] = await backend.prove(executionSteps.map((step)=>ungzip(serializeWitness(step.witness))), executionSteps.map((step)=>step.vk));
|
|
27
27
|
await backend.destroy();
|
|
28
28
|
this.log.info(`Generated ClientIVC proof`, {
|
|
29
29
|
eventName: 'client-ivc-proof-generation',
|
|
@@ -33,6 +33,7 @@ export class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
|
|
|
33
33
|
return new ClientIvcProof(Buffer.from(proof));
|
|
34
34
|
}
|
|
35
35
|
async computeGateCountForCircuit(_bytecode, _circuitName) {
|
|
36
|
+
// Note we do not pass the vk to the backend. This is unneeded for gate counts.
|
|
36
37
|
const backend = new AztecClientBackend([
|
|
37
38
|
ungzip(_bytecode)
|
|
38
39
|
], {
|
|
@@ -0,0 +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"}
|
|
@@ -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 =
|
|
5
|
+
constructor(simulationProvider, threads = 16, log = createLogger('bb-prover:wasm:bundle')){
|
|
6
6
|
super(new BundleArtifactProvider(), simulationProvider, threads, log);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
@@ -0,0 +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"}
|
|
@@ -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 =
|
|
5
|
+
constructor(simulationProvider, threads = 16, log = createLogger('bb-prover:wasm:lazy')){
|
|
6
6
|
super(new LazyArtifactProvider(), simulationProvider, threads, log);
|
|
7
7
|
}
|
|
8
8
|
}
|
package/dest/prover/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prover/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prover/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}
|
package/dest/prover/index.js
CHANGED
|
@@ -7,8 +7,8 @@ import { Proof } from '@aztec/stdlib/proofs';
|
|
|
7
7
|
import type { BaseOrMergeRollupPublicInputs, BlockMergeRollupInputs, BlockRootOrBlockMergePublicInputs, BlockRootRollupInputs, EmptyBlockRootRollupInputs, MergeRollupInputs, PrivateBaseRollupInputs, PublicBaseRollupInputs, RootRollupInputs, RootRollupPublicInputs, SingleTxBlockRootRollupInputs, TubeInputs } from '@aztec/stdlib/rollup';
|
|
8
8
|
import type { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
9
9
|
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
10
|
-
import type { ACVMConfig, BBConfig } from '
|
|
11
|
-
import { type UltraHonkFlavor } from '
|
|
10
|
+
import type { ACVMConfig, BBConfig } from '../../config.js';
|
|
11
|
+
import { type UltraHonkFlavor } from '../../honk.js';
|
|
12
12
|
export interface BBProverConfig extends BBConfig, ACVMConfig {
|
|
13
13
|
circuitFilter?: ServerProtocolArtifact[];
|
|
14
14
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bb_prover.d.ts","sourceRoot":"","sources":["../../../src/prover/server/bb_prover.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,0BAA0B,EAC1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,OAAO,CACR,6BAA6B,CAAC,iCAAiC,EAAE,OAAO,yCAAyC,CAAC,CACnH;IAgBD;;;;OAIG;IACU,kBAAkB,CAC7B,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,6BAA6B,CAAC,sBAAsB,CAAC,CAAC;YAkBnD,mBAAmB;YAoEnB,WAAW;YAyCX,sBAAsB;YAatB,uBAAuB;YAsBvB,cAAc;IAsCf,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,uBAAuB,CAAC,OAAO,iBAAiB,CAAC,CAAC;IA6BxG;;;;;;;;OAQG;YACW,oBAAoB;IAqDlC;;;;OAIG;IACU,WAAW,CAAC,WAAW,EAAE,sBAAsB,EAAE,KAAK,EAAE,KAAK;IAK7D,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,mBAAmB;IAMjE,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,EAAE,KAAK,EAAE,KAAK;YAMxF,qBAAqB;IA2BnC;;;;OAIG;IACH,OAAO,CAAC,gCAAgC;YAQ1B,oBAAoB;IAelC,OAAO,CAAC,cAAc;CAYvB"}
|
|
@@ -9,7 +9,6 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
9
9
|
import { runInDirectory } from '@aztec/foundation/fs';
|
|
10
10
|
import { createLogger } from '@aztec/foundation/log';
|
|
11
11
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
12
|
-
import { Timer } from '@aztec/foundation/timer';
|
|
13
12
|
import { convertBaseParityInputsToWitnessMap, convertBaseParityOutputsFromWitnessMap, convertBlockMergeRollupInputsToWitnessMap, convertBlockMergeRollupOutputsFromWitnessMap, convertBlockRootRollupInputsToWitnessMap, convertBlockRootRollupOutputsFromWitnessMap, convertEmptyBlockRootRollupInputsToWitnessMap, convertEmptyBlockRootRollupOutputsFromWitnessMap, convertMergeRollupInputsToWitnessMap, convertMergeRollupOutputsFromWitnessMap, convertPrivateBaseRollupInputsToWitnessMap, convertPrivateBaseRollupOutputsFromWitnessMap, convertPublicBaseRollupInputsToWitnessMap, convertPublicBaseRollupOutputsFromWitnessMap, convertRootParityInputsToWitnessMap, convertRootParityOutputsFromWitnessMap, convertRootRollupInputsToWitnessMap, convertRootRollupOutputsFromWitnessMap, convertSingleTxBlockRootRollupInputsToWitnessMap, convertSingleTxBlockRootRollupOutputsFromWitnessMap, getServerCircuitArtifact } from '@aztec/noir-protocol-circuits-types/server';
|
|
14
13
|
import { ServerCircuitVks } from '@aztec/noir-protocol-circuits-types/server/vks';
|
|
15
14
|
import { NativeACVMSimulator } from '@aztec/simulator/server';
|
|
@@ -20,13 +19,13 @@ import { Attributes, getTelemetryClient, trackSpan } from '@aztec/telemetry-clie
|
|
|
20
19
|
import crypto from 'crypto';
|
|
21
20
|
import { promises as fs } from 'fs';
|
|
22
21
|
import * as path from 'path';
|
|
23
|
-
import { BB_RESULT, PROOF_FILENAME, PUBLIC_INPUTS_FILENAME, VK_FILENAME, generateAvmProof, generateProof, generateTubeProof, verifyAvmProof, verifyProof } from '
|
|
24
|
-
import { getUltraHonkFlavorForCircuit } from '
|
|
25
|
-
import { ProverInstrumentation } from '
|
|
26
|
-
import { mapProtocolArtifactNameToCircuitName } from '
|
|
27
|
-
import { extractAvmVkData, extractVkData } from '
|
|
28
|
-
import { PRIVATE_TAIL_CIVC_VK, PUBLIC_TAIL_CIVC_VK } from '
|
|
29
|
-
import { readProofAsFields, writeClientIVCProofToOutputDirectory } from '
|
|
22
|
+
import { BB_RESULT, PROOF_FILENAME, PUBLIC_INPUTS_FILENAME, VK_FILENAME, generateAvmProof, generateProof, generateTubeProof, verifyAvmProof, verifyProof } from '../../bb/execute.js';
|
|
23
|
+
import { getUltraHonkFlavorForCircuit } from '../../honk.js';
|
|
24
|
+
import { ProverInstrumentation } from '../../instrumentation.js';
|
|
25
|
+
import { mapProtocolArtifactNameToCircuitName } from '../../stats.js';
|
|
26
|
+
import { extractAvmVkData, extractVkData } from '../../verification_key/verification_key_data.js';
|
|
27
|
+
import { PRIVATE_TAIL_CIVC_VK, PUBLIC_TAIL_CIVC_VK } from '../../verifier/bb_verifier.js';
|
|
28
|
+
import { readProofAsFields, writeClientIVCProofToOutputDirectory } from '../proof_utils.js';
|
|
30
29
|
const logger = createLogger('bb-prover');
|
|
31
30
|
// All `ServerCircuitArtifact` are recursive.
|
|
32
31
|
const SERVER_CIRCUIT_RECURSIVE = true;
|
|
@@ -174,17 +173,16 @@ const SERVER_CIRCUIT_RECURSIVE = true;
|
|
|
174
173
|
const artifact = getServerCircuitArtifact(circuitType);
|
|
175
174
|
logger.debug(`Generating witness data for ${circuitType}`);
|
|
176
175
|
const inputWitness = convertInput(input);
|
|
177
|
-
const timer = new Timer();
|
|
178
176
|
const foreignCallHandler = undefined; // We don't handle foreign calls in the native ACVM simulator
|
|
179
|
-
const
|
|
180
|
-
const output = convertOutput(
|
|
177
|
+
const witnessResult = await simulator.executeProtocolCircuit(inputWitness, artifact, foreignCallHandler);
|
|
178
|
+
const output = convertOutput(witnessResult.witness);
|
|
181
179
|
const circuitName = mapProtocolArtifactNameToCircuitName(circuitType);
|
|
182
|
-
this.instrumentation.recordDuration('witGenDuration', circuitName,
|
|
180
|
+
this.instrumentation.recordDuration('witGenDuration', circuitName, witnessResult.duration);
|
|
183
181
|
this.instrumentation.recordSize('witGenInputSize', circuitName, input.toBuffer().length);
|
|
184
182
|
this.instrumentation.recordSize('witGenOutputSize', circuitName, output.toBuffer().length);
|
|
185
183
|
logger.info(`Generated witness`, {
|
|
186
184
|
circuitName,
|
|
187
|
-
duration:
|
|
185
|
+
duration: witnessResult.duration,
|
|
188
186
|
inputSize: input.toBuffer().length,
|
|
189
187
|
outputSize: output.toBuffer().length,
|
|
190
188
|
eventName: 'circuit-witness-generation'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test_circuit_prover.d.ts","sourceRoot":"","sources":["../../src/test/test_circuit_prover.ts"],"names":[],"mappings":"AAAA,OAAO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ACR,6BAA6B,CAAC,6BAA6B,EAAE,OAAO,yCAAyC,CAAC,CAC/G;IAYD;;;;OAIG;IAEI,uBAAuB,CAC5B,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CACR,6BAA6B,CAAC,iCAAiC,EAAE,OAAO,yCAAyC,CAAC,CACnH;IAaY,+BAA+B,CAC1C,KAAK,EAAE,6BAA6B,GACnC,OAAO,CACR,6BAA6B,CAAC,iCAAiC,EAAE,OAAO,yCAAyC,CAAC,CACnH;IAYD;;;;OAIG;IAEI,4BAA4B,CACjC,KAAK,EAAE,0BAA0B,GAChC,OAAO,CACR,6BAA6B,CAAC,iCAAiC,EAAE,OAAO,yCAAyC,CAAC,CACnH;IAYD;;;;OAIG;IAEI,wBAAwB,CAC7B,KAAK,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"}
|
|
@@ -135,9 +135,9 @@ import { PROOF_DELAY_MS, WITGEN_DELAY_MS } from './delay_values.js';
|
|
|
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
|
-
witness = await this.wasmSimulator.executeProtocolCircuit(witnessMap, getSimulatedServerCircuitArtifact(artifactName), foreignCallHandler);
|
|
138
|
+
witness = (await this.wasmSimulator.executeProtocolCircuit(witnessMap, getSimulatedServerCircuitArtifact(artifactName), foreignCallHandler)).witness;
|
|
139
139
|
} else {
|
|
140
|
-
witness = await this.simulationProvider.executeProtocolCircuit(witnessMap, getSimulatedServerCircuitArtifact(artifactName), undefined);
|
|
140
|
+
witness = (await this.simulationProvider.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,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/bb-prover",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.86.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
7
|
-
"./wasm/bundle": "./dest/wasm/bundle.js",
|
|
8
|
-
"./wasm/lazy": "./dest/wasm/lazy.js",
|
|
9
|
-
"./
|
|
7
|
+
"./client/wasm/bundle": "./dest/prover/client/wasm/bundle.js",
|
|
8
|
+
"./client/wasm/lazy": "./dest/prover/client/wasm/lazy.js",
|
|
9
|
+
"./client/native": "./dest/prover/client/native/bb_native_private_kernel_prover.js",
|
|
10
10
|
"./verifier": "./dest/verifier/index.js",
|
|
11
11
|
"./test": "./dest/test/index.js",
|
|
12
12
|
"./config": "./dest/config.js"
|
|
@@ -28,8 +28,6 @@
|
|
|
28
28
|
"build": "yarn clean && tsc -b",
|
|
29
29
|
"build:dev": "tsc -b --watch",
|
|
30
30
|
"clean": "rm -rf ./dest .tsbuildinfo",
|
|
31
|
-
"formatting": "run -T prettier --check ./src && run -T eslint ./src",
|
|
32
|
-
"formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src",
|
|
33
31
|
"generate": "scripts/generate_civc_vks.sh",
|
|
34
32
|
"bb": "node --no-warnings ./dest/bb/index.js",
|
|
35
33
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
@@ -68,27 +66,26 @@
|
|
|
68
66
|
]
|
|
69
67
|
},
|
|
70
68
|
"dependencies": {
|
|
71
|
-
"@aztec/bb.js": "0.
|
|
72
|
-
"@aztec/constants": "0.
|
|
73
|
-
"@aztec/foundation": "0.
|
|
74
|
-
"@aztec/noir-noirc_abi": "0.
|
|
75
|
-
"@aztec/noir-protocol-circuits-types": "0.
|
|
76
|
-
"@aztec/noir-types": "0.
|
|
77
|
-
"@aztec/simulator": "0.
|
|
78
|
-
"@aztec/stdlib": "0.
|
|
79
|
-
"@aztec/telemetry-client": "0.
|
|
80
|
-
"@aztec/world-state": "0.
|
|
81
|
-
"@msgpack/msgpack": "^3.0.0-beta2",
|
|
69
|
+
"@aztec/bb.js": "0.86.0",
|
|
70
|
+
"@aztec/constants": "0.86.0",
|
|
71
|
+
"@aztec/foundation": "0.86.0",
|
|
72
|
+
"@aztec/noir-noirc_abi": "0.86.0",
|
|
73
|
+
"@aztec/noir-protocol-circuits-types": "0.86.0",
|
|
74
|
+
"@aztec/noir-types": "0.86.0",
|
|
75
|
+
"@aztec/simulator": "0.86.0",
|
|
76
|
+
"@aztec/stdlib": "0.86.0",
|
|
77
|
+
"@aztec/telemetry-client": "0.86.0",
|
|
78
|
+
"@aztec/world-state": "0.86.0",
|
|
82
79
|
"commander": "^12.1.0",
|
|
83
80
|
"pako": "^2.1.0",
|
|
84
81
|
"source-map-support": "^0.5.21",
|
|
85
82
|
"tslib": "^2.4.0"
|
|
86
83
|
},
|
|
87
84
|
"devDependencies": {
|
|
88
|
-
"@aztec/ethereum": "0.
|
|
89
|
-
"@aztec/kv-store": "0.
|
|
90
|
-
"@aztec/noir-contracts.js": "0.
|
|
91
|
-
"@aztec/protocol-contracts": "0.
|
|
85
|
+
"@aztec/ethereum": "0.86.0",
|
|
86
|
+
"@aztec/kv-store": "0.86.0",
|
|
87
|
+
"@aztec/noir-contracts.js": "0.86.0",
|
|
88
|
+
"@aztec/protocol-contracts": "0.86.0",
|
|
92
89
|
"@jest/globals": "^29.5.0",
|
|
93
90
|
"@types/jest": "^29.5.0",
|
|
94
91
|
"@types/node": "^18.7.23",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
PublicTxSimulationTester,
|
|
3
|
+
SimpleContractDataSource,
|
|
4
|
+
type TestEnqueuedCall,
|
|
5
|
+
} from '@aztec/simulator/public/fixtures';
|
|
3
6
|
import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
|
|
4
7
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
8
|
import type { MerkleTreeWriteOperations } from '@aztec/stdlib/interfaces/server';
|
package/src/bb/execute.ts
CHANGED
|
@@ -119,8 +119,7 @@ export function executeBB(
|
|
|
119
119
|
export async function executeBbClientIvcProof(
|
|
120
120
|
pathToBB: string,
|
|
121
121
|
workingDirectory: string,
|
|
122
|
-
|
|
123
|
-
witnessStackPath: string,
|
|
122
|
+
inputsPath: string,
|
|
124
123
|
log: LogFn,
|
|
125
124
|
writeVk = false,
|
|
126
125
|
): Promise<BBFailure | BBSuccess> {
|
|
@@ -144,30 +143,16 @@ export async function executeBbClientIvcProof(
|
|
|
144
143
|
|
|
145
144
|
try {
|
|
146
145
|
// Write the bytecode to the working directory
|
|
147
|
-
log(`
|
|
148
|
-
log(`outputPath ${outputPath}`);
|
|
149
|
-
const args = [
|
|
150
|
-
'-o',
|
|
151
|
-
outputPath,
|
|
152
|
-
'-b',
|
|
153
|
-
bytecodeStackPath,
|
|
154
|
-
'-w',
|
|
155
|
-
witnessStackPath,
|
|
156
|
-
'-v',
|
|
157
|
-
'--scheme',
|
|
158
|
-
'client_ivc',
|
|
159
|
-
'--input_type',
|
|
160
|
-
'runtime_stack',
|
|
161
|
-
];
|
|
162
|
-
if (writeVk) {
|
|
163
|
-
args.push('--write_vk');
|
|
164
|
-
}
|
|
165
|
-
|
|
146
|
+
log(`inputsPath ${inputsPath}`);
|
|
166
147
|
const timer = new Timer();
|
|
167
148
|
const logFunction = (message: string) => {
|
|
168
149
|
log(`bb - ${message}`);
|
|
169
150
|
};
|
|
170
151
|
|
|
152
|
+
const args = ['-o', outputPath, '--ivc_inputs_path', inputsPath, '-v', '--scheme', 'client_ivc'];
|
|
153
|
+
if (writeVk) {
|
|
154
|
+
args.push('--write_vk');
|
|
155
|
+
}
|
|
171
156
|
const result = await executeBB(pathToBB, 'prove', args, logFunction);
|
|
172
157
|
const durationMs = timer.ms();
|
|
173
158
|
|
|
@@ -199,6 +184,9 @@ function getArgs(flavor: UltraHonkFlavor) {
|
|
|
199
184
|
case 'ultra_keccak_honk': {
|
|
200
185
|
return ['--scheme', 'ultra_honk', '--oracle_hash', 'keccak'];
|
|
201
186
|
}
|
|
187
|
+
case 'ultra_starknet_honk': {
|
|
188
|
+
return ['--scheme', 'ultra_honk', '--oracle_hash', 'starknet'];
|
|
189
|
+
}
|
|
202
190
|
case 'ultra_rollup_honk': {
|
|
203
191
|
return ['--scheme', 'ultra_honk', '--oracle_hash', 'poseidon2', '--ipa_accumulation'];
|
|
204
192
|
}
|
package/src/honk.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ServerProtocolArtifact } from '@aztec/noir-protocol-circuits-types/server';
|
|
2
2
|
|
|
3
|
-
export type UltraHonkFlavor = 'ultra_honk' | 'ultra_keccak_honk' | 'ultra_rollup_honk';
|
|
3
|
+
export type UltraHonkFlavor = 'ultra_honk' | 'ultra_keccak_honk' | 'ultra_starknet_honk' | 'ultra_rollup_honk';
|
|
4
4
|
|
|
5
5
|
const UltraKeccakHonkCircuits = ['RootRollupArtifact'] as const satisfies ServerProtocolArtifact[];
|
|
6
6
|
const UltraHonkCircuits = ['BaseParityArtifact', 'RootParityArtifact'] as const satisfies ServerProtocolArtifact[];
|
|
@@ -17,6 +17,7 @@ export function getUltraHonkFlavorForCircuit(artifact: UltraHonkServerProtocolAr
|
|
|
17
17
|
export function getUltraHonkFlavorForCircuit(artifact: UltraRollupHonkServerProtocolArtifact): 'ultra_rollup_honk';
|
|
18
18
|
export function getUltraHonkFlavorForCircuit(artifact: ServerProtocolArtifact): UltraHonkFlavor;
|
|
19
19
|
export function getUltraHonkFlavorForCircuit(artifact: ServerProtocolArtifact): UltraHonkFlavor {
|
|
20
|
+
// STARKNET: how to allow for the distinction between keccak/starknet? ultra_keccak_honk is returned in both cases
|
|
20
21
|
if (isUltraKeccakHonkCircuit(artifact)) {
|
|
21
22
|
return 'ultra_keccak_honk';
|
|
22
23
|
} else if (UltraHonkCircuits.includes(artifact as UltraHonkServerProtocolArtifact)) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
-
import { Timer } from '@aztec/foundation/timer';
|
|
3
2
|
import {
|
|
4
3
|
convertPrivateKernelInitInputsToWitnessMapWithAbi,
|
|
5
4
|
convertPrivateKernelInitOutputsFromWitnessMapWithAbi,
|
|
@@ -33,7 +32,7 @@ import type { NoirCompiledCircuitWithName } from '@aztec/stdlib/noir';
|
|
|
33
32
|
import type { ClientIvcProof } from '@aztec/stdlib/proofs';
|
|
34
33
|
import type { CircuitSimulationStats, CircuitWitnessGenerationStats } from '@aztec/stdlib/stats';
|
|
35
34
|
|
|
36
|
-
import { mapProtocolArtifactNameToCircuitName } from '
|
|
35
|
+
import { mapProtocolArtifactNameToCircuitName } from '../../stats.js';
|
|
37
36
|
|
|
38
37
|
export abstract class BBPrivateKernelProver implements PrivateKernelProver {
|
|
39
38
|
constructor(
|
|
@@ -165,7 +164,6 @@ export abstract class BBPrivateKernelProver implements PrivateKernelProver {
|
|
|
165
164
|
|
|
166
165
|
const witnessMap = convertInputs(inputs, compiledCircuit.abi);
|
|
167
166
|
|
|
168
|
-
const timer = new Timer();
|
|
169
167
|
const outputWitness = await this.simulationProvider
|
|
170
168
|
.executeProtocolCircuit(witnessMap, compiledCircuit, foreignCallHandler)
|
|
171
169
|
.catch((err: Error) => {
|
|
@@ -175,12 +173,12 @@ export abstract class BBPrivateKernelProver implements PrivateKernelProver {
|
|
|
175
173
|
});
|
|
176
174
|
throw err;
|
|
177
175
|
});
|
|
178
|
-
const output = convertOutputs(outputWitness, compiledCircuit.abi);
|
|
176
|
+
const output = convertOutputs(outputWitness.witness, compiledCircuit.abi);
|
|
179
177
|
|
|
180
178
|
this.log.debug(`Simulated ${circuitType}`, {
|
|
181
179
|
eventName: 'circuit-simulation',
|
|
182
180
|
circuitName: mapProtocolArtifactNameToCircuitName(circuitType),
|
|
183
|
-
duration:
|
|
181
|
+
duration: outputWitness.duration,
|
|
184
182
|
inputSize: inputs.toBuffer().length,
|
|
185
183
|
outputSize: output.toBuffer().length,
|
|
186
184
|
} satisfies CircuitSimulationStats);
|
|
@@ -203,29 +201,28 @@ export abstract class BBPrivateKernelProver implements PrivateKernelProver {
|
|
|
203
201
|
);
|
|
204
202
|
|
|
205
203
|
const witnessMap = convertInputs(inputs, compiledCircuit.abi);
|
|
206
|
-
const timer = new Timer();
|
|
207
204
|
const outputWitness = await this.simulationProvider.executeProtocolCircuit(
|
|
208
205
|
witnessMap,
|
|
209
206
|
compiledCircuit,
|
|
210
207
|
foreignCallHandler,
|
|
211
208
|
);
|
|
212
|
-
const output = convertOutputs(outputWitness, compiledCircuit.abi);
|
|
209
|
+
const output = convertOutputs(outputWitness.witness, compiledCircuit.abi);
|
|
213
210
|
|
|
214
211
|
this.log.debug(`Generated witness for ${circuitType}`, {
|
|
215
212
|
eventName: 'circuit-witness-generation',
|
|
216
213
|
circuitName: mapProtocolArtifactNameToCircuitName(circuitType),
|
|
217
|
-
duration:
|
|
214
|
+
duration: outputWitness.duration,
|
|
218
215
|
inputSize: inputs.toBuffer().length,
|
|
219
216
|
outputSize: output.toBuffer().length,
|
|
220
217
|
} satisfies CircuitWitnessGenerationStats);
|
|
221
218
|
|
|
222
|
-
const verificationKey =
|
|
219
|
+
const verificationKey = await this.artifactProvider.getCircuitVkByName(circuitType);
|
|
223
220
|
const bytecode = Buffer.from(compiledCircuit.bytecode, 'base64');
|
|
224
221
|
|
|
225
222
|
const kernelOutput: PrivateKernelSimulateOutput<O> = {
|
|
226
223
|
publicInputs: output,
|
|
227
224
|
verificationKey,
|
|
228
|
-
outputWitness,
|
|
225
|
+
outputWitness: outputWitness.witness,
|
|
229
226
|
bytecode,
|
|
230
227
|
};
|
|
231
228
|
return kernelOutput;
|
|
@@ -236,7 +233,7 @@ export abstract class BBPrivateKernelProver implements PrivateKernelProver {
|
|
|
236
233
|
>(publicInputs: PublicInputsType, circuitType: ClientProtocolArtifact) {
|
|
237
234
|
const kernelProofOutput: PrivateKernelSimulateOutput<PublicInputsType> = {
|
|
238
235
|
publicInputs,
|
|
239
|
-
verificationKey:
|
|
236
|
+
verificationKey: await this.artifactProvider.getCircuitVkByName(circuitType),
|
|
240
237
|
outputWitness: new Map(),
|
|
241
238
|
bytecode: Buffer.from([]),
|
|
242
239
|
};
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { runInDirectory } from '@aztec/foundation/fs';
|
|
2
2
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
3
|
-
import { serializeWitness } from '@aztec/noir-noirc_abi';
|
|
4
3
|
import { BundleArtifactProvider } from '@aztec/noir-protocol-circuits-types/client/bundle';
|
|
5
4
|
import type { SimulationProvider } from '@aztec/simulator/server';
|
|
6
|
-
import type
|
|
5
|
+
import { type PrivateExecutionStep, serializePrivateExecutionSteps } from '@aztec/stdlib/kernel';
|
|
7
6
|
import type { ClientIvcProof } from '@aztec/stdlib/proofs';
|
|
8
7
|
|
|
9
|
-
import { encode } from '@msgpack/msgpack';
|
|
10
8
|
import { promises as fs } from 'fs';
|
|
11
9
|
import path from 'path';
|
|
12
10
|
|
|
13
|
-
import { BB_RESULT, computeGateCountForCircuit, executeBbClientIvcProof } from '
|
|
14
|
-
import type { BBConfig } from '
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
11
|
+
import { BB_RESULT, computeGateCountForCircuit, executeBbClientIvcProof } from '../../../bb/execute.js';
|
|
12
|
+
import type { BBConfig } from '../../../config.js';
|
|
13
|
+
import { readClientIVCProofFromOutputDirectory } from '../../proof_utils.js';
|
|
14
|
+
import { BBPrivateKernelProver } from '../bb_private_kernel_prover.js';
|
|
17
15
|
|
|
18
16
|
/**
|
|
19
17
|
* This proof creator implementation uses the native bb binary.
|
|
@@ -40,33 +38,13 @@ export class BBNativePrivateKernelProver extends BBPrivateKernelProver {
|
|
|
40
38
|
);
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
// TODO(#7371): This is duplicated.
|
|
44
|
-
// Longer term we won't use this hacked together msgpack format
|
|
45
|
-
// Leaving duplicated as this eventually bb will provide a serialization
|
|
46
|
-
// helper for passing to a generic msgpack RPC endpoint.
|
|
47
|
-
private async _createClientIvcProofFiles(directory: string, executionSteps: PrivateExecutionStep[]) {
|
|
48
|
-
const acirPath = path.join(directory, 'acir.msgpack');
|
|
49
|
-
const witnessPath = path.join(directory, 'witnesses.msgpack');
|
|
50
|
-
await fs.writeFile(acirPath, encode(executionSteps.map(map => map.bytecode)));
|
|
51
|
-
await fs.writeFile(witnessPath, encode(executionSteps.map(map => serializeWitness(map.witness))));
|
|
52
|
-
return {
|
|
53
|
-
acirPath,
|
|
54
|
-
witnessPath,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
41
|
private async _createClientIvcProof(
|
|
59
42
|
directory: string,
|
|
60
43
|
executionSteps: PrivateExecutionStep[],
|
|
61
44
|
): Promise<ClientIvcProof> {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
directory,
|
|
66
|
-
path.join(directory, 'acir.msgpack'),
|
|
67
|
-
path.join(directory, 'witnesses.msgpack'),
|
|
68
|
-
this.log.info,
|
|
69
|
-
);
|
|
45
|
+
const inputsPath = path.join(directory, 'ivc-inputs.msgpack');
|
|
46
|
+
await fs.writeFile(inputsPath, serializePrivateExecutionSteps(executionSteps));
|
|
47
|
+
const provingResult = await executeBbClientIvcProof(this.bbBinaryPath, directory, inputsPath, this.log.info);
|
|
70
48
|
|
|
71
49
|
if (provingResult.status === BB_RESULT.FAILURE) {
|
|
72
50
|
this.log.error(`Failed to generate client ivc proof`);
|
|
@@ -9,7 +9,7 @@ import { ClientIvcProof } from '@aztec/stdlib/proofs';
|
|
|
9
9
|
|
|
10
10
|
import { ungzip } from 'pako';
|
|
11
11
|
|
|
12
|
-
import { BBPrivateKernelProver } from '../
|
|
12
|
+
import { BBPrivateKernelProver } from '../bb_private_kernel_prover.js';
|
|
13
13
|
|
|
14
14
|
export abstract class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
|
|
15
15
|
constructor(
|
|
@@ -31,7 +31,10 @@ export abstract class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
|
|
|
31
31
|
|
|
32
32
|
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1297): the vk is not provided to the network anymore.
|
|
33
33
|
// Move this sanity check inside the wasm code and remove the vk from the return value.
|
|
34
|
-
const [proof, _vk] = await backend.prove(
|
|
34
|
+
const [proof, _vk] = await backend.prove(
|
|
35
|
+
executionSteps.map(step => ungzip(serializeWitness(step.witness))),
|
|
36
|
+
executionSteps.map(step => step.vk),
|
|
37
|
+
);
|
|
35
38
|
await backend.destroy();
|
|
36
39
|
this.log.info(`Generated ClientIVC proof`, {
|
|
37
40
|
eventName: 'client-ivc-proof-generation',
|
|
@@ -42,6 +45,7 @@ export abstract class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
|
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
public override async computeGateCountForCircuit(_bytecode: Buffer, _circuitName: string): Promise<number> {
|
|
48
|
+
// Note we do not pass the vk to the backend. This is unneeded for gate counts.
|
|
45
49
|
const backend = new AztecClientBackend([ungzip(_bytecode)], {
|
|
46
50
|
threads: this.threads,
|
|
47
51
|
logger: this.log.verbose,
|
|
@@ -5,7 +5,7 @@ import type { SimulationProvider } from '@aztec/simulator/client';
|
|
|
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 =
|
|
8
|
+
constructor(simulationProvider: SimulationProvider, threads = 16, log = createLogger('bb-prover:wasm:bundle')) {
|
|
9
9
|
super(new BundleArtifactProvider(), simulationProvider, threads, log);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -5,7 +5,7 @@ import type { SimulationProvider } from '@aztec/simulator/client';
|
|
|
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 =
|
|
8
|
+
constructor(simulationProvider: SimulationProvider, threads = 16, log = createLogger('bb-prover:wasm:lazy')) {
|
|
9
9
|
super(new LazyArtifactProvider(), simulationProvider, threads, log);
|
|
10
10
|
}
|
|
11
11
|
}
|
package/src/prover/index.ts
CHANGED
|
@@ -11,7 +11,6 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
11
11
|
import { runInDirectory } from '@aztec/foundation/fs';
|
|
12
12
|
import { createLogger } from '@aztec/foundation/log';
|
|
13
13
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
14
|
-
import { Timer } from '@aztec/foundation/timer';
|
|
15
14
|
import {
|
|
16
15
|
type ServerProtocolArtifact,
|
|
17
16
|
convertBaseParityInputsToWitnessMap,
|
|
@@ -84,14 +83,14 @@ import {
|
|
|
84
83
|
generateTubeProof,
|
|
85
84
|
verifyAvmProof,
|
|
86
85
|
verifyProof,
|
|
87
|
-
} from '
|
|
88
|
-
import type { ACVMConfig, BBConfig } from '
|
|
89
|
-
import { type UltraHonkFlavor, getUltraHonkFlavorForCircuit } from '
|
|
90
|
-
import { ProverInstrumentation } from '
|
|
91
|
-
import { mapProtocolArtifactNameToCircuitName } from '
|
|
92
|
-
import { extractAvmVkData, extractVkData } from '
|
|
93
|
-
import { PRIVATE_TAIL_CIVC_VK, PUBLIC_TAIL_CIVC_VK } from '
|
|
94
|
-
import { readProofAsFields, writeClientIVCProofToOutputDirectory } from '
|
|
86
|
+
} from '../../bb/execute.js';
|
|
87
|
+
import type { ACVMConfig, BBConfig } from '../../config.js';
|
|
88
|
+
import { type UltraHonkFlavor, getUltraHonkFlavorForCircuit } from '../../honk.js';
|
|
89
|
+
import { ProverInstrumentation } from '../../instrumentation.js';
|
|
90
|
+
import { mapProtocolArtifactNameToCircuitName } from '../../stats.js';
|
|
91
|
+
import { extractAvmVkData, extractVkData } from '../../verification_key/verification_key_data.js';
|
|
92
|
+
import { PRIVATE_TAIL_CIVC_VK, PUBLIC_TAIL_CIVC_VK } from '../../verifier/bb_verifier.js';
|
|
93
|
+
import { readProofAsFields, writeClientIVCProofToOutputDirectory } from '../proof_utils.js';
|
|
95
94
|
|
|
96
95
|
const logger = createLogger('bb-prover');
|
|
97
96
|
|
|
@@ -415,19 +414,18 @@ export class BBNativeRollupProver implements ServerCircuitProver {
|
|
|
415
414
|
logger.debug(`Generating witness data for ${circuitType}`);
|
|
416
415
|
|
|
417
416
|
const inputWitness = convertInput(input);
|
|
418
|
-
const timer = new Timer();
|
|
419
417
|
const foreignCallHandler = undefined; // We don't handle foreign calls in the native ACVM simulator
|
|
420
|
-
const
|
|
421
|
-
const output = convertOutput(
|
|
418
|
+
const witnessResult = await simulator.executeProtocolCircuit(inputWitness, artifact, foreignCallHandler);
|
|
419
|
+
const output = convertOutput(witnessResult.witness);
|
|
422
420
|
|
|
423
421
|
const circuitName = mapProtocolArtifactNameToCircuitName(circuitType);
|
|
424
|
-
this.instrumentation.recordDuration('witGenDuration', circuitName,
|
|
422
|
+
this.instrumentation.recordDuration('witGenDuration', circuitName, witnessResult.duration);
|
|
425
423
|
this.instrumentation.recordSize('witGenInputSize', circuitName, input.toBuffer().length);
|
|
426
424
|
this.instrumentation.recordSize('witGenOutputSize', circuitName, output.toBuffer().length);
|
|
427
425
|
|
|
428
426
|
logger.info(`Generated witness`, {
|
|
429
427
|
circuitName,
|
|
430
|
-
duration:
|
|
428
|
+
duration: witnessResult.duration,
|
|
431
429
|
inputSize: input.toBuffer().length,
|
|
432
430
|
outputSize: output.toBuffer().length,
|
|
433
431
|
eventName: 'circuit-witness-generation',
|
|
@@ -356,17 +356,21 @@ export class TestCircuitProver implements ServerCircuitProver {
|
|
|
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
|
|
358
358
|
// is not provided.
|
|
359
|
-
witness =
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
359
|
+
witness = (
|
|
360
|
+
await this.wasmSimulator.executeProtocolCircuit(
|
|
361
|
+
witnessMap,
|
|
362
|
+
getSimulatedServerCircuitArtifact(artifactName),
|
|
363
|
+
foreignCallHandler,
|
|
364
|
+
)
|
|
365
|
+
).witness;
|
|
364
366
|
} else {
|
|
365
|
-
witness =
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
367
|
+
witness = (
|
|
368
|
+
await this.simulationProvider.executeProtocolCircuit(
|
|
369
|
+
witnessMap,
|
|
370
|
+
getSimulatedServerCircuitArtifact(artifactName),
|
|
371
|
+
undefined, // Native ACM simulator does not support foreign call handler
|
|
372
|
+
)
|
|
373
|
+
).witness;
|
|
370
374
|
}
|
|
371
375
|
|
|
372
376
|
const result = convertOutput(witness);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bb_native_private_kernel_prover.d.ts","sourceRoot":"","sources":["../../src/prover/bb_native_private_kernel_prover.ts"],"names":[],"mappings":";;AACA,OAAO,EAAE,K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B,EAClC,kBAAkB,EAAE,kBAAkB,EACjD,OAAO,GAAE,MAAU,EACR,GAAG,yCAAiC;IAKnC,oBAAoB,CAAC,cAAc,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAoBrF,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAY3G"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/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,SAAI,EAAE,GAAG,yCAAwC;CAG7G"}
|
package/dest/wasm/lazy.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/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,SAAI,EAAE,GAAG,yCAAsC;CAG3G"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|