Skip to content

Commit

Permalink
Honor AVM_PROVING_PRESERVE_WORKING_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Aug 13, 2024
1 parent 99a761d commit fd7c989
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions yarn-project/bb-prover/src/prover/bb_prover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,9 +571,10 @@ export class BBNativeRollupProver implements ServerCircuitProver {
}

private async createAvmProof(input: AvmCircuitInputs): Promise<ProofAndVerificationKey> {
const cleanupDir: boolean = !process.env.AVM_PROVING_PRESERVE_WORKING_DIR;
const skipCleanup =
['1', 'true'].includes(process.env.AVM_PROVING_PRESERVE_WORKING_DIR ?? '') || !!this.config.bbSkipCleanup;
const operation = async (bbWorkingDirectory: string): Promise<ProofAndVerificationKey> => {
if (!cleanupDir) {
if (skipCleanup) {
logger.info(`Preserving working directory ${bbWorkingDirectory}`);
}
const provingResult = await this.generateAvmProofWithBB(input, bbWorkingDirectory);
Expand Down Expand Up @@ -608,7 +609,7 @@ export class BBNativeRollupProver implements ServerCircuitProver {

return { proof, verificationKey };
};
return await this.runInDirectory(operation);
return await runInDirectory(this.config.bbWorkingDirectory, operation, skipCleanup);
}

public async getTubeProof(
Expand Down

0 comments on commit fd7c989

Please sign in to comment.