Implement SPARK Integration for Deferred R1CS Evaluations#224
Open
batmendbar wants to merge 66 commits intomainfrom
Open
Implement SPARK Integration for Deferred R1CS Evaluations#224batmendbar wants to merge 66 commits intomainfrom
batmendbar wants to merge 66 commits intomainfrom
Conversation
shreyas-londhe
requested changes
Nov 3, 2025
| - name: Build provekit-cli | ||
| run: cargo build --release --bin provekit-cli | ||
|
|
||
| - name: Build provekit-cli |
Collaborator
There was a problem hiding this comment.
Suggested change
| - name: Build provekit-cli | |
| - name: Build spark-cli |
Collaborator
There was a problem hiding this comment.
todo: This file should be deleted.
|
|
||
| // Compute weights from R1CS instance | ||
| let alphas = calculate_external_row_of_r1cs_matrices(alpha, r1cs); | ||
| let alphas = calculate_external_row_of_r1cs_matrices(alpha.clone(), r1cs); |
Collaborator
There was a problem hiding this comment.
suggestion: Please send a reference to alpha.
| num_terms_4batched: num_terms_4batched_config.clone(), | ||
| }; | ||
|
|
||
| let mut io = IOPattern::new("💥"); |
Collaborator
There was a problem hiding this comment.
todo: this should be a separate function.
| transcriptT[i] = uints.NewU8(cfg.Transcript[i]) | ||
| } | ||
|
|
||
| sparkTranscriptT := make([]uints.U8, len(sparkConfig.Transcript)) |
Collaborator
There was a problem hiding this comment.
sparkTranscriptT that T at the end seems like a typo that we had for quite a while, and it got reused here
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.
Summary
This PR implements SPARK, a proof system used to verify deferred evaluations of R1CS (Rank-1 Constraint System) matrix MLEs (Multilinear Extensions).
SPARK extends the prover and verifier stack to support deferred computation flows in WHIR, improving efficiency while maintaining correctness and soundness guarantees.
Key Changes
Motivation
Deferred evaluation of MLEs improves prover efficiency by allowing WHIR to use lazily computed values which are verified later in the proof flow. SPARK provides a mechanism to prove that these deferred evaluations are consistent and correct, ensuring soundness while maintaining performance.
New end-to-end flow: