Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

support byte16 range check #1426

Closed
1 task
hero78119 opened this issue May 22, 2023 · 2 comments · Fixed by #1427
Closed
1 task

support byte16 range check #1426

hero78119 opened this issue May 22, 2023 · 2 comments · Fixed by #1427
Labels
T-feature Type: new features

Comments

@hero78119
Copy link
Member

hero78119 commented May 22, 2023

Describe the feature you would like

part of the optimisation proposed during word lo/hi refactor

Additional context

No response

  • attach report to show column occupancy by cargo test -p zkevm-circuits --release get_exec_steps_occupancy --features test -- --nocapture --ignored
@lispc
Copy link
Collaborator

lispc commented May 22, 2023

there is already a u16 fixed lookup inside state circuit. So maybe we can refactor codes a bit so other sub curcuits can use that?

@hero78119
Copy link
Member Author

there is already a u16 fixed lookup inside state circuit. So maybe we can refactor codes a bit so other sub curcuits can use that?

Right, thanks for the heads up! I think u8/u16 defined in state circuit can all be reused with evm circuit (and maybe other circuit which need range check)

@ChihChengLiang ChihChengLiang linked a pull request Jun 22, 2023 that will close this issue
4 tasks
hero78119 added a commit that referenced this issue Jun 27, 2023
### Description

[_PR description_]

### Issue Link

Close
#1426
Depends by
#1414

### Type of change

- [x] Breaking change (fix or feature that would cause existing
functionality to not work as expected)

### Contents

- [x] constraint builder in evm circuit support u16 lookup
- [x] rename `byte_table` to `u8_table` and `query_byte` to `query_u8`
so it align with `query_u16` and so on in the future
- [x] refactor state circuit and evm circuit to reuse range table.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-feature Type: new features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants