# Halo2 + EZKL zkML

## 现状

* **MockHalo2Verifier**: chain 391 上的 mock，接受任何 proof（PoC）
* **真 EZKL Halo2 swap**: 6 周 roadmap

## EZKL 路线图（已写好）

[`docs/guides/ezkl-halo2-swap-roadmap-2026-04-30.md`](https://github.com/leeleeEcho/babyDriver_Layer2/blob/main/docs/guides/ezkl-halo2-swap-roadmap-2026-04-30.md)

| Week  | 任务                                 |
| ----- | ---------------------------------- |
| W1    | 环境 + ezkl install + MNIST baseline |
| W2    | MNIST CNN ONNX → Halo2 circuit     |
| W3    | KZG SRS + verifier deploy          |
| W4    | 端到端 prove → verify                 |
| W5-6  | MNIST 完整 e2e                       |
| W6-7  | CSDRT logistic regression          |
| W8-10 | 性能优化 + audit prep                  |

**预算**: \~25 工程师天 + \~$0.0024/proof 主网估算

## 性能 vs Groth16

| 指标           | Groth16              | Halo2         |
| ------------ | -------------------- | ------------- |
| Proof size   | \~256 bytes          | \~few KB      |
| Verify gas   | \~250K               | \~600K        |
| Setup        | per-circuit ceremony | universal SRS |
| Proving time | 较快                   | 较慢但 universal |

主网 zkML 选 Halo2 因 universal setup 适合多模型场景。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yellowpaper.axblade.io/algorithms/halo2-ezkl-zkml.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
