Skip to content

Commit

Permalink
make dummy proof lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
Trivo25 committed Apr 28, 2024
1 parent 8fcba8e commit c410125
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/proof-system/zkprogram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1193,9 +1193,14 @@ async function dummyProof(maxProofsVerified: 0 | 1 | 2, domainLog2: number) {
);
}

let dummyProofCache: string | undefined;

async function dummyBase64Proof() {
if (dummyProofCache) return dummyProofCache;
let proof = await dummyProof(2, 15);
return Pickles.proofToBase64([2, proof]);
let base64Proof = Pickles.proofToBase64([2, proof]);
dummyProofCache = base64Proof;
return base64Proof;
}

// what feature flags to set to enable certain gate types
Expand Down

0 comments on commit c410125

Please sign in to comment.