Skip to content

feat: Optimise new claim calculation#21179

Merged
federicobarbacovi merged 1 commit into
merge-train/barretenbergfrom
fb/optimise_new_claim_calculation
Mar 5, 2026
Merged

feat: Optimise new claim calculation#21179
federicobarbacovi merged 1 commit into
merge-train/barretenbergfrom
fb/optimise_new_claim_calculation

Conversation

@federicobarbacovi

Copy link
Copy Markdown
Contributor

Optimise new claim calculation by avoiding allocating new zero polynomials. Closes AztecProtocol/barretenberg#1604

@federicobarbacovi federicobarbacovi marked this pull request as ready for review March 5, 2026 17:05
@federicobarbacovi federicobarbacovi self-assigned this Mar 5, 2026

@ledwards2225 ledwards2225 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@federicobarbacovi federicobarbacovi enabled auto-merge (squash) March 5, 2026 17:22
@federicobarbacovi federicobarbacovi merged commit e4b3557 into merge-train/barretenberg Mar 5, 2026
9 checks passed
@federicobarbacovi federicobarbacovi deleted the fb/optimise_new_claim_calculation branch March 5, 2026 17:26
johnathan79717 added a commit that referenced this pull request Mar 6, 2026
After PR #21179 optimized `compute_new_claim()` to move polynomials
instead of copying, the `virtual_size()` of accumulator polynomials
no longer reliably reflects the accumulator's dyadic size. Use the
explicit `dyadic_size` field which is always set correctly.

This fixes WASM chonk integration tests that failed because
`virtual_size()` returned 2^21 (CONST_FOLDING_LOG_N) causing
CommitmentKey to request more CRS points than available.
ludamad pushed a commit that referenced this pull request Mar 6, 2026
…er (#21206)

## Summary
- After #21179 optimized `compute_new_claim()` to move polynomials
instead of copying, `virtual_size()` on accumulator polynomials no
longer reliably equals the accumulator's dyadic size.
- `HypernovaDeciderProver::construct_proof` used `virtual_size()` to
create a `CommitmentKey`, which could request 2^21 CRS points —
exceeding the WASM default of 2^20.
- Fix: use `end_index()` to compute the tightest CRS size for the
`CommitmentKey`, while passing `dyadic_size` to `PolynomialBatcher` and
`ShpleminiProver` which need the multilinear domain size.

## Test plan
- [x] `hypernova_tests` pass (9/9)
- [x] `chonk_tests` pass (25/25)
- [ ] CI chonk integration tests
github-merge-queue Bot pushed a commit that referenced this pull request Mar 6, 2026
BEGIN_COMMIT_OVERRIDE
fix: add -g0 to zig presets to eliminate 11GB debug info bloat (#21071)
fix: resolve flaky p2p_client test race condition on ARM64 (#21088)
chore: remove domain iteration macros and address backing memory race
(#20988)
fix: [ECCVM] added domain separation for the multiset equality check.
(#20352)
feat: hybrid CRS hash verification — 8MB chunks, parallel, span-based
(#21113)
chore: unify splitting scalars interface (#20805)
chore: add a unique id to each origin tag (#20924)
chore: Native curve audit (#20936)
chore: Update bootstrap in test vk haven't changed script (#21153)
fix: use reduced form in WASM FromMontgomeryForm test (#21164)
chore: erase ephemeral secrets from memory in schnorr and aes (#21106)
chore: suppress clangd target triple version diagnostic (#21180)
feat: Optimise new claim calculation (#21179)
docs: add Quick Start build instructions to barretenberg README (#20951)
feat: batched chonk verification (#21083)
fix: link libc++ instead of libstdc++ for Rust FFI on Linux (#21203)
fix: [ECCVM] in the transcript table, no-ops force the next accumulator
to be 0. (#20849)
fix: resolve merge-train conflict with next (zig wrapper scripts + -g0)
(#21201)
fix: [ECCVM] rare edge case completeness issue when `z1 == 0` but `z2 !=
0` (#20858)
fix: use actual data extent for CommitmentKey in HypernovaDeciderProver
(#21206)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants