-
Notifications
You must be signed in to change notification settings - Fork 4
Feat: store codeword with max height before FRI fold #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
hero78119
reviewed
Jan 21, 2026
hero78119
reviewed
Jan 21, 2026
hero78119
reviewed
Jan 21, 2026
hero78119
reviewed
Jan 21, 2026
hero78119
approved these changes
Jan 21, 2026
Collaborator
hero78119
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work and clean up bunch of complex condition with less code 👍👍👍 💯 💯 💯
github-merge-queue bot
pushed a commit
to scroll-tech/ceno
that referenced
this pull request
Jan 22, 2026
## Summary This is a reflection of optimization scroll-tech/gkr-backend#24 in gkr-backend to the recursion crate. The key idea is to reduce the number of `mmcs_verify_batch` invocated for the integrity of input opened values. - The number of rows in the `FriReducedOpeningAir` is reduced by half. - The number of rows in the `NativePoseidon2Air` for `VERIFY_BATCH` is reduced by half. ### Performance The number of cells in the recursion prover before and after this PR is depicted here. The cmd to run the test is ``` RUST_BACKTRACE=1 RUST_LOG=info,openvm_cuda_common=warn \ cargo run --release --features "gpu,bench-metrics" --package ceno_recursion --bin e2e_aggregate \ -- --platform=ceno --max-cycle-per-shard=1600 \ examples/target/riscv32im-ceno-zkvm-elf/release/examples/keccak_syscall 2>&1 | tee keccak.log ``` | chip | before | after | | - | - | - | | total_trace_cells | 703_991_274 | 613_158_378 | | NativePoseidon2 | 123_469_824 | 61_734_912 | | FriReducedOpening | 58_195_968 | 29_097_984 |
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.
Summary
Issue
The protocol previously implemented works like this.
f(g^i) = dot_product(m.row[i], rand_coeffs).ith row andi+n/2th row are packed (stored) in one row (or in one leaf in the merkle tree commitment scheme).m.row[i]andm.row[i+n/2], mixed them with random challenges, getf(g^i) = dot_product(m.row[i], rand_coeffs)andf(-g^i) = dot_product(m.row[i+n/2], rand_coeffs). Then the verifier will fold them into a new evaluation.When the matrix to be opened is super wide (like 1000 columns), then the above implementation will be very costly especially in the recursion verifier.
Solution
We add a new ext mmcs
extto storef(g^i)in addition to the original base/input mmcs to storem.rows().The verifier proceeds like this.
m.row(i).f(g^i).extto getf(-g^i)(aka. sibling value).f(g^i)andf(-g^i).