From 84febdddaebe4cb2542925f01c8ed9727a2d5d79 Mon Sep 17 00:00:00 2001 From: yihuang Date: Wed, 14 Jul 2021 19:10:31 +0800 Subject: [PATCH] evm: fix `ExtraEIP` activation (#288) Closes: #287 --- x/evm/types/params.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/x/evm/types/params.go b/x/evm/types/params.go index 327effb8..4584cf8c 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -24,6 +24,11 @@ var ( ParamStoreKeyEnableCall = []byte("EnableCall") ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs") ParamStoreKeyChainConfig = []byte("ChainConfig") + + // AvailableExtraEIPs define the list of all EIPs that can be enabled by the EVM interpreter. These EIPs are applied in + // order and can override the instruction sets from the latest hard fork enabled by the ChainConfig. For more info + // check: https://github.com/ethereum/go-ethereum/blob/v1.10.4/core/vm/interpreter.go#L122 + AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929} ) // ParamKeyTable returns the parameter key table. @@ -43,13 +48,14 @@ func NewParams(evmDenom string, enableCreate, enableCall bool, config ChainConfi } // DefaultParams returns default evm parameters +// ExtraEIPs is empty to prevent overriding the latest hard fork instruction set func DefaultParams() Params { return Params{ EvmDenom: DefaultEVMDenom, EnableCreate: true, EnableCall: true, - ExtraEIPs: []int64{2929, 2200, 1884, 1344}, ChainConfig: DefaultChainConfig(), + ExtraEIPs: nil, } }