refactor(specs,tests): Remove intrinsic state gas concept - #17
Merged
Conversation
…ests The two migrated delegation-pointer tests re-target an authority that already has a delegation and whose account nonce (1, from the delegation setup) no longer matches the authorization's nonce=0, so the authorization is invalid and charges no top-frame state gas. Setting writes_delegation/first_write to True added a phantom AUTH_BASE to state_gas_reservoir that was silently refunded, contradicting the AuthorizationTuple.first_write contract (False for invalid authorizations) and the spec's AUTH_BASE gate (not delegated_before_tx). Set both flags to False so the reserved state gas matches what the top frame actually charges, and reuse the single authorization object in test_delegation_pointer_new_account_state_gas instead of building a second inline tuple.
The execute plugin's _compute_deploy_gas_limit still called the removed transaction_intrinsic_state_gas, which failed mypy (and CI static). On every concrete fork that value was zero (BaseFork default, or forced to zero once EIP-2780 moves the created account's NEW_ACCOUNT to the top frame), and the intrinsic calculator already returns the regular-only cost, so the back-out was a no-op. Remove it, keeping the deploy gas limit unchanged.
Merged
2 tasks
gurukamath
merged commit Jul 9, 2026
6c5480c
into
gurukamath:eip-2780/process-auth-in-top-frame
14 of 25 checks passed
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.
Remove the "intrinsic state gas" concept from the Amsterdam fork. Under EIP-8037's two-dimensional gas model, the intrinsic cost was previously split into a
regularand astatecomponent, with the state portion accounting for account creation, storage set, and authorization state growth up front. In practice none of these costs are truly intrinsic: they all depend on the actual state touched during execution, so following EIP-2780 they are charged at the top frame instead. This series drops the now-redundant intrinsic state gas plumbing so the intrinsic cost is a singleregularvalue again.The change spans three layers:
Specs (
src/ethereum/forks/amsterdam/) —refactor(specs): Remove intrinsic state gas conceptstatefield fromIntrinsicGasCostand fold the recipient and authorization costs into a singleregularintrinsic value incalculate_intrinsic_cost.intrinsic_regular_gas/intrinsic_state_gasfromTransactionEnvironment, and stop seeding intrinsic state gas inprocess_transactionandprocess_unchecked_system_transaction. The transaction's state gas now comes solely fromtx_output.state_gas_used.Test forks (
packages/testing/) —refactor(test-forks): Remove intrinsic state gastransaction_intrinsic_state_gasclassmethod fromBaseForkand itsEIP2780/EIP8037overrides, which are no longer referenced now that these costs are computed at the top frame.Tests (
tests/amsterdam/) —fix(tests): Fix intrinsic state gas usages