From 648ae0c7fbc33831f51a2d6ef8f467304b41d7a0 Mon Sep 17 00:00:00 2001 From: Daniel Wedul Date: Tue, 15 Nov 2022 11:14:06 -0700 Subject: [PATCH] Revert "Merge pull request #270 from provenance-io/llama/add-fee-denom-change-proposal" This reverts commit 7462a84614cea9079d543949af566cd415916dfa, reversing changes made to 23ba5dc56667cf26841788fd9093169812d87c76. --- CHANGELOG.md | 1 - proto/cosmos/bank/v1beta1/tx.proto | 17 - simapp/app.go | 2 - x/bank/keeper/keeper.go | 9 - x/bank/keeper/msg_server.go | 16 +- x/bank/keeper/send.go | 2 +- x/bank/types/codec.go | 2 - x/bank/types/msgs.go | 47 +-- x/bank/types/msgs_test.go | 32 -- x/bank/types/tx.pb.go | 527 ++--------------------------- x/gov/keeper/keeper_test.go | 7 +- x/gov/keeper/msg_server_test.go | 113 +------ 12 files changed, 37 insertions(+), 738 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f134dc00228..ad6c1a09f0dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## Unreleased -* Add functionality to update denom metadata via gov proposal [#270](https://github.com/provenance-io/cosmos-sdk/pull/270) * nothing --- diff --git a/proto/cosmos/bank/v1beta1/tx.proto b/proto/cosmos/bank/v1beta1/tx.proto index 5d7da0cec29d..bcf567906b52 100644 --- a/proto/cosmos/bank/v1beta1/tx.proto +++ b/proto/cosmos/bank/v1beta1/tx.proto @@ -16,9 +16,6 @@ service Msg { // MultiSend defines a method for sending coins from some accounts to other accounts. rpc MultiSend(MsgMultiSend) returns (MsgMultiSendResponse); - - // UpdateDenomMetadata defines a method for updating the denom metadata. Only usable in x/gov proposal. - rpc UpdateDenomMetadata(MsgUpdateDenomMetadata) returns (MsgUpdateDenomMetadataResponse); } // MsgSend represents a message to send coins from one account to another. @@ -50,17 +47,3 @@ message MsgMultiSend { // MsgMultiSendResponse defines the Msg/MultiSend response type. message MsgMultiSendResponse {} -message MsgUpdateDenomMetadata { - option (cosmos.msg.v1.signer) = "from_address"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string title = 2; - string description = 3; - Metadata metadata = 4; -} - -// MsgUpdateDenomMetadataResponse defines the Msg/UpdateDenomMetadata response type. -message MsgUpdateDenomMetadataResponse {} \ No newline at end of file diff --git a/simapp/app.go b/simapp/app.go index 44ed4947d2ea..c2df8be04d07 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -259,8 +259,6 @@ func NewSimApp( app.AccountKeeper = authkeeper.NewAccountKeeper( appCodec, keys[authtypes.StoreKey], app.GetSubspace(authtypes.ModuleName), authtypes.ProtoBaseAccount, maccPerms, sdk.Bech32MainPrefix, ) - - // set the governance module account as the authority app.BankKeeper = bankkeeper.NewBaseKeeper( appCodec, keys[banktypes.StoreKey], app.AccountKeeper, app.GetSubspace(banktypes.ModuleName), app.ModuleAccountAddrs(), ) diff --git a/x/bank/keeper/keeper.go b/x/bank/keeper/keeper.go index 60252bb01000..32591fb12fd9 100644 --- a/x/bank/keeper/keeper.go +++ b/x/bank/keeper/keeper.go @@ -3,7 +3,6 @@ package keeper import ( "fmt" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/internal/conv" @@ -48,8 +47,6 @@ type Keeper interface { DelegateCoins(ctx sdk.Context, delegatorAddr, moduleAccAddr sdk.AccAddress, amt sdk.Coins) error UndelegateCoins(ctx sdk.Context, moduleAccAddr, delegatorAddr sdk.AccAddress, amt sdk.Coins) error - GetAuthority() string - types.QueryServer } @@ -62,7 +59,6 @@ type BaseKeeper struct { storeKey storetypes.StoreKey paramSpace paramtypes.Subspace mintCoinsRestrictionFn MintingRestrictionFn - authority string } type MintingRestrictionFn func(ctx sdk.Context, coins sdk.Coins) error @@ -117,7 +113,6 @@ func NewBaseKeeper( storeKey: storeKey, paramSpace: paramSpace, mintCoinsRestrictionFn: func(ctx sdk.Context, coins sdk.Coins) error { return nil }, - authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), // hardcoded till all transitive dependencies can be updated to pass in the constructor instead } } @@ -555,7 +550,3 @@ func (k BaseViewKeeper) IterateTotalSupply(ctx sdk.Context, cb func(sdk.Coin) bo } } } - -func (k BaseKeeper) GetAuthority() string { - return k.authority -} \ No newline at end of file diff --git a/x/bank/keeper/msg_server.go b/x/bank/keeper/msg_server.go index dc1f97dfa20b..4e9237631d54 100644 --- a/x/bank/keeper/msg_server.go +++ b/x/bank/keeper/msg_server.go @@ -2,30 +2,19 @@ package keeper import ( "context" + "github.com/armon/go-metrics" - "cosmossdk.io/errors" + "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/bank/types" - gov "github.com/cosmos/cosmos-sdk/x/gov/types" ) type msgServer struct { Keeper } -// UpdateDenomMetadata updates the denom metadata if the message is signed by gov module account -func (k msgServer) UpdateDenomMetadata(goCtx context.Context, msg *types.MsgUpdateDenomMetadata) (*types.MsgUpdateDenomMetadataResponse, error) { - if k.GetAuthority() != msg.FromAddress { - return nil, errors.Wrapf(gov.ErrInvalidSigner, "expected %s got %s", k.GetAuthority(), msg.FromAddress) - } - - ctx := sdk.UnwrapSDKContext(goCtx) - k.Keeper.SetDenomMetaData(ctx, *msg.Metadata) - return &types.MsgUpdateDenomMetadataResponse{}, nil -} - // NewMsgServerImpl returns an implementation of the bank MsgServer interface // for the provided Keeper. func NewMsgServerImpl(keeper Keeper) types.MsgServer { @@ -113,4 +102,3 @@ func (k msgServer) MultiSend(goCtx context.Context, msg *types.MsgMultiSend) (*t return &types.MsgMultiSendResponse{}, nil } - diff --git a/x/bank/keeper/send.go b/x/bank/keeper/send.go index bbaf27234444..5d26266b879a 100644 --- a/x/bank/keeper/send.go +++ b/x/bank/keeper/send.go @@ -200,7 +200,7 @@ func (k BaseSendKeeper) subUnlockedCoins(ctx sdk.Context, addr sdk.AccAddress, a _, hasNeg := sdk.Coins{spendable}.SafeSub(coin) if hasNeg { - return sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "%s is smaller than %s", spendable, balance) + return sdkerrors.Wrapf(sdkerrors.ErrInsufficientFunds, "%s is smaller than %s", spendable, coin) } newBalance := balance.Sub(coin) diff --git a/x/bank/types/codec.go b/x/bank/types/codec.go index 937f3d596448..a4107c1cfdb6 100644 --- a/x/bank/types/codec.go +++ b/x/bank/types/codec.go @@ -16,7 +16,6 @@ import ( func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgSend{}, "cosmos-sdk/MsgSend") legacy.RegisterAminoMsg(cdc, &MsgMultiSend{}, "cosmos-sdk/MsgMultiSend") - legacy.RegisterAminoMsg(cdc, &MsgUpdateDenomMetadata{}, "cosmos-sdk/MsgUpdateDenomMetadata") cdc.RegisterConcrete(&SendAuthorization{}, "cosmos-sdk/SendAuthorization", nil) } @@ -24,7 +23,6 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSend{}, &MsgMultiSend{}, - &MsgUpdateDenomMetadata{}, ) registry.RegisterImplementations( (*authz.Authorization)(nil), diff --git a/x/bank/types/msgs.go b/x/bank/types/msgs.go index 241667c029ff..d9806b55835e 100644 --- a/x/bank/types/msgs.go +++ b/x/bank/types/msgs.go @@ -7,9 +7,8 @@ import ( // bank message types const ( - TypeMsgSend = "send" - TypeMsgMultiSend = "multisend" - TypeMsgUpdateDenomMetadata = "updatedenommetada" + TypeMsgSend = "send" + TypeMsgMultiSend = "multisend" ) var _ sdk.Msg = &MsgSend{} @@ -185,45 +184,3 @@ func ValidateInputsOutputs(inputs []Input, outputs []Output) error { return nil } - -var _ sdk.Msg = &MsgUpdateDenomMetadata{} - -// NewMsgUpdateDenomMetadata - construct a message to update denom metadata -func NewMsgUpdateDenomMetadata(fromAddr, title string, description string, metadata *Metadata) *MsgUpdateDenomMetadata { - return &MsgUpdateDenomMetadata{ - FromAddress: fromAddr, - Title: title, - Description: description, - Metadata: metadata, - } -} - -// Route Implements Msg -func (msg MsgUpdateDenomMetadata) Route() string { - return RouterKey -} - -// Type Implements Msg -func (msg MsgUpdateDenomMetadata) Type() string { - return TypeMsgUpdateDenomMetadata -} - -// ValidateBasic Implements Msg. -func (msg MsgUpdateDenomMetadata) ValidateBasic() error { - err := msg.Metadata.Validate() - if err != nil { - return err - } - return nil -} - -// GetSignBytes Implements Msg. -func (msg MsgUpdateDenomMetadata) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - -// GetSigners Implements Msg. -func (msg MsgUpdateDenomMetadata) GetSigners() []sdk.AccAddress { - fromAddress, _ := sdk.AccAddressFromBech32(msg.FromAddress) - return []sdk.AccAddress{fromAddress} -} diff --git a/x/bank/types/msgs_test.go b/x/bank/types/msgs_test.go index cd37595e8926..6223db054f8e 100644 --- a/x/bank/types/msgs_test.go +++ b/x/bank/types/msgs_test.go @@ -275,35 +275,3 @@ func TestMsgSendGetSigners(t *testing.T) { require.Equal(t, 1, len(res)) require.True(t, from.Equals(res[0])) } - -func TestUpdateDenomMetadataGetSignBytes(t *testing.T) { - //from := sdk.AccAddress("input") - //coins := sdk.NewCoins(sdk.NewInt64Coin("atom", 10)) - msg := MsgUpdateDenomMetadata{ - Title: "title", - Description: "description", - Metadata: &Metadata { - Name: "Cosmos Hub Atom", - Symbol: "ATOM", - Description: "The native staking token of the Cosmos Hub.", - DenomUnits: []*DenomUnit{ - {"uatom", uint32(0), []string{"microatom"}}, - }, - }, - } - res := msg.GetSignBytes() - - expected := `{"type":"cosmos-sdk/MsgUpdateDenomMetadata","value":{"description":"description","metadata":{"denom_units":[{"aliases":["microatom"],"denom":"uatom"}],"description":"The native staking token of the Cosmos Hub.","name":"Cosmos Hub Atom","symbol":"ATOM"},"title":"title"}}` - require.Equal(t, expected, string(res)) -} - -func TestUpdateDenomMetadataGetSigners(t *testing.T) { - from := sdk.AccAddress("input111111111111111") - title := "Proposal Title" - description := "Proposal description" - metadata := Metadata{} - msg := NewMsgUpdateDenomMetadata(from.String(), title, description, &metadata) - res := msg.GetSigners() - require.Equal(t, 1, len(res)) - require.True(t, from.Equals(res[0])) -} diff --git a/x/bank/types/tx.pb.go b/x/bank/types/tx.pb.go index 3857770b6b41..874c3dd8d862 100644 --- a/x/bank/types/tx.pb.go +++ b/x/bank/types/tx.pb.go @@ -199,130 +199,46 @@ func (m *MsgMultiSendResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgMultiSendResponse proto.InternalMessageInfo -type MsgUpdateDenomMetadata struct { - FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Metadata *Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (m *MsgUpdateDenomMetadata) Reset() { *m = MsgUpdateDenomMetadata{} } -func (m *MsgUpdateDenomMetadata) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateDenomMetadata) ProtoMessage() {} -func (*MsgUpdateDenomMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_1d8cb1613481f5b7, []int{4} -} -func (m *MsgUpdateDenomMetadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateDenomMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateDenomMetadata.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 *MsgUpdateDenomMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateDenomMetadata.Merge(m, src) -} -func (m *MsgUpdateDenomMetadata) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateDenomMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateDenomMetadata.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateDenomMetadata proto.InternalMessageInfo - -type MsgUpdateDenomMetadataResponse struct { -} - -func (m *MsgUpdateDenomMetadataResponse) Reset() { *m = MsgUpdateDenomMetadataResponse{} } -func (m *MsgUpdateDenomMetadataResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateDenomMetadataResponse) ProtoMessage() {} -func (*MsgUpdateDenomMetadataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1d8cb1613481f5b7, []int{5} -} -func (m *MsgUpdateDenomMetadataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateDenomMetadataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateDenomMetadataResponse.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 *MsgUpdateDenomMetadataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateDenomMetadataResponse.Merge(m, src) -} -func (m *MsgUpdateDenomMetadataResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateDenomMetadataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateDenomMetadataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateDenomMetadataResponse proto.InternalMessageInfo - func init() { proto.RegisterType((*MsgSend)(nil), "cosmos.bank.v1beta1.MsgSend") proto.RegisterType((*MsgSendResponse)(nil), "cosmos.bank.v1beta1.MsgSendResponse") proto.RegisterType((*MsgMultiSend)(nil), "cosmos.bank.v1beta1.MsgMultiSend") proto.RegisterType((*MsgMultiSendResponse)(nil), "cosmos.bank.v1beta1.MsgMultiSendResponse") - proto.RegisterType((*MsgUpdateDenomMetadata)(nil), "cosmos.bank.v1beta1.MsgUpdateDenomMetadata") - proto.RegisterType((*MsgUpdateDenomMetadataResponse)(nil), "cosmos.bank.v1beta1.MsgUpdateDenomMetadataResponse") } func init() { proto.RegisterFile("cosmos/bank/v1beta1/tx.proto", fileDescriptor_1d8cb1613481f5b7) } var fileDescriptor_1d8cb1613481f5b7 = []byte{ - // 560 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xb6, 0x9b, 0x90, 0x92, 0x37, 0x95, 0x2a, 0xdc, 0xa8, 0x24, 0xa6, 0x38, 0x21, 0x62, 0x48, - 0x41, 0xb5, 0x49, 0x3a, 0x00, 0xed, 0x44, 0xca, 0x02, 0x92, 0x85, 0xe4, 0x8a, 0x01, 0x96, 0xca, - 0xb1, 0x0f, 0x63, 0xb5, 0xbe, 0xb3, 0x7c, 0xe7, 0x52, 0x56, 0x26, 0x46, 0x26, 0xe6, 0x2e, 0x2c, - 0x4c, 0x0c, 0xfc, 0x88, 0x8e, 0x15, 0x13, 0x13, 0xa0, 0x64, 0x80, 0x7f, 0x01, 0xf2, 0xdd, 0xd9, - 0x04, 0xe1, 0xa6, 0x42, 0x4c, 0x4e, 0xfc, 0x7c, 0xbc, 0x1f, 0x8f, 0xef, 0x60, 0xcd, 0x23, 0x34, - 0x22, 0xd4, 0x1a, 0xbb, 0x78, 0xdf, 0x3a, 0x1c, 0x8c, 0x11, 0x73, 0x07, 0x16, 0x3b, 0x32, 0xe3, - 0x84, 0x30, 0xa2, 0xad, 0x08, 0xd4, 0xcc, 0x50, 0x53, 0xa2, 0x7a, 0x33, 0x20, 0x01, 0xe1, 0xb8, - 0x95, 0xfd, 0x12, 0x54, 0xdd, 0x28, 0x8c,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0x59, 0xdf, 0xfc, 0x07, 0x72, 0x5e, 0x78, 0xb4, 0x73, 0x32, 0x31, - 0xd4, 0xd3, 0x89, 0xa1, 0x7e, 0x9b, 0x18, 0xea, 0x9b, 0xa9, 0xa1, 0x9c, 0x4e, 0x0d, 0xe5, 0xf3, - 0xd4, 0x50, 0x9e, 0xae, 0xcf, 0x3d, 0x5a, 0x47, 0xe2, 0xee, 0xe1, 0x27, 0x6c, 0x5c, 0xe3, 0x37, - 0xc8, 0xe6, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4d, 0xf3, 0xf7, 0x2a, 0x00, 0x05, 0x00, 0x00, + // 460 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0xf6, 0x35, 0x55, 0xaa, 0x5c, 0x2b, 0x55, 0x98, 0x08, 0x12, 0x53, 0x39, 0xc5, 0x62, 0x48, + 0x91, 0x7a, 0x26, 0x65, 0x00, 0xb5, 0x13, 0xee, 0x04, 0x92, 0x85, 0xe4, 0x4e, 0xb0, 0x54, 0xfe, + 0x38, 0x0e, 0xab, 0xf8, 0xce, 0xf2, 0x9d, 0xab, 0xb2, 0x32, 0x31, 0x32, 0x31, 0x77, 0x46, 0x0c, + 0x0c, 0xfc, 0x88, 0x8e, 0x15, 0x13, 0x13, 0xa0, 0x64, 0x80, 0x7f, 0x01, 0xba, 0x0f, 0x9b, 0x22, + 0xd2, 0x66, 0x3a, 0xcb, 0xcf, 0xc7, 0x3d, 0xef, 0xf3, 0x1e, 0xdc, 0x48, 0x19, 0x2f, 0x18, 0xf7, + 0x93, 0x98, 0x1e, 0xf9, 0xc7, 0x93, 0x04, 0x8b, 0x78, 0xe2, 0x8b, 0x13, 0x54, 0x56, 0x4c, 0x30, + 0xfb, 0xba, 0x46, 0x91, 0x44, 0x91, 0x41, 0x9d, 0x3e, 0x61, 0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+ 0xf6, 0xde, 0x03, 0xb8, 0x16, 0x72, 0x12, 0xd6, 0xaf, 0x44, 0xae, 0x9a, 0x79, 0x08, 0xbb, 0x39, + 0x2d, 0x6b, 0x21, 0x3b, 0x91, 0x19, 0x1d, 0x34, 0x67, 0xab, 0xe8, 0xb1, 0xa4, 0x04, 0xcb, 0x32, + 0x64, 0x64, 0xf8, 0xf6, 0x1e, 0x5c, 0x61, 0xb5, 0x50, 0xd2, 0x25, 0x25, 0xbd, 0x35, 0x57, 0xfa, + 0x54, 0x71, 0x8c, 0xb6, 0x51, 0xec, 0xae, 0x37, 0x89, 0x8d, 0x9b, 0x77, 0x03, 0xf6, 0x2f, 0xe6, + 0x6a, 0x02, 0xef, 0x7c, 0x04, 0xb0, 0x13, 0x72, 0x62, 0x3f, 0x81, 0xcb, 0x2a, 0xef, 0xc6, 0xdc, + 0x4b, 0xcc, 0x98, 0xce, 0x9d, 0xab, 0xd0, 0xc6, 0xd3, 0x7e, 0x06, 0x7b, 0x7f, 0x0b, 0xb8, 0x7d, + 0x99, 0xa4, 0xa5, 0x38, 0x5b, 0x0b, 0x29, 0x8d, 0x75, 0xb0, 0x7f, 0x36, 0x75, 0xc1, 0xf9, 0xd4, + 0x05, 0x3f, 0xa6, 0x2e, 0x78, 0x37, 0x73, 0xad, 0xf3, 0x99, 0x6b, 0x7d, 0x9d, 0xb9, 0xd6, 0xf3, + 0xad, 0x2b, 0x37, 0x7b, 0xa2, 0x9f, 0xbe, 0x5a, 0x70, 0xd2, 0x55, 0x0f, 0xf8, 0xfe, 0x9f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xa7, 0xd3, 0x87, 0x2b, 0x7f, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -341,8 +257,6 @@ type MsgClient interface { Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) // MultiSend defines a method for sending coins from some accounts to other accounts. MultiSend(ctx context.Context, in *MsgMultiSend, opts ...grpc.CallOption) (*MsgMultiSendResponse, error) - // UpdateDenomMetadata defines a method for updating the fee denom metadata - UpdateDenomMetadata(ctx context.Context, in *MsgUpdateDenomMetadata, opts ...grpc.CallOption) (*MsgUpdateDenomMetadataResponse, error) } type msgClient struct { @@ -371,23 +285,12 @@ func (c *msgClient) MultiSend(ctx context.Context, in *MsgMultiSend, opts ...grp return out, nil } -func (c *msgClient) UpdateDenomMetadata(ctx context.Context, in *MsgUpdateDenomMetadata, opts ...grpc.CallOption) (*MsgUpdateDenomMetadataResponse, error) { - out := new(MsgUpdateDenomMetadataResponse) - err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Msg/UpdateDenomMetadata", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. type MsgServer interface { // Send defines a method for sending coins from one account to another account. Send(context.Context, *MsgSend) (*MsgSendResponse, error) // MultiSend defines a method for sending coins from some accounts to other accounts. MultiSend(context.Context, *MsgMultiSend) (*MsgMultiSendResponse, error) - // UpdateDenomMetadata defines a method for updating the fee denom metadata - UpdateDenomMetadata(context.Context, *MsgUpdateDenomMetadata) (*MsgUpdateDenomMetadataResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -400,9 +303,6 @@ func (*UnimplementedMsgServer) Send(ctx context.Context, req *MsgSend) (*MsgSend func (*UnimplementedMsgServer) MultiSend(ctx context.Context, req *MsgMultiSend) (*MsgMultiSendResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MultiSend not implemented") } -func (*UnimplementedMsgServer) UpdateDenomMetadata(ctx context.Context, req *MsgUpdateDenomMetadata) (*MsgUpdateDenomMetadataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateDenomMetadata not implemented") -} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -444,24 +344,6 @@ func _Msg_MultiSend_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } -func _Msg_UpdateDenomMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateDenomMetadata) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateDenomMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.bank.v1beta1.Msg/UpdateDenomMetadata", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateDenomMetadata(ctx, req.(*MsgUpdateDenomMetadata)) - } - return interceptor(ctx, in, info, handler) -} - var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.bank.v1beta1.Msg", HandlerType: (*MsgServer)(nil), @@ -474,10 +356,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "MultiSend", Handler: _Msg_MultiSend_Handler, }, - { - MethodName: "UpdateDenomMetadata", - Handler: _Msg_UpdateDenomMetadata_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/bank/v1beta1/tx.proto", @@ -631,85 +509,6 @@ func (m *MsgMultiSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgUpdateDenomMetadata) 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 *MsgUpdateDenomMetadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateDenomMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Metadata != nil { - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x1a - } - if len(m.Title) > 0 { - i -= len(m.Title) - copy(dAtA[i:], m.Title) - i = encodeVarintTx(dAtA, i, uint64(len(m.Title))) - i-- - dAtA[i] = 0x12 - } - if len(m.FromAddress) > 0 { - i -= len(m.FromAddress) - copy(dAtA[i:], m.FromAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.FromAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateDenomMetadataResponse) 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 *MsgUpdateDenomMetadataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateDenomMetadataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -783,40 +582,6 @@ func (m *MsgMultiSendResponse) Size() (n int) { return n } -func (m *MsgUpdateDenomMetadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FromAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Title) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.Metadata != nil { - l = m.Metadata.Size() - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgUpdateDenomMetadataResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1189,238 +954,6 @@ func (m *MsgMultiSendResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateDenomMetadata) 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 ErrIntOverflowTx - } - 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: MsgUpdateDenomMetadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateDenomMetadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FromAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = &Metadata{} - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateDenomMetadataResponse) 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 ErrIntOverflowTx - } - 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: MsgUpdateDenomMetadataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateDenomMetadataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/keeper/keeper_test.go b/x/gov/keeper/keeper_test.go index d78b0c46b3ba..95daf0797e62 100644 --- a/x/gov/keeper/keeper_test.go +++ b/x/gov/keeper/keeper_test.go @@ -41,11 +41,6 @@ func (suite *KeeperTestSuite) SetupTest() { err = app.BankKeeper.SendCoinsFromModuleToModule(ctx, minttypes.ModuleName, types.ModuleName, coins) suite.NoError(err) - // Create a new denom 'atom' so the proposal to update fee denom can be tested - atomCoins := sdk.NewCoins(sdk.NewCoin("atom", sdk.NewInt(100000))) - err = app.BankKeeper.MintCoins(ctx, minttypes.ModuleName, atomCoins) - suite.NoError(err) - queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) v1.RegisterQueryServer(queryHelper, app.GovKeeper) legacyQueryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) @@ -61,7 +56,7 @@ func (suite *KeeperTestSuite) SetupTest() { govAcct := suite.app.GovKeeper.GetGovernanceAccount(suite.ctx).GetAddress() suite.legacyMsgSrvr = keeper.NewLegacyMsgServerImpl(govAcct.String(), suite.msgSrvr) - suite.addrs = simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(50000000)) + suite.addrs = simapp.AddTestAddrsIncremental(app, ctx, 2, sdk.NewInt(30000000)) } func TestIncrementProposalNumber(t *testing.T) { diff --git a/x/gov/keeper/msg_server_test.go b/x/gov/keeper/msg_server_test.go index 09fd2ca17f36..5bdd9951089e 100644 --- a/x/gov/keeper/msg_server_test.go +++ b/x/gov/keeper/msg_server_test.go @@ -24,22 +24,6 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() { Amount: coins, } - updateFeeDenomMsg := &banktypes.MsgUpdateDenomMetadata{ - FromAddress: govAcct.String(), - Title: "title", - Description: "description", - Metadata: &banktypes.Metadata{ - Base: "atom", - Name: "Cosmos Hub Atom", - Symbol: "ATOM", - Display: "atom", - Description: "The native staking token of the Cosmos Hub.", - DenomUnits: []*banktypes.DenomUnit{ - {"atom", uint32(0), []string{"atom"}}, - }, - }, - } - cases := map[string]struct { preRun func() (*v1.MsgSubmitProposal, error) expErr bool @@ -115,28 +99,6 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() { }, expErr: false, }, - "all good - update fee denom proposal": { - preRun: func() (*v1.MsgSubmitProposal, error) { - return v1.NewMsgSubmitProposal( - []sdk.Msg{updateFeeDenomMsg}, - initialDeposit, - proposer.String(), - "", - ) - }, - expErr: false, - }, - "all good with min deposit - update fee denom proposal": { - preRun: func() (*v1.MsgSubmitProposal, error) { - return v1.NewMsgSubmitProposal( - []sdk.Msg{updateFeeDenomMsg}, - minDeposit, - proposer.String(), - "", - ) - }, - expErr: false, - }, } for name, tc := range cases { @@ -159,9 +121,9 @@ func (suite *KeeperTestSuite) TestVoteReq() { govAcct := suite.app.GovKeeper.GetGovernanceAccount(suite.ctx).GetAddress() addrs := suite.addrs proposer := addrs[0] + coins := sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(100))) minDeposit := suite.app.GovKeeper.GetDepositParams(suite.ctx).MinDeposit - bankMsg := &banktypes.MsgSend{ FromAddress: govAcct.String(), ToAddress: proposer.String(), @@ -181,22 +143,6 @@ func (suite *KeeperTestSuite) TestVoteReq() { suite.Require().NotNil(res.ProposalId) proposalId := res.ProposalId - updateFeeDenomMsg := &banktypes.MsgUpdateDenomMetadata{ - FromAddress: govAcct.String(), - Title: "title", - Description: "description", - Metadata: &banktypes.Metadata{ - Base: "atom", - Name: "Cosmos Hub Atom", - Symbol: "ATOM", - Display: "atom", - Description: "The native staking token of the Cosmos Hub.", - DenomUnits: []*banktypes.DenomUnit{ - {"atom", uint32(0), []string{"atom"}}, - }, - }, - } - cases := map[string]struct { preRun func() uint64 expErr bool @@ -266,27 +212,6 @@ func (suite *KeeperTestSuite) TestVoteReq() { metadata: "", expErr: false, }, - "all good - fee-denom-change-proposal": { - preRun: func() uint64 { - msg, err := v1.NewMsgSubmitProposal( - []sdk.Msg{updateFeeDenomMsg}, - minDeposit, - proposer.String(), - "", - ) - - suite.Require().NoError(err) - - res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) - suite.Require().NoError(err) - suite.Require().NotNil(res.ProposalId) - return res.ProposalId - }, - option: v1.VoteOption_VOTE_OPTION_YES, - voter: proposer, - metadata: "", - expErr: false, - }, } for name, tc := range cases { @@ -330,22 +255,6 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() { suite.Require().NotNil(res.ProposalId) proposalId := res.ProposalId - updateFeeDenomMsg := &banktypes.MsgUpdateDenomMetadata{ - FromAddress: govAcct.String(), - Title: "title", - Description: "description", - Metadata: &banktypes.Metadata{ - Base: "atom", - Name: "Cosmos Hub Atom", - Symbol: "ATOM", - Display: "atom", - Description: "The native staking token of the Cosmos Hub.", - DenomUnits: []*banktypes.DenomUnit{ - {"atom", uint32(0), []string{"atom"}}, - }, - }, - } - cases := map[string]struct { preRun func() uint64 vote *v1.MsgVote @@ -416,26 +325,6 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() { metadata: "", expErr: false, }, - "all good - fee denom proposal": { - preRun: func() uint64 { - msg, err := v1.NewMsgSubmitProposal( - []sdk.Msg{updateFeeDenomMsg}, - minDeposit, - proposer.String(), - "", - ) - suite.Require().NoError(err) - - res, err := suite.msgSrvr.SubmitProposal(suite.ctx, msg) - suite.Require().NoError(err) - suite.Require().NotNil(res.ProposalId) - return res.ProposalId - }, - option: v1.VoteOption_VOTE_OPTION_YES, - voter: proposer, - metadata: "", - expErr: false, - }, } for name, tc := range cases {