Skip to content

Conversation

nerolation
Copy link
Contributor

@SamWilsn
Copy link
Contributor

@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!

-------
verified : `ethereum.base_types.Uint`
The intrinsic cost of the transaction.
verified : `ethereum.base_types.Uint`
Copy link
Contributor

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`

@SamWilsn
Copy link
Contributor

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.

nerolation and others added 7 commits October 2, 2024 08:43
Co-authored-by: Tanishq Jasoria <jasoriatanishq@gmail.com>
Co-authored-by: Tanishq Jasoria <jasoriatanishq@gmail.com>
Co-authored-by: Tanishq Jasoria <jasoriatanishq@gmail.com>
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

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 <rokrassyuk@gmail.com>
Copy link
Member

@marioevz marioevz left a 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.

@petertdavies petertdavies changed the base branch from forks/prague to devnets/prague/5 December 9, 2024 13:26
Co-authored-by: Mario Vega <marioevz@gmail.com>
@gurukamath gurukamath merged commit 288d491 into ethereum:devnets/prague/5 Dec 17, 2024
4 checks passed
# Transactions with less gas used than the floor pay at the floor cost.
floor = Uint(tokens_in_calldata * FLOOR_CALLDATA_COST + TX_BASE_COST)
if gas_used < floor:
gas_used = floor
Copy link
Member

Choose a reason for hiding this comment

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

I believe this correction should be applied after the gas refund is applied. Argumentation and spec clarification here: ethereum/EIPs#9227.

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.

9 participants