Conversation
…type (#16239) The `UltraVerifier` and `UltraRecursiveVerifier` choose which public inputs to extract based on the `Flavor` with which they are instantiated. This is not advisable as it forces us to change testing code (so that `Mega` circuits have inputs of the form `HidingKernelIO`) and forces us to pay for unused public inputs when `Mega` circuits don't have ecc op tables (e.g., the `GoblinAvmRecursiveVerifier`). This PR changes the `verify_proof` function of both verifiers. We template the function over the `IO` class, which specifies which public inputs should be extracted from the proof. We make native and recursive verifiers uniform by modifying the return type of `verify_proof` in native land: we change it from `bool` to `UltraVerifierOutput`, which is a new struct that contains a boolean (the result of the verification) and ecc op tables (which are only filled when `UltraVerifier` is used to verify a `ClientIVC` proof). We also remove the `verify_proof` function in the recursive verifier that took a `HonkProof` instead of an `Stdlib::Proof`. The reason is that we to specialise `verify_proof` over the various `IO` types, and the compiler was complaining about ambiguous specialisations. This PR closes AztecProtocol/barretenberg#1489. --------- Co-authored-by: AztecBot <tech@aztecprotocol.com> Co-authored-by: ludamad <adam.domurad@gmail.com>
Collaborator
Author
|
🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass. |
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.
See merge-train-readme.md.
BEGIN_COMMIT_OVERRIDE
chore: Template ultra verifier
verify_proofover the public inputs type (#16239)END_COMMIT_OVERRIDE