fix: avoid duplicate register proto type in evm & feemarket (#1586)

* update dep

* make proto-all

* avoid duplicate register proto type in evm

* set KeyTable

* update from version to v.19.x which support submit-proposal

* test AvailableExtraEIPs

* keep grpc query compatible with version before migrate

* fix duplicate register & migrate in feemarket

* update nix

* support typed event for bloom & txLog

* partial revert typed ethereumTx

* Revert "partial revert typed ethereumTx"

This reverts commit 314bb288f385b79f6fff6badff79cd790b74a27e.

* Revert "support typed event for bloom & txLog"

This reverts commit 287d3aec30a951a7cece40a0c310858997850a3d.

Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com>
This commit is contained in:
mmsqe
2023-01-12 10:52:55 +02:00
committed by GitHub
co-authored by MalteHerrmann Vladislav Varadinov
parent 06ca0523fc
commit 5f7ee9bfad
21 changed files with 2070 additions and 273 deletions
+5
View File
@@ -23,6 +23,7 @@ import (
"github.com/cosmos/cosmos-sdk/store/prefix"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
ethtypes "github.com/ethereum/go-ethereum/core/types"
@@ -75,6 +76,8 @@ type Keeper struct {
// evm constructor function
evmConstructor evm.Constructor
// Legacy subspace
ss paramstypes.Subspace
}
// NewKeeper generates new evm module keeper
@@ -89,6 +92,7 @@ func NewKeeper(
customPrecompiles evm.PrecompiledContracts,
evmConstructor evm.Constructor,
tracer string,
ss paramstypes.Subspace,
) *Keeper {
// ensure evm module account is set
if addr := ak.GetModuleAddress(types.ModuleName); addr == nil {
@@ -113,6 +117,7 @@ func NewKeeper(
customPrecompiles: customPrecompiles,
evmConstructor: evmConstructor,
tracer: tracer,
ss: ss,
}
}
+4 -5
View File
@@ -3,24 +3,23 @@ package keeper_test
import (
sdk "github.com/cosmos/cosmos-sdk/types"
evmkeeper "github.com/evmos/ethermint/x/evm/keeper"
v4types "github.com/evmos/ethermint/x/evm/migrations/v4/types"
"github.com/evmos/ethermint/x/evm/types"
)
type mockSubspace struct {
ps v4types.V4Params
ps types.Params
}
func newMockSubspace(ps v4types.V4Params) mockSubspace {
func newMockSubspace(ps types.Params) mockSubspace {
return mockSubspace{ps: ps}
}
func (ms mockSubspace) GetParamSetIfExists(_ sdk.Context, ps types.LegacyParams) {
*ps.(*v4types.V4Params) = ms.ps
*ps.(*types.Params) = ms.ps
}
func (suite *KeeperTestSuite) TestMigrations() {
legacySubspace := newMockSubspace(v4types.DefaultParams())
legacySubspace := newMockSubspace(types.DefaultParams())
migrator := evmkeeper.NewMigrator(*suite.app.EvmKeeper, legacySubspace)
testCases := []struct {
+25 -6
View File
@@ -48,13 +48,20 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error {
return nil
}
// GetLegacyParams returns param set for version before migrate
func (k Keeper) GetLegacyParams(ctx sdk.Context) types.Params {
var params types.Params
k.ss.GetParamSetIfExists(ctx, &params)
return params
}
// GetExtraEIPs returns the extra EIPs enabled on the chain.
func (k Keeper) GetExtraEIPs(ctx sdk.Context) types.ExtraEIPs {
var extraEIPs types.ExtraEIPs
store := ctx.KVStore(k.storeKey)
bz := store.Get(types.ParamStoreKeyExtraEIPs)
if len(bz) == 0 {
return extraEIPs
return k.GetLegacyParams(ctx).ExtraEIPs
}
k.cdc.MustUnmarshal(bz, &extraEIPs)
return extraEIPs
@@ -66,7 +73,7 @@ func (k Keeper) GetChainConfig(ctx sdk.Context) types.ChainConfig {
store := ctx.KVStore(k.storeKey)
bz := store.Get(types.ParamStoreKeyChainConfig)
if len(bz) == 0 {
return chainCfg
return k.GetLegacyParams(ctx).ChainConfig
}
k.cdc.MustUnmarshal(bz, &chainCfg)
return chainCfg
@@ -77,7 +84,7 @@ func (k Keeper) GetEVMDenom(ctx sdk.Context) string {
store := ctx.KVStore(k.storeKey)
bz := store.Get(types.ParamStoreKeyEVMDenom)
if len(bz) == 0 {
return ""
return k.GetLegacyParams(ctx).EvmDenom
}
return string(bz)
}
@@ -85,19 +92,31 @@ func (k Keeper) GetEVMDenom(ctx sdk.Context) string {
// GetEnableCall returns true if the EVM Call operation is enabled.
func (k Keeper) GetEnableCall(ctx sdk.Context) bool {
store := ctx.KVStore(k.storeKey)
return store.Has(types.ParamStoreKeyEnableCall)
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)
return store.Has(types.ParamStoreKeyEnableCreate)
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)
return store.Has(types.ParamStoreKeyAllowUnprotectedTxs)
exist := store.Has(types.ParamStoreKeyAllowUnprotectedTxs)
if !exist {
exist = k.GetLegacyParams(ctx).AllowUnprotectedTxs
}
return exist
}
// setChainConfig sets the ChainConfig in the store
+8 -9
View File
@@ -4,7 +4,6 @@ import (
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
v4types "github.com/evmos/ethermint/x/evm/migrations/v4/types"
"github.com/evmos/ethermint/x/evm/types"
)
@@ -19,7 +18,7 @@ func MigrateStore(
) error {
var (
store = ctx.KVStore(storeKey)
params v4types.V4Params
params types.Params
)
legacySubspace.GetParamSetIfExists(ctx, &params)
@@ -29,22 +28,22 @@ func MigrateStore(
}
chainCfgBz := cdc.MustMarshal(&params.ChainConfig)
extraEIPsBz := cdc.MustMarshal(&v4types.ExtraEIPs{EIPs: v4types.AvailableExtraEIPs})
extraEIPsBz := cdc.MustMarshal(&types.ExtraEIPs{EIPs: types.AvailableExtraEIPs})
store.Set(v4types.ParamStoreKeyEVMDenom, []byte(params.EvmDenom))
store.Set(v4types.ParamStoreKeyExtraEIPs, extraEIPsBz)
store.Set(v4types.ParamStoreKeyChainConfig, chainCfgBz)
store.Set(types.ParamStoreKeyEVMDenom, []byte(params.EvmDenom))
store.Set(types.ParamStoreKeyExtraEIPs, extraEIPsBz)
store.Set(types.ParamStoreKeyChainConfig, chainCfgBz)
if params.AllowUnprotectedTxs {
store.Set(v4types.ParamStoreKeyAllowUnprotectedTxs, []byte{0x01})
store.Set(types.ParamStoreKeyAllowUnprotectedTxs, []byte{0x01})
}
if params.EnableCall {
store.Set(v4types.ParamStoreKeyEnableCall, []byte{0x01})
store.Set(types.ParamStoreKeyEnableCall, []byte{0x01})
}
if params.EnableCreate {
store.Set(v4types.ParamStoreKeyEnableCreate, []byte{0x01})
store.Set(types.ParamStoreKeyEnableCreate, []byte{0x01})
}
return nil
+14 -14
View File
@@ -11,20 +11,19 @@ import (
"github.com/evmos/ethermint/app"
"github.com/evmos/ethermint/encoding"
v4 "github.com/evmos/ethermint/x/evm/migrations/v4"
v4types "github.com/evmos/ethermint/x/evm/migrations/v4/types"
"github.com/stretchr/testify/require"
)
type mockSubspace struct {
ps v4types.V4Params
ps types.Params
}
func newMockSubspace(ps v4types.V4Params) mockSubspace {
func newMockSubspace(ps types.Params) mockSubspace {
return mockSubspace{ps: ps}
}
func (ms mockSubspace) GetParamSetIfExists(ctx sdk.Context, ps types.LegacyParams) {
*ps.(*v4types.V4Params) = ms.ps
*ps.(*types.Params) = ms.ps
}
func TestMigrate(t *testing.T) {
@@ -36,29 +35,30 @@ func TestMigrate(t *testing.T) {
ctx := testutil.DefaultContext(storeKey, tKey)
kvStore := ctx.KVStore(storeKey)
legacySubspace := newMockSubspace(v4types.DefaultParams())
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(v4types.ParamStoreKeyEVMDenom)
bz := kvStore.Get(types.ParamStoreKeyEVMDenom)
evmDenom = string(bz)
var allowUnprotectedTx gogotypes.BoolValue
bz = kvStore.Get(v4types.ParamStoreKeyAllowUnprotectedTxs)
bz = kvStore.Get(types.ParamStoreKeyAllowUnprotectedTxs)
cdc.MustUnmarshal(bz, &allowUnprotectedTx)
enableCreate := kvStore.Has(v4types.ParamStoreKeyEnableCreate)
enableCall := kvStore.Has(v4types.ParamStoreKeyEnableCall)
enableCreate := kvStore.Has(types.ParamStoreKeyEnableCreate)
enableCall := kvStore.Has(types.ParamStoreKeyEnableCall)
var chainCfg v4types.ChainConfig
bz = kvStore.Get(v4types.ParamStoreKeyChainConfig)
var chainCfg types.ChainConfig
bz = kvStore.Get(types.ParamStoreKeyChainConfig)
cdc.MustUnmarshal(bz, &chainCfg)
var extraEIPs v4types.ExtraEIPs
bz = kvStore.Get(v4types.ParamStoreKeyExtraEIPs)
var extraEIPs types.ExtraEIPs
bz = kvStore.Get(types.ParamStoreKeyExtraEIPs)
cdc.MustUnmarshal(bz, &extraEIPs)
require.Equal(t, types.AvailableExtraEIPs, extraEIPs.EIPs)
params := v4types.NewParams(evmDenom, allowUnprotectedTx.Value, enableCreate, enableCall, chainCfg, extraEIPs)
params := types.NewParams(evmDenom, allowUnprotectedTx.Value, enableCreate, enableCall, chainCfg, extraEIPs)
require.Equal(t, legacySubspace.ps, params)
}
+1265
View File
File diff suppressed because it is too large Load Diff
+18
View File
@@ -22,6 +22,7 @@ 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"
)
@@ -56,6 +57,11 @@ var (
AvailableExtraEIPs = []int64{1344, 1884, 2200, 2929, 3198, 3529}
)
// ParamKeyTable returns the parameter key table.
func ParamKeyTable() paramtypes.KeyTable {
return paramtypes.NewKeyTable().RegisterParamSet(&Params{})
}
// NewParams creates a new Params instance
func NewParams(evmDenom string, allowUnprotectedTxs, enableCreate, enableCall bool, config ChainConfig, extraEIPs ExtraEIPs) Params {
return Params{
@@ -81,6 +87,18 @@ 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 {
+62 -63
View File
@@ -454,69 +454,68 @@ func init() {
func init() { proto.RegisterFile("ethermint/evm/v1/tx.proto", fileDescriptor_f75ac0a12d075f21) }
var fileDescriptor_f75ac0a12d075f21 = []byte{
// 990 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0x4f, 0x8f, 0xdb, 0x44,
0x14, 0x5f, 0x27, 0xce, 0xbf, 0x49, 0x58, 0xaa, 0xd1, 0x56, 0x75, 0x22, 0x1a, 0xa7, 0x96, 0xa0,
0x69, 0xa5, 0xd8, 0xea, 0x82, 0x7a, 0xd8, 0x53, 0x37, 0xdd, 0x6d, 0xd5, 0x6a, 0x57, 0x54, 0x26,
0xbd, 0xd0, 0x43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xfc, 0x43, 0x79, 0xf3,
0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x20, 0xbe, 0xf3, 0x9e, 0x09, 0x00, 0x00,
// 975 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x8f, 0xdb, 0xc4,
0x17, 0x8f, 0x13, 0xe7, 0xd7, 0x24, 0xdf, 0xfd, 0x56, 0xa3, 0xad, 0xea, 0x44, 0x34, 0x0e, 0x96,
0x80, 0xb4, 0x52, 0x6c, 0x75, 0x41, 0x3d, 0xec, 0xa9, 0x9b, 0xee, 0xb6, 0x6a, 0xb5, 0x2b, 0x2a,
0x93, 0x5e, 0x28, 0x52, 0x34, 0x6b, 0xcf, 0x4e, 0x2c, 0x62, 0x8f, 0xe5, 0x99, 0x58, 0x09, 0x12,
0x97, 0x9e, 0xb8, 0x01, 0xe2, 0x1f, 0xe0, 0xc0, 0x89, 0x13, 0x12, 0xfd, 0x03, 0x38, 0x56, 0x9c,
0x2a, 0xb8, 0x20, 0x0e, 0x01, 0x65, 0x91, 0x90, 0xf6, 0x06, 0x7f, 0x01, 0x9a, 0x19, 0x67, 0xb3,
0x69, 0xd8, 0x16, 0x4a, 0x11, 0x27, 0xcf, 0x9b, 0xf7, 0xe6, 0xbd, 0x37, 0x9f, 0xcf, 0x67, 0x66,
0x0c, 0x1a, 0x98, 0x0f, 0x71, 0x12, 0x06, 0x11, 0x77, 0x70, 0x1a, 0x3a, 0xe9, 0x35, 0x87, 0x4f,
0xec, 0x38, 0xa1, 0x9c, 0xc2, 0x0b, 0xa7, 0x2e, 0x1b, 0xa7, 0xa1, 0x9d, 0x5e, 0x6b, 0x5e, 0xf2,
0x28, 0x0b, 0x29, 0x73, 0x42, 0x46, 0x44, 0x64, 0xc8, 0x88, 0x0a, 0x6d, 0x36, 0x94, 0x63, 0x20,
0x2d, 0x47, 0x19, 0x99, 0xab,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 0xff, 0x34, 0xff, 0xd9, 0x90, 0xe6, 0x95, 0xe7,
0x86, 0x2c, 0x9a, 0xe8, 0xdd, 0x78, 0x3c, 0x6f, 0x69, 0x4f, 0xe6, 0x2d, 0xed, 0xe7, 0x79, 0x4b,
0xfb, 0xe4, 0xb8, 0x95, 0x7b, 0x72, 0xdc, 0xca, 0xfd, 0x70, 0xdc, 0xca, 0xbd, 0x7b, 0xf6, 0x70,
0xe1, 0x54, 0x9c, 0xad, 0x65, 0x9b, 0x13, 0xd9, 0xa8, 0x3c, 0x60, 0x87, 0x25, 0xf9, 0xdf, 0xf1,
0xe6, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8d, 0xf3, 0xe0, 0xc6, 0x74, 0x09, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
-83
View File
@@ -69,42 +69,6 @@ func local_request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marsh
}
var (
filter_Msg_UpdateParams_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Msg_UpdateParams_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgUpdateParams
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_UpdateParams_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.UpdateParams(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Msg_UpdateParams_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgUpdateParams
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_UpdateParams_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.UpdateParams(ctx, &protoReq)
return msg, metadata, err
}
// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux".
// UnaryRPC :call MsgServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -134,29 +98,6 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server
})
mux.Handle("POST", pattern_Msg_UpdateParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Msg_UpdateParams_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_UpdateParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -218,37 +159,13 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client
})
mux.Handle("POST", pattern_Msg_UpdateParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Msg_UpdateParams_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_UpdateParams_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_Msg_EthereumTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "ethereum_tx"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Msg_UpdateParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "update_params"}, "", runtime.AssumeColonVerbOpt(false)))
)
var (
forward_Msg_EthereumTx_0 = runtime.ForwardResponseMessage
forward_Msg_UpdateParams_0 = runtime.ForwardResponseMessage
)