Possible to build witness from r1CS only? #981
-
Hey there, do I really need the actual circuit code to build witness for proving? Shouldn't R1CS be enough? I'm just thinking of optimizing space for mobile and removing some code would help |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You are right, you do not need the full circuit in Go. See for example https://pkg.go.dev/github.com/consensys/[email protected]/backend/witness#example-Witness how to define witness for compiled circuit. |
Beta Was this translation helpful? Give feedback.
-
Actually the opposite is also possible, I can compile circuit each time instead of loading it from a file. Especially that reading r1cs is not working right now :) |
Beta Was this translation helpful? Give feedback.
You are right, you do not need the full circuit in Go. See for example https://pkg.go.dev/github.com/consensys/[email protected]/backend/witness#example-Witness how to define witness for compiled circuit.