feat(fork-types): add ExecutionGas and StateGas NewType wrappers to amsterdam EVM - #3121
Open
mandeepmourya007 wants to merge 1 commit into
Open
Conversation
spencer-tb
force-pushed
the
refactor/gas-newtypes
branch
from
July 30, 2026 12:59
546a7e6 to
356a1a8
Compare
Contributor
|
@gurukamath I updated this PR with the Should we add this and do we need to backport the execution gas change? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #3121 +/- ##
================================================
Coverage 93.42% 93.42%
================================================
Files 625 625
Lines 37032 37033 +1
Branches 3385 3385
================================================
+ Hits 34597 34598 +1
Misses 1666 1666
Partials 769 769
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Applies the
ExecutionGasandStateGasNewTypewrappers (introduced infork_types.pyby #3037) to all EVM gas fields and constants across theamsterdam fork, preventing accidental mixing of state gas with execution gas
at the type level.
Changes:
GasCostsconstants typed asExecutionGas(blob-fee, byte-count andblock-limit constants stay
Uint);StateGasCostsalready typed asStateGasGasMeterfields typed:gas_left,state_gas_left,state_gas_baseline,state_gas_spilled,state_gas_committed_spillMessage,TransactionEnvironment,MessageCallOutput,GenericCall,MessageCallGasandExtendMemorygas fields typedEvmGasAllocationand the per-dimensionTransactionGasSettlementfieldstyped
charge_state_gas, spillcommit/restore,
withhold_create_gas,drain_state_gas_reservoir,restore_child_gas,tx_state_gas_used),max_message_call_gas,calculate_delegation_costandsettle_transaction_gasRebased onto
forks/amsterdamafter the regular→execution gas rename(#3238, #3263) and the
GasMeterrefactor, so the wrapper is now namedExecutionGasand the typing covers the meter and settlement helpers.Related Issues or PRs
Closes #3015. Follows on from #3037.
Checklist
just static<type>(<area>): <title>, where<type>and<area>come from an appropriateC-<type>, respectivelyA-<area>, label. The title should match the target squash commit message.Cute Animal Picture