This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix soundness: share txid write lookup across step (#1719)
### Description This PR fix soundness by sharing txid write lookup between current step and next step ### Issue Link #1707 ### Type of change - [x] Bug fix (non-breaking change which fixes an issue) ### Design rationale Before fix, `cur_end_tx -> callcontext(txid, WRITE)` vs `next_begin_tx -> callcontext(txid, WRITE)` are meant to constraint `next_tx_id = cur_tx_id + 1`. However, because 2 callcontext write are different records in rw_table, so actually second record are under-constraint and tx_id can be manipulated. Because so far we do not have negative test framework. So this PR just simply adding a simple positive test to assure there is no consecutive tx_id write with SAME tx_id. If this fix make sense, will update zkevm-specs accordingly https://github.com/privacy-scaling-explorations/zkevm-specs/blob/master/src/zkevm_specs/evm_circuit/execution/end_tx.py#L71-L79
- Loading branch information
Showing
5 changed files
with
94 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters