Sum26 circ project(unit test framework)#240
Closed
karandeol-26 wants to merge 39 commits into
Closed
Conversation
R1CS printer and ZoKratesCurly checker
Add support for Dorian
Lookups can take array values
Fix warnings
Commitnprove
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.