-
Notifications
You must be signed in to change notification settings - Fork 857
State Circuit: Refactor word_rlc into word lo/hi #1423
Conversation
…zkevm-circuits into statecircuit-lo-hi
Can we do a Clippy round before the review? |
Sure @ChihChengLiang! done in 8aa2148 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did first pass.
Would be great if we can fix the Rust fmt.
…zkevm-circuits into statecircuit-lo-hi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured out the address_change
function. I added some proposals for the rw_table.address
field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First round quick pass, it looks really nice to clean up many randomness in state circuit. Beside also replace aux1 aux2 with better naming! few other comments
I removed the review request for @ed255 since we have two reviewers here already. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finished reading all the diffs and added more comments.
} | ||
|
||
impl ToLimbs<N_LIMBS_RW_COUNTER> for u32 { | ||
fn to_limbs(&self) -> [u16; 2] { | ||
fn to_limbs(&self) -> [u16; N_LIMBS_RW_COUNTER] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should rename N_LIMBS_RW_COUNTER
to N_LIMBS_U32
. But probably not in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, why not 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I finished reading all the diffs and added more comments.
…zkevm-circuits into statecircuit-lo-hi
df37cff
to
dcade9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after addressing @hero78119's comments. Great word adding lo-hi and cleaning up this big chunk of the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All LGTM!! Few discussion can be moved to discuss in separate issue
Description
State Circuit: Refactor word_rlc into word lo/hi
This PR does not compile for itself, anyway the changes introduced in this PR passes the state circuit tests in another branch
Issue Link
Contents
word::Word
, as defined inrw_table
specsConstraintBuilder
(likerequire_word_zero
)random_linear_combination.rs
because Word uses MPI instead rlcaux1
and renamedaux2
toinit_val
word::Word
mpt
witness to pass the state testsRationale
The lexicographic ordering, used word_rlc randomness for another use. Since this randomess is going to be removed, we have three options here:
In order to change only the code concerning hi/lo refactor, the choice is to use the keccak randomness instead