refactor(params): store all params under one key in evm module (backport #1617) (#1626)

* refactor(params): store all params under one key in evm module (#1617)

* refactor(params): store all params under one key in evm module

* refactor(params): add changelog entry

* refactor(params): update based on review comments. Remove params getter functions

* refactor(params): refactor params store key

* refactor(params): remove unnecessary store keys

* refactor(params): add paramSetPairs for backwards compatibility

* Update CHANGELOG.md

* refactor(params): add license to params_legacy file

* Apply suggestions from code review

* fix(evm): handle RC1 params during migration (#1624)

* fix(evm): handle RC1 params during migration

* migration

* fix: test case updated for RC1

* v5 migration

* tests

* tests pt2

* comment

* execute make proto-all

Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com>
Co-authored-by: MalteHerrmann <malte@evmos.org>

* Apply suggestions from code review

* rm dup vars

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com>
Co-authored-by: MalteHerrmann <malte@evmos.org>
(cherry picked from commit f07b14f1c409a6b738a0fadb50c9ba47d56cb821)

# Conflicts:
#	CHANGELOG.md

* update changelog

Co-authored-by: Tomas Guerra <54514587+GAtom22@users.noreply.github.com>
Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
Co-authored-by: MalteHerrmann <malte@evmos.org>
This commit is contained in:
mergify[bot] 2023-01-23 20:01:28 +01:00 committed by GitHub
parent 00b0d4411f
commit 4f48176298
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 1315 additions and 1386 deletions

View File

@ -36,7 +36,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
# Changelog
## [v0.21.0-rc2] - 2022-01-20
## [v0.21.0-rc2] - 2022-01-23
### State Machine Breaking
@ -52,6 +52,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (deps) [#1532](https://github.com/evmos/ethermint/pull/1532) Upgrade Go-Ethereum version to [`v1.10.26`](https://github.com/ethereum/go-ethereum/releases/tag/v1.10.26).
### Bug Fixes
* (upgrade) [#1617](https://github.com/evmos/ethermint/pull/1617) Refactor `evm` module's parameters to store them under a single store key
* (rpc) [#1600](https://github.com/evmos/ethermint/pull/1600) Revert changes from `TypedEvents`
* (rpc) [#1613](https://github.com/evmos/ethermint/pull/1613) Change the default json-rpc listen address to localhost.
* (rpc) [#1611](https://github.com/evmos/ethermint/pull/1611) Add missing next fee in fee history, fix wrong oldestBlock and align earliest input as ethereum.

View File

@ -149,7 +149,8 @@ func (egcd EthGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula
return next(newCtx, tx, simulate)
}
chainCfg := egcd.evmKeeper.GetChainConfig(ctx)
evmParams := egcd.evmKeeper.GetParams(ctx)
chainCfg := evmParams.GetChainConfig()
ethCfg := chainCfg.EthereumConfig(egcd.evmKeeper.ChainID())
blockHeight := big.NewInt(ctx.BlockHeight())
@ -183,7 +184,7 @@ func (egcd EthGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula
gasWanted += txData.GetGas()
}
evmDenom := egcd.evmKeeper.GetEVMDenom(ctx)
evmDenom := evmParams.GetEvmDenom()
fees, err := keeper.VerifyFee(txData, evmDenom, baseFee, homestead, istanbul, ctx.IsCheckTx())
if err != nil {

View File

@ -42,7 +42,8 @@ func NewGasWantedDecorator(
}
func (gwd GasWantedDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) {
chainCfg := gwd.evmKeeper.GetChainConfig(ctx)
evmParams := gwd.evmKeeper.GetParams(ctx)
chainCfg := evmParams.GetChainConfig()
ethCfg := chainCfg.EthereumConfig(gwd.evmKeeper.ChainID())
blockHeight := big.NewInt(ctx.BlockHeight())

View File

@ -88,8 +88,8 @@ func (mpd MinGasPriceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate
if minGasPrice.IsZero() || simulate {
return next(ctx, tx, simulate)
}
evmDenom := mpd.evmKeeper.GetEVMDenom(ctx)
evmParams := mpd.evmKeeper.GetParams(ctx)
evmDenom := evmParams.GetEvmDenom()
minGasPrices := sdk.DecCoins{
{
Denom: evmDenom,
@ -133,7 +133,8 @@ func (empd EthMinGasPriceDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simul
return next(ctx, tx, simulate)
}
chainCfg := empd.evmKeeper.GetChainConfig(ctx)
evmParams := empd.evmKeeper.GetParams(ctx)
chainCfg := evmParams.GetChainConfig()
ethCfg := chainCfg.EthereumConfig(empd.evmKeeper.ChainID())
baseFee := empd.evmKeeper.GetBaseFee(ctx, ethCfg)
@ -191,7 +192,8 @@ func (mfd EthMempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulat
if !ctx.IsCheckTx() || simulate {
return next(ctx, tx, simulate)
}
chainCfg := mfd.evmKeeper.GetChainConfig(ctx)
evmParams := mfd.evmKeeper.GetParams(ctx)
chainCfg := evmParams.GetChainConfig()
ethCfg := chainCfg.EthereumConfig(mfd.evmKeeper.ChainID())
baseFee := mfd.evmKeeper.GetBaseFee(ctx, ethCfg)
@ -200,7 +202,7 @@ func (mfd EthMempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulat
return next(ctx, tx, simulate)
}
evmDenom := mfd.evmKeeper.GetEVMDenom(ctx)
evmDenom := evmParams.GetEvmDenom()
minGasPrice := ctx.MinGasPrices().AmountOf(evmDenom)
for _, msg := range tx.GetMsgs() {

View File

@ -49,11 +49,7 @@ type EVMKeeper interface {
GetBalance(ctx sdk.Context, addr common.Address) *big.Int
ResetTransientGasUsed(ctx sdk.Context)
GetTxIndexTransient(ctx sdk.Context) uint64
GetChainConfig(ctx sdk.Context) evmtypes.ChainConfig
GetAllowUnprotectedTxs(ctx sdk.Context) bool
GetEVMDenom(ctx sdk.Context) string
GetEnableCall(ctx sdk.Context) bool
GetEnableCreate(ctx sdk.Context) bool
GetParams(ctx sdk.Context) evmtypes.Params
}
type protoTxProvider interface {

View File

@ -152,13 +152,14 @@ func (vbd EthValidateBasicDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simu
txFee := sdk.Coins{}
txGasLimit := uint64(0)
chainCfg := vbd.evmKeeper.GetChainConfig(ctx)
evmParams := vbd.evmKeeper.GetParams(ctx)
chainCfg := evmParams.GetChainConfig()
chainID := vbd.evmKeeper.ChainID()
ethCfg := chainCfg.EthereumConfig(chainID)
baseFee := vbd.evmKeeper.GetBaseFee(ctx, ethCfg)
enableCreate := vbd.evmKeeper.GetEnableCreate(ctx)
enableCall := vbd.evmKeeper.GetEnableCall(ctx)
evmDenom := vbd.evmKeeper.GetEVMDenom(ctx)
enableCreate := evmParams.GetEnableCreate()
enableCall := evmParams.GetEnableCall()
evmDenom := evmParams.GetEvmDenom()
for _, msg := range protoTx.GetMsgs() {
msgEthTx, ok := msg.(*evmtypes.MsgEthereumTx)

View File

@ -44,7 +44,8 @@ func NewEthSigVerificationDecorator(ek EVMKeeper) EthSigVerificationDecorator {
// won't see the error message.
func (esvd EthSigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) {
chainID := esvd.evmKeeper.ChainID()
chainCfg := esvd.evmKeeper.GetChainConfig(ctx)
evmParams := esvd.evmKeeper.GetParams(ctx)
chainCfg := evmParams.GetChainConfig()
ethCfg := chainCfg.EthereumConfig(chainID)
blockNum := big.NewInt(ctx.BlockHeight())
signer := ethtypes.MakeSigner(ethCfg, blockNum)
@ -55,7 +56,7 @@ func (esvd EthSigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, s
return ctx, errorsmod.Wrapf(errortypes.ErrUnknownRequest, "invalid message type %T, expected %T", msg, (*evmtypes.MsgEthereumTx)(nil))
}
allowUnprotectedTxs := esvd.evmKeeper.GetAllowUnprotectedTxs(ctx)
allowUnprotectedTxs := evmParams.GetAllowUnprotectedTxs()
ethTx := msgEthTx.AsTransaction()
if !allowUnprotectedTxs && !ethTx.Protected() {
return ctx, errorsmod.Wrapf(

View File

@ -863,7 +863,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
// ethermint subspaces
paramsKeeper.Subspace(evmtypes.ModuleName).WithKeyTable(evmtypes.ParamKeyTable())
paramsKeeper.Subspace(evmtypes.ModuleName).WithKeyTable(evmtypes.ParamKeyTable()) //nolint: staticcheck
paramsKeeper.Subspace(feemarkettypes.ModuleName).WithKeyTable(feemarkettypes.ParamKeyTable())
return paramsKeeper
}

View File

@ -15,11 +15,7 @@ message Params {
// enable_call toggles state transitions that use the vm.Call function
bool enable_call = 3 [(gogoproto.moretags) = "yaml:\"enable_call\""];
// extra_eips defines the additional EIPs for the vm.Config
ExtraEIPs extra_eips = 4 [
(gogoproto.customname) = "ExtraEIPs",
(gogoproto.moretags) = "yaml:\"extra_eips\"",
(gogoproto.nullable) = false
];
repeated int64 extra_eips = 4 [(gogoproto.customname) = "ExtraEIPs", (gogoproto.moretags) = "yaml:\"extra_eips\""];
// chain_config defines the EVM chain configuration parameters
ChainConfig chain_config = 5 [(gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false];
// allow_unprotected_txs defines if replay-protected (i.e non EIP155
@ -27,12 +23,6 @@ message Params {
bool allow_unprotected_txs = 6;
}
// ExtraEIPs represents extra EIPs for the vm.Config
message ExtraEIPs {
// eips defines the additional EIPs for the vm.Config
repeated int64 eips = 1 [(gogoproto.customname) = "EIPs", (gogoproto.moretags) = "yaml:\"eips\""];
}
// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values
// instead of *big.Int.
message ChainConfig {

View File

@ -597,7 +597,8 @@ func (suite *EvmTestSuite) TestERC20TransferReverted() {
before := k.GetBalance(suite.ctx, suite.from)
ethCfg := suite.app.EvmKeeper.GetChainConfig(suite.ctx).EthereumConfig(nil)
evmParams := suite.app.EvmKeeper.GetParams(suite.ctx)
ethCfg := evmParams.GetChainConfig().EthereumConfig(nil)
baseFee := suite.app.EvmKeeper.GetBaseFee(suite.ctx, ethCfg)
txData, err := types.UnpackTxData(tx.Data)

View File

@ -321,7 +321,8 @@ func (k *Keeper) GetNonce(ctx sdk.Context, addr common.Address) uint64 {
// GetBalance load account's balance of gas token
func (k *Keeper) GetBalance(ctx sdk.Context, addr common.Address) *big.Int {
cosmosAddr := sdk.AccAddress(addr.Bytes())
evmDenom := k.GetEVMDenom(ctx)
evmParams := k.GetParams(ctx)
evmDenom := evmParams.GetEvmDenom()
// if node is pruned, params is empty. Return invalid value
if evmDenom == "" {
return big.NewInt(-1)

View File

@ -18,6 +18,7 @@ package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"
v4 "github.com/evmos/ethermint/x/evm/migrations/v4"
v5 "github.com/evmos/ethermint/x/evm/migrations/v5"
"github.com/evmos/ethermint/x/evm/types"
)
@ -39,3 +40,8 @@ func NewMigrator(keeper Keeper, legacySubspace types.Subspace) Migrator {
func (m Migrator) Migrate3to4(ctx sdk.Context) error {
return v4.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc)
}
// Migrate4to5 migrates the store from consensus version 4 to 5
func (m Migrator) Migrate4to5(ctx sdk.Context) error {
return v5.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc)
}

View File

@ -22,14 +22,13 @@ import (
// GetParams returns the total set of evm parameters.
func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) {
evmDenom := k.GetEVMDenom(ctx)
allowUnprotectedTx := k.GetAllowUnprotectedTxs(ctx)
enableCreate := k.GetEnableCreate(ctx)
enableCall := k.GetEnableCall(ctx)
chainCfg := k.GetChainConfig(ctx)
extraEIPs := k.GetExtraEIPs(ctx)
return types.NewParams(evmDenom, allowUnprotectedTx, enableCreate, enableCall, chainCfg, extraEIPs)
store := ctx.KVStore(k.storeKey)
bz := store.Get(types.KeyPrefixParams)
if len(bz) == 0 {
return k.GetLegacyParams(ctx)
}
k.cdc.MustUnmarshal(bz, &params)
return
}
// SetParams sets the EVM params each in their individual key for better get performance
@ -38,13 +37,13 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error {
return err
}
k.setExtraEIPs(ctx, params.ExtraEIPs)
k.setChainConfig(ctx, params.ChainConfig)
k.setEvmDenom(ctx, params.EvmDenom)
k.setEnableCall(ctx, params.EnableCall)
k.setEnableCreate(ctx, params.EnableCreate)
k.setAllowUnprotectedTxs(ctx, params.AllowUnprotectedTxs)
store := ctx.KVStore(k.storeKey)
bz, err := k.cdc.Marshal(&params)
if err != nil {
return err
}
store.Set(types.KeyPrefixParams, bz)
return nil
}
@ -54,117 +53,3 @@ func (k Keeper) GetLegacyParams(ctx sdk.Context) types.Params {
k.ss.GetParamSetIfExists(ctx, &params)
return params
}
// GetExtraEIPs returns the extra EIPs enabled on the chain.
func (k Keeper) GetExtraEIPs(ctx sdk.Context) types.ExtraEIPs {
var extraEIPs types.ExtraEIPs
store := ctx.KVStore(k.storeKey)
bz := store.Get(types.ParamStoreKeyExtraEIPs)
if len(bz) == 0 {
return k.GetLegacyParams(ctx).ExtraEIPs
}
k.cdc.MustUnmarshal(bz, &extraEIPs)
return extraEIPs
}
// GetChainConfig returns the chain configuration parameter.
func (k Keeper) GetChainConfig(ctx sdk.Context) types.ChainConfig {
var chainCfg types.ChainConfig
store := ctx.KVStore(k.storeKey)
bz := store.Get(types.ParamStoreKeyChainConfig)
if len(bz) == 0 {
return k.GetLegacyParams(ctx).ChainConfig
}
k.cdc.MustUnmarshal(bz, &chainCfg)
return chainCfg
}
// GetEVMDenom returns the EVM denom.
func (k Keeper) GetEVMDenom(ctx sdk.Context) string {
store := ctx.KVStore(k.storeKey)
bz := store.Get(types.ParamStoreKeyEVMDenom)
if len(bz) == 0 {
return k.GetLegacyParams(ctx).EvmDenom
}
return string(bz)
}
// GetEnableCall returns true if the EVM Call operation is enabled.
func (k Keeper) GetEnableCall(ctx sdk.Context) bool {
store := ctx.KVStore(k.storeKey)
exist := store.Has(types.ParamStoreKeyEnableCall)
if !exist {
exist = k.GetLegacyParams(ctx).EnableCall
}
return exist
}
// GetEnableCreate returns true if the EVM Create contract operation is enabled.
func (k Keeper) GetEnableCreate(ctx sdk.Context) bool {
store := ctx.KVStore(k.storeKey)
exist := store.Has(types.ParamStoreKeyEnableCreate)
if !exist {
exist = k.GetLegacyParams(ctx).EnableCreate
}
return exist
}
// GetAllowUnprotectedTxs returns true if unprotected txs (i.e non-replay protected as per EIP-155) are supported by the chain.
func (k Keeper) GetAllowUnprotectedTxs(ctx sdk.Context) bool {
store := ctx.KVStore(k.storeKey)
exist := store.Has(types.ParamStoreKeyAllowUnprotectedTxs)
if !exist {
exist = k.GetLegacyParams(ctx).AllowUnprotectedTxs
}
return exist
}
// setChainConfig sets the ChainConfig in the store
func (k Keeper) setChainConfig(ctx sdk.Context, chainCfg types.ChainConfig) {
store := ctx.KVStore(k.storeKey)
chainCfgBz := k.cdc.MustMarshal(&chainCfg)
store.Set(types.ParamStoreKeyChainConfig, chainCfgBz)
}
// setExtraEIPs sets the ExtraEIPs in the store
func (k Keeper) setExtraEIPs(ctx sdk.Context, extraEIPs types.ExtraEIPs) {
extraEIPsBz := k.cdc.MustMarshal(&extraEIPs)
store := ctx.KVStore(k.storeKey)
store.Set(types.ParamStoreKeyExtraEIPs, extraEIPsBz)
}
// setEvmDenom sets the EVMDenom param in the store
func (k Keeper) setEvmDenom(ctx sdk.Context, evmDenom string) {
store := ctx.KVStore(k.storeKey)
store.Set(types.ParamStoreKeyEVMDenom, []byte(evmDenom))
}
// setAllowUnprotectedTxs sets the AllowUnprotectedTxs param in the store
func (k Keeper) setAllowUnprotectedTxs(ctx sdk.Context, enable bool) {
store := ctx.KVStore(k.storeKey)
if enable {
store.Set(types.ParamStoreKeyAllowUnprotectedTxs, []byte{0x01})
return
}
store.Delete(types.ParamStoreKeyAllowUnprotectedTxs)
}
// setEnableCreate sets the EnableCreate param in the store
func (k Keeper) setEnableCreate(ctx sdk.Context, enable bool) {
store := ctx.KVStore(k.storeKey)
if enable {
store.Set(types.ParamStoreKeyEnableCreate, []byte{0x01})
return
}
store.Delete(types.ParamStoreKeyEnableCreate)
}
// setEnableCall sets the EnableCall param in the store
func (k Keeper) setEnableCall(ctx sdk.Context, enable bool) {
store := ctx.KVStore(k.storeKey)
if enable {
store.Set(types.ParamStoreKeyEnableCall, []byte{0x01})
return
}
store.Delete(types.ParamStoreKeyEnableCall)
}

View File

@ -33,7 +33,8 @@ func (suite *KeeperTestSuite) TestParams() {
return params.EvmDenom
},
func() interface{} {
return suite.app.EvmKeeper.GetEVMDenom(suite.ctx)
evmParams := suite.app.EvmKeeper.GetParams(suite.ctx)
return evmParams.GetEvmDenom()
},
true,
},
@ -45,7 +46,8 @@ func (suite *KeeperTestSuite) TestParams() {
return params.EnableCreate
},
func() interface{} {
return suite.app.EvmKeeper.GetEnableCreate(suite.ctx)
evmParams := suite.app.EvmKeeper.GetParams(suite.ctx)
return evmParams.GetEnableCreate()
},
true,
},
@ -57,7 +59,8 @@ func (suite *KeeperTestSuite) TestParams() {
return params.EnableCall
},
func() interface{} {
return suite.app.EvmKeeper.GetEnableCall(suite.ctx)
evmParams := suite.app.EvmKeeper.GetParams(suite.ctx)
return evmParams.GetEnableCall()
},
true,
},
@ -69,7 +72,8 @@ func (suite *KeeperTestSuite) TestParams() {
return params.AllowUnprotectedTxs
},
func() interface{} {
return suite.app.EvmKeeper.GetAllowUnprotectedTxs(suite.ctx)
evmParams := suite.app.EvmKeeper.GetParams(suite.ctx)
return evmParams.GetAllowUnprotectedTxs()
},
true,
},
@ -81,7 +85,8 @@ func (suite *KeeperTestSuite) TestParams() {
return params.ChainConfig
},
func() interface{} {
return suite.app.EvmKeeper.GetChainConfig(suite.ctx)
evmParams := suite.app.EvmKeeper.GetParams(suite.ctx)
return evmParams.GetChainConfig()
},
true,
},

View File

@ -475,7 +475,8 @@ func (suite *KeeperTestSuite) TestVerifyFeeAndDeductTxCostsFromUserBalance() {
txData, _ := evmtypes.UnpackTxData(tx.Data)
ethCfg := suite.app.EvmKeeper.GetChainConfig(suite.ctx).EthereumConfig(nil)
evmParams := suite.app.EvmKeeper.GetParams(suite.ctx)
ethCfg := evmParams.GetChainConfig().EthereumConfig(nil)
baseFee := suite.app.EvmKeeper.GetBaseFee(suite.ctx, ethCfg)
priority := evmtypes.GetTxPriority(txData, baseFee)

View File

@ -16,35 +16,20 @@ func MigrateStore(
legacySubspace types.Subspace,
cdc codec.BinaryCodec,
) error {
var (
store = ctx.KVStore(storeKey)
params types.Params
)
var params types.Params
legacySubspace.GetParamSetIfExists(ctx, &params)
if err := params.Validate(); err != nil {
return err
}
chainCfgBz := cdc.MustMarshal(&params.ChainConfig)
extraEIPsBz := cdc.MustMarshal(&types.ExtraEIPs{EIPs: types.AvailableExtraEIPs})
store.Set(types.ParamStoreKeyEVMDenom, []byte(params.EvmDenom))
store.Set(types.ParamStoreKeyExtraEIPs, extraEIPsBz)
store.Set(types.ParamStoreKeyChainConfig, chainCfgBz)
if params.AllowUnprotectedTxs {
store.Set(types.ParamStoreKeyAllowUnprotectedTxs, []byte{0x01})
bz, err := cdc.Marshal(&params)
if err != nil {
return err
}
if params.EnableCall {
store.Set(types.ParamStoreKeyEnableCall, []byte{0x01})
}
if params.EnableCreate {
store.Set(types.ParamStoreKeyEnableCreate, []byte{0x01})
}
store := ctx.KVStore(storeKey)
store.Set(types.KeyPrefixParams, bz)
return nil
}

View File

@ -3,15 +3,15 @@ package v4_test
import (
"testing"
"github.com/evmos/ethermint/x/evm/types"
gogotypes "github.com/gogo/protobuf/types"
"github.com/stretchr/testify/require"
"github.com/cosmos/cosmos-sdk/testutil"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/evmos/ethermint/app"
"github.com/evmos/ethermint/encoding"
v4 "github.com/evmos/ethermint/x/evm/migrations/v4"
"github.com/stretchr/testify/require"
"github.com/evmos/ethermint/x/evm/types"
)
type mockSubspace struct {
@ -31,34 +31,16 @@ func TestMigrate(t *testing.T) {
cdc := encCfg.Codec
storeKey := sdk.NewKVStoreKey(types.ModuleName)
tKey := sdk.NewTransientStoreKey("transient_test")
tKey := sdk.NewTransientStoreKey(types.TransientKey)
ctx := testutil.DefaultContext(storeKey, tKey)
kvStore := ctx.KVStore(storeKey)
legacySubspace := newMockSubspace(types.DefaultParams())
require.NoError(t, v4.MigrateStore(ctx, storeKey, legacySubspace, cdc))
// Get all the new parameters from the kvStore
var evmDenom string
bz := kvStore.Get(types.ParamStoreKeyEVMDenom)
evmDenom = string(bz)
paramsBz := kvStore.Get(types.KeyPrefixParams)
var params types.Params
cdc.MustUnmarshal(paramsBz, &params)
var allowUnprotectedTx gogotypes.BoolValue
bz = kvStore.Get(types.ParamStoreKeyAllowUnprotectedTxs)
cdc.MustUnmarshal(bz, &allowUnprotectedTx)
enableCreate := kvStore.Has(types.ParamStoreKeyEnableCreate)
enableCall := kvStore.Has(types.ParamStoreKeyEnableCall)
var chainCfg types.ChainConfig
bz = kvStore.Get(types.ParamStoreKeyChainConfig)
cdc.MustUnmarshal(bz, &chainCfg)
var extraEIPs types.ExtraEIPs
bz = kvStore.Get(types.ParamStoreKeyExtraEIPs)
cdc.MustUnmarshal(bz, &extraEIPs)
require.Equal(t, types.AvailableExtraEIPs, extraEIPs.EIPs)
params := types.NewParams(evmDenom, allowUnprotectedTx.Value, enableCreate, enableCall, chainCfg, extraEIPs)
require.Equal(t, legacySubspace.ps, params)
require.Equal(t, params, legacySubspace.ps)
}

View File

@ -1,175 +0,0 @@
package types
import (
"math/big"
"strings"
"github.com/evmos/ethermint/x/evm/types"
sdkmath "cosmossdk.io/math"
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/params"
)
// EthereumConfig returns an Ethereum ChainConfig for EVM state transitions.
// All the negative or nil values are converted to nil
func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig {
return &params.ChainConfig{
ChainID: chainID,
HomesteadBlock: getBlockValue(cc.HomesteadBlock),
DAOForkBlock: getBlockValue(cc.DAOForkBlock),
DAOForkSupport: cc.DAOForkSupport,
EIP150Block: getBlockValue(cc.EIP150Block),
EIP150Hash: common.HexToHash(cc.EIP150Hash),
EIP155Block: getBlockValue(cc.EIP155Block),
EIP158Block: getBlockValue(cc.EIP158Block),
ByzantiumBlock: getBlockValue(cc.ByzantiumBlock),
ConstantinopleBlock: getBlockValue(cc.ConstantinopleBlock),
PetersburgBlock: getBlockValue(cc.PetersburgBlock),
IstanbulBlock: getBlockValue(cc.IstanbulBlock),
MuirGlacierBlock: getBlockValue(cc.MuirGlacierBlock),
BerlinBlock: getBlockValue(cc.BerlinBlock),
LondonBlock: getBlockValue(cc.LondonBlock),
ArrowGlacierBlock: getBlockValue(cc.ArrowGlacierBlock),
GrayGlacierBlock: getBlockValue(cc.GrayGlacierBlock),
MergeNetsplitBlock: getBlockValue(cc.MergeNetsplitBlock),
ShanghaiBlock: getBlockValue(cc.ShanghaiBlock),
CancunBlock: getBlockValue(cc.CancunBlock),
TerminalTotalDifficulty: nil,
Ethash: nil,
Clique: nil,
}
}
// DefaultChainConfig returns default evm parameters.
func DefaultChainConfig() ChainConfig {
homesteadBlock := sdk.ZeroInt()
daoForkBlock := sdk.ZeroInt()
eip150Block := sdk.ZeroInt()
eip155Block := sdk.ZeroInt()
eip158Block := sdk.ZeroInt()
byzantiumBlock := sdk.ZeroInt()
constantinopleBlock := sdk.ZeroInt()
petersburgBlock := sdk.ZeroInt()
istanbulBlock := sdk.ZeroInt()
muirGlacierBlock := sdk.ZeroInt()
berlinBlock := sdk.ZeroInt()
londonBlock := sdk.ZeroInt()
arrowGlacierBlock := sdk.ZeroInt()
grayGlacierBlock := sdk.ZeroInt()
mergeNetsplitBlock := sdk.ZeroInt()
return ChainConfig{
HomesteadBlock: &homesteadBlock,
DAOForkBlock: &daoForkBlock,
DAOForkSupport: true,
EIP150Block: &eip150Block,
EIP150Hash: common.Hash{}.String(),
EIP155Block: &eip155Block,
EIP158Block: &eip158Block,
ByzantiumBlock: &byzantiumBlock,
ConstantinopleBlock: &constantinopleBlock,
PetersburgBlock: &petersburgBlock,
IstanbulBlock: &istanbulBlock,
MuirGlacierBlock: &muirGlacierBlock,
BerlinBlock: &berlinBlock,
LondonBlock: &londonBlock,
ArrowGlacierBlock: &arrowGlacierBlock,
GrayGlacierBlock: &grayGlacierBlock,
MergeNetsplitBlock: &mergeNetsplitBlock,
}
}
func getBlockValue(block *sdkmath.Int) *big.Int {
if block == nil || block.IsNegative() {
return nil
}
return block.BigInt()
}
// Validate performs a basic validation of the ChainConfig params. The function will return an error
// if any of the block values is uninitialized (i.e nil) or if the EIP150Hash is an invalid hash.
func (cc ChainConfig) Validate() error {
if err := validateBlock(cc.HomesteadBlock); err != nil {
return errorsmod.Wrap(err, "homesteadBlock")
}
if err := validateBlock(cc.DAOForkBlock); err != nil {
return errorsmod.Wrap(err, "daoForkBlock")
}
if err := validateBlock(cc.EIP150Block); err != nil {
return errorsmod.Wrap(err, "eip150Block")
}
if err := validateHash(cc.EIP150Hash); err != nil {
return err
}
if err := validateBlock(cc.EIP155Block); err != nil {
return errorsmod.Wrap(err, "eip155Block")
}
if err := validateBlock(cc.EIP158Block); err != nil {
return errorsmod.Wrap(err, "eip158Block")
}
if err := validateBlock(cc.ByzantiumBlock); err != nil {
return errorsmod.Wrap(err, "byzantiumBlock")
}
if err := validateBlock(cc.ConstantinopleBlock); err != nil {
return errorsmod.Wrap(err, "constantinopleBlock")
}
if err := validateBlock(cc.PetersburgBlock); err != nil {
return errorsmod.Wrap(err, "petersburgBlock")
}
if err := validateBlock(cc.IstanbulBlock); err != nil {
return errorsmod.Wrap(err, "istanbulBlock")
}
if err := validateBlock(cc.MuirGlacierBlock); err != nil {
return errorsmod.Wrap(err, "muirGlacierBlock")
}
if err := validateBlock(cc.BerlinBlock); err != nil {
return errorsmod.Wrap(err, "berlinBlock")
}
if err := validateBlock(cc.LondonBlock); err != nil {
return errorsmod.Wrap(err, "londonBlock")
}
if err := validateBlock(cc.ArrowGlacierBlock); err != nil {
return errorsmod.Wrap(err, "arrowGlacierBlock")
}
if err := validateBlock(cc.GrayGlacierBlock); err != nil {
return errorsmod.Wrap(err, "GrayGlacierBlock")
}
if err := validateBlock(cc.MergeNetsplitBlock); err != nil {
return errorsmod.Wrap(err, "MergeNetsplitBlock")
}
// NOTE: chain ID is not needed to check config order
if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil {
return errorsmod.Wrap(err, "invalid config fork order")
}
return nil
}
func validateHash(hex string) error {
if hex != "" && strings.TrimSpace(hex) == "" {
return errorsmod.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank")
}
return nil
}
func validateBlock(block *sdkmath.Int) error {
// nil value means that the fork has not yet been applied
if block == nil {
return nil
}
if block.IsNegative() {
return errorsmod.Wrapf(
types.ErrInvalidChainConfig, "block value cannot be negative: %s", block,
)
}
return nil
}

File diff suppressed because it is too large Load Diff

View File

@ -1,154 +0,0 @@
package types
import (
"fmt"
"math/big"
evmtypes "github.com/evmos/ethermint/x/evm/types"
"github.com/ethereum/go-ethereum/params"
sdk "github.com/cosmos/cosmos-sdk/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/evmos/ethermint/types"
)
var _ evmtypes.LegacyParams = &V4Params{}
var (
// DefaultEVMDenom defines the default EVM denomination on Ethermint
DefaultEVMDenom = types.AttoPhoton
// DefaultAllowUnprotectedTxs rejects all unprotected txs (i.e false)
DefaultAllowUnprotectedTxs = false
DefaultEnableCreate = true
DefaultEnableCall = true
DefaultExtraEIPs = ExtraEIPs{AvailableExtraEIPs}
)
// Parameter keys
var (
ParamStoreKeyEVMDenom = []byte("EVMDenom")
ParamStoreKeyEnableCreate = []byte("EnableCreate")
ParamStoreKeyEnableCall = []byte("EnableCall")
ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs")
ParamStoreKeyChainConfig = []byte("ChainConfig")
ParamStoreKeyAllowUnprotectedTxs = []byte("AllowUnprotectedTxs")
// 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/master/core/vm/interpreter.go#L97
AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529}
)
// ParamKeyTable returns the parameter key table.
func ParamKeyTable() paramtypes.KeyTable {
return paramtypes.NewKeyTable().RegisterParamSet(&V4Params{})
}
// NewParams creates a new Params instance
func NewParams(evmDenom string, allowUnprotectedTxs, enableCreate, enableCall bool, config ChainConfig, extraEIPs ExtraEIPs) V4Params {
return V4Params{
EvmDenom: evmDenom,
AllowUnprotectedTxs: allowUnprotectedTxs,
EnableCreate: enableCreate,
EnableCall: enableCall,
ExtraEIPs: extraEIPs,
ChainConfig: config,
}
}
// DefaultParams returns default evm parameters
// ExtraEIPs is empty to prevent overriding the latest hard fork instruction set
func DefaultParams() V4Params {
return V4Params{
EvmDenom: DefaultEVMDenom,
EnableCreate: DefaultEnableCreate,
EnableCall: DefaultEnableCall,
ChainConfig: DefaultChainConfig(),
ExtraEIPs: DefaultExtraEIPs,
AllowUnprotectedTxs: DefaultAllowUnprotectedTxs,
}
}
// ParamSetPairs returns the parameter set pairs.
func (p *V4Params) ParamSetPairs() paramtypes.ParamSetPairs {
return paramtypes.ParamSetPairs{
paramtypes.NewParamSetPair(ParamStoreKeyEVMDenom, &p.EvmDenom, validateEVMDenom),
paramtypes.NewParamSetPair(ParamStoreKeyEnableCreate, &p.EnableCreate, validateBool),
paramtypes.NewParamSetPair(ParamStoreKeyEnableCall, &p.EnableCall, validateBool),
paramtypes.NewParamSetPair(ParamStoreKeyExtraEIPs, &p.ExtraEIPs, validateEIPs),
paramtypes.NewParamSetPair(ParamStoreKeyChainConfig, &p.ChainConfig, validateChainConfig),
paramtypes.NewParamSetPair(ParamStoreKeyAllowUnprotectedTxs, &p.AllowUnprotectedTxs, validateBool),
}
}
// Validate performs basic validation on evm parameters.
func (p V4Params) Validate() error {
if err := sdk.ValidateDenom(p.EvmDenom); err != nil {
return err
}
if err := validateEIPs(p.ExtraEIPs); err != nil {
return err
}
return p.ChainConfig.Validate()
}
// EIPs returns the ExtraEIPS as a int slice
func (p V4Params) EIPs() []int {
eips := make([]int, len(p.ExtraEIPs.EIPs))
for i, eip := range p.ExtraEIPs.EIPs {
eips[i] = int(eip)
}
return eips
}
func validateEVMDenom(i interface{}) error {
denom, ok := i.(string)
if !ok {
return fmt.Errorf("invalid parameter EVM denom type: %T", i)
}
return sdk.ValidateDenom(denom)
}
func validateBool(i interface{}) error {
_, ok := i.(bool)
if !ok {
return fmt.Errorf("invalid parameter type: %T", i)
}
return nil
}
func validateEIPs(i interface{}) error {
eips, ok := i.(ExtraEIPs)
if !ok {
return fmt.Errorf("invalid EIP slice type: %T", i)
}
for _, eip := range eips.EIPs {
if !vm.ValidEip(int(eip)) {
return fmt.Errorf("EIP %d is not activateable, valid EIPS are: %s", eip, vm.ActivateableEips())
}
}
return nil
}
func validateChainConfig(i interface{}) error {
cfg, ok := i.(ChainConfig)
if !ok {
return fmt.Errorf("invalid chain config type: %T", i)
}
return cfg.Validate()
}
// IsLondon returns if london hardfork is enabled.
func IsLondon(ethConfig *params.ChainConfig, height int64) bool {
return ethConfig.IsLondon(big.NewInt(height))
}

View File

@ -0,0 +1,59 @@
package v5
import (
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/evmos/ethermint/x/evm/types"
v5types "github.com/evmos/ethermint/x/evm/migrations/v5/types"
)
// MigrateStore migrates the x/evm module state from the consensus version 4 to
// version 5. Specifically, it takes the parameters that are currently stored
// in separate keys and stores them directly into the x/evm module state using
// a single params key.
func MigrateStore(
ctx sdk.Context,
storeKey storetypes.StoreKey,
cdc codec.BinaryCodec,
) error {
var (
extraEIPs v5types.V5ExtraEIPs
chainConfig types.ChainConfig
params types.Params
)
store := ctx.KVStore(storeKey)
denom := string(store.Get(types.ParamStoreKeyEVMDenom))
extraEIPsBz := store.Get(types.ParamStoreKeyExtraEIPs)
cdc.MustUnmarshal(extraEIPsBz, &extraEIPs)
chainCfgBz := store.Get(types.ParamStoreKeyChainConfig)
cdc.MustUnmarshal(chainCfgBz, &chainConfig)
params.EvmDenom = denom
params.ExtraEIPs = extraEIPs.EIPs
params.ChainConfig = chainConfig
params.EnableCreate = store.Has(types.ParamStoreKeyEnableCreate)
params.EnableCall = store.Has(types.ParamStoreKeyEnableCall)
params.AllowUnprotectedTxs = store.Has(types.ParamStoreKeyAllowUnprotectedTxs)
store.Delete(types.ParamStoreKeyChainConfig)
store.Delete(types.ParamStoreKeyExtraEIPs)
store.Delete(types.ParamStoreKeyEVMDenom)
store.Delete(types.ParamStoreKeyEnableCreate)
store.Delete(types.ParamStoreKeyEnableCall)
store.Delete(types.ParamStoreKeyAllowUnprotectedTxs)
if err := params.Validate(); err != nil {
return err
}
bz := cdc.MustMarshal(&params)
store.Set(types.KeyPrefixParams, bz)
return nil
}

View File

@ -0,0 +1,61 @@
package v5_test
import (
"testing"
"github.com/cosmos/cosmos-sdk/testutil"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
"github.com/evmos/ethermint/app"
"github.com/evmos/ethermint/encoding"
v5 "github.com/evmos/ethermint/x/evm/migrations/v5"
v5types "github.com/evmos/ethermint/x/evm/migrations/v5/types"
"github.com/evmos/ethermint/x/evm/types"
)
func TestMigrate(t *testing.T) {
encCfg := encoding.MakeConfig(app.ModuleBasics)
cdc := encCfg.Codec
storeKey := sdk.NewKVStoreKey(types.ModuleName)
tKey := sdk.NewTransientStoreKey("transient_test")
ctx := testutil.DefaultContext(storeKey, tKey)
kvStore := ctx.KVStore(storeKey)
extraEIPs := v5types.V5ExtraEIPs{EIPs: types.AvailableExtraEIPs}
extraEIPsBz := cdc.MustMarshal(&extraEIPs)
chainConfig := types.DefaultChainConfig()
chainConfigBz := cdc.MustMarshal(&chainConfig)
// Set the params in the store
kvStore.Set(types.ParamStoreKeyEVMDenom, []byte("aphoton"))
kvStore.Set(types.ParamStoreKeyEnableCreate, []byte{0x01})
kvStore.Set(types.ParamStoreKeyEnableCall, []byte{0x01})
kvStore.Set(types.ParamStoreKeyAllowUnprotectedTxs, []byte{0x01})
kvStore.Set(types.ParamStoreKeyExtraEIPs, extraEIPsBz)
kvStore.Set(types.ParamStoreKeyChainConfig, chainConfigBz)
err := v5.MigrateStore(ctx, storeKey, cdc)
require.NoError(t, err)
paramsBz := kvStore.Get(types.KeyPrefixParams)
var params types.Params
cdc.MustUnmarshal(paramsBz, &params)
// test that the params have been migrated correctly
require.Equal(t, "aphoton", params.EvmDenom)
require.True(t, params.EnableCreate)
require.True(t, params.EnableCall)
require.True(t, params.AllowUnprotectedTxs)
require.Equal(t, chainConfig, params.ChainConfig)
require.Equal(t, extraEIPs.EIPs, params.ExtraEIPs)
// check that the keys are deleted
require.False(t, kvStore.Has(types.ParamStoreKeyEVMDenom))
require.False(t, kvStore.Has(types.ParamStoreKeyEnableCreate))
require.False(t, kvStore.Has(types.ParamStoreKeyEnableCall))
require.False(t, kvStore.Has(types.ParamStoreKeyAllowUnprotectedTxs))
require.False(t, kvStore.Has(types.ParamStoreKeyExtraEIPs))
require.False(t, kvStore.Has(types.ParamStoreKeyChainConfig))
}

479
x/evm/migrations/v5/types/evm.pb.go generated Normal file
View File

@ -0,0 +1,479 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: ethermint/evm/v1/evm.proto
package types
import (
fmt "fmt"
_ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/gogo/protobuf/proto"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// V5ExtraEIPs represents extra EIPs for the vm.Config
type V5ExtraEIPs struct {
// eips defines the additional EIPs for the vm.Config
EIPs []int64 `protobuf:"varint,1,rep,packed,name=eips,proto3" json:"eips,omitempty" yaml:"eips"`
}
func (m *V5ExtraEIPs) Reset() { *m = V5ExtraEIPs{} }
func (m *V5ExtraEIPs) String() string { return proto.CompactTextString(m) }
func (*V5ExtraEIPs) ProtoMessage() {}
func (*V5ExtraEIPs) Descriptor() ([]byte, []int) {
return fileDescriptor_d21ecc92c8c8583e, []int{1}
}
func (m *V5ExtraEIPs) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *V5ExtraEIPs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_V5ExtraEIPs.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *V5ExtraEIPs) XXX_Merge(src proto.Message) {
xxx_messageInfo_V5ExtraEIPs.Merge(m, src)
}
func (m *V5ExtraEIPs) XXX_Size() int {
return m.Size()
}
func (m *V5ExtraEIPs) XXX_DiscardUnknown() {
xxx_messageInfo_V5ExtraEIPs.DiscardUnknown(m)
}
var xxx_messageInfo_V5ExtraEIPs proto.InternalMessageInfo
func (m *V5ExtraEIPs) GetEIPs() []int64 {
if m != nil {
return m.EIPs
}
return nil
}
func init() {
proto.RegisterType((*V5ExtraEIPs)(nil), "ethermint.evm.v1.V5ExtraEIPs")
}
func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) }
var fileDescriptor_d21ecc92c8c8583e = []byte{
// 1644 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x4f, 0x6f, 0xe3, 0xc6,
0x15, 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34, 0x34, 0x8d,
0x97, 0xc9, 0x99, 0xaf, 0xcc, 0x94, 0xa4, 0x94, 0x8d, 0xd4, 0xdb, 0xc5, 0x24, 0xa7, 0x1d, 0xbf,
0x56, 0x76, 0x34, 0x87, 0x60, 0x07, 0x40, 0x33, 0x8d, 0x11, 0x91, 0xb3, 0xcc, 0x57, 0xe7, 0xbf,
0xae, 0xe6, 0xaa, 0x53, 0xa8, 0xbd, 0x48, 0x39, 0x5f, 0x63, 0x81, 0xd1, 0x3d, 0x0b, 0xfc, 0x05,
0x80, 0x7a, 0x4f, 0xfc, 0xef, 0x38, 0x2d, 0x3f, 0x33, 0xf5, 0xd3, 0x42, 0xe9, 0x6b, 0xaf, 0x59,
0xb3, 0xa3, 0xd1, 0x05, 0xa7, 0x26, 0x8b, 0x0b, 0xcb, 0xb6, 0x9c, 0xf5, 0x0b, 0xcb, 0xde, 0x74,
0xec, 0xb2, 0x7e, 0x26, 0x0b, 0xb4, 0x33, 0xc1, 0x33, 0xcb, 0xeb, 0xfc, 0xf2, 0x87, 0xdb, 0xbd,
0xd5, 0x77, 0xb7, 0x7b, 0xab, 0xff, 0xbe, 0xdd, 0x5b, 0xfd, 0xeb, 0xfb, 0xbd, 0x95, 0x77, 0xef,
0xf7, 0x56, 0xfe, 0xf9, 0x7e, 0x6f, 0xe5, 0x77, 0xb3, 0xf7, 0x03, 0x19, 0xc8, 0xeb, 0x61, 0xfa,
0xd3, 0xc2, 0x50, 0xfd, 0xb8, 0xa0, 0xee, 0x88, 0xee, 0x86, 0xfa, 0xd1, 0xe0, 0xd3, 0xff, 0x04,
0x00, 0x00, 0xff, 0xff, 0x68, 0xce, 0x8e, 0x23, 0x7a, 0x10, 0x00, 0x00,
}
func (m *V5ExtraEIPs) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *V5ExtraEIPs) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *V5ExtraEIPs) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.EIPs) > 0 {
dAtA4 := make([]byte, len(m.EIPs)*10)
var j3 int
for _, num1 := range m.EIPs {
num := uint64(num1)
for num >= 1<<7 {
dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j3++
}
dAtA4[j3] = uint8(num)
j3++
}
i -= j3
copy(dAtA[i:], dAtA4[:j3])
i = encodeVarintEvm(dAtA, i, uint64(j3))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintEvm(dAtA []byte, offset int, v uint64) int {
offset -= sovEvm(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *V5ExtraEIPs) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.EIPs) > 0 {
l = 0
for _, e := range m.EIPs {
l += sovEvm(uint64(e))
}
n += 1 + sovEvm(uint64(l)) + l
}
return n
}
func sovEvm(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozEvm(x uint64) (n int) {
return sovEvm(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *V5ExtraEIPs) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: V5ExtraEIPs: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: V5ExtraEIPs: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType == 0 {
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.EIPs = append(m.EIPs, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthEvm
}
postIndex := iNdEx + packedLen
if postIndex < 0 {
return ErrInvalidLengthEvm
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
var elementCount int
var count int
for _, integer := range dAtA[iNdEx:postIndex] {
if integer < 128 {
count++
}
}
elementCount = count
if elementCount != 0 && len(m.EIPs) == 0 {
m.EIPs = make([]int64, 0, elementCount)
}
for iNdEx < postIndex {
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.EIPs = append(m.EIPs, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field EIPs", wireType)
}
default:
iNdEx = preIndex
skippy, err := skipEvm(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthEvm
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipEvm(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowEvm
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowEvm
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowEvm
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthEvm
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupEvm
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthEvm
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthEvm = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowEvm = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupEvm = fmt.Errorf("proto: unexpected end of group")
)

View File

@ -59,7 +59,7 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
// ConsensusVersion returns the consensus state-breaking version for the module.
func (AppModuleBasic) ConsensusVersion() uint64 {
return 4
return 5
}
// DefaultGenesis returns default genesis state as raw bytes for the evm
@ -146,6 +146,10 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
if err != nil {
panic(err)
}
if err := cfg.RegisterMigration(types.ModuleName, 4, m.Migrate4to5); err != nil {
panic(err)
}
}
// Route returns the message routing key for the evm module.

588
x/evm/types/evm.pb.go generated
View File

@ -34,7 +34,7 @@ type Params struct {
// enable_call toggles state transitions that use the vm.Call function
EnableCall bool `protobuf:"varint,3,opt,name=enable_call,json=enableCall,proto3" json:"enable_call,omitempty" yaml:"enable_call"`
// extra_eips defines the additional EIPs for the vm.Config
ExtraEIPs ExtraEIPs `protobuf:"bytes,4,opt,name=extra_eips,json=extraEips,proto3" json:"extra_eips" yaml:"extra_eips"`
ExtraEIPs []int64 `protobuf:"varint,4,rep,packed,name=extra_eips,json=extraEips,proto3" json:"extra_eips,omitempty" yaml:"extra_eips"`
// chain_config defines the EVM chain configuration parameters
ChainConfig ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=chainConfig,proto3" json:"chain_config" yaml:"chain_config"`
// allow_unprotected_txs defines if replay-protected (i.e non EIP155
@ -96,11 +96,11 @@ func (m *Params) GetEnableCall() bool {
return false
}
func (m *Params) GetExtraEIPs() ExtraEIPs {
func (m *Params) GetExtraEIPs() []int64 {
if m != nil {
return m.ExtraEIPs
}
return ExtraEIPs{}
return nil
}
func (m *Params) GetChainConfig() ChainConfig {
@ -117,52 +117,6 @@ func (m *Params) GetAllowUnprotectedTxs() bool {
return false
}
// ExtraEIPs represents extra EIPs for the vm.Config
type ExtraEIPs struct {
// eips defines the additional EIPs for the vm.Config
EIPs []int64 `protobuf:"varint,1,rep,packed,name=eips,proto3" json:"eips,omitempty" yaml:"eips"`
}
func (m *ExtraEIPs) Reset() { *m = ExtraEIPs{} }
func (m *ExtraEIPs) String() string { return proto.CompactTextString(m) }
func (*ExtraEIPs) ProtoMessage() {}
func (*ExtraEIPs) Descriptor() ([]byte, []int) {
return fileDescriptor_d21ecc92c8c8583e, []int{1}
}
func (m *ExtraEIPs) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ExtraEIPs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ExtraEIPs.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ExtraEIPs) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExtraEIPs.Merge(m, src)
}
func (m *ExtraEIPs) XXX_Size() int {
return m.Size()
}
func (m *ExtraEIPs) XXX_DiscardUnknown() {
xxx_messageInfo_ExtraEIPs.DiscardUnknown(m)
}
var xxx_messageInfo_ExtraEIPs proto.InternalMessageInfo
func (m *ExtraEIPs) GetEIPs() []int64 {
if m != nil {
return m.EIPs
}
return nil
}
// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values
// instead of *big.Int.
type ChainConfig struct {
@ -211,7 +165,7 @@ func (m *ChainConfig) Reset() { *m = ChainConfig{} }
func (m *ChainConfig) String() string { return proto.CompactTextString(m) }
func (*ChainConfig) ProtoMessage() {}
func (*ChainConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_d21ecc92c8c8583e, []int{2}
return fileDescriptor_d21ecc92c8c8583e, []int{1}
}
func (m *ChainConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -266,7 +220,7 @@ func (m *State) Reset() { *m = State{} }
func (m *State) String() string { return proto.CompactTextString(m) }
func (*State) ProtoMessage() {}
func (*State) Descriptor() ([]byte, []int) {
return fileDescriptor_d21ecc92c8c8583e, []int{3}
return fileDescriptor_d21ecc92c8c8583e, []int{2}
}
func (m *State) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -323,7 +277,7 @@ func (m *TransactionLogs) Reset() { *m = TransactionLogs{} }
func (m *TransactionLogs) String() string { return proto.CompactTextString(m) }
func (*TransactionLogs) ProtoMessage() {}
func (*TransactionLogs) Descriptor() ([]byte, []int) {
return fileDescriptor_d21ecc92c8c8583e, []int{4}
return fileDescriptor_d21ecc92c8c8583e, []int{3}
}
func (m *TransactionLogs) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -399,7 +353,7 @@ func (m *Log) Reset() { *m = Log{} }
func (m *Log) String() string { return proto.CompactTextString(m) }
func (*Log) ProtoMessage() {}
func (*Log) Descriptor() ([]byte, []int) {
return fileDescriptor_d21ecc92c8c8583e, []int{5}
return fileDescriptor_d21ecc92c8c8583e, []int{4}
}
func (m *Log) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -514,7 +468,7 @@ func (m *TxResult) Reset() { *m = TxResult{} }
func (m *TxResult) String() string { return proto.CompactTextString(m) }
func (*TxResult) ProtoMessage() {}
func (*TxResult) Descriptor() ([]byte, []int) {
return fileDescriptor_d21ecc92c8c8583e, []int{6}
return fileDescriptor_d21ecc92c8c8583e, []int{5}
}
func (m *TxResult) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -555,7 +509,7 @@ func (m *AccessTuple) Reset() { *m = AccessTuple{} }
func (m *AccessTuple) String() string { return proto.CompactTextString(m) }
func (*AccessTuple) ProtoMessage() {}
func (*AccessTuple) Descriptor() ([]byte, []int) {
return fileDescriptor_d21ecc92c8c8583e, []int{7}
return fileDescriptor_d21ecc92c8c8583e, []int{6}
}
func (m *AccessTuple) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -615,7 +569,7 @@ func (m *TraceConfig) Reset() { *m = TraceConfig{} }
func (m *TraceConfig) String() string { return proto.CompactTextString(m) }
func (*TraceConfig) ProtoMessage() {}
func (*TraceConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_d21ecc92c8c8583e, []int{8}
return fileDescriptor_d21ecc92c8c8583e, []int{7}
}
func (m *TraceConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@ -723,7 +677,6 @@ func (m *TraceConfig) GetTracerJsonConfig() string {
func init() {
proto.RegisterType((*Params)(nil), "ethermint.evm.v1.Params")
proto.RegisterType((*ExtraEIPs)(nil), "ethermint.evm.v1.ExtraEIPs")
proto.RegisterType((*ChainConfig)(nil), "ethermint.evm.v1.ChainConfig")
proto.RegisterType((*State)(nil), "ethermint.evm.v1.State")
proto.RegisterType((*TransactionLogs)(nil), "ethermint.evm.v1.TransactionLogs")
@ -736,110 +689,108 @@ func init() {
func init() { proto.RegisterFile("ethermint/evm/v1/evm.proto", fileDescriptor_d21ecc92c8c8583e) }
var fileDescriptor_d21ecc92c8c8583e = []byte{
// 1644 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x4f, 0x6f, 0xe3, 0xc6,
0x15, 0xb7, 0x2d, 0xda, 0xa6, 0x46, 0xb2, 0x44, 0x8f, 0xb5, 0x5e, 0x65, 0x17, 0x35, 0x5d, 0x1e,
0x02, 0x17, 0x4d, 0xec, 0xd8, 0x81, 0xd1, 0x45, 0x82, 0x16, 0x5d, 0xed, 0x3a, 0x89, 0xdd, 0x6d,
0x6a, 0x8c, 0x1d, 0x14, 0x28, 0x50, 0x10, 0x23, 0x72, 0x42, 0x31, 0x26, 0x39, 0xc2, 0xcc, 0x50,
0x2b, 0xb5, 0xfd, 0x00, 0x05, 0x7a, 0xe9, 0x27, 0x28, 0x72, 0xee, 0x27, 0x09, 0x7a, 0xda, 0x63,
0xd1, 0x03, 0x51, 0x78, 0x6f, 0x3e, 0xea, 0x13, 0x14, 0xf3, 0x47, 0xd4, 0x1f, 0x1b, 0x6d, 0xad,
0x93, 0xe7, 0xf7, 0xde, 0x9b, 0xdf, 0x6f, 0xde, 0x9b, 0x37, 0x9e, 0xa1, 0xc0, 0x33, 0x22, 0x7a,
0x84, 0xa5, 0x71, 0x26, 0x8e, 0xc8, 0x20, 0x3d, 0x1a, 0x1c, 0xcb, 0x3f, 0x87, 0x7d, 0x46, 0x05,
0x85, 0x4e, 0xe9, 0x3b, 0x94, 0xc6, 0xc1, 0xf1, 0xb3, 0x56, 0x44, 0x23, 0xaa, 0x9c, 0x47, 0x72,
0xa4, 0xe3, 0xbc, 0xbf, 0x57, 0xc0, 0xc6, 0x25, 0x66, 0x38, 0xe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xb8, 0xa0, 0xee, 0x88, 0xee, 0x86, 0xfa, 0xd1, 0xe0, 0xd3, 0xff, 0x04,
0x00, 0x00, 0xff, 0xff, 0x68, 0xce, 0x8e, 0x23, 0x7a, 0x10, 0x00, 0x00,
// 1608 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdd, 0x6e, 0xe3, 0xc6,
0x15, 0xb6, 0x2d, 0xda, 0xa6, 0x46, 0xb2, 0x44, 0x8f, 0xb5, 0x8e, 0xb2, 0x8b, 0x9a, 0x2e, 0x2f,
0x0a, 0x17, 0x48, 0xec, 0xd8, 0x81, 0xd1, 0x45, 0x82, 0x16, 0xb5, 0x76, 0x9d, 0xc4, 0xee, 0x36,
0x35, 0xc6, 0x0e, 0x0a, 0x14, 0x28, 0x88, 0x11, 0x39, 0xa1, 0x18, 0x93, 0x1c, 0x61, 0x66, 0xa8,
0x95, 0xda, 0x3e, 0x40, 0x8b, 0xde, 0xf4, 0x09, 0x8a, 0x3c, 0x4e, 0xd0, 0xab, 0xbd, 0x2c, 0x7a,
0x41, 0x14, 0xde, 0x3b, 0x5f, 0xea, 0x09, 0x8a, 0xf9, 0x11, 0xf5, 0x63, 0xa3, 0xad, 0x75, 0xe5,
0xf9, 0xce, 0x39, 0xf3, 0x7d, 0x33, 0x67, 0xce, 0x68, 0x0e, 0x0d, 0x9e, 0x13, 0xd1, 0x23, 0x2c,
0x8d, 0x33, 0x71, 0x44, 0x06, 0xe9, 0xd1, 0xe0, 0x58, 0xfe, 0x39, 0xec, 0x33, 0x2a, 0x28, 0x74,
0x4a, 0xdf, 0xa1, 0x34, 0x0e, 0x8e, 0x9f, 0xb7, 0x22, 0x1a, 0x51, 0xe5, 0x3c, 0x92, 0x23, 0x1d,
0xe7, 0xfd, 0xa5, 0x02, 0x36, 0xae, 0x30, 0xc3, 0x29, 0x87, 0xc7, 0xa0, 0x4a, 0x06, 0xa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, 0x24, 0x5c, 0xb5, 0x3a, 0xff, 0xeb, 0x5b, 0x0b, 0x4d, 0xe3, 0xe5, 0xe6, 0xcc, 0xa7,
0x60, 0x4a, 0x52, 0xca, 0x46, 0xaa, 0x77, 0x31, 0x9b, 0xd3, 0x8e, 0x5f, 0x2b, 0x3b, 0x9a, 0x43,
0xb0, 0x03, 0xa0, 0x99, 0xc6, 0x88, 0xc8, 0x59, 0xe6, 0xab, 0xfb, 0x5f, 0x57, 0x73, 0xd5, 0x2d,
0xd4, 0x5e, 0xa4, 0x9c, 0xaf, 0xb1, 0xc0, 0xe8, 0x81, 0x05, 0xfe, 0x02, 0x40, 0x7d, 0x26, 0xfe,
0x77, 0x9c, 0x96, 0x1f, 0x8b, 0xba, 0xb5, 0x50, 0xfa, 0xda, 0x6b, 0xd6, 0xec, 0x68, 0x74, 0xc9,
0xa9, 0xd9, 0xc5, 0xa5, 0x65, 0x5b, 0xce, 0xfa, 0xa5, 0x65, 0x6f, 0x3a, 0x76, 0x99, 0x3f, 0xb3,
0x0b, 0xb4, 0x33, 0xc1, 0x33, 0xcb, 0xeb, 0xfc, 0xf2, 0x87, 0xbb, 0xbd, 0xd5, 0x77, 0x77, 0x7b,
0xab, 0xff, 0xbe, 0xdb, 0x5b, 0xfd, 0xdb, 0xfb, 0xbd, 0x95, 0x77, 0xef, 0xf7, 0x56, 0xfe, 0xf9,
0x7e, 0x6f, 0xe5, 0x77, 0xb3, 0xef, 0x03, 0x19, 0xc8, 0xe7, 0x61, 0xfa, 0xfd, 0x3f, 0x54, 0xff,
0x01, 0x50, 0x6f, 0x44, 0x77, 0x43, 0x7d, 0xd9, 0x7f, 0xfa, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff,
0xe2, 0xe1, 0x18, 0x7a, 0x1f, 0x10, 0x00, 0x00,
}
func (m *Params) Marshal() (dAtA []byte, err error) {
@ -882,16 +833,25 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
}
i--
dAtA[i] = 0x2a
{
size, err := m.ExtraEIPs.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
if len(m.ExtraEIPs) > 0 {
dAtA3 := make([]byte, len(m.ExtraEIPs)*10)
var j2 int
for _, num1 := range m.ExtraEIPs {
num := uint64(num1)
for num >= 1<<7 {
dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j2++
}
dAtA3[j2] = uint8(num)
j2++
}
i -= size
i = encodeVarintEvm(dAtA, i, uint64(size))
i -= j2
copy(dAtA[i:], dAtA3[:j2])
i = encodeVarintEvm(dAtA, i, uint64(j2))
i--
dAtA[i] = 0x22
}
i--
dAtA[i] = 0x22
if m.EnableCall {
i--
if m.EnableCall {
@ -922,48 +882,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *ExtraEIPs) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ExtraEIPs) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *ExtraEIPs) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.EIPs) > 0 {
dAtA4 := make([]byte, len(m.EIPs)*10)
var j3 int
for _, num1 := range m.EIPs {
num := uint64(num1)
for num >= 1<<7 {
dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j3++
}
dAtA4[j3] = uint8(num)
j3++
}
i -= j3
copy(dAtA[i:], dAtA4[:j3])
i = encodeVarintEvm(dAtA, i, uint64(j3))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *ChainConfig) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@ -1637,8 +1555,13 @@ func (m *Params) Size() (n int) {
if m.EnableCall {
n += 2
}
l = m.ExtraEIPs.Size()
n += 1 + l + sovEvm(uint64(l))
if len(m.ExtraEIPs) > 0 {
l = 0
for _, e := range m.ExtraEIPs {
l += sovEvm(uint64(e))
}
n += 1 + sovEvm(uint64(l)) + l
}
l = m.ChainConfig.Size()
n += 1 + l + sovEvm(uint64(l))
if m.AllowUnprotectedTxs {
@ -1647,22 +1570,6 @@ func (m *Params) Size() (n int) {
return n
}
func (m *ExtraEIPs) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.EIPs) > 0 {
l = 0
for _, e := range m.EIPs {
l += sovEvm(uint64(e))
}
n += 1 + sovEvm(uint64(l)) + l
}
return n
}
func (m *ChainConfig) Size() (n int) {
if m == nil {
return 0
@ -2028,38 +1935,81 @@ func (m *Params) Unmarshal(dAtA []byte) error {
}
m.EnableCall = bool(v != 0)
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ExtraEIPs", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
if wireType == 0 {
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
if iNdEx >= l {
m.ExtraEIPs = append(m.ExtraEIPs, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthEvm
}
postIndex := iNdEx + packedLen
if postIndex < 0 {
return ErrInvalidLengthEvm
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
var elementCount int
var count int
for _, integer := range dAtA[iNdEx:postIndex] {
if integer < 128 {
count++
}
}
elementCount = count
if elementCount != 0 && len(m.ExtraEIPs) == 0 {
m.ExtraEIPs = make([]int64, 0, elementCount)
}
for iNdEx < postIndex {
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.ExtraEIPs = append(m.ExtraEIPs, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field ExtraEIPs", wireType)
}
if msglen < 0 {
return ErrInvalidLengthEvm
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthEvm
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.ExtraEIPs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ChainConfig", wireType)
@ -2134,132 +2084,6 @@ func (m *Params) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *ExtraEIPs) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ExtraEIPs: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ExtraEIPs: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType == 0 {
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.EIPs = append(m.EIPs, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthEvm
}
postIndex := iNdEx + packedLen
if postIndex < 0 {
return ErrInvalidLengthEvm
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
var elementCount int
var count int
for _, integer := range dAtA[iNdEx:postIndex] {
if integer < 128 {
count++
}
}
elementCount = count
if elementCount != 0 && len(m.EIPs) == 0 {
m.EIPs = make([]int64, 0, elementCount)
}
for iNdEx < postIndex {
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowEvm
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.EIPs = append(m.EIPs, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field EIPs", wireType)
}
default:
iNdEx = preIndex
skippy, err := skipEvm(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthEvm
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ChainConfig) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0

View File

@ -40,6 +40,7 @@ const (
const (
prefixCode = iota + 1
prefixStorage
prefixParams
)
// prefix bytes for the EVM transient store
@ -54,6 +55,7 @@ const (
var (
KeyPrefixCode = []byte{prefixCode}
KeyPrefixStorage = []byte{prefixStorage}
KeyPrefixParams = []byte{prefixParams}
)
// Transient Store key prefixes

View File

@ -22,7 +22,6 @@ import (
"github.com/ethereum/go-ethereum/params"
sdk "github.com/cosmos/cosmos-sdk/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/evmos/ethermint/types"
)
@ -37,33 +36,18 @@ var (
// DefaultEnableCall enables contract calls (i.e true)
DefaultEnableCall = true
// DefaultExtraEIPs defines the set of activateable Ethereum Improvement Proposals
DefaultExtraEIPs = ExtraEIPs{AvailableExtraEIPs}
DefaultExtraEIPs = AvailableExtraEIPs
)
// Parameter keys
var (
ParamStoreKeyEVMDenom = []byte("EVMDenom")
ParamStoreKeyEnableCreate = []byte("EnableCreate")
ParamStoreKeyEnableCall = []byte("EnableCall")
ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs")
ParamStoreKeyChainConfig = []byte("ChainConfig")
ParamStoreKeyAllowUnprotectedTxs = []byte("AllowUnprotectedTxs")
// 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/master/core/vm/interpreter.go#L97
AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529}
)
// ParamKeyTable returns the parameter key table.
func ParamKeyTable() paramtypes.KeyTable {
return paramtypes.NewKeyTable().RegisterParamSet(&Params{})
}
// 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/master/core/vm/interpreter.go#L97
var AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529}
// NewParams creates a new Params instance
func NewParams(evmDenom string, allowUnprotectedTxs, enableCreate, enableCall bool, config ChainConfig, extraEIPs ExtraEIPs) Params {
func NewParams(evmDenom string, allowUnprotectedTxs, enableCreate, enableCall bool, config ChainConfig, extraEIPs []int64) Params {
return Params{
EvmDenom: evmDenom,
AllowUnprotectedTxs: allowUnprotectedTxs,
@ -87,25 +71,13 @@ func DefaultParams() Params {
}
}
// ParamSetPairs returns the parameter set pairs.
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
return paramtypes.ParamSetPairs{
paramtypes.NewParamSetPair(ParamStoreKeyEVMDenom, &p.EvmDenom, validateEVMDenom),
paramtypes.NewParamSetPair(ParamStoreKeyEnableCreate, &p.EnableCreate, validateBool),
paramtypes.NewParamSetPair(ParamStoreKeyEnableCall, &p.EnableCall, validateBool),
paramtypes.NewParamSetPair(ParamStoreKeyExtraEIPs, &p.ExtraEIPs.EIPs, validateEIPs),
paramtypes.NewParamSetPair(ParamStoreKeyChainConfig, &p.ChainConfig, validateChainConfig),
paramtypes.NewParamSetPair(ParamStoreKeyAllowUnprotectedTxs, &p.AllowUnprotectedTxs, validateBool),
}
}
// Validate performs basic validation on evm parameters.
func (p Params) Validate() error {
if err := validateEVMDenom(p.EvmDenom); err != nil {
return err
}
if err := validateEIPs(p.ExtraEIPs.EIPs); err != nil {
if err := validateEIPs(p.ExtraEIPs); err != nil {
return err
}
@ -126,8 +98,8 @@ func (p Params) Validate() error {
// EIPs returns the ExtraEIPS as a int slice
func (p Params) EIPs() []int {
eips := make([]int, len(p.ExtraEIPs.EIPs))
for i, eip := range p.ExtraEIPs.EIPs {
eips := make([]int, len(p.ExtraEIPs))
for i, eip := range p.ExtraEIPs {
eips[i] = int(eip)
}
return eips

View File

@ -0,0 +1,51 @@
// Copyright 2021 Evmos Foundation
// This file is part of Evmos' Ethermint library.
//
// The Ethermint library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The Ethermint library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with the Ethermint library. If not, see https://github.com/evmos/ethermint/blob/main/LICENSE
package types
import paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
// Parameter keys
var (
ParamStoreKeyEVMDenom = []byte("EVMDenom")
ParamStoreKeyEnableCreate = []byte("EnableCreate")
ParamStoreKeyEnableCall = []byte("EnableCall")
ParamStoreKeyExtraEIPs = []byte("EnableExtraEIPs")
ParamStoreKeyChainConfig = []byte("ChainConfig")
ParamStoreKeyAllowUnprotectedTxs = []byte("AllowUnprotectedTxs")
)
// Deprecated: ParamKeyTable returns the parameter key table.
// Usage of x/params to manage parameters is deprecated in favor of x/gov
// controlled execution of MsgUpdateParams messages. These types remain solely
// for migration purposes and will be removed in a future release.
func ParamKeyTable() paramtypes.KeyTable {
return paramtypes.NewKeyTable().RegisterParamSet(&Params{})
}
// Deprecated: ParamSetPairs returns the parameter set pairs.
// Usage of x/params to manage parameters is deprecated in favor of x/gov
// controlled execution of MsgUpdateParams messages. These types remain solely
// for migration purposes and will be removed in a future release.
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
return paramtypes.ParamSetPairs{
paramtypes.NewParamSetPair(ParamStoreKeyEVMDenom, &p.EvmDenom, validateEVMDenom),
paramtypes.NewParamSetPair(ParamStoreKeyEnableCreate, &p.EnableCreate, validateBool),
paramtypes.NewParamSetPair(ParamStoreKeyEnableCall, &p.EnableCall, validateBool),
paramtypes.NewParamSetPair(ParamStoreKeyExtraEIPs, &p.ExtraEIPs, validateEIPs),
paramtypes.NewParamSetPair(ParamStoreKeyChainConfig, &p.ChainConfig, validateChainConfig),
paramtypes.NewParamSetPair(ParamStoreKeyAllowUnprotectedTxs, &p.AllowUnprotectedTxs, validateBool),
}
}

View File

@ -9,7 +9,7 @@ import (
)
func TestParamsValidate(t *testing.T) {
extraEips := ExtraEIPs{[]int64{2929, 1884, 1344}}
extraEips := []int64{2929, 1884, 1344}
testCases := []struct {
name string
params Params
@ -37,7 +37,7 @@ func TestParamsValidate(t *testing.T) {
"invalid eip",
Params{
EvmDenom: "stake",
ExtraEIPs: ExtraEIPs{[]int64{1}},
ExtraEIPs: []int64{1},
},
true,
},
@ -55,7 +55,7 @@ func TestParamsValidate(t *testing.T) {
}
func TestParamsEIPs(t *testing.T) {
extraEips := ExtraEIPs{[]int64{2929, 1884, 1344}}
extraEips := []int64{2929, 1884, 1344}
params := NewParams("ara", false, true, true, DefaultChainConfig(), extraEips)
actual := params.EIPs()