-
Notifications
You must be signed in to change notification settings - Fork 145
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
Wiki: Uniform Spartan + R1CS Info #432
base: main
Are you sure you want to change the base?
Conversation
Notice that the matrix follows a sparse-diagonal pattern. We can use this to define $A_{small}$. | ||
|
||
![Small A](../imgs/small_A_r1cs.png) |
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.
imo it's more intuitive to introduce A_small first, as it clearly captures the uniform constraints Q = R and R = S
## Uniform Spartan | ||
Jolt's Spartan instance is highly patterned. We run the same R1CS for each cycle of the RISC-V program. We can leverage this property to increase prover and verifier efficiency. | ||
|
||
Think of a simple constraint system with the following inputs: $Q, R, S$. Each of these inputs is repeated $nc = num\_cycles$ times. |
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.
num_cycles formatting is messed up
|
||
Note that Z is also padded to a power of two, so the full Z vector is $[Q_0, Q_1, Q_2, 0, R_0, R_1, R_2, 0, S_0, S_1, S_2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]$ | ||
|
||
$v_0$ indexes constant vs non-constant columns. |
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.
Move this into the bullet point - $v_0, v_1, v_2$ index the variable
> [!NOTE] | ||
> Syntax: For bitvector $x=x_0, x_1, ... x_n$, $x_0$ represents the most-significant bit, and $x_n$ represents the least significant bit. By default sumchecks will bind from the "top", where they bind the MSB first. For some sumchecks, notably sparse ones we'll bind from the "bottom" for algorithmic efficiency reasons. |
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.
I'm hoping to switch all sumchecks to bind from the bottom so this note may soon become out-of-date
$v_0$ indexes constant vs non-constant columns. | ||
|
||
The $A, B, C$ matrices follow a similar pattern where the constraints are repeated $nc$ times and the variables are repeated $nc$ times. For example, given a 2 constraint system over the variables $Q, R, S$. | ||
![Big A](../imgs/big_A_r1cs.png) |
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.
maybe add a legend for what the different colors mean. assuming yellow = padding, then the four columns before C should also be yellow, right?
Fills in missing details on our instantiation of Spartan.
Left the Cross-Eq constraints and Verifier MLE evals empty for now as we work on #347.