Skip to content

core/state_transition.go — Version Comparison

v1.17.3 v1.17.4
Branch etc/v1.17.3-full-node etc/v1.17.4-full-node
Delta +2 -2 +3 -2
ETC delta on v1.17.3 (+2 -2)
diff --git a/core/state_transition.go b/core/state_transition.go
index fcd483eeb..564052eb0 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -462,7 +462,7 @@ func (st *stateTransition) preCheck() error {
        }
    }
    // Make sure that transaction gasFeeCap is greater than the baseFee (post london)
-   if st.evm.ChainConfig().IsLondon(st.evm.Context.BlockNumber) {
+   if st.evm.ChainConfig().IsEIP1559(st.evm.Context.BlockNumber) {
        // Skip the checks if gas fields are zero and baseFee was explicitly disabled (eth_call)
        skipCheck := st.evm.Config.NoBaseFee && msg.GasFeeCap.BitLen() == 0 && msg.GasTipCap.BitLen() == 0
        if !skipCheck {
@@ -558,7 +558,7 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
        floorDataGas     uint64
    )
    // Check clauses 4-5, subtract intrinsic gas if everything is correct
-   cost, err := IntrinsicGas(msg.Data, msg.AccessList, msg.SetCodeAuthorizations, contractCreation, rules.IsHomestead, rules.IsIstanbul, rules.IsShanghai, rules.IsAmsterdam)
+   cost, err := IntrinsicGas(msg.Data, msg.AccessList, msg.SetCodeAuthorizations, contractCreation, rules.IsHomestead, rules.IsIstanbul, rules.IsShanghai || rules.IsSpiral, rules.IsAmsterdam)
    if err != nil {
        return nil, err
    }
ETC delta on v1.17.4 (+3 -2)
diff --git a/core/state_transition.go b/core/state_transition.go
index dac812353..06117a062 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -112,7 +112,7 @@ func IntrinsicGas(data []byte, accessList types.AccessList, authList []types.Set
        }
        gas.RegularGas += z * params.TxDataZeroGas

-       if isContractCreation && rules.IsShanghai {
+       if isContractCreation && (rules.IsShanghai || rules.IsSpiral) {
            lenWords := toWordSize(dataLen)
            if (math.MaxUint64-gas.RegularGas)/params.InitCodeWordGas < lenWords {
                return vm.GasCosts{}, ErrGasUintOverflow
@@ -525,7 +525,7 @@ func (st *stateTransition) preCheck() error {
        }
    }
    // Make sure that transaction gasFeeCap is greater than the baseFee (post london)
-   if st.evm.ChainConfig().IsLondon(st.evm.Context.BlockNumber) {
+   if st.evm.ChainConfig().IsEIP1559(st.evm.Context.BlockNumber) {
        // Skip the checks if gas fields are zero and baseFee was explicitly disabled (eth_call)
        skipCheck := st.evm.Config.NoBaseFee && msg.GasFeeCap.BitLen() == 0 && msg.GasTipCap.BitLen() == 0
        if !skipCheck {
@@ -614,6 +614,7 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
        contractCreation = msg.To == nil
        floorDataGas     uint64
    )
+   // Check clauses 4-5, subtract intrinsic gas if everything is correct
    cost, err := IntrinsicGas(msg.Data, msg.AccessList, msg.SetCodeAuthorizations, contractCreation, rules, st.evm.Context.CostPerStateByte)
    if err != nil {
        return nil, err

← Back to Version Comparison