Skip to content

feat(prover-ray): support dynamic module sizes in global compiler#3097

Merged
AlexandreBelling merged 2 commits into
mainfrom
prover/dynamic-size-globalcs-compiler
May 18, 2026
Merged

feat(prover-ray): support dynamic module sizes in global compiler#3097
AlexandreBelling merged 2 commits into
mainfrom
prover/dynamic-size-globalcs-compiler

Conversation

@Soleimani193
Copy link
Copy Markdown
Contributor

@Soleimani193 Soleimani193 commented May 13, 2026

This PR implements issue(s) #2922

Closes #2922

Note

Cursor Bugbot is generating a summary for commit 7ed2a5b. Configure here.

@Soleimani193 Soleimani193 self-assigned this May 13, 2026
@Soleimani193 Soleimani193 added the Prover-RAY All issues or PR relevant to the establishment of the framework in prover-ray label May 13, 2026
@Soleimani193 Soleimani193 marked this pull request as ready for review May 13, 2026 15:35
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

coordinator Changelog Preview (informational)

[Unreleased] diff (commits touching coordinator/** since latest releases/coordinator/v* tag)

[unreleased]

⚙️ Miscellaneous Tasks

Generated by git-cliff-action using cliff.toml. This comment is informational and does not gate the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

postman Changelog Preview (informational)

[Unreleased] diff (commits touching postman/** since latest releases/postman/v* tag)

[unreleased]

⚙️ Miscellaneous Tasks

Generated by git-cliff-action using cliff.toml. This comment is informational and does not gate the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

tx-exclusion-api Changelog Preview (informational)

[Unreleased] diff (commits touching tx-exclusion-api/** since latest releases/tx-exclusion-api/v* tag)

[unreleased]

⚙️ Miscellaneous Tasks

Generated by git-cliff-action using cliff.toml. This comment is informational and does not gate the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

linea-besu Changelog Preview (informational)

[Unreleased] diff (commits touching linea-besu/** since latest releases/linea-besu/v* tag)

[unreleased]

🐛 Bug Fixes

⚙️ Miscellaneous Tasks

Generated by git-cliff-action using cliff.toml. This comment is informational and does not gate the PR.

Comment thread prover-ray/wiop/compilers/global/global.go
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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))
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.

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.

Fix in Cursor Fix in Web

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 {
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.

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.

@AlexandreBelling AlexandreBelling merged commit ed7509f into main May 18, 2026
54 checks passed
@AlexandreBelling AlexandreBelling deleted the prover/dynamic-size-globalcs-compiler branch May 18, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Prover-RAY All issues or PR relevant to the establishment of the framework in prover-ray

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port the global constraint compiler with dynamic-sized column support

2 participants