mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 03:10:48 +00:00
core: fix divergence with spec and add clarity
This commit is contained in:
parent
3fa4bb4c40
commit
3f24128b89
3 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue