-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SRI - 815 Add verifier.sol for workstep circuits #818
SRI - 815 Add verifier.sol for workstep circuits #818
Conversation
@Therecanbeonlyone1969 Do we need all three workstep circuit contracts? OR can we use only the workstep1 verifier contract to verify all three proofs (workstep1, workstep2 and workstep3)? |
My understanding from the call is that we can use a single one, although not sure why would the command create one contract for each circuit. I see that they differ only in the first dozen const variables. Anyways, leaving to @Therecanbeonlyone1969 for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ... are we doing 3 contracts because of the different verification keys by circuit? @biscuitdey
@Therecanbeonlyone1969 Yes. The verification key values (Qm, Ql, etc.) are hardcoded in each of the verifier contract. |
@ognjenkurtic @Therecanbeonlyone1969 We are using three separate verifier contracts for the 3 worksteps Please re-approve PR. |
…815-sri-add-the-verifirersol-as-an-zkp-artifact-to-the-bpi-and-env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. As an improvement, next time, let's update the verifier code to take storage variables
Description
This PR adds the verifier contracts for the workstep circuits.
The verifier contracts are generated while compiling the circuits using the script (plonk.sh).
We are using three separate verifier contracts for the 3 worksteps
because the verification key values are hardcoded inside the contract.
Using one verifier contract (where we pass the verification key as a function
param) is not possible as the contract uses assembly inside solidity contract
and assembly does not accept local variables. Also, if we declare the values as
storage variables, then we would have to change the verifyFunction code it as
there is different syntax to use storage variables.
Related Issue
#815
How Has This Been Tested
Tests would be added in upcoming PRs.
Types of changes
Checklist