feat: merge-train/barretenberg#23011
Merged
Merged
Conversation
Two improvements: 1. `add_scaled_batch` was iterating over all polys to be batched and processing indices based on the range of the destination poly (the biggest of the polys to be batched). This PR adds a skipping condition that speeds up the function: we only iterate over the poly to be batched 2. Write a bespoke `add_batch_scaled` for use in the AVM with dynamic allocation of threads: each thread picks up the new available poly and works with it. This makes optimal usage of the fact that many polys in the AVM are small. Link to AVM bulk test: http://ci.aztec-labs.com/1df80aa9b6ae0088. The PCS component is `446ms` down from ~`600ms`
…2937) ## Summary Nightly debug build was failing again because `OinkProver::commit_to_masking_poly` allocates `gemini_masking_poly` with size `max_end_index()`. When that value is odd, sumcheck's pairwise iteration over `(edge_idx, edge_idx + 1)` reads one element past the polynomial — `compute_effective_round_size` itself rounds the iteration bound up to even, but the masking polynomial wasn't padded to match. In release builds this is silent UB; in debug, the bounds-checked accessor inside `Polynomial::operator[]` trips and the build fails very early (~2 minutes wall-clock, consistent with the failing job duration). Fix: round the masking polynomial's allocation up to even at construction so the layout matches what sumcheck assumes. The change only ever enlarges the polynomial by at most one element and never affects non-ZK flavors (gated by `flavor_has_gemini_masking<Flavor>()`). ## Recurrence This is the **fifth** independent claudebox session converging on this exact patch over the past four days; the prior four (`claudebox/fix-bb-debug-nightly` 2026-05-01, `claudebox/fix-nightly-bb-debug-build` 2026-05-03, PR #22918 2026-05-04, plus an earlier branch) were not merged, so the bug recurred each night. The diff here is byte-for-byte identical to the closed PR #22918. Most recent visible failed run: https://github.com/AztecProtocol/aztec-packages/actions/runs/25303760883 ## Verification - `cmake --preset debug` configures cleanly. - `ninja ultra_honk_tests` builds cleanly in the `debug` preset. - `./bin/ultra_honk_tests --gtest_filter='*Gemini*:*ZK*:*Mask*'` — **28 passed, 6 skipped** (the 6 skips are flavor-gated, not regressions). Detailed analysis: https://gist.github.com/AztecBot/97de8e254a5df2dad90f895be7d28f08 ClaudeBox log: https://claudebox.work/s/bd19299558fa14bc?run=1 ClaudeBox log: https://claudebox.work/s/bd19299558fa14bc?run=1 --------- Co-authored-by: sergei iakovenko <105737703+iakovenkos@users.noreply.github.com> Co-authored-by: iakovenkos <sergey.s.yakovenko@gmail.com>
Collaborator
Author
|
🤖 Auto-merge enabled after 4 hours of inactivity. This PR will be merged automatically once all checks pass. |
…th changes (#23014) Adds a "Prover.toml Fixtures" subsection to `barretenberg/cpp/CLAUDE.md` documenting the `AZTEC_GENERATE_TEST_DATA=1 FAKE_PROOFS=1 yarn workspace @aztec/end-to-end test full.test` regen step that proof-length changes (e.g. `CHONK_PROOF_LENGTH` bumps) require. Without it, `nargo execute` fails type-checking on every protocol circuit using `ChonkProofData`.
Thunkar
pushed a commit
that referenced
this pull request
May 7, 2026
Same single conflict as PR #22991, recurring because new commits landed on `next` (e.g. #23011, p2p versioning, AVM tx changes) before fairies merged forward. Conflict in `yarn-project/pxe/src/pxe.ts` around the PXE store-construction block — `merge-train/fairies` uses the `openPxeStores(store, initialBlockHash)` factory; `next` still has the inline `new AddressStore / ... / new L2TipsKVStore(store, 'pxe', initialBlockHash)` pattern. Resolution keeps the factory; `initialBlockHash` is already threaded through it. No other files needed in this round — the previous round's `schema_tests.ts` follow-up is already on the branch. All five `new L2TipsKVStore(...)` callers in yarn-project pass the three required args. Details: https://gist.github.com/AztecBot/cee6d74ae6e439f71f16de4ef05e5a12 CI will validate the merge. ClaudeBox log: https://claudebox.work/s/8a13135d95b87e96?run=3 --------- Co-authored-by: Santiago Palladino <santiago@aztecprotocol.com> Co-authored-by: spypsy <spypsy@outlook.com> Co-authored-by: AztecBot <tech@aztecprotocol.com> Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com> Co-authored-by: ledwards2225 <98505400+ledwards2225@users.noreply.github.com> Co-authored-by: rkarabut <ratmir@aztecprotocol.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Ratmir Karabut <rkarabut@users.noreply.github.com> Co-authored-by: federicobarbacovi <171914500+federicobarbacovi@users.noreply.github.com> Co-authored-by: ledwards2225 <l.edwards.d@gmail.com> Co-authored-by: Jean M <132435771+jeanmon@users.noreply.github.com> Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com> Co-authored-by: Rumata888 <isennovskiy@gmail.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: sergei iakovenko <105737703+iakovenkos@users.noreply.github.com> Co-authored-by: iakovenkos <sergey.s.yakovenko@gmail.com>
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.
BEGIN_COMMIT_OVERRIDE
feat: Improve add_scaled_batch (#22981)
fix(bb): allocate gemini masking poly with virtual size == dyadic (#22937)
docs(barretenberg): document Prover.toml fixture regen for proof-length changes (#23014)
END_COMMIT_OVERRIDE