-
Notifications
You must be signed in to change notification settings - Fork 509
feat: optimize solidity honk verifier #8690
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
4dccea4
to
9db332e
Compare
barretenberg/acir_tests/bootstrap.sh
Outdated
echo "$prefix FLOW=sol_honk USE_OPTIMIZED_CONTRACT=true $run_test assert_statement" | ||
echo "$prefix FLOW=sol_honk USE_OPTIMIZED_CONTRACT=true $run_test a_1_mul" | ||
echo "$prefix FLOW=sol_honk USE_OPTIMIZED_CONTRACT=true $run_test slices" | ||
echo "$prefix FLOW=sol_honk USE_OPTIMIZED_CONTRACT=true $run_test verify_honk_proof" |
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.
we don't care about optimized zk contract?
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.
not for now, its not P1 for audit right now, but will be made a priority once everything in the current round of audits is complete
#!/bin/bash | ||
|
||
# Script to copy optimized Solidity verifier files into the C++ honk_optimized_contract.hpp file | ||
# This automates the manual process of copying optimized verifier contracts |
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.
Comments from slack:
No comments are blocking, ok with this going in as-is for now
but - we can probably remove a bit of brittleness. you're doing template discovery on what would normally be an output artifact, then doing find replace with strings.
What about:
the script copies the solidity as-is. but the solidity has e.g. // c++-replace VK_HASH comments.
the c++-replace directives can affect the next line
2. store the C++ artifacts in a map of symbol to string
3. process the c++-replace directives
probably error on any unused symbols
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.
the other thing is, it's more normal to bundle artifacts in C++ as its own header file
f824ebc
to
4cfb472
Compare
Complete, without zk Cuts off a million next steps: proof size has a large consequence with this one, due to memory expansion, so having a different proof type for the keccak one which does tighter serialisation will save a good chunk of gas - working on this next - pr here #16018
4cfb472
to
39cc87a
Compare
Complete, without zk
Cuts off a million
next steps:
proof size has a large consequence with this one, due to memory expansion, so having a different proof type for the keccak one which does tighter serialisation will save a good chunk of gas - working on this next