Skip to content

Sum26 circ project(unit test framework)#240

Closed
karandeol-26 wants to merge 39 commits into
circify:masterfrom
sschefflab:sum26-circ-project(unit-test-framework)
Closed

Sum26 circ project(unit test framework)#240
karandeol-26 wants to merge 39 commits into
circify:masterfrom
sschefflab:sum26-circ-project(unit-test-framework)

Conversation

@karandeol-26

Copy link
Copy Markdown

This adds a reusable function, to_proof_data, in a new src/compile.rs that takes a compiled computation and returns the ProverData and Verifier Data entirely in memory (lowering to R1CS, optimizing, and finalizing). The circ binary's main now calls this function instead of doing those steps inline, so there's a single shared code path. A new integration test, tests/inmem.rs, compiles mul.zok in memory, builds its inputs in memory, and runs setup/prove/verify with the Mirage backend, checking both that valid inputs verify and that a wrong output is rejected. The only file
read is the .zok source.

kmerrill18 and others added 30 commits December 8, 2025 20:02
R1CS printer and ZoKratesCurly checker
woopuiyung and others added 9 commits March 17, 2026 23:21
This adds a reusable function, to_proof_data, in a new src/compile.rs that takes a compiled computation and returns the ProverData and Verifier Data entirely in memory (lowering to R1CS, optimizing, and finalizing). The circ binary's main now calls this function instead of doing those steps inline, so there's a single shared code path. A new integration test, tests/inmem.rs, compiles mul.zok in memory, builds its inputs in memory, and runs setup/prove/verify with the Mirage backend, checking both that valid inputs verify and that a wrong output is rejected. The only file
read is the .zok source. This is Step 1 of the ZoKrates unit-testing project.
Removed default features from Cargo.toml, (CI requires no default features)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants