chore: rm dummy values from mega wires#22453
Merged
iakovenkos merged 75 commits intoApr 28, 2026
Merged
Conversation
…ay from RDP
With top-of-trace masking, the row-disabling polynomial 1 - ∏_{i≥2}(1-u_i)
is circuit-size independent. The verifier evaluates it over ALL D challenges
without needing log_circuit_size or padding_indicator_array.
Prover: ZK virtual rounds now use compute_virtual_contribution * (1-L) + libra
instead of sending zero univariates. Libra univariates cover all D rounds.
Verifier: apply_zk_corrections evaluates RDP from challenge vector size.
compute_padding_indicator_array returns all-1s (unified path).
…i/eccvm-lagrange-last-integer
…i/eccvm-lagrange-last-integer
ledwards2225
approved these changes
Apr 16, 2026
Contributor
ledwards2225
left a comment
There was a problem hiding this comment.
LGTM - is there a reason not to do it for Ultra?
| * @brief Verify that an empty circuit can be finalized and passes circuit checks | ||
| * @details Finalization should add required gates to ensure all polynomials are non-zero | ||
| * @note This is a "completeness" test; unlikely to be a use-case. | ||
| * @details Mega finalization no longer adds dummy non-zero gates — the disabled head region and |
Contributor
There was a problem hiding this comment.
nit - I try to avoid the comments that referenece an historical pattern
| const size_t num_rows = | ||
| std::max({ point_table_rows.size(), msm_rows.size(), transcript_rows.size() }) + TRACE_OFFSET; | ||
| vinfo("Num rows in the ECCVM: ", num_rows); | ||
| info("Num rows in the ECCVM: ", num_rows); |
| // Most polynomials are handled via the conventional Ultra method | ||
| UltraCircuitBuilder_<MegaExecutionTraceBlocks>::add_gates_to_ensure_all_polys_are_non_zero(); | ||
| add_mega_gates_to_ensure_all_polys_are_non_zero(); | ||
| UltraCircuitBuilder_<MegaExecutionTraceBlocks>::finalize_circuit(ENSURE_NONZERO); |
Contributor
There was a problem hiding this comment.
whats the reason for not doing the same for Ultra?
Base automatically changed from
si/eccvm-lagrange-last-integer
to
merge-train/barretenberg
April 21, 2026 09:55
…i/no-dummy-values-in-mega
…i/no-dummy-values-in-mega
The optimized verifier's loadVk substitutes raw verification_key->q_*.x / .y hex into the Yul mstore'd memory. For BN254 affine, an infinity point stores the field modulus in x as a sentinel (not (0,0)), so circuits with unused selectors (assert_statement, vectors, a_1_mul) emit Q_*_X_LOC = q_modulus. ecMul then reverts on an out-of-range x, surfacing as require(false) at verifier.verify(). Route the substitutions through U256Codec::serialize_to_fields, the same codec used by verification_key->hash() and by print_g1 for the non-optimized template. Identity commitments now collapse to the EIP-196 canonical (0, 0) on the optimized side too.
ElusAegis
pushed a commit
to ElusAegis/aztec-packages
that referenced
this pull request
Apr 30, 2026
BEGIN_COMMIT_OVERRIDE chore: poly audit response (AztecProtocol#22782) fix: BN254 G2 msgpack serialization in barretenberg-rs (AztecProtocol#22360) chore: rm dummy values from mega wires (AztecProtocol#22453) END_COMMIT_OVERRIDE
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.
.