HyperPlonk
Part \(2\)
Polynomial Basis
HyperPlonk Recap
- Simple gate constraint: \(\forall i \in [2^\mu]\)
- Gate constraint as a multi-variate polynomial identity: \(\forall \vec{x} \in B_\mu\)
- Linearly combine \(\{f_{\textsf{gate}}(\vec{x})\}_{\vec{x} \in B_{\mu+2}}\) with \(\mu\) challenges
- ZeroCheck: Run a sum-check on \(\hat{f}_{\textsf{gate}}(\vec{X})\) with sum 0.
- For copy constraints, we had
HyperPlonk Recap
Sumcheck
ZeroCheck
- ProductCheck: Run a product-check on \(\frac{f'}{g'}(\vec{X})\) with product 1.
ProdCheck
- We wanted to show that:
HyperPlonk In a Nutshell
\(\texttt{Gate Constraint}\)
\(\texttt{Copy Constraint}\)
Sumcheck
- Given a polynomial \(g: \mathbb{F}^\mu \rightarrow \mathbb{F}\) and \(X = \{x_i\}_{i \in [\mu]}\) compute the sum
- Intuition: evaluation on a boolean hypercube
\(g(x,y) = \frac{-4x}{(x^2+y^2+1)}\)
- Naively, a verifier would require \(2^\mu\) evaluations of \(g(.)\)
- Sumcheck protocol requires \(\mathcal{O}(\mu + \lambda)\) verifier work
- Here \(\lambda\) is the cost to evaluate \(g(.)\) at some \(r \in \mathbb{F}^{m}\)
- Prover's work is \(\mathcal{O}(2^\mu)\), i.e. linear in no of constraints
Sumcheck
- Honest prover starts by computing \(v = \sum_{X \in \{0,1\}^\mu}g(x_1, x_2, \dots, x_\mu)\)
\(g_1(\textcolor{orange}{X_1}) := \sum_{x_2\dots}g(\textcolor{orange}{X_1},x_2, \dots, x_m)\)
\(g_2(\textcolor{orange}{X_2}) := \sum_{x_3\dots}g(\textcolor{green}{r_1}, \textcolor{orange}{X_2}, x_3, \dots, x_m)\)
\(v \stackrel{?}{=} g_1(0) + g_1(1)\)
\(g_1(\textcolor{green}{r_1}) \stackrel{?}{=} g_2(0) + g_2(1)\)
\(g_3(\textcolor{orange}{X_3}) := \sum_{x_4\dots}g(\textcolor{green}{r_1}, \textcolor{green}{r_2}, \textcolor{orange}{X_3}, x_4, \dots, x_m)\)
\(g_\mu(\textcolor{orange}{X_\mu}) := g(\textcolor{green}{r_1}, \textcolor{green}{r_2}, \dots, \textcolor{green}{r_{\mu-1}}, \textcolor{orange}{X_\mu})\)
\(g_2(\textcolor{green}{r_2}) \stackrel{?}{=} g_3(0) + g_3(1)\)
\(g_{\mu-1}(\textcolor{green}{r_{\mu-1}}) \stackrel{?}{=} g_\mu(0) + g_\mu(1)\)
\(g_{\mu}(\textcolor{green}{r_{\mu}}) \stackrel{?}{=} g(\textcolor{green}{r_1}, \textcolor{green}{r_2}, \dots, \textcolor{green}{r_\mu})\)
Prover \(\mathcal{P}\)
Verifier \(\mathcal{V}\)
\(g_1\)
\(r_1\)
\(g_2\)
\(g_3\)
\(g_\mu\)
\(r_{\mu-1}\)
\(r_2\)
\(\vdots\)
\(\vdots\)
\(\vdots\)
Sumcheck Costs
-
Prover costs:
- In round \(i\in[\mu]\), evaluate \(g_i(\vec{x})\):
- \(g_i(\textcolor{orange}{X}) := \sum_{\vec{x}\in B_{\mu-i}}g(\textcolor{green}{r_1, \dots, r_{i-1}}, \textcolor{orange}{X}, \vec{x})\)
- \(\text{deg}_X(g_i) := \text{deg}_{x_i}(g) \le d\)
- No of evaluations: \(|B_{\mu-i}| = 2^{\mu-i}\)
- Total evaluations: \(\sum_{i}\text{deg}_{x_i}(g) \cdot 2^{\mu-i} = \textcolor{skyblue}{d \cdot 2^\mu}\)
-
Verifier costs:
- In round \(i\), evaluate \(g_i(0), g_i(1), g_{i-1}(r_{i-1}) \implies O(\mu)\)
- Cost of evaluating \(g(\vec{x})\) on \(\vec{x} = (r_1, \dots, r_\mu)\)
-
Proof size:
- \(\sum_{i} (\text{deg}_{x_i}(g) + 1) = \textcolor{skyblue}{(d + 1)\mu}\)
Non-Interactive Sumcheck
- Proof size: \(\#\mathbb{G} = 2\mu+2\) and \(\# \mathbb{F} = 3\mu\)
-
Prover computation with KZG:
- \(2\mu+2\) MSMs of size \((d+1),\)
- Evaluations: \(d\times 2^{\mu}\)
- Verifier: 1 MSM of \(O(\mu)\) and 1 pairing
-
Prover computation with Shplonk:
- \(\mu+2\) MSMs of size \((d+1),\)
- Evaluations: \(d\times 2^{\mu}\)
Non-Interactive Sumcheck 🚀
- Proof size: \(\mathbb{G} \rightarrow 2\mu+1, \mathbb{F} \rightarrow 2\mu\)
- Prover computation improvement: \(\mu+2\) MSMs of size \(d\)
- The verifier can compute the other two evaluations using \(\textcolor{lightgreen}{g_i(0), g'(r_i)}\)
- This would require prover to open \(g'_i(X)\) only at \(r_i\):
HyperPlonk Unrolled
HyperPlonk Part 2
By Suyash Bagad
HyperPlonk Part 2
- 63