From 228ff36c958b4ddbee3f9936f80c370d9a2860f5 Mon Sep 17 00:00:00 2001 From: sufay Date: Mon, 8 Jul 2024 21:11:47 +0800 Subject: [PATCH] add update params msg --- app/keepers/keepers.go | 2 + proto/side/btcbridge/tx.proto | 23 +- testutil/keeper/btc_bridge.go | 5 + x/btcbridge/keeper/keeper.go | 5 +- x/btcbridge/keeper/msg_server.go | 20 + x/btcbridge/types/codec.go | 2 + x/btcbridge/types/errors.go | 4 +- x/btcbridge/types/message_update_params.go | 42 ++ x/btcbridge/types/params.go | 31 ++ x/btcbridge/types/tx.pb.go | 490 +++++++++++++++++++-- 10 files changed, 576 insertions(+), 48 deletions(-) create mode 100644 x/btcbridge/types/message_update_params.go diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index cc2587d..601967a 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -396,6 +396,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appCodec, appKeepers.keys[btcbridgetypes.StoreKey], appKeepers.keys[btcbridgetypes.StoreKey], + govAuthor, appKeepers.BankKeeper, ) @@ -471,6 +472,7 @@ func (appKeepers *AppKeepers) initParamsKeeper(appCodec codec.BinaryCodec, legac paramsKeeper.Subspace(icahosttypes.SubModuleName) paramsKeeper.Subspace(gmmmoduletypes.ModuleName) paramsKeeper.Subspace(yieldmoduletypes.ModuleName) + paramsKeeper.Subspace(btcbridgetypes.ModuleName) return paramsKeeper } diff --git a/proto/side/btcbridge/tx.proto b/proto/side/btcbridge/tx.proto index 0b373ea..c619697 100644 --- a/proto/side/btcbridge/tx.proto +++ b/proto/side/btcbridge/tx.proto @@ -24,7 +24,11 @@ service Msg { rpc SubmitWithdrawSignatures (MsgSubmitWithdrawSignaturesRequest) returns (MsgSubmitWithdrawSignaturesResponse); // SubmitWithdrawStatus submits the status of the withdraw transaction. rpc SubmitWithdrawStatus (MsgSubmitWithdrawStatusRequest) returns (MsgSubmitWithdrawStatusResponse); - + // UpdateParams defines a governance operation for updating the x/btcbridge module + // parameters. The authority defaults to the x/gov module account. + // + // Since: cosmos-sdk 0.47 + rpc UpdateParams(MsgUpdateParamsRequest) returns (MsgUpdateParamsResponse); } // MsgSubmitWithdrawStatusRequest defines the Msg/SubmitWithdrawStatus request type. @@ -114,3 +118,20 @@ message MsgSubmitWithdrawSignaturesRequest { message MsgSubmitWithdrawSignaturesResponse { } +// MsgUpdateParamsRequest is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParamsRequest { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + string authority = 1; + + // params defines the x/btcbridge parameters to be updated. + // + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false]; +} + +// MsgUpdateParamsResponse defines the Msg/UpdateParams response type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParamsResponse {} diff --git a/testutil/keeper/btc_bridge.go b/testutil/keeper/btc_bridge.go index b971f20..de0e7a5 100644 --- a/testutil/keeper/btc_bridge.go +++ b/testutil/keeper/btc_bridge.go @@ -11,6 +11,8 @@ import ( "github.com/cosmos/cosmos-sdk/store" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/sideprotocol/side/app" "github.com/sideprotocol/side/x/btcbridge/keeper" "github.com/sideprotocol/side/x/btcbridge/types" @@ -32,10 +34,13 @@ func BtcBridgeKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { registry := codectypes.NewInterfaceRegistry() cdc := codec.NewProtoCodec(registry) + authority := authtypes.NewModuleAddress(govtypes.ModuleName).String() + k := keeper.NewKeeper( cdc, storeKey, memStoreKey, + authority, app.BankKeeper, ) diff --git a/x/btcbridge/keeper/keeper.go b/x/btcbridge/keeper/keeper.go index 61ba075..183e5be 100644 --- a/x/btcbridge/keeper/keeper.go +++ b/x/btcbridge/keeper/keeper.go @@ -19,6 +19,8 @@ type ( storeKey storetypes.StoreKey memKey storetypes.StoreKey + authority string + bankKeeper types.BankKeeper } ) @@ -27,13 +29,14 @@ func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, - + authority string, bankKeeper types.BankKeeper, ) *Keeper { return &Keeper{ cdc: cdc, storeKey: storeKey, memKey: memKey, + authority: authority, bankKeeper: bankKeeper, BaseUTXOKeeper: *NewBaseUTXOKeeper(cdc, storeKey), } diff --git a/x/btcbridge/keeper/msg_server.go b/x/btcbridge/keeper/msg_server.go index ed10782..f6b2ed1 100644 --- a/x/btcbridge/keeper/msg_server.go +++ b/x/btcbridge/keeper/msg_server.go @@ -7,7 +7,11 @@ import ( "strconv" "github.com/btcsuite/btcd/btcutil/psbt" + + "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/sideprotocol/side/x/btcbridge/types" ) @@ -237,6 +241,22 @@ func (m msgServer) SubmitWithdrawStatus(goCtx context.Context, msg *types.MsgSub return &types.MsgSubmitWithdrawStatusResponse{}, nil } +// UpdateParams updates the module params. +func (m msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParamsRequest) (*types.MsgUpdateParamsResponse, error) { + if m.authority != msg.Authority { + return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", m.authority, msg.Authority) + } + + if err := msg.ValidateBasic(); err != nil { + return nil, err + } + + ctx := sdk.UnwrapSDKContext(goCtx) + m.SetParams(ctx, msg.Params) + + return &types.MsgUpdateParamsResponse{}, nil +} + // NewMsgServerImpl returns an implementation of the MsgServer interface // for the provided Keeper. func NewMsgServerImpl(keeper Keeper) types.MsgServer { diff --git a/x/btcbridge/types/codec.go b/x/btcbridge/types/codec.go index c569eb3..b256521 100644 --- a/x/btcbridge/types/codec.go +++ b/x/btcbridge/types/codec.go @@ -13,6 +13,7 @@ func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgSubmitDepositTransactionRequest{}, "btcbridge/MsgSubmitDepositTransactionRequest", nil) cdc.RegisterConcrete(&MsgSubmitWithdrawSignaturesRequest{}, "btcbridge/MsgSubmitWithdrawSignaturesRequest", nil) cdc.RegisterConcrete(&MsgSubmitWithdrawTransactionRequest{}, "btcbridge/MsgSubmitWithdrawTransactionRequest", nil) + cdc.RegisterConcrete(&MsgUpdateParamsRequest{}, "btcbridge/MsgUpdateParamsRequest", nil) // this line is used by starport scaffolding # 2 } @@ -22,6 +23,7 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSubmitDepositTransactionRequest{}) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSubmitWithdrawSignaturesRequest{}) registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSubmitWithdrawTransactionRequest{}) + registry.RegisterImplementations((*sdk.Msg)(nil), &MsgUpdateParamsRequest{}) // this line is used by starport scaffolding # 3 msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/btcbridge/types/errors.go b/x/btcbridge/types/errors.go index 58c38bb..ee0cf12 100644 --- a/x/btcbridge/types/errors.go +++ b/x/btcbridge/types/errors.go @@ -6,7 +6,7 @@ import ( errorsmod "cosmossdk.io/errors" ) -// x/yield module sentinel errors +// x/btcbridge module sentinel errors var ( ErrSenderAddressNotAuthorized = errorsmod.Register(ModuleName, 1000, "sender address not authorized") ErrInvalidHeader = errorsmod.Register(ModuleName, 1100, "invalid block header") @@ -42,4 +42,6 @@ var ( ErrInvalidRunes = errorsmod.Register(ModuleName, 7100, "invalid runes") ErrInvalidRuneId = errorsmod.Register(ModuleName, 7101, "invalid rune id") + + ErrInvalidParams = errorsmod.Register(ModuleName, 8100, "invalid module params") ) diff --git a/x/btcbridge/types/message_update_params.go b/x/btcbridge/types/message_update_params.go new file mode 100644 index 0000000..30ae59e --- /dev/null +++ b/x/btcbridge/types/message_update_params.go @@ -0,0 +1,42 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +const TypeMsgUpdateParams = "update_params" + +// Route returns the route of MsgUpdateParams. +func (msg *MsgUpdateParamsRequest) Route() string { + return RouterKey +} + +// Type returns the type of MsgUpdateParams. +func (msg *MsgUpdateParamsRequest) Type() string { + return TypeMsgUpdateParams +} + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgUpdateParamsRequest) GetSignBytes() []byte { + return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) +} + +// GetSigners returns the expected signers for a MsgUpdateParams message. +func (m *MsgUpdateParamsRequest) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(m.Authority) + return []sdk.AccAddress{addr} +} + +// ValidateBasic performs basic MsgUpdateParams message validation. +func (m *MsgUpdateParamsRequest) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.Wrap(err, "invalid authority address") + } + + if err := m.Params.Validate(); err != nil { + return err + } + + return nil +} diff --git a/x/btcbridge/types/params.go b/x/btcbridge/types/params.go index 9e7460f..0d64001 100644 --- a/x/btcbridge/types/params.go +++ b/x/btcbridge/types/params.go @@ -3,6 +3,7 @@ package types import ( "bytes" + secp256k1 "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/txscript" @@ -41,6 +42,36 @@ func (p Params) Validate() error { return err } } + + if err := sdk.ValidateDenom(p.BtcVoucherDenom); err != nil { + return err + } + + vaults := make(map[string]bool) + + for _, vault := range p.Vaults { + _, ok := vaults[vault.Address] + if ok { + return ErrInvalidParams + } + + _, err := sdk.AccAddressFromBech32(vault.Address) + if err != nil { + return err + } + + if len(vault.PubKey) != 0 { + _, err := secp256k1.ParsePubKey([]byte(vault.PubKey)) + if err != nil { + return err + } + } + + if vault.AssetType == AssetType_ASSET_TYPE_UNSPECIFIED { + return err + } + } + return nil } diff --git a/x/btcbridge/types/tx.pb.go b/x/btcbridge/types/tx.pb.go index 2feb849..e57fcd1 100644 --- a/x/btcbridge/types/tx.pb.go +++ b/x/btcbridge/types/tx.pb.go @@ -731,6 +731,104 @@ func (m *MsgSubmitWithdrawSignaturesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSubmitWithdrawSignaturesResponse proto.InternalMessageInfo +// MsgUpdateParamsRequest is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsRequest struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/btcbridge parameters to be updated. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParamsRequest) Reset() { *m = MsgUpdateParamsRequest{} } +func (m *MsgUpdateParamsRequest) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsRequest) ProtoMessage() {} +func (*MsgUpdateParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_785ca8e1e4227068, []int{14} +} +func (m *MsgUpdateParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsRequest.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 *MsgUpdateParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsRequest.Merge(m, src) +} +func (m *MsgUpdateParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsRequest proto.InternalMessageInfo + +func (m *MsgUpdateParamsRequest) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParamsRequest) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the Msg/UpdateParams response type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_785ca8e1e4227068, []int{15} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.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 *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgSubmitWithdrawStatusRequest)(nil), "side.btcbridge.MsgSubmitWithdrawStatusRequest") proto.RegisterType((*MsgSubmitWithdrawStatusResponse)(nil), "side.btcbridge.MsgSubmitWithdrawStatusResponse") @@ -746,56 +844,62 @@ func init() { proto.RegisterType((*MsgWithdrawBitcoinResponse)(nil), "side.btcbridge.MsgWithdrawBitcoinResponse") proto.RegisterType((*MsgSubmitWithdrawSignaturesRequest)(nil), "side.btcbridge.MsgSubmitWithdrawSignaturesRequest") proto.RegisterType((*MsgSubmitWithdrawSignaturesResponse)(nil), "side.btcbridge.MsgSubmitWithdrawSignaturesResponse") + proto.RegisterType((*MsgUpdateParamsRequest)(nil), "side.btcbridge.MsgUpdateParamsRequest") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "side.btcbridge.MsgUpdateParamsResponse") } func init() { proto.RegisterFile("side/btcbridge/tx.proto", fileDescriptor_785ca8e1e4227068) } var fileDescriptor_785ca8e1e4227068 = []byte{ - // 690 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x4e, 0xdb, 0x40, - 0x10, 0xc6, 0x04, 0x02, 0x19, 0x0a, 0x95, 0x56, 0x08, 0x82, 0x01, 0x13, 0x5c, 0x5a, 0xa5, 0xad, - 0xea, 0xa8, 0xa1, 0xbd, 0x57, 0x51, 0x0f, 0x5c, 0x72, 0xa8, 0xa1, 0x42, 0xea, 0x25, 0x5a, 0xc7, - 0x1b, 0x67, 0xd5, 0xc4, 0xeb, 0x7a, 0xd7, 0x25, 0xdc, 0x2a, 0x21, 0xf5, 0xd4, 0x43, 0xdf, 0xa4, - 0xaf, 0xd1, 0x23, 0xc7, 0x1e, 0x2b, 0x78, 0x83, 0x3e, 0x41, 0xe5, 0xf5, 0x62, 0x42, 0xb0, 0xf3, - 0x53, 0xf5, 0xb6, 0xb3, 0xf3, 0xcd, 0xcc, 0xb7, 0x33, 0xf3, 0xc9, 0x86, 0x4d, 0x4e, 0x5d, 0x52, - 0x73, 0x44, 0xdb, 0x09, 0xa9, 0xeb, 0x91, 0x9a, 0x18, 0x58, 0x41, 0xc8, 0x04, 0x43, 0x6b, 0xb1, - 0xc3, 0x4a, 0x1d, 0xfa, 0xba, 0xc7, 0x3c, 0x26, 0x5d, 0xb5, 0xf8, 0x94, 0xa0, 0xf4, 0xed, 0x91, - 0xf0, 0x00, 0x87, 0xb8, 0x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x4b, 0x0c, 0x5a, 0xce, 0xb9, - 0x20, 0x49, 0x5f, 0x4b, 0xf6, 0x4a, 0x7c, 0x79, 0x32, 0x68, 0xc4, 0x57, 0x68, 0x0b, 0x96, 0x53, - 0xf7, 0x82, 0x74, 0x2f, 0x09, 0xe5, 0x5a, 0x87, 0xc5, 0x20, 0x64, 0xac, 0x53, 0x5e, 0xac, 0x14, - 0xaa, 0x25, 0x3b, 0x31, 0xcc, 0xc7, 0xf0, 0x68, 0x2c, 0x61, 0xf5, 0xb0, 0x6f, 0xda, 0x10, 0xee, - 0x66, 0x2c, 0xff, 0xed, 0x65, 0x33, 0xb3, 0x7e, 0x02, 0x07, 0xe3, 0xd9, 0x28, 0xda, 0xa7, 0xb0, - 0xdf, 0xe4, 0xde, 0xfb, 0xc0, 0xc5, 0x82, 0xbc, 0x8b, 0x70, 0x8f, 0x76, 0x28, 0x71, 0x6d, 0xd2, - 0xc3, 0xe7, 0x72, 0x6a, 0xe3, 0x39, 0xeb, 0xb0, 0x1c, 0x2a, 0xa8, 0x5c, 0x95, 0x92, 0x9d, 0xda, - 0xe6, 0x81, 0x9c, 0x73, 0x6e, 0x62, 0x55, 0xbe, 0x03, 0x5b, 0x4d, 0xee, 0xdd, 0x10, 0x6c, 0x24, - 0x6a, 0x9b, 0x54, 0x76, 0x03, 0x8a, 0xb8, 0xcf, 0x22, 0x5f, 0xa8, 0x3e, 0x29, 0x2b, 0x6e, 0x52, - 0x87, 0x90, 0x56, 0x88, 0x05, 0x51, 0x93, 0x5f, 0xea, 0x10, 0x62, 0x63, 0x41, 0xcc, 0x1d, 0xd0, - 0xb3, 0xea, 0x28, 0x16, 0xee, 0xd0, 0x4e, 0xa6, 0x8a, 0xa2, 0x9e, 0x8f, 0x45, 0x14, 0x92, 0x7f, - 0x92, 0x36, 0x82, 0x85, 0x80, 0x3b, 0x42, 0xd1, 0x90, 0xe7, 0x3b, 0x8b, 0x94, 0x55, 0x25, 0x21, - 0x53, 0xff, 0x53, 0x84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ff, 0x49, 0x27, 0x26, 0xd6, 0xa6, 0x08, - 0x00, 0x00, + // 764 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0xda, 0x48, + 0x14, 0xc6, 0x81, 0x90, 0xf0, 0xf2, 0x63, 0xa5, 0x51, 0x44, 0xc0, 0x21, 0x84, 0x78, 0xb3, 0x59, + 0x76, 0x57, 0x0b, 0x5a, 0x92, 0xbd, 0x57, 0xa8, 0x87, 0x5c, 0x90, 0x5a, 0x27, 0x55, 0xa4, 0x5e, + 0xd0, 0x18, 0x0f, 0x66, 0x54, 0xf0, 0xb8, 0x9e, 0x71, 0x03, 0xb7, 0x4a, 0x91, 0x7a, 0xea, 0xa1, + 0xff, 0x49, 0xff, 0x8d, 0x1c, 0x23, 0xf5, 0xd2, 0x53, 0x55, 0x25, 0xff, 0x48, 0xc5, 0x78, 0x62, + 0x08, 0x60, 0x08, 0x55, 0x6f, 0x7e, 0xf3, 0xbe, 0xf7, 0xbe, 0xcf, 0xf3, 0xfc, 0x8d, 0x07, 0x76, + 0x39, 0xb5, 0x49, 0xd5, 0x12, 0x2d, 0xcb, 0xa7, 0xb6, 0x43, 0xaa, 0xa2, 0x5f, 0xf1, 0x7c, 0x26, + 0x18, 0xda, 0x1e, 0x26, 0x2a, 0x51, 0x42, 0xdf, 0x71, 0x98, 0xc3, 0x64, 0xaa, 0x3a, 0x7c, 0x0a, + 0x51, 0xfa, 0xde, 0x44, 0xb9, 0x87, 0x7d, 0xdc, 0xe3, 0x2a, 0x59, 0x98, 0x48, 0x5a, 0x54, 0xb4, + 0x18, 0x75, 0xc3, 0xac, 0x71, 0xad, 0x41, 0xb1, 0xc1, 0x9d, 0xf3, 0xc0, 0xea, 0x51, 0x71, 0x49, + 0x45, 0xc7, 0xf6, 0xf1, 0xd5, 0xb9, 0xc0, 0x22, 0xe0, 0x26, 0x79, 0x1b, 0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f, 0x26, + 0x5e, 0x57, 0x1c, 0x2a, 0x3a, 0x81, 0x55, 0x69, 0xb1, 0x5e, 0x75, 0xd8, 0x4c, 0xde, 0x79, 0x5a, + 0xac, 0x2b, 0x83, 0x6a, 0x7f, 0xfc, 0xc6, 0x35, 0xf0, 0x08, 0xb7, 0xd2, 0x12, 0x70, 0xf2, 0x23, + 0x00, 0x00, 0xff, 0xff, 0x3c, 0x5e, 0x41, 0x69, 0x90, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -824,6 +928,11 @@ type MsgClient interface { SubmitWithdrawSignatures(ctx context.Context, in *MsgSubmitWithdrawSignaturesRequest, opts ...grpc.CallOption) (*MsgSubmitWithdrawSignaturesResponse, error) // SubmitWithdrawStatus submits the status of the withdraw transaction. SubmitWithdrawStatus(ctx context.Context, in *MsgSubmitWithdrawStatusRequest, opts ...grpc.CallOption) (*MsgSubmitWithdrawStatusResponse, error) + // UpdateParams defines a governance operation for updating the x/btcbridge module + // parameters. The authority defaults to the x/gov module account. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParamsRequest, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } type msgClient struct { @@ -897,6 +1006,15 @@ func (c *msgClient) SubmitWithdrawStatus(ctx context.Context, in *MsgSubmitWithd return out, nil } +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParamsRequest, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/side.btcbridge.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // SubmitBlockHeaders submits bitcoin block headers to the side chain. @@ -913,6 +1031,11 @@ type MsgServer interface { SubmitWithdrawSignatures(context.Context, *MsgSubmitWithdrawSignaturesRequest) (*MsgSubmitWithdrawSignaturesResponse, error) // SubmitWithdrawStatus submits the status of the withdraw transaction. SubmitWithdrawStatus(context.Context, *MsgSubmitWithdrawStatusRequest) (*MsgSubmitWithdrawStatusResponse, error) + // UpdateParams defines a governance operation for updating the x/btcbridge module + // parameters. The authority defaults to the x/gov module account. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParamsRequest) (*MsgUpdateParamsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -940,6 +1063,9 @@ func (*UnimplementedMsgServer) SubmitWithdrawSignatures(ctx context.Context, req func (*UnimplementedMsgServer) SubmitWithdrawStatus(ctx context.Context, req *MsgSubmitWithdrawStatusRequest) (*MsgSubmitWithdrawStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SubmitWithdrawStatus not implemented") } +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParamsRequest) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1071,6 +1197,24 @@ func _Msg_SubmitWithdrawStatus_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/side.btcbridge.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "side.btcbridge.Msg", HandlerType: (*MsgServer)(nil), @@ -1103,6 +1247,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "SubmitWithdrawStatus", Handler: _Msg_SubmitWithdrawStatus_Handler, }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "side/btcbridge/tx.proto", @@ -1595,6 +1743,69 @@ func (m *MsgSubmitWithdrawSignaturesResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } +func (m *MsgUpdateParamsRequest) 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 *MsgUpdateParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) 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 *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) 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 @@ -1827,6 +2038,30 @@ func (m *MsgSubmitWithdrawSignaturesResponse) Size() (n int) { return n } +func (m *MsgUpdateParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) 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 } @@ -3226,6 +3461,171 @@ func (m *MsgSubmitWithdrawSignaturesResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateParamsRequest) 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: MsgUpdateParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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 err := m.Params.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 *MsgUpdateParamsResponse) 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: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: 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