evm: fix ExtraEIP activation (#288)

Closes: #287
This commit is contained in:
yihuang 2021-07-14 19:10:31 +08:00 committed by GitHub
parent aab793e7f4
commit 84febdddae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
}
}