feat(spec-specs, spec-tests): add EIP-7778 block gas accounting without refunds#2840
feat(spec-specs, spec-tests): add EIP-7778 block gas accounting without refunds#2840LouisTsai-Csie wants to merge 14 commits into
Conversation
forks/amsterdam
forks/amsterdamforks/amsterdam
forks/amsterdam
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2840 +/- ##
================================================
Coverage 90.01% 90.01%
================================================
Files 539 539
Lines 32618 32621 +3
Branches 3030 3030
================================================
+ Hits 29361 29364 +3
Misses 2699 2699
Partials 558 558
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…unds (#1401) * feat(specs): add eip-7778 implementation * fix(specs) spliting receipt gas from block gas * revert receipt_gas_used * make sure that the calldata floor cost overwrites the tx gas before refund * receipt gas used after refunds * clarify variable naming @gurukamath * revert to using gas used after refunds for cumulative gas in receipt and add gasSpent to receipt * spec(amsterdam): fix code formatting --------- Co-authored-by: Guruprasad Kamath <guru241987@gmail.com>
* fix(tests): fix legacy tests to run with eip-7778 * fix(tests): check gas_spent and gas_used after Amsterdam
* feat(spec-tests): add eip-7778 for calldata checks * feat(spec-tests): post review - use code gas_cost function Co-authored-by: Louis Tsai <72684086+LouisTsai-Csie@users.noreply.github.com> * Apply suggestions from code review --------- Co-authored-by: Louis Tsai <72684086+LouisTsai-Csie@users.noreply.github.com> Co-authored-by: Mario Vega <marioevz@gmail.com>
The set iteration in `build_refund_tx` is non-deterministic due to Python's hash randomization, causing fixture output to vary between runs. Sort by enum value to ensure reproducible fixtures.
|
I want to do a follow-up PR to remove |
8ec956b to
dc52b58
Compare
|
Some missing cases that we could do as follow-up PRs:
|
danceratopz
left a comment
There was a problem hiding this comment.
Couple of small comments.
| authorization_list=authorization_list, | ||
| expected_receipt={ | ||
| "gas_used": refund_tx_gas_used, | ||
| }, |
There was a problem hiding this comment.
I think this is currently only a no-op. It only effects fill verification; the fixtures remain unchanged.
| }, | |
| expected_receipt={ | |
| "cumulative_gas_used": refund_tx_gas_used, | |
| }, |
The gas_used field does not exist in the transition tool:
execution-specs/src/ethereum/forks/amsterdam/blocks.py
Lines 347 to 382 in 9d88e40
This requires a follow-up issue to detect in the helper. I will follow-up.
There was a problem hiding this comment.
I am not sure if i fully understand this issue, could you please create an issue for tracking?
| expected_receipt={ | ||
| "gas_used": refund_tx_gas_used + extra_tx_intrinsic_gas_cost, | ||
| }, |
There was a problem hiding this comment.
Same issue here as above:
| expected_receipt={ | |
| "gas_used": refund_tx_gas_used + extra_tx_intrinsic_gas_cost, | |
| }, | |
| "cumulative_gas_used": ( | |
| refund_tx_gas_used + extra_tx_intrinsic_gas_cost | |
| ), |
🗒️ Description
Merge changes necessary for implementing EIP-7778 into the
forks/amsterdambranch.This PR targets the EIP-7778 spec from ethereum/EIPs@3929b1a.
🔗 Related Issues or PRs
forks/amsterdam#2846✅ Checklist
just statictype(scope):.mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.Cute Animal Picture