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
  • 10 public

10 public · Changes

Page history
chore: modify zkevm-docs/10-public authored Jun 04, 2024 by qingyun Ma's avatar qingyun Ma
Hide whitespace changes
Inline Side-by-side
Showing with 26 additions and 0 deletions
+26 -0
  • zkevm-docs/10-public.markdown zkevm-docs/10-public.markdown +26 -0
  • No files found.
zkevm-docs/10-public.markdown
View page @ d9600d27
...@@ -317,3 +317,29 @@ Hash: `Column<Advice>`类型,只有在length-1和length两行有值,分别 ...@@ -317,3 +317,29 @@ Hash: `Column<Advice>`类型,只有在length-1和length两行有值,分别
#### 其他:
为什么concat_rlc_acc = `tag_u8_final_rlc_acc*random^5 + block_tx_id_u8_final_rlc_acc*random^4 + value0_u8_final_rlc_acc*random^3 + value1_u8_final_rlc_acc*random^2 + value3_u8_rlc_final_acc*random + value3_u8_final_rlc_acc`
假如一个value被拆分成了16个字节:v1~v16,则value的rlc计算为:
```shell
v1, rlc1 = v1
v2, rlc2 = rlc1*random + v2, 即 v1*random + v2
v3, rlc3 = rlc2*random + v3, 即(v1*random + v2)*random + v3
v4, rlc4 = rlc3*random + v4, 即((v1*random + v2)*random + v3)*random + v4
v5, rlc5 = rlc4*random + v5, 即(((v1*random + v2)*random + v3)*random + v4)*random + v5
...
v16, rlc16=rlc15*random+v16
```
上面计算方式可化简为:
`rlc = v1 * random^15 + v2 * random^14 + v3 * random^13 + ... + v15*random + v16`
即,假如value被拆分为了len个字节v<sub>1</sub>~ v<sub>len</sub> ,则有
rlc= v<sub>1</sub> * random^(len-1) + v<sub>2 </sub>* random^(len-2) + ... + v<sub>len-1 </sub>* random + v<sub>len</sub>
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号