From 9603d9547ca6180f783dc762974eb52eafc0f288 Mon Sep 17 00:00:00 2001 From: lightclient Date: Tue, 10 Jun 2025 15:43:52 +0200 Subject: [PATCH] all: add osaka instruction set --- core/vm/interpreter.go | 2 ++ core/vm/jump_table.go | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go index d0e5967e6e..bd499750eb 100644 --- a/core/vm/interpreter.go +++ b/core/vm/interpreter.go @@ -109,6 +109,8 @@ func NewEVMInterpreter(evm *EVM) *EVMInterpreter { case evm.chainRules.IsVerkle: // TODO replace with proper instruction set when fork is specified table = &verkleInstructionSet + case evm.chainRules.IsOsaka: + table = &osakaInstructionSet case evm.chainRules.IsPrague: table = &pragueInstructionSet case evm.chainRules.IsCancun: diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go index 17ac738c98..bb2e40d2b3 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. @@ -91,6 +92,12 @@ func newVerkleInstructionSet() JumpTable { return validate(instructionSet) } +func newOsakaInstructionSet() JumpTable { + instructionSet := newPragueInstructionSet() + enable7907(&instructionSet) + return validate(instructionSet) +} + func newPragueInstructionSet() JumpTable { instructionSet := newCancunInstructionSet() enable7702(&instructionSet) // EIP-7702 Setcode transaction type