Can now assign public variables in witness without triggering error for missing secret values, and force Prover execution with invalid solution #38
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.
frontend/circuit.go: ParseWitness(..) now becomes ParsePublicWitness() and ParseSecretWitness() to allow the verifier to use the Circuit{} interface for assigning public data (otherwise the verifier was forced to give all variables, including the private ones). (@mdj33 was it the issue that you mentionned?)
internal/backend/circuits/: modified the test circuits so that for each circuit there is a correct/bad input for the prover, and a common public input
integration_test.go: added a function to test gnark from the API instead of the CLI (it allows to test if parseWitness is correct, via groth16.Verify, and providing a Circuit interface)
backend/groth16/groth16.go: added two versions for proving: Prove(...) and ProveUnsafe(). The latter performs the multi exponentiation whether or not the proof is correct. It's useful for testing wrong circuits, to check if the groht16 verifier catches an error on the test circuits in internal/backend/circuits/ (previously, the integration tests used only the CLI, and in case of a wrong proof, the verifier read an empty proof and didn't actually check if the groth16 verification failed)