-
Notifications
You must be signed in to change notification settings - Fork 856
[word lo/hi] retype table, common gadget and util design #1414
[word lo/hi] retype table, common gadget and util design #1414
Conversation
be74578
to
d89eef8
Compare
1897888
to
35ed6ef
Compare
35ed6ef
to
06fc97e
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.
Overall looks good! The only issue I found is that from the spec, an address in the CallContext is not split, so a conversion is needed when taking an address from CallContext and writing it to the Stack.
The other point is that I think it's convenient to have a Word assign method that takes an eth_types::Word
7accc46
to
36d9fe0
Compare
36d9fe0
to
5d3b219
Compare
@ed255 @hero78119 at this moment we have 3 equivalent types:
I think that it will be nice if we have a rule when using this types. I personally find it confusing the type WDYT? |
@adria0 it sounds good to me! I think we can do this change at once in another PR :) |
Update: support |
closed, as word partially migrate to #1441 |
### 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.
Description
Few fix to iterating utilities api.
Issue Link
#1388
Type of change
Contents
assign_lo_hi
, while lo, hi part support assign with different length of bytes respectively. Refer the use case inevm_circuit/execution/address.rs
,evm_circuit/execution/caller.rs
.rwtable.aux2
change toWord
type to fit committed valuelt_word
gadget usage fixMemoryAddressGadget
to fit EVM spec, for length = 0 thenoffset
can be arbitrary value still legal (even larger than 5 bytes, since it will be ignore).SstoreGasGadget
unnecessary assignment. For thecells/word
passed from constructor should be assigned by caller, not callee.How to test