@aztec/bb-prover 0.77.0-testnet-ignition.27 → 0.77.0-testnet-ignition.29
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 +25 -0
- package/dest/avm_proving_tests/avm_proving_tester.d.ts.map +1 -0
- package/dest/bb/cli.d.ts +12 -0
- package/dest/bb/cli.d.ts.map +1 -0
- package/dest/bb/execute.d.ts +140 -0
- package/dest/bb/execute.d.ts.map +1 -0
- package/dest/bb/index.d.ts +3 -0
- package/dest/bb/index.d.ts.map +1 -0
- package/dest/config.d.ts +13 -0
- package/dest/config.d.ts.map +1 -0
- package/dest/honk.d.ts +13 -0
- package/dest/honk.d.ts.map +1 -0
- package/dest/index.d.ts +8 -0
- package/dest/index.d.ts.map +1 -0
- package/dest/instrumentation.d.ts +47 -0
- package/dest/instrumentation.d.ts.map +1 -0
- package/dest/prover/bb_native_private_kernel_prover.d.ts +25 -0
- package/dest/prover/bb_native_private_kernel_prover.d.ts.map +1 -0
- package/dest/prover/bb_private_kernel_prover.d.ts +32 -0
- package/dest/prover/bb_private_kernel_prover.d.ts.map +1 -0
- package/dest/prover/bb_prover.d.ts +120 -0
- package/dest/prover/bb_prover.d.ts.map +1 -0
- package/dest/prover/client_ivc_proof_utils.d.ts +25 -0
- package/dest/prover/client_ivc_proof_utils.d.ts.map +1 -0
- package/dest/prover/index.d.ts +4 -0
- package/dest/prover/index.d.ts.map +1 -0
- package/dest/stats.d.ts +5 -0
- package/dest/stats.d.ts.map +1 -0
- package/dest/test/delay_values.d.ts +4 -0
- package/dest/test/delay_values.d.ts.map +1 -0
- package/dest/test/index.d.ts +3 -0
- package/dest/test/index.d.ts.map +1 -0
- package/dest/test/test_circuit_prover.d.ts +81 -0
- package/dest/test/test_circuit_prover.d.ts.map +1 -0
- package/dest/test/test_verifier.d.ts +6 -0
- package/dest/test/test_verifier.d.ts.map +1 -0
- package/dest/verification_key/verification_key_data.d.ts +9 -0
- package/dest/verification_key/verification_key_data.d.ts.map +1 -0
- package/dest/verifier/bb_verifier.d.ts +17 -0
- package/dest/verifier/bb_verifier.d.ts.map +1 -0
- package/dest/verifier/index.d.ts +2 -0
- package/dest/verifier/index.d.ts.map +1 -0
- package/dest/wasm/bb_wasm_private_kernel_prover.d.ts +17 -0
- package/dest/wasm/bb_wasm_private_kernel_prover.d.ts.map +1 -0
- package/dest/wasm/bundle.d.ts +6 -0
- package/dest/wasm/bundle.d.ts.map +1 -0
- package/dest/wasm/lazy.d.ts +6 -0
- package/dest/wasm/lazy.d.ts.map +1 -0
- package/package.json +15 -15
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PublicTxSimulationTester, type TestEnqueuedCall } from '@aztec/simulator/public/fixtures';
|
|
2
|
+
import { SimpleContractDataSource, WorldStateDB } from '@aztec/simulator/server';
|
|
3
|
+
import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
|
|
4
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
+
import type { MerkleTreeWriteOperations } from '@aztec/stdlib/interfaces/server';
|
|
6
|
+
import { type BBResult, type BBSuccess } from '../bb/execute.js';
|
|
7
|
+
export declare class AvmProvingTester extends PublicTxSimulationTester {
|
|
8
|
+
private bbWorkingDirectory;
|
|
9
|
+
private checkCircuitOnly;
|
|
10
|
+
constructor(bbWorkingDirectory: string, checkCircuitOnly: boolean, worldStateDB: WorldStateDB, contractDataSource: SimpleContractDataSource, merkleTrees: MerkleTreeWriteOperations);
|
|
11
|
+
static create(checkCircuitOnly?: boolean): Promise<AvmProvingTester>;
|
|
12
|
+
prove(avmCircuitInputs: AvmCircuitInputs): Promise<BBResult>;
|
|
13
|
+
verify(proofRes: BBSuccess): Promise<BBResult>;
|
|
14
|
+
simProveVerify(sender: AztecAddress, setupCalls: TestEnqueuedCall[], appCalls: TestEnqueuedCall[], teardownCall: TestEnqueuedCall | undefined, expectRevert: boolean | undefined, feePayer?: AztecAddress): Promise<void>;
|
|
15
|
+
simProveVerifyAppLogic(appCall: TestEnqueuedCall, expectRevert?: boolean): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare class AvmProvingTesterV2 extends PublicTxSimulationTester {
|
|
18
|
+
private bbWorkingDirectory;
|
|
19
|
+
constructor(bbWorkingDirectory: string, worldStateDB: WorldStateDB, contractDataSource: SimpleContractDataSource, merkleTrees: MerkleTreeWriteOperations);
|
|
20
|
+
static create(): Promise<AvmProvingTesterV2>;
|
|
21
|
+
proveV2(avmCircuitInputs: AvmCircuitInputs): Promise<BBResult>;
|
|
22
|
+
verifyV2(proofRes: BBSuccess): Promise<BBResult>;
|
|
23
|
+
simProveVerifyV2(sender: AztecAddress, setupCalls: TestEnqueuedCall[], appCalls: TestEnqueuedCall[], teardownCall: TestEnqueuedCall | undefined, expectRevert: boolean | undefined, feePayer?: AztecAddress): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=avm_proving_tester.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avm_proving_tester.d.ts","sourceRoot":"","sources":["../../src/avm_proving_tests/avm_proving_tester.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,KAAK,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACnG,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACjF,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;AASjF,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,kBAA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
import type { ProtocolArtifact } from '@aztec/noir-protocol-circuits-types/types';
|
|
3
|
+
import type { NoirCompiledCircuit } from '@aztec/stdlib/noir';
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
export declare const ProtocolCircuitArtifacts: Record<ProtocolArtifact, NoirCompiledCircuit>;
|
|
6
|
+
/**
|
|
7
|
+
* Returns commander program that defines the CLI.
|
|
8
|
+
* @param log - Console logger.
|
|
9
|
+
* @returns The CLI.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getProgram(log: LogFn): Command;
|
|
12
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/bb/cli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAGlF,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,KAAK,GAAG,OAAO,CAa9C"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
4
|
+
import type { AvmCircuitInputs, AvmCircuitPublicInputs } from '@aztec/stdlib/avm';
|
|
5
|
+
import type { UltraHonkFlavor } from '../honk.js';
|
|
6
|
+
export declare const VK_FILENAME = "vk";
|
|
7
|
+
export declare const VK_FIELDS_FILENAME = "vk_fields.json";
|
|
8
|
+
export declare const PROOF_FILENAME = "proof";
|
|
9
|
+
export declare const PROOF_FIELDS_FILENAME = "proof_fields.json";
|
|
10
|
+
export declare const AVM_INPUTS_FILENAME = "avm_inputs.bin";
|
|
11
|
+
export declare const AVM_BYTECODE_FILENAME = "avm_bytecode.bin";
|
|
12
|
+
export declare const AVM_PUBLIC_INPUTS_FILENAME = "avm_public_inputs.bin";
|
|
13
|
+
export declare const AVM_HINTS_FILENAME = "avm_hints.bin";
|
|
14
|
+
export declare enum BB_RESULT {
|
|
15
|
+
SUCCESS = 0,
|
|
16
|
+
FAILURE = 1,
|
|
17
|
+
ALREADY_PRESENT = 2
|
|
18
|
+
}
|
|
19
|
+
export type BBSuccess = {
|
|
20
|
+
status: BB_RESULT.SUCCESS | BB_RESULT.ALREADY_PRESENT;
|
|
21
|
+
durationMs: number;
|
|
22
|
+
/** Full path of the public key. */
|
|
23
|
+
pkPath?: string;
|
|
24
|
+
/** Base directory for the VKs (raw, fields). */
|
|
25
|
+
vkPath?: string;
|
|
26
|
+
/** Full path of the proof. */
|
|
27
|
+
proofPath?: string;
|
|
28
|
+
/** Full path of the contract. */
|
|
29
|
+
contractPath?: string;
|
|
30
|
+
/** The number of gates in the circuit. */
|
|
31
|
+
circuitSize?: number;
|
|
32
|
+
};
|
|
33
|
+
export type BBFailure = {
|
|
34
|
+
status: BB_RESULT.FAILURE;
|
|
35
|
+
reason: string;
|
|
36
|
+
retry?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type BBResult = BBSuccess | BBFailure;
|
|
39
|
+
export type VerificationFunction = typeof verifyProof | typeof verifyAvmProof;
|
|
40
|
+
type BBExecResult = {
|
|
41
|
+
status: BB_RESULT;
|
|
42
|
+
exitCode: number;
|
|
43
|
+
signal: string | undefined;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Invokes the Barretenberg binary with the provided command and args
|
|
47
|
+
* @param pathToBB - The path to the BB binary
|
|
48
|
+
* @param command - The command to execute
|
|
49
|
+
* @param args - The arguments to pass
|
|
50
|
+
* @param logger - A log function
|
|
51
|
+
* @param resultParser - An optional handler for detecting success or failure
|
|
52
|
+
* @returns The completed partial witness outputted from the circuit
|
|
53
|
+
*/
|
|
54
|
+
export declare function executeBB(pathToBB: string, command: string, args: string[], logger: LogFn, resultParser?: (code: number) => boolean): Promise<BBExecResult>;
|
|
55
|
+
export declare function executeBbClientIvcProof(pathToBB: string, workingDirectory: string, bytecodeStackPath: string, witnessStackPath: string, log: LogFn): Promise<BBFailure | BBSuccess>;
|
|
56
|
+
/**
|
|
57
|
+
* Used for generating proofs of noir circuits.
|
|
58
|
+
* It is assumed that the working directory is a temporary and/or random directory used solely for generating this proof.
|
|
59
|
+
* @param pathToBB - The full path to the bb binary
|
|
60
|
+
* @param workingDirectory - A working directory for use by bb
|
|
61
|
+
* @param circuitName - An identifier for the circuit
|
|
62
|
+
* @param bytecode - The compiled circuit bytecode
|
|
63
|
+
* @param inputWitnessFile - The circuit input witness
|
|
64
|
+
* @param log - A logging function
|
|
65
|
+
* @returns An object containing a result indication, the location of the proof and the duration taken
|
|
66
|
+
*/
|
|
67
|
+
export declare function generateProof(pathToBB: string, workingDirectory: string, circuitName: string, bytecode: Buffer, recursive: boolean, inputWitnessFile: string, flavor: UltraHonkFlavor, log: LogFn): Promise<BBFailure | BBSuccess>;
|
|
68
|
+
/**
|
|
69
|
+
* Used for generating proofs of the tube circuit
|
|
70
|
+
* It is assumed that the working directory is a temporary and/or random directory used solely for generating this proof.
|
|
71
|
+
* @param pathToBB - The full path to the bb binary
|
|
72
|
+
* @param workingDirectory - A working directory for use by bb
|
|
73
|
+
* @param circuitName - An identifier for the circuit
|
|
74
|
+
* @param bytecode - The compiled circuit bytecode
|
|
75
|
+
* @param inputWitnessFile - The circuit input witness
|
|
76
|
+
* @param log - A logging function
|
|
77
|
+
* @returns An object containing a result indication, the location of the proof and the duration taken
|
|
78
|
+
*/
|
|
79
|
+
export declare function generateTubeProof(pathToBB: string, workingDirectory: string, log: LogFn): Promise<BBFailure | BBSuccess>;
|
|
80
|
+
/**
|
|
81
|
+
* Used for generating AVM proofs.
|
|
82
|
+
* It is assumed that the working directory is a temporary and/or random directory used solely for generating this proof.
|
|
83
|
+
* @param pathToBB - The full path to the bb binary
|
|
84
|
+
* @param workingDirectory - A working directory for use by bb
|
|
85
|
+
* @param input - The inputs for the public function to be proven
|
|
86
|
+
* @param log - A logging function
|
|
87
|
+
* @returns An object containing a result indication, the location of the proof and the duration taken
|
|
88
|
+
*/
|
|
89
|
+
export declare function generateAvmProofV2(pathToBB: string, workingDirectory: string, input: AvmCircuitInputs, logger: Logger): Promise<BBFailure | BBSuccess>;
|
|
90
|
+
/**
|
|
91
|
+
* Used for generating AVM proofs (or doing check-circuit).
|
|
92
|
+
* It is assumed that the working directory is a temporary and/or random directory used solely for generating this proof.
|
|
93
|
+
* @param pathToBB - The full path to the bb binary
|
|
94
|
+
* @param workingDirectory - A working directory for use by bb
|
|
95
|
+
* @param bytecode - The AVM bytecode for the public function to be proven (expected to be decompressed)
|
|
96
|
+
* @param log - A logging function
|
|
97
|
+
* @returns An object containing a result indication, the location of the proof and the duration taken
|
|
98
|
+
*/
|
|
99
|
+
export declare function generateAvmProof(pathToBB: string, workingDirectory: string, _input: AvmCircuitInputs, logger: Logger, checkCircuitOnly?: boolean): Promise<BBFailure | BBSuccess>;
|
|
100
|
+
/**
|
|
101
|
+
* Used for verifying proofs of noir circuits
|
|
102
|
+
* @param pathToBB - The full path to the bb binary
|
|
103
|
+
* @param proofFullPath - The full path to the proof to be verified
|
|
104
|
+
* @param verificationKeyPath - The full path to the circuit verification key
|
|
105
|
+
* @param log - A logging function
|
|
106
|
+
* @returns An object containing a result indication and duration taken
|
|
107
|
+
*/
|
|
108
|
+
export declare function verifyProof(pathToBB: string, proofFullPath: string, verificationKeyPath: string, ultraHonkFlavor: UltraHonkFlavor, log: Logger): Promise<BBFailure | BBSuccess>;
|
|
109
|
+
/**
|
|
110
|
+
* Used for verifying proofs of the AVM
|
|
111
|
+
* @param pathToBB - The full path to the bb binary
|
|
112
|
+
* @param proofFullPath - The full path to the proof to be verified
|
|
113
|
+
* @param verificationKeyPath - The full path to the circuit verification key
|
|
114
|
+
* @param log - A logging function
|
|
115
|
+
* @returns An object containing a result indication and duration taken
|
|
116
|
+
*/
|
|
117
|
+
export declare function verifyAvmProof(pathToBB: string, proofFullPath: string, verificationKeyPath: string, logger: Logger): Promise<BBFailure | BBSuccess>;
|
|
118
|
+
export declare function verifyAvmProofV2(pathToBB: string, workingDirectory: string, proofFullPath: string, publicInputs: AvmCircuitPublicInputs, verificationKeyPath: string, logger: Logger): Promise<BBFailure | BBSuccess>;
|
|
119
|
+
/**
|
|
120
|
+
* Verifies a ClientIvcProof
|
|
121
|
+
* TODO(#7370) The verification keys should be supplied separately
|
|
122
|
+
* @param pathToBB - The full path to the bb binary
|
|
123
|
+
* @param targetPath - The path to the folder with the proof, accumulator, and verification keys
|
|
124
|
+
* @param log - A logging function
|
|
125
|
+
* @returns An object containing a result indication and duration taken
|
|
126
|
+
*/
|
|
127
|
+
export declare function verifyClientIvcProof(pathToBB: string, proofPath: string, keyPath: string, log: LogFn): Promise<BBFailure | BBSuccess>;
|
|
128
|
+
export declare function generateContractForVerificationKey(pathToBB: string, vkFilePath: string, contractPath: string, log: LogFn): Promise<BBFailure | BBSuccess>;
|
|
129
|
+
/**
|
|
130
|
+
* Compute bb gate count for a given circuit
|
|
131
|
+
* @param pathToBB - The full path to the bb binary
|
|
132
|
+
* @param workingDirectory - A temporary directory for writing the bytecode
|
|
133
|
+
* @param circuitName - The name of the circuit
|
|
134
|
+
* @param bytecode - The bytecode of the circuit
|
|
135
|
+
* @param flavor - The flavor of the backend - mega_honk or ultra_honk variants
|
|
136
|
+
* @returns An object containing the status, gate count, and time taken
|
|
137
|
+
*/
|
|
138
|
+
export declare function computeGateCountForCircuit(pathToBB: string, workingDirectory: string, circuitName: string, bytecode: Buffer, flavor: UltraHonkFlavor | 'mega_honk', log: LogFn): Promise<BBFailure | BBSuccess>;
|
|
139
|
+
export {};
|
|
140
|
+
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -0,0 +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;AAGlD,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AACnD,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,kBAAkB,kBAAkB,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,CAAC;IAChB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC;IAC1B,MAAM,EAAE,MAAM,C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,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,KAAK,GACT,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CA8ChC;AAED;;;;;;;;GAQG;AACH,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,eAAe,GAAG,WAAW,EACrC,GAAG,EAAE,KAAK,GACT,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CA0DhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bb/index.ts"],"names":[],"mappings":";AAGA,OAAO,gCAAgC,CAAC"}
|
package/dest/config.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface BBConfig {
|
|
2
|
+
bbBinaryPath: string;
|
|
3
|
+
bbWorkingDirectory: string;
|
|
4
|
+
/** Whether to skip tmp dir cleanup for debugging purposes */
|
|
5
|
+
bbSkipCleanup: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ACVMConfig {
|
|
8
|
+
/** The path to the ACVM binary */
|
|
9
|
+
acvmBinaryPath: string;
|
|
10
|
+
/** The working directory to use for simulation/proving */
|
|
11
|
+
acvmWorkingDirectory: string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,UAAU;IACzB,kCAAkC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,oBAAoB,EAAE,MAAM,CAAC;CAC9B"}
|
package/dest/honk.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ServerProtocolArtifact } from '@aztec/noir-protocol-circuits-types/server';
|
|
2
|
+
export type UltraHonkFlavor = 'ultra_honk' | 'ultra_keccak_honk' | 'ultra_rollup_honk';
|
|
3
|
+
declare const UltraKeccakHonkCircuits: ["RootRollupArtifact"];
|
|
4
|
+
declare const UltraHonkCircuits: ["BaseParityArtifact", "RootParityArtifact"];
|
|
5
|
+
export type UltraKeccakHonkServerProtocolArtifact = (typeof UltraKeccakHonkCircuits)[number];
|
|
6
|
+
export type UltraHonkServerProtocolArtifact = (typeof UltraHonkCircuits)[number];
|
|
7
|
+
export type UltraRollupHonkServerProtocolArtifact = Exclude<Exclude<ServerProtocolArtifact, UltraKeccakHonkServerProtocolArtifact>, UltraHonkServerProtocolArtifact>;
|
|
8
|
+
export declare function getUltraHonkFlavorForCircuit(artifact: UltraKeccakHonkServerProtocolArtifact): 'ultra_keccak_honk';
|
|
9
|
+
export declare function getUltraHonkFlavorForCircuit(artifact: UltraHonkServerProtocolArtifact): 'ultra_honk';
|
|
10
|
+
export declare function getUltraHonkFlavorForCircuit(artifact: UltraRollupHonkServerProtocolArtifact): 'ultra_rollup_honk';
|
|
11
|
+
export declare function getUltraHonkFlavorForCircuit(artifact: ServerProtocolArtifact): UltraHonkFlavor;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=honk.d.ts.map
|
|
@@ -0,0 +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;AAEvF,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/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './prover/index.js';
|
|
2
|
+
export * from './test/index.js';
|
|
3
|
+
export * from './verifier/index.js';
|
|
4
|
+
export * from './config.js';
|
|
5
|
+
export * from './bb/execute.js';
|
|
6
|
+
export * from './honk.js';
|
|
7
|
+
export { type ClientProtocolCircuitVerifier } from '@aztec/stdlib/interfaces/server';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Timer } from '@aztec/foundation/timer';
|
|
2
|
+
import type { CircuitName } from '@aztec/stdlib/stats';
|
|
3
|
+
import { type TelemetryClient, type Tracer } from '@aztec/telemetry-client';
|
|
4
|
+
/**
|
|
5
|
+
* Instrumentation class for Prover implementations.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ProverInstrumentation {
|
|
8
|
+
private simulationDuration;
|
|
9
|
+
private witGenDuration;
|
|
10
|
+
private provingDuration;
|
|
11
|
+
private witGenInputSize;
|
|
12
|
+
private witGenOutputSize;
|
|
13
|
+
private proofSize;
|
|
14
|
+
private circuitSize;
|
|
15
|
+
private circuitPublicInputCount;
|
|
16
|
+
readonly tracer: Tracer;
|
|
17
|
+
constructor(telemetry: TelemetryClient, name: string);
|
|
18
|
+
/**
|
|
19
|
+
* Records the duration of a circuit operation.
|
|
20
|
+
* @param metric - The metric to record
|
|
21
|
+
* @param circuitName - The name of the circuit
|
|
22
|
+
* @param timerOrMS - The duration
|
|
23
|
+
*/
|
|
24
|
+
recordDuration(metric: 'simulationDuration' | 'witGenDuration' | 'provingDuration', circuitName: CircuitName | 'tubeCircuit', timerOrMS: Timer | number): void;
|
|
25
|
+
/**
|
|
26
|
+
* Records the duration of an AVM circuit operation.
|
|
27
|
+
* @param metric - The metric to record
|
|
28
|
+
* @param appCircuitName - The name of the function circuit (should be a `contract:function` string)
|
|
29
|
+
* @param timerOrMS - The duration
|
|
30
|
+
*/
|
|
31
|
+
recordAvmDuration(metric: 'witGenDuration' | 'provingDuration', appCircuitName: string, timerOrMS: Timer | number): void;
|
|
32
|
+
/**
|
|
33
|
+
* Records the size of a circuit operation.
|
|
34
|
+
* @param metric - Records the size of a circuit operation.
|
|
35
|
+
* @param circuitName - The name of the circuit
|
|
36
|
+
* @param size - The size
|
|
37
|
+
*/
|
|
38
|
+
recordSize(metric: 'witGenInputSize' | 'witGenOutputSize' | 'proofSize' | 'circuitSize' | 'circuitPublicInputCount', circuitName: CircuitName | 'tubeCircuit', size: number): void;
|
|
39
|
+
/**
|
|
40
|
+
* Records the size of an AVM circuit operation.
|
|
41
|
+
* @param metric - The metric to record
|
|
42
|
+
* @param appCircuitName - The name of the function circuit (should be a `contract:function` string)
|
|
43
|
+
* @param size - The size
|
|
44
|
+
*/
|
|
45
|
+
recordAvmSize(metric: 'witGenInputSize' | 'witGenOutputSize' | 'proofSize' | 'circuitSize' | 'circuitPublicInputCount', appCircuitName: string, size: number): void;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../src/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,MAAM,EAEZ,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,kBAAkB,CAAY;IACtC,OAAO,CAAC,cAAc,CAAY;IAClC,OAAO,CAAC,eAAe,CAAY;IAEnC,OAAO,CAAC,eAAe,CAAQ;IAC/B,OAAO,CAAC,gBAAgB,CAAQ;IAEhC,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,uBAAuB,CAAQ;IAEvC,SAAgB,MAAM,EAAE,MAAM,CAAC;gBAEnB,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM;IAmDpD;;;;;OAKG;IACH,cAAc,CACZ,MAAM,EAAE,oBAAoB,GAAG,gBAAgB,GAAG,iBAAiB,EACnE,WAAW,EAAE,WAAW,GAAG,aAAa,EACxC,SAAS,EAAE,KAAK,GAAG,MAAM;IAS3B;;;;;OAKG;IACH,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG,iBAAiB,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,GAAG,MAAM;IAOjH;;;;;OAKG;IACH,UAAU,CACR,MAAM,EAAE,iBAAiB,GAAG,kBAAkB,GAAG,WAAW,GAAG,aAAa,GAAG,yBAAyB,EACxG,WAAW,EAAE,WAAW,GAAG,aAAa,EACxC,IAAI,EAAE,MAAM;IAQd;;;;;OAKG;IACH,aAAa,CACX,MAAM,EAAE,iBAAiB,GAAG,kBAAkB,GAAG,WAAW,GAAG,aAAa,GAAG,yBAAyB,EACxG,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM;CAMf"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
import { type Logger } from '@aztec/foundation/log';
|
|
4
|
+
import type { SimulationProvider } from '@aztec/simulator/server';
|
|
5
|
+
import type { ClientIvcProof } from '@aztec/stdlib/proofs';
|
|
6
|
+
import type { WitnessMap } from '@noir-lang/types';
|
|
7
|
+
import type { BBConfig } from '../config.js';
|
|
8
|
+
import { BBPrivateKernelProver } from './bb_private_kernel_prover.js';
|
|
9
|
+
/**
|
|
10
|
+
* This proof creator implementation uses the native bb binary.
|
|
11
|
+
*/
|
|
12
|
+
export declare class BBNativePrivateKernelProver extends BBPrivateKernelProver {
|
|
13
|
+
private bbBinaryPath;
|
|
14
|
+
private bbWorkingDirectory;
|
|
15
|
+
private skipCleanup;
|
|
16
|
+
protected simulationProvider: SimulationProvider;
|
|
17
|
+
protected log: Logger;
|
|
18
|
+
private constructor();
|
|
19
|
+
static new(config: BBConfig, simulationProvider: SimulationProvider, log?: Logger): Promise<BBNativePrivateKernelProver>;
|
|
20
|
+
private _createClientIvcProof;
|
|
21
|
+
createClientIvcProof(acirs: Buffer[], witnessStack: WitnessMap[]): Promise<ClientIvcProof>;
|
|
22
|
+
computeGateCountForCircuit(bytecode: Buffer, circuitName: string): Promise<number>;
|
|
23
|
+
private runInDirectory;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=bb_native_private_kernel_prover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAI3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAKnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAGtE;;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;IAmCb,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAQ1F,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAoBxG,OAAO,CAAC,cAAc;CAavB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
import type { ArtifactProvider, ClientProtocolArtifact } from '@aztec/noir-protocol-circuits-types/types';
|
|
4
|
+
import type { SimulationProvider } from '@aztec/simulator/client';
|
|
5
|
+
import type { PrivateKernelProver } from '@aztec/stdlib/interfaces/client';
|
|
6
|
+
import type { PrivateKernelCircuitPublicInputs, PrivateKernelInitCircuitPrivateInputs, PrivateKernelInnerCircuitPrivateInputs, PrivateKernelResetCircuitPrivateInputs, PrivateKernelSimulateOutput, PrivateKernelTailCircuitPrivateInputs, PrivateKernelTailCircuitPublicInputs } from '@aztec/stdlib/kernel';
|
|
7
|
+
import type { ClientIvcProof } from '@aztec/stdlib/proofs';
|
|
8
|
+
import type { Abi, WitnessMap } from '@noir-lang/types';
|
|
9
|
+
export declare abstract class BBPrivateKernelProver implements PrivateKernelProver {
|
|
10
|
+
protected artifactProvider: ArtifactProvider;
|
|
11
|
+
protected simulationProvider: SimulationProvider;
|
|
12
|
+
protected log: import("@aztec/foundation/log").Logger;
|
|
13
|
+
constructor(artifactProvider: ArtifactProvider, simulationProvider: SimulationProvider, log?: import("@aztec/foundation/log").Logger);
|
|
14
|
+
generateInitOutput(inputs: PrivateKernelInitCircuitPrivateInputs): Promise<PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>>;
|
|
15
|
+
simulateInit(inputs: PrivateKernelInitCircuitPrivateInputs): Promise<PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>>;
|
|
16
|
+
generateInnerOutput(inputs: PrivateKernelInnerCircuitPrivateInputs): Promise<PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>>;
|
|
17
|
+
simulateInner(inputs: PrivateKernelInnerCircuitPrivateInputs): Promise<PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>>;
|
|
18
|
+
generateResetOutput(inputs: PrivateKernelResetCircuitPrivateInputs): Promise<PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>>;
|
|
19
|
+
simulateReset(inputs: PrivateKernelResetCircuitPrivateInputs): Promise<PrivateKernelSimulateOutput<PrivateKernelCircuitPublicInputs>>;
|
|
20
|
+
generateTailOutput(inputs: PrivateKernelTailCircuitPrivateInputs): Promise<PrivateKernelSimulateOutput<PrivateKernelTailCircuitPublicInputs>>;
|
|
21
|
+
simulateTail(inputs: PrivateKernelTailCircuitPrivateInputs): Promise<PrivateKernelSimulateOutput<PrivateKernelTailCircuitPublicInputs>>;
|
|
22
|
+
simulateCircuitOutput<I extends {
|
|
23
|
+
toBuffer: () => Buffer;
|
|
24
|
+
}, O extends PrivateKernelCircuitPublicInputs | PrivateKernelTailCircuitPublicInputs>(inputs: I, circuitType: ClientProtocolArtifact, convertInputs: (inputs: I, abi: Abi) => WitnessMap, convertOutputs: (outputs: WitnessMap, abi: Abi) => O): Promise<PrivateKernelSimulateOutput<O>>;
|
|
25
|
+
generateCircuitOutput<I extends {
|
|
26
|
+
toBuffer: () => Buffer;
|
|
27
|
+
}, O extends PrivateKernelCircuitPublicInputs | PrivateKernelTailCircuitPublicInputs>(inputs: I, circuitType: ClientProtocolArtifact, convertInputs: (inputs: I, abi: Abi) => WitnessMap, convertOutputs: (outputs: WitnessMap, abi: Abi) => O): Promise<PrivateKernelSimulateOutput<O>>;
|
|
28
|
+
makeEmptyKernelSimulateOutput<PublicInputsType extends PrivateKernelTailCircuitPublicInputs | PrivateKernelCircuitPublicInputs>(publicInputs: PublicInputsType, circuitType: ClientProtocolArtifact): Promise<PrivateKernelSimulateOutput<PublicInputsType>>;
|
|
29
|
+
createClientIvcProof(_acirs: Buffer[], _witnessStack: WitnessMap[]): Promise<ClientIvcProof>;
|
|
30
|
+
computeGateCountForCircuit(_bytecode: Buffer, _circuitName: string): Promise<number>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=bb_private_kernel_prover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bb_private_kernel_prover.d.ts","sourceRoot":"","sources":["../../src/prover/bb_private_kernel_prover.ts"],"names":[],"mappings":";;AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,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AAO,CAAC,MAAM,CAAC;CAG5F"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { AVM_PROOF_LENGTH_IN_FIELDS, NESTED_RECURSIVE_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, RECURSIVE_PROOF_LENGTH, TUBE_PROOF_LENGTH } from '@aztec/constants';
|
|
2
|
+
import { type ServerProtocolArtifact } from '@aztec/noir-protocol-circuits-types/server';
|
|
3
|
+
import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
|
|
4
|
+
import { type ProofAndVerificationKey, type PublicInputsAndRecursiveProof, type ServerCircuitProver } from '@aztec/stdlib/interfaces/server';
|
|
5
|
+
import type { BaseParityInputs, ParityPublicInputs, RootParityInputs } from '@aztec/stdlib/parity';
|
|
6
|
+
import { Proof } from '@aztec/stdlib/proofs';
|
|
7
|
+
import type { BaseOrMergeRollupPublicInputs, BlockMergeRollupInputs, BlockRootOrBlockMergePublicInputs, BlockRootRollupInputs, EmptyBlockRootRollupInputs, MergeRollupInputs, PrivateBaseRollupInputs, PublicBaseRollupInputs, RootRollupInputs, RootRollupPublicInputs, SingleTxBlockRootRollupInputs, TubeInputs } from '@aztec/stdlib/rollup';
|
|
8
|
+
import type { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
9
|
+
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
10
|
+
import type { ACVMConfig, BBConfig } from '../config.js';
|
|
11
|
+
import { type UltraHonkFlavor } from '../honk.js';
|
|
12
|
+
export interface BBProverConfig extends BBConfig, ACVMConfig {
|
|
13
|
+
circuitFilter?: ServerProtocolArtifact[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Prover implementation that uses barretenberg native proving
|
|
17
|
+
*/
|
|
18
|
+
export declare class BBNativeRollupProver implements ServerCircuitProver {
|
|
19
|
+
private config;
|
|
20
|
+
private instrumentation;
|
|
21
|
+
constructor(config: BBProverConfig, telemetry: TelemetryClient);
|
|
22
|
+
get tracer(): import("@aztec/telemetry-client").Tracer;
|
|
23
|
+
static new(config: BBProverConfig, telemetry?: TelemetryClient): Promise<BBNativeRollupProver>;
|
|
24
|
+
/**
|
|
25
|
+
* Simulates the base parity circuit from its inputs.
|
|
26
|
+
* @param inputs - Inputs to the circuit.
|
|
27
|
+
* @returns The public inputs of the parity circuit.
|
|
28
|
+
*/
|
|
29
|
+
getBaseParityProof(inputs: BaseParityInputs): Promise<PublicInputsAndRecursiveProof<ParityPublicInputs, typeof RECURSIVE_PROOF_LENGTH>>;
|
|
30
|
+
/**
|
|
31
|
+
* Simulates the root parity circuit from its inputs.
|
|
32
|
+
* @param inputs - Inputs to the circuit.
|
|
33
|
+
* @returns The public inputs of the parity circuit.
|
|
34
|
+
*/
|
|
35
|
+
getRootParityProof(inputs: RootParityInputs): Promise<PublicInputsAndRecursiveProof<ParityPublicInputs, typeof NESTED_RECURSIVE_PROOF_LENGTH>>;
|
|
36
|
+
/**
|
|
37
|
+
* Creates an AVM proof and verifies it.
|
|
38
|
+
* @param inputs - The inputs to the AVM circuit.
|
|
39
|
+
* @returns The proof.
|
|
40
|
+
*/
|
|
41
|
+
getAvmProof(inputs: AvmCircuitInputs): Promise<ProofAndVerificationKey<typeof AVM_PROOF_LENGTH_IN_FIELDS>>;
|
|
42
|
+
/**
|
|
43
|
+
* Simulates the base rollup circuit from its inputs.
|
|
44
|
+
* @param inputs - Inputs to the circuit.
|
|
45
|
+
* @returns The public inputs as outputs of the simulation.
|
|
46
|
+
*/
|
|
47
|
+
getPrivateBaseRollupProof(inputs: PrivateBaseRollupInputs): Promise<PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
48
|
+
/**
|
|
49
|
+
* Requests that the public kernel tail circuit be executed and the proof generated
|
|
50
|
+
* @param kernelRequest - The object encapsulating the request for a proof
|
|
51
|
+
* @returns The requested circuit's public inputs and proof
|
|
52
|
+
*/
|
|
53
|
+
getPublicBaseRollupProof(inputs: PublicBaseRollupInputs): Promise<PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
54
|
+
/**
|
|
55
|
+
* Simulates the merge rollup circuit from its inputs.
|
|
56
|
+
* @param input - Inputs to the circuit.
|
|
57
|
+
* @returns The public inputs as outputs of the simulation.
|
|
58
|
+
*/
|
|
59
|
+
getMergeRollupProof(input: MergeRollupInputs): Promise<PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
60
|
+
/**
|
|
61
|
+
* Simulates the block root rollup circuit from its inputs.
|
|
62
|
+
* @param input - Inputs to the circuit.
|
|
63
|
+
* @returns The public inputs as outputs of the simulation.
|
|
64
|
+
*/
|
|
65
|
+
getBlockRootRollupProof(input: BlockRootRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
66
|
+
getSingleTxBlockRootRollupProof(input: SingleTxBlockRootRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
67
|
+
/**
|
|
68
|
+
* Simulates the empty block root rollup circuit from its inputs.
|
|
69
|
+
* @param input - Inputs to the circuit.
|
|
70
|
+
* @returns The public inputs as outputs of the simulation.
|
|
71
|
+
*/
|
|
72
|
+
getEmptyBlockRootRollupProof(input: EmptyBlockRootRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
73
|
+
/**
|
|
74
|
+
* Simulates the block merge rollup circuit from its inputs.
|
|
75
|
+
* @param input - Inputs to the circuit.
|
|
76
|
+
* @returns The public inputs as outputs of the simulation.
|
|
77
|
+
*/
|
|
78
|
+
getBlockMergeRollupProof(input: BlockMergeRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
79
|
+
/**
|
|
80
|
+
* Simulates the root rollup circuit from its inputs.
|
|
81
|
+
* @param input - Inputs to the circuit.
|
|
82
|
+
* @returns The public inputs as outputs of the simulation.
|
|
83
|
+
*/
|
|
84
|
+
getRootRollupProof(input: RootRollupInputs): Promise<PublicInputsAndRecursiveProof<RootRollupPublicInputs>>;
|
|
85
|
+
private generateProofWithBB;
|
|
86
|
+
private createProof;
|
|
87
|
+
private generateAvmProofWithBB;
|
|
88
|
+
private generateTubeProofWithBB;
|
|
89
|
+
private createAvmProof;
|
|
90
|
+
getTubeProof(input: TubeInputs): Promise<ProofAndVerificationKey<typeof TUBE_PROOF_LENGTH>>;
|
|
91
|
+
/**
|
|
92
|
+
* Executes a circuit and returns its outputs and corresponding proof with embedded aggregation object
|
|
93
|
+
* @param witnessMap - The input witness
|
|
94
|
+
* @param circuitType - The type of circuit to be executed
|
|
95
|
+
* @param proofLength - The length of the proof to be generated. This is a dummy parameter to aid in type checking
|
|
96
|
+
* @param convertInput - Function for mapping the input object to a witness map.
|
|
97
|
+
* @param convertOutput - Function for parsing the output witness to it's corresponding object
|
|
98
|
+
* @returns The circuits output object and it's proof
|
|
99
|
+
*/
|
|
100
|
+
private createRecursiveProof;
|
|
101
|
+
/**
|
|
102
|
+
* Verifies a proof, will generate the verification key if one is not cached internally
|
|
103
|
+
* @param circuitType - The type of circuit whose proof is to be verified
|
|
104
|
+
* @param proof - The proof to be verified
|
|
105
|
+
*/
|
|
106
|
+
verifyProof(circuitType: ServerProtocolArtifact, proof: Proof): Promise<void>;
|
|
107
|
+
verifyAvmProof(proof: Proof, verificationKey: VerificationKeyData): Promise<void>;
|
|
108
|
+
verifyWithKey(flavor: UltraHonkFlavor, verificationKey: VerificationKeyData, proof: Proof): Promise<void>;
|
|
109
|
+
private verifyWithKeyInternal;
|
|
110
|
+
/**
|
|
111
|
+
* Returns the verification key data for a circuit.
|
|
112
|
+
* @param circuitType - The type of circuit for which the verification key is required
|
|
113
|
+
* @returns The verification key data
|
|
114
|
+
*/
|
|
115
|
+
private getVerificationKeyDataForCircuit;
|
|
116
|
+
private readProofAsFields;
|
|
117
|
+
private readAvmProofAsFields;
|
|
118
|
+
private runInDirectory;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=bb_prover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bb_prover.d.ts","sourceRoot":"","sources":["../../src/prover/bb_prover.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,0BAA0B,EAE1B,6BAA6B,EAC7B,yCAAyC,EACzC,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAEL,KAAK,sBAAsB,EAqB5B,MAAM,4CAA4C,CAAC;AAGpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EAGzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAE,KAAK,EAAgD,MAAM,sBAAsB,CAAC;AAC3F,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,iCAAiC,EACjC,qBAAqB,EACrB,0BAA0B,EAC1B,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,6BAA6B,EAC7B,UAAU,EACX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EA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
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ClientIvcProof } from '@aztec/stdlib/proofs';
|
|
2
|
+
export declare const CLIENT_IVC_VK_FILE_NAME = "vk";
|
|
3
|
+
export declare const CLIENT_IVC_PROOF_FILE_NAME = "proof";
|
|
4
|
+
/**
|
|
5
|
+
* TODO(#7371): eventually remove client_ivc_prove_output_all_msgpack and properly handle these accumulators and VKs
|
|
6
|
+
* Create a ClientIvcProof from the result of client_ivc_prove_output_all or client_ivc_prove_output_all_msgpack
|
|
7
|
+
* @param directory the directory of results
|
|
8
|
+
* @returns the encapsulated client ivc proof
|
|
9
|
+
*/
|
|
10
|
+
export declare function readFromOutputDirectory(directory: string): Promise<ClientIvcProof>;
|
|
11
|
+
/**
|
|
12
|
+
* TODO(#7371): eventually remove client_ivc_prove_output_all_msgpack and properly handle these accumulators and VKs
|
|
13
|
+
* Serialize a ClientIvcProof to the files expected by prove_tube
|
|
14
|
+
*
|
|
15
|
+
* Example usage:
|
|
16
|
+
* await runInDirectory(bbWorkingDirectory, async (dir: string) => {
|
|
17
|
+
* await privateTx.clientIvcProof!.writeToOutputDirectory(bbWorkingDirectory);
|
|
18
|
+
* const result = await generateTubeProof(bbPath, dir, logger.info)
|
|
19
|
+
* expect(result.status).toBe(BB_RESULT.SUCCESS)
|
|
20
|
+
* });
|
|
21
|
+
* @param proof the ClientIvcProof from readFromOutputDirectory
|
|
22
|
+
* @param directory the directory of results
|
|
23
|
+
*/
|
|
24
|
+
export declare function writeToOutputDirectory(clientIvcProof: ClientIvcProof, directory: string): Promise<void>;
|
|
25
|
+
//# sourceMappingURL=client_ivc_proof_utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client_ivc_proof_utils.d.ts","sourceRoot":"","sources":["../../src/prover/client_ivc_proof_utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAC5C,eAAO,MAAM,0BAA0B,UAAU,CAAC;AAElD;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAAC,SAAS,EAAE,MAAM,2BAK9D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CAAC,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAO7F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prover/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC"}
|
package/dest/stats.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ProtocolArtifact } from '@aztec/noir-protocol-circuits-types/types';
|
|
2
|
+
import type { CircuitName } from '@aztec/stdlib/stats';
|
|
3
|
+
export declare function mapProtocolArtifactNameToCircuitName(artifact: ProtocolArtifact): CircuitName;
|
|
4
|
+
export declare function isProtocolArtifactRecursive(artifact: ProtocolArtifact): boolean;
|
|
5
|
+
//# sourceMappingURL=stats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.d.ts","sourceRoot":"","sources":["../src/stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,wBAAgB,oCAAoC,CAAC,QAAQ,EAAE,gBAAgB,GAAG,WAAW,CAqC5F;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAqB/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delay_values.d.ts","sourceRoot":"","sources":["../../src/test/delay_values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAa9D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAa7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { AVM_PROOF_LENGTH_IN_FIELDS, NESTED_RECURSIVE_PROOF_LENGTH, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH, RECURSIVE_PROOF_LENGTH, TUBE_PROOF_LENGTH } from '@aztec/constants';
|
|
2
|
+
import { type ServerProtocolArtifact } from '@aztec/noir-protocol-circuits-types/server';
|
|
3
|
+
import { type SimulationProvider } from '@aztec/simulator/server';
|
|
4
|
+
import type { AvmCircuitInputs } from '@aztec/stdlib/avm';
|
|
5
|
+
import { type ProofAndVerificationKey, type PublicInputsAndRecursiveProof, type ServerCircuitProver } from '@aztec/stdlib/interfaces/server';
|
|
6
|
+
import type { BaseParityInputs, ParityPublicInputs, RootParityInputs } from '@aztec/stdlib/parity';
|
|
7
|
+
import { type Proof } from '@aztec/stdlib/proofs';
|
|
8
|
+
import type { BaseOrMergeRollupPublicInputs, BlockMergeRollupInputs, BlockRootOrBlockMergePublicInputs, BlockRootRollupInputs, EmptyBlockRootRollupInputs, MergeRollupInputs, PrivateBaseRollupInputs, PublicBaseRollupInputs, RootRollupInputs, RootRollupPublicInputs, SingleTxBlockRootRollupInputs, TubeInputs } from '@aztec/stdlib/rollup';
|
|
9
|
+
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
10
|
+
type TestDelay = {
|
|
11
|
+
proverTestDelayType: 'fixed';
|
|
12
|
+
proverTestDelayMs?: number;
|
|
13
|
+
} | {
|
|
14
|
+
proverTestDelayType: 'realistic';
|
|
15
|
+
proverTestDelayFactor?: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A class for use in testing situations (e2e, unit test, etc) and temporarily for assembling a block in the sequencer.
|
|
19
|
+
* Simulates circuits using the most efficient method and performs no proving.
|
|
20
|
+
*/
|
|
21
|
+
export declare class TestCircuitProver implements ServerCircuitProver {
|
|
22
|
+
private simulationProvider?;
|
|
23
|
+
private opts;
|
|
24
|
+
private wasmSimulator;
|
|
25
|
+
private instrumentation;
|
|
26
|
+
private logger;
|
|
27
|
+
constructor(simulationProvider?: SimulationProvider | undefined, opts?: TestDelay, telemetry?: TelemetryClient);
|
|
28
|
+
get tracer(): import("@aztec/telemetry-client").Tracer;
|
|
29
|
+
/**
|
|
30
|
+
* Simulates the base parity circuit from its inputs.
|
|
31
|
+
* @param inputs - Inputs to the circuit.
|
|
32
|
+
* @returns The public inputs of the parity circuit.
|
|
33
|
+
*/
|
|
34
|
+
getBaseParityProof(inputs: BaseParityInputs): Promise<PublicInputsAndRecursiveProof<ParityPublicInputs, typeof RECURSIVE_PROOF_LENGTH>>;
|
|
35
|
+
/**
|
|
36
|
+
* Simulates the root parity circuit from its inputs.
|
|
37
|
+
* @param inputs - Inputs to the circuit.
|
|
38
|
+
* @returns The public inputs of the parity circuit.
|
|
39
|
+
*/
|
|
40
|
+
getRootParityProof(inputs: RootParityInputs): Promise<PublicInputsAndRecursiveProof<ParityPublicInputs, typeof NESTED_RECURSIVE_PROOF_LENGTH>>;
|
|
41
|
+
getTubeProof(_tubeInput: TubeInputs): Promise<ProofAndVerificationKey<typeof TUBE_PROOF_LENGTH>>;
|
|
42
|
+
getPrivateBaseRollupProof(inputs: PrivateBaseRollupInputs): Promise<PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
43
|
+
getPublicBaseRollupProof(inputs: PublicBaseRollupInputs): Promise<PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
44
|
+
/**
|
|
45
|
+
* Simulates the merge rollup circuit from its inputs.
|
|
46
|
+
* @param input - Inputs to the circuit.
|
|
47
|
+
* @returns The public inputs as outputs of the simulation.
|
|
48
|
+
*/
|
|
49
|
+
getMergeRollupProof(input: MergeRollupInputs): Promise<PublicInputsAndRecursiveProof<BaseOrMergeRollupPublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
50
|
+
/**
|
|
51
|
+
* Simulates the block root rollup circuit from its inputs.
|
|
52
|
+
* @param input - Inputs to the circuit.
|
|
53
|
+
* @returns The public inputs as outputs of the simulation.
|
|
54
|
+
*/
|
|
55
|
+
getBlockRootRollupProof(input: BlockRootRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
56
|
+
getSingleTxBlockRootRollupProof(input: SingleTxBlockRootRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
57
|
+
/**
|
|
58
|
+
* Simulates the empty block root rollup circuit from its inputs.
|
|
59
|
+
* @param input - Inputs to the circuit.
|
|
60
|
+
* @returns The public inputs as outputs of the simulation.
|
|
61
|
+
*/
|
|
62
|
+
getEmptyBlockRootRollupProof(input: EmptyBlockRootRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
63
|
+
/**
|
|
64
|
+
* Simulates the block merge rollup circuit from its inputs.
|
|
65
|
+
* @param input - Inputs to the circuit.
|
|
66
|
+
* @returns The public inputs as outputs of the simulation.
|
|
67
|
+
*/
|
|
68
|
+
getBlockMergeRollupProof(input: BlockMergeRollupInputs): Promise<PublicInputsAndRecursiveProof<BlockRootOrBlockMergePublicInputs, typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>>;
|
|
69
|
+
/**
|
|
70
|
+
* Simulates the root rollup circuit from its inputs.
|
|
71
|
+
* @param input - Inputs to the circuit.
|
|
72
|
+
* @returns The public inputs as outputs of the simulation.
|
|
73
|
+
*/
|
|
74
|
+
getRootRollupProof(input: RootRollupInputs): Promise<PublicInputsAndRecursiveProof<RootRollupPublicInputs>>;
|
|
75
|
+
getAvmProof(_inputs: AvmCircuitInputs): Promise<ProofAndVerificationKey<typeof AVM_PROOF_LENGTH_IN_FIELDS>>;
|
|
76
|
+
private applyDelay;
|
|
77
|
+
verifyProof(_1: ServerProtocolArtifact, _2: Proof): Promise<void>;
|
|
78
|
+
private simulate;
|
|
79
|
+
}
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=test_circuit_prover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test_circuit_prover.d.ts","sourceRoot":"","sources":["../../src/test/test_circuit_prover.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAE1B,6BAA6B,EAC7B,yCAAyC,EACzC,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EACL,KAAK,sBAAsB,EAsB5B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,kBAAkB,EAAsD,MAAM,yBAAyB,CAAC;AACtH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EAGzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAE,KAAK,KAAK,EAAmE,MAAM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@aztec/stdlib/tx';
|
|
3
|
+
export declare class TestCircuitVerifier implements ClientProtocolCircuitVerifier {
|
|
4
|
+
verifyProof(_tx: Tx): Promise<boolean>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=test_verifier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test_verifier.d.ts","sourceRoot":"","sources":["../../src/test/test_verifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACrF,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAE3C,qBAAa,mBAAoB,YAAW,6BAA6B;IACvE,WAAW,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;CAGvC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
2
|
+
/**
|
|
3
|
+
* Reads the verification key data stored at the specified location and parses into a VerificationKeyData
|
|
4
|
+
* @param vkDirectoryPath - The directory containing the verification key data files
|
|
5
|
+
* @returns The verification key data
|
|
6
|
+
*/
|
|
7
|
+
export declare function extractVkData(vkDirectoryPath: string): Promise<VerificationKeyData>;
|
|
8
|
+
export declare function extractAvmVkData(vkDirectoryPath: string): Promise<VerificationKeyData>;
|
|
9
|
+
//# sourceMappingURL=verification_key_data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verification_key_data.d.ts","sourceRoot":"","sources":["../../src/verification_key/verification_key_data.ts"],"names":[],"mappings":"AAGA,OAAO,EAA2B,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAQjF;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAWzF;AAGD,wBAAsB,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAc5F"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Logger } from '@aztec/foundation/log';
|
|
2
|
+
import type { ServerProtocolArtifact } from '@aztec/noir-protocol-circuits-types/types';
|
|
3
|
+
import type { ClientProtocolCircuitVerifier } from '@aztec/stdlib/interfaces/server';
|
|
4
|
+
import type { Proof } from '@aztec/stdlib/proofs';
|
|
5
|
+
import { Tx } from '@aztec/stdlib/tx';
|
|
6
|
+
import type { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
7
|
+
import type { BBConfig } from '../config.js';
|
|
8
|
+
export declare class BBCircuitVerifier implements ClientProtocolCircuitVerifier {
|
|
9
|
+
private config;
|
|
10
|
+
private logger;
|
|
11
|
+
private constructor();
|
|
12
|
+
static new(config: BBConfig, logger?: Logger): Promise<BBCircuitVerifier>;
|
|
13
|
+
getVerificationKeyData(circuitType: ServerProtocolArtifact): VerificationKeyData;
|
|
14
|
+
verifyProofForCircuit(circuit: ServerProtocolArtifact, proof: Proof): Promise<void>;
|
|
15
|
+
verifyProof(tx: Tx): Promise<boolean>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=bb_verifier.d.ts.map
|
|
@@ -0,0 +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;AAElE,OAAO,KAAK,EAA0B,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAChH,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACrF,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;AAM7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAK7C,qBAAa,iBAAkB,YAAW,6BAA6B;IACjD,OAAO,CAAC,MAAM;IAAY,OAAO,CAAC,MAAM;IAA5D,OAAO;WAEa,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAqC;IAK9E,sBAAsB,CAAC,WAAW,EAAE,sBAAsB,GAAG,mBAAmB;IAQ1E,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,EAAE,KAAK,EAAE,KAAK;IAkCnE,WAAW,CAAC,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;CA4CnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/verifier/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
import type { ArtifactProvider } from '@aztec/noir-protocol-circuits-types/types';
|
|
4
|
+
import type { SimulationProvider } from '@aztec/simulator/client';
|
|
5
|
+
import { ClientIvcProof } from '@aztec/stdlib/proofs';
|
|
6
|
+
import type { WitnessMap } from '@noir-lang/types';
|
|
7
|
+
import { BBPrivateKernelProver } from '../prover/bb_private_kernel_prover.js';
|
|
8
|
+
export declare abstract class BBWASMPrivateKernelProver extends BBPrivateKernelProver {
|
|
9
|
+
protected artifactProvider: ArtifactProvider;
|
|
10
|
+
protected simulationProvider: SimulationProvider;
|
|
11
|
+
private threads;
|
|
12
|
+
protected log: import("@aztec/foundation/log").Logger;
|
|
13
|
+
constructor(artifactProvider: ArtifactProvider, simulationProvider: SimulationProvider, threads?: number, log?: import("@aztec/foundation/log").Logger);
|
|
14
|
+
createClientIvcProof(acirs: Buffer[], witnessStack: WitnessMap[]): Promise<ClientIvcProof>;
|
|
15
|
+
computeGateCountForCircuit(_bytecode: Buffer, _circuitName: string): Promise<number>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=bb_wasm_private_kernel_prover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bb_wasm_private_kernel_prover.d.ts","sourceRoot":"","sources":["../../src/wasm/bb_wasm_private_kernel_prover.ts"],"names":[],"mappings":";;AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,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,KAAK,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC;IAmB1F,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAY3G"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SimulationProvider } from '@aztec/simulator/client';
|
|
2
|
+
import { BBWASMPrivateKernelProver } from './bb_wasm_private_kernel_prover.js';
|
|
3
|
+
export declare class BBWASMBundlePrivateKernelProver extends BBWASMPrivateKernelProver {
|
|
4
|
+
constructor(simulationProvider: SimulationProvider, threads?: number, log?: import("@aztec/foundation/log").Logger);
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=bundle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SimulationProvider } from '@aztec/simulator/client';
|
|
2
|
+
import { BBWASMPrivateKernelProver } from './bb_wasm_private_kernel_prover.js';
|
|
3
|
+
export declare class BBWASMLazyPrivateKernelProver extends BBWASMPrivateKernelProver {
|
|
4
|
+
constructor(simulationProvider: SimulationProvider, threads?: number, log?: import("@aztec/foundation/log").Logger);
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=lazy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/bb-prover",
|
|
3
|
-
"version": "0.77.0-testnet-ignition.
|
|
3
|
+
"version": "0.77.0-testnet-ignition.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -67,27 +67,27 @@
|
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@aztec/bb.js": "0.77.0-testnet-ignition.
|
|
71
|
-
"@aztec/constants": "0.77.0-testnet-ignition.
|
|
72
|
-
"@aztec/foundation": "0.77.0-testnet-ignition.
|
|
73
|
-
"@aztec/noir-protocol-circuits-types": "0.77.0-testnet-ignition.
|
|
74
|
-
"@aztec/simulator": "0.77.0-testnet-ignition.
|
|
75
|
-
"@aztec/stdlib": "0.77.0-testnet-ignition.
|
|
76
|
-
"@aztec/telemetry-client": "0.77.0-testnet-ignition.
|
|
77
|
-
"@aztec/world-state": "0.77.0-testnet-ignition.
|
|
70
|
+
"@aztec/bb.js": "0.77.0-testnet-ignition.29",
|
|
71
|
+
"@aztec/constants": "0.77.0-testnet-ignition.29",
|
|
72
|
+
"@aztec/foundation": "0.77.0-testnet-ignition.29",
|
|
73
|
+
"@aztec/noir-protocol-circuits-types": "0.77.0-testnet-ignition.29",
|
|
74
|
+
"@aztec/simulator": "0.77.0-testnet-ignition.29",
|
|
75
|
+
"@aztec/stdlib": "0.77.0-testnet-ignition.29",
|
|
76
|
+
"@aztec/telemetry-client": "0.77.0-testnet-ignition.29",
|
|
77
|
+
"@aztec/world-state": "0.77.0-testnet-ignition.29",
|
|
78
78
|
"@msgpack/msgpack": "^3.0.0-beta2",
|
|
79
79
|
"commander": "^12.1.0",
|
|
80
80
|
"pako": "^2.1.0",
|
|
81
81
|
"source-map-support": "^0.5.21",
|
|
82
82
|
"tslib": "^2.4.0",
|
|
83
|
-
"@aztec/noir-noirc_abi": "0.77.0-testnet-ignition.
|
|
84
|
-
"@aztec/noir-types": "0.77.0-testnet-ignition.
|
|
83
|
+
"@aztec/noir-noirc_abi": "0.77.0-testnet-ignition.29",
|
|
84
|
+
"@aztec/noir-types": "0.77.0-testnet-ignition.29"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@aztec/ethereum": "0.77.0-testnet-ignition.
|
|
88
|
-
"@aztec/kv-store": "0.77.0-testnet-ignition.
|
|
89
|
-
"@aztec/noir-contracts.js": "0.77.0-testnet-ignition.
|
|
90
|
-
"@aztec/protocol-contracts": "0.77.0-testnet-ignition.
|
|
87
|
+
"@aztec/ethereum": "0.77.0-testnet-ignition.29",
|
|
88
|
+
"@aztec/kv-store": "0.77.0-testnet-ignition.29",
|
|
89
|
+
"@aztec/noir-contracts.js": "0.77.0-testnet-ignition.29",
|
|
90
|
+
"@aztec/protocol-contracts": "0.77.0-testnet-ignition.29",
|
|
91
91
|
"@jest/globals": "^29.5.0",
|
|
92
92
|
"@types/jest": "^29.5.0",
|
|
93
93
|
"@types/memdown": "^3.0.0",
|