Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
zkevm-circuits
zkevm-circuits
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

  • zkp
  • zkevm-circuitszkevm-circuits
  • Wiki
    • Zkevm docs
    • 4 core
  • core jump

core jump · Changes

Page history
feature: update state constrain authored Jul 26, 2024 by chenxuanhui's avatar chenxuanhui
Hide whitespace changes
Inline Side-by-side
Showing with 13 additions and 1 deletion
+13 -1
  • zkevm-docs/4-core/core-jump.markdown zkevm-docs/4-core/core-jump.markdown +13 -1
  • No files found.
zkevm-docs/4-core/core-jump.markdown
View page @ 166dad71
......@@ -23,7 +23,7 @@ STOP
### Witness Core Row
core row中的表格设计如下:
Witness Core Row用于记录每个操作的中间状态,包括操作码(opcode)、程序计数器(PC)、代码地址(code_addr)和栈值(value_lo 和 value_hi)等。其中JUMP的core row中的表格设计如下:
cnt=1 vers[0]~vers[7]的位置用来存放栈顶弹出的值,即next_pc
......@@ -40,6 +40,8 @@ cnt=1, vers[24]~vers[31]的位置用来存放去向为bytecode的LookUp, 即校
### 门约束
门约束用于确保每一步操作符合预期,包括栈操作和跳转验证。以下是详细的门约束设计:
1. 当前的OPCODE=JUMP
2. Stack Value约束(tag、state_stamp、 call_id、stack_pointer、is_write)
3. Auxiliary字段约束(state_stamp、stack_pointer、log_stamp、read_only)
......@@ -95,8 +97,18 @@ cnt=1, vers[24]~vers[31]的位置用来存放去向为bytecode的LookUp, 即校
### LookUp约束
LookUp约束用于验证跳转目标PC是一个有效的JUMPDEST指令位置。以下是详细的LookUp约束设计:
cnt=1的位置vers[24]~vers[31]的位置用来存放要lookUp的信息(next_pc的合法性,即校验next_pc在bytecode中是否存在)
其中,vers[24]~vers[31]的Witness Core Row 表结构如下:
```plaintext
| cnt | vers[24] | vers[25] | vers[26] | vers[27] | vers[28] | vers[29] | vers[30] | vers[31] |
|-----|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|
| 1 | code_addr | pc | opcode | not_code | value_hi | value_lo | - | is_push |
```
来源:core
去向:bytecode
......
Clone repository
  • basics
    • evm
    • halo2
  • code notes
    • binary_number_with_real_selector
    • how to use macro
    • simple_lt
    • simple_lt_word
  • Home
  • image
  • zkevm docs
    • 1 introduction
    • 10 public
    • 11 fixed
    • 12 exp
    • 13 keccak
    • 14 comparisons
    • 15 differences
View All Pages

Copyright © 2024 ChainWeaver Org. All Rights Reserved. 版权所有。

京ICP备2023035722号-3

京公网安备 11010802044225号