-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add EIP-7623 #966
Add EIP-7623 #966
Conversation
@nerolation I rebased this pull request on the new |
src/ethereum/prague/fork.py
Outdated
@@ -936,14 +948,19 @@ def calculate_intrinsic_cost(tx: Transaction) -> Uint: | |||
------- | |||
verified : `ethereum.base_types.Uint` | |||
The intrinsic cost of the transaction. | |||
verified : `ethereum.base_types.Uint` |
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.
verified : `ethereum.base_types.Uint` | |
tokens_in_calldata : `ethereum.base_types.Uint` |
I think there are a few errors in there. Personally, I use |
Co-authored-by: Tanishq Jasoria <jasoriatanishq@gmail.com>
Co-authored-by: Tanishq Jasoria <jasoriatanishq@gmail.com>
Co-authored-by: Tanishq Jasoria <jasoriatanishq@gmail.com>
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 should do intrinsic/floor checks against gas limit during transaction validation
src/ethereum/prague/fork.py
Outdated
# Transactions with less gas used than the floor pay at the floor cost. | ||
if gas_used < floor: | ||
gas_used = floor |
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.
there is a risk here that sender's balance is less than the floor, because we did not charge the floor as part of the intrinsic gas
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 check against gas limit at the start and user always have enough balance to pay for the gas limit and floor < gas limit for the transaction
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.
right
lgtm Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
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! I think this should go first to devnets/prague/5
so we can generate tests.
Co-authored-by: Mario Vega <marioevz@gmail.com>
Add EIP-7623: Increase Calldata Cost