当前位置:网站首页>EVM proof in appliedzkp zkevm (11)
EVM proof in appliedzkp zkevm (11)
2022-07-04 04:58:00 【mutourend】
1. introduction
EVM Proof Used to prove :
- state trie root The change is correct , By verifying that the transactions contained in a block have correct execution results .
EVM circuit Will be re implemented EVM, But it is verified from the perspective of verification , That means ,Prover Can help provide clues , As long as these clues do not contradict the results . Such as ,Prover Can provide information about call Whether or not to revert A clue to , Or something opcode Will you encounter the wrong clue , And then the EVM circuit It can be verified that the execution result is correct .
Transactions contained within a block can be simple ether transfers、contraction creation or contract interactions, Because every transaction has variable execution trace, Cannot use fixed circuit layout To verify specific region Specific to logic, So , We need to a chip To verify all possible logics, The chip Repeat yourself to achieve the whole circuit.
2. Custom type
The following types are customized for clues :
Name | Type | Description |
---|---|---|
GlobalCounter | int | Order of random access to BusMapping , which should be in sequence |
BusMapping | List[Tuple[int, ...]] | List of random read-write access data in sequence with GlobalCounter as index |
3. Random Accessible Data
EVM The parser can do any random access to data Similar to account balance、account storage、stack in current scope、memeory in current scope, But for EVM circuit Come on , It is difficult to track these data to ensure the real-time consistency of these data .
therefore ,EVM proof have State proof To provide a valid list of random read-write access records indexed by the GlobalCounter
as a lookup table to do random access at any moment.
take random read-write access records list be called BusMapping
, Because its function is similar to that in computers bus, Used to transmit data between different parts . Allied ,read-only The data to random access The way is from lookup table load .
Target | Index | Accessible By | Description |
---|---|---|---|
Block | {enum} | Read | Block constant decided before executing the block |
BlockHash | {index} | Read | Previous 256 block hashes as a encoded word array |
AccountNonce | {address} | Read , Write | Account’s nonce |
AccountBalance | {address} | Read , Write | Account’s balance |
AccountCodeHash | {address} | Read , Write | Account’s code hash |
AccountStorage | {address}.{key} | Read , Write | Account’s storage as a key-value mapping |
Code | {hash}.{index} | Read | Executed code as a byte array |
Call | {id}.{enum} | Read | Call’s context decided by caller (includes EOA and internal calls) |
CallCalldata | {id}.{index} | Read | Call’s calldata as a byte array (only for EOA calls) |
CallSignature | {id}.{index} | Read | Call’s signature as a byte array (only for EOA calls) |
CallState | {id}.{enum} | Read , Write | Call’s internal state |
CallStateStack | {id}.{index} | Read , Write | Call’s stack as a encoded word array |
CallStateMemory | {id}.{index} | Read , Write | Call’s memory as a byte array |
3. Circuit Constraints
This repetition chip have 2 individual main states, A call initializes , Another one for bytecode execution.
Reference material
[1] EVM Proof
边栏推荐
- 红队视角下的防御体系突破之第一篇介绍、阶段、方法
- How do good test / development programmers practice? Where to go
- 6-4 vulnerability exploitation SSH banner information acquisition
- Beipiao programmer, 20K monthly salary, 15W a year, normal?
- 在代码中使用度量单位,从而生活更美好
- CRS-4013: This command is not supported in a single-node configuration.
- 记几个智能手表相关芯片 蓝牙芯片 低功耗
- GUI application: socket network chat room
- 定制一个自己项目里需要的分页器
- Yolov6 practice: teach you to use yolov6 for object detection (with data set)
猜你喜欢
随机推荐
Sécurité du réseau dans les écoles professionnelles secondaires - preuve de mémoire
6-5 vulnerability exploitation SSH weak password cracking and utilization
STM32F1与STM32CubeIDE编程实例-74HC595驱动4位7段数码管
分享一些我的远程办公经验
【MATLAB】MATLAB 仿真数字基带传输系统 — 数字基带传输系统
Self sharing of a graduate
Network - vxlan
【MATLAB】MATLAB 仿真模拟调制系统 — DSB 系统
1. Mx6u-alpha development board (LED drive experiment in C language version)
【MATLAB】MATLAB 仿真数字带通传输系统 — ASK、 PSK、 FSK 系统
Share some of my telecommuting experience
附件二:攻防演练保密协议.docx
First knowledge of batch processing
[cloud native] those lines of code that look awesome but have a very simple principle
NTFS 安全权限
Precautions for accompanying driving these 23 points should be paid attention to!
Developing mqtt access program under QT
MySQL JDBC programming
How do good test / development programmers practice? Where to go
Annex I: power of attorney for 202x XXX attack and defense drill