当前位置:网站首页>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
边栏推荐
- Several methods of using ABAP to operate Excel
- [200 opencv routines] 213 Draw circle
- 一文读懂 12种卷积方法(含1x1卷积、转置卷积和深度可分离卷积等)
- Looking at jBPM from jbm3 to jbm5 and activiti
- The introduction of flink-sql-mysql-cdc-2.2.1 has solved many dependency conflicts?
- 生成token
- Discard Tkinter! Simple configuration to quickly generate cool GUI!
- dotnet 使用 Crossgen2 对 DLL 进行 ReadyToRun 提升启动性能
- Realize an air conditioner with compose to bring you cool in summer
- 爬虫小操作
猜你喜欢

I'm almost addicted to it. I can't sleep! Let a bug fuck me twice!

Interface automation framework scaffolding - Implementation of parametric tools

To enhance the function of jupyter notebook, here are four tips
Ribbon core source code analysis

mysql打不开,闪退

Caffeine cache, the king of cache, has stronger performance than guava

错过金三银四,找工作4个月,面试15家,终于拿到3个offer,定级P7+

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

卸载oracle报错
![[Unity][ECS]学习笔记(二)](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[Unity][ECS]学习笔记(二)
随机推荐
谁知道在中信建投证券开户是不是安全的
[unity] built in rendering pipeline to URP
物联网无线通信应用中6种融合定位技术
股票开户用中金证券经理发的开户二维码安全吗?知道的给说一下吧
Please consult me. I run the MYSQL to MySQL full synchronization of flykcdc in my local ide. This is in my local ide
SQL中的DQL、DML、DDL和DCL是怎么区分和定义的
再見!IE瀏覽器,這條路由Edge替IE繼續走下去
Discard Tkinter! Simple configuration to quickly generate cool GUI!
无线通信模块定点传输-点对多点的具体传输应用
etf持仓如何影响现货金价?
[Unity]EBUSY: resource busy or locked
How to distinguish and define DQL, DML, DDL and DCL in SQL
Realization of a springboard machine
AQS理解
R语言使用car包中的avPlots函数创建变量添加图(Added-variable plots)、在图像交互中,在变量添加图中手动标识(添加)对于每一个预测变量影响较大的强影响点
第六天 脚本与动画系统
生成token
Bridge mode
接口自动化框架脚手架-利用反射机制实现接口统一发起端
TCP实战案例之即时通信、BS架构模拟