Skip to content

Commit

Permalink
chore: add smoke checks on proof
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Oct 24, 2023
1 parent bcfdf56 commit 4c0a05e
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ it(`smart contract can verify a recursive proof`, async () => {
const recursion_proof = await recursion.generateFinalProof(recursion_inputs);
expect(await recursion.verifyFinalProof(recursion_proof)).to.be.true;

// Proof should not contain any public inputs so should be 2144 bytes long.
expect(recursion_proof.proof.length).to.be.eq(2144);
// Circuit has 16 public inputs which each are 32 bytes.
expect(recursion_proof.publicInputs.length).to.be.eq(16);
for (const publicInput of recursion_proof.publicInputs) {
expect(publicInput.length).to.be.eq(32);
}

// Smart contract verification

const contract = await ethers.deployContract('contracts/recursion.sol:UltraVerifier', []);
Expand Down

0 comments on commit 4c0a05e

Please sign in to comment.