How state proof/range-check proof works in Ceno zkVM
lookup argument: Logup
The LogUp formula in summary like this
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Where
- LHS is the witness vector
W
to be lookup and , for
- RHS is the target table with , for
- range check scenario
- is the couting for the respective lookup record, for
This is called Indexed Lookup
A random challenge alpha
derived for X
, and prover witness
There is a nice property, for the and can be concat as a super vector/table. The tricks is by make and as a rlc result, by deriving another challenge beta
, with define constant as table derivative.
For example, we can concat u5 and u16 table as this way
And the similar RLC tricks applid so we make literally treat there is a huge table T for Indexed Lookup
GKR sumcheck for fraction sum proof
refer: https://eprint.iacr.org/2023/1284.pdf
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
it can be view as
- we can select any pair of them in any order, e.g. 2 consecutive, or divide into 2 equal sub slice and point-wise sum
- from math we know to sum 2 frac
So we can design GKR circuit to layer by layer reduce half size from k+1 -> k
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
and finally in output layer we just check
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
for and the
GKR logup and codebase
Recap
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Both left hand side & right hand side are exposing pattern for fraction sum.
For example, in LHS, is constant vector 1, and is witness vector to be lookup.
In practice, we concat all expression to be lookup into a huge vector
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
notes that concated vector size will be > column vector. This can't be achieved in traditional plonkish without GKR. GKR + sumcheck will assure source + flatten vector are well form.
The concated vector is the LHS , and is constant vector 1. Then we can use GKR+Logup to reduce huge concated vector half each time and check final result in output layer
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
The RHS table part and . This part is agnostic for any opcode, so we can have a separate GKR + sumcheck to prove it. At the end, we just collect output layer from RHS and LHS and check they are equal, with both demoninato > 0.
Logup application in zkVM
- range check
- bitwise operation, e.g. z = xor8(x, y), where x, y are 8 bit
Padding to Power of 2
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
There are 2 option for padding
- set 0 on LHS numerator
- or set = 0 in LHS denominator, and on RHS prover witness for counting on = 0
We choose option 2 for constant vector p(x) is friendly to deal with in verifier.
Another variant: set equality check
Logup is optimal when
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
when j >> i.
In zkVM, we have another kind of set equality: memory offline check protocol, such that giving R, W, at the end we check ?= . Giving a global state in/out case, we will append record [pc, ts] to and [pc_next, ts_next] to set. You can imagine at the end == .
We can use logup to prove == , via treat and in LHS/RHS demominator of Logup, and make also be constant vector 1. However we can have another choice by prove it via product arguments
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
challenge can be alpha, and can be rlc from beta, similar tricks as logup
Product argument is good in this case due to
- LHS set and RHS set are equal, so we benefit less from Logup
- For Logup, in GKR when do fraction sum we need 3 multiplication , , and 1 sum vs 1 multiplication in product check.