forked from cerc-io/plugeth
Further changes to enable the shanghai fork as well as redefining the random opcode
This commit is contained in:
parent
2a41f9d36f
commit
98464ca463
@ -60,6 +60,11 @@ func NewEVMInterpreter(evm *EVM) *EVMInterpreter {
|
|||||||
table = &cancunInstructionSet
|
table = &cancunInstructionSet
|
||||||
case evm.chainRules.IsShanghai:
|
case evm.chainRules.IsShanghai:
|
||||||
table = &shanghaiInstructionSet
|
table = &shanghaiInstructionSet
|
||||||
|
// begin PluGeth injection
|
||||||
|
if !evm.chainRules.IsMerge {
|
||||||
|
table[RANDOM] = frontierInstructionSet[DIFFICULTY]
|
||||||
|
}
|
||||||
|
// end PluGeth injection
|
||||||
case evm.chainRules.IsMerge:
|
case evm.chainRules.IsMerge:
|
||||||
table = &mergeInstructionSet
|
table = &mergeInstructionSet
|
||||||
case evm.chainRules.IsLondon:
|
case evm.chainRules.IsLondon:
|
||||||
@ -72,10 +77,12 @@ func NewEVMInterpreter(evm *EVM) *EVMInterpreter {
|
|||||||
table = &constantinopleInstructionSet
|
table = &constantinopleInstructionSet
|
||||||
case evm.chainRules.IsByzantium:
|
case evm.chainRules.IsByzantium:
|
||||||
table = &byzantiumInstructionSet
|
table = &byzantiumInstructionSet
|
||||||
|
|
||||||
// begin PluGeth injection
|
// begin PluGeth injection
|
||||||
case evm.chainRules.IsEIP160:
|
case evm.chainRules.IsEIP160:
|
||||||
// end PluGeth injection
|
|
||||||
table = &spuriousDragonInstructionSet
|
table = &spuriousDragonInstructionSet
|
||||||
|
// end PluGeth injection
|
||||||
|
|
||||||
case evm.chainRules.IsEIP150:
|
case evm.chainRules.IsEIP150:
|
||||||
table = &tangerineWhistleInstructionSet
|
table = &tangerineWhistleInstructionSet
|
||||||
case evm.chainRules.IsHomestead:
|
case evm.chainRules.IsHomestead:
|
||||||
|
@ -933,7 +933,11 @@ func (c *ChainConfig) Rules(num *big.Int, isMerge bool, timestamp uint64) Rules
|
|||||||
IsBerlin: c.IsBerlin(num),
|
IsBerlin: c.IsBerlin(num),
|
||||||
IsLondon: c.IsLondon(num),
|
IsLondon: c.IsLondon(num),
|
||||||
IsMerge: isMerge,
|
IsMerge: isMerge,
|
||||||
IsShanghai: isMerge && c.IsShanghai(num, timestamp),
|
// IsShanghai: isMerge && c.IsShanghai(num, timestamp),
|
||||||
|
// the above is being commented and replaced with the plugeth code below to hotwire the chainrules to allow shanghai without the merge
|
||||||
|
// begin PluGeth injection
|
||||||
|
IsShanghai: c.IsShanghai(num, timestamp),
|
||||||
|
// end PluGeth injection
|
||||||
IsCancun: isMerge && c.IsCancun(num, timestamp),
|
IsCancun: isMerge && c.IsCancun(num, timestamp),
|
||||||
IsPrague: isMerge && c.IsPrague(num, timestamp),
|
IsPrague: isMerge && c.IsPrague(num, timestamp),
|
||||||
IsVerkle: isMerge && c.IsVerkle(num, timestamp),
|
IsVerkle: isMerge && c.IsVerkle(num, timestamp),
|
||||||
|
Loading…
Reference in New Issue
Block a user