Repository navigation
Conversation
Collaborator
File
|
vbuterin
reviewed
Oct 7, 2026
| The aggregation circuit MUST satisfy all of the following, for any number of dependencies proven: | ||
|
|
||
| 1. The serialized size of a recursive STARK MUST be bounded by a constant. | ||
| 2. The cost of verifying a recursive STARK MUST be independent of the number of claims it proves. |
Contributor
There was a problem hiding this comment.
I would say "bounded by a constant" for (2) just like (1)
it's okay if proofs of smaller/fewer claims are cheaper across all dimensions as long as there is a bound.
Though another idea is that instead we assert as an assumption the maximum size of a statement, and prove that it will be hold based on other assumptions, eg. number of peers and anti-DoS limits. You only get one recursive proof per mempool peer, plus you can throttle to <= k txs per connected user.
The gas paragraph stays directly after the list it continues; the circuit-requirements section moves after the atomic-batch section that master added in the same place.
…t of claims Requirement 1 already asked for a bound. Requirements 2 and 3 asked for cost independent of the number of claims, which also forbids a proof of fewer claims being cheaper. A bound is what the rest of the specification relies on, so all three now ask for one, and the two sentences that leaned on independence say bounded instead.
The receipt PR merged its rationale in the same place as the circuit-requirements section; both sections are kept, receipt first.
manusw7
reviewed
Oct 20, 2026
There was a problem hiding this comment.
Nice to have these as requirements instead of observations, and the "bounded by a constant" wording addresses Vitalik's comment. Two things:
- Requirement 3 conflicts with the circuit as specified. Absorbing a nested proof takes
inner_depsas private input, hashes it (get_deps_hash(inner_deps)), merges, dedups and re-hashes the union, so absorption cost grows with how many deps the child covers. A constant bound only holds if the statement size is bounded, which is basically Vitalik's alternative. Maybe phrase all three as "bounded by a constant for any statement within the protocol limits" and point at the cap. - New Gas Accounting sentence vs
recursive_stark_gas. It saysLEANSTARK_VERIFICATION_GASdoesn't price a recursive round, but a few lines downrecursive_stark_gas(tx)uses that same constant to price the tx's share of the block's recursive STARK. Maybe scope the sentence toverification_gasonly.
This branch has not been deployed
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.
The specification depends on three properties of the aggregation circuit. It states two of them as observations about one implementation, and does not state the third at all, though the mempool loop depends on it entirely.
The two currently asserted:
The third, bounded absorption cost, is what makes "a mempool node broadcasts exactly one wrapper containing all currently active transactions" achievable. Only if absorbing the previous round's aggregate has a bounded cost whatever it covers does a node's per-round cost stay bounded as its pool grows.
As requirements rather than observations they give a bound on
stark_proofsomething to rest on, makeAGGREGATION_INTERVALsatisfiable by construction rather than by measurement, and mean a circuit that breaks the economics fails a stated requirement instead of silently invalidating Rationale and Censorship Resistance. Each requirement is a bound by a constant, so a proof of fewer claims may still be cheaper.The Gas Accounting sentence follows from the third property.
verification_gasis charged per dependency, which prices establishing one for the first time. It does not price a recursive round, because the cost of absorbing a nested proof is bounded whatever it covers. The reasoning for both is in Rationale, under a new entry and under the existing Gas costs.We implemented this EIP against a working leanVM backend and measured all three properties. Proof size moved from 225 KB to 305 KB across a 128-fold increase in dependencies; verification stayed between 3 and 10 ms over that range; absorbing children covering 8, 16 and 32 dependencies took 295, 273 and 237 ms. Those figures belong to one revision on one machine and will change, which is the reason to propose the properties rather than the numbers. None of the three is flat, and all stay bounded, which is what the requirements now ask.