-
Notifications
You must be signed in to change notification settings - Fork 607
feat: Add the last merged table to the public inputs of the hiding circuit #15829
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
federicobarbacovi
merged 79 commits into
merge-train/barretenberg
from
fb/add_merge_table_to_hiding_circuit_pub_inputs
Jul 25, 2025
Merged
Changes from all commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
f1176b4
[empty] Start merge-train. Choo choo.
8c7e6c0
chore!: Remove circuit_size from all VKs (#15747)
ledwards2225 0b82e77
chore: Introduce data structures to hold inputs/outputs of the Merge …
federicobarbacovi 0aa2254
Merge branch 'next' into merge-train/barretenberg
49c15da
Merge branch 'next' into merge-train/barretenberg
a1a4706
Merge branch 'next' into merge-train/barretenberg
35a201e
chore: replace asserts with runtime errors. (#15671)
johnathan79717 ae67a84
chore: kernels start with eq and reset (#15734)
702f858
Introduce hiding kernel io class
federicobarbacovi 5658bbd
Update hiding kernel io to contain array of commitments
federicobarbacovi e4452b9
Merge branch 'next' into merge-train/barretenberg
80741b1
Update civc
federicobarbacovi d179fa2
Update ClientIVC recursive verifier
federicobarbacovi fdc378e
Merge branch 'next' into merge-train/barretenberg
1609816
Fix test
federicobarbacovi 86afd02
Merge branch 'next' into merge-train/barretenberg
c52ae0a
Squashed commit of the following:
federicobarbacovi 7c22a9d
Remove flavor
federicobarbacovi db5f547
Fix
federicobarbacovi 2636a3f
Delete bb-civc-inputs-tar.gz
federicobarbacovi 09ae049
Merge branch 'next' into merge-train/barretenberg
774dc8a
Merge branch 'next' into merge-train/barretenberg
21af6a7
Merge branch 'next' into merge-train/barretenberg
13fef33
Merge branch 'next' into merge-train/barretenberg
617644a
Merge branch 'next' into merge-train/barretenberg
db567de
Merge branch 'next' into merge-train/barretenberg
d5e9cb3
Merge branch 'next' into merge-train/barretenberg
f81e852
chore: Introduce Native IO mechanism (#15820)
federicobarbacovi daa57ec
Merge remote-tracking branch 'origin/merge-train/barretenberg' into f…
federicobarbacovi 8d5e09e
Move native logic out of stdlib; update tests
federicobarbacovi cef268a
Update tests
federicobarbacovi 15ec74b
Fixes
federicobarbacovi 0fefd81
[empty] Start merge-train. Choo choo.
c10e9e6
chore: flag to update inputs when precomputed vk fails (#15828)
johnathan79717 23f1a5a
Merge remote-tracking branch 'origin/merge-train/barretenberg' into f…
federicobarbacovi a5810f1
Remove inputs
federicobarbacovi c7eb98a
[empty] Start merge-train. Choo choo.
3f8486d
Merge branch 'next' into merge-train/barretenberg
bafd2f8
Merge branch 'next' into merge-train/barretenberg
29ff9a3
chore: remove public_inputs from DeciderVK (#15832)
ledwards2225 26d2526
Added todo
federicobarbacovi 8065a42
Merge remote-tracking branch 'origin/merge-train/barretenberg' into f…
federicobarbacovi 361403d
[empty] Start merge-train. Choo choo.
0decae4
Merge branch 'next' into merge-train/barretenberg
87450c5
chore: Update `UltraVerifier` api to return public inputs in the case…
federicobarbacovi 92df8f7
Merge remote-tracking branch 'origin/merge-train/barretenberg' into f…
federicobarbacovi cf399eb
Restructure HidingKernelIO
federicobarbacovi 141facb
Update ultra verifier
federicobarbacovi 623d153
Update CIVC
federicobarbacovi ac37ac5
More CIVC
federicobarbacovi 3c94326
Fix databus tests
federicobarbacovi b353691
Fix mega tests
federicobarbacovi 12d740f
Fix protogalaxy tests
federicobarbacovi 18e84ef
Fix ultra rec verifier tests except MegaZKFlavor
federicobarbacovi 4d0e601
Clean up
federicobarbacovi 7a7d9e1
Fix last test
federicobarbacovi 1e34b72
Fix honk rec constraint tests
federicobarbacovi 2411b49
Fix Goblin AVM
federicobarbacovi 64e8955
[empty] Start merge-train. Choo choo.
4ce79d3
Merge branch 'next' into merge-train/barretenberg
123e66d
Fix Mega transcript tests
federicobarbacovi ea3f7f0
Merge branch 'next' into merge-train/barretenberg
1560a7d
Merge branch 'next' into merge-train/barretenberg
eaf251e
Merge branch 'next' into merge-train/barretenberg
55a5f0c
Fix honk rec constraints
federicobarbacovi a1e5c1f
Merge remote-tracking branch 'origin/merge-train/barretenberg' into f…
federicobarbacovi b3325d5
Squashed commit of the following:
federicobarbacovi 4dd7d0b
Update CIVC
federicobarbacovi fb57179
Introduce default method for ecc op tables
federicobarbacovi 89f47e5
Reset Cargo lock
federicobarbacovi 099da55
Fixes
federicobarbacovi 31a4b19
Use IO mechanism for clearer handling of public inputs propagation
federicobarbacovi 6d8f16a
Fix
federicobarbacovi c5401db
Merge remote-tracking branch 'origin/merge-train/barretenberg' into f…
federicobarbacovi 08e57a4
Minore chores
federicobarbacovi 6379c53
Fix
federicobarbacovi 8445537
Fix
federicobarbacovi 987cb42
Reset circuits
federicobarbacovi 5ff53f3
Default value of ecc ops reflect those obtained by finalizing an empt…
federicobarbacovi 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
Binary file not shown.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,50 @@ class DefaultIO { | |
| } | ||
| }; | ||
|
|
||
| /** | ||
| * @brief Manages the data that is propagated on the public inputs of of a hiding kernel circuit | ||
| */ | ||
| class HidingKernelIO { | ||
| public: | ||
| using FF = curve::BN254::ScalarField; | ||
| using G1 = curve::BN254::AffineElement; | ||
|
|
||
| // Number of columns that jointly constitute the op_queue, should be the same as the number of wires in the | ||
| // MegaCircuitBuilder | ||
| static constexpr size_t NUM_WIRES = 4; | ||
|
|
||
| // Number of bb::fr field elements used to represent a goblin element in the public inputs | ||
| // The element is of goblin type because the HidingKernel is always employed with a MegaBuilder | ||
| static constexpr size_t G1_PUBLIC_INPUTS_SIZE = FQ_PUBLIC_INPUT_SIZE * 2; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't this be defined in the relevant
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We discussed on a call - may make sense to do this at a later date |
||
| static constexpr size_t PUBLIC_INPUTS_SIZE = NUM_WIRES * G1_PUBLIC_INPUTS_SIZE + PAIRING_POINTS_SIZE; | ||
|
|
||
| PairingPoints pairing_inputs; | ||
| std::array<G1, NUM_WIRES> ecc_op_tables; | ||
|
|
||
| /** | ||
| * @brief Reconstructs the IO components from a public inputs array. | ||
| * | ||
| * @param public_inputs Public inputs array containing the serialized kernel public inputs. | ||
| */ | ||
| void reconstruct_from_public(const std::vector<FF>& public_inputs) | ||
| { | ||
| // Assumes that the hiding-kernel-io public inputs are at the end of the public_inputs vector | ||
| uint32_t index = static_cast<uint32_t>(public_inputs.size() - PUBLIC_INPUTS_SIZE); | ||
|
|
||
| const std::span<const FF, PAIRING_POINTS_SIZE> pairing_inputs_limbs(public_inputs.data() + index, | ||
| PAIRING_POINTS_SIZE); | ||
| index += PAIRING_POINTS_SIZE; | ||
| pairing_inputs = PairingPoints::reconstruct_from_public(pairing_inputs_limbs); | ||
|
|
||
| for (auto& commitment : ecc_op_tables) { | ||
| const std::span<const FF, G1_PUBLIC_INPUTS_SIZE> ecc_op_table_limbs(public_inputs.data() + index, | ||
| G1_PUBLIC_INPUTS_SIZE); | ||
| commitment = G1::reconstruct_from_public(ecc_op_table_limbs); | ||
| index += G1_PUBLIC_INPUTS_SIZE; | ||
| } | ||
| } | ||
| }; | ||
|
|
||
| /** | ||
| * @brief The data that is propagated on the public inputs of a rollup circuit | ||
| */ | ||
|
|
||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added because this function is used only when
IsUltraHonkis true. It avoids confusion now that the public inputs forMegaFlavorare different