Skip to content

Commit 50714c4

Browse files
committed
all: add osaka instruction set
1 parent cb91f91 commit 50714c4

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

core/vm/interpreter.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ func NewEVMInterpreter(evm *EVM) *EVMInterpreter {
109109
case evm.chainRules.IsVerkle:
110110
// TODO replace with proper instruction set when fork is specified
111111
table = &verkleInstructionSet
112+
case evm.chainRules.IsOsaka:
113+
table = &osakaInstructionSet
112114
case evm.chainRules.IsPrague:
113115
table = &pragueInstructionSet
114116
case evm.chainRules.IsCancun:

core/vm/jump_table.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ var (
6262
cancunInstructionSet = newCancunInstructionSet()
6363
verkleInstructionSet = newVerkleInstructionSet()
6464
pragueInstructionSet = newPragueInstructionSet()
65+
osakaInstructionSet = newOsakaInstructionSet()
6566
eofInstructionSet = newEOFInstructionSetForTesting()
6667
)
6768

@@ -102,6 +103,12 @@ func newEOFInstructionSetForTesting() JumpTable {
102103
return validate(instructionSet)
103104
}
104105

106+
func newOsakaInstructionSet() JumpTable {
107+
instructionSet := newPragueInstructionSet()
108+
enable7907(&instructionSet)
109+
return validate(instructionSet)
110+
}
111+
105112
func newPragueInstructionSet() JumpTable {
106113
instructionSet := newCancunInstructionSet()
107114
enable7702(&instructionSet) // EIP-7702 Setcode transaction type

params/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,15 @@ var (
296296
ShanghaiTime: newUint64(0),
297297
CancunTime: newUint64(0),
298298
PragueTime: newUint64(0),
299-
OsakaTime: nil,
299+
OsakaTime: newUint64(0),
300300
VerkleTime: nil,
301301
TerminalTotalDifficulty: big.NewInt(0),
302302
Ethash: new(EthashConfig),
303303
Clique: nil,
304304
BlobScheduleConfig: &BlobScheduleConfig{
305305
Cancun: DefaultCancunBlobConfig,
306306
Prague: DefaultPragueBlobConfig,
307+
Osaka: DefaultPragueBlobConfig,
307308
},
308309
}
309310

0 commit comments

Comments
 (0)