---
# System prepended metadata

title: Use hyperzexe as a recursive prover

---

# Use hyperzexe as a recursive prover

## Work flow
1. $\pi_1$: zkevm with halo2-kzg 
2. $\pi_2$: recursive proof of $\pi_1$ over hyperplonk 
3. $\pi_3$: recursive proof of $\pi_2$ over halo2-kzg 
4. on chain verify $\pi_3$

## Comparison
Assuming zkevm circuit is of size $2^{26}$ rows by $1000$(?) columns.
- Existing halo2 non-native snark-verifier requires $2^{24}$ constraints and around $20$ columns
- The proposed scheme requires $2^{22}$ rows by $13$ columns.
    - To verify $\pi_1$ with Hyperplonk, we need to batch verify 1000 KZG commitment and opneings. That is $2000$ group operations to re-randomize and aggregate the commitments and the openings; and 1 pairing (which we may defer to later). Assuming we can do each MSM in 300 constraints (requires dynamic lookups) and 13 columns, we will need $2^{20}$ constraints.
    - To verify $\pi_2$ with Halo2-KZG, we need to batch verify 13 Hyrax proofs of dimension $2^{20}$. That requires $13 * \sqrt{2^{20}} < 2^{14}$ group operations. Also assuming we can do each MSM in 300 constraints and 13 columns, we will need $300 * 2^{14} \approx 2^{22}$ constraints. 

    - best case -- open all poly at a same point $300 * \sqrt{13 * 2^{20}} = 2^{20.07}$ 

## TODOs:
- can we batch iop in hyperplonk [optimization]
- integrate ~~hyperlonk or~~ any ML-lookup [essential]
-  