diff --git a/core/vm/jump_table.go b/core/vm/jump_table.go index fc4b9b8521..6df1e80e80 100644 --- a/core/vm/jump_table.go +++ b/core/vm/jump_table.go @@ -80,6 +80,12 @@ func validate(jt JumpTable) JumpTable { return jt } +func newCancunInstructionSet() JumpTable { + instructionSet := newEip1559InstructionSet() + enable1153(&instructionSet) // EIP-1153 "Transient Storage" + return validate(instructionSet) +} + func newEip1559InstructionSet() JumpTable { instructionSet := newShanghaiInstructionSet() enable2929(&instructionSet) // Gas cost increases for state access opcodes https://eips.ethereum.org/EIPS/eip-2929 diff --git a/core/vm/jump_table_export.go b/core/vm/jump_table_export.go index 60a1340985..b86c2a0116 100644 --- a/core/vm/jump_table_export.go +++ b/core/vm/jump_table_export.go @@ -17,8 +17,6 @@ package vm import ( - "errors" - "github.com/XinFinOrg/XDPoSChain/params" ) @@ -27,7 +25,7 @@ import ( func LookupInstructionSet(rules params.Rules) (JumpTable, error) { switch { case rules.IsCancun: - return newEip1559InstructionSet(), errors.New("cancun-fork not defined yet") + return newCancunInstructionSet(), nil case rules.IsEIP1559: return newEip1559InstructionSet(), nil case rules.IsShanghai: