The LogUp formula in summary like this
Where
W
to be lookup and \(W(j) = W_j\), for \(j \in [1, l]\)This is called Indexed Lookup
A random challenge alpha
derived for X
, and prover witness \(W(x), M(x)\)
There is a nice property, for the \(W(X)\) and \(T(X)\) can be concat as a super vector/table. The tricks is by make \(W(X)\) and \(T(X)\) 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
T := [
// U5 Table
ROMType::U5 * beta^0 + 0 * beta^1,
ROMType::U5 * beta^0 + 1 * beta^1,
...
ROMType::U5 * beta^0 + (max_u5 - 1) * beta^1,
// U16 table
ROMType::U16 * beta^0 + 0 * beta^1,
ROMType::U16 * beta^0 + 1 * beta^1,
...
ROMType::U16 * beta^0 + (max_u16 - 1) * beta^1,
]
And the similar RLC tricks applid \(W(X)\) so we make literally treat there is a huge table T for Indexed Lookup
refer: https://eprint.iacr.org/2023/1284.pdf
it can be view as
\[ \frac{p(1)}{q(1)} + \frac{p(2)}{q(2)} + ... \frac{p(N)}{q(N)} = 0 \]
So we can design GKR circuit to layer by layer reduce \(p(x), q(x)\) half size from k+1 -> k
and finally in output layer we just check
for \(q_0 > 0\) and \(p_0 = 0\) the
Recap
Both left hand side & right hand side are exposing pattern for fraction sum.
For example, in LHS, \(p(x)\) is constant vector 1, and \(q(x)\) is witness vector to be lookup.
In practice, we concat all expression to be lookup into a huge vector
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 \(q(x)\), and \(p(x)\) 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
The RHS table part \(p(x) = m(x)\) and \(q(x) = T(x)\). 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.
There are 2 option for padding
We choose option 2 for constant vector p(x) is friendly to deal with in verifier.
Logup is optimal when
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 \(R\) ?= \(W\). Giving a global state in/out case, we will append record [pc, ts] to \(R\) and [pc_next, ts_next] to \(W\) set. You can imagine at the end \(|R|\) == \(|W|\).
We can use logup to prove \(R\) == \(W\), via treat \(R\) and \(W\) in LHS/RHS demominator of Logup, and make \(m_i\) also be constant vector 1. However we can have another choice by prove it via product arguments
\(r\) challenge can be alpha, and \(v_i\) can be rlc from beta, similar tricks as logup
Product argument is good in this case due to
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing