chore(acir_tests): Add script to regenerate double_verify_proof inputs#3005
Merged
Conversation
kevaundray
approved these changes
Oct 25, 2023
Maddiaa0
pushed a commit
that referenced
this pull request
Oct 25, 2023
#3005) The information below can also be found in the README edited as part of this PR: `double_verify_proof` has inputs that are proof system specific such as the circuit verification key and the proofs themselves which are being recursively verified. Certain proof system changes can sometimes lead to the key or inner proofs now being invalid. This means we have to generate the proof specific inputs using our backend and pass it back into `double_verify_proof` to regenerate the accurate witness. The following is a temporary solution to manually regenerate the inputs for `double_verify_proof` on a specific Noir branch. First find `acir_tests/gen_inner_proof_inputs.sh`. Change the $BRANCH env var to your working branch and $PROOF_NAME to your first input you want to recursively verify. The script is going to generate the proof system specific verification key output and proof for the `assert_statement` test. To run: ``` ./gen_inner_proof_inputs.sh ``` To generate a new input you can run the script again. To generate a new file under `assert_statement/proofs/` be sure to change the $PROOF_NAME inside of the script. You can then copy these inputs over to your working branch in Noir and regenerate the witness for `double_verify_proof`. You can then change the branch in `run_acir_tests.sh` to this Noir working branch as well and `double_verify_proof` should pass. # Checklist: Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge. - [ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag. - [X] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code. - [X] Every change is related to the PR description. - [ ] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to relevant issues (if any exist).
sirasistant
pushed a commit
that referenced
this pull request
Oct 26, 2023
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-packages: 0.12.0</summary> ## [0.12.0](aztec-packages-v0.11.1...aztec-packages-v0.12.0) (2023-10-26) ### ⚠ BREAKING CHANGES * remove plookup pedersen methods from c_bind namespace ([#3033](#3033)) ### Features * Add function selector to cli to make it easier for to call functions ([#3053](#3053)) ([e0f0a8e](e0f0a8e)), closes [#1996](#1996) * Added correctness tests for several small relations in Goblin Translator (Goblin Translator part 8) ([#2963](#2963)) ([4c83250](4c83250)) * AWS mainnet fork ([#2986](#2986)) ([f491362](f491362)) * Correctness tests for decomposition and non-native field relations (Goblin Translator Part 9) ([#2981](#2981)) ([cdc830d](cdc830d)) * Enable sol verifier tests in ci ([#2997](#2997)) ([058de1e](058de1e)) * Goblin Translator flavor and permutation correctness (Goblin Translator part 7) ([#2961](#2961)) ([737f17f](737f17f)) * Linking errors ([#3004](#3004)) ([388a47b](388a47b)), closes [#2969](#2969) ### Bug Fixes * Fix clang-16 check ([#3030](#3030)) ([7a5a8b3](7a5a8b3)) * Fix docusaurus yellow paper build ([#3063](#3063)) ([db54c1f](db54c1f)) * Run deploy step for mainnet fork ([#3052](#3052)) ([9b6be22](9b6be22)) * Try fix publish bb ([#3036](#3036)) ([51248b5](51248b5)) * Unboxing - nargo.toml injection of "-" for "_" ([#3018](#3018)) ([83d6c51](83d6c51)) ### Miscellaneous * **acir_tests:** Add script to regenerate double_verify_proof inputs ([#3005](#3005)) ([9c4eab2](9c4eab2)) * Add portal contract option to deploy subcommand of aztec-cli ([#3032](#3032)) ([546b410](546b410)) * Fix `pedersen_compress_with_hash_index` c_bind function ([#3054](#3054)) ([a136f6e](a136f6e)) * Msg sender is 0 when no entrypoint is called ([#3024](#3024)) ([53c6680](53c6680)), closes [#2949](#2949) * Optimize pedersen hash for the common usecase by not allocating when input fits in scratch space ([#3056](#3056)) ([a0d290d](a0d290d)) * Proxy redundant `hash` methods ([#3046](#3046)) ([df389b5](df389b5)) * Remove "non-core artifact" nargo generated files ([#3026](#3026)) ([03ebb8e](03ebb8e)), closes [#2977](#2977) * Remove `pedersen_buffer_to_field` from c_bind ([#3045](#3045)) ([de7e63b](de7e63b)) * Remove pedersen hash oracle ([#3023](#3023)) ([0e6958c](0e6958c)) * Remove plookup pedersen methods from c_bind namespace ([#3033](#3033)) ([a8ea391](a8ea391)) * Rename pedersen typescript methods to be called `hash` instead of compress ([#3047](#3047)) ([2f7cc5f](2f7cc5f)) * Run check rebuild on boxes ([#3000](#3000)) ([c503d91](c503d91)) * Same prettier in boxes and everywhere else ([#3025](#3025)) ([0769d20](0769d20)), closes [#2978](#2978) </details> <details><summary>barretenberg.js: 0.12.0</summary> ## [0.12.0](barretenberg.js-v0.11.1...barretenberg.js-v0.12.0) (2023-10-26) ### ⚠ BREAKING CHANGES * remove plookup pedersen methods from c_bind namespace ([#3033](#3033)) ### Miscellaneous * Proxy redundant `hash` methods ([#3046](#3046)) ([df389b5](df389b5)) * Remove `pedersen_buffer_to_field` from c_bind ([#3045](#3045)) ([de7e63b](de7e63b)) * Remove plookup pedersen methods from c_bind namespace ([#3033](#3033)) ([a8ea391](a8ea391)) * Rename pedersen typescript methods to be called `hash` instead of compress ([#3047](#3047)) ([2f7cc5f](2f7cc5f)) </details> <details><summary>barretenberg: 0.12.0</summary> ## [0.12.0](barretenberg-v0.11.1...barretenberg-v0.12.0) (2023-10-26) ### ⚠ BREAKING CHANGES * remove plookup pedersen methods from c_bind namespace ([#3033](#3033)) ### Features * Added correctness tests for several small relations in Goblin Translator (Goblin Translator part 8) ([#2963](#2963)) ([4c83250](4c83250)) * Correctness tests for decomposition and non-native field relations (Goblin Translator Part 9) ([#2981](#2981)) ([cdc830d](cdc830d)) * Enable sol verifier tests in ci ([#2997](#2997)) ([058de1e](058de1e)) * Goblin Translator flavor and permutation correctness (Goblin Translator part 7) ([#2961](#2961)) ([737f17f](737f17f)) ### Bug Fixes * Fix clang-16 check ([#3030](#3030)) ([7a5a8b3](7a5a8b3)) ### Miscellaneous * **acir_tests:** Add script to regenerate double_verify_proof inputs ([#3005](#3005)) ([9c4eab2](9c4eab2)) * Fix `pedersen_compress_with_hash_index` c_bind function ([#3054](#3054)) ([a136f6e](a136f6e)) * Proxy redundant `hash` methods ([#3046](#3046)) ([df389b5](df389b5)) * Remove `pedersen_buffer_to_field` from c_bind ([#3045](#3045)) ([de7e63b](de7e63b)) * Remove pedersen hash oracle ([#3023](#3023)) ([0e6958c](0e6958c)) * Remove plookup pedersen methods from c_bind namespace ([#3033](#3033)) ([a8ea391](a8ea391)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
AztecBot
added a commit
to AztecProtocol/barretenberg
that referenced
this pull request
Oct 27, 2023
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-packages: 0.12.0</summary> ## [0.12.0](AztecProtocol/aztec-packages@aztec-packages-v0.11.1...aztec-packages-v0.12.0) (2023-10-26) ### ⚠ BREAKING CHANGES * remove plookup pedersen methods from c_bind namespace ([#3033](AztecProtocol/aztec-packages#3033)) ### Features * Add function selector to cli to make it easier for to call functions ([#3053](AztecProtocol/aztec-packages#3053)) ([e0f0a8e](AztecProtocol/aztec-packages@e0f0a8e)), closes [#1996](AztecProtocol/aztec-packages#1996) * Added correctness tests for several small relations in Goblin Translator (Goblin Translator part 8) ([#2963](AztecProtocol/aztec-packages#2963)) ([4c83250](AztecProtocol/aztec-packages@4c83250)) * AWS mainnet fork ([#2986](AztecProtocol/aztec-packages#2986)) ([f491362](AztecProtocol/aztec-packages@f491362)) * Correctness tests for decomposition and non-native field relations (Goblin Translator Part 9) ([#2981](AztecProtocol/aztec-packages#2981)) ([cdc830d](AztecProtocol/aztec-packages@cdc830d)) * Enable sol verifier tests in ci ([#2997](AztecProtocol/aztec-packages#2997)) ([058de1e](AztecProtocol/aztec-packages@058de1e)) * Goblin Translator flavor and permutation correctness (Goblin Translator part 7) ([#2961](AztecProtocol/aztec-packages#2961)) ([737f17f](AztecProtocol/aztec-packages@737f17f)) * Linking errors ([#3004](AztecProtocol/aztec-packages#3004)) ([388a47b](AztecProtocol/aztec-packages@388a47b)), closes [#2969](AztecProtocol/aztec-packages#2969) ### Bug Fixes * Fix clang-16 check ([#3030](AztecProtocol/aztec-packages#3030)) ([7a5a8b3](AztecProtocol/aztec-packages@7a5a8b3)) * Fix docusaurus yellow paper build ([#3063](AztecProtocol/aztec-packages#3063)) ([db54c1f](AztecProtocol/aztec-packages@db54c1f)) * Run deploy step for mainnet fork ([#3052](AztecProtocol/aztec-packages#3052)) ([9b6be22](AztecProtocol/aztec-packages@9b6be22)) * Try fix publish bb ([#3036](AztecProtocol/aztec-packages#3036)) ([51248b5](AztecProtocol/aztec-packages@51248b5)) * Unboxing - nargo.toml injection of "-" for "_" ([#3018](AztecProtocol/aztec-packages#3018)) ([83d6c51](AztecProtocol/aztec-packages@83d6c51)) ### Miscellaneous * **acir_tests:** Add script to regenerate double_verify_proof inputs ([#3005](AztecProtocol/aztec-packages#3005)) ([9c4eab2](AztecProtocol/aztec-packages@9c4eab2)) * Add portal contract option to deploy subcommand of aztec-cli ([#3032](AztecProtocol/aztec-packages#3032)) ([546b410](AztecProtocol/aztec-packages@546b410)) * Fix `pedersen_compress_with_hash_index` c_bind function ([#3054](AztecProtocol/aztec-packages#3054)) ([a136f6e](AztecProtocol/aztec-packages@a136f6e)) * Msg sender is 0 when no entrypoint is called ([#3024](AztecProtocol/aztec-packages#3024)) ([53c6680](AztecProtocol/aztec-packages@53c6680)), closes [#2949](AztecProtocol/aztec-packages#2949) * Optimize pedersen hash for the common usecase by not allocating when input fits in scratch space ([#3056](AztecProtocol/aztec-packages#3056)) ([a0d290d](AztecProtocol/aztec-packages@a0d290d)) * Proxy redundant `hash` methods ([#3046](AztecProtocol/aztec-packages#3046)) ([df389b5](AztecProtocol/aztec-packages@df389b5)) * Remove "non-core artifact" nargo generated files ([#3026](AztecProtocol/aztec-packages#3026)) ([03ebb8e](AztecProtocol/aztec-packages@03ebb8e)), closes [#2977](AztecProtocol/aztec-packages#2977) * Remove `pedersen_buffer_to_field` from c_bind ([#3045](AztecProtocol/aztec-packages#3045)) ([de7e63b](AztecProtocol/aztec-packages@de7e63b)) * Remove pedersen hash oracle ([#3023](AztecProtocol/aztec-packages#3023)) ([0e6958c](AztecProtocol/aztec-packages@0e6958c)) * Remove plookup pedersen methods from c_bind namespace ([#3033](AztecProtocol/aztec-packages#3033)) ([a8ea391](AztecProtocol/aztec-packages@a8ea391)) * Rename pedersen typescript methods to be called `hash` instead of compress ([#3047](AztecProtocol/aztec-packages#3047)) ([2f7cc5f](AztecProtocol/aztec-packages@2f7cc5f)) * Run check rebuild on boxes ([#3000](AztecProtocol/aztec-packages#3000)) ([c503d91](AztecProtocol/aztec-packages@c503d91)) * Same prettier in boxes and everywhere else ([#3025](AztecProtocol/aztec-packages#3025)) ([0769d20](AztecProtocol/aztec-packages@0769d20)), closes [#2978](AztecProtocol/aztec-packages#2978) </details> <details><summary>barretenberg.js: 0.12.0</summary> ## [0.12.0](AztecProtocol/aztec-packages@barretenberg.js-v0.11.1...barretenberg.js-v0.12.0) (2023-10-26) ### ⚠ BREAKING CHANGES * remove plookup pedersen methods from c_bind namespace ([#3033](AztecProtocol/aztec-packages#3033)) ### Miscellaneous * Proxy redundant `hash` methods ([#3046](AztecProtocol/aztec-packages#3046)) ([df389b5](AztecProtocol/aztec-packages@df389b5)) * Remove `pedersen_buffer_to_field` from c_bind ([#3045](AztecProtocol/aztec-packages#3045)) ([de7e63b](AztecProtocol/aztec-packages@de7e63b)) * Remove plookup pedersen methods from c_bind namespace ([#3033](AztecProtocol/aztec-packages#3033)) ([a8ea391](AztecProtocol/aztec-packages@a8ea391)) * Rename pedersen typescript methods to be called `hash` instead of compress ([#3047](AztecProtocol/aztec-packages#3047)) ([2f7cc5f](AztecProtocol/aztec-packages@2f7cc5f)) </details> <details><summary>barretenberg: 0.12.0</summary> ## [0.12.0](AztecProtocol/aztec-packages@barretenberg-v0.11.1...barretenberg-v0.12.0) (2023-10-26) ### ⚠ BREAKING CHANGES * remove plookup pedersen methods from c_bind namespace ([#3033](AztecProtocol/aztec-packages#3033)) ### Features * Added correctness tests for several small relations in Goblin Translator (Goblin Translator part 8) ([#2963](AztecProtocol/aztec-packages#2963)) ([4c83250](AztecProtocol/aztec-packages@4c83250)) * Correctness tests for decomposition and non-native field relations (Goblin Translator Part 9) ([#2981](AztecProtocol/aztec-packages#2981)) ([cdc830d](AztecProtocol/aztec-packages@cdc830d)) * Enable sol verifier tests in ci ([#2997](AztecProtocol/aztec-packages#2997)) ([058de1e](AztecProtocol/aztec-packages@058de1e)) * Goblin Translator flavor and permutation correctness (Goblin Translator part 7) ([#2961](AztecProtocol/aztec-packages#2961)) ([737f17f](AztecProtocol/aztec-packages@737f17f)) ### Bug Fixes * Fix clang-16 check ([#3030](AztecProtocol/aztec-packages#3030)) ([7a5a8b3](AztecProtocol/aztec-packages@7a5a8b3)) ### Miscellaneous * **acir_tests:** Add script to regenerate double_verify_proof inputs ([#3005](AztecProtocol/aztec-packages#3005)) ([9c4eab2](AztecProtocol/aztec-packages@9c4eab2)) * Fix `pedersen_compress_with_hash_index` c_bind function ([#3054](AztecProtocol/aztec-packages#3054)) ([a136f6e](AztecProtocol/aztec-packages@a136f6e)) * Proxy redundant `hash` methods ([#3046](AztecProtocol/aztec-packages#3046)) ([df389b5](AztecProtocol/aztec-packages@df389b5)) * Remove `pedersen_buffer_to_field` from c_bind ([#3045](AztecProtocol/aztec-packages#3045)) ([de7e63b](AztecProtocol/aztec-packages@de7e63b)) * Remove pedersen hash oracle ([#3023](AztecProtocol/aztec-packages#3023)) ([0e6958c](AztecProtocol/aztec-packages@0e6958c)) * Remove plookup pedersen methods from c_bind namespace ([#3033](AztecProtocol/aztec-packages#3033)) ([a8ea391](AztecProtocol/aztec-packages@a8ea391)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
The information below can also be found in the README edited as part of this PR:
double_verify_proofhas inputs that are proof system specific such as the circuit verification key and the proofs themselves which are being recursively verified. Certain proof system changes can sometimes lead to the key or inner proofs now being invalid.This means we have to generate the proof specific inputs using our backend and pass it back into
double_verify_proofto regenerate the accurate witness. The following is a temporary solution to manually regenerate the inputs fordouble_verify_proofon a specific Noir branch.First find
acir_tests/gen_inner_proof_inputs.sh. Change the $BRANCH env var to your working branch and $PROOF_NAME to your first input you want to recursively verify. The script is going to generate the proof system specific verification key output and proof for theassert_statementtest.To run:
To generate a new input you can run the script again. To generate a new file under
assert_statement/proofs/be sure to change the $PROOF_NAME inside of the script.You can then copy these inputs over to your working branch in Noir and regenerate the witness for
double_verify_proof. You can then change the branch inrun_acir_tests.shto this Noir working branch as well anddouble_verify_proofshould pass.Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.