From fa151611181f14cb71bbf444485b6f556debaf72 Mon Sep 17 00:00:00 2001 From: keithsue Date: Fri, 3 Jan 2025 11:27:08 +0800 Subject: [PATCH] improve nonce handling --- api/side/dlc/tx.pulsar.go | 272 ++++++++++++-------- api/side/lending/tx.pulsar.go | 423 +++++++++++--------------------- proto/side/dlc/tx.proto | 3 +- x/dlc/keeper/event.go | 44 ++++ x/dlc/keeper/msg_server.go | 2 +- x/dlc/keeper/nonce.go | 19 ++ x/dlc/keeper/params.go | 18 ++ x/dlc/module/abci.go | 7 + x/dlc/types/keys.go | 41 +++- x/dlc/types/msg_submit_nonce.go | 10 + x/dlc/types/tx.pb.go | 140 +++++++---- x/lending/types/tx.pb.go | 228 +++++------------ 12 files changed, 603 insertions(+), 604 deletions(-) create mode 100644 x/dlc/keeper/params.go diff --git a/api/side/dlc/tx.pulsar.go b/api/side/dlc/tx.pulsar.go index 224a282..f905920 100644 --- a/api/side/dlc/tx.pulsar.go +++ b/api/side/dlc/tx.pulsar.go @@ -1919,10 +1919,11 @@ func (x *fastReflection_MsgSubmitOraclePubKeyResponse) ProtoMethods() *protoifac } var ( - md_MsgSubmitNonce protoreflect.MessageDescriptor - fd_MsgSubmitNonce_sender protoreflect.FieldDescriptor - fd_MsgSubmitNonce_nonce protoreflect.FieldDescriptor - fd_MsgSubmitNonce_signature protoreflect.FieldDescriptor + md_MsgSubmitNonce protoreflect.MessageDescriptor + fd_MsgSubmitNonce_sender protoreflect.FieldDescriptor + fd_MsgSubmitNonce_nonce protoreflect.FieldDescriptor + fd_MsgSubmitNonce_oracle_pubkey protoreflect.FieldDescriptor + fd_MsgSubmitNonce_signature protoreflect.FieldDescriptor ) func init() { @@ -1930,6 +1931,7 @@ func init() { md_MsgSubmitNonce = File_side_dlc_tx_proto.Messages().ByName("MsgSubmitNonce") fd_MsgSubmitNonce_sender = md_MsgSubmitNonce.Fields().ByName("sender") fd_MsgSubmitNonce_nonce = md_MsgSubmitNonce.Fields().ByName("nonce") + fd_MsgSubmitNonce_oracle_pubkey = md_MsgSubmitNonce.Fields().ByName("oracle_pubkey") fd_MsgSubmitNonce_signature = md_MsgSubmitNonce.Fields().ByName("signature") } @@ -2010,6 +2012,12 @@ func (x *fastReflection_MsgSubmitNonce) Range(f func(protoreflect.FieldDescripto return } } + if x.OraclePubkey != "" { + value := protoreflect.ValueOfString(x.OraclePubkey) + if !f(fd_MsgSubmitNonce_oracle_pubkey, value) { + return + } + } if x.Signature != "" { value := protoreflect.ValueOfString(x.Signature) if !f(fd_MsgSubmitNonce_signature, value) { @@ -2035,6 +2043,8 @@ func (x *fastReflection_MsgSubmitNonce) Has(fd protoreflect.FieldDescriptor) boo return x.Sender != "" case "side.dlc.MsgSubmitNonce.nonce": return x.Nonce != "" + case "side.dlc.MsgSubmitNonce.oracle_pubkey": + return x.OraclePubkey != "" case "side.dlc.MsgSubmitNonce.signature": return x.Signature != "" default: @@ -2057,6 +2067,8 @@ func (x *fastReflection_MsgSubmitNonce) Clear(fd protoreflect.FieldDescriptor) { x.Sender = "" case "side.dlc.MsgSubmitNonce.nonce": x.Nonce = "" + case "side.dlc.MsgSubmitNonce.oracle_pubkey": + x.OraclePubkey = "" case "side.dlc.MsgSubmitNonce.signature": x.Signature = "" default: @@ -2081,6 +2093,9 @@ func (x *fastReflection_MsgSubmitNonce) Get(descriptor protoreflect.FieldDescrip case "side.dlc.MsgSubmitNonce.nonce": value := x.Nonce return protoreflect.ValueOfString(value) + case "side.dlc.MsgSubmitNonce.oracle_pubkey": + value := x.OraclePubkey + return protoreflect.ValueOfString(value) case "side.dlc.MsgSubmitNonce.signature": value := x.Signature return protoreflect.ValueOfString(value) @@ -2108,6 +2123,8 @@ func (x *fastReflection_MsgSubmitNonce) Set(fd protoreflect.FieldDescriptor, val x.Sender = value.Interface().(string) case "side.dlc.MsgSubmitNonce.nonce": x.Nonce = value.Interface().(string) + case "side.dlc.MsgSubmitNonce.oracle_pubkey": + x.OraclePubkey = value.Interface().(string) case "side.dlc.MsgSubmitNonce.signature": x.Signature = value.Interface().(string) default: @@ -2134,6 +2151,8 @@ func (x *fastReflection_MsgSubmitNonce) Mutable(fd protoreflect.FieldDescriptor) panic(fmt.Errorf("field sender of message side.dlc.MsgSubmitNonce is not mutable")) case "side.dlc.MsgSubmitNonce.nonce": panic(fmt.Errorf("field nonce of message side.dlc.MsgSubmitNonce is not mutable")) + case "side.dlc.MsgSubmitNonce.oracle_pubkey": + panic(fmt.Errorf("field oracle_pubkey of message side.dlc.MsgSubmitNonce is not mutable")) case "side.dlc.MsgSubmitNonce.signature": panic(fmt.Errorf("field signature of message side.dlc.MsgSubmitNonce is not mutable")) default: @@ -2153,6 +2172,8 @@ func (x *fastReflection_MsgSubmitNonce) NewField(fd protoreflect.FieldDescriptor return protoreflect.ValueOfString("") case "side.dlc.MsgSubmitNonce.nonce": return protoreflect.ValueOfString("") + case "side.dlc.MsgSubmitNonce.oracle_pubkey": + return protoreflect.ValueOfString("") case "side.dlc.MsgSubmitNonce.signature": return protoreflect.ValueOfString("") default: @@ -2232,6 +2253,10 @@ func (x *fastReflection_MsgSubmitNonce) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.OraclePubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } l = len(x.Signature) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -2270,6 +2295,13 @@ func (x *fastReflection_MsgSubmitNonce) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.Signature) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signature))) i-- + dAtA[i] = 0x22 + } + if len(x.OraclePubkey) > 0 { + i -= len(x.OraclePubkey) + copy(dAtA[i:], x.OraclePubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OraclePubkey))) + i-- dAtA[i] = 0x1a } if len(x.Nonce) > 0 { @@ -2400,6 +2432,38 @@ func (x *fastReflection_MsgSubmitNonce) ProtoMethods() *protoiface.Methods { x.Nonce = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OraclePubkey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OraclePubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } @@ -6649,9 +6713,10 @@ type MsgSubmitNonce struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Nonce string `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Nonce string `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + OraclePubkey string `protobuf:"bytes,3,opt,name=oracle_pubkey,json=oraclePubkey,proto3" json:"oracle_pubkey,omitempty"` + Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` } func (x *MsgSubmitNonce) Reset() { @@ -6688,6 +6753,13 @@ func (x *MsgSubmitNonce) GetNonce() string { return "" } +func (x *MsgSubmitNonce) GetOraclePubkey() string { + if x != nil { + return x.OraclePubkey + } + return "" +} + func (x *MsgSubmitNonce) GetSignature() string { if x != nil { return x.Signature @@ -7063,100 +7135,102 @@ var file_side_dlc_tx_proto_rawDesc = []byte{ 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x69, - 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0b, 0x82, 0xe7, - 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x74, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, - 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0b, 0x82, 0xe7, - 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, + 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e, + 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4e, 0x6f, 0x6e, 0x63, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, + 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x75, + 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, + 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4e, 0x6f, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x74, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x0f, 0x4d, 0x73, - 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x70, - 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x0e, 0x82, - 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, - 0x17, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1c, 0x0a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, - 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x1c, - 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x0e, 0x82, 0xe7, - 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, - 0x64, 0x6c, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x32, 0xde, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x49, 0x0a, 0x0b, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x73, 0x69, 0x64, + 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, + 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x81, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, + 0x70, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x81, + 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, + 0x63, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, + 0x61, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, + 0x6c, 0x64, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, + 0x67, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0x0a, + 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2e, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, + 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, + 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xde, 0x04, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x49, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, + 0x12, 0x18, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x1a, 0x20, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4e, - 0x6f, 0x6e, 0x63, 0x65, 0x1a, 0x20, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, - 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x73, 0x69, - 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x26, 0x2e, 0x73, 0x69, - 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x69, 0x64, 0x65, - 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x1a, 0x27, 0x2e, 0x73, 0x69, 0x64, - 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x67, 0x65, - 0x6e, 0x63, 0x79, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x73, 0x69, 0x64, 0x65, - 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x67, - 0x65, 0x6e, 0x63, 0x79, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x1a, 0x27, 0x2e, 0x73, 0x69, 0x64, - 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, - 0x67, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x12, 0x19, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, - 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x1a, 0x21, - 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4c, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x63, - 0x79, 0x12, 0x19, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x1a, 0x21, 0x2e, 0x73, - 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x41, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4c, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x19, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x21, 0x2e, 0x73, 0x69, 0x64, - 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, - 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x73, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x69, 0x64, 0x65, - 0x2e, 0x64, 0x6c, 0x63, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x64, 0x6c, 0x63, 0xa2, 0x02, 0x03, 0x53, 0x44, 0x58, - 0xaa, 0x02, 0x08, 0x53, 0x69, 0x64, 0x65, 0x2e, 0x44, 0x6c, 0x63, 0xca, 0x02, 0x08, 0x53, 0x69, - 0x64, 0x65, 0x5c, 0x44, 0x6c, 0x63, 0xe2, 0x02, 0x14, 0x53, 0x69, 0x64, 0x65, 0x5c, 0x44, 0x6c, - 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, - 0x53, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x44, 0x6c, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x11, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1e, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0x26, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x12, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, + 0x1f, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, + 0x1a, 0x27, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x50, 0x75, 0x62, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x12, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, + 0x1f, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, + 0x1a, 0x27, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x75, 0x62, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0c, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x12, 0x19, 0x2e, 0x73, 0x69, 0x64, 0x65, + 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x1a, 0x21, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x41, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x19, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, + 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, + 0x63, 0x79, 0x1a, 0x21, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x19, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x1a, 0x21, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x73, 0x0a, 0x0c, 0x63, 0x6f, + 0x6d, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x64, 0x6c, 0x63, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, + 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x64, 0x6c, 0x63, + 0xa2, 0x02, 0x03, 0x53, 0x44, 0x58, 0xaa, 0x02, 0x08, 0x53, 0x69, 0x64, 0x65, 0x2e, 0x44, 0x6c, + 0x63, 0xca, 0x02, 0x08, 0x53, 0x69, 0x64, 0x65, 0x5c, 0x44, 0x6c, 0x63, 0xe2, 0x02, 0x14, 0x53, + 0x69, 0x64, 0x65, 0x5c, 0x44, 0x6c, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x53, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x44, 0x6c, 0x63, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/side/lending/tx.pulsar.go b/api/side/lending/tx.pulsar.go index 031e269..b51f9a8 100644 --- a/api/side/lending/tx.pulsar.go +++ b/api/side/lending/tx.pulsar.go @@ -920,12 +920,10 @@ func (x *fastReflection_MsgCreatePoolResponse) ProtoMethods() *protoiface.Method } var ( - md_MsgRepay protoreflect.MessageDescriptor - fd_MsgRepay_borrower protoreflect.FieldDescriptor - fd_MsgRepay_loan_id protoreflect.FieldDescriptor - fd_MsgRepay_adaptor_point protoreflect.FieldDescriptor - fd_MsgRepay_claim_tx_id protoreflect.FieldDescriptor - fd_MsgRepay_adaptor_signature protoreflect.FieldDescriptor + md_MsgRepay protoreflect.MessageDescriptor + fd_MsgRepay_borrower protoreflect.FieldDescriptor + fd_MsgRepay_loan_id protoreflect.FieldDescriptor + fd_MsgRepay_adaptor_point protoreflect.FieldDescriptor ) func init() { @@ -934,8 +932,6 @@ func init() { fd_MsgRepay_borrower = md_MsgRepay.Fields().ByName("borrower") fd_MsgRepay_loan_id = md_MsgRepay.Fields().ByName("loan_id") fd_MsgRepay_adaptor_point = md_MsgRepay.Fields().ByName("adaptor_point") - fd_MsgRepay_claim_tx_id = md_MsgRepay.Fields().ByName("claim_tx_id") - fd_MsgRepay_adaptor_signature = md_MsgRepay.Fields().ByName("adaptor_signature") } var _ protoreflect.Message = (*fastReflection_MsgRepay)(nil) @@ -1021,18 +1017,6 @@ func (x *fastReflection_MsgRepay) Range(f func(protoreflect.FieldDescriptor, pro return } } - if x.ClaimTxId != "" { - value := protoreflect.ValueOfString(x.ClaimTxId) - if !f(fd_MsgRepay_claim_tx_id, value) { - return - } - } - if x.AdaptorSignature != "" { - value := protoreflect.ValueOfString(x.AdaptorSignature) - if !f(fd_MsgRepay_adaptor_signature, value) { - return - } - } } // Has reports whether a field is populated. @@ -1054,10 +1038,6 @@ func (x *fastReflection_MsgRepay) Has(fd protoreflect.FieldDescriptor) bool { return x.LoanId != "" case "side.lending.MsgRepay.adaptor_point": return x.AdaptorPoint != "" - case "side.lending.MsgRepay.claim_tx_id": - return x.ClaimTxId != "" - case "side.lending.MsgRepay.adaptor_signature": - return x.AdaptorSignature != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgRepay")) @@ -1080,10 +1060,6 @@ func (x *fastReflection_MsgRepay) Clear(fd protoreflect.FieldDescriptor) { x.LoanId = "" case "side.lending.MsgRepay.adaptor_point": x.AdaptorPoint = "" - case "side.lending.MsgRepay.claim_tx_id": - x.ClaimTxId = "" - case "side.lending.MsgRepay.adaptor_signature": - x.AdaptorSignature = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgRepay")) @@ -1109,12 +1085,6 @@ func (x *fastReflection_MsgRepay) Get(descriptor protoreflect.FieldDescriptor) p case "side.lending.MsgRepay.adaptor_point": value := x.AdaptorPoint return protoreflect.ValueOfString(value) - case "side.lending.MsgRepay.claim_tx_id": - value := x.ClaimTxId - return protoreflect.ValueOfString(value) - case "side.lending.MsgRepay.adaptor_signature": - value := x.AdaptorSignature - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgRepay")) @@ -1141,10 +1111,6 @@ func (x *fastReflection_MsgRepay) Set(fd protoreflect.FieldDescriptor, value pro x.LoanId = value.Interface().(string) case "side.lending.MsgRepay.adaptor_point": x.AdaptorPoint = value.Interface().(string) - case "side.lending.MsgRepay.claim_tx_id": - x.ClaimTxId = value.Interface().(string) - case "side.lending.MsgRepay.adaptor_signature": - x.AdaptorSignature = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgRepay")) @@ -1171,10 +1137,6 @@ func (x *fastReflection_MsgRepay) Mutable(fd protoreflect.FieldDescriptor) proto panic(fmt.Errorf("field loan_id of message side.lending.MsgRepay is not mutable")) case "side.lending.MsgRepay.adaptor_point": panic(fmt.Errorf("field adaptor_point of message side.lending.MsgRepay is not mutable")) - case "side.lending.MsgRepay.claim_tx_id": - panic(fmt.Errorf("field claim_tx_id of message side.lending.MsgRepay is not mutable")) - case "side.lending.MsgRepay.adaptor_signature": - panic(fmt.Errorf("field adaptor_signature of message side.lending.MsgRepay is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgRepay")) @@ -1194,10 +1156,6 @@ func (x *fastReflection_MsgRepay) NewField(fd protoreflect.FieldDescriptor) prot return protoreflect.ValueOfString("") case "side.lending.MsgRepay.adaptor_point": return protoreflect.ValueOfString("") - case "side.lending.MsgRepay.claim_tx_id": - return protoreflect.ValueOfString("") - case "side.lending.MsgRepay.adaptor_signature": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: side.lending.MsgRepay")) @@ -1279,14 +1237,6 @@ func (x *fastReflection_MsgRepay) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.ClaimTxId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AdaptorSignature) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1316,20 +1266,6 @@ func (x *fastReflection_MsgRepay) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.AdaptorSignature) > 0 { - i -= len(x.AdaptorSignature) - copy(dAtA[i:], x.AdaptorSignature) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AdaptorSignature))) - i-- - dAtA[i] = 0x2a - } - if len(x.ClaimTxId) > 0 { - i -= len(x.ClaimTxId) - copy(dAtA[i:], x.ClaimTxId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ClaimTxId))) - i-- - dAtA[i] = 0x22 - } if len(x.AdaptorPoint) > 0 { i -= len(x.AdaptorPoint) copy(dAtA[i:], x.AdaptorPoint) @@ -1496,70 +1432,6 @@ func (x *fastReflection_MsgRepay) ProtoMethods() *protoiface.Methods { } x.AdaptorPoint = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClaimTxId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ClaimTxId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AdaptorSignature", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AdaptorSignature = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -8137,11 +8009,9 @@ type MsgRepay struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"` - LoanId string `protobuf:"bytes,2,opt,name=loan_id,json=loanId,proto3" json:"loan_id,omitempty"` - AdaptorPoint string `protobuf:"bytes,3,opt,name=adaptor_point,json=adaptorPoint,proto3" json:"adaptor_point,omitempty"` - ClaimTxId string `protobuf:"bytes,4,opt,name=claim_tx_id,json=claimTxId,proto3" json:"claim_tx_id,omitempty"` - AdaptorSignature string `protobuf:"bytes,5,opt,name=adaptor_signature,json=adaptorSignature,proto3" json:"adaptor_signature,omitempty"` + Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"` + LoanId string `protobuf:"bytes,2,opt,name=loan_id,json=loanId,proto3" json:"loan_id,omitempty"` + AdaptorPoint string `protobuf:"bytes,3,opt,name=adaptor_point,json=adaptorPoint,proto3" json:"adaptor_point,omitempty"` } func (x *MsgRepay) Reset() { @@ -8185,20 +8055,6 @@ func (x *MsgRepay) GetAdaptorPoint() string { return "" } -func (x *MsgRepay) GetClaimTxId() string { - if x != nil { - return x.ClaimTxId - } - return "" -} - -func (x *MsgRepay) GetAdaptorSignature() string { - if x != nil { - return x.AdaptorSignature - } - return "" -} - type MsgRepayResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -8789,146 +8645,141 @@ var file_side_lending_tx_proto_rawDesc = []byte{ 0x0c, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x73, 0x73, 0x65, 0x74, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, - 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x17, 0x0a, - 0x07, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6c, 0x6f, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, - 0x72, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, - 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0b, 0x63, - 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x78, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x61, - 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x53, - 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0d, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x62, - 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x12, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x70, 0x0a, 0x09, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x72, 0x72, - 0x6f, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6f, 0x72, 0x72, - 0x6f, 0x77, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, - 0x0b, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x61, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x0d, - 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x13, 0x0a, - 0x11, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, - 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, - 0x69, 0x6e, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, - 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x4c, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x41, 0x64, - 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x06, 0x73, - 0x68, 0x61, 0x72, 0x65, 0x73, 0x22, 0x6c, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6c, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x73, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, + 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, + 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, + 0x6f, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x61, 0x70, 0x74, 0x6f, 0x72, + 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x64, + 0x61, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x3a, 0x0d, 0x82, 0xe7, 0xb0, 0x2a, + 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x22, 0x12, 0x0a, 0x10, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x70, 0x0a, + 0x09, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, + 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6f, + 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x61, 0x6e, 0x49, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x6f, 0x61, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x3a, 0x0d, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x22, + 0x13, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x0b, 0x82, 0xe7, + 0xb0, 0x2a, 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x4c, 0x0a, 0x17, 0x4d, 0x73, 0x67, + 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, + 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x22, 0x6c, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, + 0x06, 0x6c, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, + 0x52, 0x06, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x6c, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x4f, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x06, - 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x3a, 0x0b, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x6c, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x22, 0x4f, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x31, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf9, 0x02, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, - 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x27, 0x0a, - 0x0f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, - 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x73, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x6c, 0x6f, 0x61, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x66, 0x69, - 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, - 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x6f, - 0x6c, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0d, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0c, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x41, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x65, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x65, - 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x74, 0x78, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, - 0x78, 0x3a, 0x0d, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, - 0x22, 0x37, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0a, 0x4d, 0x73, - 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x74, 0x78, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x54, 0x78, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, - 0x6f, 0x66, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x69, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, - 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, - 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, - 0x6f, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x22, 0x12, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xdf, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4e, 0x0a, - 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x1b, 0x2e, 0x73, 0x69, - 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x1a, 0x23, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, - 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, - 0x0c, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x2e, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xf9, 0x02, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x41, 0x70, + 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x12, + 0x27, 0x0a, 0x0f, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, + 0x65, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x10, 0x6c, 0x6f, 0x61, 0x6e, + 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x6c, 0x6f, 0x61, 0x6e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x74, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, + 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x17, 0x0a, 0x07, + 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0d, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x5f, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0c, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x41, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x63, 0x65, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, + 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x54, 0x78, 0x3a, 0x0d, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x62, 0x6f, 0x72, 0x72, 0x6f, 0x77, + 0x65, 0x72, 0x22, 0x37, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x76, + 0x61, 0x75, 0x6c, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0a, + 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, + 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x54, 0x78, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x70, 0x6f, 0x6f, 0x66, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x69, 0x0a, 0x08, 0x4d, 0x73, 0x67, 0x43, + 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x17, + 0x0a, 0x07, 0x6c, 0x6f, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6c, 0x6f, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x72, 0x65, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x22, 0x12, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xdf, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x4e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x1b, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, - 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x1a, 0x25, 0x2e, 0x73, - 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, - 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x20, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x1a, 0x28, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, - 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x2e, 0x73, 0x69, - 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, - 0x70, 0x6c, 0x79, 0x1a, 0x1e, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x12, 0x18, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x1a, 0x23, 0x2e, 0x73, 0x69, 0x64, + 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x54, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, + 0x1d, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, + 0x73, 0x67, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x1a, 0x25, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, - 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x1a, 0x20, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, - 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, - 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x52, 0x65, - 0x64, 0x65, 0x65, 0x6d, 0x12, 0x17, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x1a, 0x1f, 0x2e, + 0x67, 0x41, 0x64, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x20, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, + 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x1a, 0x28, 0x2e, 0x73, 0x69, 0x64, + 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, - 0x0a, 0x05, 0x52, 0x65, 0x70, 0x61, 0x79, 0x12, 0x16, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, 0x1a, - 0x1e, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3f, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, - 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, - 0x1a, 0x1e, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x8b, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, - 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x07, 0x54, 0x78, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, - 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x2f, 0x6c, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xa2, 0x02, 0x03, 0x53, 0x4c, 0x58, 0xaa, 0x02, 0x0c, 0x53, - 0x69, 0x64, 0x65, 0x2e, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x0c, 0x53, 0x69, - 0x64, 0x65, 0x5c, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x18, 0x53, 0x69, 0x64, - 0x65, 0x5c, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x4c, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x41, 0x70, 0x70, 0x6c, 0x79, 0x1a, 0x1e, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x07, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x12, 0x18, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, + 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x1a, 0x20, 0x2e, 0x73, 0x69, 0x64, + 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x70, 0x70, + 0x72, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x06, + 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x12, 0x17, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x1a, + 0x1f, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3f, 0x0a, 0x05, 0x52, 0x65, 0x70, 0x61, 0x79, 0x12, 0x16, 0x2e, 0x73, 0x69, 0x64, 0x65, + 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, + 0x79, 0x1a, 0x1e, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x70, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x69, 0x64, + 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, + 0x73, 0x65, 0x1a, 0x1e, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x8b, 0x01, 0x0a, 0x10, 0x63, 0x6f, + 0x6d, 0x2e, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x07, + 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x69, 0x64, 0x65, + 0x2f, 0x6c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xa2, 0x02, 0x03, 0x53, 0x4c, 0x58, 0xaa, 0x02, + 0x0c, 0x53, 0x69, 0x64, 0x65, 0x2e, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x0c, + 0x53, 0x69, 0x64, 0x65, 0x5c, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x18, 0x53, + 0x69, 0x64, 0x65, 0x5c, 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x53, 0x69, 0x64, 0x65, 0x3a, 0x3a, + 0x4c, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/side/dlc/tx.proto b/proto/side/dlc/tx.proto index b3b0ed3..2f828a7 100644 --- a/proto/side/dlc/tx.proto +++ b/proto/side/dlc/tx.proto @@ -52,7 +52,8 @@ message MsgSubmitNonce { string sender = 1; string nonce = 2; - string signature = 3; + string oracle_pubkey = 3; + string signature = 4; } message MsgSubmitNonceResponse {} diff --git a/x/dlc/keeper/event.go b/x/dlc/keeper/event.go index 9abea28..3f3210c 100644 --- a/x/dlc/keeper/event.go +++ b/x/dlc/keeper/event.go @@ -1,6 +1,7 @@ package keeper import ( + sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -29,6 +30,25 @@ func (k Keeper) IncrementEventId(ctx sdk.Context) uint64 { return id } +// GetCurrentEventPrice gets the current event price +func (k Keeper) GetCurrentEventPrice(ctx sdk.Context, pair string) int64 { + store := ctx.KVStore(k.storeKey) + + bz := store.Get(types.CurrentEventPriceKey(pair)) + if bz == nil { + return 0 + } + + return int64(sdk.BigEndianToUint64(bz)) +} + +// SetCurrentEventPrice sets the current event price for the given pair +func (k Keeper) SetCurrentEventPrice(ctx sdk.Context, pair string, price sdkmath.Int) { + store := ctx.KVStore(k.storeKey) + + store.Set(types.CurrentEventPriceKey(pair), sdk.Uint64ToBigEndian(price.Uint64())) +} + // HasEvent returns true if the given event exists, false otherwise func (k Keeper) HasEvent(ctx sdk.Context, id uint64) bool { store := ctx.KVStore(k.storeKey) @@ -47,12 +67,36 @@ func (k Keeper) GetEvent(ctx sdk.Context, id uint64) *types.DLCPriceEvent { return &event } +// GetEventByPrice gets the event by the given price +func (k Keeper) GetEventByPrice(ctx sdk.Context, price sdkmath.Int) *types.DLCPriceEvent { + store := ctx.KVStore(k.storeKey) + + bz := store.Get(types.EventByPriceKey(price)) + if bz == nil { + return nil + } + + return k.GetEvent(ctx, sdk.BigEndianToUint64(bz)) +} + // SetEvent sets the given event func (k Keeper) SetEvent(ctx sdk.Context, event *types.DLCPriceEvent) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(event) store.Set(types.EventKey(event.Id), bz) + + store.Set(types.EventByPriceKey(event.TriggerPrice), sdk.Uint64ToBigEndian(event.Id)) +} + +// TriggerEvent sets the given event to triggered +func (k Keeper) TriggerEvent(ctx sdk.Context, event *types.DLCPriceEvent) { + store := ctx.KVStore(k.storeKey) + + event.HasTriggered = true + + bz := k.cdc.MustMarshal(event) + store.Set(types.EventKey(event.Id), bz) } // GetAllEvents gets all events diff --git a/x/dlc/keeper/msg_server.go b/x/dlc/keeper/msg_server.go index 4a2a9d7..654b3ad 100644 --- a/x/dlc/keeper/msg_server.go +++ b/x/dlc/keeper/msg_server.go @@ -22,7 +22,7 @@ func (m msgServer) SubmitNonce(goCtx context.Context, msg *types.MsgSubmitNonce) ctx := sdk.UnwrapSDKContext(goCtx) - if err := m.Keeper.HandleNonce(ctx, msg.Sender, msg.Nonce, "", msg.Signature); err != nil { + if err := m.Keeper.HandleNonce(ctx, msg.Sender, msg.Nonce, msg.OraclePubkey, msg.Signature); err != nil { return nil, err } diff --git a/x/dlc/keeper/nonce.go b/x/dlc/keeper/nonce.go index bf9722c..8837f03 100644 --- a/x/dlc/keeper/nonce.go +++ b/x/dlc/keeper/nonce.go @@ -2,8 +2,10 @@ package keeper import ( "encoding/hex" + "fmt" errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -33,7 +35,24 @@ func (k Keeper) HandleNonce(ctx sdk.Context, sender string, nonce string, oracle Time: ctx.BlockTime(), } + pair := "BTC-USD" + currentEventPrice := k.GetCurrentEventPrice(ctx, pair) + priceInterval := k.GetPriceInterval(ctx, pair) + + dlcEvent := &types.DLCPriceEvent{ + Id: k.IncrementEventId(ctx), + TriggerPrice: sdkmath.NewInt(currentEventPrice + int64(priceInterval)), + Nonce: nonce, + Pubkey: oraclePubKey, + HasTriggered: false, + PublishAt: ctx.BlockTime(), + } + dlcEvent.PriceDecimal = dlcEvent.TriggerPrice + dlcEvent.Description = fmt.Sprintf("Liquidation event at price %s", dlcEvent.PriceDecimal) + k.SetNonce(ctx, dlcNonce, oracle.Id) + k.SetEvent(ctx, dlcEvent) + k.SetCurrentEventPrice(ctx, pair, dlcEvent.TriggerPrice) return nil } diff --git a/x/dlc/keeper/params.go b/x/dlc/keeper/params.go new file mode 100644 index 0000000..b133024 --- /dev/null +++ b/x/dlc/keeper/params.go @@ -0,0 +1,18 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// GetPriceInterval gets the price interval for the given pair +func (k Keeper) GetPriceInterval(ctx sdk.Context, pair string) int32 { + priceIntervals := k.GetParams(ctx).PriceIntervals + + for _, pi := range priceIntervals { + if pi.PricePair == pair { + return pi.Interval + } + } + + return 0 +} diff --git a/x/dlc/module/abci.go b/x/dlc/module/abci.go index 966e2b1..a502446 100644 --- a/x/dlc/module/abci.go +++ b/x/dlc/module/abci.go @@ -10,6 +10,13 @@ import ( func EndBlocker(ctx sdk.Context, k keeper.Keeper) { handlePendingOracles(ctx, k) handlePendingAgencies(ctx, k) + + handleEvents(ctx, k) +} + +// handleEvents handles the events +func handleEvents(ctx sdk.Context, k keeper.Keeper) { + } // handlePendingOracles handles the pending oracles diff --git a/x/dlc/types/keys.go b/x/dlc/types/keys.go index 17f67b1..a0fbcfa 100644 --- a/x/dlc/types/keys.go +++ b/x/dlc/types/keys.go @@ -1,6 +1,7 @@ package types import ( + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -25,13 +26,17 @@ var ( EventIdKey = []byte{0x04} // key for event id AttestationIdKey = []byte{0x05} // key for attestation id - OracleKeyPrefix = []byte{0x10} // prefix for each key to an oracle - OracleByPubKeyKeyPrefix = []byte{0x11} // prefix for each key to an oracle by public key - AgencyKeyPrefix = []byte{0x12} // prefix for each key to an agency - NonceIndexKeyPrefix = []byte{0x13} // key prefix for the nonce index - NonceKeyPrefix = []byte{0x14} // prefix for each key to a nonce - EventKeyPrefix = []byte{0x15} // prefix for each key to an event - AttestationKeyPrefix = []byte{0x16} // prefix for each key to an attestation + OracleKeyPrefix = []byte{0x10} // prefix for each key to an oracle + OracleByPubKeyKeyPrefix = []byte{0x11} // prefix for each key to an oracle by public key + PendingOraclePubKeyKeyPrefix = []byte{0x12} // key prefix for the pending oracle public key + AgencyKeyPrefix = []byte{0x13} // prefix for each key to an agency + PendingAgencyPubKeyKeyPrefix = []byte{0x14} // key prefix for the pending agency public key + NonceIndexKeyPrefix = []byte{0x15} // key prefix for the nonce index + NonceKeyPrefix = []byte{0x16} // prefix for each key to a nonce + EventKeyPrefix = []byte{0x17} // prefix for each key to an event + EventByPriceKeyPrefix = []byte{0x18} // prefix for each key to an event by triggering price + CurrentEventPriceKeyPrefix = []byte{0x19} // key prefix for the current event price + AttestationKeyPrefix = []byte{0x20} // prefix for each key to an attestation PriceKeyPrefix = []byte{0x20} // key prefix for the price ) @@ -44,10 +49,24 @@ func OracleByPubKeyKey(pubKey []byte) []byte { return append(OracleByPubKeyKeyPrefix, pubKey...) } +func PendingOraclePubKeyKey(id uint64, sender string, pubKey []byte) []byte { + key := append(PendingOraclePubKeyKeyPrefix, sdk.Uint64ToBigEndian(id)...) + key = append(key, []byte(sender)...) + + return append(key, pubKey...) +} + func AgencyKey(id uint64) []byte { return append(AgencyKeyPrefix, sdk.Uint64ToBigEndian(id)...) } +func PendingAgencyPubKeyKey(id uint64, sender string, pubKey []byte) []byte { + key := append(PendingAgencyPubKeyKeyPrefix, sdk.Uint64ToBigEndian(id)...) + key = append(key, []byte(sender)...) + + return append(key, pubKey...) +} + func NonceIndexKey(oracleId uint64) []byte { return append(NonceIndexKeyPrefix, sdk.Uint64ToBigEndian(oracleId)...) } @@ -60,6 +79,14 @@ func EventKey(id uint64) []byte { return append(EventKeyPrefix, sdk.Uint64ToBigEndian(id)...) } +func EventByPriceKey(price sdkmath.Int) []byte { + return append(EventByPriceKeyPrefix, price.BigInt().Bytes()...) +} + +func CurrentEventPriceKey(pair string) []byte { + return append(CurrentEventPriceKeyPrefix, []byte(pair)...) +} + func AttestationKey(id uint64) []byte { return append(AttestationKeyPrefix, sdk.Uint64ToBigEndian(id)...) } diff --git a/x/dlc/types/msg_submit_nonce.go b/x/dlc/types/msg_submit_nonce.go index d18ab75..232b4fb 100644 --- a/x/dlc/types/msg_submit_nonce.go +++ b/x/dlc/types/msg_submit_nonce.go @@ -3,6 +3,7 @@ package types import ( "encoding/hex" + "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcec/v2/schnorr" errorsmod "cosmossdk.io/errors" @@ -38,6 +39,15 @@ func (m *MsgSubmitNonce) ValidateBasic() error { return ErrInvalidNonce } + oraclePk, err := hex.DecodeString(m.OraclePubkey) + if err != nil { + return ErrInvalidPubKey + } + + if _, err := btcec.ParsePubKey(oraclePk); err != nil { + return ErrInvalidPubKey + } + sigBytes, err := hex.DecodeString(m.Signature) if err != nil { return ErrInvalidSignature diff --git a/x/dlc/types/tx.pb.go b/x/dlc/types/tx.pb.go index 64ac131..4a70700 100644 --- a/x/dlc/types/tx.pb.go +++ b/x/dlc/types/tx.pb.go @@ -238,9 +238,10 @@ func (m *MsgSubmitOraclePubKeyResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSubmitOraclePubKeyResponse proto.InternalMessageInfo type MsgSubmitNonce struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - Nonce string `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Nonce string `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + OraclePubkey string `protobuf:"bytes,3,opt,name=oracle_pubkey,json=oraclePubkey,proto3" json:"oracle_pubkey,omitempty"` + Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` } func (m *MsgSubmitNonce) Reset() { *m = MsgSubmitNonce{} } @@ -290,6 +291,13 @@ func (m *MsgSubmitNonce) GetNonce() string { return "" } +func (m *MsgSubmitNonce) GetOraclePubkey() string { + if m != nil { + return m.OraclePubkey + } + return "" +} + func (m *MsgSubmitNonce) GetSignature() string { if m != nil { return m.Signature @@ -741,47 +749,48 @@ func init() { func init() { proto.RegisterFile("side/dlc/tx.proto", fileDescriptor_a140082caa5fa150) } var fileDescriptor_a140082caa5fa150 = []byte{ - // 629 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x95, 0xcb, 0x6e, 0xd3, 0x40, - 0x14, 0x86, 0xe3, 0x24, 0xbd, 0xe4, 0xb4, 0x14, 0x6a, 0xf5, 0xe2, 0x98, 0xe2, 0x84, 0x2c, 0x20, - 0xea, 0xc2, 0x16, 0x65, 0xd7, 0x1d, 0x61, 0x15, 0x41, 0xa0, 0x32, 0x62, 0x03, 0x12, 0x95, 0x63, - 0x8f, 0x1c, 0x8b, 0xc4, 0x63, 0x79, 0xc6, 0x55, 0xb3, 0xe3, 0xf2, 0x02, 0x7d, 0x94, 0x3e, 0x46, - 0x97, 0x5d, 0xb2, 0xaa, 0x50, 0xb2, 0xe8, 0x6b, 0x20, 0xcf, 0x38, 0xbe, 0x34, 0x93, 0x46, 0x48, - 0x48, 0xac, 0x92, 0x39, 0xff, 0x99, 0x7f, 0x3e, 0x8d, 0xff, 0x99, 0x81, 0x6d, 0xe2, 0x39, 0xc8, - 0x70, 0x86, 0xb6, 0x41, 0xcf, 0xf5, 0x20, 0xc4, 0x14, 0xcb, 0xeb, 0x71, 0x49, 0x77, 0x86, 0xb6, - 0xba, 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ca, 0x9f, 0x61, 0x7b, - 0x3e, 0xaf, 0x9a, 0x60, 0x5a, 0x4e, 0x57, 0x9f, 0xdd, 0xaf, 0xa7, 0xe6, 0x5f, 0x40, 0x16, 0x5c, - 0x22, 0x0d, 0xc1, 0xec, 0x7c, 0x83, 0xfa, 0x7c, 0x49, 0xc3, 0xbc, 0x7f, 0xe1, 0x2e, 0x15, 0xf9, - 0xe7, 0x1b, 0x84, 0xfe, 0xa2, 0x8b, 0x50, 0x7e, 0x0b, 0x9b, 0x85, 0x53, 0x53, 0x2f, 0x4c, 0xcc, - 0x4b, 0xea, 0xd3, 0x85, 0xd2, 0xbc, 0x5b, 0x12, 0x72, 0x91, 0x1b, 0x97, 0x84, 0x6e, 0xc5, 0x5c, - 0xc6, 0x6e, 0x85, 0x50, 0x16, 0xdd, 0xf2, 0xd2, 0x1d, 0x37, 0x51, 0xb2, 0xd4, 0x95, 0x6f, 0xb7, - 0x97, 0x87, 0x52, 0xa7, 0x73, 0x35, 0xd1, 0xa4, 0xeb, 0x89, 0x26, 0xfd, 0x9e, 0x68, 0xd2, 0xc5, - 0x54, 0x2b, 0x5d, 0x4f, 0xb5, 0xd2, 0xaf, 0xa9, 0x56, 0xfa, 0xd4, 0x76, 0x3d, 0x3a, 0x88, 0xfa, - 0xba, 0x8d, 0x47, 0x46, 0xec, 0xc6, 0x1e, 0x34, 0x1b, 0x0f, 0xd9, 0xc0, 0x38, 0xe7, 0xef, 0xe6, - 0x38, 0x40, 0xa4, 0xbf, 0xca, 0xa4, 0x97, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xea, 0x21, 0xcc, - 0x3a, 0x50, 0x07, 0x00, 0x00, + // 645 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x95, 0x49, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0xe3, 0x24, 0x5d, 0xf2, 0xba, 0x40, 0xad, 0x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ea, 0xdc, 0xd7, 0xdb, + 0xcb, 0x7d, 0xe9, 0xe8, 0xe8, 0x6a, 0xa8, 0x49, 0xd7, 0x43, 0x4d, 0xfa, 0x3d, 0xd4, 0xa4, 0x8b, + 0x91, 0x56, 0xb9, 0x1e, 0x69, 0x95, 0x5f, 0x23, 0xad, 0xf2, 0x69, 0xcf, 0xf3, 0x69, 0x37, 0xb6, + 0x75, 0x07, 0xf7, 0x8d, 0xc4, 0x8d, 0x3d, 0x7b, 0x0e, 0xee, 0xb1, 0x85, 0x71, 0xce, 0x5f, 0xd7, + 0x41, 0x88, 0x88, 0x3d, 0xcf, 0xa4, 0x97, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x33, 0x15, 0xe7, + 0x92, 0x76, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1258,6 +1267,13 @@ func (m *MsgSubmitNonce) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Signature) i = encodeVarintTx(dAtA, i, uint64(len(m.Signature))) i-- + dAtA[i] = 0x22 + } + if len(m.OraclePubkey) > 0 { + i -= len(m.OraclePubkey) + copy(dAtA[i:], m.OraclePubkey) + i = encodeVarintTx(dAtA, i, uint64(len(m.OraclePubkey))) + i-- dAtA[i] = 0x1a } if len(m.Nonce) > 0 { @@ -1653,6 +1669,10 @@ func (m *MsgSubmitNonce) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.OraclePubkey) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } l = len(m.Signature) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2314,6 +2334,38 @@ func (m *MsgSubmitNonce) Unmarshal(dAtA []byte) error { m.Nonce = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OraclePubkey", 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.OraclePubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } diff --git a/x/lending/types/tx.pb.go b/x/lending/types/tx.pb.go index 23af66d..d2fe8e2 100644 --- a/x/lending/types/tx.pb.go +++ b/x/lending/types/tx.pb.go @@ -127,11 +127,9 @@ func (m *MsgCreatePoolResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreatePoolResponse proto.InternalMessageInfo type MsgRepay struct { - Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"` - LoanId string `protobuf:"bytes,2,opt,name=loan_id,json=loanId,proto3" json:"loan_id,omitempty"` - AdaptorPoint string `protobuf:"bytes,3,opt,name=adaptor_point,json=adaptorPoint,proto3" json:"adaptor_point,omitempty"` - ClaimTxId string `protobuf:"bytes,4,opt,name=claim_tx_id,json=claimTxId,proto3" json:"claim_tx_id,omitempty"` - AdaptorSignature string `protobuf:"bytes,5,opt,name=adaptor_signature,json=adaptorSignature,proto3" json:"adaptor_signature,omitempty"` + Borrower string `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower,omitempty"` + LoanId string `protobuf:"bytes,2,opt,name=loan_id,json=loanId,proto3" json:"loan_id,omitempty"` + AdaptorPoint string `protobuf:"bytes,3,opt,name=adaptor_point,json=adaptorPoint,proto3" json:"adaptor_point,omitempty"` } func (m *MsgRepay) Reset() { *m = MsgRepay{} } @@ -188,20 +186,6 @@ func (m *MsgRepay) GetAdaptorPoint() string { return "" } -func (m *MsgRepay) GetClaimTxId() string { - if m != nil { - return m.ClaimTxId - } - return "" -} - -func (m *MsgRepay) GetAdaptorSignature() string { - if m != nil { - return m.AdaptorSignature - } - return "" -} - type MsgRepayResponse struct { } @@ -916,67 +900,65 @@ func init() { func init() { proto.RegisterFile("side/lending/tx.proto", fileDescriptor_13b5a91577424108) } var fileDescriptor_13b5a91577424108 = []byte{ - // 951 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x36, 0xfd, 0x23, 0x5b, 0x23, 0x29, 0x76, 0xd8, 0xc4, 0x52, 0xd8, 0x46, 0x31, 0x68, 0x14, - 0x35, 0xd2, 0x82, 0x84, 0xd3, 0x43, 0x01, 0x1f, 0x5a, 0x28, 0x46, 0x8b, 0x1a, 0x88, 0x5b, 0x43, - 0xd1, 0xa9, 0x40, 0x41, 0xac, 0xc4, 0x0d, 0xb5, 0x28, 0xc9, 0x65, 0xb9, 0x2b, 0x55, 0xba, 0x15, - 0x41, 0x1f, 0xa0, 0x8f, 0x92, 0x47, 0xe8, 0xb1, 0xc7, 0x1c, 0x7b, 0x6b, 0x61, 0x1f, 0xf2, 0x0c, - 0xbd, 0x15, 0xfb, 0xc3, 0x15, 0xf5, 0x63, 0xc5, 0xe8, 0x49, 0x9c, 0x6f, 0x66, 0x67, 0xbf, 0xd9, - 0xfd, 0x66, 0x56, 0xf0, 0x90, 0x91, 0x10, 0xfb, 0x31, 0x4e, 0x43, 0x92, 0x46, 0x3e, 0x9f, 0x78, - 0x59, 0x4e, 0x39, 0xb5, 0xeb, 0x02, 0xf6, 0x34, 0xec, 0x3c, 0x88, 0x68, 0x44, 0xa5, 0xc3, 0x17, - 0x5f, 0x2a, 0xc6, 0x69, 0x0e, 0x28, 0x4b, 0x28, 0xf3, 0x13, 0x16, 0xf9, 0xe3, 0x53, 0xf1, 0xa3, - 0x1d, 0x6d, 0x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0x9b, 0xa7, 0xd6, - 0xf3, 0x6f, 0xfe, 0xbc, 0x6e, 0x5b, 0x6f, 0xaf, 0xdb, 0xd6, 0x3f, 0xd7, 0x6d, 0xeb, 0xf7, 0x9b, - 0xf6, 0xc6, 0xdb, 0x9b, 0xf6, 0xc6, 0x5f, 0x37, 0xed, 0x8d, 0x1f, 0x3e, 0x8b, 0x08, 0x1f, 0x8e, - 0xfa, 0xde, 0x80, 0x26, 0xbe, 0x48, 0x25, 0xff, 0xe2, 0x0c, 0x68, 0x2c, 0x0d, 0x7f, 0x32, 0xfb, - 0x6b, 0x35, 0xcd, 0x30, 0xeb, 0x57, 0xa4, 0xfb, 0xf3, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x6f, - 0x73, 0x83, 0x10, 0x77, 0x09, 0x00, 0x00, + // 915 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4d, 0x6f, 0xdb, 0x36, + 0x18, 0x8e, 0xf2, 0xe1, 0xc4, 0x6f, 0xec, 0xa6, 0xd3, 0xda, 0xd8, 0xd5, 0x56, 0x37, 0x50, 0x30, + 0x2c, 0x28, 0x06, 0x09, 0xe9, 0x0e, 0x03, 0x72, 0xd8, 0xe0, 0x06, 0x1b, 0x56, 0xa0, 0xd9, 0x02, + 0x2f, 0xa7, 0x01, 0x83, 0x40, 0x5b, 0xac, 0x4c, 0x4c, 0x12, 0x35, 0x91, 0xf2, 0xec, 0xdb, 0x50, + 0xec, 0x07, 0xec, 0xa7, 0xf4, 0x67, 0xec, 0xd8, 0xe3, 0x6e, 0x1b, 0x92, 0x43, 0x7f, 0xc3, 0x6e, + 0x03, 0x3f, 0x44, 0x4b, 0xb6, 0xe3, 0x06, 0x3b, 0x59, 0xef, 0xf3, 0xbc, 0x7c, 0xf9, 0x90, 0x7c, + 0xf8, 0xd2, 0xf0, 0x90, 0x91, 0x10, 0xfb, 0x31,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8, 0x59, 0xcb, 0xd9, 0xf9, 0xed, 0xdd, 0x9b, 0xa7, 0xd6, 0xf3, 0x6f, 0xfe, 0xbc, + 0xee, 0x59, 0x6f, 0xaf, 0x7b, 0xd6, 0x3f, 0xd7, 0x3d, 0xeb, 0x8f, 0x9b, 0xde, 0xc6, 0xdb, 0x9b, + 0xde, 0xc6, 0x5f, 0x37, 0xbd, 0x8d, 0x1f, 0x3f, 0x8b, 0x08, 0x1f, 0x17, 0x43, 0x6f, 0x44, 0x13, + 0x5f, 0x94, 0x92, 0x7f, 0x4a, 0x46, 0x34, 0x96, 0x81, 0x3f, 0x9d, 0xff, 0x19, 0x9a, 0x65, 0x98, + 0x0d, 0x1b, 0x92, 0xfe, 0xfc, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc2, 0x12, 0x61, 0x39, 0x29, + 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1399,20 +1381,6 @@ func (m *MsgRepay) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.AdaptorSignature) > 0 { - i -= len(m.AdaptorSignature) - copy(dAtA[i:], m.AdaptorSignature) - i = encodeVarintTx(dAtA, i, uint64(len(m.AdaptorSignature))) - i-- - dAtA[i] = 0x2a - } - if len(m.ClaimTxId) > 0 { - i -= len(m.ClaimTxId) - copy(dAtA[i:], m.ClaimTxId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ClaimTxId))) - i-- - dAtA[i] = 0x22 - } if len(m.AdaptorPoint) > 0 { i -= len(m.AdaptorPoint) copy(dAtA[i:], m.AdaptorPoint) @@ -2010,14 +1978,6 @@ func (m *MsgRepay) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.ClaimTxId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.AdaptorSignature) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } return n } @@ -2574,70 +2534,6 @@ func (m *MsgRepay) Unmarshal(dAtA []byte) error { } m.AdaptorPoint = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimTxId", 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.ClaimTxId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdaptorSignature", 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.AdaptorSignature = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:])