mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
force activation of EIP-6780 (#338)
* force activation of EIP-6780 * rework the PR in a more manageable way
This commit is contained in:
parent
f46632148c
commit
7757a53d47
2 changed files with 8 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ func NewEVMInterpreter(evm *EVM) *EVMInterpreter {
|
||||||
switch {
|
switch {
|
||||||
case evm.chainRules.IsPrague:
|
case evm.chainRules.IsPrague:
|
||||||
// TODO replace with prooper instruction set when fork is specified
|
// TODO replace with prooper instruction set when fork is specified
|
||||||
table = &shanghaiInstructionSet
|
table = &pragueInstructionSet
|
||||||
case evm.chainRules.IsCancun:
|
case evm.chainRules.IsCancun:
|
||||||
table = &cancunInstructionSet
|
table = &cancunInstructionSet
|
||||||
case evm.chainRules.IsShanghai:
|
case evm.chainRules.IsShanghai:
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ var (
|
||||||
mergeInstructionSet = newMergeInstructionSet()
|
mergeInstructionSet = newMergeInstructionSet()
|
||||||
shanghaiInstructionSet = newShanghaiInstructionSet()
|
shanghaiInstructionSet = newShanghaiInstructionSet()
|
||||||
cancunInstructionSet = newCancunInstructionSet()
|
cancunInstructionSet = newCancunInstructionSet()
|
||||||
|
pragueInstructionSet = newPragueInstructionSet()
|
||||||
)
|
)
|
||||||
|
|
||||||
// JumpTable contains the EVM opcodes supported at a given fork.
|
// JumpTable contains the EVM opcodes supported at a given fork.
|
||||||
|
|
@ -80,6 +81,12 @@ func validate(jt JumpTable) JumpTable {
|
||||||
return jt
|
return jt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func newPragueInstructionSet() JumpTable {
|
||||||
|
instructionSet := newShanghaiInstructionSet()
|
||||||
|
enable6780(&instructionSet)
|
||||||
|
return validate(instructionSet)
|
||||||
|
}
|
||||||
|
|
||||||
func newCancunInstructionSet() JumpTable {
|
func newCancunInstructionSet() JumpTable {
|
||||||
instructionSet := newShanghaiInstructionSet()
|
instructionSet := newShanghaiInstructionSet()
|
||||||
enable4844(&instructionSet) // EIP-4844 (DATAHASH opcode)
|
enable4844(&instructionSet) // EIP-4844 (DATAHASH opcode)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue