Skip to content
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

Open
wants to merge 8 commits into
base: forks/prague
Choose a base branch
from
Open

Conversation

nerolation
Copy link

@SamWilsn
Copy link
Collaborator

@nerolation I rebased this pull request on the new forks/prague. I believe everything is in order, but another pair of eyes couldn't hurt!

@@ -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`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
verified : `ethereum.base_types.Uint`
tokens_in_calldata : `ethereum.base_types.Uint`

src/ethereum/prague/fork.py Outdated Show resolved Hide resolved
@SamWilsn
Copy link
Collaborator

I think there are a few errors in there. process_system_transaction disappeared?

Personally, I use tox -e static as a sanity check before committing, just to make sure everything at least appears plausibly correct.

src/ethereum/prague/fork.py Outdated Show resolved Hide resolved
src/ethereum/prague/fork.py Outdated Show resolved Hide resolved
src/ethereum/prague/fork.py Outdated Show resolved Hide resolved
src/ethereum/prague/fork.py Outdated Show resolved Hide resolved
Copy link

@rkrasiuk rkrasiuk left a 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 Show resolved Hide resolved
src/ethereum/prague/fork.py Outdated Show resolved Hide resolved
Comment on lines +979 to +981
# Transactions with less gas used than the floor pay at the floor cost.
if gas_used < floor:
gas_used = floor
Copy link

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

Copy link

@tanishqjasoria tanishqjasoria Oct 3, 2024

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

Copy link

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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants