-
Notifications
You must be signed in to change notification settings - Fork 854
Conversation
Depends on #1554 |
Run I tried rebasing on #1585, but it didn't fix it. Need more investigation |
@ed255 i think the check itself may not be right? i checked the failed case, it indeed first do a Rw { is_write: true, filed: CodeHash, prev_value: 0x0, value: keccak(nil) }, then Rw { is_write: true, filed: Balance, prev_value: 0x0, value: 0x0 }. I think this pattern is right, should not be rejected. Btw i made a change for this. Here i distinguish on "empty account" and "empty account but been created(writen codehash) " https://github.com/scroll-tech/zkevm-circuits/pull/819/files |
I see an issue in this pattern. Currently the EndTx is doing the following in this case
After this we end up with an account in the state that is empty, so technically it shouldn't exist. This account should not exists as a leaf in the MPT, because it's empty. I believe this can be solved in two ways: I'm more favorable towards option b, because it's easy to add this logic to the EVM gadgets. For example take a look at how a transfer is handled in callop:
If the account doesn't exist but the transfer value is 0, the account is not created. I think we should treat the coinbase transfer in EndTx the same way. Something like this:
What do you think about this @lispc ? |
Totally agree. We will change this |
There is already a |
The "update branch" button disappeared? |
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
### Description fix end_tx circuit coinbase transfer ### Issue Link https://github.com/privacy-scaling-explorations/zkevm-circuits/actions/runs/6180463331/job/16776966002?pr=1581 ### Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ### Contents - add rw_delta to TransferTo ### Rationale N/A ### How Has This Been Tested? previous failed unit test passed
078f2b1
to
cdf2fcd
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. (Shamelessly pat myself on the back)
I helped Adria to address the feedback because he couldn't reach his device recently due to personal reasons.
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!
Description
This PR updates the testool
Type of change
Contents