-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: (halo2) SNARK verifier #805
Conversation
With the following modifications, i can use this branch to build/run/prove a plonk verification program. Things i fixed:
Other thoughts:
My program
|
I think there was some nightmare with |
some high level thoughts: the plonk verification can be generally split into 2 parts: (1) msm and pairing, heavy computation, may >90% of all "cycles" needed (2) light weight computation, like fr ops and other control flow glue codes. Maybe just "patch" msm and pairing, we can get most of the speedup. Though the PR works well, i feel there are a lot of "wrapper" codes in trait.rs, also in other files, the codes are quite similar to NativeLoader. I don't have an alternative good solution now, just feel this design may not be easy to maintain long term, it has to be changed with snark-verfier::EvmTranscript every time, like endianness and how squeeze_challenge is computated. |
* fix halo2 verifier guest code * clean * build * switch to workspace snark verifier
@lispc previous tests were only on host, not targeting zkvm. I added integration test targeting zkvm and discovered that snark-verifier uses std library HashMap somewhere. This hashmap thing is annoying enough I will try to add the |
oh actually I tested in guest. (and even proved it "recursively") I changed hashmap to btree map locally. I remember it is a "evaluation.rs"? |
Ah, maybe it's easier if I just update in |
Guest library for verifying halo2 proofs.
Integration test currently failing because:
Changesnark-verifier
requires std library and in particular usesstd::collections::HashMap
. We need to implementsys_rand
with a phantom instruction passing to host randomness (INT-2955)snark-verifier
to useBTreeMap
. chore: useBTreeMap
instead ofHashMap
forevaluations
axiom-crypto/snark-verifier#68