Polygon zkEVM中的子约束系统

1. 引言

前序博客有:

Polygon zkEVM中主要设计了3种子约束系统:

  • 1)Permutation check子约束系统:PIL中的关键字为is
    在这里插入图片描述
    在这里插入图片描述

  • 2)Plookup 子约束系统:PIL中的关键字为in
    在这里插入图片描述
    在这里插入图片描述

  • 3)Connection check(Copy constraint)子约束系统:PIL中的关键字为connect
    在这里插入图片描述
    在这里插入图片描述

2. Permutation check VS Connection check VS Plookup

  • Plonk的核心技术为:grand product check。
  • Plookup的核心技术为:multiset-equality check,在Plookup中引入了查找表。

所谓grand product check,是指:

  • public info:commitments to polynomials f , g f,g f,g over a finite field F \mathbb{F} F,及 a subset H = { x 1 , ⋯   , x n } ⊂ F H=\{x_1,\cdots,x_n\}\subset \mathbb{F} H={x1,,xn}F
  • private info:多项式 f , g f,g f,g
  • 待证明relation: ∏ i ∈ [ n ] a i = ∏ i ∈ [ n ] b i \prod_{i\in[n]}a_i=\prod_{i\in[n]}b_i i[n]ai=i[n]bi,其中 a i = f ( x i ) , b i = g ( x i ) a_i=f(x_i),b_i=g(x_i) ai=f(xi),bi=g(xi)

在PLONK论文中指出,当 H H H为a multiplicative subgroup时,可高效实现相应证明。

此文讨论的长为 n n n的vector a ⃗ \vec{a} a ,在协议的实际实现中,均为Prover会对多项式 f f f进行commit,其中 f ( x i ) = a i f(x_i)=a_i f(xi)=ai

PLOOKUP的核心技术为:

  • multiset-equality check

借助少量的randomness,可将grand product check 转换为更强大的primitive——the multiset equality check:

  • 已知两个vector a ⃗ = ( a 1 , ⋯   , a n ) , b ⃗ = ( b 1 , ⋯   , b n ) \vec{a}=(a_1,\cdots,a_n),\vec{b}=(b_1,\cdots,b_n) a =(a1,,an),b =(b1,,bn),check两者是否具有相同的元素,计算相应的重复值,顺序可以不对应。

( 1 , 1 , 2 , 3 ) (1,1,2,3) (1,1,2,3) ( 2 , 1 , 1 , 3 ) (2,1,1,3) (2,1,1,3) 是multiset-equal的,但是与 ( 1 , 2 , 3 , 3 ) (1,2,3,3) (1,2,3,3) ( 1 , 1 , 2 , 4 ) (1,1,2,4) (1,1,2,4)都不是 multiset-equal的。

电路证明中常用到permutation check,用于证明电路中门之间wires赋值的一致性(establishes the consistency of the assignment of wires to gates)。
Permutation是指:

  • public info:permutation σ : [ n ] → [ n ] \sigma:[n]\rightarrow [n] σ:[n][n]
  • private info: a ⃗ , b ⃗ \vec{a},\vec{b} a ,b
  • 待证明relation: b ⃗ = σ ( a ⃗ ) \vec{b}=\sigma(\vec{a}) b =σ(a ),即对于每一个 i i i,有 b i = a σ ( i ) b_i=a_{\sigma(i)} bi=aσ(i)

2.1 Plookup子约束系统

根据Plookup论文,相应的Plookup子约束系统证明系统为:
在这里插入图片描述

2.2 Permutation check约束子系统

根据Plonk论文可知,Permutation check约束子系统证明系统为:
在这里插入图片描述

2.3 Connection check(Copy constraint)约束子系统

Permutation check约束子系统 为 Connection check(Copy constraint)约束子系统的特例情况,Connection check(Copy constraint)约束子系统 更具有通用性。

参考资料

[1] How PLONK Works: Part 1
[2] How PLONK Works: Part 2

附录:Polygon Hermez 2.0 zkEVM系列博客

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值