mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 11:20:45 +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
|
track.written = true
|
||||||
}
|
}
|
||||||
// Durable state growth of the new account
|
// 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
|
cost.StateGas += params.AccountCreationSize * st.evm.Context.CostPerStateByte
|
||||||
}
|
}
|
||||||
// Charge the net-new indicator bytes at most once per authority;
|
// 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.
|
// EIP-7702 delegation check.
|
||||||
if target, ok := types.ParseDelegation(evm.StateDB.GetCode(addr)); ok {
|
if target, ok := types.ParseDelegation(evm.StateDB.GetCode(addr)); ok {
|
||||||
if evm.StateDB.AddressInAccessList(target) {
|
if evm.StateDB.AddressInAccessList(target) {
|
||||||
eip7702Cost = params.WarmStorageReadCostEIP2929
|
eip7702Cost = params.WarmAccountAccessAmsterdam
|
||||||
} else {
|
} else {
|
||||||
evm.StateDB.AddAddressToAccessList(target)
|
evm.StateDB.AddAddressToAccessList(target)
|
||||||
eip7702Cost = coldCost
|
eip7702Cost = coldCost
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,8 @@ func (tt *TransactionTest) Run() error {
|
||||||
{"Shanghai", true},
|
{"Shanghai", true},
|
||||||
{"Cancun", true},
|
{"Cancun", true},
|
||||||
{"Prague", true},
|
{"Prague", true},
|
||||||
|
{"Osaka", true},
|
||||||
|
{"Amsterdam", true},
|
||||||
} {
|
} {
|
||||||
expected := tt.Result[testcase.name]
|
expected := tt.Result[testcase.name]
|
||||||
if expected == nil {
|
if expected == nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue