diff --git a/proto/babylon/finality/v1/tx.proto b/proto/babylon/finality/v1/tx.proto index fd46f9f3a..90d6ee73b 100644 --- a/proto/babylon/finality/v1/tx.proto +++ b/proto/babylon/finality/v1/tx.proto @@ -20,6 +20,9 @@ service Msg { // TODO: msg for evidence of equivocation. this is not specified yet // UpdateParams updates the finality module parameters. rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + // UnjailFinalityProvider defines a method for unjailing a jailed + // finality provider, thus it can receive voting power + rpc UnjailFinalityProvider(MsgUnjailFinalityProvider) returns (MsgUnjailFinalityProviderResponse); } // MsgCommitPubRandList defines a message for committing a list of public randomness for EOTS @@ -36,7 +39,7 @@ message MsgCommitPubRandList { // commitment is the commitment of these public randomness // currently it's the root of the Merkle tree that includes these public randomness bytes commitment = 5; - // sig is the signature on (start_height || num_pub_rand || commitment) signed by + // sig is the signature on (start_height || num_pub_rand || commitment) signed by // SK corresponding to fp_btc_pk. This prevents others to commit public // randomness on behalf of fp_btc_pk // TODO: another option is to restrict signer to correspond to fp_btc_pk. This restricts @@ -73,13 +76,13 @@ message MsgAddFinalitySigResponse{} // MsgUpdateParams defines a message for updating finality module parameters. message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; - + // authority is the address of the governance account. // just FYI: cosmos.AddressString marks that this field should use type alias // for AddressString instead of string, but the functionality is not yet implemented // in cosmos-proto string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + // params defines the finality parameters to update. // // NOTE: All parameters must be supplied. @@ -87,3 +90,16 @@ message MsgUpdateParams { } // MsgUpdateParamsResponse is the response to the MsgUpdateParams message. message MsgUpdateParamsResponse {} + +// MsgUnjailFinalityProvider defines the Msg/UnjailFinalityProvider request type +message MsgUnjailFinalityProvider { + option (gogoproto.goproto_getters) = false; + option (cosmos.msg.v1.signer) = "signer"; + + string signer = 1; + // fp_btc_pk is the BTC PK of the finality provider that commits the public randomness + bytes fp_btc_pk = 2 [ (gogoproto.customtype) = "github.com/babylonlabs-io/babylon/types.BIP340PubKey" ]; +} + +// MsgUnjailFinalityProviderResponse defines the Msg/UnjailFinalityProvider response type +message MsgUnjailFinalityProviderResponse {} diff --git a/x/finality/types/tx.pb.go b/x/finality/types/tx.pb.go index a4768d48e..835433de4 100644 --- a/x/finality/types/tx.pb.go +++ b/x/finality/types/tx.pb.go @@ -365,6 +365,83 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo +// MsgUnjailFinalityProvider defines the Msg/UnjailFinalityProvider request type +type MsgUnjailFinalityProvider struct { + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + // fp_btc_pk is the BTC PK of the finality provider that commits the public randomness + FpBtcPk *github_com_babylonlabs_io_babylon_types.BIP340PubKey `protobuf:"bytes,2,opt,name=fp_btc_pk,json=fpBtcPk,proto3,customtype=github.com/babylonlabs-io/babylon/types.BIP340PubKey" json:"fp_btc_pk,omitempty"` +} + +func (m *MsgUnjailFinalityProvider) Reset() { *m = MsgUnjailFinalityProvider{} } +func (m *MsgUnjailFinalityProvider) String() string { return proto.CompactTextString(m) } +func (*MsgUnjailFinalityProvider) ProtoMessage() {} +func (*MsgUnjailFinalityProvider) Descriptor() ([]byte, []int) { + return fileDescriptor_2dd6da066b6baf1d, []int{6} +} +func (m *MsgUnjailFinalityProvider) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnjailFinalityProvider) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUnjailFinalityProvider.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 *MsgUnjailFinalityProvider) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnjailFinalityProvider.Merge(m, src) +} +func (m *MsgUnjailFinalityProvider) XXX_Size() int { + return m.Size() +} +func (m *MsgUnjailFinalityProvider) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnjailFinalityProvider.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnjailFinalityProvider proto.InternalMessageInfo + +// MsgUnjailFinalityProviderResponse defines the Msg/UnjailFinalityProvider response type +type MsgUnjailFinalityProviderResponse struct { +} + +func (m *MsgUnjailFinalityProviderResponse) Reset() { *m = MsgUnjailFinalityProviderResponse{} } +func (m *MsgUnjailFinalityProviderResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUnjailFinalityProviderResponse) ProtoMessage() {} +func (*MsgUnjailFinalityProviderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2dd6da066b6baf1d, []int{7} +} +func (m *MsgUnjailFinalityProviderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnjailFinalityProviderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUnjailFinalityProviderResponse.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 *MsgUnjailFinalityProviderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnjailFinalityProviderResponse.Merge(m, src) +} +func (m *MsgUnjailFinalityProviderResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUnjailFinalityProviderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnjailFinalityProviderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnjailFinalityProviderResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgCommitPubRandList)(nil), "babylon.finality.v1.MsgCommitPubRandList") proto.RegisterType((*MsgCommitPubRandListResponse)(nil), "babylon.finality.v1.MsgCommitPubRandListResponse") @@ -372,57 +449,63 @@ func init() { proto.RegisterType((*MsgAddFinalitySigResponse)(nil), "babylon.finality.v1.MsgAddFinalitySigResponse") proto.RegisterType((*MsgUpdateParams)(nil), "babylon.finality.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "babylon.finality.v1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgUnjailFinalityProvider)(nil), "babylon.finality.v1.MsgUnjailFinalityProvider") + proto.RegisterType((*MsgUnjailFinalityProviderResponse)(nil), "babylon.finality.v1.MsgUnjailFinalityProviderResponse") } func init() { proto.RegisterFile("babylon/finality/v1/tx.proto", fileDescriptor_2dd6da066b6baf1d) } var fileDescriptor_2dd6da066b6baf1d = []byte{ - // 714 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x4f, 0x4f, 0x13, 0x4f, - 0x18, 0xee, 0x52, 0x28, 0x3f, 0xa6, 0x0d, 0xbf, 0xb0, 0x12, 0x59, 0x0a, 0x6e, 0x6b, 0x43, 0x0c, - 0x12, 0xd9, 0x95, 0x42, 0x50, 0xf1, 0x44, 0x8d, 0x06, 0x23, 0x8d, 0xcd, 0x16, 0x2e, 0x26, 0x66, - 0xb3, 0xff, 0x3a, 0x3b, 0xa1, 0xbb, 0x33, 0xce, 0xcc, 0x12, 0x7a, 0x33, 0x7e, 0x02, 0x0f, 0x7e, - 0x10, 0x0e, 0x5e, 0x3d, 0x9a, 0x70, 0x31, 0x21, 0x9e, 0x0c, 0x87, 0xc6, 0xc0, 0x81, 0xaf, 0x61, - 0xba, 0x3b, 0xa5, 0x14, 0x4a, 0xac, 0x1e, 0xbc, 0xed, 0xbc, 0xef, 0xf3, 0xce, 0xf3, 0xec, 0xfb, - 0xbc, 0xef, 0x80, 0x79, 0xdb, 0xb2, 0x5b, 0x4d, 0x1c, 0xea, 0x0d, 0x14, 0x5a, 0x4d, 0xc4, 0x5b, - 0xfa, 0xfe, 0x8a, 0xce, 0x0f, 0x34, 0x42, 0x31, 0xc7, 0xf2, 0x2d, 0x91, 0xd5, 0xba, 0x59, 0x6d, - 0x7f, 0x25, 0x3f, 0x0d, 0x31, 0xc4, 0x71, 0x5e, 0xef, 0x7c, 0x25, 0xd0, 0xfc, 0x1d, 0xee, 0x85, - 0xae, 0x47, 0x03, 0x14, 0x72, 0xdd, 0xa1, 0x2d, 0xc2, 0xb1, 0x4e, 0x28, 0xc6, 0x0d, 0x91, 0x9e, - 0x75, 0x30, 0x0b, 0x30, 0x33, 0x93, 0xba, 0xe4, 0x20, 0x52, 0x33, 0xc9, 0x49, 0x0f, 0x18, 0xec, - 0x90, 0x07, 0x0c, 0x8a, 0x44, 0x71, 0x90, 0x36, 0x62, 0x51, 0x2b, 0x10, 0xa5, 0xa5, 0xaf, 0x23, - 0x60, 0xba, 0xca, 0xe0, 0x33, 0x1c, 0x04, 0x88, 0xd7, 0x22, 0xdb, 0xb0, 0x42, 0x77, 0x1b, 0x31, - 0x2e, 0xdf, 0x06, 0x19, 0x86, 0x60, 0xe8, 0x51, 0x45, 0x2a, 0x4a, 0x8b, 0x13, 0x86, 0x38, 0xc9, - 0x3b, 0x60, 0xa2, 0x41, 0x4c, 0x9b, 0x3b, 0x26, 0xd9, 0x53, 0x46, 0x8a, 0xd2, 0x62, 0xae, 0xf2, - 0xf8, 0xa4, 0x5d, 0x58, 0x83, 0x88, 0xfb, 0x91, 0xad, 0x39, 0x38, 0xd0, 0x05, 0x69, 0xd3, 0xb2, - 0xd9, 0x32, 0xc2, 0xdd, 0xa3, 0xce, 0x5b, 0xc4, 0x63, 0x5a, 0xe5, 0x65, 0x6d, 0x75, 0xed, 0x61, - 0x2d, 0xb2, 0x5f, 0x79, 0x2d, 0x63, 0xbc, 0x41, 0x2a, 0xdc, 0xa9, 0xed, 0xc9, 0x77, 0x41, 0x8e, - 0x71, 0x8b, 0x72, 0xd3, 0xf7, 0x10, 0xf4, 0xb9, 0x92, 0x2e, 0x4a, 0x8b, 0xa3, 0x46, 0x36, 0x8e, - 0x6d, 0xc5, 0x21, 0xb9, 0x08, 0x72, 0x61, 0x14, 0x98, 0x24, 0xb2, 0x4d, 0x6a, 0x85, 0xae, 0x32, - 0x1a, 0x43, 0x40, 0x18, 0x05, 0x42, 0xb6, 0xac, 0x02, 0xe0, 0xc4, 0xff, 0x11, 0x78, 0x21, 0x57, - 0xc6, 0x3a, 0xda, 0x8c, 0x4b, 0x11, 0xb9, 0x0a, 0xd2, 0x0c, 0x41, 0x25, 0x13, 0x8b, 0x7e, 0x7a, - 0xd2, 0x2e, 0x3c, 0xfa, 0x33, 0xd1, 0x75, 0x04, 0x43, 0x8b, 0x47, 0xd4, 0x33, 0x3a, 0xf7, 0x6c, - 0x64, 0x3f, 0x9c, 0x1f, 0x2e, 0x89, 0xb6, 0x94, 0x54, 0x30, 0x3f, 0xa8, 0x8d, 0x86, 0xc7, 0x08, - 0x0e, 0x99, 0x57, 0xfa, 0x92, 0x06, 0x53, 0x55, 0x06, 0x37, 0x5d, 0xf7, 0x85, 0xb0, 0xa2, 0x8e, - 0xe0, 0xbf, 0x6f, 0xb2, 0xdd, 0xc4, 0xce, 0xde, 0x95, 0x26, 0xc7, 0x31, 0xd1, 0xe4, 0x5d, 0xf0, - 0x5f, 0x5f, 0x83, 0x73, 0x95, 0x8d, 0x93, 0x76, 0x61, 0x7d, 0x58, 0xde, 0xba, 0xe3, 0x87, 0x98, - 0x52, 0xd1, 0x00, 0x63, 0x9c, 0x08, 0x67, 0x34, 0x30, 0x16, 0x8f, 0x72, 0x6c, 0x4a, 0xb6, 0xac, - 0x68, 0xbd, 0x51, 0xd7, 0x92, 0x51, 0xd7, 0x6a, 0x9d, 0xbc, 0x91, 0xc0, 0xe4, 0x05, 0x30, 0x99, - 0x28, 0xb5, 0x08, 0x31, 0x7d, 0x8b, 0xf9, 0x89, 0x69, 0x46, 0xa2, 0x7f, 0x93, 0x90, 0x2d, 0x8b, - 0xf9, 0xf2, 0x5b, 0x90, 0xeb, 0xce, 0xb5, 0xd9, 0x31, 0x76, 0xfc, 0xaf, 0x05, 0x3f, 0x7f, 0xbd, -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0x67, 0x6a, 0xea, 0xc7, 0x99, 0x9a, 0x7a, 0x53, 0xfe, 0xfd, - 0x28, 0x1e, 0xf4, 0x9e, 0xe7, 0x78, 0x2a, 0xed, 0x4c, 0xfc, 0x36, 0xaf, 0xfe, 0x0a, 0x00, 0x00, - 0xff, 0xff, 0x0a, 0x87, 0xfa, 0xed, 0x5b, 0x06, 0x00, 0x00, + // 774 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcf, 0x4f, 0x1b, 0x47, + 0x18, 0xf5, 0x62, 0x30, 0x65, 0x6c, 0x81, 0xd8, 0x22, 0x58, 0x0c, 0x5d, 0x1b, 0x17, 0x55, 0x14, + 0x95, 0xdd, 0x62, 0x10, 0x6d, 0xdd, 0x13, 0xae, 0x5a, 0x51, 0x15, 0xab, 0xd6, 0x1a, 0x2e, 0x91, + 0xa2, 0xd5, 0xfe, 0xf2, 0xec, 0x04, 0xef, 0xce, 0x64, 0x66, 0x16, 0xe1, 0x1b, 0xca, 0x29, 0xc7, + 0x1c, 0x72, 0xca, 0x29, 0x7f, 0x02, 0x87, 0x5c, 0x73, 0x8c, 0xc4, 0x11, 0xe5, 0x14, 0x71, 0xb0, + 0x22, 0x38, 0xf0, 0x6f, 0x44, 0xde, 0x5d, 0xdb, 0x18, 0x6c, 0xc5, 0xe4, 0xc0, 0xcd, 0x33, 0xdf, + 0x9b, 0xf9, 0xde, 0xbc, 0xf7, 0x3e, 0x2f, 0x58, 0x36, 0x0d, 0xb3, 0xd9, 0xc0, 0xbe, 0x5a, 0x47, + 0xbe, 0xd1, 0x40, 0xbc, 0xa9, 0x1e, 0x6f, 0xaa, 0xfc, 0x44, 0x21, 0x14, 0x73, 0x2c, 0x7e, 0x1f, + 0x57, 0x95, 0x4e, 0x55, 0x39, 0xde, 0xcc, 0xce, 0x41, 0x0c, 0x71, 0x58, 0x57, 0xdb, 0xbf, 0x22, +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0x2a, 0xfb, 0xcb, 0x28, 0xa8, 0x6e, 0x8f, 0x53, 0x01, 0xcc, 0x0f, 0xc9, 0xc1, + 0x50, 0xba, 0x83, 0xf1, 0xd9, 0x9d, 0x87, 0xe1, 0x3b, 0x14, 0xb2, 0x13, 0xa7, 0x37, 0x67, 0xeb, + 0x42, 0x79, 0xff, 0xfc, 0x4a, 0x16, 0x2e, 0xae, 0x64, 0xe1, 0xf3, 0x95, 0x2c, 0xbc, 0xba, 0x96, + 0x13, 0x17, 0xd7, 0x72, 0xe2, 0xd3, 0xb5, 0x9c, 0x78, 0x52, 0xfc, 0x7a, 0xc2, 0x4e, 0x7a, 0xdf, + 0xb8, 0x30, 0x6c, 0x66, 0x2a, 0xfc, 0xc0, 0x6d, 0x7d, 0x09, 0x00, 0x00, 0xff, 0xff, 0x64, 0x3e, + 0x90, 0x65, 0xa0, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -444,6 +527,9 @@ type MsgClient interface { // TODO: msg for evidence of equivocation. this is not specified yet // UpdateParams updates the finality module parameters. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // UnjailFinalityProvider defines a method for unjailing a jailed + // finality provider, thus it can receive voting power + UnjailFinalityProvider(ctx context.Context, in *MsgUnjailFinalityProvider, opts ...grpc.CallOption) (*MsgUnjailFinalityProviderResponse, error) } type msgClient struct { @@ -481,6 +567,15 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) UnjailFinalityProvider(ctx context.Context, in *MsgUnjailFinalityProvider, opts ...grpc.CallOption) (*MsgUnjailFinalityProviderResponse, error) { + out := new(MsgUnjailFinalityProviderResponse) + err := c.cc.Invoke(ctx, "/babylon.finality.v1.Msg/UnjailFinalityProvider", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // CommitPubRandList commits a list of public randomness for EOTS @@ -490,6 +585,9 @@ type MsgServer interface { // TODO: msg for evidence of equivocation. this is not specified yet // UpdateParams updates the finality module parameters. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // UnjailFinalityProvider defines a method for unjailing a jailed + // finality provider, thus it can receive voting power + UnjailFinalityProvider(context.Context, *MsgUnjailFinalityProvider) (*MsgUnjailFinalityProviderResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -505,6 +603,9 @@ func (*UnimplementedMsgServer) AddFinalitySig(ctx context.Context, req *MsgAddFi func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (*UnimplementedMsgServer) UnjailFinalityProvider(ctx context.Context, req *MsgUnjailFinalityProvider) (*MsgUnjailFinalityProviderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnjailFinalityProvider not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -564,6 +665,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_UnjailFinalityProvider_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnjailFinalityProvider) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnjailFinalityProvider(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/babylon.finality.v1.Msg/UnjailFinalityProvider", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnjailFinalityProvider(ctx, req.(*MsgUnjailFinalityProvider)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "babylon.finality.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -580,6 +699,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "UnjailFinalityProvider", + Handler: _Msg_UnjailFinalityProvider_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "babylon/finality/v1/tx.proto", @@ -855,6 +978,71 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *MsgUnjailFinalityProvider) 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 *MsgUnjailFinalityProvider) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnjailFinalityProvider) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FpBtcPk != nil { + { + size := m.FpBtcPk.Size() + i -= size + if _, err := m.FpBtcPk.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUnjailFinalityProviderResponse) 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 *MsgUnjailFinalityProviderResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnjailFinalityProviderResponse) 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 @@ -975,6 +1163,32 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } +func (m *MsgUnjailFinalityProvider) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.FpBtcPk != nil { + l = m.FpBtcPk.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUnjailFinalityProviderResponse) 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 } @@ -1746,6 +1960,173 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUnjailFinalityProvider) 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: MsgUnjailFinalityProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnjailFinalityProvider: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FpBtcPk", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_babylonlabs_io_babylon_types.BIP340PubKey + m.FpBtcPk = &v + if err := m.FpBtcPk.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 *MsgUnjailFinalityProviderResponse) 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: MsgUnjailFinalityProviderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnjailFinalityProviderResponse: 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