Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and improve verification key to fields (de)serialization #1090

Closed
ledwards2225 opened this issue Sep 4, 2024 · 0 comments · Fixed by AztecProtocol/aztec-packages#8431
Assignees

Comments

@ledwards2225
Copy link
Collaborator

The noir/acir-bberg interface requires serialization of a verification key to and from field values, i.e. VerificationKey <--> std::vector<bb::fr>. The current logic for doing this is brittle in that it needs to be manually updated each time a change is made to the vkey structure fields and there are no tests to ensure that this is done correctly and that all fields are accounted for. (The current implementations are missing some fields, for example). Refactor the logic to improve robustness (or at least correct the methods) and add a test to ensure they don't break quietly in the future.

Note: This work will allow for the completion of the acir-ivc interface which requires constructing a stdlib vkey from the witness indices of a verification key represented as a vector of field values.

@ledwards2225 ledwards2225 self-assigned this Sep 4, 2024
AztecBot pushed a commit that referenced this issue Sep 11, 2024
The previous
[PR](AztecProtocol/aztec-packages#8230) in this
series set up the basic infrastructure for completing kernel circuits
from acir RecursionConstraints, including connecting the dummy proof in
the constraint to the genuine witnesses known internally in AztecIvc.
This PR completes this line work by using the (genuine) verification key
witnesses in the constraint to construct the stdlib verification keys
from which the recursive verifiers are instantiated.

Doing this properly involved correcting/implementing/testing various
serialization/deserialization/construction methods for native and stdlib
verification keys - this accounts for most of the changes in this PR.
The corrections mostly applied to Mega and were related to not
accounting for `databus_propagation_data`. I also updated some of the
corresponding Ultra methods in an attempt to make them a bit more
readable and more easily maintainable.

closes #1090
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 a pull request may close this issue.

1 participant