ETHPrague 2024

Advancing Towards ZK Fraud Proof - zkGo: Compiling L2 Geth into ZK-Compatible Wasm
06-02, 14:00–14:25 (Europe/Prague), Flower Stage

We present zkGo - a customized Go compiler to generate zk-Friendly Wasm code and demonstrate its capability to compile L2Geth and prove its execution via the state-of-the-art zkWasm prover. This will be the key step to zk Fault Proof that instantly challenges off-chain execution.


Optimistic rollup suffers from the long settlement delay because of the multi-round interactive dispute game. To accelerate the dispute game, ZK fault proof was recently proposed to challenge a malicious sequencer in a single transaction, significantly reducing gas costs and time compared to traditional fraud proofs. To generate a ZK fault proof, the L2 Geth (a.k.a., op-program-client in Optimism) needs to be emulated in an instruction set architecture (ISA), and then the execution result of the L2 Geth is proven by a zkVM. We choose WebAssembly (Wasm) - a widely adopted open-standard ISA and prove the execution of Wasm code using zkWasm, the state-of-the-art zkVM for Wasm developed by Delphinus Lab. However, there are two main challenges in this path: 1, We cannot directly compile L2 Geth to Wasm with Go due to compilation errors. To solve this problem, inspired by Arbitrum, we make minimum modifications to op-program-client to support Wasm compilation. 2, The compiled Wasm code by Go includes unclean exit code, floating-point instructions, and calls on ill-compatible host functions, which are unfriendly to ZK with high adaption cost. To address this issue, we introduced zkGo - a customized Go compiler to produce Wasm code compatible with ZK prover. As a result of these modifications, the execution of the compiled L2 Geth Wasm code can now be proven using zkWasm.

Active Ethereum ecosystem contributor (ethresear.ch / magician)
- Author/coauthor of EIPs-4804/4972/5018/5027/6150
- PhD from Georgia Tech
- Former engineer at Meta/Google/EMC

Interested in Ethereum's DA and L2 and received multiple grants from EF
- Vitalik’s grant on cross-L2 bridge
- Data Availability Sampling Research: https://blog.ethereum.org/2022/12/07/esp-allocation-q3-22
- EthStorage - Proof of Storage on L2 Dataset with L1 Contract: - https://blog.ethereum.org/2023/02/14/layer-2-grants-roundup
- OP Stack grants on multi-section fault proof and zk fault proof

This speaker also appears in: