当前位置:网站首页>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
边栏推荐
- Understand 12 convolution methods (including 1x1 convolution, transpose convolution and deep separable convolution)
- Discard Tkinter! Simple configuration to quickly generate cool GUI!
- [unity] built in rendering pipeline to URP
- 在OpenCloudOS使用snap安装.NET 6
- [unity][ecs] learning notes (I)
- 理想中的接口自动化项目
- bye! IE browser, this route edge continues to go on for IE
- I'm almost addicted to it. I can't sleep! Let a bug fuck me twice!
- 爬虫小操作
- 请教下, 我在本地idea运行flinkcdc的mysql到mysql全量同步,这个是在我本地ide
猜你喜欢

fastposter v2.8.4 发布 电商海报生成器

手把手教你处理 JS 逆向之 SVG 映射
![[happy Lantern Festival] guessing lantern riddles eating lantern festival full of vitality ~ (with lantern riddle guessing games)](/img/04/454bede0944f56ba69cddf6b237392.jpg)
[happy Lantern Festival] guessing lantern riddles eating lantern festival full of vitality ~ (with lantern riddle guessing games)

Application of X6 in data stack index management

Global exception handlers and unified return results

Missed the golden three silver four, found a job for 4 months, interviewed 15 companies, and finally got 3 offers, ranking P7+

一款自动生成单元测试的 IDEA 插件,开发效率提升 70% 以上!

我大抵是卷上瘾了,横竖睡不着!竟让一个Bug,搞我两次!

Training and recognition of handwritten digits through the lenet-5 network built by pytorch
![[Unity]EBUSY: resource busy or locked](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[Unity]EBUSY: resource busy or locked
随机推荐
Idea failed to connect to SQL Sever
读取pdf文字和excel写入操作
Cisco * VRF(虚拟路由转发表)
[happy Lantern Festival] guessing lantern riddles eating lantern festival full of vitality ~ (with lantern riddle guessing games)
The introduction of flink-sql-mysql-cdc-2.2.1 has solved many dependency conflicts?
Ribbon core source code analysis
用 Compose 实现个空调,为你的夏日带去清凉
为什么 Istio 要使用 SPIRE 做身份认证?
[Unity]EBUSY: resource busy or locked
Google开源依赖注入框架-Guice指南
Adapter mode
Read PDF Text and write excel operation
ECS MySQL query is slow
Composite pattern
ruoyi集成积木报表(nice)
栈的弹出压入序列<难度系数>
Solve the problem that the value of the action attribute of the form is null when transferring parameters
第三章 栈和队列
R语言plotly可视化:plotly可视化互相重叠的直方图(histogram)、在直方图的底部边缘使用geom_rug函数添加边缘轴须图Marginal rug plots
无线通信模块定点传输-点对多点的具体传输应用