@aztec/bb-prover 3.0.0-nightly.20250923 → 3.0.0-nightly.20250925
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.
|
@@ -6,9 +6,9 @@ import type { MerkleTreeWriteOperations } from '@aztec/stdlib/interfaces/server'
|
|
|
6
6
|
import type { GlobalVariables } from '@aztec/stdlib/tx';
|
|
7
7
|
import { type BBResult, type BBSuccess } from '../bb/execute.js';
|
|
8
8
|
export declare class AvmProvingTester extends PublicTxSimulationTester {
|
|
9
|
-
private bbWorkingDirectory;
|
|
10
9
|
private checkCircuitOnly;
|
|
11
|
-
|
|
10
|
+
private bbWorkingDirectory;
|
|
11
|
+
constructor(checkCircuitOnly: boolean, contractDataSource: SimpleContractDataSource, merkleTrees: MerkleTreeWriteOperations, globals?: GlobalVariables, metrics?: TestExecutorMetrics);
|
|
12
12
|
static new(checkCircuitOnly?: boolean, globals?: GlobalVariables, metrics?: TestExecutorMetrics): Promise<AvmProvingTester>;
|
|
13
13
|
prove(avmCircuitInputs: AvmCircuitInputs, txLabel?: string): Promise<BBResult>;
|
|
14
14
|
verify(proofRes: BBSuccess, publicInputs: AvmCircuitPublicInputs): Promise<BBResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avm_proving_tester.d.ts","sourceRoot":"","sources":["../../src/avm_proving_tests/avm_proving_tester.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,yBAAyB,EA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AAC,QAAQ,CAAC;IA0D7F,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAiB7E,WAAW,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,GAAE,MAAsB;IAQ/E,cAAc,CACzB,MAAM,EAAE,YAAY,EACpB,UAAU,EAAE,gBAAgB,EAAE,EAC9B,QAAQ,EAAE,gBAAgB,EAAE,EAC5B,YAAY,EAAE,gBAAgB,GAAG,SAAS,EAC1C,YAAY,EAAE,OAAO,GAAG,SAAS,EACjC,QAAQ,eAAS,EACjB,iBAAiB,CAAC,EAAE,qBAAqB,EACzC,OAAO,GAAE,MAAsB,GAC9B,OAAO,CAAC,cAAc,CAAC;IAsBJ,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,YAAY,EACpB,UAAU,CAAC,EAAE,gBAAgB,EAAE,EAC/B,QAAQ,CAAC,EAAE,gBAAgB,EAAE,EAC7B,YAAY,CAAC,EAAE,gBAAgB,EAC/B,QAAQ,CAAC,EAAE,YAAY,EACvB,iBAAiB,CAAC,EAAE,qBAAqB;IAc9B,sBAAsB,CACjC,OAAO,EAAE,gBAAgB,EACzB,YAAY,CAAC,EAAE,OAAO,EACtB,OAAO,GAAE,MAAsB;CAalC"}
|
|
@@ -59,18 +59,19 @@ class InterceptingLogger {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
export class AvmProvingTester extends PublicTxSimulationTester {
|
|
62
|
-
bbWorkingDirectory;
|
|
63
62
|
checkCircuitOnly;
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
bbWorkingDirectory;
|
|
64
|
+
constructor(checkCircuitOnly, contractDataSource, merkleTrees, globals, metrics){
|
|
65
|
+
super(merkleTrees, contractDataSource, globals, metrics), this.checkCircuitOnly = checkCircuitOnly, this.bbWorkingDirectory = '';
|
|
66
66
|
}
|
|
67
67
|
static async new(checkCircuitOnly = false, globals, metrics) {
|
|
68
|
-
const bbWorkingDirectory = await fs.mkdtemp(path.join(tmpdir(), 'bb-'));
|
|
69
68
|
const contractDataSource = new SimpleContractDataSource();
|
|
70
69
|
const merkleTrees = await (await NativeWorldStateService.tmp()).fork();
|
|
71
|
-
return new AvmProvingTester(
|
|
70
|
+
return new AvmProvingTester(checkCircuitOnly, contractDataSource, merkleTrees, globals, metrics);
|
|
72
71
|
}
|
|
73
72
|
async prove(avmCircuitInputs, txLabel = 'unlabeledTx') {
|
|
73
|
+
// We use a new working directory for each proof.
|
|
74
|
+
this.bbWorkingDirectory = await fs.mkdtemp(path.join(tmpdir(), 'bb-'));
|
|
74
75
|
const interceptingLogger = new InterceptingLogger(this.logger);
|
|
75
76
|
// Then we prove.
|
|
76
77
|
const proofRes = await generateAvmProof(BB_PATH, this.bbWorkingDirectory, avmCircuitInputs, interceptingLogger, this.checkCircuitOnly);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/bb-prover",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20250925",
|
|
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": "3.0.0-nightly.
|
|
73
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
74
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
75
|
-
"@aztec/noir-noirc_abi": "3.0.0-nightly.
|
|
76
|
-
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.
|
|
77
|
-
"@aztec/noir-types": "3.0.0-nightly.
|
|
78
|
-
"@aztec/simulator": "3.0.0-nightly.
|
|
79
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
80
|
-
"@aztec/telemetry-client": "3.0.0-nightly.
|
|
81
|
-
"@aztec/world-state": "3.0.0-nightly.
|
|
72
|
+
"@aztec/bb.js": "3.0.0-nightly.20250925",
|
|
73
|
+
"@aztec/constants": "3.0.0-nightly.20250925",
|
|
74
|
+
"@aztec/foundation": "3.0.0-nightly.20250925",
|
|
75
|
+
"@aztec/noir-noirc_abi": "3.0.0-nightly.20250925",
|
|
76
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20250925",
|
|
77
|
+
"@aztec/noir-types": "3.0.0-nightly.20250925",
|
|
78
|
+
"@aztec/simulator": "3.0.0-nightly.20250925",
|
|
79
|
+
"@aztec/stdlib": "3.0.0-nightly.20250925",
|
|
80
|
+
"@aztec/telemetry-client": "3.0.0-nightly.20250925",
|
|
81
|
+
"@aztec/world-state": "3.0.0-nightly.20250925",
|
|
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": "3.0.0-nightly.
|
|
89
|
-
"@aztec/kv-store": "3.0.0-nightly.
|
|
90
|
-
"@aztec/noir-contracts.js": "3.0.0-nightly.
|
|
91
|
-
"@aztec/noir-test-contracts.js": "3.0.0-nightly.
|
|
92
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
88
|
+
"@aztec/ethereum": "3.0.0-nightly.20250925",
|
|
89
|
+
"@aztec/kv-store": "3.0.0-nightly.20250925",
|
|
90
|
+
"@aztec/noir-contracts.js": "3.0.0-nightly.20250925",
|
|
91
|
+
"@aztec/noir-test-contracts.js": "3.0.0-nightly.20250925",
|
|
92
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20250925",
|
|
93
93
|
"@jest/globals": "^30.0.0",
|
|
94
94
|
"@types/jest": "^30.0.0",
|
|
95
95
|
"@types/node": "^22.15.17",
|
|
@@ -89,8 +89,9 @@ class InterceptingLogger implements Logger {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
export class AvmProvingTester extends PublicTxSimulationTester {
|
|
92
|
+
private bbWorkingDirectory: string = '';
|
|
93
|
+
|
|
92
94
|
constructor(
|
|
93
|
-
private bbWorkingDirectory: string,
|
|
94
95
|
private checkCircuitOnly: boolean,
|
|
95
96
|
contractDataSource: SimpleContractDataSource,
|
|
96
97
|
merkleTrees: MerkleTreeWriteOperations,
|
|
@@ -101,21 +102,15 @@ export class AvmProvingTester extends PublicTxSimulationTester {
|
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
static async new(checkCircuitOnly: boolean = false, globals?: GlobalVariables, metrics?: TestExecutorMetrics) {
|
|
104
|
-
const bbWorkingDirectory = await fs.mkdtemp(path.join(tmpdir(), 'bb-'));
|
|
105
|
-
|
|
106
105
|
const contractDataSource = new SimpleContractDataSource();
|
|
107
106
|
const merkleTrees = await (await NativeWorldStateService.tmp()).fork();
|
|
108
|
-
return new AvmProvingTester(
|
|
109
|
-
bbWorkingDirectory,
|
|
110
|
-
checkCircuitOnly,
|
|
111
|
-
contractDataSource,
|
|
112
|
-
merkleTrees,
|
|
113
|
-
globals,
|
|
114
|
-
metrics,
|
|
115
|
-
);
|
|
107
|
+
return new AvmProvingTester(checkCircuitOnly, contractDataSource, merkleTrees, globals, metrics);
|
|
116
108
|
}
|
|
117
109
|
|
|
118
110
|
async prove(avmCircuitInputs: AvmCircuitInputs, txLabel: string = 'unlabeledTx'): Promise<BBResult> {
|
|
111
|
+
// We use a new working directory for each proof.
|
|
112
|
+
this.bbWorkingDirectory = await fs.mkdtemp(path.join(tmpdir(), 'bb-'));
|
|
113
|
+
|
|
119
114
|
const interceptingLogger = new InterceptingLogger(this.logger);
|
|
120
115
|
|
|
121
116
|
// Then we prove.
|