diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e10c6558a..c23f832634 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes * (rpc) [#1613](https://github.com/evmos/ethermint/pull/1613) Change the default json-rpc listen address to localhost. +* (upgrade) [#1617](https://github.com/evmos/ethermint/pull/1617) Refactor `evm` module's parameters to store them under a single store key * (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. ### Improvements diff --git a/app/ante/eth.go b/app/ante/eth.go index f1d590dae6..2402167be7 100644 --- a/app/ante/eth.go +++ b/app/ante/eth.go @@ -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 { diff --git a/app/ante/fee_market.go b/app/ante/fee_market.go index faa6cf8301..d92261bb36 100644 --- a/app/ante/fee_market.go +++ b/app/ante/fee_market.go @@ -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()) diff --git a/app/ante/fees.go b/app/ante/fees.go index 356a4ba0e1..8c207b7cbf 100644 --- a/app/ante/fees.go +++ b/app/ante/fees.go @@ -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() { diff --git a/app/ante/interfaces.go b/app/ante/interfaces.go index e312b3d4c5..e48e0a50a4 100644 --- a/app/ante/interfaces.go +++ b/app/ante/interfaces.go @@ -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 { diff --git a/app/ante/setup.go b/app/ante/setup.go index ca61f6210d..7ea81a6094 100644 --- a/app/ante/setup.go +++ b/app/ante/setup.go @@ -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) diff --git a/app/ante/sigverify.go b/app/ante/sigverify.go index 8a7a6c5ccb..bf590496db 100644 --- a/app/ante/sigverify.go +++ b/app/ante/sigverify.go @@ -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( diff --git a/app/app.go b/app/app.go index d9d42e82f8..7e5b3e8982 100644 --- a/app/app.go +++ b/app/app.go @@ -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 } diff --git a/proto/ethermint/evm/v1/evm.proto b/proto/ethermint/evm/v1/evm.proto index dc9105114b..9535335234 100644 --- a/proto/ethermint/evm/v1/evm.proto +++ b/proto/ethermint/evm/v1/evm.proto @@ -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 { diff --git a/x/evm/handler_test.go b/x/evm/handler_test.go index 4a7d43a3ca..a554c6ee6a 100644 --- a/x/evm/handler_test.go +++ b/x/evm/handler_test.go @@ -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) diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index b1cc2a3778..2d3e90a175 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -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) diff --git a/x/evm/keeper/migrations.go b/x/evm/keeper/migrations.go index f791e3042f..edb9c70eab 100644 --- a/x/evm/keeper/migrations.go +++ b/x/evm/keeper/migrations.go @@ -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) +} diff --git a/x/evm/keeper/params.go b/x/evm/keeper/params.go index 2ad6bd4891..4ecd953192 100644 --- a/x/evm/keeper/params.go +++ b/x/evm/keeper/params.go @@ -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, ¶ms) + 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(¶ms) + 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, ¶ms) 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) -} diff --git a/x/evm/keeper/params_test.go b/x/evm/keeper/params_test.go index 7c62f504de..9831043073 100644 --- a/x/evm/keeper/params_test.go +++ b/x/evm/keeper/params_test.go @@ -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, }, diff --git a/x/evm/keeper/utils_test.go b/x/evm/keeper/utils_test.go index c55868addb..f14e119f29 100644 --- a/x/evm/keeper/utils_test.go +++ b/x/evm/keeper/utils_test.go @@ -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) diff --git a/x/evm/migrations/v4/migrate.go b/x/evm/migrations/v4/migrate.go index f9ba9eb1b2..f7e5b7a069 100644 --- a/x/evm/migrations/v4/migrate.go +++ b/x/evm/migrations/v4/migrate.go @@ -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, ¶ms) if err := params.Validate(); err != nil { return err } - chainCfgBz := cdc.MustMarshal(¶ms.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}) - } - - if params.EnableCall { - store.Set(types.ParamStoreKeyEnableCall, []byte{0x01}) + bz, err := cdc.Marshal(¶ms) + if err != nil { + return err } - if params.EnableCreate { - store.Set(types.ParamStoreKeyEnableCreate, []byte{0x01}) - } + store := ctx.KVStore(storeKey) + store.Set(types.KeyPrefixParams, bz) return nil } diff --git a/x/evm/migrations/v4/migrate_test.go b/x/evm/migrations/v4/migrate_test.go index 8cfe022368..f705bd875e 100644 --- a/x/evm/migrations/v4/migrate_test.go +++ b/x/evm/migrations/v4/migrate_test.go @@ -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) - - 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) + paramsBz := kvStore.Get(types.KeyPrefixParams) + var params types.Params + cdc.MustUnmarshal(paramsBz, ¶ms) - params := types.NewParams(evmDenom, allowUnprotectedTx.Value, enableCreate, enableCall, chainCfg, extraEIPs) - require.Equal(t, legacySubspace.ps, params) + require.Equal(t, params, legacySubspace.ps) } diff --git a/x/evm/migrations/v4/types/chain_config.go b/x/evm/migrations/v4/types/chain_config.go deleted file mode 100644 index 67f602502a..0000000000 --- a/x/evm/migrations/v4/types/chain_config.go +++ /dev/null @@ -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 ¶ms.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 -} diff --git a/x/evm/migrations/v4/types/evm.pb.go b/x/evm/migrations/v4/types/evm.pb.go index 7f980359d9..8bb45ed195 100644 --- a/x/evm/migrations/v4/types/evm.pb.go +++ b/x/evm/migrations/v4/types/evm.pb.go @@ -26,19 +26,19 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // V4Params defines the EVM module parameters type V4Params struct { - // evm_denom represents the token denomination used to run the EVM state + // evm_denom represents the token denomination used to run the EVM V4State // transitions. EvmDenom string `protobuf:"bytes,1,opt,name=evm_denom,json=evmDenom,proto3" json:"evm_denom,omitempty" yaml:"evm_denom"` - // enable_create toggles state transitions that use the vm.Create function + // enable_create toggles V4State transitions that use the vm.Create function EnableCreate bool `protobuf:"varint,2,opt,name=enable_create,json=enableCreate,proto3" json:"enable_create,omitempty" yaml:"enable_create"` - // enable_call toggles state transitions that use the vm.Call function + // enable_call toggles V4State 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"` + // repeated int64 extra_eips = 4 [(gogoproto.customname) = "V4ExtraEIPs", (gogoproto.moretags) = "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"` + V4ChainConfig V4ChainConfig `protobuf:"bytes,5,opt,name=chain_config,json=V4ChainConfig,proto3" json:"chain_config" yaml:"chain_config"` // allow_unprotected_txs defines if replay-protected (i.e non EIP155 - // signed) transactions can be executed on the state machine. + // signed) transactions can be executed on the V4State machine. AllowUnprotectedTxs bool `protobuf:"varint,6,opt,name=allow_unprotected_txs,json=allowUnprotectedTxs,proto3" json:"allow_unprotected_txs,omitempty"` } @@ -96,18 +96,11 @@ func (m *V4Params) GetEnableCall() bool { return false } -func (m *V4Params) GetExtraEIPs() ExtraEIPs { +func (m *V4Params) GetV4ChainConfig() V4ChainConfig { if m != nil { - return m.ExtraEIPs + return m.V4ChainConfig } - return ExtraEIPs{} -} - -func (m *V4Params) GetChainConfig() ChainConfig { - if m != nil { - return m.ChainConfig - } - return ChainConfig{} + return V4ChainConfig{} } func (m *V4Params) GetAllowUnprotectedTxs() bool { @@ -117,24 +110,24 @@ func (m *V4Params) GetAllowUnprotectedTxs() bool { return false } -// ExtraEIPs represents extra EIPs for the vm.Config -type ExtraEIPs struct { +// V4ExtraEIPs represents extra EIPs for the vm.Config +type V4ExtraEIPs 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"` + EIPs []int64 `protobuf:"varint,1,rep,packed,name=extra_eips,json=V4ExtraEIPs,proto3" json:"extra_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) { +func (m *V4ExtraEIPs) Reset() { *m = V4ExtraEIPs{} } +func (m *V4ExtraEIPs) String() string { return proto.CompactTextString(m) } +func (*V4ExtraEIPs) ProtoMessage() {} +func (*V4ExtraEIPs) Descriptor() ([]byte, []int) { return fileDescriptor_d21ecc92c8c8583e, []int{1} } -func (m *ExtraEIPs) XXX_Unmarshal(b []byte) error { +func (m *V4ExtraEIPs) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ExtraEIPs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *V4ExtraEIPs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ExtraEIPs.Marshal(b, m, deterministic) + return xxx_messageInfo_V4ExtraEIPs.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -144,28 +137,28 @@ func (m *ExtraEIPs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *ExtraEIPs) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtraEIPs.Merge(m, src) +func (m *V4ExtraEIPs) XXX_Merge(src proto.Message) { + xxx_messageInfo_V4ExtraEIPs.Merge(m, src) } -func (m *ExtraEIPs) XXX_Size() int { +func (m *V4ExtraEIPs) XXX_Size() int { return m.Size() } -func (m *ExtraEIPs) XXX_DiscardUnknown() { - xxx_messageInfo_ExtraEIPs.DiscardUnknown(m) +func (m *V4ExtraEIPs) XXX_DiscardUnknown() { + xxx_messageInfo_V4ExtraEIPs.DiscardUnknown(m) } -var xxx_messageInfo_ExtraEIPs proto.InternalMessageInfo +var xxx_messageInfo_V4ExtraEIPs proto.InternalMessageInfo -func (m *ExtraEIPs) GetEIPs() []int64 { +func (m *V4ExtraEIPs) GetEIPs() []int64 { if m != nil { return m.EIPs } return nil } -// ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values +// V4ChainConfig defines the Ethereum V4ChainConfig parameters using *sdk.Int values // instead of *big.Int. -type ChainConfig struct { +type V4ChainConfig struct { // homestead_block switch (nil no fork, 0 = already homestead) HomesteadBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=homestead_block,json=homesteadBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"homestead_block,omitempty" yaml:"homestead_block"` // dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) @@ -207,18 +200,18 @@ type ChainConfig struct { CancunBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,23,opt,name=cancun_block,json=cancunBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"cancun_block,omitempty" yaml:"cancun_block"` } -func (m *ChainConfig) Reset() { *m = ChainConfig{} } -func (m *ChainConfig) String() string { return proto.CompactTextString(m) } -func (*ChainConfig) ProtoMessage() {} -func (*ChainConfig) Descriptor() ([]byte, []int) { +func (m *V4ChainConfig) Reset() { *m = V4ChainConfig{} } +func (m *V4ChainConfig) String() string { return proto.CompactTextString(m) } +func (*V4ChainConfig) ProtoMessage() {} +func (*V4ChainConfig) Descriptor() ([]byte, []int) { return fileDescriptor_d21ecc92c8c8583e, []int{2} } -func (m *ChainConfig) XXX_Unmarshal(b []byte) error { +func (m *V4ChainConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ChainConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *V4ChainConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ChainConfig.Marshal(b, m, deterministic) + return xxx_messageInfo_V4ChainConfig.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -228,52 +221,52 @@ func (m *ChainConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *ChainConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainConfig.Merge(m, src) +func (m *V4ChainConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_V4ChainConfig.Merge(m, src) } -func (m *ChainConfig) XXX_Size() int { +func (m *V4ChainConfig) XXX_Size() int { return m.Size() } -func (m *ChainConfig) XXX_DiscardUnknown() { - xxx_messageInfo_ChainConfig.DiscardUnknown(m) +func (m *V4ChainConfig) XXX_DiscardUnknown() { + xxx_messageInfo_V4ChainConfig.DiscardUnknown(m) } -var xxx_messageInfo_ChainConfig proto.InternalMessageInfo +var xxx_messageInfo_V4ChainConfig proto.InternalMessageInfo -func (m *ChainConfig) GetDAOForkSupport() bool { +func (m *V4ChainConfig) GetDAOForkSupport() bool { if m != nil { return m.DAOForkSupport } return false } -func (m *ChainConfig) GetEIP150Hash() string { +func (m *V4ChainConfig) GetEIP150Hash() string { if m != nil { return m.EIP150Hash } return "" } -// State represents a single Storage key value pair item. -type State struct { +// V4State represents a single Storage key value pair item. +type V4State struct { // key is the stored key Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // value is the stored value for the given key Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *State) Reset() { *m = State{} } -func (m *State) String() string { return proto.CompactTextString(m) } -func (*State) ProtoMessage() {} -func (*State) Descriptor() ([]byte, []int) { +func (m *V4State) Reset() { *m = V4State{} } +func (m *V4State) String() string { return proto.CompactTextString(m) } +func (*V4State) ProtoMessage() {} +func (*V4State) Descriptor() ([]byte, []int) { return fileDescriptor_d21ecc92c8c8583e, []int{3} } -func (m *State) XXX_Unmarshal(b []byte) error { +func (m *V4State) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *V4State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_State.Marshal(b, m, deterministic) + return xxx_messageInfo_V4State.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -283,54 +276,54 @@ func (m *State) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *State) XXX_Merge(src proto.Message) { - xxx_messageInfo_State.Merge(m, src) +func (m *V4State) XXX_Merge(src proto.Message) { + xxx_messageInfo_V4State.Merge(m, src) } -func (m *State) XXX_Size() int { +func (m *V4State) XXX_Size() int { return m.Size() } -func (m *State) XXX_DiscardUnknown() { - xxx_messageInfo_State.DiscardUnknown(m) +func (m *V4State) XXX_DiscardUnknown() { + xxx_messageInfo_V4State.DiscardUnknown(m) } -var xxx_messageInfo_State proto.InternalMessageInfo +var xxx_messageInfo_V4State proto.InternalMessageInfo -func (m *State) GetKey() string { +func (m *V4State) GetKey() string { if m != nil { return m.Key } return "" } -func (m *State) GetValue() string { +func (m *V4State) GetValue() string { if m != nil { return m.Value } return "" } -// TransactionLogs define the logs generated from a transaction execution +// V4TransactionV4Logs define the V4Logs generated from a transaction execution // with a given hash. It it used for import/export data as transactions are not -// persisted on blockchain state after an upgrade. -type TransactionLogs struct { +// persisted on blockchain V4State after an upgrade. +type V4TransactionV4Logs struct { // hash of the transaction Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - // logs is an array of Logs for the given transaction hash - Logs []*Log `protobuf:"bytes,2,rep,name=logs,proto3" json:"logs,omitempty"` + // V4Logs is an array of V4Logs for the given transaction hash + V4Logs []*V4Log `protobuf:"bytes,2,rep,name=V4Logs,proto3" json:"V4Logs,omitempty"` } -func (m *TransactionLogs) Reset() { *m = TransactionLogs{} } -func (m *TransactionLogs) String() string { return proto.CompactTextString(m) } -func (*TransactionLogs) ProtoMessage() {} -func (*TransactionLogs) Descriptor() ([]byte, []int) { +func (m *V4TransactionV4Logs) Reset() { *m = V4TransactionV4Logs{} } +func (m *V4TransactionV4Logs) String() string { return proto.CompactTextString(m) } +func (*V4TransactionV4Logs) ProtoMessage() {} +func (*V4TransactionV4Logs) Descriptor() ([]byte, []int) { return fileDescriptor_d21ecc92c8c8583e, []int{4} } -func (m *TransactionLogs) XXX_Unmarshal(b []byte) error { +func (m *V4TransactionV4Logs) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TransactionLogs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *V4TransactionV4Logs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TransactionLogs.Marshal(b, m, deterministic) + return xxx_messageInfo_V4TransactionV4Logs.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -340,39 +333,39 @@ func (m *TransactionLogs) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *TransactionLogs) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransactionLogs.Merge(m, src) +func (m *V4TransactionV4Logs) XXX_Merge(src proto.Message) { + xxx_messageInfo_V4TransactionV4Logs.Merge(m, src) } -func (m *TransactionLogs) XXX_Size() int { +func (m *V4TransactionV4Logs) XXX_Size() int { return m.Size() } -func (m *TransactionLogs) XXX_DiscardUnknown() { - xxx_messageInfo_TransactionLogs.DiscardUnknown(m) +func (m *V4TransactionV4Logs) XXX_DiscardUnknown() { + xxx_messageInfo_V4TransactionV4Logs.DiscardUnknown(m) } -var xxx_messageInfo_TransactionLogs proto.InternalMessageInfo +var xxx_messageInfo_V4TransactionV4Logs proto.InternalMessageInfo -func (m *TransactionLogs) GetHash() string { +func (m *V4TransactionV4Logs) GetHash() string { if m != nil { return m.Hash } return "" } -func (m *TransactionLogs) GetLogs() []*Log { +func (m *V4TransactionV4Logs) GetV4Logs() []*V4Log { if m != nil { - return m.Logs + return m.V4Logs } return nil } -// Log represents an protobuf compatible Ethereum Log that defines a contract -// log event. These events are generated by the LOG opcode and stored/indexed by +// V4Log represents an protobuf compatible Ethereum V4Log that defines a contract +// V4Log event. These events are generated by the V4Log opcode and stored/indexed by // the node. // // NOTE: address, topics and data are consensus fields. The rest of the fields // are derived, i.e. filled in by the nodes, but not secured by consensus. -type Log struct { +type V4Log struct { // address of the contract that generated the event Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // topics is a list of topics provided by the contract. @@ -387,26 +380,26 @@ type Log struct { TxIndex uint64 `protobuf:"varint,6,opt,name=tx_index,json=txIndex,proto3" json:"transactionIndex"` // block_hash of the block in which the transaction was included BlockHash string `protobuf:"bytes,7,opt,name=block_hash,json=blockHash,proto3" json:"blockHash"` - // index of the log in the block - Index uint64 `protobuf:"varint,8,opt,name=index,proto3" json:"logIndex"` - // removed is true if this log was reverted due to a chain - // reorganisation. You must pay attention to this field if you receive logs + // index of the V4Log in the block + Index uint64 `protobuf:"varint,8,opt,name=index,proto3" json:"V4LogIndex"` + // removed is true if this V4Log was reverted due to a chain + // reorganisation. You must pay attention to this field if you receive V4Logs // through a filter query. Removed bool `protobuf:"varint,9,opt,name=removed,proto3" json:"removed,omitempty"` } -func (m *Log) Reset() { *m = Log{} } -func (m *Log) String() string { return proto.CompactTextString(m) } -func (*Log) ProtoMessage() {} -func (*Log) Descriptor() ([]byte, []int) { +func (m *V4Log) Reset() { *m = V4Log{} } +func (m *V4Log) String() string { return proto.CompactTextString(m) } +func (*V4Log) ProtoMessage() {} +func (*V4Log) Descriptor() ([]byte, []int) { return fileDescriptor_d21ecc92c8c8583e, []int{5} } -func (m *Log) XXX_Unmarshal(b []byte) error { +func (m *V4Log) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *V4Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Log.Marshal(b, m, deterministic) + return xxx_messageInfo_V4Log.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -416,92 +409,92 @@ func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Log) XXX_Merge(src proto.Message) { - xxx_messageInfo_Log.Merge(m, src) +func (m *V4Log) XXX_Merge(src proto.Message) { + xxx_messageInfo_V4Log.Merge(m, src) } -func (m *Log) XXX_Size() int { +func (m *V4Log) XXX_Size() int { return m.Size() } -func (m *Log) XXX_DiscardUnknown() { - xxx_messageInfo_Log.DiscardUnknown(m) +func (m *V4Log) XXX_DiscardUnknown() { + xxx_messageInfo_V4Log.DiscardUnknown(m) } -var xxx_messageInfo_Log proto.InternalMessageInfo +var xxx_messageInfo_V4Log proto.InternalMessageInfo -func (m *Log) GetAddress() string { +func (m *V4Log) GetAddress() string { if m != nil { return m.Address } return "" } -func (m *Log) GetTopics() []string { +func (m *V4Log) GetTopics() []string { if m != nil { return m.Topics } return nil } -func (m *Log) GetData() []byte { +func (m *V4Log) GetData() []byte { if m != nil { return m.Data } return nil } -func (m *Log) GetBlockNumber() uint64 { +func (m *V4Log) GetBlockNumber() uint64 { if m != nil { return m.BlockNumber } return 0 } -func (m *Log) GetTxHash() string { +func (m *V4Log) GetTxHash() string { if m != nil { return m.TxHash } return "" } -func (m *Log) GetTxIndex() uint64 { +func (m *V4Log) GetTxIndex() uint64 { if m != nil { return m.TxIndex } return 0 } -func (m *Log) GetBlockHash() string { +func (m *V4Log) GetBlockHash() string { if m != nil { return m.BlockHash } return "" } -func (m *Log) GetIndex() uint64 { +func (m *V4Log) GetIndex() uint64 { if m != nil { return m.Index } return 0 } -func (m *Log) GetRemoved() bool { +func (m *V4Log) GetRemoved() bool { if m != nil { return m.Removed } return false } -// TxResult stores results of Tx execution. -type TxResult struct { +// V4TxResult stores results of Tx execution. +type V4TxResult struct { // contract_address contains the ethereum address of the created contract (if - // any). If the state transition is an evm.Call, the contract address will be + // any). If the V4State transition is an evm.Call, the contract address will be // empty. ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty" yaml:"contract_address"` // bloom represents the bloom filter bytes Bloom []byte `protobuf:"bytes,2,opt,name=bloom,proto3" json:"bloom,omitempty"` - // tx_logs contains the transaction hash and the proto-compatible ethereum - // logs. - TxLogs TransactionLogs `protobuf:"bytes,3,opt,name=tx_logs,json=txLogs,proto3" json:"tx_logs" yaml:"tx_logs"` + // tx_V4Logs contains the transaction hash and the proto-compatible ethereum + // V4Logs. + TxV4Logs V4TransactionV4Logs `protobuf:"bytes,3,opt,name=tx_V4Logs,json=txV4Logs,proto3" json:"tx_V4Logs" yaml:"tx_V4Logs"` // ret defines the bytes from the execution. Ret []byte `protobuf:"bytes,4,opt,name=ret,proto3" json:"ret,omitempty"` // reverted flag is set to true when the call has been reverted @@ -510,18 +503,18 @@ type TxResult struct { GasUsed uint64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` } -func (m *TxResult) Reset() { *m = TxResult{} } -func (m *TxResult) String() string { return proto.CompactTextString(m) } -func (*TxResult) ProtoMessage() {} -func (*TxResult) Descriptor() ([]byte, []int) { +func (m *V4TxResult) Reset() { *m = V4TxResult{} } +func (m *V4TxResult) String() string { return proto.CompactTextString(m) } +func (*V4TxResult) ProtoMessage() {} +func (*V4TxResult) Descriptor() ([]byte, []int) { return fileDescriptor_d21ecc92c8c8583e, []int{6} } -func (m *TxResult) XXX_Unmarshal(b []byte) error { +func (m *V4TxResult) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *V4TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TxResult.Marshal(b, m, deterministic) + return xxx_messageInfo_V4TxResult.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -531,38 +524,38 @@ func (m *TxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *TxResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxResult.Merge(m, src) +func (m *V4TxResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_V4TxResult.Merge(m, src) } -func (m *TxResult) XXX_Size() int { +func (m *V4TxResult) XXX_Size() int { return m.Size() } -func (m *TxResult) XXX_DiscardUnknown() { - xxx_messageInfo_TxResult.DiscardUnknown(m) +func (m *V4TxResult) XXX_DiscardUnknown() { + xxx_messageInfo_V4TxResult.DiscardUnknown(m) } -var xxx_messageInfo_TxResult proto.InternalMessageInfo +var xxx_messageInfo_V4TxResult proto.InternalMessageInfo -// AccessTuple is the element type of an access list. -type AccessTuple struct { +// V4AccessTuple is the element type of an access list. +type V4AccessTuple struct { // address is a hex formatted ethereum address Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // storage_keys are hex formatted hashes of the storage keys StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storageKeys"` } -func (m *AccessTuple) Reset() { *m = AccessTuple{} } -func (m *AccessTuple) String() string { return proto.CompactTextString(m) } -func (*AccessTuple) ProtoMessage() {} -func (*AccessTuple) Descriptor() ([]byte, []int) { +func (m *V4AccessTuple) Reset() { *m = V4AccessTuple{} } +func (m *V4AccessTuple) String() string { return proto.CompactTextString(m) } +func (*V4AccessTuple) ProtoMessage() {} +func (*V4AccessTuple) Descriptor() ([]byte, []int) { return fileDescriptor_d21ecc92c8c8583e, []int{7} } -func (m *AccessTuple) XXX_Unmarshal(b []byte) error { +func (m *V4AccessTuple) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *AccessTuple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *V4AccessTuple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_AccessTuple.Marshal(b, m, deterministic) + return xxx_messageInfo_V4AccessTuple.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -572,20 +565,20 @@ func (m *AccessTuple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *AccessTuple) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccessTuple.Merge(m, src) +func (m *V4AccessTuple) XXX_Merge(src proto.Message) { + xxx_messageInfo_V4AccessTuple.Merge(m, src) } -func (m *AccessTuple) XXX_Size() int { +func (m *V4AccessTuple) XXX_Size() int { return m.Size() } -func (m *AccessTuple) XXX_DiscardUnknown() { - xxx_messageInfo_AccessTuple.DiscardUnknown(m) +func (m *V4AccessTuple) XXX_DiscardUnknown() { + xxx_messageInfo_V4AccessTuple.DiscardUnknown(m) } -var xxx_messageInfo_AccessTuple proto.InternalMessageInfo +var xxx_messageInfo_V4AccessTuple proto.InternalMessageInfo -// TraceConfig holds extra parameters to trace functions. -type TraceConfig struct { +// V4TraceConfig holds extra parameters to trace functions. +type V4TraceConfig struct { // tracer is a custom javascript tracer Tracer string `protobuf:"bytes,1,opt,name=tracer,proto3" json:"tracer,omitempty"` // timeout overrides the default timeout of 5 seconds for JavaScript-based tracing @@ -602,7 +595,7 @@ type TraceConfig struct { // limit defines the maximum length of output, but zero means unlimited Limit int32 `protobuf:"varint,9,opt,name=limit,proto3" json:"limit,omitempty"` // overrides can be used to execute a trace using future fork rules - Overrides *ChainConfig `protobuf:"bytes,10,opt,name=overrides,proto3" json:"overrides,omitempty"` + Overrides *V4ChainConfig `protobuf:"bytes,10,opt,name=overrides,proto3" json:"overrides,omitempty"` // enable_memory switches memory capture EnableMemory bool `protobuf:"varint,11,opt,name=enable_memory,json=enableMemory,proto3" json:"enableMemory"` // enable_return_data switches the capture of return data @@ -611,18 +604,18 @@ type TraceConfig struct { TracerJsonConfig string `protobuf:"bytes,13,opt,name=tracer_json_config,json=tracerJsonConfig,proto3" json:"tracerConfig"` } -func (m *TraceConfig) Reset() { *m = TraceConfig{} } -func (m *TraceConfig) String() string { return proto.CompactTextString(m) } -func (*TraceConfig) ProtoMessage() {} -func (*TraceConfig) Descriptor() ([]byte, []int) { +func (m *V4TraceConfig) Reset() { *m = V4TraceConfig{} } +func (m *V4TraceConfig) String() string { return proto.CompactTextString(m) } +func (*V4TraceConfig) ProtoMessage() {} +func (*V4TraceConfig) Descriptor() ([]byte, []int) { return fileDescriptor_d21ecc92c8c8583e, []int{8} } -func (m *TraceConfig) XXX_Unmarshal(b []byte) error { +func (m *V4TraceConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *V4TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TraceConfig.Marshal(b, m, deterministic) + return xxx_messageInfo_V4TraceConfig.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -632,89 +625,89 @@ func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *TraceConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_TraceConfig.Merge(m, src) +func (m *V4TraceConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_V4TraceConfig.Merge(m, src) } -func (m *TraceConfig) XXX_Size() int { +func (m *V4TraceConfig) XXX_Size() int { return m.Size() } -func (m *TraceConfig) XXX_DiscardUnknown() { - xxx_messageInfo_TraceConfig.DiscardUnknown(m) +func (m *V4TraceConfig) XXX_DiscardUnknown() { + xxx_messageInfo_V4TraceConfig.DiscardUnknown(m) } -var xxx_messageInfo_TraceConfig proto.InternalMessageInfo +var xxx_messageInfo_V4TraceConfig proto.InternalMessageInfo -func (m *TraceConfig) GetTracer() string { +func (m *V4TraceConfig) GetTracer() string { if m != nil { return m.Tracer } return "" } -func (m *TraceConfig) GetTimeout() string { +func (m *V4TraceConfig) GetTimeout() string { if m != nil { return m.Timeout } return "" } -func (m *TraceConfig) GetReexec() uint64 { +func (m *V4TraceConfig) GetReexec() uint64 { if m != nil { return m.Reexec } return 0 } -func (m *TraceConfig) GetDisableStack() bool { +func (m *V4TraceConfig) GetDisableStack() bool { if m != nil { return m.DisableStack } return false } -func (m *TraceConfig) GetDisableStorage() bool { +func (m *V4TraceConfig) GetDisableStorage() bool { if m != nil { return m.DisableStorage } return false } -func (m *TraceConfig) GetDebug() bool { +func (m *V4TraceConfig) GetDebug() bool { if m != nil { return m.Debug } return false } -func (m *TraceConfig) GetLimit() int32 { +func (m *V4TraceConfig) GetLimit() int32 { if m != nil { return m.Limit } return 0 } -func (m *TraceConfig) GetOverrides() *ChainConfig { +func (m *V4TraceConfig) GetOverrides() *V4ChainConfig { if m != nil { return m.Overrides } return nil } -func (m *TraceConfig) GetEnableMemory() bool { +func (m *V4TraceConfig) GetEnableMemory() bool { if m != nil { return m.EnableMemory } return false } -func (m *TraceConfig) GetEnableReturnData() bool { +func (m *V4TraceConfig) GetEnableReturnData() bool { if m != nil { return m.EnableReturnData } return false } -func (m *TraceConfig) GetTracerJsonConfig() string { +func (m *V4TraceConfig) GetTracerJsonConfig() string { if m != nil { return m.TracerJsonConfig } @@ -723,123 +716,122 @@ func (m *TraceConfig) GetTracerJsonConfig() string { func init() { proto.RegisterType((*V4Params)(nil), "ethermint.evm.v1.V4Params") - 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") - proto.RegisterType((*Log)(nil), "ethermint.evm.v1.Log") - proto.RegisterType((*TxResult)(nil), "ethermint.evm.v1.TxResult") - proto.RegisterType((*AccessTuple)(nil), "ethermint.evm.v1.AccessTuple") - proto.RegisterType((*TraceConfig)(nil), "ethermint.evm.v1.TraceConfig") + proto.RegisterType((*V4ExtraEIPs)(nil), "ethermint.evm.v1.V4ExtraEIPs") + proto.RegisterType((*V4ChainConfig)(nil), "ethermint.evm.v1.V4ChainConfig") + proto.RegisterType((*V4State)(nil), "ethermint.evm.v1.V4State") + proto.RegisterType((*V4TransactionV4Logs)(nil), "ethermint.evm.v1.V4TransactionV4Logs") + proto.RegisterType((*V4Log)(nil), "ethermint.evm.v1.V4Log") + proto.RegisterType((*V4TxResult)(nil), "ethermint.evm.v1.V4TxResult") + proto.RegisterType((*V4AccessTuple)(nil), "ethermint.evm.v1.V4AccessTuple") + proto.RegisterType((*V4TraceConfig)(nil), "ethermint.evm.v1.V4TraceConfig") } 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, 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x0f, 0x80, 0x1d, 0x61, 0xee, 0xe7, - 0x9c, 0x84, 0x7a, 0x27, 0xd0, 0x66, 0x84, 0xf9, 0x37, 0x9c, 0x84, 0x9f, 0x59, 0x7f, 0xfe, 0xde, - 0x5d, 0xf1, 0x30, 0xa8, 0xbd, 0x0c, 0x02, 0xc2, 0xf9, 0x75, 0xde, 0x4f, 0xc8, 0x7f, 0xe9, 0xb0, - 0x13, 0x50, 0xe7, 0x82, 0x32, 0x1c, 0x11, 0xff, 0x86, 0x8c, 0x4c, 0x9f, 0xe9, 0xae, 0x31, 0xf6, - 0x5f, 0x91, 0x11, 0x47, 0xb3, 0xc0, 0x48, 0x7c, 0x6f, 0x81, 0xda, 0x35, 0xc3, 0x01, 0x31, 0x2f, - 0x7c, 0xd9, 0xab, 0x12, 0x32, 0x23, 0x61, 0x90, 0xd4, 0x16, 0x71, 0x4a, 0x68, 0x2e, 0xcc, 0x79, - 0x9a, 0x40, 0x39, 0x83, 0x11, 0x32, 0x24, 0x81, 0x2a, 0xa3, 0x85, 0x0c, 0x82, 0xa7, 0x60, 0x2b, - 0x8c, 0xb9, 0xfa, 0x12, 0xe3, 0x02, 0x07, 0x37, 0x3a, 0xfd, 0x8e, 0x73, 0x57, 0xb8, 0x75, 0xe3, - 0xb8, 0x92, 0x76, 0x34, 0x87, 0xe0, 0xe7, 0xa0, 0x39, 0x9d, 0xa6, 0x56, 0xab, 0x3f, 0x6d, 0x3a, - 0xf0, 0xae, 0x70, 0x1b, 0x65, 0xa8, 0xf2, 0xa0, 0x05, 0x2c, 0x77, 0x3a, 0x24, 0xdd, 0x3c, 0x52, - 0xcd, 0x67, 0x23, 0x0d, 0xa4, 0x35, 0x89, 0xd3, 0x58, 0xa8, 0x66, 0x5b, 0x47, 0x1a, 0xc0, 0xcf, - 0x41, 0x95, 0x0e, 0x08, 0x63, 0x71, 0x48, 0xb8, 0x7a, 0xea, 0xfc, 0xaf, 0xaf, 0x34, 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, + // 1626 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdd, 0x6e, 0xe3, 0xc6, + 0x15, 0xf6, 0x0f, 0x6d, 0x53, 0x23, 0x59, 0xe2,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, 0x9d, 0xbb, 0xe2, 0x61, 0x50, 0x7d, 0x15, 0x04, 0x84, 0xf3, 0xeb, 0xbc, 0x9f, 0x90, + 0xff, 0xd2, 0x61, 0xc7, 0xa0, 0xc6, 0x05, 0x65, 0x38, 0x22, 0xfe, 0x0d, 0x19, 0x99, 0x3e, 0xd3, + 0x5d, 0x63, 0xec, 0xbf, 0x22, 0x23, 0x8e, 0x66, 0x81, 0x91, 0xf8, 0xce, 0x02, 0xd5, 0x6b, 0x86, + 0x03, 0x62, 0x5e, 0xf8, 0xb2, 0x57, 0x25, 0x64, 0x46, 0xc2, 0x20, 0xa9, 0x2d, 0xe2, 0x94, 0xd0, + 0x5c, 0x98, 0xf3, 0x34, 0x81, 0x72, 0x06, 0x23, 0x64, 0x48, 0x02, 0x55, 0x46, 0x0b, 0x19, 0x04, + 0x4f, 0xc0, 0x76, 0x18, 0x73, 0xf5, 0xc1, 0xc4, 0x05, 0x0e, 0x6e, 0x74, 0xfa, 0x1d, 0xe7, 0xae, + 0x70, 0x6b, 0xc6, 0x71, 0x25, 0xed, 0x68, 0x0e, 0xc1, 0xcf, 0x41, 0x63, 0x3a, 0x4d, 0xad, 0x56, + 0x7f, 0xe5, 0x74, 0xe0, 0x5d, 0xe1, 0xd6, 0xcb, 0x50, 0xe5, 0x41, 0x0b, 0x58, 0xee, 0x74, 0x48, + 0xba, 0x79, 0xa4, 0x9a, 0xcf, 0x46, 0x1a, 0x48, 0x6b, 0x12, 0xa7, 0xb1, 0x50, 0xcd, 0xb6, 0x81, + 0x34, 0x80, 0x9f, 0x83, 0x0a, 0x1d, 0x10, 0xc6, 0xe2, 0x90, 0x70, 0xf5, 0xd4, 0xf9, 0x5f, 0x1f, + 0x6c, 0x68, 0x1a, 0x2f, 0x93, 0x33, 0x1f, 0x83, 0x29, 0x49, 0x29, 0x1b, 0xa9, 0xb7, 0x8b, 0x49, + 0x4e, 0x3b, 0x7e, 0xad, 0xec, 0x68, 0x0e, 0xc1, 0x0e, 0x80, 0x66, 0x1a, 0x23, 0x22, 0x67, 0x99, + 0xaf, 0xce, 0x7f, 0x4d, 0xcd, 0x55, 0xa7, 0x50, 0x7b, 0x91, 0x72, 0xbe, 0xc6, 0x02, 0xa3, 0x7b, + 0x16, 0xf8, 0x4b, 0x00, 0xf5, 0x9e, 0xf8, 0xdf, 0x72, 0x5a, 0x7e, 0x71, 0xea, 0xa7, 0x85, 0xd2, + 0xd7, 0x5e, 0xb3, 0x66, 0x47, 0xa3, 0x0b, 0x4e, 0x4d, 0x16, 0x17, 0x96, 0x6d, 0x39, 0x1b, 0x17, + 0x96, 0xbd, 0xe5, 0xd8, 0x65, 0xfd, 0x4c, 0x16, 0x68, 0x67, 0x82, 0x67, 0x96, 0xd7, 0x79, 0xfb, + 0xfd, 0xed, 0xde, 0xea, 0x0f, 0xb7, 0x7b, 0xab, 0xff, 0xbe, 0xdd, 0x5b, 0xfd, 0xeb, 0xfb, 0xbd, + 0x95, 0x1f, 0xde, 0xef, 0xad, 0xfc, 0xf3, 0xfd, 0xde, 0xca, 0xef, 0x3e, 0x9d, 0xb9, 0x1f, 0xc8, + 0x40, 0x5e, 0x0f, 0xd3, 0x5f, 0x00, 0x86, 0xea, 0x37, 0x80, 0x34, 0x8e, 0x18, 0x96, 0xc7, 0x87, + 0xb7, 0x07, 0x9f, 0xea, 0x1b, 0xa3, 0xbb, 0xa9, 0xbe, 0xf4, 0x3f, 0xf9, 0x4f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xd3, 0xe8, 0x0d, 0x45, 0x2f, 0x10, 0x00, 0x00, } func (m *V4Params) Marshal() (dAtA []byte, err error) { @@ -873,7 +865,7 @@ func (m *V4Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x30 } { - size, err := m.ChainConfig.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.V4ChainConfig.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -882,16 +874,6 @@ func (m *V4Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x2a - { - size, err := m.ExtraEIPs.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintEvm(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 if m.EnableCall { i-- if m.EnableCall { @@ -922,7 +904,7 @@ func (m *V4Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ExtraEIPs) Marshal() (dAtA []byte, err error) { +func (m *V4ExtraEIPs) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -932,39 +914,39 @@ func (m *ExtraEIPs) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ExtraEIPs) MarshalTo(dAtA []byte) (int, error) { +func (m *V4ExtraEIPs) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ExtraEIPs) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *V4ExtraEIPs) 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 + dAtA3 := make([]byte, len(m.EIPs)*10) + var j2 int for _, num1 := range m.EIPs { num := uint64(num1) for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j3++ + j2++ } - dAtA4[j3] = uint8(num) - j3++ + dAtA3[j2] = uint8(num) + j2++ } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintEvm(dAtA, i, uint64(j3)) + i -= j2 + copy(dAtA[i:], dAtA3[:j2]) + i = encodeVarintEvm(dAtA, i, uint64(j2)) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *ChainConfig) Marshal() (dAtA []byte, err error) { +func (m *V4ChainConfig) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -974,12 +956,12 @@ func (m *ChainConfig) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ChainConfig) MarshalTo(dAtA []byte) (int, error) { +func (m *V4ChainConfig) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *V4ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1220,7 +1202,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *State) Marshal() (dAtA []byte, err error) { +func (m *V4State) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1230,12 +1212,12 @@ func (m *State) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *State) MarshalTo(dAtA []byte) (int, error) { +func (m *V4State) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *V4State) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1257,7 +1239,7 @@ func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TransactionLogs) Marshal() (dAtA []byte, err error) { +func (m *V4TransactionV4Logs) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1267,20 +1249,20 @@ func (m *TransactionLogs) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TransactionLogs) MarshalTo(dAtA []byte) (int, error) { +func (m *V4TransactionV4Logs) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TransactionLogs) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *V4TransactionV4Logs) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Logs) > 0 { - for iNdEx := len(m.Logs) - 1; iNdEx >= 0; iNdEx-- { + if len(m.V4Logs) > 0 { + for iNdEx := len(m.V4Logs) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.V4Logs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1301,7 +1283,7 @@ func (m *TransactionLogs) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Log) Marshal() (dAtA []byte, err error) { +func (m *V4Log) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1311,12 +1293,12 @@ func (m *Log) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Log) MarshalTo(dAtA []byte) (int, error) { +func (m *V4Log) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *V4Log) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1386,7 +1368,7 @@ func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TxResult) Marshal() (dAtA []byte, err error) { +func (m *V4TxResult) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1396,12 +1378,12 @@ func (m *TxResult) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TxResult) MarshalTo(dAtA []byte) (int, error) { +func (m *V4TxResult) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *V4TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1429,7 +1411,7 @@ func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x22 } { - size, err := m.TxLogs.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.TxV4Logs.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1455,7 +1437,7 @@ func (m *TxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *AccessTuple) Marshal() (dAtA []byte, err error) { +func (m *V4AccessTuple) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1465,12 +1447,12 @@ func (m *AccessTuple) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AccessTuple) MarshalTo(dAtA []byte) (int, error) { +func (m *V4AccessTuple) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AccessTuple) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *V4AccessTuple) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1494,7 +1476,7 @@ func (m *AccessTuple) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TraceConfig) Marshal() (dAtA []byte, err error) { +func (m *V4TraceConfig) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1504,12 +1486,12 @@ func (m *TraceConfig) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TraceConfig) MarshalTo(dAtA []byte) (int, error) { +func (m *V4TraceConfig) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *V4TraceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1637,9 +1619,7 @@ func (m *V4Params) Size() (n int) { if m.EnableCall { n += 2 } - l = m.ExtraEIPs.Size() - n += 1 + l + sovEvm(uint64(l)) - l = m.ChainConfig.Size() + l = m.V4ChainConfig.Size() n += 1 + l + sovEvm(uint64(l)) if m.AllowUnprotectedTxs { n += 2 @@ -1647,7 +1627,7 @@ func (m *V4Params) Size() (n int) { return n } -func (m *ExtraEIPs) Size() (n int) { +func (m *V4ExtraEIPs) Size() (n int) { if m == nil { return 0 } @@ -1663,7 +1643,7 @@ func (m *ExtraEIPs) Size() (n int) { return n } -func (m *ChainConfig) Size() (n int) { +func (m *V4ChainConfig) Size() (n int) { if m == nil { return 0 } @@ -1747,7 +1727,7 @@ func (m *ChainConfig) Size() (n int) { return n } -func (m *State) Size() (n int) { +func (m *V4State) Size() (n int) { if m == nil { return 0 } @@ -1764,7 +1744,7 @@ func (m *State) Size() (n int) { return n } -func (m *TransactionLogs) Size() (n int) { +func (m *V4TransactionV4Logs) Size() (n int) { if m == nil { return 0 } @@ -1774,8 +1754,8 @@ func (m *TransactionLogs) Size() (n int) { if l > 0 { n += 1 + l + sovEvm(uint64(l)) } - if len(m.Logs) > 0 { - for _, e := range m.Logs { + if len(m.V4Logs) > 0 { + for _, e := range m.V4Logs { l = e.Size() n += 1 + l + sovEvm(uint64(l)) } @@ -1783,7 +1763,7 @@ func (m *TransactionLogs) Size() (n int) { return n } -func (m *Log) Size() (n int) { +func (m *V4Log) Size() (n int) { if m == nil { return 0 } @@ -1826,7 +1806,7 @@ func (m *Log) Size() (n int) { return n } -func (m *TxResult) Size() (n int) { +func (m *V4TxResult) Size() (n int) { if m == nil { return 0 } @@ -1840,7 +1820,7 @@ func (m *TxResult) Size() (n int) { if l > 0 { n += 1 + l + sovEvm(uint64(l)) } - l = m.TxLogs.Size() + l = m.TxV4Logs.Size() n += 1 + l + sovEvm(uint64(l)) l = len(m.Ret) if l > 0 { @@ -1855,7 +1835,7 @@ func (m *TxResult) Size() (n int) { return n } -func (m *AccessTuple) Size() (n int) { +func (m *V4AccessTuple) Size() (n int) { if m == nil { return 0 } @@ -1874,7 +1854,7 @@ func (m *AccessTuple) Size() (n int) { return n } -func (m *TraceConfig) Size() (n int) { +func (m *V4TraceConfig) Size() (n int) { if m == nil { return 0 } @@ -2027,42 +2007,9 @@ func (m *V4Params) 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 iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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) + return fmt.Errorf("proto: wrong wireType = %d for field V4ChainConfig", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2089,7 +2036,7 @@ func (m *V4Params) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ChainConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.V4ChainConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2134,7 +2081,7 @@ func (m *V4Params) Unmarshal(dAtA []byte) error { } return nil } -func (m *ExtraEIPs) Unmarshal(dAtA []byte) error { +func (m *V4ExtraEIPs) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2157,10 +2104,10 @@ func (m *ExtraEIPs) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExtraEIPs: wiretype end group for non-group") + return fmt.Errorf("proto: V4ExtraEIPs: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExtraEIPs: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: V4ExtraEIPs: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2260,7 +2207,7 @@ func (m *ExtraEIPs) Unmarshal(dAtA []byte) error { } return nil } -func (m *ChainConfig) Unmarshal(dAtA []byte) error { +func (m *V4ChainConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2283,10 +2230,10 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ChainConfig: wiretype end group for non-group") + return fmt.Errorf("proto: V4ChainConfig: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ChainConfig: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: V4ChainConfig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2974,7 +2921,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { } return nil } -func (m *State) Unmarshal(dAtA []byte) error { +func (m *V4State) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2997,10 +2944,10 @@ func (m *State) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: State: wiretype end group for non-group") + return fmt.Errorf("proto: V4State: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: State: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: V4State: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3088,7 +3035,7 @@ func (m *State) Unmarshal(dAtA []byte) error { } return nil } -func (m *TransactionLogs) Unmarshal(dAtA []byte) error { +func (m *V4TransactionV4Logs) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3111,10 +3058,10 @@ func (m *TransactionLogs) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TransactionLogs: wiretype end group for non-group") + return fmt.Errorf("proto: V4TransactionV4Logs: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TransactionLogs: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: V4TransactionV4Logs: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3151,7 +3098,7 @@ func (m *TransactionLogs) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Logs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field V4Logs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3178,8 +3125,8 @@ func (m *TransactionLogs) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Logs = append(m.Logs, &Log{}) - if err := m.Logs[len(m.Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.V4Logs = append(m.V4Logs, &V4Log{}) + if err := m.V4Logs[len(m.V4Logs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3204,7 +3151,7 @@ func (m *TransactionLogs) Unmarshal(dAtA []byte) error { } return nil } -func (m *Log) Unmarshal(dAtA []byte) error { +func (m *V4Log) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3227,10 +3174,10 @@ func (m *Log) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Log: wiretype end group for non-group") + return fmt.Errorf("proto: V4Log: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Log: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: V4Log: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3493,7 +3440,7 @@ func (m *Log) Unmarshal(dAtA []byte) error { } return nil } -func (m *TxResult) Unmarshal(dAtA []byte) error { +func (m *V4TxResult) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3516,10 +3463,10 @@ func (m *TxResult) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TxResult: wiretype end group for non-group") + return fmt.Errorf("proto: V4TxResult: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TxResult: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: V4TxResult: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3590,7 +3537,7 @@ func (m *TxResult) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxLogs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TxV4Logs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3617,7 +3564,7 @@ func (m *TxResult) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TxLogs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.TxV4Logs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3715,7 +3662,7 @@ func (m *TxResult) Unmarshal(dAtA []byte) error { } return nil } -func (m *AccessTuple) Unmarshal(dAtA []byte) error { +func (m *V4AccessTuple) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3738,10 +3685,10 @@ func (m *AccessTuple) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AccessTuple: wiretype end group for non-group") + return fmt.Errorf("proto: V4AccessTuple: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AccessTuple: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: V4AccessTuple: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3829,7 +3776,7 @@ func (m *AccessTuple) Unmarshal(dAtA []byte) error { } return nil } -func (m *TraceConfig) Unmarshal(dAtA []byte) error { +func (m *V4TraceConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3852,10 +3799,10 @@ func (m *TraceConfig) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TraceConfig: wiretype end group for non-group") + return fmt.Errorf("proto: V4TraceConfig: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TraceConfig: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: V4TraceConfig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4050,7 +3997,7 @@ func (m *TraceConfig) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Overrides == nil { - m.Overrides = &ChainConfig{} + m.Overrides = &V4ChainConfig{} } if err := m.Overrides.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err diff --git a/x/evm/migrations/v4/types/params.go b/x/evm/migrations/v4/types/params.go deleted file mode 100644 index c23ea62312..0000000000 --- a/x/evm/migrations/v4/types/params.go +++ /dev/null @@ -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)) -} diff --git a/x/evm/migrations/v5/migrate.go b/x/evm/migrations/v5/migrate.go new file mode 100644 index 0000000000..e620863ed1 --- /dev/null +++ b/x/evm/migrations/v5/migrate.go @@ -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(¶ms) + + store.Set(types.KeyPrefixParams, bz) + return nil +} diff --git a/x/evm/migrations/v5/migrate_test.go b/x/evm/migrations/v5/migrate_test.go new file mode 100644 index 0000000000..eba9599f81 --- /dev/null +++ b/x/evm/migrations/v5/migrate_test.go @@ -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, ¶ms) + + // 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)) +} diff --git a/x/evm/migrations/v5/types/evm.pb.go b/x/evm/migrations/v5/types/evm.pb.go new file mode 100644 index 0000000000..4d2b8e0960 --- /dev/null +++ b/x/evm/migrations/v5/types/evm.pb.go @@ -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, 0xb7, 0x2d, 0xda, 0xa6, 0x46, 0xb2, 0x44, 0x8f, 0xb5, 0x5e, 0x65, 0x17, 0x35, 0x5d, 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0x24, 0x54, 0x9b, 0x63, 0xa3, 0x12, 0xc3, 0x0f, 0x80, 0x1d, 0x61, 0xee, 0xe7, + 0x9c, 0x84, 0x7a, 0x27, 0xd0, 0x66, 0x84, 0xf9, 0x37, 0x9c, 0x84, 0x9f, 0x59, 0x7f, 0xfe, 0xde, + 0x5d, 0xf1, 0x30, 0xa8, 0xbd, 0x0c, 0x02, 0xc2, 0xf9, 0x75, 0xde, 0x4f, 0xc8, 0x7f, 0xe9, 0xb0, + 0x13, 0x50, 0xe7, 0x82, 0x32, 0x1c, 0x11, 0xff, 0x86, 0x8c, 0x4c, 0x9f, 0xe9, 0xae, 0x31, 0xf6, + 0x5f, 0x91, 0x11, 0x47, 0xb3, 0xc0, 0x48, 0x7c, 0x6f, 0x81, 0xda, 0x35, 0xc3, 0x01, 0x31, 0x2f, + 0x7c, 0xd9, 0xab, 0x12, 0x32, 0x23, 0x61, 0x90, 0xd4, 0x16, 0x71, 0x4a, 0x68, 0x2e, 0xcc, 0x79, + 0x9a, 0x40, 0x39, 0x83, 0x11, 0x32, 0x24, 0x81, 0x2a, 0xa3, 0x85, 0x0c, 0x82, 0xa7, 0x60, 0x2b, + 0x8c, 0xb9, 0xfa, 0x12, 0xe3, 0x02, 0x07, 0x37, 0x3a, 0xfd, 0x8e, 0x73, 0x57, 0xb8, 0x75, 0xe3, + 0xb8, 0x92, 0x76, 0x34, 0x87, 0xe0, 0xe7, 0xa0, 0x39, 0x9d, 0xa6, 0x56, 0xab, 0x3f, 0x6d, 0x3a, + 0xf0, 0xae, 0x70, 0x1b, 0x65, 0xa8, 0xf2, 0xa0, 0x05, 0x2c, 0x77, 0x3a, 0x24, 0xdd, 0x3c, 0x52, + 0xcd, 0x67, 0x23, 0x0d, 0xa4, 0x35, 0x89, 0xd3, 0x58, 0xa8, 0x66, 0x5b, 0x47, 0x1a, 0xc0, 0xcf, + 0x41, 0x95, 0x0e, 0x08, 0x63, 0x71, 0x48, 0xb8, 0x7a, 0xea, 0xfc, 0xaf, 0xaf, 0x34, 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") +) diff --git a/x/evm/module.go b/x/evm/module.go index 13efcc5120..06a0aebf03 100644 --- a/x/evm/module.go +++ b/x/evm/module.go @@ -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. diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index 22d8b04d8f..9d1edb3ed5 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -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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, 0x80, 0x7d, 0x3d, 0x44, 0x84, 0xe7, - 0x89, 0x80, 0x5f, 0x00, 0x27, 0xa0, 0x99, 0x60, 0x38, 0x10, 0xfe, 0x5c, 0x69, 0x3b, 0xcf, 0xa7, - 0x37, 0xcd, 0x62, 0x84, 0x87, 0x9a, 0x13, 0xd3, 0x4b, 0x53, 0xff, 0x16, 0x58, 0xef, 0x26, 0x94, - 0xa6, 0xaa, 0x13, 0xea, 0x48, 0x03, 0x88, 0x54, 0xd5, 0xd4, 0x2e, 0x57, 0xd4, 0x1b, 0xfd, 0xc7, - 0xf7, 0x77, 0x79, 0xa1, 0x55, 0x3a, 0xbb, 0xe6, 0x9d, 0xde, 0xd0, 0xda, 0x66, 0xbe, 0x27, 0x6b, - 0xab, 0x5a, 0xc9, 0x01, 0x15, 0x46, 0x84, 0xda, 0xb4, 0x3a, 0x92, 0x43, 0xf8, 0x0c, 0xd8, 0x8c, - 0x0c, 0x08, 0x13, 0x24, 0x54, 0x9b, 0x63, 0xa3, 0x12, 0xc3, 0x0f, 0x80, 0x1d, 0x61, 0xee, 0xe7, - 0x9c, 0x84, 0x7a, 0x27, 0xd0, 0x66, 0x84, 0xf9, 0x37, 0x9c, 0x84, 0x9f, 0x59, 0x7f, 0xfe, 0xde, - 0x5d, 0xf1, 0x30, 0xa8, 0xbd, 0x0c, 0x02, 0xc2, 0xf9, 0x75, 0xde, 0x4f, 0xc8, 0x7f, 0xe9, 0xb0, - 0x13, 0x50, 0xe7, 0x82, 0x32, 0x1c, 0x11, 0xff, 0x86, 0x8c, 0x4c, 0x9f, 0xe9, 0xae, 0x31, 0xf6, - 0x5f, 0x91, 0x11, 0x47, 0xb3, 0xc0, 0x48, 0x7c, 0x6f, 0x81, 0xda, 0x35, 0xc3, 0x01, 0x31, 0x2f, - 0x7c, 0xd9, 0xab, 0x12, 0x32, 0x23, 0x61, 0x90, 0xd4, 0x16, 0x71, 0x4a, 0x68, 0x2e, 0xcc, 0x79, - 0x9a, 0x40, 0x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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, + // 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, +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, 0x16, 0x23, + 0x3c, 0xd4, 0x9c, 0x98, 0xce, 0x4c, 0xfe, 0x5b, 0x60, 0xbd, 0x9b, 0x50, 0x9a, 0xaa, 0x4a, 0xa8, + 0x23, 0x0d, 0x20, 0x52, 0x59, 0x53, 0xa7, 0x5c, 0x51, 0x9d, 0xf6, 0x8f, 0x1f, 0x9e, 0xf2, 0x42, + 0xa9, 0x74, 0x76, 0x4d, 0xb7, 0xdd, 0xd0, 0xda, 0x66, 0xbe, 0x27, 0x73, 0xab, 0x4a, 0xc9, 0x01, + 0x15, 0x46, 0x84, 0x3a, 0xb4, 0x3a, 0x92, 0x43, 0xf8, 0x1c, 0xd8, 0x8c, 0x0c, 0x08, 0x13, 0x24, + 0x54, 0x87, 0x63, 0xa3, 0x12, 0xc3, 0x0f, 0x81, 0x1d, 0x61, 0xee, 0xe7, 0x9c, 0x84, 0xfa, 0x24, + 0xd0, 0x66, 0x84, 0xf9, 0x37, 0x9c, 0x84, 0x9f, 0x59, 0x7f, 0xfe, 0xde, 0x5d, 0xf1, 0x30, 0xa8, + 0x9d, 0x05, 0x01, 0xe1, 0xfc, 0x26, 0xef, 0x27, 0xe4, 0xbf, 0x54, 0xd8, 0x09, 0xa8, 0x73, 0x41, + 0x19, 0x8e, 0x88, 0x7f, 0x4b, 0x46, 0xa6, 0xce, 0x74, 0xd5, 0x18, 0xfb, 0xaf, 0xc8, 0x88, 0xa3, + 0x59, 0x60, 0x24, 0xbe, 0xb7, 0x40, 0xed, 0x86, 0xe1, 0x80, 0x98, 0x0e, 0x5f, 0xd6, 0xaa, 0x84, + 0xcc, 0x48, 0x18, 0x24, 0xb5, 0x45, 0x9c, 0x12, 0x9a, 0x0b, 0x73, 0x9f, 0x26, 0x50, 0xce, 0x60, + 0x84, 0x0c, 0x49, 0xa0, 0xd2, 0x68, 0x21, 0x83, 0xe0, 0x29, 0xd8, 0x0a, 0x63, 0xae, 0x3e, 0x97, + 0xb8, 0xc0, 0xc1, 0xad, 0xde, 0x7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x95, 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,29 +1555,18 @@ func (m *Params) Size() (n int) { if m.EnableCall { n += 2 } - l = m.ExtraEIPs.Size() - n += 1 + l + sovEvm(uint64(l)) - l = m.ChainConfig.Size() - n += 1 + l + sovEvm(uint64(l)) - if m.AllowUnprotectedTxs { - n += 2 - } - return n -} - -func (m *ExtraEIPs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.EIPs) > 0 { + if len(m.ExtraEIPs) > 0 { l = 0 - for _, e := range m.EIPs { + 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 { + n += 2 + } return n } @@ -2028,142 +1935,6 @@ 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 iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthEvm - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthEvm - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ChainConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowUnprotectedTxs", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvm - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowUnprotectedTxs = bool(v != 0) - 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 *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 { @@ -2180,7 +1951,7 @@ func (m *ExtraEIPs) Unmarshal(dAtA []byte) error { break } } - m.EIPs = append(m.EIPs, v) + m.ExtraEIPs = append(m.ExtraEIPs, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -2215,8 +1986,8 @@ func (m *ExtraEIPs) Unmarshal(dAtA []byte) error { } } elementCount = count - if elementCount != 0 && len(m.EIPs) == 0 { - m.EIPs = make([]int64, 0, elementCount) + if elementCount != 0 && len(m.ExtraEIPs) == 0 { + m.ExtraEIPs = make([]int64, 0, elementCount) } for iNdEx < postIndex { var v int64 @@ -2234,11 +2005,64 @@ func (m *ExtraEIPs) Unmarshal(dAtA []byte) error { break } } - m.EIPs = append(m.EIPs, v) + m.ExtraEIPs = append(m.ExtraEIPs, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field EIPs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExtraEIPs", wireType) } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ChainConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowUnprotectedTxs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.AllowUnprotectedTxs = bool(v != 0) default: iNdEx = preIndex skippy, err := skipEvm(dAtA[iNdEx:]) diff --git a/x/evm/types/key.go b/x/evm/types/key.go index bcdb7af7e2..f8d768fc85 100644 --- a/x/evm/types/key.go +++ b/x/evm/types/key.go @@ -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 diff --git a/x/evm/types/params.go b/x/evm/types/params.go index 85a56b1621..63c56ec54c 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -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 diff --git a/x/evm/types/params_legacy.go b/x/evm/types/params_legacy.go new file mode 100644 index 0000000000..bea25b7a6a --- /dev/null +++ b/x/evm/types/params_legacy.go @@ -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), + } +} diff --git a/x/evm/types/params_test.go b/x/evm/types/params_test.go index a53fe7c2a9..1b3fda4882 100644 --- a/x/evm/types/params_test.go +++ b/x/evm/types/params_test.go @@ -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()