From 153372543ec53e670359bad95176f0c2d2d1f79c Mon Sep 17 00:00:00 2001 From: spencer-tb Date: Fri, 13 Jun 2025 14:33:15 +0200 Subject: [PATCH] core/vm: fix integration of EIP-7939 (CLZ) --- core/vm/eips.go | 1 + core/vm/interpreter.go | 2 ++ core/vm/jump_table.go | 1 + 3 files changed, 4 insertions(+) diff --git a/core/vm/eips.go b/core/vm/eips.go index 774fadcfe9..197b64dac5 100644 --- a/core/vm/eips.go +++ b/core/vm/eips.go @@ -41,6 +41,7 @@ var activators = map[int]func(*JumpTable){ 1153: enable1153, 4762: enable4762, 7702: enable7702, + 7939: enable7939, } // EnableEIP enables the given EIP on the config. diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go index d0e5967e6e..12f633ce95 100644 --- a/core/vm/interpreter.go +++ b/core/vm/interpreter.go @@ -106,6 +106,8 @@ func NewEVMInterpreter(evm *EVM) *EVMInterpreter { // If jump table was not initialised we set the default one. var table *JumpTable switch { + case evm.chainRules.IsOsaka: + table = &osakaInstructionSet case evm.chainRules.IsVerkle: // TODO replace with proper instruction set when fork is specified table = &verkleInstructionSet diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go index d09bf717c3..22eed8754f 100644 --- a/core/vm/jump_table.go +++ b/core/vm/jump_table.go @@ -62,6 +62,7 @@ var ( cancunInstructionSet = newCancunInstructionSet() verkleInstructionSet = newVerkleInstructionSet() pragueInstructionSet = newPragueInstructionSet() + osakaInstructionSet = newOsakaInstructionSet() ) // JumpTable contains the EVM opcodes supported at a given fork.