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
  • 3 witness

3 witness · Changes

Page history
feat: modify docs --story=1 authored Aug 07, 2024 by gz Xu's avatar gz Xu
Hide whitespace changes
Inline Side-by-side
Showing with 8 additions and 8 deletions
+8 -8
  • zkevm-docs/3-witness.markdown zkevm-docs/3-witness.markdown +8 -8
  • No files found.
zkevm-docs/3-witness.markdown
View page @ 66f9a8e9
...@@ -32,12 +32,12 @@ pub struct Witness { ...@@ -32,12 +32,12 @@ pub struct Witness {
### Core ### Core
core子表格负责表示4步轨迹,其列可以包含pc, opcode, operand (操作数,此处最多3个,因为ADD是a+b=c),以及负责表示操作数性质的列,例如stack_pointer(操作数在栈上的高度),is_write(是从栈读,还是写入)。操作数对于不同opcode不同,空的地方视为填充默认值0。 core子表格负责表示4步轨迹,其列可以包含pc, opcode, operand (操作数,此处最多3个,因为ADD是a+b=c),以及负责表示操作数性质的列,例如stack_pointer(操作数在栈上的高度),is_write(是从栈读,还是写入)。操作数对于不同opcode不同,空的地方视为填充默认值0。
| pc | opcode | operand | stack pointer | is_write | stamp | operand | stack pointer | is_write | stamp | operand | stack pointer | is_write | stamp | | pc | opcode | operand | stack pointer | is_write | stamp | operand | stack pointer | is_write | stamp | operand | stack pointer | is_write | stamp |
|----|--------|---------|---------------|----------|-------|---------|---------------|----------|-------|---------|---------------|----------|-------| | --- | ------ | ------- | ------------- | -------- | ----- | ------- | ------------- | -------- | ----- | ------- | ------------- | -------- | ----- |
| 0 | PUSH1 | 1 | 1 | 1 | 1 | | | | | | | | | | 0 | PUSH1 | 1 | 1 | 1 | 1 | | | | | | | | |
| 2 | PUSH1 | 2 | 2 | 1 | 2 | | | | | | | | | | 2 | PUSH1 | 2 | 2 | 1 | 2 | | | | | | | | |
| 4 | ADD | 2 | 2 | 0 | 3 | 1 | 1 | 0 | 4 | 3 | 1 | 1 | 5 | | 4 | ADD | 2 | 2 | 0 | 3 | 1 | 1 | 0 | 4 | 3 | 1 | 1 | 5 |
| 5 | STOP | | | | | | | | | | | | | | 5 | STOP | | | | | | | | | | | | |
(对上表中的stack_pointer如有不理解,可看下段的介绍。stamp也在下段介绍。) (对上表中的stack_pointer如有不理解,可看下段的介绍。stamp也在下段介绍。)
...@@ -58,7 +58,7 @@ state子表格负责执行轨迹涉及的所有状态读写,并保持读写的 ...@@ -58,7 +58,7 @@ state子表格负责执行轨迹涉及的所有状态读写,并保持读写的
综上,state表格如下: 综上,state表格如下:
| stamp | value | stack pointer | is_write | | stamp | value | stack pointer | is_write |
|-------|-------|---------------|----------| | ----- | ----- | ------------- | -------- |
| 1 | 1 | 1 | 1 | | 1 | 1 | 1 | 1 |
| 2 | 2 | 2 | 1 | | 2 | 2 | 2 | 1 |
| 3 | 2 | 2 | 0 | | 3 | 2 | 2 | 0 |
...@@ -119,7 +119,7 @@ bytecode子表格用来放置被执行的合约的字节码。此表格较为静 ...@@ -119,7 +119,7 @@ bytecode子表格用来放置被执行的合约的字节码。此表格较为静
表格示例如下: 表格示例如下:
| cnt | byte | | cnt | byte |
|-----|--------------| | --- | ------------ |
| 0 | 0x60 (PUSH1) | | 0 | 0x60 (PUSH1) |
| 1 | 0x01 | | 1 | 0x01 |
| 2 | 0x60 (PUSH1) | | 2 | 0x60 (PUSH1) |
......
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号