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

State Circuit: Refactor word_rlc into word lo/hi #1382

Closed
ed255 opened this issue May 3, 2023 · 1 comment · Fixed by #1423
Closed

State Circuit: Refactor word_rlc into word lo/hi #1382

ed255 opened this issue May 3, 2023 · 1 comment · Fixed by #1423
Assignees
Milestone

Comments

@ed255
Copy link
Member

ed255 commented May 3, 2023

Specs: privacy-scaling-explorations/zkevm-specs#390

Depends on:

@ed255 ed255 added this to the word-hi-lo milestone May 3, 2023
@ed255 ed255 changed the title MPT Circuit: Refactor word_rlc into word lo/hi State Circuit: Refactor word_rlc into word lo/hi May 3, 2023
@adria0 adria0 self-assigned this May 17, 2023
@ed255 ed255 linked a pull request Jun 1, 2023 that will close this issue
adria0 added a commit that referenced this issue Jun 8, 2023
### Description

State Circuit: Refactor word_rlc into word lo/hi

### Issue Link

-
#1382

### Contents

- As expected, changing rlc encoded values into `word::Word`, as defined
in [`rw_table`
specs](https://github.com/privacy-scaling-explorations/zkevm-specs/blob/master/specs/tables.md#rw_table)
- Add helper methods to `ConstraintBuilder` (like `require_word_zero` )
- Make MPI able to manage multi-field values (to be able to use U256's)
- Remove `random_linear_combination.rs` because Word uses MPI instead
rlc
- Removed test focused on test rlc
- Removed unused field `aux1` and renamed `aux2` to `init_val`
- Added helper methods to `word::Word`
- Also updated `mpt` witness to pass the state tests

### Rationale

The lexicographic ordering, used word_rlc randomness for [another
use](https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/e3e6034a11349cb07dd08e88026e3ca40d771a66/zkevm-circuits/src/state_circuit/lexicographic_ordering.rs#L312).
Since this randomess is going to be removed, we have three options here:

- Use another method to build the constraints that does not uses rlc at
all
- Create another challenge value
- Use another existing randomness

In order to change only the code concerning hi/lo refactor, the choice
is to use the [keccak
randomness](https://github.com/privacy-scaling-explorations/zkevm-circuits/blob/e3e6034a11349cb07dd08e88026e3ca40d771a66/zkevm-circuits/src/state_circuit.rs#L97)
instead
@ChihChengLiang
Copy link
Collaborator

Fixed by #1423

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