core: fix divergence with spec and add clarity

This commit is contained in:
MariusVanDerWijden 2026-07-13 11:52:57 +02:00
parent 3fa4bb4c40
commit 3f24128b89
No known key found for this signature in database
3 changed files with 4 additions and 2 deletions

View file

@ -1079,7 +1079,7 @@ func (st *stateTransition) applyAuthorization(rules params.Rules, auth *types.Se
track.written = true
}
// Durable state growth of the new account
if st.state.Empty(authority) {
if !st.state.Exist(authority) {
cost.StateGas += params.AccountCreationSize * st.evm.Context.CostPerStateByte
}
// Charge the net-new indicator bytes at most once per authority;

View file

@ -493,7 +493,7 @@ func makeCallVariantGasCallEIP8037(regularFunc regularGasFunc, stateGasFunc stat
// EIP-7702 delegation check.
if target, ok := types.ParseDelegation(evm.StateDB.GetCode(addr)); ok {
if evm.StateDB.AddressInAccessList(target) {
eip7702Cost = params.WarmStorageReadCostEIP2929
eip7702Cost = params.WarmAccountAccessAmsterdam
} else {
evm.StateDB.AddAddressToAccessList(target)
eip7702Cost = coldCost

View file

@ -125,6 +125,8 @@ func (tt *TransactionTest) Run() error {
{"Shanghai", true},
{"Cancun", true},
{"Prague", true},
{"Osaka", true},
{"Amsterdam", true},
} {
expected := tt.Result[testcase.name]
if expected == nil {