当前位置:网站首页>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
边栏推荐
- 优秀的测试/开发程序员是怎么修炼的?该往哪走......
- MySQL JDBC编程
- How do good test / development programmers practice? Where to go
- Formatted text of Kivy tutorial (tutorial includes source code)
- Kivy tutorial custom fonts (tutorial with source code)
- Statistical genetics: Chapter 3, population genetics
- GUI 应用:socket 网络聊天室
- 更优雅地远程操作服务器:Paramiko库的实践
- @Feignclient comments and parameters
- Rhcsa 01 - create partitions and file systems
猜你喜欢

技术管理 - 学习/实践

6-5 vulnerability exploitation SSH weak password cracking and utilization

浅谈JVM的那些事

Exploration and practice of eventbridge in the field of SaaS enterprise integration

最长递增子序列问题(你真的会了吗)

leetcode:1314. 矩阵区域和【二维前缀和模板】

戳气球和布尔运算问题(巨难)

Developing mqtt access program under QT

Keysight n9320b RF spectrum analyzer solves tire pressure monitoring scheme

DCDC电源电流定义
随机推荐
Qt QTableView数据列宽度自适应
Kivy tutorial 07 component and attribute binding implementation button button click to modify the label component (tutorial includes source code)
Many founders of technology companies provided enterpriser first with a round C financing of up to US $158million to help it invest in the next generation of global innovators
自动化测试selenium基础篇——webdriverAPI
[Yugong series] go teaching course 002 go language environment installation in July 2022
Annex VI: defense work briefing docx
"Don't care too much about salary when looking for a job", this is the biggest lie I've ever heard
分享一些我的远程办公经验
Asahi Kasei participated in the 5th China International Import Expo (5th ciie) for the first time
CRS-4013: This command is not supported in a single-node configuration.
Network equipment emergency response Guide
Correct the classpath of your application so that it contains a single, compatible version of com. go
【MATLAB】MATLAB 仿真数字基带传输系统 — 双极性基带信号(第 I 类部分响应波形)的眼图
YoloV6实战:手把手教你使用Yolov6进行物体检测(附数据集)
What is context?
RPC - grpc simple demo - learn / practice
Eig launched Grupo Cerro, a renewable energy platform in Chile
GUI 应用:socket 网络聊天室
附件六:防守工作簡報.docx
The five pictures tell you: why is there such a big gap between people in the workplace?