This repository was archived by the owner on Apr 18, 2025. It is now read-only.
forked from privacy-ethereum/zkevm-circuits
-
Notifications
You must be signed in to change notification settings - Fork 389
feat: add sender balance check to begin-tx (EIP-1559) #1066
Merged
Conversation
This file contains hidden or 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
roynalnaruto
suggested changes
Jan 8, 2024
roynalnaruto
left a comment
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.
We need more test cases:
- Sender has sufficient balance (but exactly equal to
value + fee) - Sender has insufficient balance (exactly 1 less than
value + fee)
zkevm-circuits/src/evm_circuit/util/common_gadget/tx_eip1559.rs
Outdated
Show resolved
Hide resolved
lispc
approved these changes
Jan 11, 2024
Velaciela
pushed a commit
that referenced
this pull request
Jan 16, 2024
* Add balance check for gas fee (EIP-1559). * Fix CI with scroll feature. * Add more comments. * Add test case. * Delete duplicate fixes in tx circuit. * Replace `or::expr` with `sum::expr` to simplify for boolean expressions. * Update and add test cases. * Fix lint. * Disable tracing error cases for scroll feature.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
add
TxEip1559Gadgetto handle sender balance check in begin-tx. Could reference geth code and scroll l2geth code.update
tx_l1_fee_wordfromU64Wordtype toWordinTxL1FeeGadget. Since it's used as a word inAddWordsGadgetof TxEip1559Gadget.update
STEP_WIDTH(140 -> 141) andN_BYTE_LOOKUPS(26 -> 36) to make test pass. Since the new TxEip1559Gadget increases begin-tx gadget height and byte lookups (found when testing).Asana
https://app.asana.com/0/1202392035220922/1206015154508069/f