fix issue #224 : add field_tag into address representation#227
fix issue #224 : add field_tag into address representation#227DreamWuGit wants to merge 2 commits into
Conversation
|
@z2trillion @ed255 could you have a look ? |
ed255
left a comment
There was a problem hiding this comment.
LGTM!
I think this is a nice solution for the issue :). Now the order of fields of a TxLog is set so that it can follow the lexicographic ordering without scrambling rows, because following this approach field_tag will have higher precedence than index (which was not the case if address = log_id || index). And since the address is also represented as 16 bit limbs columns in the state circuit, we can still do checks on log_id, field_tag and index individually without any penalty.
|
Isn't the ordering unchanged with this packing? Previously it was: and with this change it will be which is equivalent? (This is all in a world where privacy-ethereum/zkevm-circuits#566 gets merged in and restores the sort order of the keys to be key1, key2, key3, key4). |
This is correct, from the spec point of view. But in between we currently have this in the circuits: AFAIK the aim here was to remove the
NOTE: I haven't taken a look yet at that PR. |
|
I merged this PR change into #220 , closing this, any concern can discuss there if you have. |
Try to resolve issue #224