Skip to content

Commit e80b17a

Browse files
committed
WIP Sumcheck section
1 parent 962adbd commit e80b17a

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

docs/spartan_parallel.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ We note that the above steps imply the following additional procedures:
4949
5. Every $(i_{i, j}, o_{i, j}, p_{i, j}, v_{i, j})$ is correctly extracted from $z_{i, j}$
5050
6. The sets of $\{i_{i, j}, o_{i, j}\}$, $\{p_{i, j}\}$, $\{v_{i, j}\}$ are permutations of $\{i'_k, o'_k\}$, $\{p'_k\}$, and $\{v'_k\}$
5151

52-
Permutations are checked via univariate polynomial evaluations. Thus step 6 can be further divided into
52+
Permutations are checked via grand product proofs. Thus step 6 can be further divided into
5353

5454
* (6a) $RLC_{i, o} = \prod_{i, j} (\tau - f(i_{i, j}) - r\cdot f(o_{i, j}))$, where $\tau$ and $r$ are random numbers and $f$ is a random linear combination (see consistency below). Compute $RLC_p$, $RLC_v$ as well.
5555
* (6b) $RLC'_{i, o} = \prod_k (\tau - f(i'_k) - r\cdot f(o'_k))$. Compute $RLC'_p$, $RLC'_v$ as well.
@@ -155,4 +155,23 @@ _XXX: we should be able to reduce the length to `total_num_phy_mem_accesses * 4`
155155
All witnesses are committed using regular dense polynomial commitment schemes. `block_vars_matrix`, `block_w2`, `block_w3`, and `block_w3_shifted` are committed by each type of block. We note that we can use tricks similar to circuit commitment above to batch commit and batch open witness commitments.
156156

157157
## Sumcheck on Circuits and Instances
158-
Relevant files: `src/r1csproof.rs` and `src/sumcheck.rs`
158+
Relevant files: `src/customdensepolynomial.rs`, `src/r1csproof.rs` and `src/sumcheck.rs`
159+
160+
The main section of `spartan_parallel` is consisted of three proofs, each with its own sumcheck and commitment opening. Each proof handles:
161+
1. Block correctness and grand product on block-ordered witnesses
162+
2. Transition state consistency and stack and heap coherence
163+
3. Grand product on execution-ordered and memory-ordered witnesses
164+
165+
_XXX: The proofs were divided due to the different sizes of the circuits. However, this problem has since been resolved and one should be able to combine all the proofs together._
166+
167+
Without loss of generosity, we use the block correctness proof (proof 1) to illustrate details of an R1CS proof. Recall that the goal of block correctness proof is to test the satisfiability of each $z'_{i, j}$ on each modified block circuit $\mathcal{C'}_i = (A', B', C')_i$, where
168+
$$z'_{i, j} = (z_{i, j}, r, rz_{i, j}, \pi_{i, j}, \pi'_{i, j})$$
169+
We denote the following parameters for the proof:
170+
* $P$ (`num_instances`): number of circuits.
171+
* $Q_i$ (`num_proofs`): number of assignments to each circuit $i$.
172+
* $X$ (`num_cons`): _maximum_ number of constraints of any circuit
173+
* $W$ (`num_witness_secs`): number of padded segments of $z'_{i, j}$. In this case, $W = 8$.
174+
* $Y$ (`max_num_inputs`): _maximum_ number of witnesses of any circuit
175+
176+
We use the lowercase version of each variable to denote their logarithmic value (e.g. $p = \log P$). Below we walkthrough the proving process of `spartan_parallel`.
177+

0 commit comments

Comments
 (0)