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
  • 7 copy

7 copy · 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 13 additions and 11 deletions
+13 -11
  • zkevm-docs/7-copy.markdown zkevm-docs/7-copy.markdown +13 -11
  • No files found.
zkevm-docs/7-copy.markdown
View page @ 66f9a8e9
# Copy
## 简介 ## 简介
copy类操作指的是在EVM中进行不定长的一段数据拷贝,例如`CALLDATACOPY`将`calldata`中的一段数据拷贝到`memory`中。拷贝以`byte`作为数据长度单位,不同于栈的`U256`。 copy类操作指的是在EVM中进行不定长的一段数据拷贝,例如`CALLDATACOPY`将`calldata`中的一段数据拷贝到`memory`中。拷贝以`byte`作为数据长度单位,不同于栈的`U256`。
...@@ -35,7 +37,7 @@ copy类操作指的是在EVM中进行不定长的一段数据拷贝,例如`CAL ...@@ -35,7 +37,7 @@ copy类操作指的是在EVM中进行不定长的一段数据拷贝,例如`CAL
| public | | | | | | public | | | | |
| ---------- | ------------ | --------- | -------- | ---- | | ---------- | ------------ | --------- | -------- | ---- |
| TxCalldata | block_tx_idx | -- | data_idx | data | | TxCalldata | block_tx_idx | -- | data_idx | data |
| TxLogData | block_tx_idx | log_index | data_idx | data | | TxLogData | block_tx_idx | log_index | data_idx | data |
...@@ -111,16 +113,16 @@ pub enum Type { ...@@ -111,16 +113,16 @@ pub enum Type {
例子:CODECOPY,从bytecode拷贝到memory。例子里长度为8,被拷贝的数据为0xabcd......见下表。 例子:CODECOPY,从bytecode拷贝到memory。例子里长度为8,被拷贝的数据为0xabcd......见下表。
| byte | src type | src id | src pointer | src stamp | dst type | dst id | dst pointer | dst stamp | cnt | len | acc | | byte | src type | src id | src pointer | src stamp | dst type | dst id | dst pointer | dst stamp | cnt | len | acc |
|------|------------|---------------|-------------|-----------|----------|--------|---------------|------------|-----|-----|-----| | ---- | ---------- | ------------- | ----------- | --------- | -------- | ------ | ------------- | ---------- | --- | --- | ------ |
| 0xab | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 0 | 8 |0xab | | 0xab | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 0 | 8 | 0xab |
| 0xcd | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 1 | 8 |0xabcd| | 0xcd | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 1 | 8 | 0xabcd |
| ... | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 2 | 8 | ... | | ... | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 2 | 8 | ... |
| | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 3 | 8 | | | | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 3 | 8 | |
| | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 4 | 8 | | | | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 4 | 8 | |
| | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 5 | 8 | | | | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 5 | 8 | |
| | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 6 | 8 | | | | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 6 | 8 | |
| | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 7 | 8 | | | | `Bytecode` | contract addr | some offset | nil | `Memory` | callid | some mem addr | some stamp | 7 | 8 | |
注意:同一次Copy的许多行里的pointer,是一样的,都和第一行相同。 注意:同一次Copy的许多行里的pointer,是一样的,都和第一行相同。
......
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号