Skip to content

core/state_transition.go

Type MOD
Upstream Lines 809
Changed +2 -2

Honour IsSpiral as an EIP-3860 activator in IntrinsicGas; rename IsLondon→IsEIP1559 in the EIP-1559 path

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 Core & EVM