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
restyle docs authored Aug 07, 2024 by gzxu's avatar gzxu
Hide whitespace changes
Inline Side-by-side
Showing with 6 additions and 37 deletions
+6 -37
  • zkevm-docs/4-core/core-jump.markdown zkevm-docs/4-core/core-jump.markdown +6 -37
  • No files found.
zkevm-docs/4-core/core-jump.markdown
View page @ e8477f72
......@@ -282,41 +282,10 @@ fn gen_witness(&self, trace: &GethExecStep, current_state: &mut WitnessExecHelpe
#### get_lookups
从core row, cnt=1,vers[24]~vers[31]的位置获取值,去向为Bytecode进行lookup, 这里使用的LookUp类型为`LookupEntry::BytecodeFull`
除了state lookup 外,
```rust
fn get_lookups(
&self,
config: &ExecutionConfig<F, NUM_STATE_HI_COL, NUM_STATE_LO_COL>,
meta: &mut ConstraintSystem<F>,
) -> Vec<(String, LookupEntry<F>)> {
let stack_lookup = query_expression(meta, |meta| config.get_state_lookup(meta, 0));
let bytecode_loopup = query_expression(meta, |meta| config.get_bytecode_full_lookup(meta));
vec![
("jump_lookup_stack".into(), stack_lookup),
("jump_lookup_bytecode".into(), bytecode_loopup),
]
}
pub(crate) fn get_bytecode_full_lookup(&self, meta: &mut VirtualCells<F>) -> LookupEntry<F> {
let (addr, pc, opcode, not_code, value_hi, value_lo, cnt, is_push) = (
meta.query_advice(self.vers[24], Rotation::prev()),
meta.query_advice(self.vers[25], Rotation::prev()),
meta.query_advice(self.vers[26], Rotation::prev()),
meta.query_advice(self.vers[27], Rotation::prev()),
meta.query_advice(self.vers[28], Rotation::prev()),
meta.query_advice(self.vers[29], Rotation::prev()),
meta.query_advice(self.vers[30], Rotation::prev()),
meta.query_advice(self.vers[31], Rotation::prev()),
);
LookupEntry::BytecodeFull {
addr,
pc,
opcode,
not_code,
value_hi,
value_lo,
cnt,
is_push,
}
}
```
\ No newline at end of file
- [5-state.markdown](../5-state)
需要从core row, cnt=1,vers[24]~vers[31]的位置获取值,去向为Bytecode进行lookup, 这里使用的LookUp类型为`LookupEntry::BytecodeFull`
- [6-bytecode](zkevm-docs/6-bytecode.markdown)
\ No newline at end of file
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号