-
Notifications
You must be signed in to change notification settings - Fork 29
Implement SPARK Integration for Deferred R1CS Evaluations #224
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
base: main
Are you sure you want to change the base?
Conversation
| - name: Build provekit-cli | ||
| run: cargo build --release --bin provekit-cli | ||
|
|
||
| - name: Build provekit-cli |
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.
| - name: Build provekit-cli | |
| - name: Build spark-cli |
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.
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); |
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.
suggestion: Please send a reference to alpha.
| num_terms_4batched: num_terms_4batched_config.clone(), | ||
| }; | ||
|
|
||
| let mut io = IOPattern::new("💥"); |
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.
todo: this should be a separate function.
| transcriptT[i] = uints.NewU8(cfg.Transcript[i]) | ||
| } | ||
|
|
||
| sparkTranscriptT := make([]uints.U8, len(sparkConfig.Transcript)) |
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.
sparkTranscriptT that T at the end seems like a typo that we had for quite a while, and it got reused here
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: