Conversation
7e2633a to
d326cca
Compare
bac0c2e to
20ac880
Compare
There was a problem hiding this comment.
Pull request overview
Adds initial SNARK proof verification support to the mithril-stm Halo2 SNARK proof system (feature-gated by future_snark), by introducing a SnarkProof type and a verify entry point similar in spirit to the existing concatenation proof flow.
Changes:
- Introduces
halo2_snark::proofmodule withSnarkProof+ verification logic (including temporary SRS/VK derivation insideverify). - Adds
SNARK_PROOF_LENGTHconstant tohalo2_snarkmodule. - Adds new crate dependencies needed by the verifier path (
blake2b_simd,rand_chacha).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 14 comments.
| File | Description |
|---|---|
mithril-stm/src/proof_system/halo2_snark/proof.rs |
New SNARK proof container, SRS loading/generation helper, and verify implementation (+ feature-gated tests). |
mithril-stm/src/proof_system/halo2_snark/mod.rs |
Wires in the new proof submodule and defines the proof byte-length constant. |
mithril-stm/Cargo.toml |
Adds dependencies required by the new verification implementation. |
hjeljeli32
left a comment
There was a problem hiding this comment.
Looks a very good step towards the SNARK path in STM, and the proof generation/verification tests are useful. I left a couple of non-blocking comments probably more relevant when we wire the E2E path and move to product-ready code.
20ac880 to
7f18b2c
Compare
jpraynaud
left a comment
There was a problem hiding this comment.
LGTM 👍
I just left few minor comments to be addressed before merging.
curiecrypt
left a comment
There was a problem hiding this comment.
Nice work!
The test coverage is thorough: roundtrip, wrong message, wrong params, random bytes, serialization, and golden test cover the important cases well. The CircuitVerificationKey wrapper with custom serde is clean. The verify function signature is straightforward and consistent with the concatenation proof style.
I left a few comments on minor issues.
LGTM 🚀
…uit verification key
c522bba to
96e4430
Compare
Content
This PR includes the addition of a
proof.rsmodule inproof_system/halo2_snark/that contains aSnarkProofstructure and a verify function to verify the proof. The structure and function follow a similar style to the concatenation proof. For now, theverifyfunction loads/generates thesrsand generates theverification_keyon the fly in the function itself.I left some non-doc comments in the code that we can discuss and remove as you deem necessary. The names are also up for debate as I used
Snarkto prefix the structure and constants but we could go forHalo2Snarkor something more precise,Pre-submit checklist
Comments
Issue(s)
Relates to #3041