当前位置:网站首页>appliedzkp的zkevm(12)State Proof
appliedzkp的zkevm(12)State Proof
2022-07-04 03:59:00 【mutourend】
1. 引言
State Proof可帮助EVM Proof检查所有random read-write access records的有效性,通过首先按唯一index将这些records分组,然后按access order进行排序。将access order称为ReadWriteCounter,会对access records技术,同时为每个record提供唯一标识。当生成state proof之后,也会生成BusMapping作为lookup table 分享给EVM proof。
2. Random Read-Write Data
State proof会维护 EVM proof的random accessible data的读写部分。
在state proof中记录的操作有:
Memory:以byte array的方式调用memory。Stack:以RLC-encoded word array的方式调用stack。Storage:将账号的storage看成是key-value mapping。CallContext:为call的上下文。Account:为账号的state(nonce, balance, code hash)。TxRefund:refund给tx sender的金额(value)。TxAccessListAccount:为account access list 的state。TxAccessListAccountStorage:为account storage access list的state。AccountDestructed:为某account destruction的state。
以上每个操作都使用不同的参数来缩影。具体见RW Table。
所有table的key拼接在一起形成该data的唯一索引。每个record都与一个ReadWriteCounter关联,这些records首先通过其唯一索引分组,然后按ReadWriteCounter递增排序。已知对前一record的access,每个target都有其自身的格式和更新规则,如 Memory中的values可以8-bit来表示。
3. Circuit Constraints
约束主要分为两类 :
- 1)可影响所有操作的全局约束:如key的字母排序。
- 2)对每个操作的特定约束:每种操作类型采用selector-like表示,以启用仅用于该操作的额外约束。
用于保证proper ordering/transition of values的约束,借助fixed lookup table,采用range checks of the difference between the consecutive cells。由于采用lookup table来证明correct ordering,每列都必须排序,因此需要定义其包含的最大值(将对应fixed lookup table的size)。同一table内2个连续的cell将有差值,反向排序将时该差值wrap around为一个非常大的值(由于field域计算),使得该结果不在table内。
参考资料
[1] State Proof
边栏推荐
- 【MATLAB】通信信号调制通用函数 — 窄带高斯白噪声的生成
- Change the background color of Kivy tutorial (tutorial includes source code)
- 戳气球和布尔运算问题(巨难)
- Formatted text of Kivy tutorial (tutorial includes source code)
- Definition of DCDC power supply current
- 【MATLAB】MATLAB 仿真模拟调制系统 — VSB 系统
- FT2000+下LPC中断绑核使用说明
- 【MATLAB】通信信号调制通用函数 — 傅里叶变换
- 【MATLAB】MATLAB 仿真数字带通传输系统 — ASK、 PSK、 FSK 系统
- How do good test / development programmers practice? Where to go
猜你喜欢

YoloV6实战:手把手教你使用Yolov6进行物体检测(附数据集)

Yolov6 practice: teach you to use yolov6 for object detection (with data set)

关于solidworks standard无法获得许可 8544问题的总结

6-5漏洞利用-SSH弱口令破解利用

Utiliser des unités de mesure dans votre code pour une vie meilleure

Definition of DCDC power supply current

Niuke Xiaobai monthly race 49
![[Yugong series] go teaching course 002 go language environment installation in July 2022](/img/a8/79c48e426ce909db960d446f923795.png)
[Yugong series] go teaching course 002 go language environment installation in July 2022

优秀的测试/开发程序员是怎么修炼的?该往哪走......

Beipiao programmer, 20K monthly salary, 15W a year, normal?
随机推荐
How to view installed r packages in R language
STM32F1与STM32CubeIDE编程实例-74HC595驱动4位7段数码管
Deep understanding of redis -- bloomfilter
分享一些我的远程办公经验
Rhcsa 06 - suid, sgid, sticky bit (to be added)
Operate the server remotely more gracefully: the practice of paramiko Library
Technology Management - learning / practice
Correct the classpath of your application so that it contains a single, compatible version of com.go
Drozer tool
【MATLAB】MATLAB 仿真数字基带传输系统 — 双极性基带信号(余弦滚降成形脉冲)的眼图
Developing mqtt access program under QT
【MATLAB】通信信号调制通用函数 — 插值函数
Rhcsa 03 - Basic permissions for documents
关闭的数据能用dbca删除吗? 能
qt下开发mqtt的访问程序
AcWing第 58 场周赛
Dp83848+ network cable hot plug
RAC delete damaged disk group
【MATLAB】MATLAB 仿真模拟调制系统 — FM 系统
Rhcsa 08 - automount configuration