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

EVM Circuit: Refactor word_rlc into word lo/hi #1379

Closed
5 tasks
ed255 opened this issue May 3, 2023 · 3 comments · Fixed by #1411
Closed
5 tasks

EVM Circuit: Refactor word_rlc into word lo/hi #1379

ed255 opened this issue May 3, 2023 · 3 comments · Fixed by #1411
Assignees
Milestone

Comments

@ed255 ed255 added this to the word-hi-lo milestone May 3, 2023
@hero78119 hero78119 self-assigned this May 18, 2023
@hero78119
Copy link
Member

hero78119 commented May 21, 2023

@ed255 ed255 linked a pull request Jun 1, 2023 that will close this issue
8 tasks
hero78119 added a commit that referenced this issue Jun 20, 2023
### Description

This PR is based on
#1394
Need to merge
#1394
first before review this.

### Issue Link


#1379

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

### Contents

- [x] fixed most of op compiling errors other than `callop.rs` and
`begin_tx.rs`.
- [x] fixed `callop.rs` and `begin_tx.rs` 
- [x] remove all compatible workaround `construct_new` under evm circuit
- [x] unittest under evm circuit all pass `cargo test --features
warn-unimplemented --features test --package zkevm-circuits --lib --
evm_circuit::execution::`
- [x] fix few `word` gadgets generics to take `Word<T>` instead of `T`
to restrict it flexibility, since it's non sense to put type not related
to word
- [x] remove most of `deprecated` api under evm circuits
- [x] add IntDecomposition type as an alternative to
RandomLinearComposition, with base 256

### Cell utilization on main branch vs on word-lo-hi branch

#### Storage_1
```
Main:
+-----------------------------------+------------------------------+-------------------------+
| "storage_1" total_available_cells | "storage_1" total_used_cells | "storage_1" Utilization (%) |
+-----------------------------------+------------------------------+-------------------------+
| 25480                             | 6482                         | 25.4                    |
+-----------------------------------+------------------------------+-------------------------+

Word-lo-hi
+-----------------------------------+------------------------------+-----------------------------+
| "storage_1" total_available_cells | "storage_1" total_used_cells | "storage_1" Utilization (%) |
+-----------------------------------+------------------------------+-----------------------------+
| 24080                             | 7078                         | 29.4                        |
+-----------------------------------+------------------------------+-----------------------------+
```

#### Storage_2
```
Main
+-----------------------------------+------------------------------+-------------------------+
| "storage_2" total_available_cells | "storage_2" total_used_cells | "storage_2" Utilization |
+-----------------------------------+------------------------------+-------------------------+
| 1456                              | 467                          | 32.1                    |
+-----------------------------------+------------------------------+-------------------------+

Word-lo-hi
+-----------------------------------+------------------------------+-----------------------------+
| "storage_2" total_available_cells | "storage_2" total_used_cells | "storage_2" Utilization (%) |
+-----------------------------------+------------------------------+-----------------------------+
| 1376                              | 14                           | 1.0                         |
+-----------------------------------+------------------------------+-----------------------------+
```

#### Byte_lookup
```
Main

+-------------------------------------+--------------------------------+---------------------------+
| "byte_lookup" total_available_cells | "byte_lookup" total_used_cells | "byte_lookup" Utilization |
+-------------------------------------+--------------------------------+---------------------------+
| 8736                                | 6786                           | 77.7                      |
+-------------------------------------+--------------------------------+---------------------------+

Word-lo-hi
+-------------------------------------+--------------------------------+-------------------------------+
| "byte_lookup" total_available_cells | "byte_lookup" total_used_cells | "byte_lookup" Utilization (%) |
+-------------------------------------+--------------------------------+-------------------------------+
| 8256                                | 6566                           | 79.5                          |
+-------------------------------------+--------------------------------+-------------------------------+
```

---------

Co-authored-by: Wu Sung-Ming <[email protected]>
@ChihChengLiang
Copy link
Collaborator

@hero78119 Can we move the pending tasks listed here to #1487 and close this issue?

@hero78119
Copy link
Member

@hero78119 Can we move the pending tasks listed here to #1487 and close this issue?

Yes! I closed this issue and move related to #1487

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants