-
Notifications
You must be signed in to change notification settings - Fork 598
chore: fixed VK in MegaZK/ECCVM/Translator/Tube Recursive Verifier circuits #11377
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
Merged
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
9a71a91
eccvm sumcheck butchered
iakovenkos 1b18f05
wip wip
iakovenkos e00dd04
eccvm verifies
iakovenkos 682c075
build fixed recursion failing
iakovenkos af6d6e6
debugging rec verifier
iakovenkos 9323abe
recursion fix
iakovenkos 230ce10
sumcheck output unified
iakovenkos f1eb3c5
remove self reduce
iakovenkos 8cb98b0
trying to constify eccvm recursive
iakovenkos 806ef49
Merge branch 'master' into si/fixing-eccvm-zk-sumcheck
iakovenkos 41654f3
Merge branch 'master' into si/fixing-eccvm-zk-sumcheck
iakovenkos c91f533
build fix
iakovenkos e1d1d11
Merge branch 'si/fixing-eccvm-zk-sumcheck' of github.com:AztecProtoco…
iakovenkos 7c73666
tests fixed
iakovenkos f525ef2
Merge branch 'master' into si/fixing-eccvm-zk-sumcheck
iakovenkos 6aec0f7
commited sumcheck test added
iakovenkos 74cd1a8
test cleaned up
iakovenkos f53a308
creating test for pcs
iakovenkos 2f1f99d
Merge branch 'si/fixing-eccvm-zk-sumcheck' of github.com:AztecProtoco…
iakovenkos 35df724
Merge branch 'master' into si/fixing-eccvm-zk-sumcheck
iakovenkos f4c3dc8
shplemini test + clean-up + figuring out constness
iakovenkos 1587941
const proof size + clean up + docs
iakovenkos e94c031
eccvm bench correction
iakovenkos 9e5e4e7
build fix
iakovenkos 51b3766
Merge branch 'master' into si/fixing-eccvm-zk-sumcheck
iakovenkos 6731c5d
more clean-up
iakovenkos fc108a3
Merge branch 'si/fixing-eccvm-zk-sumcheck' of github.com:AztecProtoco…
iakovenkos 80b6bf0
Merge branch 'master' into si/fixing-eccvm-zk-sumcheck
iakovenkos 48a1a18
eccvm recursive failure tests fixed
iakovenkos fdb62f1
bug fix
iakovenkos aa3f90b
MegaZKRecursive const vk fix + test
iakovenkos d2f4581
translator test added
iakovenkos 4f878ab
eccvm test added
iakovenkos 7ceacea
some renaming
iakovenkos 4a3f07b
resolving comments
iakovenkos 98d304f
killed optional bool in sumcheck output + resolving comments
iakovenkos 6b5691f
Merge remote-tracking branch 'origin/si/fixing-eccvm-zk-sumcheck' int…
iakovenkos db9c2b1
+tube_vk test
iakovenkos 37cf638
isolated a method that compares recursive verifier circuits in variou…
iakovenkos c3e438f
Merge branch 'master' into si/tube-const-tests
iakovenkos 1473705
Merge branch 'master' into si/tube-const-tests
iakovenkos af3b502
bad merge fix
iakovenkos b811b5e
remove noise in sumcheck docs
iakovenkos 205b858
wrong assert fix
iakovenkos fcc8df7
clean-up after review
iakovenkos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
57 changes: 57 additions & 0 deletions
57
...etenberg/cpp/src/barretenberg/stdlib/honk_verifier/ultra_verification_keys_comparator.hpp
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
|
|
||
|
|
||
| #include "barretenberg/common/assert.hpp" | ||
| #include "barretenberg/common/log.hpp" | ||
| #include <array> | ||
| #include <memory> | ||
| namespace bb { | ||
|
|
||
| template <typename OuterFlavor> | ||
| static void compare_ultra_blocks_and_verification_keys( | ||
| std::array<typename OuterFlavor::CircuitBuilder::ExecutionTrace, 2> blocks, | ||
| std::array<std::shared_ptr<typename OuterFlavor::VerificationKey>, 2> verification_keys) | ||
| { | ||
|
|
||
| // Retrieves the trace blocks (each consisting of a specific gate) from the recursive verifier circuit | ||
|
|
||
| bool broke(false); | ||
| auto check_eq = [&broke](auto& p1, auto& p2, size_t block_idx, size_t selector_idx) { | ||
| ASSERT(p1.size() == p2.size()); | ||
| for (size_t idx = 0; idx < p1.size(); idx++) { | ||
| if (p1[idx] != p2[idx]) { | ||
| info("Mismatch selector ", selector_idx, " in block ", block_idx, ", at ", idx); | ||
| broke = true; | ||
| break; | ||
| } | ||
| } | ||
| }; | ||
|
|
||
| size_t block_idx = 0; | ||
| for (auto [block_0, block_1] : zip_view(blocks[0].get(), blocks[1].get())) { | ||
| ASSERT(block_0.selectors.size() == 13); | ||
| ASSERT(block_1.selectors.size() == 13); | ||
| size_t selector_idx = 0; | ||
| for (auto [p_10, p_11] : zip_view(block_0.selectors, block_1.selectors)) { | ||
| check_eq(p_10, p_11, block_idx, selector_idx); | ||
| selector_idx++; | ||
| } | ||
| block_idx++; | ||
| } | ||
|
|
||
| typename OuterFlavor::CommitmentLabels labels; | ||
| for (auto [vk_0, vk_1, label] : | ||
| zip_view(verification_keys[0]->get_all(), verification_keys[1]->get_all(), labels.get_precomputed())) { | ||
| if (vk_0 != vk_1) { | ||
| broke = true; | ||
| info("Mismatch verification key label: ", label, " left: ", vk_0, " right: ", vk_1); | ||
| } | ||
| } | ||
|
|
||
| ASSERT(verification_keys[0]->circuit_size == verification_keys[1]->circuit_size); | ||
| ASSERT(verification_keys[0]->num_public_inputs == verification_keys[1]->num_public_inputs); | ||
iakovenkos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ASSERT(verification_keys[0]->pub_inputs_offset == verification_keys[1]->pub_inputs_offset); | ||
|
|
||
| ASSERT(!broke); | ||
| } | ||
|
|
||
| } // namespace bb | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.