fix tag byte overlap issue #520#523
Conversation
|
you may need to update the comments here too? https://github.com/appliedzkp/zkevm-circuits/blob/1b1456609cd6ac9eb54575cdb60a098af3bbe0e5/zkevm-circuits/src/state_circuit/lexicographic_ordering.rs#L16 especially: |
|
@DreamWuGit if you change field tag to 5 bits, the total bits will not be 480 bits? 481 bits? Or reduce 1 bit from some other key? |
|
For the proofs to verify and the tests to pass, you need to update As written, the extra bit comes from the second most significant byte of the id. The maximum value of id we can handle after this change will only be 2^16 - 1. |
481 bits seem ok to me , will check with Mason if he has another idea ! |
|
481 bits need 31 16bit limbs. And much refactor needed... Better keep 480bits i think |
|
this still keeps it to 480 bits, so 2 field elements. |
|
@miha-stopar could you have a look ? |
miha-stopar
left a comment
There was a problem hiding this comment.
Looks cool to me, I would just perhaps add a couple of comments to make it more easy to understand the idea.
icemelon
left a comment
There was a problem hiding this comment.
LGTM. minor revise on the comment.
minor update for comment Co-authored-by: Haichen Shen <shenhaichen@gmail.com>
this PR try to fix issue #520