当前位置:网站首页>Bytecode proof in appliedzkp zkevm (9)
Bytecode proof in appliedzkp zkevm (9)
2022-06-28 10:21:00 【mutourend】
1. introduction
bytecode proof Can help EVM proof, bring bytecode Easier to access (bytecode With its code hash To mark ).bytecode Each of the byte It can be used in the bytecode To access . At the same time, a flag To mark the byte It's a opcode still To the previous PUSH The directive data.
2. Bytecode Circuit Layout
| Column | Description |
|---|---|
q_first | 1 on the first row, else 0 |
q_last | 1 on the last row, else 0 |
hash | The keccak hash of the bytecode |
tag | Tag indicates whether value is a byte or length of the bytecode |
index | The position of the byte in the bytecode |
value | The byte data for the current position, or length of the bytecode |
is_code | 1 if the byte is code, 0 if the byte is PUSH data |
push_data_left | The number of PUSH data bytes that still follow the current row |
hash_rlc | The accumulator containing the current and previous bytes |
hash_length | The bytecode length |
byte_push_size | The number of bytes pushed for the current byte |
is_final | 1 if the current byte is the last byte of the bytecode, else 0 |
padding | 1 if the current row is padding, else 0 |
push_data_left_inv | The inverse of push_data_left (IsZeroChip helper) |
push_table.byte | Push Table: A byte value |
push_table.push_size | Push Table: The number of bytes pushed for this byte as opcode |
3. Push lookup table
push lookup table be used for find how many bytes an opcode pushes, Used to detect which byte yes code, Which one? byte No code.
Because it will be for each byte Conduct lookup, The table It can also be used indirectly for range check the byte inputs.
| Byte | Num bytes pushed |
|---|---|
| [0, OpcodeId::PUSH1] | 0 |
| [OpcodeId::PUSH1, OpcodeId::PUSH32] | [1..32] |
| [OpcodeId::PUSH32, 256] | 0 |
3.1 Circuit behavior
The circuit By setting tag = Length add to bytecode length The line of Start , Then from position 0 Start , Traversing this bytecode All of the bytes.
Reference material
边栏推荐
- Install using snap in opencloudos NET 6
- fastposter v2.8.4 发布 电商海报生成器
- [Unity]EBUSY: resource busy or locked
- Teach you how to handle the reverse SVG mapping of JS
- 纵观jBPM从jBPM3到jBPM5以及Activiti
- Instant messaging and BS architecture simulation of TCP practical cases
- 接口自动化框架脚手架-利用反射机制实现接口统一发起端
- R语言plotly可视化:plotly可视化互相重叠的直方图(histogram)、在直方图的底部边缘使用geom_rug函数添加边缘轴须图Marginal rug plots
- [unity][ecs] learning notes (I)
- Why does istio use spirit for identity authentication?
猜你喜欢

mysql数据库概述以及安装过程

DlhSoft Kanban Library for WPF

Realize an air conditioner with compose to bring you cool in summer

无线通信模块定点传输-点对多点的具体传输应用

Idea failed to connect to SQL Sever

理想中的接口自动化项目

Fastposter v2.8.4 release e-commerce poster generator

Global exception handlers and unified return results

通过PyTorch构建的LeNet-5网络对手写数字进行训练和识别

Huawei OSPF single region
随机推荐
June training (day 28) - Dynamic Planning
bad zipfile offset (local header sig)
丢弃 Tkinter!简单配置快速生成超酷炫 GUI!
生成token
bad zipfile offset (local header sig)
谁知道在中信建投证券开户是不是安全的
第五章 树和二叉树
无线通信模块定点传输-点对多点的具体传输应用
fastposter v2.8.4 发布 电商海报生成器
【NLP】今年高考英语AI得分134,复旦武大校友这项研究有点意思
Discard Tkinter! Simple configuration to quickly generate cool GUI!
解决表单action属性传参时值为null的问题
Dbeaver installation and use tutorial (super detailed installation and use tutorial)
Interface automation framework scaffold - use reflection mechanism to realize the unified initiator of the interface
Adapter mode
六月集训(第28天) —— 动态规划
Interface automation framework scaffolding - Implementation of parametric tools
Looking at jBPM from jbm3 to jbm5 and activiti
Proxy mode (proxy)
[Unity]内置渲染管线转URP