@aztec/bb-prover 0.0.0-test.1 → 0.0.1-commit.1142ef1
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 +14 -18
- package/dest/avm_proving_tests/avm_proving_tester.d.ts.map +1 -1
- package/dest/avm_proving_tests/avm_proving_tester.js +143 -79
- package/dest/bb/cli.d.ts +1 -1
- package/dest/bb/execute.d.ts +17 -50
- package/dest/bb/execute.d.ts.map +1 -1
- package/dest/bb/execute.js +145 -278
- package/dest/bb/index.d.ts +1 -1
- package/dest/config.d.ts +3 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/honk.d.ts +3 -3
- package/dest/honk.d.ts.map +1 -1
- package/dest/honk.js +3 -2
- package/dest/index.d.ts +2 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -0
- package/dest/instrumentation.d.ts +3 -3
- package/dest/instrumentation.d.ts.map +1 -1
- package/dest/instrumentation.js +11 -43
- package/dest/prover/client/bb_private_kernel_prover.d.ts +38 -0
- package/dest/prover/client/bb_private_kernel_prover.d.ts.map +1 -0
- package/dest/prover/{bb_private_kernel_prover.js → client/bb_private_kernel_prover.js} +53 -21
- package/dest/prover/client/bundle.d.ts +6 -0
- package/dest/prover/client/bundle.d.ts.map +1 -0
- package/dest/prover/client/bundle.js +7 -0
- package/dest/prover/client/lazy.d.ts +6 -0
- package/dest/prover/client/lazy.d.ts.map +1 -0
- package/dest/prover/client/lazy.js +7 -0
- package/dest/prover/index.d.ts +3 -4
- package/dest/prover/index.d.ts.map +1 -1
- package/dest/prover/index.js +2 -3
- package/dest/prover/proof_utils.d.ts +19 -0
- package/dest/prover/proof_utils.d.ts.map +1 -0
- package/dest/prover/proof_utils.js +72 -0
- package/dest/prover/server/bb_prover.d.ts +97 -0
- package/dest/prover/server/bb_prover.d.ts.map +1 -0
- package/dest/prover/server/bb_prover.js +712 -0
- package/dest/test/delay_values.d.ts +1 -1
- package/dest/test/delay_values.d.ts.map +1 -1
- package/dest/test/delay_values.js +37 -23
- package/dest/test/index.d.ts +2 -1
- package/dest/test/index.d.ts.map +1 -1
- package/dest/test/index.js +1 -0
- package/dest/test/test_circuit_prover.d.ts +27 -36
- package/dest/test/test_circuit_prover.d.ts.map +1 -1
- package/dest/test/test_circuit_prover.js +517 -88
- package/dest/test/test_verifier.d.ts +6 -3
- package/dest/test/test_verifier.d.ts.map +1 -1
- package/dest/test/test_verifier.js +23 -1
- package/dest/verification_key/verification_key_data.d.ts +1 -2
- package/dest/verification_key/verification_key_data.d.ts.map +1 -1
- package/dest/verification_key/verification_key_data.js +9 -34
- package/dest/verifier/bb_verifier.d.ts +6 -5
- package/dest/verifier/bb_verifier.d.ts.map +1 -1
- package/dest/verifier/bb_verifier.js +45 -27
- package/dest/verifier/index.d.ts +2 -1
- package/dest/verifier/index.d.ts.map +1 -1
- package/dest/verifier/index.js +1 -0
- package/dest/verifier/queued_chonk_verifier.d.ts +15 -0
- package/dest/verifier/queued_chonk_verifier.d.ts.map +1 -0
- package/dest/verifier/queued_chonk_verifier.js +101 -0
- package/package.json +35 -33
- package/src/avm_proving_tests/avm_proving_tester.ts +219 -113
- package/src/bb/execute.ts +116 -291
- package/src/config.ts +2 -0
- package/src/honk.ts +3 -2
- package/src/index.ts +1 -0
- package/src/instrumentation.ts +10 -43
- package/src/prover/{bb_private_kernel_prover.ts → client/bb_private_kernel_prover.ts} +94 -33
- package/src/prover/client/bundle.ts +10 -0
- package/src/prover/client/lazy.ts +10 -0
- package/src/prover/index.ts +2 -3
- package/src/prover/proof_utils.ts +115 -0
- package/src/prover/server/bb_prover.ts +717 -0
- package/src/test/delay_values.ts +38 -22
- package/src/test/index.ts +1 -0
- package/src/test/test_circuit_prover.ts +264 -154
- package/src/test/test_verifier.ts +15 -3
- package/src/verification_key/verification_key_data.ts +11 -31
- package/src/verifier/bb_verifier.ts +62 -35
- package/src/verifier/index.ts +1 -0
- package/src/verifier/queued_chonk_verifier.ts +108 -0
- package/dest/prover/bb_native_private_kernel_prover.d.ts +0 -25
- package/dest/prover/bb_native_private_kernel_prover.d.ts.map +0 -1
- package/dest/prover/bb_native_private_kernel_prover.js +0 -69
- package/dest/prover/bb_private_kernel_prover.d.ts +0 -32
- package/dest/prover/bb_private_kernel_prover.d.ts.map +0 -1
- package/dest/prover/bb_prover.d.ts +0 -120
- package/dest/prover/bb_prover.d.ts.map +0 -1
- package/dest/prover/bb_prover.js +0 -423
- package/dest/prover/client_ivc_proof_utils.d.ts +0 -25
- package/dest/prover/client_ivc_proof_utils.d.ts.map +0 -1
- package/dest/prover/client_ivc_proof_utils.js +0 -43
- package/dest/stats.d.ts +0 -5
- package/dest/stats.d.ts.map +0 -1
- package/dest/stats.js +0 -62
- package/dest/wasm/bb_wasm_private_kernel_prover.d.ts +0 -17
- package/dest/wasm/bb_wasm_private_kernel_prover.d.ts.map +0 -1
- package/dest/wasm/bb_wasm_private_kernel_prover.js +0 -46
- package/dest/wasm/bundle.d.ts +0 -6
- package/dest/wasm/bundle.d.ts.map +0 -1
- package/dest/wasm/bundle.js +0 -8
- package/dest/wasm/lazy.d.ts +0 -6
- package/dest/wasm/lazy.d.ts.map +0 -1
- package/dest/wasm/lazy.js +0 -8
- package/src/prover/bb_native_private_kernel_prover.ts +0 -119
- package/src/prover/bb_prover.ts +0 -781
- package/src/prover/client_ivc_proof_utils.ts +0 -42
- package/src/stats.ts +0 -64
- package/src/wasm/bb_wasm_private_kernel_prover.ts +0 -55
- package/src/wasm/bundle.ts +0 -11
- package/src/wasm/lazy.ts +0 -11
|
@@ -1,78 +1,200 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import type { LogFn, LogLevel, Logger } from '@aztec/foundation/log';
|
|
2
|
+
import { Timer } from '@aztec/foundation/timer';
|
|
3
|
+
import {
|
|
4
|
+
PublicTxSimulationTester,
|
|
5
|
+
SimpleContractDataSource,
|
|
6
|
+
type TestEnqueuedCall,
|
|
7
|
+
type TestExecutorMetrics,
|
|
8
|
+
type TestPrivateInsertions,
|
|
9
|
+
} from '@aztec/simulator/public/fixtures';
|
|
10
|
+
import type { PublicTxResult } from '@aztec/simulator/server';
|
|
11
|
+
import { AvmCircuitInputs, AvmCircuitPublicInputs, PublicSimulatorConfig } from '@aztec/stdlib/avm';
|
|
4
12
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
13
|
import type { MerkleTreeWriteOperations } from '@aztec/stdlib/interfaces/server';
|
|
6
|
-
import {
|
|
7
|
-
import { VerificationKeyData } from '@aztec/stdlib/vks';
|
|
14
|
+
import type { GlobalVariables } from '@aztec/stdlib/tx';
|
|
8
15
|
import { NativeWorldStateService } from '@aztec/world-state';
|
|
9
16
|
|
|
10
17
|
import fs from 'node:fs/promises';
|
|
11
18
|
import { tmpdir } from 'node:os';
|
|
12
19
|
import path from 'path';
|
|
13
20
|
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
import { type BBResult, type BBSuccess, BB_RESULT, generateAvmProof, verifyAvmProof } from '../bb/execute.js';
|
|
22
|
+
|
|
23
|
+
const BB_PATH = path.resolve('../../barretenberg/cpp/build/bin/bb-avm');
|
|
24
|
+
|
|
25
|
+
// An InterceptingLogger that records all log messages and forwards them to a wrapped logger.
|
|
26
|
+
class InterceptingLogger implements Logger {
|
|
27
|
+
public readonly logs: string[] = [];
|
|
28
|
+
public level: LogLevel;
|
|
29
|
+
public module: string;
|
|
30
|
+
|
|
31
|
+
private logger: Logger;
|
|
32
|
+
|
|
33
|
+
constructor(logger: Logger) {
|
|
34
|
+
this.logger = logger;
|
|
35
|
+
this.level = logger.level;
|
|
36
|
+
this.module = logger.module;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
isLevelEnabled(level: LogLevel): boolean {
|
|
40
|
+
return this.logger.isLevelEnabled(level);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
createChild(_childModule: string): Logger {
|
|
44
|
+
throw new Error('Not implemented');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
private intercept(level: LogLevel, msg: string, ...args: any[]) {
|
|
48
|
+
this.logs.push(...msg.split('\n'));
|
|
49
|
+
// Forward to the wrapped logger
|
|
50
|
+
(this.logger[level] as LogFn)(msg, ...args);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Log methods for each level
|
|
54
|
+
silent(msg: string, ...args: any[]) {
|
|
55
|
+
this.intercept('silent', msg, ...args);
|
|
56
|
+
}
|
|
57
|
+
fatal(msg: string, ...args: any[]) {
|
|
58
|
+
this.intercept('fatal', msg, ...args);
|
|
59
|
+
}
|
|
60
|
+
warn(msg: string, ...args: any[]) {
|
|
61
|
+
this.intercept('warn', msg, ...args);
|
|
62
|
+
}
|
|
63
|
+
info(msg: string, ...args: any[]) {
|
|
64
|
+
this.intercept('info', msg, ...args);
|
|
65
|
+
}
|
|
66
|
+
verbose(msg: string, ...args: any[]) {
|
|
67
|
+
this.intercept('verbose', msg, ...args);
|
|
68
|
+
}
|
|
69
|
+
debug(msg: string, ...args: any[]) {
|
|
70
|
+
this.intercept('debug', msg, ...args);
|
|
71
|
+
}
|
|
72
|
+
trace(msg: string, ...args: any[]) {
|
|
73
|
+
this.intercept('trace', msg, ...args);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Error log function can be string or Error
|
|
77
|
+
error(err: Error | string, ...args: any[]) {
|
|
78
|
+
const msg = typeof err === 'string' ? err : err.message;
|
|
79
|
+
this.logs.push(msg);
|
|
80
|
+
this.logger.error(msg, err, ...args);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Config with collectHints enabled for proving tests
|
|
85
|
+
const provingConfig: PublicSimulatorConfig = PublicSimulatorConfig.from({
|
|
86
|
+
skipFeeEnforcement: false,
|
|
87
|
+
collectCallMetadata: true, // For results.
|
|
88
|
+
collectDebugLogs: false,
|
|
89
|
+
collectHints: true, // Required for proving!
|
|
90
|
+
collectPublicInputs: true, // Required for proving!
|
|
91
|
+
collectStatistics: false,
|
|
92
|
+
});
|
|
26
93
|
|
|
27
94
|
export class AvmProvingTester extends PublicTxSimulationTester {
|
|
95
|
+
private bbWorkingDirectory: string = '';
|
|
96
|
+
|
|
28
97
|
constructor(
|
|
29
|
-
private bbWorkingDirectory: string,
|
|
30
98
|
private checkCircuitOnly: boolean,
|
|
31
|
-
worldStateDB: WorldStateDB,
|
|
32
99
|
contractDataSource: SimpleContractDataSource,
|
|
33
100
|
merkleTrees: MerkleTreeWriteOperations,
|
|
101
|
+
globals?: GlobalVariables,
|
|
102
|
+
metrics?: TestExecutorMetrics,
|
|
34
103
|
) {
|
|
35
|
-
|
|
104
|
+
// simulator factory is undefined because for proving, we use the default C++ simulator
|
|
105
|
+
super(merkleTrees, contractDataSource, globals, metrics, /*simulatorFactory=*/ undefined, provingConfig);
|
|
36
106
|
}
|
|
37
107
|
|
|
38
|
-
static
|
|
39
|
-
|
|
40
|
-
|
|
108
|
+
static async new(
|
|
109
|
+
worldStateService: NativeWorldStateService, // make sure to close this later
|
|
110
|
+
checkCircuitOnly: boolean = false,
|
|
111
|
+
globals?: GlobalVariables,
|
|
112
|
+
metrics?: TestExecutorMetrics,
|
|
113
|
+
) {
|
|
41
114
|
const contractDataSource = new SimpleContractDataSource();
|
|
42
|
-
const merkleTrees = await
|
|
43
|
-
|
|
44
|
-
return new AvmProvingTester(bbWorkingDirectory, checkCircuitOnly, worldStateDB, contractDataSource, merkleTrees);
|
|
115
|
+
const merkleTrees = await worldStateService.fork();
|
|
116
|
+
return new AvmProvingTester(checkCircuitOnly, contractDataSource, merkleTrees, globals, metrics);
|
|
45
117
|
}
|
|
46
118
|
|
|
47
|
-
async prove(avmCircuitInputs: AvmCircuitInputs): Promise<BBResult> {
|
|
119
|
+
async prove(avmCircuitInputs: AvmCircuitInputs, txLabel: string = 'unlabeledTx'): Promise<BBResult> {
|
|
120
|
+
// We use a new working directory for each proof.
|
|
121
|
+
this.bbWorkingDirectory = await fs.mkdtemp(path.join(tmpdir(), 'bb-'));
|
|
122
|
+
|
|
123
|
+
const interceptingLogger = new InterceptingLogger(this.logger);
|
|
124
|
+
|
|
48
125
|
// Then we prove.
|
|
49
126
|
const proofRes = await generateAvmProof(
|
|
50
127
|
BB_PATH,
|
|
51
128
|
this.bbWorkingDirectory,
|
|
52
129
|
avmCircuitInputs,
|
|
53
|
-
|
|
130
|
+
interceptingLogger,
|
|
54
131
|
this.checkCircuitOnly,
|
|
55
132
|
);
|
|
56
133
|
if (proofRes.status === BB_RESULT.FAILURE) {
|
|
57
134
|
this.logger.error(`Proof generation failed: ${proofRes.reason}`);
|
|
58
135
|
}
|
|
59
|
-
|
|
136
|
+
expect(proofRes.status).toEqual(BB_RESULT.SUCCESS);
|
|
137
|
+
|
|
138
|
+
// Parse the logs into a structured format.
|
|
139
|
+
const logs = interceptingLogger.logs;
|
|
140
|
+
// const traceSizes: { name: string; size: number }[] = [];
|
|
141
|
+
// logs.forEach(log => {
|
|
142
|
+
// const match = log.match(/\b(\w+): (\d+) \(~2/);
|
|
143
|
+
// if (match) {
|
|
144
|
+
// traceSizes.push({
|
|
145
|
+
// name: match[1],
|
|
146
|
+
// size: parseInt(match[2]),
|
|
147
|
+
// });
|
|
148
|
+
// }
|
|
149
|
+
// });
|
|
150
|
+
const times: { [key: string]: number } = {};
|
|
151
|
+
logs.forEach(log => {
|
|
152
|
+
const match = log.match(/\b([\w/]+)_ms: (\d+)/);
|
|
153
|
+
if (match) {
|
|
154
|
+
times[match[1]] = parseInt(match[2]);
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// Throw if logs did not contain any times.
|
|
159
|
+
if (Object.keys(times).length === 0) {
|
|
160
|
+
throw new Error('AVM stdout did not contain any proving times in the stats!');
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Hack to make labels match.
|
|
164
|
+
const txLabelWithCount = `${txLabel}/${this.txCount - 1}`;
|
|
165
|
+
// I need to cast because TS doesnt realize metrics is protected not private.
|
|
166
|
+
(this as any).metrics?.recordProverMetrics(txLabelWithCount, {
|
|
167
|
+
proverSimulationStepMs: times['simulation/all'],
|
|
168
|
+
proverProvingStepMs: times['proving/all'],
|
|
169
|
+
proverTraceGenerationStepMs: times['tracegen/all'],
|
|
170
|
+
traceGenerationInteractionsMs: times['tracegen/interactions'],
|
|
171
|
+
traceGenerationTracesMs: times['tracegen/traces'],
|
|
172
|
+
provingSumcheckMs: times['prove/sumcheck'],
|
|
173
|
+
provingPcsMs: times['prove/pcs_rounds'],
|
|
174
|
+
provingLogDerivativeInverseMs: times['prove/log_derivative_inverse_round'],
|
|
175
|
+
provingLogDerivativeInverseCommitmentsMs: times['prove/log_derivative_inverse_commitments_round'],
|
|
176
|
+
provingWireCommitmentsMs: times['prove/wire_commitments_round'],
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
return proofRes as BBSuccess;
|
|
60
180
|
}
|
|
61
181
|
|
|
62
|
-
async verify(proofRes: BBSuccess): Promise<BBResult> {
|
|
182
|
+
async verify(proofRes: BBSuccess, publicInputs: AvmCircuitPublicInputs): Promise<BBResult> {
|
|
63
183
|
if (this.checkCircuitOnly) {
|
|
64
|
-
// Skip verification if we
|
|
65
|
-
// Check-circuit
|
|
184
|
+
// Skip verification if we are only checking the circuit.
|
|
185
|
+
// Check-circuit does not generate a proof to verify.
|
|
66
186
|
return proofRes;
|
|
67
187
|
}
|
|
68
|
-
// Then we test VK extraction and serialization.
|
|
69
|
-
const succeededRes = proofRes as BBSuccess;
|
|
70
|
-
const vkData = await extractAvmVkData(succeededRes.vkPath!);
|
|
71
|
-
VerificationKeyData.fromBuffer(vkData.toBuffer());
|
|
72
188
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
189
|
+
return await verifyAvmProof(BB_PATH, this.bbWorkingDirectory, proofRes.proofPath!, publicInputs, this.logger);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
public async proveVerify(avmCircuitInputs: AvmCircuitInputs, txLabel: string = 'unlabeledTx') {
|
|
193
|
+
const provingRes = await this.prove(avmCircuitInputs, txLabel);
|
|
194
|
+
expect(provingRes.status).toEqual(BB_RESULT.SUCCESS);
|
|
195
|
+
|
|
196
|
+
const verificationRes = await this.verify(provingRes as BBSuccess, avmCircuitInputs.publicInputs);
|
|
197
|
+
expect(verificationRes.status).toBe(BB_RESULT.SUCCESS);
|
|
76
198
|
}
|
|
77
199
|
|
|
78
200
|
public async simProveVerify(
|
|
@@ -82,89 +204,73 @@ export class AvmProvingTester extends PublicTxSimulationTester {
|
|
|
82
204
|
teardownCall: TestEnqueuedCall | undefined,
|
|
83
205
|
expectRevert: boolean | undefined,
|
|
84
206
|
feePayer = sender,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
expect(provingRes.status).toEqual(BB_RESULT.SUCCESS);
|
|
102
|
-
|
|
103
|
-
const verificationRes = await this.verify(provingRes as BBSuccess);
|
|
104
|
-
expect(verificationRes.status).toBe(BB_RESULT.SUCCESS);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
207
|
+
privateInsertions?: TestPrivateInsertions,
|
|
208
|
+
txLabel: string = 'unlabeledTx',
|
|
209
|
+
disableRevertCheck: boolean = false,
|
|
210
|
+
): Promise<PublicTxResult> {
|
|
211
|
+
const simTimer = new Timer();
|
|
212
|
+
const simRes = await this.simulateTx(
|
|
213
|
+
sender,
|
|
214
|
+
setupCalls,
|
|
215
|
+
appCalls,
|
|
216
|
+
teardownCall,
|
|
217
|
+
feePayer,
|
|
218
|
+
privateInsertions,
|
|
219
|
+
txLabel,
|
|
220
|
+
);
|
|
221
|
+
const simDuration = simTimer.ms();
|
|
222
|
+
this.logger.info(`Simulation took ${simDuration} ms for tx ${txLabel}`);
|
|
107
223
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
worldStateDB: WorldStateDB,
|
|
112
|
-
contractDataSource: SimpleContractDataSource,
|
|
113
|
-
merkleTrees: MerkleTreeWriteOperations,
|
|
114
|
-
) {
|
|
115
|
-
super(worldStateDB, contractDataSource, merkleTrees);
|
|
116
|
-
}
|
|
224
|
+
if (!disableRevertCheck) {
|
|
225
|
+
expect(simRes.revertCode.isOK()).toBe(expectRevert ? false : true);
|
|
226
|
+
}
|
|
117
227
|
|
|
118
|
-
|
|
119
|
-
const bbWorkingDirectory = await fs.mkdtemp(path.join(tmpdir(), 'bb-'));
|
|
228
|
+
const opString = this.checkCircuitOnly ? 'Check circuit' : 'Proving and verification';
|
|
120
229
|
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
230
|
+
const avmCircuitInputs = new AvmCircuitInputs(simRes.hints!, simRes.publicInputs!);
|
|
231
|
+
const timer = new Timer();
|
|
232
|
+
await this.proveVerify(avmCircuitInputs, txLabel);
|
|
233
|
+
this.logger.info(`${opString} took ${timer.ms()} ms for tx ${txLabel}`);
|
|
126
234
|
|
|
127
|
-
|
|
128
|
-
// Then we prove.
|
|
129
|
-
const proofRes = await generateAvmProofV2(BB_PATH, this.bbWorkingDirectory, avmCircuitInputs, this.logger);
|
|
130
|
-
if (proofRes.status === BB_RESULT.FAILURE) {
|
|
131
|
-
this.logger.error(`Proof generation failed: ${proofRes.reason}`);
|
|
132
|
-
}
|
|
133
|
-
expect(proofRes.status).toEqual(BB_RESULT.SUCCESS);
|
|
134
|
-
return proofRes as BBSuccess;
|
|
235
|
+
return simRes;
|
|
135
236
|
}
|
|
136
237
|
|
|
137
|
-
async
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
238
|
+
public override async executeTxWithLabel(
|
|
239
|
+
txLabel: string,
|
|
240
|
+
sender: AztecAddress,
|
|
241
|
+
setupCalls?: TestEnqueuedCall[],
|
|
242
|
+
appCalls?: TestEnqueuedCall[],
|
|
243
|
+
teardownCall?: TestEnqueuedCall,
|
|
244
|
+
feePayer?: AztecAddress,
|
|
245
|
+
privateInsertions?: TestPrivateInsertions,
|
|
246
|
+
) {
|
|
247
|
+
return await this.simProveVerify(
|
|
248
|
+
sender,
|
|
249
|
+
setupCalls ?? [],
|
|
250
|
+
appCalls ?? [],
|
|
251
|
+
teardownCall,
|
|
252
|
+
undefined,
|
|
253
|
+
feePayer,
|
|
254
|
+
privateInsertions,
|
|
255
|
+
txLabel,
|
|
256
|
+
true,
|
|
149
257
|
);
|
|
150
258
|
}
|
|
151
259
|
|
|
152
|
-
public async
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
teardownCall: TestEnqueuedCall | undefined,
|
|
157
|
-
expectRevert: boolean | undefined,
|
|
158
|
-
feePayer = sender,
|
|
260
|
+
public async simProveVerifyAppLogic(
|
|
261
|
+
appCall: TestEnqueuedCall,
|
|
262
|
+
expectRevert?: boolean,
|
|
263
|
+
txLabel: string = 'unlabeledTx',
|
|
159
264
|
) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
265
|
+
await this.simProveVerify(
|
|
266
|
+
/*sender=*/ AztecAddress.fromNumber(42),
|
|
267
|
+
/*setupCalls=*/ [],
|
|
268
|
+
[appCall],
|
|
269
|
+
undefined,
|
|
270
|
+
expectRevert,
|
|
271
|
+
/*feePayer=*/ undefined,
|
|
272
|
+
/*privateInsertions=*/ undefined,
|
|
273
|
+
txLabel,
|
|
274
|
+
);
|
|
169
275
|
}
|
|
170
276
|
}
|