Repository navigation
Commit the Miller value only when the degree needs it: −15% transaction weight - #2
Merged
Merged
Conversation
After the polynomial identity the weight is set by bytes, and most of the witness was the 88 committed Miller values. A step without a commitment drops its main relation: f' is the product itself, and the next committed relation checks both steps. schedule(cap) skips a commitment whenever S stays within the degree cap; 211 gives the fewest words: 35 Miller values and a quotient of 200 words, against 88 and 50. Q(z) is evaluated eight coefficients at a time by one shared function, so the larger quotient adds no unrolled code. Regtest spend: 107.4 kWU -> 90.8 kWU; cost 81.7 M -> 68.5 M mWU. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 14, 2026
mjthatch
force-pushed
the
research/poly-identity
branch
from
October 15, 2026 11:27
7238b04 to
eb91114
Compare
mjthatch
force-pushed
the
research/sparse-commit
branch
from
October 15, 2026 11:27
b94abe5 to
eede6aa
Compare
This was referenced Oct 20, 2026
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.
Stacked on #1 (one polynomial identity).
Summary
After #1 the transaction weight comes from bytes, not cost: the program's bytes earn more budget than it spends. The biggest part of the witness was the 88 committed Miller values (12 words each, 34 kB). This PR commits only 35 of them.
How it works
When step i doesn't commit f', the relation f² ℓ_B ℓ_γ ℓ_δ − f' is dropped. f' then becomes the product itself, a polynomial of higher degree, and the next committed relation checks the steps since the last commitment at once. The program doesn't need f' at all: it carries the number e' = f'(z) = e² ℓ_B(z) ℓ_γ(z) ℓ_δ(z) to the next step. The slope and inverse relations of every step stay as before.
Each skipped commitment saves 12 witness words but raises the degree of the identity, and Q grows by one word per degree.
schedule(cap)walks the steps left to right and skips a commitment whenever the degree of S stays within the cap. Of all caps, 211 gives the fewest words: 35 commitments and a 200-word Q, against 88 and 50 before. That's 20.6 kB of committed words instead of 35.4 kB. Soundness is unchanged in kind; the bound goes from 61/p to 211/p per hash query, still about 2⁻²⁴⁵.Steps without a commitment use their own functions (
STEP_D_,STEP_F_): no 12-term dot product, no 2-bit checks, no hashing of f'. A doubling without a commitment costs 0.39 M mWU, with one 0.61 M.A 200-word Q would have added 7 kB of unrolled code. Instead Q(z) is evaluated by one shared function,
QCHUNK: qz' = qz·z⁸ + (8 coefficients at z), 25 calls on 8-word halves of Q's hashing blocks. Its code is in the program once, and the pruned program ends up 1 kB smaller than before.Changes
groth/pairing.py:COMMIT = schedule(DEG_CAP);relations(..., commit);QCHUNK;tests/test_pairing.py: the tampered Miller value is now taken at a committed step.examples/multiplier/regenerated from a new regtest spend.Testing
hand's.tools/regtest.sh:beba377d…: 90,804 WU;Assertion failed inside jet);511a3da3…(the example files);5b6b46f1….Where the bytes go now
Cost is 68.5 M against a 90.2 M budget, so there's room to trade cost for bytes next.
🤖 Generated with Claude Code