-
Notifications
You must be signed in to change notification settings - Fork 37
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
add gas benchmark suite and minor edit to verifier #14
Conversation
c590ec9
to
cf2faef
Compare
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.
LGreatTM
@@ -9,5 +9,6 @@ | |||
"[solidity]": { | |||
"editor.defaultFormatter": "JuanBlanco.solidity" | |||
}, | |||
"coverage-gutters.coverageFileNames": ["lcov.info"] | |||
"coverage-gutters.coverageFileNames": ["lcov.info"], | |||
"solidity.compileUsingRemoteVersion": "v0.8.21+commit.d9974bed" |
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.
i recommend installing svm
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.
👍 installed!
I think might still be good to pin a version here since CREATE2 addresses depend on compiler versions.
@@ -88,7 +88,7 @@ contract P256Verifier { | |||
uint256 scalar_u = mulmod(uint256(message_hash), sInv, n); // (h * s^-1) in scalar field | |||
uint256 scalar_v = mulmod(r, sInv, n); // (r * s^-1) in scalar field | |||
|
|||
(uint256 r_x, bool mulmuladd_success) = ecZZ_mulmuladd_S_asm( | |||
(uint256 r_x, bool mulmuladd_success) = ecZZ_mulmuladd( |
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.
cosmetic diff from as-audited but LGTM
.split("\n") | ||
.map((line) => JSON.parse(line) as Vector); | ||
|
||
const vectors = [...wycheproofVectors, ...randomVectors]; |
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.
👍
Post enabling optimiser-runs, seems our verifier takes ~340k gas vs. FCL's ~270k. Seems worth it for readability/other improvements still. |
Closes #10.