mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-21 06:04:33 +00:00
core/vm: define cancun + enable 1153 (tstore/tload) in cancun (#27663)
This commit is contained in:
parent
07fd1c64cf
commit
240de84287
2 changed files with 7 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue