Skip to content

CheckMaxInitCodeSize (Spiral)

Source (upstream v1.17.3) Current
File core/vm/common.go common.go
Symbol CheckMaxInitCodeSize CheckMaxInitCodeSize
Ref v1.17.3 etc/v1.17.3-full-node

Modified in-place on upstream v1.17.3: added || rules.IsSpiral to init code size check. ETC Spiral activates EIP-3860 (max init code size) without activating full Shanghai. In v1.16.8 this was inline in state_transition.go and validation.go; v1.17.2 refactored it to this function.

Diff — vs upstream v1.17.3 (modified in-place)

--- a/core/vm/common.go
+++ b/core/vm/common.go
@@ -4,7 +4,7 @@
        if size > params.MaxInitCodeSizeAmsterdam {
            return fmt.Errorf("%w: code size %v limit %v", ErrMaxInitCodeSizeExceeded, size, params.MaxInitCodeSizeAmsterdam)
        }
-   } else if rules.IsShanghai {
+   } else if rules.IsShanghai || rules.IsSpiral {
        if size > params.MaxInitCodeSize {
            return fmt.Errorf("%w: code size %v limit %v", ErrMaxInitCodeSizeExceeded, size, params.MaxInitCodeSize)
        }

← Core & EVM