Skip to content

Conversation

shane-moore
Copy link
Contributor

Changes

While reading through the EL specs section of the wiki, gas mechanics are mentioned throughout the page, so I figured it would be useful to have some examples that show how gas is deducted upfront, calcuated during the tsx, and then either burned/sent to proposer/refunded to tsx sender at different stages of the tsx lifecycle.

@shane-moore
Copy link
Contributor Author

@taxmeifyoucan @raxhvl, feel free to check out this PR whenever you get a chance ⚡

Copy link
Contributor

@taxmeifyoucan taxmeifyoucan left a comment

Choose a reason for hiding this comment

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

Thanks Shane, great addition!

I think it can be merged as is. Only suggestion that comes to mind is that comparison might be better readable as a table instead of bullet points, but I think it's ok

### Gas Accounting Examples
Up to this point, we've talked about EL post-merge gas mechanics in a variety of scenarios. Let's tie it all together with some examples.

Note: Gas parameters will differ depending upon if the contract was created before [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) was implemented.
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this should be based on tx type - whether user wallet is using 1559 or not.

What could be clearer here is that we have multiple types of transactions - legacy, 1559 and blob carrying

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hey @taxmeifyoucan @raxhvl, great point that the gas params differ based on tx type. I updated the PR to account for this in latest commit 6656bb3.

Additionally, I made the comparisons in the PR to be more tabular instead of bullet points. Def more readable

@shane-moore shane-moore force-pushed the chore/gas-examples branch from 9009e82 to 6656bb3 Compare May 19, 2025 00:12
@taxmeifyoucan taxmeifyoucan merged commit c65eebc into eth-protocol-fellows:main May 19, 2025
2 checks passed
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.

3 participants