You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are inconsistencies in handling of public inputs in the proof. For most of the ACIR stack, the proof is separate to the proof. This decision was made because the public inputs may be derived by the verifier and so it is of no benefit for the prover to send them alongside the proof. Moreover, even in this model, the verifier would need to check correctness of the public inputs that came with the proof anyway.
Solution
We could fix this inconsistency in the internals of barretenberg, but this would require a conversation with more stakeholders. The most optimal solution right now is to make the barretenberg API accept the proof and public inputs, then internally it concatenates them together. Furthermore, when we return a proof, we chop off the public inputs from the proof.
Note: We could return the public inputs separately from the proof, since its reasonable to assume that the prover will always have them. I think we should not do this now though. The only benefit I can think of is when the public inputs are not in the initial set of witnesses, this however is a particularity of barretenberg circuits that we should not make leak through the interface. For more information, see set_public_input in barretenberg. I do not expect any gadget that is used via ACIR/Noir to ever need that function.
Notes
With the above, we will not need to make changes to the internals of barretenberg, so it should be a quick fix.
This breaks all of our test vectors because it would require the binaries to accept public inputs and currently the compiled ACIRs do not include them. We would need to add a public_inputs file for bb to read from.
The text was updated successfully, but these errors were encountered:
kevaundray
changed the title
barretenberg API and bb.js should be modified to accept the proof alongside the public inputs
barretenberg API and bb.js should be modified to accept the proof separate the public inputs
Aug 20, 2023
Problem
There are inconsistencies in handling of public inputs in the proof. For most of the ACIR stack, the proof is separate to the proof. This decision was made because the public inputs may be derived by the verifier and so it is of no benefit for the prover to send them alongside the proof. Moreover, even in this model, the verifier would need to check correctness of the public inputs that came with the proof anyway.
Solution
We could fix this inconsistency in the internals of barretenberg, but this would require a conversation with more stakeholders. The most optimal solution right now is to make the barretenberg API accept the proof and public inputs, then internally it concatenates them together. Furthermore, when we return a proof, we chop off the public inputs from the proof.
Notes
With the above, we will not need to make changes to the internals of barretenberg, so it should be a quick fix.
Won't put it as part of #1672 for two reasons:
The text was updated successfully, but these errors were encountered: