@@ -16,7 +16,7 @@ import {
1616 createDebugLogger ,
1717 deployL1Contract ,
1818} from '@aztec/aztec.js' ;
19- import { BBCircuitVerifier } from '@aztec/bb-prover' ;
19+ import { BBCircuitVerifier , type ClientProtocolCircuitVerifier , TestCircuitVerifier } from '@aztec/bb-prover' ;
2020import { RollupAbi } from '@aztec/l1-artifacts' ;
2121import { TokenContract } from '@aztec/noir-contracts.js' ;
2222import { type ProverNode , type ProverNodeConfig , createProverNode } from '@aztec/prover-node' ;
@@ -73,14 +73,14 @@ export class FullProverTest {
7373 private provenComponents : ProvenSetup [ ] = [ ] ;
7474 private bbConfigCleanup ?: ( ) => Promise < void > ;
7575 private acvmConfigCleanup ?: ( ) => Promise < void > ;
76- circuitProofVerifier ?: BBCircuitVerifier ;
76+ circuitProofVerifier ?: ClientProtocolCircuitVerifier ;
7777 provenAssets : TokenContract [ ] = [ ] ;
7878 private context ! : SubsystemsContext ;
7979 private proverNode ! : ProverNode ;
8080 private simulatedProverNode ! : ProverNode ;
8181 private l1Contracts ! : DeployL1Contracts ;
8282
83- constructor ( testName : string , private minNumberOfTxsPerBlock : number ) {
83+ constructor ( testName : string , private minNumberOfTxsPerBlock : number , private realProofs = true ) {
8484 this . logger = createDebugLogger ( `aztec:full_prover_test:${ testName } ` ) ;
8585 this . snapshotManager = createSnapshotManager ( `full_prover_integration/${ testName } ` , dataPath ) ;
8686 }
@@ -149,33 +149,39 @@ export class FullProverTest {
149149
150150 // Configure a full prover PXE
151151
152- const [ acvmConfig , bbConfig ] = await Promise . all ( [ getACVMConfig ( this . logger ) , getBBConfig ( this . logger ) ] ) ;
153- if ( ! acvmConfig || ! bbConfig ) {
154- throw new Error ( 'Missing ACVM or BB config' ) ;
155- }
152+ let acvmConfig : Awaited < ReturnType < typeof getACVMConfig > > | undefined ;
153+ let bbConfig : Awaited < ReturnType < typeof getBBConfig > > | undefined ;
154+ if ( this . realProofs ) {
155+ [ acvmConfig , bbConfig ] = await Promise . all ( [ getACVMConfig ( this . logger ) , getBBConfig ( this . logger ) ] ) ;
156+ if ( ! acvmConfig || ! bbConfig ) {
157+ throw new Error ( 'Missing ACVM or BB config' ) ;
158+ }
156159
157- this . acvmConfigCleanup = acvmConfig . cleanup ;
158- this . bbConfigCleanup = bbConfig . cleanup ;
160+ this . acvmConfigCleanup = acvmConfig . cleanup ;
161+ this . bbConfigCleanup = bbConfig . cleanup ;
159162
160- if ( ! bbConfig ?. bbWorkingDirectory || ! bbConfig ?. bbBinaryPath ) {
161- throw new Error ( `Test must be run with BB native configuration` ) ;
162- }
163+ if ( ! bbConfig ?. bbWorkingDirectory || ! bbConfig ?. bbBinaryPath ) {
164+ throw new Error ( `Test must be run with BB native configuration` ) ;
165+ }
163166
164- this . circuitProofVerifier = await BBCircuitVerifier . new ( bbConfig ) ;
167+ this . circuitProofVerifier = await BBCircuitVerifier . new ( bbConfig ) ;
165168
166- this . logger . debug ( `Configuring the node for real proofs...` ) ;
167- await this . aztecNode . setConfig ( {
168- realProofs : true ,
169- minTxsPerBlock : this . minNumberOfTxsPerBlock ,
170- } ) ;
169+ this . logger . debug ( `Configuring the node for real proofs...` ) ;
170+ await this . aztecNode . setConfig ( {
171+ realProofs : true ,
172+ minTxsPerBlock : this . minNumberOfTxsPerBlock ,
173+ } ) ;
174+ } else {
175+ this . circuitProofVerifier = new TestCircuitVerifier ( ) ;
176+ }
171177
172178 this . logger . debug ( `Main setup completed, initializing full prover PXE, Node, and Prover Node...` ) ;
173179
174180 for ( let i = 0 ; i < 2 ; i ++ ) {
175181 const result = await setupPXEService (
176182 this . aztecNode ,
177183 {
178- proverEnabled : true ,
184+ proverEnabled : this . realProofs ,
179185 bbBinaryPath : bbConfig ?. bbBinaryPath ,
180186 bbWorkingDirectory : bbConfig ?. bbWorkingDirectory ,
181187 } ,
@@ -239,7 +245,7 @@ export class FullProverTest {
239245 txProviderNodeUrl : undefined ,
240246 dataDirectory : undefined ,
241247 proverId : new Fr ( 81 ) ,
242- realProofs : true ,
248+ realProofs : this . realProofs ,
243249 proverAgentConcurrency : 2 ,
244250 publisherPrivateKey : `0x${ proverNodePrivateKey ! . toString ( 'hex' ) } ` ,
245251 proverNodeMaxPendingJobs : 100 ,
@@ -341,13 +347,17 @@ export class FullProverTest {
341347 }
342348
343349 async deployVerifier ( ) {
350+ if ( ! this . realProofs ) {
351+ return ;
352+ }
353+
344354 if ( ! this . circuitProofVerifier ) {
345355 throw new Error ( 'No verifier' ) ;
346356 }
347357
348358 const { walletClient, publicClient, l1ContractAddresses } = this . context . deployL1ContractsValues ;
349359
350- const contract = await this . circuitProofVerifier . generateSolidityContract (
360+ const contract = await ( this . circuitProofVerifier as BBCircuitVerifier ) . generateSolidityContract (
351361 'BlockRootRollupArtifact' ,
352362 'UltraHonkVerifier.sol' ,
353363 ) ;
0 commit comments