Skip to content

core/state_transition.go — Version Comparison

v1.16.8 v1.17.3
Branch etc/v1.16.8-full-node etc/v1.17.3-full-node
Delta +3 -3 +2 -2
ETC delta on v1.16.8 (+3 -3)
diff --git a/core/state_transition.go b/core/state_transition.go
index bf5ac0763..3fa8d2b5b 100644
--- a/core/state_transition.go
+++ b/core/state_transition.go
@@ -338,7 +338,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 {
@@ -443,7 +443,7 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
    )

    // Check clauses 4-5, subtract intrinsic gas if everything is correct
-   gas, err := IntrinsicGas(msg.Data, msg.AccessList, msg.SetCodeAuthorizations, contractCreation, rules.IsHomestead, rules.IsIstanbul, rules.IsShanghai)
+   gas, err := IntrinsicGas(msg.Data, msg.AccessList, msg.SetCodeAuthorizations, contractCreation, rules.IsHomestead, rules.IsIstanbul, rules.IsShanghai || rules.IsSpiral)
    if err != nil {
        return nil, err
    }
@@ -483,7 +483,7 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
    }

    // Check whether the init code size has been exceeded.
-   if rules.IsShanghai && contractCreation && len(msg.Data) > params.MaxInitCodeSize {
+   if (rules.IsShanghai || rules.IsSpiral) && contractCreation && len(msg.Data) > params.MaxInitCodeSize {
        return nil, fmt.Errorf("%w: code size %v limit %v", ErrMaxInitCodeSizeExceeded, len(msg.Data), params.MaxInitCodeSize)
    }
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
    }

← Back to Version Comparison