feat(prover-ray): support dynamic module sizes in global compiler#3097
Conversation
coordinator Changelog Preview (informational)[Unreleased] diff (commits touching
|
postman Changelog Preview (informational)[Unreleased] diff (commits touching
|
tx-exclusion-api Changelog Preview (informational)[Unreleased] diff (commits touching
|
linea-besu Changelog Preview (informational)[Unreleased] diff (commits touching
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 93d6239. Configure here.
| if len(v.CancelledPositions)-factor+1 > 0 { | ||
| return utils.NextPowerOfTwo(max(1, factor)) | ||
| } | ||
| return utils.NextPowerOfTwo(max(1, factor-1)) |
There was a problem hiding this comment.
computeRatio may undersize quotient for small dynamic modules
Low Severity
computeRatio approximates the required ratio without knowing the module size n, assuming n >> c (cancelled positions). For dynamic modules, the ratio is fixed at compile time but n is only known at runtime. If the runtime size is small relative to len(v.CancelledPositions) (specifically when c - factor + 1 >= n), the compiled ratio is too small and the quotient polynomial silently won't fit in the allocated shares, causing the verifier to reject a valid proof. No runtime validation catches this case — the static-module guard (!a.m.IsDynamic() && n != a.m.Size()) doesn't apply to dynamic modules.
Reviewed by Cursor Bugbot for commit 93d6239. Configure here.
| // | ||
| // ratio * n > quotientDeg | ||
| // ratio > (degreeFactor - 1) + (c - degreeFactor +1) / n | ||
| func computeRatio(v *wiop.Vanishing) int { |
There was a problem hiding this comment.
Running the lower bound I get ratio <= 2 * degreeBound + len(cancel) - 2 corresponding to n=1.
If degreeBound = 4 and len(cancel) = 2, then we get ratio=8. But we would like to bound the ratio to 4 so that we can have columns of size 2**22 without breaking the 2 adicity of koalabear.
Perhaps, we need a system of upper-bound in the module where modules with a larger exprDegree may not have too many rows.


This PR implements issue(s) #2922
Closes #2922
Note
Cursor Bugbot is generating a summary for commit 7ed2a5b. Configure here.