您当前的位置: 首页 > 

mutourend

暂无认证

  • 2浏览

    0关注

    661博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

appliedzkp的zkevm(7)定制化Proof System

mutourend 发布时间:2021-08-16 23:15:01 ,浏览量:2

1. 引言

目标:

  • RU:Rollup
  • VP:Validity Proof

zkevm的一些定制化设计考虑:

  • Implement Linearization
  • BLS12 Integration for KZG
  • Implement Z(X) Based Multiopen Strategy for KZG
  • EVM Compatible Transcript
  • EVM Verifier
  • FRI Integration
  • KZG Integration
  • Implement Semi-Recursive System
  • Public Inputs
2. Implement Linearization

目标:RU,VP

当前在halo2中并未实现linearization技术。因此需要将所有even fixed column evaluations发送给Prover。为了减小proof size,同时减少Verifier group operations,有2种解决办法:

  • 在circuit finalized之后customize prover
  • 实现适于所有circuit的auto linearisation
3. BLS12 Integration for KZG

目标:RU,VP

For RU:在EVM中将最终支持BLS12,从而有可能拥有比BN256更便宜的group and pairing operations,但是目前仍然使用的是BN256。

4. Implement Z(X) Based Multiopen Strategy for KZG

目标:RU, VP

For RU:对于BN setting,应尽量避免G2 operations,因此Plonk论文中的batch opening技术可能是最优的。但是,在验证G2 operations时,有一个很酷的trick——使用pairing and G1 add and mul precompiles。 因此,应平衡增加few pairing terms and g1 operations to use Z(X) and multiopening without G2 operations。

相关参考资料有:

  • https://hackmd.io/@tompocock/shplonk
  • https://zcash.github.io/halo2/design/proving-system/multipoint-opening.html
5. EVM Compatible Transcript

目标:RU

  • 目前halo2中仅有blake2,需增加keccak256和sha256
  • 为了避免在EVM中昂贵的point decompression操作,需增加uncompressed point read/write。
6. EVM Verifier

目标:RU 在对state circuits和execution circuits完成固化后,需在KZG和BN254 setup的情况下实现EVM verifier。因此需要在halo2现有通用verifier的基础上,增加一个专用verifier。

7. FRI Integration

目标:VP

8. KZG Integration

目标:VP, RU

在halo2库中增加支持BN256 curve的KZG multiopen: 详细参看:

  • https://github.com/kilic/halo2/tree/kzg

该分支需merge到halo2库中最新更新。

9. Implement Semi-Recursive System

目标:VP, RU 所谓semi-recursive是指: 定义a system where we verify some part of proof in a circuit and defer pairing out of the circuit to L1 for example。aztec在其proof system做了相应实现。

在Hermez中介绍了Stark verifier:

  • https://youtu.be/17d5DG6L2nw?t=1764

若可实现semi-recursive system,可重新考虑Z(X) Based Multiopen Strategy for RU since G2 ops are moved to the circuit。

10. Public Inputs

如何给Verifier端传输public inputs。目前有2种方式:

  • 方法一:与halo2库类似。该方法是efficient in recursion context (I think only for two layer) to avoid hashing many things in the circuit。 Prover:发送evaluations of public input polynomial。 Verifier: 1)commits to public input polynomial 2)adds commitment to the transcript and squeeze the evaluation point 3)checks circuit equation with public input evaluations 4)checks the opening public input polynomial

  • 方法二:更接近于plonk论文中的实现。若想在Verifier段避免group operations,该方法很有效。 详细可看halo2库中的experimental PR 以及 如何借助halo2工具来计算public input evals。 Prover:sends nothing about public inputs Verifier: 1)adds public input values to the transcript and squeeze the evaluation point. 2)calculates public input evaluations 3)checks circuit equation with public input evaluations

参考资料

[1] https://hackmd.io/@liangcc/zkvmbook/%2FCUWxTKjwS1OKm-ZPIOa76w

关注
打赏
1664532908
查看更多评论
立即登录/注册

微信扫码登录

0.0401s