@aztec/bb-prover 4.0.0-nightly.20260108 → 4.0.0-nightly.20260111
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 -1
- package/dest/avm_proving_tests/avm_proving_tester.d.ts.map +1 -1
- package/dest/avm_proving_tests/avm_proving_tester.js +2 -2
- package/dest/bb/execute.d.ts +6 -6
- package/dest/bb/execute.d.ts.map +1 -1
- package/dest/bb/execute.js +46 -75
- package/dest/instrumentation.d.ts +1 -1
- package/dest/instrumentation.d.ts.map +1 -1
- package/dest/instrumentation.js +9 -39
- package/dest/prover/server/bb_prover.d.ts +6 -9
- package/dest/prover/server/bb_prover.d.ts.map +1 -1
- package/dest/prover/server/bb_prover.js +14 -17
- package/dest/test/test_circuit_prover.d.ts +4 -4
- package/dest/test/test_circuit_prover.d.ts.map +1 -1
- package/dest/test/test_circuit_prover.js +4 -5
- package/dest/verification_key/verification_key_data.d.ts +1 -8
- package/dest/verification_key/verification_key_data.d.ts.map +1 -1
- package/dest/verification_key/verification_key_data.js +0 -19
- package/dest/verifier/bb_verifier.d.ts +1 -1
- package/dest/verifier/bb_verifier.d.ts.map +1 -1
- package/dest/verifier/bb_verifier.js +1 -4
- package/dest/verifier/queued_chonk_verifier.d.ts +1 -1
- package/dest/verifier/queued_chonk_verifier.d.ts.map +1 -1
- package/dest/verifier/queued_chonk_verifier.js +9 -40
- package/package.json +16 -16
- package/src/avm_proving_tests/avm_proving_tester.ts +2 -16
- package/src/bb/execute.ts +31 -59
- package/src/instrumentation.ts +8 -39
- package/src/prover/server/bb_prover.ts +21 -32
- package/src/test/test_circuit_prover.ts +10 -13
- package/src/verification_key/verification_key_data.ts +0 -25
- package/src/verifier/bb_verifier.ts +1 -5
- package/src/verifier/queued_chonk_verifier.ts +8 -40
|
@@ -371,7 +371,7 @@ function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
|
|
|
371
371
|
return (_apply_decs_2203_r = applyDecs2203RFactory())(targetClass, memberDecs, classDecs, parentClass);
|
|
372
372
|
}
|
|
373
373
|
var _dec, _dec1, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _initProto;
|
|
374
|
-
import { AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED,
|
|
374
|
+
import { AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED, NESTED_RECURSIVE_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, RECURSIVE_PROOF_LENGTH } from '@aztec/constants';
|
|
375
375
|
import { createLogger } from '@aztec/foundation/log';
|
|
376
376
|
import { sleep } from '@aztec/foundation/sleep';
|
|
377
377
|
import { Timer } from '@aztec/foundation/timer';
|
|
@@ -379,10 +379,9 @@ import { convertBlockMergeRollupOutputsFromWitnessMap, convertBlockMergeRollupPr
|
|
|
379
379
|
import { ProtocolCircuitVks } from '@aztec/noir-protocol-circuits-types/server/vks';
|
|
380
380
|
import { mapProtocolArtifactNameToCircuitName } from '@aztec/noir-protocol-circuits-types/types';
|
|
381
381
|
import { WASMSimulatorWithBlobs, emitCircuitSimulationStats } from '@aztec/simulator/server';
|
|
382
|
-
import {
|
|
382
|
+
import { makePublicInputsAndRecursiveProof } from '@aztec/stdlib/interfaces/server';
|
|
383
383
|
import { ProvingRequestType, makeEmptyRecursiveProof, makeRecursiveProof } from '@aztec/stdlib/proofs';
|
|
384
384
|
import { PublicChonkVerifierPublicInputs } from '@aztec/stdlib/rollup';
|
|
385
|
-
import { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
386
385
|
import { getTelemetryClient, trackSpan } from '@aztec/telemetry-client';
|
|
387
386
|
import { ProverInstrumentation } from '../instrumentation.js';
|
|
388
387
|
import { PROOF_DELAY_MS, WITGEN_DELAY_MS } from './delay_values.js';
|
|
@@ -562,9 +561,9 @@ _dec = trackSpan('TestCircuitProver.getBaseParityProof'), _dec1 = trackSpan('Tes
|
|
|
562
561
|
}
|
|
563
562
|
getAvmProof(_inputs) {
|
|
564
563
|
// We can't simulate the AVM because we don't have enough context to do so (e.g., DBs).
|
|
565
|
-
// We just return an empty proof
|
|
564
|
+
// We just return an empty proof.
|
|
566
565
|
this.logger.debug('Skipping AVM simulation in TestCircuitProver.');
|
|
567
|
-
return this.applyDelay(ProvingRequestType.PUBLIC_VM, ()=>
|
|
566
|
+
return this.applyDelay(ProvingRequestType.PUBLIC_VM, ()=>makeEmptyRecursiveProof(AVM_V2_PROOF_LENGTH_IN_FIELDS_PADDED));
|
|
568
567
|
}
|
|
569
568
|
async applyDelay(type, fn) {
|
|
570
569
|
const timer = new Timer();
|
|
@@ -5,11 +5,4 @@ import { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
|
5
5
|
* @returns The verification key data
|
|
6
6
|
*/
|
|
7
7
|
export declare function extractVkData(vkDirectoryPath: string): Promise<VerificationKeyData>;
|
|
8
|
-
|
|
9
|
-
* Reads the verification key data stored in a binary file at the specified directory location and parses into a VerificationKeyData.
|
|
10
|
-
* We do not assume any JSON file available but only the binary version, contrary to the above extractVkData() method.
|
|
11
|
-
* @param vkDirectoryPath - The directory containing the verification key binary data file.
|
|
12
|
-
* @returns The verification key data
|
|
13
|
-
*/
|
|
14
|
-
export declare function extractAvmVkData(vkDirectoryPath: string): Promise<VerificationKeyData>;
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyaWZpY2F0aW9uX2tleV9kYXRhLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdmVyaWZpY2F0aW9uX2tleS92ZXJpZmljYXRpb25fa2V5X2RhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0EsT0FBTyxFQUEyQixtQkFBbUIsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBUWpGOzs7O0dBSUc7QUFDSCx3QkFBc0IsYUFBYSxDQUFDLGVBQWUsRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLG1CQUFtQixDQUFDLENBVXpGO0FBRUQ7Ozs7O0dBS0c7QUFDSCx3QkFBc0IsZ0JBQWdCLENBQUMsZUFBZSxFQUFFLE1BQU0sR0FBRyxPQUFPLENBQUMsbUJBQW1CLENBQUMsQ0FlNUYifQ==
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyaWZpY2F0aW9uX2tleV9kYXRhLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdmVyaWZpY2F0aW9uX2tleS92ZXJpZmljYXRpb25fa2V5X2RhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUEyQixtQkFBbUIsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBT2pGOzs7O0dBSUc7QUFDSCx3QkFBc0IsYUFBYSxDQUFDLGVBQWUsRUFBRSxNQUFNLEdBQUcsT0FBTyxDQUFDLG1CQUFtQixDQUFDLENBVXpGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verification_key_data.d.ts","sourceRoot":"","sources":["../../src/verification_key/verification_key_data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verification_key_data.d.ts","sourceRoot":"","sources":["../../src/verification_key/verification_key_data.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2B,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAOjF;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAUzF"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { AVM_V2_VERIFICATION_KEY_LENGTH_IN_FIELDS_PADDED } from '@aztec/constants';
|
|
2
1
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
2
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
4
3
|
import { VerificationKeyAsFields, VerificationKeyData } from '@aztec/stdlib/vks';
|
|
5
|
-
import { strict as assert } from 'assert';
|
|
6
4
|
import { promises as fs } from 'fs';
|
|
7
5
|
import * as path from 'path';
|
|
8
6
|
import { VK_FILENAME } from '../bb/execute.js';
|
|
@@ -19,20 +17,3 @@ import { VK_FILENAME } from '../bb/execute.js';
|
|
|
19
17
|
const vkAsFields = await VerificationKeyAsFields.fromKey(fields);
|
|
20
18
|
return new VerificationKeyData(vkAsFields, rawBinary);
|
|
21
19
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Reads the verification key data stored in a binary file at the specified directory location and parses into a VerificationKeyData.
|
|
24
|
-
* We do not assume any JSON file available but only the binary version, contrary to the above extractVkData() method.
|
|
25
|
-
* @param vkDirectoryPath - The directory containing the verification key binary data file.
|
|
26
|
-
* @returns The verification key data
|
|
27
|
-
*/ export async function extractAvmVkData(vkDirectoryPath) {
|
|
28
|
-
const rawBinary = await fs.readFile(path.join(vkDirectoryPath, VK_FILENAME));
|
|
29
|
-
const numFields = rawBinary.length / Fr.SIZE_IN_BYTES;
|
|
30
|
-
assert(numFields <= AVM_V2_VERIFICATION_KEY_LENGTH_IN_FIELDS_PADDED, 'Invalid AVM verification key length');
|
|
31
|
-
const reader = BufferReader.asReader(rawBinary);
|
|
32
|
-
const fieldsArray = reader.readArray(numFields, Fr);
|
|
33
|
-
const fieldsArrayPadded = fieldsArray.concat(Array(AVM_V2_VERIFICATION_KEY_LENGTH_IN_FIELDS_PADDED - fieldsArray.length).fill(new Fr(0)));
|
|
34
|
-
const vkAsFields = await VerificationKeyAsFields.fromKey(fieldsArrayPadded);
|
|
35
|
-
// TODO(#16644): We should have a different type for AVM verification keys since we don't have circuit size or num public inputs in AVM VKs.
|
|
36
|
-
const vk = new VerificationKeyData(vkAsFields, rawBinary);
|
|
37
|
-
return vk;
|
|
38
|
-
}
|
|
@@ -15,4 +15,4 @@ export declare class BBCircuitVerifier implements ClientProtocolCircuitVerifier
|
|
|
15
15
|
verifyProofForCircuit(circuit: ServerProtocolArtifact, proof: Proof): Promise<void>;
|
|
16
16
|
verifyProof(tx: Tx): Promise<IVCProofVerificationResult>;
|
|
17
17
|
}
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmJfdmVyaWZpZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy92ZXJpZmllci9iYl92ZXJpZmllci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsS0FBSyxNQUFNLEVBQWdCLE1BQU0sdUJBQXVCLENBQUM7QUFHbEUsT0FBTyxFQUVMLEtBQUssZ0JBQWdCLEVBQ3JCLEtBQUssc0JBQXNCLEVBRTVCLE1BQU0sMkNBQTJDLENBQUM7QUFDbkQsT0FBTyxLQUFLLEVBQUUsNkJBQTZCLEVBQUUsMEJBQTBCLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUNqSCxPQUFPLEtBQUssRUFBRSxLQUFLLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUVsRCxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDdEMsT0FBTyxLQUFLLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQWE3RCxPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFJN0MscUJBQWEsaUJBQWtCLFlBQVcsNkJBQTZCO0lBRW5FLE9BQU8sQ0FBQyxNQUFNO0lBQ2QsT0FBTyxDQUFDLE1BQU07SUFGaEIsT0FBTyxlQUdIO0lBRUcsSUFBSSxJQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FFM0I7SUFFRCxPQUFvQixHQUFHLENBQUMsTUFBTSxFQUFFLFFBQVEsRUFBRSxNQUFNLFNBQXFDLDhCQU1wRjtJQUVNLHNCQUFzQixDQUFDLE9BQU8sRUFBRSxnQkFBZ0IsR0FBRyxtQkFBbUIsQ0FNNUU7SUFFWSxxQkFBcUIsQ0FBQyxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsS0FBSyxFQUFFLEtBQUssaUJBbUMvRTtJQUVZLFdBQVcsQ0FBQyxFQUFFLEVBQUUsRUFBRSxHQUFHLE9BQU8sQ0FBQywwQkFBMEIsQ0FBQyxDQTZDcEU7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bb_verifier.d.ts","sourceRoot":"","sources":["../../src/verifier/bb_verifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAE5B,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACjH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAa7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI7C,qBAAa,iBAAkB,YAAW,6BAA6B;IAEnE,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM;IAFhB,OAAO,eAGH;IAEG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3B;IAED,OAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAqC,8BAMpF;IAEM,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,GAAG,mBAAmB,CAM5E;IAEY,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,KAAK,iBAmC/E;IAEY,WAAW,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,CAAC,
|
|
1
|
+
{"version":3,"file":"bb_verifier.d.ts","sourceRoot":"","sources":["../../src/verifier/bb_verifier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAE5B,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACjH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAa7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI7C,qBAAa,iBAAkB,YAAW,6BAA6B;IAEnE,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,MAAM;IAFhB,OAAO,eAGH;IAEG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3B;IAED,OAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAqC,8BAMpF;IAEM,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,GAAG,mBAAmB,CAM5E;IAEY,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,KAAK,iBAmC/E;IAEY,WAAW,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,CAAC,CA6CpE;CACF"}
|
|
@@ -67,16 +67,13 @@ export class BBCircuitVerifier {
|
|
|
67
67
|
const circuit = tx.data.forPublic ? 'HidingKernelToPublic' : 'HidingKernelToRollup';
|
|
68
68
|
// Block below is almost copy-pasted from verifyProofForCircuit
|
|
69
69
|
const operation = async (bbWorkingDirectory)=>{
|
|
70
|
-
const logFunction = (message)=>{
|
|
71
|
-
this.logger.debug(`${proofType} BB out - ${message}`);
|
|
72
|
-
};
|
|
73
70
|
const proofPath = path.join(bbWorkingDirectory, PROOF_FILENAME);
|
|
74
71
|
await writeChonkProofToPath(tx.chonkProof.attachPublicInputs(tx.data.publicInputs().toFields()), proofPath);
|
|
75
72
|
const verificationKeyPath = path.join(bbWorkingDirectory, VK_FILENAME);
|
|
76
73
|
const verificationKey = this.getVerificationKeyData(circuit);
|
|
77
74
|
await fs.writeFile(verificationKeyPath, verificationKey.keyAsBytes);
|
|
78
75
|
const timer = new Timer();
|
|
79
|
-
const result = await verifyChonkProof(this.config.bbBinaryPath, proofPath, verificationKeyPath,
|
|
76
|
+
const result = await verifyChonkProof(this.config.bbBinaryPath, proofPath, verificationKeyPath, this.logger, this.config.bbIVCConcurrency);
|
|
80
77
|
verificationDuration = timer.ms();
|
|
81
78
|
if (result.status === BB_RESULT.FAILURE) {
|
|
82
79
|
const errorMessage = `Failed to verify ${proofType} proof for ${circuit}!`;
|
|
@@ -12,4 +12,4 @@ export declare class QueuedIVCVerifier implements ClientProtocolCircuitVerifier
|
|
|
12
12
|
verifyProof(tx: Tx): Promise<IVCProofVerificationResult>;
|
|
13
13
|
stop(): Promise<void>;
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVldWVkX2Nob25rX3ZlcmlmaWVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdmVyaWZpZXIvcXVldWVkX2Nob25rX3ZlcmlmaWVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sS0FBSyxFQUFFLDZCQUE2QixFQUFFLDBCQUEwQixFQUFFLE1BQU0saUNBQWlDLENBQUM7QUFDakgsT0FBTyxLQUFLLEVBQUUsRUFBRSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDM0MsT0FBTyxFQU1MLEtBQUssZUFBZSxFQUdyQixNQUFNLHlCQUF5QixDQUFDO0FBSWpDLE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQWlFN0MscUJBQWEsaUJBQWtCLFlBQVcsNkJBQTZCO0lBTW5FLE9BQU8sQ0FBQyxRQUFRO0lBQ2hCLE9BQU8sQ0FBQyxTQUFTO0lBQ2pCLE9BQU8sQ0FBQyxNQUFNO0lBUGhCLE9BQU8sQ0FBQyxLQUFLLENBQWM7SUFDM0IsT0FBTyxDQUFDLE9BQU8sQ0FBcUI7SUFFcEMsWUFDRSxNQUFNLEVBQUUsUUFBUSxFQUNSLFFBQVEsRUFBRSw2QkFBNkIsRUFDdkMsU0FBUyxHQUFFLGVBQXNDLEVBQ2pELE1BQU0seUNBQWtELEVBTWpFO0lBRVksV0FBVyxDQUFDLEVBQUUsRUFBRSxFQUFFLEdBQUcsT0FBTyxDQUFDLDBCQUEwQixDQUFDLENBSXBFO0lBRUQsSUFBSSxJQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FFcEI7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queued_chonk_verifier.d.ts","sourceRoot":"","sources":["../../src/verifier/queued_chonk_verifier.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACjH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAML,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"queued_chonk_verifier.d.ts","sourceRoot":"","sources":["../../src/verifier/queued_chonk_verifier.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AACjH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAML,KAAK,eAAe,EAGrB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAiE7C,qBAAa,iBAAkB,YAAW,6BAA6B;IAMnE,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,MAAM;IAPhB,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,OAAO,CAAqB;IAEpC,YACE,MAAM,EAAE,QAAQ,EACR,QAAQ,EAAE,6BAA6B,EACvC,SAAS,GAAE,eAAsC,EACjD,MAAM,yCAAkD,EAMjE;IAEY,WAAW,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAIpE;IAED,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAEpB;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
2
2
|
import { SerialQueue } from '@aztec/foundation/queue';
|
|
3
|
-
import { Attributes, Metrics,
|
|
3
|
+
import { Attributes, Metrics, getTelemetryClient } from '@aztec/telemetry-client';
|
|
4
4
|
import { createHistogram } from 'node:perf_hooks';
|
|
5
5
|
class IVCVerifierMetrics {
|
|
6
6
|
ivcVerificationHistogram;
|
|
@@ -17,46 +17,15 @@ class IVCVerifierMetrics {
|
|
|
17
17
|
aggDurationMetrics;
|
|
18
18
|
constructor(client, name = 'QueuedIVCVerifier'){
|
|
19
19
|
const meter = client.getMeter(name);
|
|
20
|
-
this.ivcVerificationHistogram = meter.createHistogram(Metrics.IVC_VERIFIER_TIME
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
valueType: ValueType.INT
|
|
24
|
-
});
|
|
25
|
-
this.ivcTotalVerificationHistogram = meter.createHistogram(Metrics.IVC_VERIFIER_TOTAL_TIME, {
|
|
26
|
-
unit: 'ms',
|
|
27
|
-
description: 'Total duration to verify chonk proofs, including serde',
|
|
28
|
-
valueType: ValueType.INT
|
|
29
|
-
});
|
|
30
|
-
this.ivcFailureCount = meter.createUpDownCounter(Metrics.IVC_VERIFIER_FAILURE_COUNT, {
|
|
31
|
-
description: 'Count of failed IVC proof verifications',
|
|
32
|
-
valueType: ValueType.INT
|
|
33
|
-
});
|
|
20
|
+
this.ivcVerificationHistogram = meter.createHistogram(Metrics.IVC_VERIFIER_TIME);
|
|
21
|
+
this.ivcTotalVerificationHistogram = meter.createHistogram(Metrics.IVC_VERIFIER_TOTAL_TIME);
|
|
22
|
+
this.ivcFailureCount = meter.createUpDownCounter(Metrics.IVC_VERIFIER_FAILURE_COUNT);
|
|
34
23
|
this.aggDurationMetrics = {
|
|
35
|
-
avg: meter.createObservableGauge(Metrics.IVC_VERIFIER_AGG_DURATION_AVG,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
max: meter.createObservableGauge(Metrics.IVC_VERIFIER_AGG_DURATION_MAX, {
|
|
41
|
-
valueType: ValueType.DOUBLE,
|
|
42
|
-
description: 'MAX ivc verification',
|
|
43
|
-
unit: 'ms'
|
|
44
|
-
}),
|
|
45
|
-
min: meter.createObservableGauge(Metrics.IVC_VERIFIER_AGG_DURATION_MIN, {
|
|
46
|
-
valueType: ValueType.DOUBLE,
|
|
47
|
-
description: 'MIN ivc verification',
|
|
48
|
-
unit: 'ms'
|
|
49
|
-
}),
|
|
50
|
-
p50: meter.createObservableGauge(Metrics.IVC_VERIFIER_AGG_DURATION_P50, {
|
|
51
|
-
valueType: ValueType.DOUBLE,
|
|
52
|
-
description: 'P50 ivc verification',
|
|
53
|
-
unit: 'ms'
|
|
54
|
-
}),
|
|
55
|
-
p90: meter.createObservableGauge(Metrics.IVC_VERIFIER_AGG_DURATION_P90, {
|
|
56
|
-
valueType: ValueType.DOUBLE,
|
|
57
|
-
description: 'P90 ivc verification',
|
|
58
|
-
unit: 'ms'
|
|
59
|
-
})
|
|
24
|
+
avg: meter.createObservableGauge(Metrics.IVC_VERIFIER_AGG_DURATION_AVG),
|
|
25
|
+
max: meter.createObservableGauge(Metrics.IVC_VERIFIER_AGG_DURATION_MAX),
|
|
26
|
+
min: meter.createObservableGauge(Metrics.IVC_VERIFIER_AGG_DURATION_MIN),
|
|
27
|
+
p50: meter.createObservableGauge(Metrics.IVC_VERIFIER_AGG_DURATION_P50),
|
|
28
|
+
p90: meter.createObservableGauge(Metrics.IVC_VERIFIER_AGG_DURATION_P90)
|
|
60
29
|
};
|
|
61
30
|
meter.addBatchObservableCallback(this.aggregate, Object.values(this.aggDurationMetrics));
|
|
62
31
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/bb-prover",
|
|
3
|
-
"version": "4.0.0-nightly.
|
|
3
|
+
"version": "4.0.0-nightly.20260111",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -69,27 +69,27 @@
|
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@aztec/bb.js": "4.0.0-nightly.
|
|
73
|
-
"@aztec/constants": "4.0.0-nightly.
|
|
74
|
-
"@aztec/foundation": "4.0.0-nightly.
|
|
75
|
-
"@aztec/noir-noirc_abi": "4.0.0-nightly.
|
|
76
|
-
"@aztec/noir-protocol-circuits-types": "4.0.0-nightly.
|
|
77
|
-
"@aztec/noir-types": "4.0.0-nightly.
|
|
78
|
-
"@aztec/simulator": "4.0.0-nightly.
|
|
79
|
-
"@aztec/stdlib": "4.0.0-nightly.
|
|
80
|
-
"@aztec/telemetry-client": "4.0.0-nightly.
|
|
81
|
-
"@aztec/world-state": "4.0.0-nightly.
|
|
72
|
+
"@aztec/bb.js": "4.0.0-nightly.20260111",
|
|
73
|
+
"@aztec/constants": "4.0.0-nightly.20260111",
|
|
74
|
+
"@aztec/foundation": "4.0.0-nightly.20260111",
|
|
75
|
+
"@aztec/noir-noirc_abi": "4.0.0-nightly.20260111",
|
|
76
|
+
"@aztec/noir-protocol-circuits-types": "4.0.0-nightly.20260111",
|
|
77
|
+
"@aztec/noir-types": "4.0.0-nightly.20260111",
|
|
78
|
+
"@aztec/simulator": "4.0.0-nightly.20260111",
|
|
79
|
+
"@aztec/stdlib": "4.0.0-nightly.20260111",
|
|
80
|
+
"@aztec/telemetry-client": "4.0.0-nightly.20260111",
|
|
81
|
+
"@aztec/world-state": "4.0.0-nightly.20260111",
|
|
82
82
|
"commander": "^12.1.0",
|
|
83
83
|
"pako": "^2.1.0",
|
|
84
84
|
"source-map-support": "^0.5.21",
|
|
85
85
|
"tslib": "^2.4.0"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@aztec/ethereum": "4.0.0-nightly.
|
|
89
|
-
"@aztec/kv-store": "4.0.0-nightly.
|
|
90
|
-
"@aztec/noir-contracts.js": "4.0.0-nightly.
|
|
91
|
-
"@aztec/noir-test-contracts.js": "4.0.0-nightly.
|
|
92
|
-
"@aztec/protocol-contracts": "4.0.0-nightly.
|
|
88
|
+
"@aztec/ethereum": "4.0.0-nightly.20260111",
|
|
89
|
+
"@aztec/kv-store": "4.0.0-nightly.20260111",
|
|
90
|
+
"@aztec/noir-contracts.js": "4.0.0-nightly.20260111",
|
|
91
|
+
"@aztec/noir-test-contracts.js": "4.0.0-nightly.20260111",
|
|
92
|
+
"@aztec/protocol-contracts": "4.0.0-nightly.20260111",
|
|
93
93
|
"@jest/globals": "^30.0.0",
|
|
94
94
|
"@types/jest": "^30.0.0",
|
|
95
95
|
"@types/node": "^22.15.17",
|
|
@@ -18,14 +18,7 @@ import fs from 'node:fs/promises';
|
|
|
18
18
|
import { tmpdir } from 'node:os';
|
|
19
19
|
import path from 'path';
|
|
20
20
|
|
|
21
|
-
import {
|
|
22
|
-
type BBResult,
|
|
23
|
-
type BBSuccess,
|
|
24
|
-
BB_RESULT,
|
|
25
|
-
VK_FILENAME,
|
|
26
|
-
generateAvmProof,
|
|
27
|
-
verifyAvmProof,
|
|
28
|
-
} from '../bb/execute.js';
|
|
21
|
+
import { type BBResult, type BBSuccess, BB_RESULT, generateAvmProof, verifyAvmProof } from '../bb/execute.js';
|
|
29
22
|
|
|
30
23
|
const BB_PATH = path.resolve('../../barretenberg/cpp/build/bin/bb-avm');
|
|
31
24
|
|
|
@@ -193,14 +186,7 @@ export class AvmProvingTester extends PublicTxSimulationTester {
|
|
|
193
186
|
return proofRes;
|
|
194
187
|
}
|
|
195
188
|
|
|
196
|
-
return await verifyAvmProof(
|
|
197
|
-
BB_PATH,
|
|
198
|
-
this.bbWorkingDirectory,
|
|
199
|
-
proofRes.proofPath!,
|
|
200
|
-
publicInputs,
|
|
201
|
-
path.join(proofRes.vkDirectoryPath!, VK_FILENAME),
|
|
202
|
-
this.logger,
|
|
203
|
-
);
|
|
189
|
+
return await verifyAvmProof(BB_PATH, this.bbWorkingDirectory, proofRes.proofPath!, publicInputs, this.logger);
|
|
204
190
|
}
|
|
205
191
|
|
|
206
192
|
public async proveVerify(avmCircuitInputs: AvmCircuitInputs, txLabel: string = 'unlabeledTx') {
|
package/src/bb/execute.ts
CHANGED
|
@@ -353,7 +353,7 @@ export async function generateAvmProof(
|
|
|
353
353
|
durationMs: duration,
|
|
354
354
|
proofPath: join(outputPath, PROOF_FILENAME),
|
|
355
355
|
pkPath: undefined,
|
|
356
|
-
vkDirectoryPath:
|
|
356
|
+
vkDirectoryPath: undefined, // AVM VK is fixed in the binary.
|
|
357
357
|
};
|
|
358
358
|
}
|
|
359
359
|
// Not a great error message here but it is difficult to decipher what comes from bb
|
|
@@ -372,7 +372,7 @@ export async function generateAvmProof(
|
|
|
372
372
|
* @param pathToBB - The full path to the bb binary
|
|
373
373
|
* @param proofFullPath - The full path to the proof to be verified
|
|
374
374
|
* @param verificationKeyPath - The full path to the circuit verification key
|
|
375
|
-
* @param
|
|
375
|
+
* @param logger - A logger
|
|
376
376
|
* @returns An object containing a result indication and duration taken
|
|
377
377
|
*/
|
|
378
378
|
export async function verifyProof(
|
|
@@ -380,16 +380,25 @@ export async function verifyProof(
|
|
|
380
380
|
proofFullPath: string,
|
|
381
381
|
verificationKeyPath: string,
|
|
382
382
|
ultraHonkFlavor: UltraHonkFlavor,
|
|
383
|
-
|
|
383
|
+
logger: Logger,
|
|
384
384
|
): Promise<BBFailure | BBSuccess> {
|
|
385
|
-
|
|
386
|
-
|
|
385
|
+
// Specify the public inputs path in the case of UH verification.
|
|
386
|
+
// Take proofFullPath and remove the suffix past the / to get the directory.
|
|
387
|
+
const proofDir = proofFullPath.substring(0, proofFullPath.lastIndexOf('/'));
|
|
388
|
+
const publicInputsFullPath = join(proofDir, '/public_inputs');
|
|
389
|
+
logger.debug(`public inputs path: ${publicInputsFullPath}`);
|
|
390
|
+
|
|
391
|
+
const args = [
|
|
392
|
+
'-p',
|
|
387
393
|
proofFullPath,
|
|
394
|
+
'-k',
|
|
388
395
|
verificationKeyPath,
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
396
|
+
'-i',
|
|
397
|
+
publicInputsFullPath,
|
|
398
|
+
'--disable_zk',
|
|
399
|
+
...getArgs(ultraHonkFlavor),
|
|
400
|
+
];
|
|
401
|
+
return await verifyProofInternal(pathToBB, `verify`, args, logger);
|
|
393
402
|
}
|
|
394
403
|
|
|
395
404
|
export async function verifyAvmProof(
|
|
@@ -397,7 +406,6 @@ export async function verifyAvmProof(
|
|
|
397
406
|
workingDirectory: string,
|
|
398
407
|
proofFullPath: string,
|
|
399
408
|
publicInputs: AvmCircuitPublicInputs,
|
|
400
|
-
verificationKeyPath: string,
|
|
401
409
|
logger: Logger,
|
|
402
410
|
): Promise<BBFailure | BBSuccess> {
|
|
403
411
|
const inputsBuffer = publicInputs.serializeWithMessagePack();
|
|
@@ -414,10 +422,8 @@ export async function verifyAvmProof(
|
|
|
414
422
|
return { status: BB_RESULT.FAILURE, reason: `Could not write avm inputs to ${avmInputsPath}` };
|
|
415
423
|
}
|
|
416
424
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
avmInputsPath,
|
|
420
|
-
]);
|
|
425
|
+
const args = ['-p', proofFullPath, '--avm-public-inputs', avmInputsPath];
|
|
426
|
+
return await verifyProofInternal(pathToBB, 'avm_verify', args, logger);
|
|
421
427
|
}
|
|
422
428
|
|
|
423
429
|
/**
|
|
@@ -425,7 +431,7 @@ export async function verifyAvmProof(
|
|
|
425
431
|
* TODO(#7370) The verification keys should be supplied separately
|
|
426
432
|
* @param pathToBB - The full path to the bb binary
|
|
427
433
|
* @param targetPath - The path to the folder with the proof, accumulator, and verification keys
|
|
428
|
-
* @param
|
|
434
|
+
* @param logger - A logger
|
|
429
435
|
* @param concurrency - The number of threads to use for the verification
|
|
430
436
|
* @returns An object containing a result indication and duration taken
|
|
431
437
|
*/
|
|
@@ -433,7 +439,7 @@ export async function verifyChonkProof(
|
|
|
433
439
|
pathToBB: string,
|
|
434
440
|
proofPath: string,
|
|
435
441
|
keyPath: string,
|
|
436
|
-
|
|
442
|
+
logger: Logger,
|
|
437
443
|
concurrency = 1,
|
|
438
444
|
): Promise<BBFailure | BBSuccess> {
|
|
439
445
|
const binaryPresent = await fs
|
|
@@ -444,43 +450,25 @@ export async function verifyChonkProof(
|
|
|
444
450
|
return { status: BB_RESULT.FAILURE, reason: `Failed to find bb binary at ${pathToBB}` };
|
|
445
451
|
}
|
|
446
452
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
const timer = new Timer();
|
|
450
|
-
const command = 'verify';
|
|
451
|
-
|
|
452
|
-
const result = await executeBB(pathToBB, command, args, log, concurrency);
|
|
453
|
-
const duration = timer.ms();
|
|
454
|
-
if (result.status == BB_RESULT.SUCCESS) {
|
|
455
|
-
return { status: BB_RESULT.SUCCESS, durationMs: duration };
|
|
456
|
-
}
|
|
457
|
-
// Not a great error message here but it is difficult to decipher what comes from bb
|
|
458
|
-
return {
|
|
459
|
-
status: BB_RESULT.FAILURE,
|
|
460
|
-
reason: `Failed to verify proof. Exit code ${result.exitCode}. Signal ${result.signal}.`,
|
|
461
|
-
retry: !!result.signal,
|
|
462
|
-
};
|
|
463
|
-
} catch (error) {
|
|
464
|
-
return { status: BB_RESULT.FAILURE, reason: `${error}` };
|
|
465
|
-
}
|
|
453
|
+
const args = ['--scheme', 'chonk', '-p', proofPath, '-k', keyPath, '-v'];
|
|
454
|
+
return await verifyProofInternal(pathToBB, 'verify', args, logger, concurrency);
|
|
466
455
|
}
|
|
467
456
|
|
|
468
457
|
/**
|
|
469
458
|
* Used for verifying proofs with BB
|
|
470
459
|
* @param pathToBB - The full path to the bb binary
|
|
471
|
-
* @param proofFullPath - The full path to the proof to be verified
|
|
472
|
-
* @param verificationKeyPath - The full path to the circuit verification key
|
|
473
460
|
* @param command - The BB command to execute (verify/avm_verify)
|
|
474
|
-
* @param
|
|
461
|
+
* @param args - The arguments to pass to the command
|
|
462
|
+
* @param logger - A logger
|
|
463
|
+
* @param concurrency - The number of threads to use for the verification
|
|
475
464
|
* @returns An object containing a result indication and duration taken
|
|
476
465
|
*/
|
|
477
466
|
async function verifyProofInternal(
|
|
478
467
|
pathToBB: string,
|
|
479
|
-
proofFullPath: string,
|
|
480
|
-
verificationKeyPath: string,
|
|
481
468
|
command: 'verify' | 'avm_verify',
|
|
469
|
+
args: string[],
|
|
482
470
|
logger: Logger,
|
|
483
|
-
|
|
471
|
+
concurrency?: number,
|
|
484
472
|
): Promise<BBFailure | BBSuccess> {
|
|
485
473
|
const binaryPresent = await fs
|
|
486
474
|
.access(pathToBB, fs.constants.R_OK)
|
|
@@ -495,28 +483,12 @@ async function verifyProofInternal(
|
|
|
495
483
|
};
|
|
496
484
|
|
|
497
485
|
try {
|
|
498
|
-
let args;
|
|
499
|
-
|
|
500
|
-
if (command == 'verify') {
|
|
501
|
-
// Specify the public inputs path in the case of UH verification.
|
|
502
|
-
// Take proofFullPath and remove the suffix past the / to get the directory.
|
|
503
|
-
const proofDir = proofFullPath.substring(0, proofFullPath.lastIndexOf('/'));
|
|
504
|
-
const publicInputsFullPath = join(proofDir, '/public_inputs');
|
|
505
|
-
logger.debug(`public inputs path: ${publicInputsFullPath}`);
|
|
506
|
-
|
|
507
|
-
args = ['-p', proofFullPath, '-k', verificationKeyPath, '-i', publicInputsFullPath, '--disable_zk', ...extraArgs];
|
|
508
|
-
} else {
|
|
509
|
-
args = ['-p', proofFullPath, '-k', verificationKeyPath, ...extraArgs];
|
|
510
|
-
}
|
|
511
|
-
|
|
512
486
|
const loggingArg =
|
|
513
487
|
logger.level === 'debug' || logger.level === 'trace' ? '-d' : logger.level === 'verbose' ? '-v' : '';
|
|
514
|
-
|
|
515
|
-
args.push(loggingArg);
|
|
516
|
-
}
|
|
488
|
+
const finalArgs = loggingArg !== '' ? [...args, loggingArg] : args;
|
|
517
489
|
|
|
518
490
|
const timer = new Timer();
|
|
519
|
-
const result = await executeBB(pathToBB, command,
|
|
491
|
+
const result = await executeBB(pathToBB, command, finalArgs, logFunction, concurrency);
|
|
520
492
|
const duration = timer.ms();
|
|
521
493
|
if (result.status == BB_RESULT.SUCCESS) {
|
|
522
494
|
return { status: BB_RESULT.SUCCESS, durationMs: duration };
|
package/src/instrumentation.ts
CHANGED
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
Metrics,
|
|
8
8
|
type TelemetryClient,
|
|
9
9
|
type Tracer,
|
|
10
|
-
ValueType,
|
|
11
10
|
} from '@aztec/telemetry-client';
|
|
12
11
|
|
|
13
12
|
/**
|
|
@@ -31,51 +30,21 @@ export class ProverInstrumentation {
|
|
|
31
30
|
this.tracer = telemetry.getTracer(name);
|
|
32
31
|
const meter = telemetry.getMeter(name);
|
|
33
32
|
|
|
34
|
-
this.simulationDuration = meter.createHistogram(Metrics.CIRCUIT_SIMULATION_DURATION
|
|
35
|
-
description: 'Records how long it takes to simulate a circuit',
|
|
36
|
-
unit: 'ms',
|
|
37
|
-
valueType: ValueType.INT,
|
|
38
|
-
});
|
|
33
|
+
this.simulationDuration = meter.createHistogram(Metrics.CIRCUIT_SIMULATION_DURATION);
|
|
39
34
|
|
|
40
|
-
this.witGenDuration = meter.createHistogram(Metrics.CIRCUIT_WITNESS_GEN_DURATION
|
|
41
|
-
description: 'Records how long it takes to generate the partial witness for a circuit',
|
|
42
|
-
unit: 's',
|
|
43
|
-
valueType: ValueType.DOUBLE,
|
|
44
|
-
});
|
|
35
|
+
this.witGenDuration = meter.createHistogram(Metrics.CIRCUIT_WITNESS_GEN_DURATION);
|
|
45
36
|
|
|
46
|
-
this.provingDuration = meter.createHistogram(Metrics.CIRCUIT_PROVING_DURATION
|
|
47
|
-
unit: 's',
|
|
48
|
-
description: 'Records how long it takes to prove a circuit',
|
|
49
|
-
valueType: ValueType.DOUBLE,
|
|
50
|
-
});
|
|
37
|
+
this.provingDuration = meter.createHistogram(Metrics.CIRCUIT_PROVING_DURATION);
|
|
51
38
|
|
|
52
|
-
this.witGenInputSize = meter.createGauge(Metrics.CIRCUIT_WITNESS_GEN_INPUT_SIZE
|
|
53
|
-
unit: 'By',
|
|
54
|
-
description: 'Records the size of the input to the witness generation',
|
|
55
|
-
valueType: ValueType.INT,
|
|
56
|
-
});
|
|
39
|
+
this.witGenInputSize = meter.createGauge(Metrics.CIRCUIT_WITNESS_GEN_INPUT_SIZE);
|
|
57
40
|
|
|
58
|
-
this.witGenOutputSize = meter.createGauge(Metrics.CIRCUIT_WITNESS_GEN_OUTPUT_SIZE
|
|
59
|
-
unit: 'By',
|
|
60
|
-
description: 'Records the size of the output of the witness generation',
|
|
61
|
-
valueType: ValueType.INT,
|
|
62
|
-
});
|
|
41
|
+
this.witGenOutputSize = meter.createGauge(Metrics.CIRCUIT_WITNESS_GEN_OUTPUT_SIZE);
|
|
63
42
|
|
|
64
|
-
this.proofSize = meter.createGauge(Metrics.CIRCUIT_PROVING_PROOF_SIZE
|
|
65
|
-
unit: 'By',
|
|
66
|
-
description: 'Records the size of the proof generated for a circuit',
|
|
67
|
-
valueType: ValueType.INT,
|
|
68
|
-
});
|
|
43
|
+
this.proofSize = meter.createGauge(Metrics.CIRCUIT_PROVING_PROOF_SIZE);
|
|
69
44
|
|
|
70
|
-
this.circuitPublicInputCount = meter.createGauge(Metrics.CIRCUIT_PUBLIC_INPUTS_COUNT
|
|
71
|
-
description: 'Records the number of public inputs in a circuit',
|
|
72
|
-
valueType: ValueType.INT,
|
|
73
|
-
});
|
|
45
|
+
this.circuitPublicInputCount = meter.createGauge(Metrics.CIRCUIT_PUBLIC_INPUTS_COUNT);
|
|
74
46
|
|
|
75
|
-
this.circuitSize = meter.createGauge(Metrics.CIRCUIT_SIZE
|
|
76
|
-
description: 'Records the size of the circuit in gates',
|
|
77
|
-
valueType: ValueType.INT,
|
|
78
|
-
});
|
|
47
|
+
this.circuitSize = meter.createGauge(Metrics.CIRCUIT_SIZE);
|
|
79
48
|
}
|
|
80
49
|
|
|
81
50
|
/**
|