core/vm: define cancun + enable 1153 (tstore/tload) in cancun (#27663)

This commit is contained in:
Martin Holst Swende
2023-07-10 14:40:31 -04:00
committed by GitHub
parent c2db667c8f
commit af8b138c1a
3 changed files with 23 additions and 3 deletions
+1
View File
@@ -83,6 +83,7 @@ func validate(jt JumpTable) JumpTable {
func newCancunInstructionSet() JumpTable {
instructionSet := newShanghaiInstructionSet()
enable4844(&instructionSet) // BLOBHASH opcode
enable1153(&instructionSet) // EIP-1153 "Transient Storage"
return validate(instructionSet)
}
+3 -3
View File
@@ -27,11 +27,11 @@ import (
func LookupInstructionSet(rules params.Rules) (JumpTable, error) {
switch {
case rules.IsVerkle:
return newShanghaiInstructionSet(), errors.New("verkle-fork not defined yet")
return newCancunInstructionSet(), errors.New("verkle-fork not defined yet")
case rules.IsPrague:
return newShanghaiInstructionSet(), errors.New("prague-fork not defined yet")
return newCancunInstructionSet(), errors.New("prague-fork not defined yet")
case rules.IsCancun:
return newShanghaiInstructionSet(), errors.New("cancun-fork not defined yet")
return newCancunInstructionSet(), nil
case rules.IsShanghai:
return newShanghaiInstructionSet(), nil
case rules.IsMerge: