From a588efa14d70bc64bbb8625d6e0aefabd66688f1 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 5 Nov 2025 17:20:51 +0530 Subject: [PATCH 001/105] feat: added universal_validator new structure in proto --- proto/uvalidator/v1/validator.proto | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 proto/uvalidator/v1/validator.proto diff --git a/proto/uvalidator/v1/validator.proto b/proto/uvalidator/v1/validator.proto new file mode 100644 index 00000000..a55cba6e --- /dev/null +++ b/proto/uvalidator/v1/validator.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; +package uvalidator.v1; + +import "gogoproto/gogo.proto"; +import "amino/amino.proto"; + +option go_package = "github.com/pushchain/push-chain-node/x/uvalidator/types"; + +// Universal Validator status +enum UVStatus { + option (gogoproto.goproto_enum_stringer) = true; + + UV_STATUS_UNSPECIFIED = 0; + UV_STATUS_ACTIVE = 1; // Fully active (votes + signs) + UV_STATUS_PENDING_JOIN = 2; // Waiting for onboarding keygen / vote + UV_STATUS_PENDING_LEAVE = 3; // Marked for removal (still active until TSS reshare) + UV_STATUS_INACTIVE = 4; // No longer part of the validator set +} + +// Validator network metadata +message NetworkInfo { + string ip = 1; // Node IP address +} + +// Core Universal Validator object +message UniversalValidator { + option (amino.name) = "uvalidator/universal_validator"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string core_validator_address = 1; // Core validator address + string pubkey = 2; // Validator consensus public key + UVStatus status = 3; // Current lifecycle status + NetworkInfo network = 4; // Metadata for networking + int64 joined_at_block = 5; // Block height when added to UV set +} \ No newline at end of file From e9ef9714a9efe356e36a7612bb3badedd6778ecc Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 5 Nov 2025 17:21:56 +0530 Subject: [PATCH 002/105] feat: update msg_add_universal_validator proto for new structure --- proto/uvalidator/v1/tx.proto | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/proto/uvalidator/v1/tx.proto b/proto/uvalidator/v1/tx.proto index bb15ae6a..ed4c01d3 100755 --- a/proto/uvalidator/v1/tx.proto +++ b/proto/uvalidator/v1/tx.proto @@ -7,6 +7,7 @@ import "uvalidator/v1/genesis.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "uvalidator/v1/types.proto"; +import "uvalidator/v1/validator.proto"; option go_package = "github.com/pushchain/push-chain-node/x/uvalidator/types"; @@ -56,6 +57,12 @@ message MsgAddUniversalValidator { // core_validator_address is the address of the core validator. string core_validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + + // pubkey is the consensus public key for this universal validator + string pubkey = 3; + + // network metadata for validator node (IP, etc.) + NetworkInfo network = 4; } message MsgAddUniversalValidatorResponse {} From 6ed6ddf9ce740c93f499902afbce51539a556863 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 5 Nov 2025 17:22:10 +0530 Subject: [PATCH 003/105] refactor: added generated protobuf --- api/uvalidator/v1/tx.pulsar.go | 346 ++++-- api/uvalidator/v1/validator.pulsar.go | 1401 +++++++++++++++++++++++++ 2 files changed, 1659 insertions(+), 88 deletions(-) create mode 100644 api/uvalidator/v1/validator.pulsar.go diff --git a/api/uvalidator/v1/tx.pulsar.go b/api/uvalidator/v1/tx.pulsar.go index 2b65ba4a..900f0aa1 100644 --- a/api/uvalidator/v1/tx.pulsar.go +++ b/api/uvalidator/v1/tx.pulsar.go @@ -875,6 +875,8 @@ var ( md_MsgAddUniversalValidator protoreflect.MessageDescriptor fd_MsgAddUniversalValidator_signer protoreflect.FieldDescriptor fd_MsgAddUniversalValidator_core_validator_address protoreflect.FieldDescriptor + fd_MsgAddUniversalValidator_pubkey protoreflect.FieldDescriptor + fd_MsgAddUniversalValidator_network protoreflect.FieldDescriptor ) func init() { @@ -882,6 +884,8 @@ func init() { md_MsgAddUniversalValidator = File_uvalidator_v1_tx_proto.Messages().ByName("MsgAddUniversalValidator") fd_MsgAddUniversalValidator_signer = md_MsgAddUniversalValidator.Fields().ByName("signer") fd_MsgAddUniversalValidator_core_validator_address = md_MsgAddUniversalValidator.Fields().ByName("core_validator_address") + fd_MsgAddUniversalValidator_pubkey = md_MsgAddUniversalValidator.Fields().ByName("pubkey") + fd_MsgAddUniversalValidator_network = md_MsgAddUniversalValidator.Fields().ByName("network") } var _ protoreflect.Message = (*fastReflection_MsgAddUniversalValidator)(nil) @@ -961,6 +965,18 @@ func (x *fastReflection_MsgAddUniversalValidator) Range(f func(protoreflect.Fiel return } } + if x.Pubkey != "" { + value := protoreflect.ValueOfString(x.Pubkey) + if !f(fd_MsgAddUniversalValidator_pubkey, value) { + return + } + } + if x.Network != nil { + value := protoreflect.ValueOfMessage(x.Network.ProtoReflect()) + if !f(fd_MsgAddUniversalValidator_network, value) { + return + } + } } // Has reports whether a field is populated. @@ -980,6 +996,10 @@ func (x *fastReflection_MsgAddUniversalValidator) Has(fd protoreflect.FieldDescr return x.Signer != "" case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": return x.CoreValidatorAddress != "" + case "uvalidator.v1.MsgAddUniversalValidator.pubkey": + return x.Pubkey != "" + case "uvalidator.v1.MsgAddUniversalValidator.network": + return x.Network != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) @@ -1000,6 +1020,10 @@ func (x *fastReflection_MsgAddUniversalValidator) Clear(fd protoreflect.FieldDes x.Signer = "" case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": x.CoreValidatorAddress = "" + case "uvalidator.v1.MsgAddUniversalValidator.pubkey": + x.Pubkey = "" + case "uvalidator.v1.MsgAddUniversalValidator.network": + x.Network = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) @@ -1022,6 +1046,12 @@ func (x *fastReflection_MsgAddUniversalValidator) Get(descriptor protoreflect.Fi case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": value := x.CoreValidatorAddress return protoreflect.ValueOfString(value) + case "uvalidator.v1.MsgAddUniversalValidator.pubkey": + value := x.Pubkey + return protoreflect.ValueOfString(value) + case "uvalidator.v1.MsgAddUniversalValidator.network": + value := x.Network + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) @@ -1046,6 +1076,10 @@ func (x *fastReflection_MsgAddUniversalValidator) Set(fd protoreflect.FieldDescr x.Signer = value.Interface().(string) case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": x.CoreValidatorAddress = value.Interface().(string) + case "uvalidator.v1.MsgAddUniversalValidator.pubkey": + x.Pubkey = value.Interface().(string) + case "uvalidator.v1.MsgAddUniversalValidator.network": + x.Network = value.Message().Interface().(*NetworkInfo) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) @@ -1066,10 +1100,17 @@ func (x *fastReflection_MsgAddUniversalValidator) Set(fd protoreflect.FieldDescr // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddUniversalValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "uvalidator.v1.MsgAddUniversalValidator.network": + if x.Network == nil { + x.Network = new(NetworkInfo) + } + return protoreflect.ValueOfMessage(x.Network.ProtoReflect()) case "uvalidator.v1.MsgAddUniversalValidator.signer": panic(fmt.Errorf("field signer of message uvalidator.v1.MsgAddUniversalValidator is not mutable")) case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.MsgAddUniversalValidator is not mutable")) + case "uvalidator.v1.MsgAddUniversalValidator.pubkey": + panic(fmt.Errorf("field pubkey of message uvalidator.v1.MsgAddUniversalValidator is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) @@ -1087,6 +1128,11 @@ func (x *fastReflection_MsgAddUniversalValidator) NewField(fd protoreflect.Field return protoreflect.ValueOfString("") case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": return protoreflect.ValueOfString("") + case "uvalidator.v1.MsgAddUniversalValidator.pubkey": + return protoreflect.ValueOfString("") + case "uvalidator.v1.MsgAddUniversalValidator.network": + m := new(NetworkInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) @@ -1164,6 +1210,14 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.Pubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Network != nil { + l = options.Size(x.Network) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1193,6 +1247,27 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Network != nil { + encoded, err := options.Marshal(x.Network) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.Pubkey) > 0 { + i -= len(x.Pubkey) + copy(dAtA[i:], x.Pubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pubkey))) + i-- + dAtA[i] = 0x1a + } if len(x.CoreValidatorAddress) > 0 { i -= len(x.CoreValidatorAddress) copy(dAtA[i:], x.CoreValidatorAddress) @@ -1320,6 +1395,74 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met } x.CoreValidatorAddress = 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 Pubkey", 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.Pubkey = 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 Network", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Network == nil { + x.Network = &NetworkInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Network); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2653,6 +2796,10 @@ type MsgAddUniversalValidator struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // core_validator_address is the address of the core validator. CoreValidatorAddress string `protobuf:"bytes,2,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` + // pubkey is the consensus public key for this universal validator + Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + // network metadata for validator node (IP, etc.) + Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` } func (x *MsgAddUniversalValidator) Reset() { @@ -2689,6 +2836,20 @@ func (x *MsgAddUniversalValidator) GetCoreValidatorAddress() string { return "" } +func (x *MsgAddUniversalValidator) GetPubkey() string { + if x != nil { + return x.Pubkey + } + return "" +} + +func (x *MsgAddUniversalValidator) GetNetwork() *NetworkInfo { + if x != nil { + return x.Network + } + return nil +} + type MsgAddUniversalValidatorResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2800,84 +2961,90 @@ var file_uvalidator_v1_tx_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, - 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x01, 0x0a, - 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x33, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 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, 0x22, 0xda, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, - 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x3a, 0x33, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, - 0x2a, 0x23, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, - 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, - 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x1b, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x16, 0x63, - 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x36, 0x82, 0xe7, 0xb0, - 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x01, 0x0a, 0x0f, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x33, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 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, 0x22, 0xa8, 0x02, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x41, + 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x33, 0x82, + 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x23, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, + 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, + 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x36, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd3, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x1e, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, + 0x26, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x55, 0x6e, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x27, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2f, 0x2e, 0x75, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, + 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x18, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd3, 0x02, 0x0a, 0x03, 0x4d, - 0x73, 0x67, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x1a, 0x26, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x15, 0x41, 0x64, - 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x12, 0x27, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2f, 0x2e, 0x75, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, - 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, - 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, - 0x42, 0xb6, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, - 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6f, 0x72, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb6, 0x01, + 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, + 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2901,20 +3068,22 @@ var file_uvalidator_v1_tx_proto_goTypes = []interface{}{ (*MsgRemoveUniversalValidator)(nil), // 4: uvalidator.v1.MsgRemoveUniversalValidator (*MsgRemoveUniversalValidatorResponse)(nil), // 5: uvalidator.v1.MsgRemoveUniversalValidatorResponse (*Params)(nil), // 6: uvalidator.v1.Params + (*NetworkInfo)(nil), // 7: uvalidator.v1.NetworkInfo } var file_uvalidator_v1_tx_proto_depIdxs = []int32{ 6, // 0: uvalidator.v1.MsgUpdateParams.params:type_name -> uvalidator.v1.Params - 0, // 1: uvalidator.v1.Msg.UpdateParams:input_type -> uvalidator.v1.MsgUpdateParams - 2, // 2: uvalidator.v1.Msg.AddUniversalValidator:input_type -> uvalidator.v1.MsgAddUniversalValidator - 4, // 3: uvalidator.v1.Msg.RemoveUniversalValidator:input_type -> uvalidator.v1.MsgRemoveUniversalValidator - 1, // 4: uvalidator.v1.Msg.UpdateParams:output_type -> uvalidator.v1.MsgUpdateParamsResponse - 3, // 5: uvalidator.v1.Msg.AddUniversalValidator:output_type -> uvalidator.v1.MsgAddUniversalValidatorResponse - 5, // 6: uvalidator.v1.Msg.RemoveUniversalValidator:output_type -> uvalidator.v1.MsgRemoveUniversalValidatorResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 7, // 1: uvalidator.v1.MsgAddUniversalValidator.network:type_name -> uvalidator.v1.NetworkInfo + 0, // 2: uvalidator.v1.Msg.UpdateParams:input_type -> uvalidator.v1.MsgUpdateParams + 2, // 3: uvalidator.v1.Msg.AddUniversalValidator:input_type -> uvalidator.v1.MsgAddUniversalValidator + 4, // 4: uvalidator.v1.Msg.RemoveUniversalValidator:input_type -> uvalidator.v1.MsgRemoveUniversalValidator + 1, // 5: uvalidator.v1.Msg.UpdateParams:output_type -> uvalidator.v1.MsgUpdateParamsResponse + 3, // 6: uvalidator.v1.Msg.AddUniversalValidator:output_type -> uvalidator.v1.MsgAddUniversalValidatorResponse + 5, // 7: uvalidator.v1.Msg.RemoveUniversalValidator:output_type -> uvalidator.v1.MsgRemoveUniversalValidatorResponse + 5, // [5:8] is the sub-list for method output_type + 2, // [2:5] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_uvalidator_v1_tx_proto_init() } @@ -2924,6 +3093,7 @@ func file_uvalidator_v1_tx_proto_init() { } file_uvalidator_v1_genesis_proto_init() file_uvalidator_v1_types_proto_init() + file_uvalidator_v1_validator_proto_init() if !protoimpl.UnsafeEnabled { file_uvalidator_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { diff --git a/api/uvalidator/v1/validator.pulsar.go b/api/uvalidator/v1/validator.pulsar.go new file mode 100644 index 00000000..a79aac1f --- /dev/null +++ b/api/uvalidator/v1/validator.pulsar.go @@ -0,0 +1,1401 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package uvalidatorv1 + +import ( + _ "cosmossdk.io/api/amino" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_NetworkInfo protoreflect.MessageDescriptor + fd_NetworkInfo_ip protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_validator_proto_init() + md_NetworkInfo = File_uvalidator_v1_validator_proto.Messages().ByName("NetworkInfo") + fd_NetworkInfo_ip = md_NetworkInfo.Fields().ByName("ip") +} + +var _ protoreflect.Message = (*fastReflection_NetworkInfo)(nil) + +type fastReflection_NetworkInfo NetworkInfo + +func (x *NetworkInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_NetworkInfo)(x) +} + +func (x *NetworkInfo) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_validator_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_NetworkInfo_messageType fastReflection_NetworkInfo_messageType +var _ protoreflect.MessageType = fastReflection_NetworkInfo_messageType{} + +type fastReflection_NetworkInfo_messageType struct{} + +func (x fastReflection_NetworkInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_NetworkInfo)(nil) +} +func (x fastReflection_NetworkInfo_messageType) New() protoreflect.Message { + return new(fastReflection_NetworkInfo) +} +func (x fastReflection_NetworkInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_NetworkInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_NetworkInfo) Descriptor() protoreflect.MessageDescriptor { + return md_NetworkInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_NetworkInfo) Type() protoreflect.MessageType { + return _fastReflection_NetworkInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_NetworkInfo) New() protoreflect.Message { + return new(fastReflection_NetworkInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_NetworkInfo) Interface() protoreflect.ProtoMessage { + return (*NetworkInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_NetworkInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Ip != "" { + value := protoreflect.ValueOfString(x.Ip) + if !f(fd_NetworkInfo_ip, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_NetworkInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.ip": + return x.Ip != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_NetworkInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.ip": + x.Ip = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_NetworkInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.NetworkInfo.ip": + value := x.Ip + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_NetworkInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.ip": + x.Ip = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_NetworkInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.ip": + panic(fmt.Errorf("field ip of message uvalidator.v1.NetworkInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_NetworkInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.ip": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_NetworkInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.NetworkInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_NetworkInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_NetworkInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_NetworkInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*NetworkInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Ip) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*NetworkInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Ip) > 0 { + i -= len(x.Ip) + copy(dAtA[i:], x.Ip) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Ip))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*NetworkInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NetworkInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NetworkInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Ip", 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.Ip = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_UniversalValidator protoreflect.MessageDescriptor + fd_UniversalValidator_core_validator_address protoreflect.FieldDescriptor + fd_UniversalValidator_pubkey protoreflect.FieldDescriptor + fd_UniversalValidator_status protoreflect.FieldDescriptor + fd_UniversalValidator_network protoreflect.FieldDescriptor + fd_UniversalValidator_joined_at_block protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_validator_proto_init() + md_UniversalValidator = File_uvalidator_v1_validator_proto.Messages().ByName("UniversalValidator") + fd_UniversalValidator_core_validator_address = md_UniversalValidator.Fields().ByName("core_validator_address") + fd_UniversalValidator_pubkey = md_UniversalValidator.Fields().ByName("pubkey") + fd_UniversalValidator_status = md_UniversalValidator.Fields().ByName("status") + fd_UniversalValidator_network = md_UniversalValidator.Fields().ByName("network") + fd_UniversalValidator_joined_at_block = md_UniversalValidator.Fields().ByName("joined_at_block") +} + +var _ protoreflect.Message = (*fastReflection_UniversalValidator)(nil) + +type fastReflection_UniversalValidator UniversalValidator + +func (x *UniversalValidator) ProtoReflect() protoreflect.Message { + return (*fastReflection_UniversalValidator)(x) +} + +func (x *UniversalValidator) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_validator_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_UniversalValidator_messageType fastReflection_UniversalValidator_messageType +var _ protoreflect.MessageType = fastReflection_UniversalValidator_messageType{} + +type fastReflection_UniversalValidator_messageType struct{} + +func (x fastReflection_UniversalValidator_messageType) Zero() protoreflect.Message { + return (*fastReflection_UniversalValidator)(nil) +} +func (x fastReflection_UniversalValidator_messageType) New() protoreflect.Message { + return new(fastReflection_UniversalValidator) +} +func (x fastReflection_UniversalValidator_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_UniversalValidator +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_UniversalValidator) Descriptor() protoreflect.MessageDescriptor { + return md_UniversalValidator +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_UniversalValidator) Type() protoreflect.MessageType { + return _fastReflection_UniversalValidator_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_UniversalValidator) New() protoreflect.Message { + return new(fastReflection_UniversalValidator) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_UniversalValidator) Interface() protoreflect.ProtoMessage { + return (*UniversalValidator)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_UniversalValidator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CoreValidatorAddress != "" { + value := protoreflect.ValueOfString(x.CoreValidatorAddress) + if !f(fd_UniversalValidator_core_validator_address, value) { + return + } + } + if x.Pubkey != "" { + value := protoreflect.ValueOfString(x.Pubkey) + if !f(fd_UniversalValidator_pubkey, value) { + return + } + } + if x.Status != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) + if !f(fd_UniversalValidator_status, value) { + return + } + } + if x.Network != nil { + value := protoreflect.ValueOfMessage(x.Network.ProtoReflect()) + if !f(fd_UniversalValidator_network, value) { + return + } + } + if x.JoinedAtBlock != int64(0) { + value := protoreflect.ValueOfInt64(x.JoinedAtBlock) + if !f(fd_UniversalValidator_joined_at_block, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_UniversalValidator) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.UniversalValidator.core_validator_address": + return x.CoreValidatorAddress != "" + case "uvalidator.v1.UniversalValidator.pubkey": + return x.Pubkey != "" + case "uvalidator.v1.UniversalValidator.status": + return x.Status != 0 + case "uvalidator.v1.UniversalValidator.network": + return x.Network != nil + case "uvalidator.v1.UniversalValidator.joined_at_block": + return x.JoinedAtBlock != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.UniversalValidator does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_UniversalValidator) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.UniversalValidator.core_validator_address": + x.CoreValidatorAddress = "" + case "uvalidator.v1.UniversalValidator.pubkey": + x.Pubkey = "" + case "uvalidator.v1.UniversalValidator.status": + x.Status = 0 + case "uvalidator.v1.UniversalValidator.network": + x.Network = nil + case "uvalidator.v1.UniversalValidator.joined_at_block": + x.JoinedAtBlock = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.UniversalValidator does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_UniversalValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.UniversalValidator.core_validator_address": + value := x.CoreValidatorAddress + return protoreflect.ValueOfString(value) + case "uvalidator.v1.UniversalValidator.pubkey": + value := x.Pubkey + return protoreflect.ValueOfString(value) + case "uvalidator.v1.UniversalValidator.status": + value := x.Status + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "uvalidator.v1.UniversalValidator.network": + value := x.Network + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "uvalidator.v1.UniversalValidator.joined_at_block": + value := x.JoinedAtBlock + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.UniversalValidator does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_UniversalValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.UniversalValidator.core_validator_address": + x.CoreValidatorAddress = value.Interface().(string) + case "uvalidator.v1.UniversalValidator.pubkey": + x.Pubkey = value.Interface().(string) + case "uvalidator.v1.UniversalValidator.status": + x.Status = (UVStatus)(value.Enum()) + case "uvalidator.v1.UniversalValidator.network": + x.Network = value.Message().Interface().(*NetworkInfo) + case "uvalidator.v1.UniversalValidator.joined_at_block": + x.JoinedAtBlock = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.UniversalValidator does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_UniversalValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.UniversalValidator.network": + if x.Network == nil { + x.Network = new(NetworkInfo) + } + return protoreflect.ValueOfMessage(x.Network.ProtoReflect()) + case "uvalidator.v1.UniversalValidator.core_validator_address": + panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.UniversalValidator is not mutable")) + case "uvalidator.v1.UniversalValidator.pubkey": + panic(fmt.Errorf("field pubkey of message uvalidator.v1.UniversalValidator is not mutable")) + case "uvalidator.v1.UniversalValidator.status": + panic(fmt.Errorf("field status of message uvalidator.v1.UniversalValidator is not mutable")) + case "uvalidator.v1.UniversalValidator.joined_at_block": + panic(fmt.Errorf("field joined_at_block of message uvalidator.v1.UniversalValidator is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.UniversalValidator does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_UniversalValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.UniversalValidator.core_validator_address": + return protoreflect.ValueOfString("") + case "uvalidator.v1.UniversalValidator.pubkey": + return protoreflect.ValueOfString("") + case "uvalidator.v1.UniversalValidator.status": + return protoreflect.ValueOfEnum(0) + case "uvalidator.v1.UniversalValidator.network": + m := new(NetworkInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "uvalidator.v1.UniversalValidator.joined_at_block": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.UniversalValidator does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_UniversalValidator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.UniversalValidator", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_UniversalValidator) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_UniversalValidator) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_UniversalValidator) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_UniversalValidator) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*UniversalValidator) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.CoreValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Pubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Status != 0 { + n += 1 + runtime.Sov(uint64(x.Status)) + } + if x.Network != nil { + l = options.Size(x.Network) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.JoinedAtBlock != 0 { + n += 1 + runtime.Sov(uint64(x.JoinedAtBlock)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*UniversalValidator) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.JoinedAtBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.JoinedAtBlock)) + i-- + dAtA[i] = 0x28 + } + if x.Network != nil { + encoded, err := options.Marshal(x.Network) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if x.Status != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) + i-- + dAtA[i] = 0x18 + } + if len(x.Pubkey) > 0 { + i -= len(x.Pubkey) + copy(dAtA[i:], x.Pubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pubkey))) + i-- + dAtA[i] = 0x12 + } + if len(x.CoreValidatorAddress) > 0 { + i -= len(x.CoreValidatorAddress) + copy(dAtA[i:], x.CoreValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoreValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*UniversalValidator) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UniversalValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UniversalValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", 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.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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.Pubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + x.Status = 0 + 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++ + x.Status |= UVStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Network == nil { + x.Network = &NetworkInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Network); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field JoinedAtBlock", wireType) + } + x.JoinedAtBlock = 0 + 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++ + x.JoinedAtBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: uvalidator/v1/validator.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Universal Validator status +type UVStatus int32 + +const ( + UVStatus_UV_STATUS_UNSPECIFIED UVStatus = 0 + UVStatus_UV_STATUS_ACTIVE UVStatus = 1 // Fully active (votes + signs) + UVStatus_UV_STATUS_PENDING_JOIN UVStatus = 2 // Waiting for onboarding keygen / vote + UVStatus_UV_STATUS_PENDING_LEAVE UVStatus = 3 // Marked for removal (still active until TSS reshare) + UVStatus_UV_STATUS_INACTIVE UVStatus = 4 // No longer part of the validator set +) + +// Enum value maps for UVStatus. +var ( + UVStatus_name = map[int32]string{ + 0: "UV_STATUS_UNSPECIFIED", + 1: "UV_STATUS_ACTIVE", + 2: "UV_STATUS_PENDING_JOIN", + 3: "UV_STATUS_PENDING_LEAVE", + 4: "UV_STATUS_INACTIVE", + } + UVStatus_value = map[string]int32{ + "UV_STATUS_UNSPECIFIED": 0, + "UV_STATUS_ACTIVE": 1, + "UV_STATUS_PENDING_JOIN": 2, + "UV_STATUS_PENDING_LEAVE": 3, + "UV_STATUS_INACTIVE": 4, + } +) + +func (x UVStatus) Enum() *UVStatus { + p := new(UVStatus) + *p = x + return p +} + +func (x UVStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UVStatus) Descriptor() protoreflect.EnumDescriptor { + return file_uvalidator_v1_validator_proto_enumTypes[0].Descriptor() +} + +func (UVStatus) Type() protoreflect.EnumType { + return &file_uvalidator_v1_validator_proto_enumTypes[0] +} + +func (x UVStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use UVStatus.Descriptor instead. +func (UVStatus) EnumDescriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{0} +} + +// Validator network metadata +type NetworkInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` // Node IP address +} + +func (x *NetworkInfo) Reset() { + *x = NetworkInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_validator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInfo) ProtoMessage() {} + +// Deprecated: Use NetworkInfo.ProtoReflect.Descriptor instead. +func (*NetworkInfo) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{0} +} + +func (x *NetworkInfo) GetIp() string { + if x != nil { + return x.Ip + } + return "" +} + +// Core Universal Validator object +type UniversalValidator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` // Core validator address + Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` // Validator consensus public key + Status UVStatus `protobuf:"varint,3,opt,name=status,proto3,enum=uvalidator.v1.UVStatus" json:"status,omitempty"` // Current lifecycle status + Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` // Metadata for networking + JoinedAtBlock int64 `protobuf:"varint,5,opt,name=joined_at_block,json=joinedAtBlock,proto3" json:"joined_at_block,omitempty"` // Block height when added to UV set +} + +func (x *UniversalValidator) Reset() { + *x = UniversalValidator{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_validator_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UniversalValidator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UniversalValidator) ProtoMessage() {} + +// Deprecated: Use UniversalValidator.ProtoReflect.Descriptor instead. +func (*UniversalValidator) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{1} +} + +func (x *UniversalValidator) GetCoreValidatorAddress() string { + if x != nil { + return x.CoreValidatorAddress + } + return "" +} + +func (x *UniversalValidator) GetPubkey() string { + if x != nil { + return x.Pubkey + } + return "" +} + +func (x *UniversalValidator) GetStatus() UVStatus { + if x != nil { + return x.Status + } + return UVStatus_UV_STATUS_UNSPECIFIED +} + +func (x *UniversalValidator) GetNetwork() *NetworkInfo { + if x != nil { + return x.Network + } + return nil +} + +func (x *UniversalValidator) GetJoinedAtBlock() int64 { + if x != nil { + return x.JoinedAtBlock + } + return 0 +} + +var File_uvalidator_v1_validator_proto protoreflect.FileDescriptor + +var file_uvalidator_v1_validator_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x0d, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x14, + 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1d, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0x9e, 0x02, 0x0a, 0x12, 0x55, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x34, 0x0a, + 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, + 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x75, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x56, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x07, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x12, 0x26, 0x0a, 0x0f, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6a, 0x6f, 0x69, + 0x6e, 0x65, 0x64, 0x41, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x2b, 0x98, 0xa0, 0x1f, 0x00, + 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2a, 0x92, 0x01, 0x0a, 0x08, 0x55, 0x56, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x14, 0x0a, 0x10, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, + 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, + 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, + 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x03, 0x12, 0x16, + 0x0a, 0x12, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x41, 0x43, + 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xbd, 0x01, 0x0a, + 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, + 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_uvalidator_v1_validator_proto_rawDescOnce sync.Once + file_uvalidator_v1_validator_proto_rawDescData = file_uvalidator_v1_validator_proto_rawDesc +) + +func file_uvalidator_v1_validator_proto_rawDescGZIP() []byte { + file_uvalidator_v1_validator_proto_rawDescOnce.Do(func() { + file_uvalidator_v1_validator_proto_rawDescData = protoimpl.X.CompressGZIP(file_uvalidator_v1_validator_proto_rawDescData) + }) + return file_uvalidator_v1_validator_proto_rawDescData +} + +var file_uvalidator_v1_validator_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_uvalidator_v1_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_uvalidator_v1_validator_proto_goTypes = []interface{}{ + (UVStatus)(0), // 0: uvalidator.v1.UVStatus + (*NetworkInfo)(nil), // 1: uvalidator.v1.NetworkInfo + (*UniversalValidator)(nil), // 2: uvalidator.v1.UniversalValidator +} +var file_uvalidator_v1_validator_proto_depIdxs = []int32{ + 0, // 0: uvalidator.v1.UniversalValidator.status:type_name -> uvalidator.v1.UVStatus + 1, // 1: uvalidator.v1.UniversalValidator.network:type_name -> uvalidator.v1.NetworkInfo + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_uvalidator_v1_validator_proto_init() } +func file_uvalidator_v1_validator_proto_init() { + if File_uvalidator_v1_validator_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_uvalidator_v1_validator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_validator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UniversalValidator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_uvalidator_v1_validator_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_uvalidator_v1_validator_proto_goTypes, + DependencyIndexes: file_uvalidator_v1_validator_proto_depIdxs, + EnumInfos: file_uvalidator_v1_validator_proto_enumTypes, + MessageInfos: file_uvalidator_v1_validator_proto_msgTypes, + }.Build() + File_uvalidator_v1_validator_proto = out.File + file_uvalidator_v1_validator_proto_rawDesc = nil + file_uvalidator_v1_validator_proto_goTypes = nil + file_uvalidator_v1_validator_proto_depIdxs = nil +} From e2e3920e67bd84953fecdcbbf6b501d96f013dce Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 5 Nov 2025 17:22:37 +0530 Subject: [PATCH 004/105] refactor: added generated protobuf in module types --- x/uvalidator/types/tx.pb.go | 184 +++++-- x/uvalidator/types/validator.pb.go | 759 +++++++++++++++++++++++++++++ 2 files changed, 909 insertions(+), 34 deletions(-) create mode 100644 x/uvalidator/types/validator.pb.go diff --git a/x/uvalidator/types/tx.pb.go b/x/uvalidator/types/tx.pb.go index 431474c7..e3b40dae 100644 --- a/x/uvalidator/types/tx.pb.go +++ b/x/uvalidator/types/tx.pb.go @@ -135,6 +135,10 @@ type MsgAddUniversalValidator struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // core_validator_address is the address of the core validator. CoreValidatorAddress string `protobuf:"bytes,2,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` + // pubkey is the consensus public key for this universal validator + Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + // network metadata for validator node (IP, etc.) + Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` } func (m *MsgAddUniversalValidator) Reset() { *m = MsgAddUniversalValidator{} } @@ -184,6 +188,20 @@ func (m *MsgAddUniversalValidator) GetCoreValidatorAddress() string { return "" } +func (m *MsgAddUniversalValidator) GetPubkey() string { + if m != nil { + return m.Pubkey + } + return "" +} + +func (m *MsgAddUniversalValidator) GetNetwork() *NetworkInfo { + if m != nil { + return m.Network + } + return nil +} + type MsgAddUniversalValidatorResponse struct { } @@ -322,40 +340,43 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/tx.proto", fileDescriptor_bea4c2a0c904c8a7) } var fileDescriptor_bea4c2a0c904c8a7 = []byte{ - // 522 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xc7, 0x73, 0x05, 0x22, 0xe5, 0x78, 0x13, 0x56, 0xda, 0xba, 0xae, 0x30, 0xc1, 0x15, 0xa5, - 0x8a, 0x14, 0x9b, 0x26, 0x52, 0x91, 0xba, 0x35, 0x7b, 0x10, 0x04, 0xb5, 0x48, 0x2c, 0xd1, 0x35, - 0x3e, 0x5d, 0x2c, 0xd5, 0x3e, 0x73, 0x8f, 0x63, 0xb5, 0x4c, 0x88, 0x91, 0x01, 0xf1, 0x51, 0x32, - 0xf4, 0x43, 0x74, 0xac, 0xca, 0x00, 0x62, 0x40, 0x28, 0x19, 0xf2, 0x35, 0x50, 0xec, 0x73, 0x52, - 0xbb, 0x71, 0x9b, 0xa1, 0x4b, 0xf4, 0xe4, 0xfe, 0x7f, 0xff, 0x9e, 0x97, 0x7b, 0x74, 0x78, 0xa5, - 0x1f, 0x92, 0x23, 0xc7, 0x26, 0x01, 0x17, 0x56, 0xb8, 0x6d, 0x05, 0xc7, 0xa6, 0x2f, 0x78, 0xc0, - 0x95, 0x87, 0xb3, 0x73, 0x33, 0xdc, 0xd6, 0x9e, 0x10, 0xd7, 0xf1, 0xb8, 0x15, 0xfd, 0xc6, 0x0e, - 0x6d, 0xb5, 0xcb, 0xc1, 0xe5, 0x60, 0xb9, 0xc0, 0x26, 0x5f, 0xba, 0xc0, 0xa4, 0xb0, 0x9e, 0x46, - 0x32, 0xea, 0x51, 0x70, 0x40, 0x8a, 0x65, 0xc6, 0x19, 0x8f, 0x42, 0x6b, 0x12, 0xc9, 0xd3, 0xb5, - 0x98, 0xd5, 0x89, 0x85, 0xf8, 0x4f, 0x22, 0x65, 0x0a, 0x3c, 0xf1, 0xa9, 0x94, 0x8c, 0xef, 0x08, - 0x3f, 0x6e, 0x01, 0xdb, 0xf7, 0x6d, 0x12, 0xd0, 0xb7, 0x44, 0x10, 0x17, 0x94, 0x1d, 0x5c, 0x22, - 0xfd, 0xa0, 0xc7, 0x85, 0x13, 0x9c, 0xa8, 0xa8, 0x82, 0xb6, 0x4a, 0x4d, 0xf5, 0xe2, 0xb4, 0x56, - 0x96, 0xcc, 0x3d, 0xdb, 0x16, 0x14, 0xe0, 0x7d, 0x20, 0x1c, 0x8f, 0xb5, 0x67, 0x56, 0xa5, 0x81, - 0x8b, 0x7e, 0x44, 0x50, 0x97, 0x2a, 0x68, 0xeb, 0x7e, 0x7d, 0xd9, 0x4c, 0x0d, 0xc0, 0x8c, 0xf1, - 0xcd, 0xbb, 0x67, 0x7f, 0x9f, 0x15, 0xda, 0xd2, 0xba, 0xfb, 0xe8, 0xeb, 0x78, 0x50, 0x9d, 0x41, - 0x8c, 0x35, 0xbc, 0x9a, 0xa9, 0xa7, 0x4d, 0xc1, 0xe7, 0x1e, 0x50, 0xe3, 0x0f, 0xc2, 0x6a, 0x0b, - 0xd8, 0x9e, 0x6d, 0xef, 0x7b, 0x4e, 0x48, 0x05, 0x90, 0xa3, 0x83, 0x84, 0xaf, 0xbc, 0xc2, 0x45, - 0x70, 0x98, 0x47, 0xc5, 0x8d, 0x15, 0x4b, 0x9f, 0xf2, 0x01, 0xaf, 0x74, 0xb9, 0xa0, 0x9d, 0x69, - 0x8d, 0x1d, 0x12, 0xfb, 0xa2, 0xf2, 0x4b, 0xcd, 0xe7, 0x17, 0xa7, 0xb5, 0xa7, 0x92, 0x30, 0xcd, - 0x93, 0x46, 0x95, 0x27, 0x80, 0xac, 0xb6, 0xdb, 0x98, 0xb4, 0x24, 0xb3, 0x7c, 0x1b, 0x0f, 0xaa, - 0x1b, 0x97, 0xc6, 0x9f, 0x57, 0xbf, 0x61, 0xe0, 0x4a, 0x9e, 0x36, 0x1d, 0xc0, 0x2f, 0x84, 0xd7, - 0x5b, 0xc0, 0xda, 0xd4, 0xe5, 0x21, 0xbd, 0x95, 0x19, 0xbc, 0xb9, 0x61, 0x06, 0xf9, 0x84, 0xf9, - 0xad, 0xef, 0x64, 0x5a, 0xdf, 0x4c, 0xb7, 0x9e, 0x57, 0xb9, 0xf1, 0x02, 0x6f, 0x5c, 0x23, 0x27, - 0x03, 0xa8, 0xff, 0x5c, 0xc2, 0x77, 0x5a, 0xc0, 0x94, 0x03, 0xfc, 0x20, 0xb5, 0xb1, 0x7a, 0x66, - 0xd3, 0x32, 0x1b, 0xa4, 0x6d, 0x5e, 0xaf, 0x27, 0x7c, 0xe5, 0x13, 0x5e, 0x9e, 0xbf, 0x5d, 0x2f, - 0xaf, 0x02, 0xe6, 0x1a, 0x35, 0x6b, 0x41, 0xe3, 0x34, 0xe5, 0x67, 0xac, 0xe6, 0xde, 0x67, 0xf5, - 0x2a, 0x2c, 0xcf, 0xab, 0xd5, 0x17, 0xf7, 0x26, 0xb9, 0xb5, 0x7b, 0x5f, 0xc6, 0x83, 0x2a, 0x6a, - 0xbe, 0x3b, 0x1b, 0xea, 0xe8, 0x7c, 0xa8, 0xa3, 0x7f, 0x43, 0x1d, 0xfd, 0x18, 0xe9, 0x85, 0xf3, - 0x91, 0x5e, 0xf8, 0x3d, 0xd2, 0x0b, 0x1f, 0x5f, 0x33, 0x27, 0xe8, 0xf5, 0x0f, 0xcd, 0x2e, 0x77, - 0x2d, 0xbf, 0x0f, 0xbd, 0x6e, 0x8f, 0x38, 0x5e, 0x14, 0xd5, 0xa2, 0xb0, 0xe6, 0x71, 0x9b, 0x5a, - 0xc7, 0xd6, 0xa5, 0x5b, 0x8e, 0x1e, 0x97, 0xc3, 0x62, 0xf4, 0xba, 0x34, 0xfe, 0x07, 0x00, 0x00, - 0xff, 0xff, 0x06, 0xae, 0x7f, 0x17, 0x1b, 0x05, 0x00, 0x00, + // 570 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x3f, 0x6f, 0xd3, 0x40, + 0x1c, 0x8d, 0xdb, 0x12, 0x94, 0xe3, 0x9f, 0xb0, 0xd2, 0xd4, 0x75, 0x55, 0x13, 0x5c, 0x51, 0xaa, + 0x48, 0x89, 0x69, 0x82, 0x8a, 0x94, 0xad, 0xd9, 0x18, 0x52, 0x81, 0x51, 0x8b, 0xc4, 0x12, 0x5d, + 0xe2, 0xe3, 0x62, 0xb5, 0xbe, 0x33, 0x77, 0x4e, 0x68, 0x98, 0x10, 0x23, 0x03, 0xe2, 0x63, 0x30, + 0x66, 0xe8, 0x87, 0xe8, 0x58, 0x95, 0x01, 0x26, 0x84, 0x92, 0x21, 0x5f, 0x03, 0xf9, 0x6c, 0x27, + 0xb5, 0x1b, 0xb7, 0x1d, 0x58, 0xac, 0xdf, 0xdd, 0x7b, 0x7e, 0xbf, 0x77, 0xef, 0x77, 0x3a, 0x50, + 0xe8, 0xf5, 0xe1, 0x91, 0x6d, 0x41, 0x8f, 0x32, 0xa3, 0xbf, 0x6d, 0x78, 0xc7, 0x15, 0x97, 0x51, + 0x8f, 0xca, 0xf7, 0x66, 0xfb, 0x95, 0xfe, 0xb6, 0xfa, 0x10, 0x3a, 0x36, 0xa1, 0x86, 0xf8, 0x06, + 0x0c, 0x75, 0xa5, 0x43, 0xb9, 0x43, 0xb9, 0xe1, 0x70, 0xec, 0xff, 0xe9, 0x70, 0x1c, 0x02, 0x6b, + 0x71, 0x49, 0x8c, 0x08, 0xe2, 0x36, 0x0f, 0xc1, 0x3c, 0xa6, 0x98, 0x8a, 0xd2, 0xf0, 0xab, 0x70, + 0x77, 0x35, 0xd0, 0x6a, 0x05, 0x40, 0xb0, 0x88, 0xa0, 0x84, 0xc1, 0x81, 0x8b, 0x22, 0x68, 0x3d, + 0x0e, 0xcd, 0x0c, 0x0b, 0x58, 0xff, 0x26, 0x81, 0x07, 0x4d, 0x8e, 0xf7, 0x5d, 0x0b, 0x7a, 0xe8, + 0x15, 0x64, 0xd0, 0xe1, 0xf2, 0x0e, 0xc8, 0xc1, 0x9e, 0xd7, 0xa5, 0xcc, 0xf6, 0x06, 0x8a, 0x54, + 0x94, 0xb6, 0x72, 0x0d, 0xe5, 0xfc, 0xa4, 0x9c, 0x0f, 0x5b, 0xee, 0x5a, 0x16, 0x43, 0x9c, 0xbf, + 0xf1, 0x98, 0x4d, 0xb0, 0x39, 0xa3, 0xca, 0x35, 0x90, 0x75, 0x85, 0x82, 0xb2, 0x50, 0x94, 0xb6, + 0xee, 0x54, 0x97, 0x2b, 0xb1, 0x7c, 0x2a, 0x81, 0x7c, 0x63, 0xe9, 0xf4, 0xcf, 0xa3, 0x8c, 0x19, + 0x52, 0xeb, 0xf7, 0xbf, 0x4c, 0x86, 0xa5, 0x99, 0x88, 0xbe, 0x0a, 0x56, 0x12, 0x7e, 0x4c, 0xc4, + 0x5d, 0x4a, 0x38, 0xd2, 0x7f, 0x2c, 0x00, 0xa5, 0xc9, 0xf1, 0xae, 0x65, 0xed, 0x13, 0xbb, 0x8f, + 0x18, 0x87, 0x47, 0x07, 0x91, 0xbe, 0xfc, 0x0c, 0x64, 0xb9, 0x8d, 0x09, 0x62, 0xd7, 0x3a, 0x0e, + 0x79, 0xf2, 0x5b, 0x50, 0xe8, 0x50, 0x86, 0x5a, 0x53, 0x8f, 0x2d, 0x18, 0xf0, 0x84, 0xfd, 0x5c, + 0xe3, 0xf1, 0xf9, 0x49, 0x79, 0x3d, 0x54, 0x98, 0xf6, 0x89, 0x4b, 0xe5, 0x7d, 0x81, 0x24, 0x26, + 0x17, 0x40, 0xd6, 0xed, 0xb5, 0x0f, 0xd1, 0x40, 0x59, 0xf4, 0x85, 0xcc, 0x70, 0x25, 0x3f, 0x07, + 0xb7, 0x09, 0xf2, 0x3e, 0x52, 0x76, 0xa8, 0x2c, 0x89, 0x80, 0xd4, 0x44, 0x40, 0x7b, 0x01, 0xfa, + 0x92, 0xbc, 0xa7, 0x66, 0x44, 0xad, 0xd7, 0xfc, 0x80, 0x42, 0xcf, 0x5f, 0x27, 0xc3, 0xd2, 0xc6, + 0x85, 0x81, 0xa6, 0xa5, 0xa1, 0xeb, 0xa0, 0x98, 0x86, 0x4d, 0xe3, 0xfc, 0x25, 0x81, 0xb5, 0x26, + 0xc7, 0x26, 0x72, 0x68, 0x1f, 0xfd, 0x97, 0x44, 0xf7, 0xae, 0x49, 0x34, 0x5d, 0x61, 0x6e, 0x90, + 0xf5, 0x9d, 0xc4, 0xd1, 0x37, 0xe3, 0x47, 0x4f, 0x73, 0xae, 0x3f, 0x01, 0x1b, 0x57, 0xc0, 0x51, + 0x00, 0xd5, 0x9f, 0x0b, 0x60, 0xb1, 0xc9, 0xb1, 0x7c, 0x00, 0xee, 0xc6, 0xee, 0xbf, 0x96, 0x18, + 0x4b, 0xe2, 0x3e, 0xaa, 0x9b, 0x57, 0xe3, 0x91, 0xbe, 0xfc, 0x01, 0x2c, 0xcf, 0xbf, 0xab, 0x4f, + 0x2f, 0x0b, 0xcc, 0x25, 0xaa, 0xc6, 0x0d, 0x89, 0xd3, 0x96, 0x9f, 0x80, 0x92, 0x3a, 0xcf, 0xd2, + 0x65, 0xb1, 0x34, 0xae, 0x5a, 0xbd, 0x39, 0x37, 0xea, 0xad, 0xde, 0xfa, 0x3c, 0x19, 0x96, 0xa4, + 0xc6, 0xeb, 0xd3, 0x91, 0x26, 0x9d, 0x8d, 0x34, 0xe9, 0xef, 0x48, 0x93, 0xbe, 0x8f, 0xb5, 0xcc, + 0xd9, 0x58, 0xcb, 0xfc, 0x1e, 0x6b, 0x99, 0x77, 0x2f, 0xb0, 0xed, 0x75, 0x7b, 0xed, 0x4a, 0x87, + 0x3a, 0x86, 0xdb, 0xe3, 0xdd, 0x4e, 0x17, 0xda, 0x44, 0x54, 0x65, 0x51, 0x96, 0x09, 0xb5, 0x90, + 0x71, 0x6c, 0x5c, 0x98, 0xb2, 0x78, 0xc9, 0xda, 0x59, 0xf1, 0x56, 0xd5, 0xfe, 0x05, 0x00, 0x00, + 0xff, 0xff, 0x2e, 0x59, 0xbb, 0x26, 0x88, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -603,6 +624,25 @@ func (m *MsgAddUniversalValidator) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l + if m.Network != nil { + { + size, err := m.Network.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Pubkey) > 0 { + i -= len(m.Pubkey) + copy(dAtA[i:], m.Pubkey) + i = encodeVarintTx(dAtA, i, uint64(len(m.Pubkey))) + i-- + dAtA[i] = 0x1a + } if len(m.CoreValidatorAddress) > 0 { i -= len(m.CoreValidatorAddress) copy(dAtA[i:], m.CoreValidatorAddress) @@ -752,6 +792,14 @@ func (m *MsgAddUniversalValidator) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.Pubkey) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Network != nil { + l = m.Network.Size() + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -1054,6 +1102,74 @@ func (m *MsgAddUniversalValidator) Unmarshal(dAtA []byte) error { } m.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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.Pubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Network == nil { + m.Network = &NetworkInfo{} + } + if err := m.Network.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/uvalidator/types/validator.pb.go b/x/uvalidator/types/validator.pb.go new file mode 100644 index 00000000..2552b993 --- /dev/null +++ b/x/uvalidator/types/validator.pb.go @@ -0,0 +1,759 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: uvalidator/v1/validator.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Universal Validator status +type UVStatus int32 + +const ( + UVStatus_UV_STATUS_UNSPECIFIED UVStatus = 0 + UVStatus_UV_STATUS_ACTIVE UVStatus = 1 + UVStatus_UV_STATUS_PENDING_JOIN UVStatus = 2 + UVStatus_UV_STATUS_PENDING_LEAVE UVStatus = 3 + UVStatus_UV_STATUS_INACTIVE UVStatus = 4 +) + +var UVStatus_name = map[int32]string{ + 0: "UV_STATUS_UNSPECIFIED", + 1: "UV_STATUS_ACTIVE", + 2: "UV_STATUS_PENDING_JOIN", + 3: "UV_STATUS_PENDING_LEAVE", + 4: "UV_STATUS_INACTIVE", +} + +var UVStatus_value = map[string]int32{ + "UV_STATUS_UNSPECIFIED": 0, + "UV_STATUS_ACTIVE": 1, + "UV_STATUS_PENDING_JOIN": 2, + "UV_STATUS_PENDING_LEAVE": 3, + "UV_STATUS_INACTIVE": 4, +} + +func (x UVStatus) String() string { + return proto.EnumName(UVStatus_name, int32(x)) +} + +func (UVStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_317d9e276ec46d00, []int{0} +} + +// Validator network metadata +type NetworkInfo struct { + Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` +} + +func (m *NetworkInfo) Reset() { *m = NetworkInfo{} } +func (m *NetworkInfo) String() string { return proto.CompactTextString(m) } +func (*NetworkInfo) ProtoMessage() {} +func (*NetworkInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_317d9e276ec46d00, []int{0} +} +func (m *NetworkInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NetworkInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NetworkInfo.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 *NetworkInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_NetworkInfo.Merge(m, src) +} +func (m *NetworkInfo) XXX_Size() int { + return m.Size() +} +func (m *NetworkInfo) XXX_DiscardUnknown() { + xxx_messageInfo_NetworkInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_NetworkInfo proto.InternalMessageInfo + +func (m *NetworkInfo) GetIp() string { + if m != nil { + return m.Ip + } + return "" +} + +// Core Universal Validator object +type UniversalValidator struct { + CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` + Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + Status UVStatus `protobuf:"varint,3,opt,name=status,proto3,enum=uvalidator.v1.UVStatus" json:"status,omitempty"` + Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` + JoinedAtBlock int64 `protobuf:"varint,5,opt,name=joined_at_block,json=joinedAtBlock,proto3" json:"joined_at_block,omitempty"` +} + +func (m *UniversalValidator) Reset() { *m = UniversalValidator{} } +func (*UniversalValidator) ProtoMessage() {} +func (*UniversalValidator) Descriptor() ([]byte, []int) { + return fileDescriptor_317d9e276ec46d00, []int{1} +} +func (m *UniversalValidator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UniversalValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UniversalValidator.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 *UniversalValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_UniversalValidator.Merge(m, src) +} +func (m *UniversalValidator) XXX_Size() int { + return m.Size() +} +func (m *UniversalValidator) XXX_DiscardUnknown() { + xxx_messageInfo_UniversalValidator.DiscardUnknown(m) +} + +var xxx_messageInfo_UniversalValidator proto.InternalMessageInfo + +func (m *UniversalValidator) GetCoreValidatorAddress() string { + if m != nil { + return m.CoreValidatorAddress + } + return "" +} + +func (m *UniversalValidator) GetPubkey() string { + if m != nil { + return m.Pubkey + } + return "" +} + +func (m *UniversalValidator) GetStatus() UVStatus { + if m != nil { + return m.Status + } + return UVStatus_UV_STATUS_UNSPECIFIED +} + +func (m *UniversalValidator) GetNetwork() *NetworkInfo { + if m != nil { + return m.Network + } + return nil +} + +func (m *UniversalValidator) GetJoinedAtBlock() int64 { + if m != nil { + return m.JoinedAtBlock + } + return 0 +} + +func init() { + proto.RegisterEnum("uvalidator.v1.UVStatus", UVStatus_name, UVStatus_value) + proto.RegisterType((*NetworkInfo)(nil), "uvalidator.v1.NetworkInfo") + proto.RegisterType((*UniversalValidator)(nil), "uvalidator.v1.UniversalValidator") +} + +func init() { proto.RegisterFile("uvalidator/v1/validator.proto", fileDescriptor_317d9e276ec46d00) } + +var fileDescriptor_317d9e276ec46d00 = []byte{ + // 456 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0x2d, 0x4b, 0xcc, + 0xc9, 0x4c, 0x49, 0x2c, 0xc9, 0x2f, 0xd2, 0x2f, 0x33, 0xd4, 0x87, 0x73, 0xf4, 0x0a, 0x8a, 0xf2, + 0x4b, 0xf2, 0x85, 0x78, 0x11, 0xd2, 0x7a, 0x65, 0x86, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, + 0x19, 0x7d, 0x10, 0x0b, 0xa2, 0x48, 0x4a, 0x30, 0x31, 0x37, 0x33, 0x2f, 0x5f, 0x1f, 0x4c, 0x42, + 0x84, 0x94, 0x64, 0xb9, 0xb8, 0xfd, 0x52, 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0x3d, 0xf3, 0xd2, 0xf2, + 0x85, 0xf8, 0xb8, 0x98, 0x32, 0x0b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x98, 0x32, 0x0b, + 0x94, 0xe6, 0x31, 0x71, 0x09, 0x85, 0xe6, 0x65, 0x96, 0xa5, 0x16, 0x15, 0x27, 0xe6, 0x84, 0xc1, + 0x6c, 0x10, 0x32, 0xe1, 0x12, 0x4b, 0xce, 0x2f, 0x4a, 0x8d, 0x87, 0xdb, 0x19, 0x9f, 0x98, 0x92, + 0x52, 0x94, 0x5a, 0x5c, 0x0c, 0xd5, 0x2a, 0x02, 0x92, 0x85, 0x2b, 0x77, 0x84, 0xc8, 0x09, 0x89, + 0x71, 0xb1, 0x15, 0x94, 0x26, 0x65, 0xa7, 0x56, 0x4a, 0x30, 0x81, 0x55, 0x41, 0x79, 0x42, 0xfa, + 0x5c, 0x6c, 0xc5, 0x25, 0x89, 0x25, 0xa5, 0xc5, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0x7c, 0x46, 0xe2, + 0x7a, 0x28, 0x9e, 0xd1, 0x0b, 0x0d, 0x0b, 0x06, 0x4b, 0x07, 0x41, 0x95, 0x09, 0x99, 0x70, 0xb1, + 0xe7, 0x41, 0x1c, 0x2d, 0xc1, 0xa2, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0x85, 0xa6, 0x03, 0xc9, 0x4b, + 0x41, 0x30, 0xa5, 0x42, 0x6a, 0x5c, 0xfc, 0x59, 0xf9, 0x99, 0x79, 0xa9, 0x29, 0xf1, 0x89, 0x25, + 0xf1, 0x49, 0x39, 0xf9, 0xc9, 0xd9, 0x12, 0xac, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0xbc, 0x10, 0x61, + 0xc7, 0x12, 0x27, 0x90, 0xa0, 0x95, 0xf6, 0x8c, 0x05, 0xf2, 0x0c, 0x2f, 0x16, 0xc8, 0x33, 0x76, + 0x3d, 0xdf, 0xa0, 0x25, 0x87, 0x14, 0xec, 0xa5, 0xb0, 0x80, 0x40, 0xf8, 0x5b, 0x6b, 0x12, 0x23, + 0x17, 0x07, 0xcc, 0x7d, 0x42, 0x92, 0x5c, 0xa2, 0xa1, 0x61, 0xf1, 0xc1, 0x21, 0x8e, 0x21, 0xa1, + 0xc1, 0xf1, 0xa1, 0x7e, 0xc1, 0x01, 0xae, 0xce, 0x9e, 0x6e, 0x9e, 0xae, 0x2e, 0x02, 0x0c, 0x42, + 0x22, 0x5c, 0x02, 0x08, 0x29, 0x47, 0xe7, 0x10, 0xcf, 0x30, 0x57, 0x01, 0x46, 0x21, 0x29, 0x2e, + 0x31, 0x84, 0x68, 0x80, 0xab, 0x9f, 0x8b, 0xa7, 0x9f, 0x7b, 0xbc, 0x97, 0xbf, 0xa7, 0x9f, 0x00, + 0x93, 0x90, 0x34, 0x97, 0x38, 0xa6, 0x9c, 0x8f, 0xab, 0x63, 0x98, 0xab, 0x00, 0xb3, 0x90, 0x18, + 0x97, 0x10, 0x42, 0xd2, 0xd3, 0x0f, 0x6a, 0x20, 0x8b, 0x14, 0xcb, 0x8a, 0x25, 0x72, 0x8c, 0x4e, + 0x81, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, + 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x9e, 0x9e, 0x59, 0x92, + 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x50, 0x5a, 0x9c, 0x91, 0x9c, 0x91, 0x98, 0x99, + 0x07, 0x66, 0xe9, 0x82, 0x99, 0xba, 0x79, 0xf9, 0x29, 0xa9, 0xfa, 0x15, 0xfa, 0x48, 0xbe, 0x2e, + 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0x27, 0x17, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x99, 0x38, 0x50, 0x59, 0x87, 0x02, 0x00, 0x00, +} + +func (this *UniversalValidator) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UniversalValidator) + if !ok { + that2, ok := that.(UniversalValidator) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CoreValidatorAddress != that1.CoreValidatorAddress { + return false + } + if this.Pubkey != that1.Pubkey { + return false + } + if this.Status != that1.Status { + return false + } + if !this.Network.Equal(that1.Network) { + return false + } + if this.JoinedAtBlock != that1.JoinedAtBlock { + return false + } + return true +} +func (m *NetworkInfo) 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 *NetworkInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NetworkInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Ip) > 0 { + i -= len(m.Ip) + copy(dAtA[i:], m.Ip) + i = encodeVarintValidator(dAtA, i, uint64(len(m.Ip))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UniversalValidator) 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 *UniversalValidator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UniversalValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.JoinedAtBlock != 0 { + i = encodeVarintValidator(dAtA, i, uint64(m.JoinedAtBlock)) + i-- + dAtA[i] = 0x28 + } + if m.Network != nil { + { + size, err := m.Network.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintValidator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.Status != 0 { + i = encodeVarintValidator(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x18 + } + if len(m.Pubkey) > 0 { + i -= len(m.Pubkey) + copy(dAtA[i:], m.Pubkey) + i = encodeVarintValidator(dAtA, i, uint64(len(m.Pubkey))) + i-- + dAtA[i] = 0x12 + } + if len(m.CoreValidatorAddress) > 0 { + i -= len(m.CoreValidatorAddress) + copy(dAtA[i:], m.CoreValidatorAddress) + i = encodeVarintValidator(dAtA, i, uint64(len(m.CoreValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintValidator(dAtA []byte, offset int, v uint64) int { + offset -= sovValidator(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *NetworkInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Ip) + if l > 0 { + n += 1 + l + sovValidator(uint64(l)) + } + return n +} + +func (m *UniversalValidator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CoreValidatorAddress) + if l > 0 { + n += 1 + l + sovValidator(uint64(l)) + } + l = len(m.Pubkey) + if l > 0 { + n += 1 + l + sovValidator(uint64(l)) + } + if m.Status != 0 { + n += 1 + sovValidator(uint64(m.Status)) + } + if m.Network != nil { + l = m.Network.Size() + n += 1 + l + sovValidator(uint64(l)) + } + if m.JoinedAtBlock != 0 { + n += 1 + sovValidator(uint64(m.JoinedAtBlock)) + } + return n +} + +func sovValidator(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozValidator(x uint64) (n int) { + return sovValidator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *NetworkInfo) 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 ErrIntOverflowValidator + } + 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: NetworkInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + 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 ErrInvalidLengthValidator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ip = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipValidator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UniversalValidator) 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 ErrIntOverflowValidator + } + 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: UniversalValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UniversalValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + 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 ErrInvalidLengthValidator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + 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 ErrInvalidLengthValidator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= UVStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthValidator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Network == nil { + m.Network = &NetworkInfo{} + } + if err := m.Network.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field JoinedAtBlock", wireType) + } + m.JoinedAtBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.JoinedAtBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipValidator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipValidator(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowValidator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowValidator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowValidator + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthValidator + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupValidator + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthValidator + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthValidator = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowValidator = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupValidator = fmt.Errorf("proto: unexpected end of group") +) From cfeebf6aeb3489fe1ef4dd053b772f8fb0262d87 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 6 Nov 2025 12:57:58 +0530 Subject: [PATCH 005/105] refactor: added universal_validator message types --- x/uvalidator/types/universal_validator.go | 42 +++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 x/uvalidator/types/universal_validator.go diff --git a/x/uvalidator/types/universal_validator.go b/x/uvalidator/types/universal_validator.go new file mode 100644 index 00000000..57028720 --- /dev/null +++ b/x/uvalidator/types/universal_validator.go @@ -0,0 +1,42 @@ +package types + +import ( + "encoding/json" + "strings" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Stringer method for Params. +func (p UniversalValidator) String() string { + bz, err := json.Marshal(p) + if err != nil { + panic(err) + } + + return string(bz) +} + +// Validate does the sanity check on the params. +func (p UniversalValidator) ValidateBasic() error { + // Validate core validator address (must be a valid valoper address) + _, err := sdk.ValAddressFromBech32(p.CoreValidatorAddress) + if err != nil { + return errors.Wrap(err, "invalid core validator address") + } + + // Validate pubkey is non-empty + pubkey := strings.TrimSpace(p.Pubkey) + if pubkey == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "pubkey cannot be empty") + } + + // Validate uv_status is within known enum range + if _, ok := UVStatus_name[int32(p.Status)]; !ok { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid uv_status: %v", p.Status) + } + + return p.Network.ValidateBasic() +} From b81c0d2fbe2f439ac175487f1ac4925dd33370f5 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 6 Nov 2025 12:58:25 +0530 Subject: [PATCH 006/105] refactor: added network_info message types --- x/uvalidator/types/network_info.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 x/uvalidator/types/network_info.go diff --git a/x/uvalidator/types/network_info.go b/x/uvalidator/types/network_info.go new file mode 100644 index 00000000..739f9fec --- /dev/null +++ b/x/uvalidator/types/network_info.go @@ -0,0 +1,19 @@ +package types + +import ( + "strings" + + "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Validate does the sanity check on the params. +func (p NetworkInfo) ValidateBasic() error { + // Validate ip is non-empty + ip := strings.TrimSpace(p.Ip) + if ip == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "ip cannot be empty") + } + + return nil +} From 276f2fd101b071c727ae64185eeaf5e28346bd0c Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 6 Nov 2025 12:59:04 +0530 Subject: [PATCH 007/105] refactor: updated msg_add_universal_validator msg --- .../types/msg_add_universal_validator.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/x/uvalidator/types/msg_add_universal_validator.go b/x/uvalidator/types/msg_add_universal_validator.go index aef2e70c..37f21d49 100644 --- a/x/uvalidator/types/msg_add_universal_validator.go +++ b/x/uvalidator/types/msg_add_universal_validator.go @@ -1,8 +1,11 @@ package types import ( + "strings" + "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var ( @@ -13,11 +16,14 @@ var ( func NewMsgAddUniversalValidator( sender sdk.Address, coreValidatorAddress sdk.Address, - universalValidatorAddress sdk.Address, + pubKey string, + network NetworkInfo, ) *MsgAddUniversalValidator { return &MsgAddUniversalValidator{ Signer: sender.String(), CoreValidatorAddress: coreValidatorAddress.String(), + Pubkey: pubKey, + Network: &network, } } @@ -50,5 +56,11 @@ func (msg *MsgAddUniversalValidator) ValidateBasic() error { return errors.Wrap(err, "invalid core validator address") } - return nil + // Validate pubkey is non-empty + pubkey := strings.TrimSpace(msg.Pubkey) + if pubkey == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "pubkey cannot be empty") + } + + return msg.Network.ValidateBasic() } From 8f2074601af44af4016acd4d6c7244bb70c37fa2 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 6 Nov 2025 12:59:23 +0530 Subject: [PATCH 008/105] feat: added generated protobuf --- api/uvalidator/v1/validator.pulsar.go | 86 +++++++++++++------------- x/uvalidator/types/validator.pb.go | 87 +++++++++++++++++---------- 2 files changed, 100 insertions(+), 73 deletions(-) diff --git a/api/uvalidator/v1/validator.pulsar.go b/api/uvalidator/v1/validator.pulsar.go index a79aac1f..dec077a4 100644 --- a/api/uvalidator/v1/validator.pulsar.go +++ b/api/uvalidator/v1/validator.pulsar.go @@ -1274,49 +1274,51 @@ var file_uvalidator_v1_validator_proto_rawDesc = []byte{ 0x0d, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1d, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3f, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0x9e, 0x02, 0x0a, 0x12, 0x55, 0x6e, 0x69, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x34, 0x0a, - 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, - 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x75, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x56, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, 0x0a, 0x07, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x12, 0x26, 0x0a, 0x0f, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6a, 0x6f, 0x69, - 0x6e, 0x65, 0x64, 0x41, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x2b, 0x98, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2a, 0x92, 0x01, 0x0a, 0x08, 0x55, 0x56, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x14, 0x0a, 0x10, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, - 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, - 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, - 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x03, 0x12, 0x16, - 0x0a, 0x12, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x41, 0x43, - 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xbd, 0x01, 0x0a, - 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, - 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x3a, 0x20, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, + 0x17, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x9e, 0x02, 0x0a, 0x12, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, + 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x56, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, + 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x26, 0x0a, 0x0f, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6a, + 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x2b, 0x98, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2a, 0x92, 0x01, 0x0a, 0x08, 0x55, 0x56, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, + 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x56, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4a, 0x4f, 0x49, + 0x4e, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x03, + 0x12, 0x16, 0x0a, 0x12, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, + 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xbd, + 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, + 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, + 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, + 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/x/uvalidator/types/validator.pb.go b/x/uvalidator/types/validator.pb.go index 2552b993..a7580086 100644 --- a/x/uvalidator/types/validator.pb.go +++ b/x/uvalidator/types/validator.pb.go @@ -189,38 +189,63 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/validator.proto", fileDescriptor_317d9e276ec46d00) } var fileDescriptor_317d9e276ec46d00 = []byte{ - // 456 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0x2d, 0x4b, 0xcc, - 0xc9, 0x4c, 0x49, 0x2c, 0xc9, 0x2f, 0xd2, 0x2f, 0x33, 0xd4, 0x87, 0x73, 0xf4, 0x0a, 0x8a, 0xf2, - 0x4b, 0xf2, 0x85, 0x78, 0x11, 0xd2, 0x7a, 0x65, 0x86, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, - 0x19, 0x7d, 0x10, 0x0b, 0xa2, 0x48, 0x4a, 0x30, 0x31, 0x37, 0x33, 0x2f, 0x5f, 0x1f, 0x4c, 0x42, - 0x84, 0x94, 0x64, 0xb9, 0xb8, 0xfd, 0x52, 0x4b, 0xca, 0xf3, 0x8b, 0xb2, 0x3d, 0xf3, 0xd2, 0xf2, - 0x85, 0xf8, 0xb8, 0x98, 0x32, 0x0b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x98, 0x32, 0x0b, - 0x94, 0xe6, 0x31, 0x71, 0x09, 0x85, 0xe6, 0x65, 0x96, 0xa5, 0x16, 0x15, 0x27, 0xe6, 0x84, 0xc1, - 0x6c, 0x10, 0x32, 0xe1, 0x12, 0x4b, 0xce, 0x2f, 0x4a, 0x8d, 0x87, 0xdb, 0x19, 0x9f, 0x98, 0x92, - 0x52, 0x94, 0x5a, 0x5c, 0x0c, 0xd5, 0x2a, 0x02, 0x92, 0x85, 0x2b, 0x77, 0x84, 0xc8, 0x09, 0x89, - 0x71, 0xb1, 0x15, 0x94, 0x26, 0x65, 0xa7, 0x56, 0x4a, 0x30, 0x81, 0x55, 0x41, 0x79, 0x42, 0xfa, - 0x5c, 0x6c, 0xc5, 0x25, 0x89, 0x25, 0xa5, 0xc5, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0x7c, 0x46, 0xe2, - 0x7a, 0x28, 0x9e, 0xd1, 0x0b, 0x0d, 0x0b, 0x06, 0x4b, 0x07, 0x41, 0x95, 0x09, 0x99, 0x70, 0xb1, - 0xe7, 0x41, 0x1c, 0x2d, 0xc1, 0xa2, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0x85, 0xa6, 0x03, 0xc9, 0x4b, - 0x41, 0x30, 0xa5, 0x42, 0x6a, 0x5c, 0xfc, 0x59, 0xf9, 0x99, 0x79, 0xa9, 0x29, 0xf1, 0x89, 0x25, - 0xf1, 0x49, 0x39, 0xf9, 0xc9, 0xd9, 0x12, 0xac, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0xbc, 0x10, 0x61, - 0xc7, 0x12, 0x27, 0x90, 0xa0, 0x95, 0xf6, 0x8c, 0x05, 0xf2, 0x0c, 0x2f, 0x16, 0xc8, 0x33, 0x76, - 0x3d, 0xdf, 0xa0, 0x25, 0x87, 0x14, 0xec, 0xa5, 0xb0, 0x80, 0x40, 0xf8, 0x5b, 0x6b, 0x12, 0x23, - 0x17, 0x07, 0xcc, 0x7d, 0x42, 0x92, 0x5c, 0xa2, 0xa1, 0x61, 0xf1, 0xc1, 0x21, 0x8e, 0x21, 0xa1, - 0xc1, 0xf1, 0xa1, 0x7e, 0xc1, 0x01, 0xae, 0xce, 0x9e, 0x6e, 0x9e, 0xae, 0x2e, 0x02, 0x0c, 0x42, - 0x22, 0x5c, 0x02, 0x08, 0x29, 0x47, 0xe7, 0x10, 0xcf, 0x30, 0x57, 0x01, 0x46, 0x21, 0x29, 0x2e, - 0x31, 0x84, 0x68, 0x80, 0xab, 0x9f, 0x8b, 0xa7, 0x9f, 0x7b, 0xbc, 0x97, 0xbf, 0xa7, 0x9f, 0x00, - 0x93, 0x90, 0x34, 0x97, 0x38, 0xa6, 0x9c, 0x8f, 0xab, 0x63, 0x98, 0xab, 0x00, 0xb3, 0x90, 0x18, - 0x97, 0x10, 0x42, 0xd2, 0xd3, 0x0f, 0x6a, 0x20, 0x8b, 0x14, 0xcb, 0x8a, 0x25, 0x72, 0x8c, 0x4e, - 0x81, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, - 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x9e, 0x9e, 0x59, 0x92, - 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x50, 0x5a, 0x9c, 0x91, 0x9c, 0x91, 0x98, 0x99, - 0x07, 0x66, 0xe9, 0x82, 0x99, 0xba, 0x79, 0xf9, 0x29, 0xa9, 0xfa, 0x15, 0xfa, 0x48, 0xbe, 0x2e, - 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0x27, 0x17, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x99, 0x38, 0x50, 0x59, 0x87, 0x02, 0x00, 0x00, -} + // 470 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0x3f, 0x6f, 0xd3, 0x40, + 0x18, 0xc6, 0x7d, 0x4e, 0x08, 0x70, 0x55, 0x8b, 0x39, 0x85, 0xc4, 0x18, 0xe1, 0x5a, 0x1d, 0x50, + 0x54, 0x54, 0x5b, 0x2d, 0x95, 0x90, 0xba, 0x20, 0xb7, 0x35, 0xc8, 0x08, 0x99, 0x92, 0xc4, 0x1e, + 0x58, 0x2c, 0x27, 0x76, 0x93, 0x23, 0xe9, 0x9d, 0x65, 0x9f, 0x03, 0xfd, 0x0a, 0x4c, 0x88, 0x89, + 0x09, 0x75, 0x60, 0x60, 0xe4, 0x63, 0x30, 0x66, 0x64, 0x44, 0xc9, 0x00, 0x1f, 0x03, 0xc5, 0x7f, + 0x62, 0x03, 0x8b, 0xf5, 0xde, 0xf3, 0x7b, 0xde, 0xf3, 0xfb, 0xbc, 0x3a, 0x78, 0x3f, 0x99, 0x79, + 0x53, 0xec, 0x7b, 0x8c, 0x46, 0xda, 0x6c, 0x5f, 0x5b, 0x1f, 0xd4, 0x30, 0xa2, 0x8c, 0xa2, 0xcd, + 0x12, 0xab, 0xb3, 0x7d, 0xa9, 0x39, 0xa2, 0x23, 0x9a, 0x12, 0x6d, 0x55, 0x65, 0x26, 0xe9, 0xb6, + 0x77, 0x81, 0x09, 0xd5, 0xd2, 0x6f, 0x26, 0xed, 0x3c, 0x81, 0x1b, 0x56, 0xc0, 0xde, 0xd2, 0x68, + 0x62, 0x92, 0x73, 0x8a, 0xb6, 0x20, 0x8f, 0x43, 0x11, 0x28, 0xa0, 0x73, 0xb3, 0xcb, 0xe3, 0xf0, + 0x48, 0xf9, 0x7d, 0xb5, 0x0d, 0xde, 0xff, 0xfa, 0xb6, 0xdb, 0xae, 0xfc, 0x9e, 0x64, 0x0d, 0x2e, + 0x26, 0xe7, 0x74, 0xe7, 0x33, 0x0f, 0x91, 0x4d, 0xf0, 0x2c, 0x88, 0x62, 0x6f, 0xea, 0x14, 0x1e, + 0x74, 0x08, 0x5b, 0x43, 0x1a, 0x05, 0xee, 0xba, 0xcb, 0xf5, 0x7c, 0x3f, 0x0a, 0xe2, 0x38, 0xbf, + 0xbc, 0xb9, 0xa2, 0x6b, 0xbb, 0x9e, 0x31, 0xd4, 0x82, 0x8d, 0x30, 0x19, 0x4c, 0x82, 0x4b, 0x91, + 0x4f, 0x5d, 0xf9, 0x09, 0x69, 0xb0, 0x11, 0x33, 0x8f, 0x25, 0xb1, 0x58, 0x53, 0x40, 0x67, 0xeb, + 0xa0, 0xad, 0xfe, 0x15, 0x57, 0xb5, 0x9d, 0x5e, 0x8a, 0xbb, 0xb9, 0x0d, 0x1d, 0xc2, 0xeb, 0xf9, + 0x94, 0x62, 0x5d, 0x01, 0x9d, 0x8d, 0x03, 0xe9, 0x9f, 0x8e, 0x4a, 0xe8, 0x6e, 0x61, 0x45, 0x0f, + 0xe0, 0xad, 0x37, 0x14, 0x93, 0xc0, 0x77, 0x3d, 0xe6, 0x0e, 0xa6, 0x74, 0x38, 0x11, 0xaf, 0x29, + 0xa0, 0x53, 0xeb, 0x6e, 0x66, 0xb2, 0xce, 0x8e, 0x57, 0xe2, 0xd1, 0xc3, 0x4f, 0x57, 0xdb, 0x5c, + 0xb1, 0x19, 0xb9, 0xb2, 0x99, 0xa4, 0x58, 0x44, 0x99, 0x7b, 0xf7, 0x23, 0x80, 0x37, 0x8a, 0xf9, + 0xd0, 0x5d, 0x78, 0xc7, 0x76, 0xdc, 0x5e, 0x5f, 0xef, 0xdb, 0x3d, 0xd7, 0xb6, 0x7a, 0x67, 0xc6, + 0x89, 0xf9, 0xd4, 0x34, 0x4e, 0x05, 0x0e, 0x35, 0xa1, 0x50, 0x22, 0xfd, 0xa4, 0x6f, 0x3a, 0x86, + 0x00, 0x90, 0x04, 0x5b, 0xa5, 0x7a, 0x66, 0x58, 0xa7, 0xa6, 0xf5, 0xcc, 0x7d, 0xfe, 0xd2, 0xb4, + 0x04, 0x1e, 0xdd, 0x83, 0xed, 0xff, 0xd9, 0x0b, 0x43, 0x77, 0x0c, 0xa1, 0x86, 0x5a, 0x10, 0x95, + 0xd0, 0xb4, 0xf2, 0x0b, 0xeb, 0x52, 0xfd, 0xeb, 0x17, 0x19, 0x1c, 0xbf, 0xfa, 0xbe, 0x90, 0xc1, + 0x7c, 0x21, 0x83, 0x9f, 0x0b, 0x19, 0x7c, 0x58, 0xca, 0xdc, 0x7c, 0x29, 0x73, 0x3f, 0x96, 0x32, + 0xf7, 0xfa, 0xf1, 0x08, 0xb3, 0x71, 0x32, 0x50, 0x87, 0xf4, 0x42, 0x0b, 0x93, 0x78, 0x3c, 0x1c, + 0x7b, 0x98, 0xa4, 0xd5, 0x5e, 0x5a, 0xee, 0x11, 0xea, 0x07, 0xda, 0x3b, 0xad, 0x92, 0x9a, 0x5d, + 0x86, 0x41, 0x3c, 0x68, 0xa4, 0x0f, 0xea, 0xd1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x98, 0xa8, + 0x96, 0x81, 0xa9, 0x02, 0x00, 0x00, +} + +func (this *NetworkInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + that1, ok := that.(*NetworkInfo) + if !ok { + that2, ok := that.(NetworkInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Ip != that1.Ip { + return false + } + return true +} func (this *UniversalValidator) Equal(that interface{}) bool { if that == nil { return this == nil From 96b706f37293321ee623188ba05426898e076b33 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 6 Nov 2025 12:59:51 +0530 Subject: [PATCH 009/105] feat: modified universal validator proto message to make it more scalable --- proto/uvalidator/v1/validator.proto | 32 ++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/proto/uvalidator/v1/validator.proto b/proto/uvalidator/v1/validator.proto index a55cba6e..221b766b 100644 --- a/proto/uvalidator/v1/validator.proto +++ b/proto/uvalidator/v1/validator.proto @@ -17,20 +17,42 @@ enum UVStatus { UV_STATUS_INACTIVE = 4; // No longer part of the validator set } +// Identity info for validator (chain-level) +message IdentityInfo { + option (amino.name) = "uvalidator/identity_info"; + option (gogoproto.equal) = true; + + string core_validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + string pubkey = 2; // Validator consensus public key +} + // Validator network metadata message NetworkInfo { + option (amino.name) = "uvalidator/network_info"; + option (gogoproto.equal) = true; + string ip = 1; // Node IP address } +// Lifecycle event info +message LifecycleEvent { + UVStatus status = 1; // Validator status at this point in time + int64 block_height = 2; // Block height when this status transition occurred +} + +// Validator lifecycle info +message LifecycleInfo { + UVStatus current_status = 1; // Current validator state + repeated LifecycleEvent history = 2; // Added to registry +} + // Core Universal Validator object message UniversalValidator { option (amino.name) = "uvalidator/universal_validator"; option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - string core_validator_address = 1; // Core validator address - string pubkey = 2; // Validator consensus public key - UVStatus status = 3; // Current lifecycle status - NetworkInfo network = 4; // Metadata for networking - int64 joined_at_block = 5; // Block height when added to UV set + IdentityInfo identify_info = 1; // Identity info of the validator + NetworkInfo network = 2; // Metadata for networking + LifecycleInfo lifecycle_info = 3; // Lifecyle info of the validator } \ No newline at end of file From 0ede86071534c40d41adcdea49f6856e595fffe9 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 6 Nov 2025 13:01:10 +0530 Subject: [PATCH 010/105] feat: added generated protobuf --- api/uvalidator/v1/validator.pulsar.go | 2268 +++++++++++++++++++++---- proto/uvalidator/v1/validator.proto | 2 +- x/uvalidator/types/validator.pb.go | 853 ++++++++-- 3 files changed, 2660 insertions(+), 463 deletions(-) diff --git a/api/uvalidator/v1/validator.pulsar.go b/api/uvalidator/v1/validator.pulsar.go index dec077a4..2f1c6f13 100644 --- a/api/uvalidator/v1/validator.pulsar.go +++ b/api/uvalidator/v1/validator.pulsar.go @@ -14,6 +14,490 @@ import ( sync "sync" ) +var ( + md_IdentityInfo protoreflect.MessageDescriptor + fd_IdentityInfo_core_validator_address protoreflect.FieldDescriptor + fd_IdentityInfo_pubkey protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_validator_proto_init() + md_IdentityInfo = File_uvalidator_v1_validator_proto.Messages().ByName("IdentityInfo") + fd_IdentityInfo_core_validator_address = md_IdentityInfo.Fields().ByName("core_validator_address") + fd_IdentityInfo_pubkey = md_IdentityInfo.Fields().ByName("pubkey") +} + +var _ protoreflect.Message = (*fastReflection_IdentityInfo)(nil) + +type fastReflection_IdentityInfo IdentityInfo + +func (x *IdentityInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_IdentityInfo)(x) +} + +func (x *IdentityInfo) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_validator_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_IdentityInfo_messageType fastReflection_IdentityInfo_messageType +var _ protoreflect.MessageType = fastReflection_IdentityInfo_messageType{} + +type fastReflection_IdentityInfo_messageType struct{} + +func (x fastReflection_IdentityInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_IdentityInfo)(nil) +} +func (x fastReflection_IdentityInfo_messageType) New() protoreflect.Message { + return new(fastReflection_IdentityInfo) +} +func (x fastReflection_IdentityInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_IdentityInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_IdentityInfo) Descriptor() protoreflect.MessageDescriptor { + return md_IdentityInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_IdentityInfo) Type() protoreflect.MessageType { + return _fastReflection_IdentityInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_IdentityInfo) New() protoreflect.Message { + return new(fastReflection_IdentityInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_IdentityInfo) Interface() protoreflect.ProtoMessage { + return (*IdentityInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_IdentityInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CoreValidatorAddress != "" { + value := protoreflect.ValueOfString(x.CoreValidatorAddress) + if !f(fd_IdentityInfo_core_validator_address, value) { + return + } + } + if x.Pubkey != "" { + value := protoreflect.ValueOfString(x.Pubkey) + if !f(fd_IdentityInfo_pubkey, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_IdentityInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.IdentityInfo.core_validator_address": + return x.CoreValidatorAddress != "" + case "uvalidator.v1.IdentityInfo.pubkey": + return x.Pubkey != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.IdentityInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentityInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.IdentityInfo.core_validator_address": + x.CoreValidatorAddress = "" + case "uvalidator.v1.IdentityInfo.pubkey": + x.Pubkey = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.IdentityInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_IdentityInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.IdentityInfo.core_validator_address": + value := x.CoreValidatorAddress + return protoreflect.ValueOfString(value) + case "uvalidator.v1.IdentityInfo.pubkey": + value := x.Pubkey + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.IdentityInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentityInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.IdentityInfo.core_validator_address": + x.CoreValidatorAddress = value.Interface().(string) + case "uvalidator.v1.IdentityInfo.pubkey": + x.Pubkey = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.IdentityInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentityInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.IdentityInfo.core_validator_address": + panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.IdentityInfo is not mutable")) + case "uvalidator.v1.IdentityInfo.pubkey": + panic(fmt.Errorf("field pubkey of message uvalidator.v1.IdentityInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.IdentityInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_IdentityInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.IdentityInfo.core_validator_address": + return protoreflect.ValueOfString("") + case "uvalidator.v1.IdentityInfo.pubkey": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.IdentityInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_IdentityInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.IdentityInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_IdentityInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_IdentityInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_IdentityInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_IdentityInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*IdentityInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.CoreValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Pubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*IdentityInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Pubkey) > 0 { + i -= len(x.Pubkey) + copy(dAtA[i:], x.Pubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pubkey))) + i-- + dAtA[i] = 0x12 + } + if len(x.CoreValidatorAddress) > 0 { + i -= len(x.CoreValidatorAddress) + copy(dAtA[i:], x.CoreValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoreValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*IdentityInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IdentityInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IdentityInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", 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.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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.Pubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_NetworkInfo protoreflect.MessageDescriptor fd_NetworkInfo_ip protoreflect.FieldDescriptor @@ -21,20 +505,945 @@ var ( func init() { file_uvalidator_v1_validator_proto_init() - md_NetworkInfo = File_uvalidator_v1_validator_proto.Messages().ByName("NetworkInfo") - fd_NetworkInfo_ip = md_NetworkInfo.Fields().ByName("ip") + md_NetworkInfo = File_uvalidator_v1_validator_proto.Messages().ByName("NetworkInfo") + fd_NetworkInfo_ip = md_NetworkInfo.Fields().ByName("ip") +} + +var _ protoreflect.Message = (*fastReflection_NetworkInfo)(nil) + +type fastReflection_NetworkInfo NetworkInfo + +func (x *NetworkInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_NetworkInfo)(x) +} + +func (x *NetworkInfo) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_validator_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_NetworkInfo_messageType fastReflection_NetworkInfo_messageType +var _ protoreflect.MessageType = fastReflection_NetworkInfo_messageType{} + +type fastReflection_NetworkInfo_messageType struct{} + +func (x fastReflection_NetworkInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_NetworkInfo)(nil) +} +func (x fastReflection_NetworkInfo_messageType) New() protoreflect.Message { + return new(fastReflection_NetworkInfo) +} +func (x fastReflection_NetworkInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_NetworkInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_NetworkInfo) Descriptor() protoreflect.MessageDescriptor { + return md_NetworkInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_NetworkInfo) Type() protoreflect.MessageType { + return _fastReflection_NetworkInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_NetworkInfo) New() protoreflect.Message { + return new(fastReflection_NetworkInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_NetworkInfo) Interface() protoreflect.ProtoMessage { + return (*NetworkInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_NetworkInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Ip != "" { + value := protoreflect.ValueOfString(x.Ip) + if !f(fd_NetworkInfo_ip, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_NetworkInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.ip": + return x.Ip != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_NetworkInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.ip": + x.Ip = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_NetworkInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.NetworkInfo.ip": + value := x.Ip + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_NetworkInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.ip": + x.Ip = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_NetworkInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.ip": + panic(fmt.Errorf("field ip of message uvalidator.v1.NetworkInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_NetworkInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.NetworkInfo.ip": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + } + panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_NetworkInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.NetworkInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_NetworkInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_NetworkInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_NetworkInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*NetworkInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Ip) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*NetworkInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Ip) > 0 { + i -= len(x.Ip) + copy(dAtA[i:], x.Ip) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Ip))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*NetworkInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NetworkInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NetworkInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Ip", 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.Ip = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_LifecycleEvent protoreflect.MessageDescriptor + fd_LifecycleEvent_status protoreflect.FieldDescriptor + fd_LifecycleEvent_block_height protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_validator_proto_init() + md_LifecycleEvent = File_uvalidator_v1_validator_proto.Messages().ByName("LifecycleEvent") + fd_LifecycleEvent_status = md_LifecycleEvent.Fields().ByName("status") + fd_LifecycleEvent_block_height = md_LifecycleEvent.Fields().ByName("block_height") +} + +var _ protoreflect.Message = (*fastReflection_LifecycleEvent)(nil) + +type fastReflection_LifecycleEvent LifecycleEvent + +func (x *LifecycleEvent) ProtoReflect() protoreflect.Message { + return (*fastReflection_LifecycleEvent)(x) +} + +func (x *LifecycleEvent) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_validator_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_LifecycleEvent_messageType fastReflection_LifecycleEvent_messageType +var _ protoreflect.MessageType = fastReflection_LifecycleEvent_messageType{} + +type fastReflection_LifecycleEvent_messageType struct{} + +func (x fastReflection_LifecycleEvent_messageType) Zero() protoreflect.Message { + return (*fastReflection_LifecycleEvent)(nil) +} +func (x fastReflection_LifecycleEvent_messageType) New() protoreflect.Message { + return new(fastReflection_LifecycleEvent) +} +func (x fastReflection_LifecycleEvent_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_LifecycleEvent +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_LifecycleEvent) Descriptor() protoreflect.MessageDescriptor { + return md_LifecycleEvent +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_LifecycleEvent) Type() protoreflect.MessageType { + return _fastReflection_LifecycleEvent_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_LifecycleEvent) New() protoreflect.Message { + return new(fastReflection_LifecycleEvent) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_LifecycleEvent) Interface() protoreflect.ProtoMessage { + return (*LifecycleEvent)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_LifecycleEvent) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Status != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) + if !f(fd_LifecycleEvent_status, value) { + return + } + } + if x.BlockHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.BlockHeight) + if !f(fd_LifecycleEvent_block_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_LifecycleEvent) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.LifecycleEvent.status": + return x.Status != 0 + case "uvalidator.v1.LifecycleEvent.block_height": + return x.BlockHeight != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleEvent")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleEvent does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_LifecycleEvent) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.LifecycleEvent.status": + x.Status = 0 + case "uvalidator.v1.LifecycleEvent.block_height": + x.BlockHeight = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleEvent")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleEvent does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_LifecycleEvent) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.LifecycleEvent.status": + value := x.Status + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "uvalidator.v1.LifecycleEvent.block_height": + value := x.BlockHeight + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleEvent")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleEvent does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_LifecycleEvent) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.LifecycleEvent.status": + x.Status = (UVStatus)(value.Enum()) + case "uvalidator.v1.LifecycleEvent.block_height": + x.BlockHeight = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleEvent")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleEvent does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_LifecycleEvent) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.LifecycleEvent.status": + panic(fmt.Errorf("field status of message uvalidator.v1.LifecycleEvent is not mutable")) + case "uvalidator.v1.LifecycleEvent.block_height": + panic(fmt.Errorf("field block_height of message uvalidator.v1.LifecycleEvent is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleEvent")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleEvent does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_LifecycleEvent) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.LifecycleEvent.status": + return protoreflect.ValueOfEnum(0) + case "uvalidator.v1.LifecycleEvent.block_height": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleEvent")) + } + panic(fmt.Errorf("message uvalidator.v1.LifecycleEvent does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_LifecycleEvent) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.LifecycleEvent", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_LifecycleEvent) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_LifecycleEvent) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_LifecycleEvent) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_LifecycleEvent) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*LifecycleEvent) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Status != 0 { + n += 1 + runtime.Sov(uint64(x.Status)) + } + if x.BlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.BlockHeight)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*LifecycleEvent) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.BlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) + i-- + dAtA[i] = 0x10 + } + if x.Status != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*LifecycleEvent) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LifecycleEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LifecycleEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + x.Status = 0 + 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++ + x.Status |= UVStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + x.BlockHeight = 0 + 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++ + x.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_LifecycleInfo_2_list)(nil) + +type _LifecycleInfo_2_list struct { + list *[]*LifecycleEvent +} + +func (x *_LifecycleInfo_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_LifecycleInfo_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_LifecycleInfo_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*LifecycleEvent) + (*x.list)[i] = concreteValue +} + +func (x *_LifecycleInfo_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*LifecycleEvent) + *x.list = append(*x.list, concreteValue) +} + +func (x *_LifecycleInfo_2_list) AppendMutable() protoreflect.Value { + v := new(LifecycleEvent) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_LifecycleInfo_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_LifecycleInfo_2_list) NewElement() protoreflect.Value { + v := new(LifecycleEvent) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_LifecycleInfo_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_LifecycleInfo protoreflect.MessageDescriptor + fd_LifecycleInfo_current_status protoreflect.FieldDescriptor + fd_LifecycleInfo_history protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_validator_proto_init() + md_LifecycleInfo = File_uvalidator_v1_validator_proto.Messages().ByName("LifecycleInfo") + fd_LifecycleInfo_current_status = md_LifecycleInfo.Fields().ByName("current_status") + fd_LifecycleInfo_history = md_LifecycleInfo.Fields().ByName("history") } -var _ protoreflect.Message = (*fastReflection_NetworkInfo)(nil) +var _ protoreflect.Message = (*fastReflection_LifecycleInfo)(nil) -type fastReflection_NetworkInfo NetworkInfo +type fastReflection_LifecycleInfo LifecycleInfo -func (x *NetworkInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_NetworkInfo)(x) +func (x *LifecycleInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_LifecycleInfo)(x) } -func (x *NetworkInfo) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_validator_proto_msgTypes[0] +func (x *LifecycleInfo) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_validator_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -45,43 +1454,43 @@ func (x *NetworkInfo) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_NetworkInfo_messageType fastReflection_NetworkInfo_messageType -var _ protoreflect.MessageType = fastReflection_NetworkInfo_messageType{} +var _fastReflection_LifecycleInfo_messageType fastReflection_LifecycleInfo_messageType +var _ protoreflect.MessageType = fastReflection_LifecycleInfo_messageType{} -type fastReflection_NetworkInfo_messageType struct{} +type fastReflection_LifecycleInfo_messageType struct{} -func (x fastReflection_NetworkInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_NetworkInfo)(nil) +func (x fastReflection_LifecycleInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_LifecycleInfo)(nil) } -func (x fastReflection_NetworkInfo_messageType) New() protoreflect.Message { - return new(fastReflection_NetworkInfo) +func (x fastReflection_LifecycleInfo_messageType) New() protoreflect.Message { + return new(fastReflection_LifecycleInfo) } -func (x fastReflection_NetworkInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_NetworkInfo +func (x fastReflection_LifecycleInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_LifecycleInfo } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_NetworkInfo) Descriptor() protoreflect.MessageDescriptor { - return md_NetworkInfo +func (x *fastReflection_LifecycleInfo) Descriptor() protoreflect.MessageDescriptor { + return md_LifecycleInfo } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_NetworkInfo) Type() protoreflect.MessageType { - return _fastReflection_NetworkInfo_messageType +func (x *fastReflection_LifecycleInfo) Type() protoreflect.MessageType { + return _fastReflection_LifecycleInfo_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_NetworkInfo) New() protoreflect.Message { - return new(fastReflection_NetworkInfo) +func (x *fastReflection_LifecycleInfo) New() protoreflect.Message { + return new(fastReflection_LifecycleInfo) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_NetworkInfo) Interface() protoreflect.ProtoMessage { - return (*NetworkInfo)(x) +func (x *fastReflection_LifecycleInfo) Interface() protoreflect.ProtoMessage { + return (*LifecycleInfo)(x) } // Range iterates over every populated field in an undefined order, @@ -89,10 +1498,16 @@ func (x *fastReflection_NetworkInfo) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_NetworkInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Ip != "" { - value := protoreflect.ValueOfString(x.Ip) - if !f(fd_NetworkInfo_ip, value) { +func (x *fastReflection_LifecycleInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CurrentStatus != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.CurrentStatus)) + if !f(fd_LifecycleInfo_current_status, value) { + return + } + } + if len(x.History) != 0 { + value := protoreflect.ValueOfList(&_LifecycleInfo_2_list{list: &x.History}) + if !f(fd_LifecycleInfo_history, value) { return } } @@ -109,15 +1524,17 @@ func (x *fastReflection_NetworkInfo) Range(f func(protoreflect.FieldDescriptor, // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_NetworkInfo) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_LifecycleInfo) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "uvalidator.v1.NetworkInfo.ip": - return x.Ip != "" + case "uvalidator.v1.LifecycleInfo.current_status": + return x.CurrentStatus != 0 + case "uvalidator.v1.LifecycleInfo.history": + return len(x.History) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleInfo")) } - panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.LifecycleInfo does not contain field %s", fd.FullName())) } } @@ -127,15 +1544,17 @@ func (x *fastReflection_NetworkInfo) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NetworkInfo) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_LifecycleInfo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "uvalidator.v1.NetworkInfo.ip": - x.Ip = "" + case "uvalidator.v1.LifecycleInfo.current_status": + x.CurrentStatus = 0 + case "uvalidator.v1.LifecycleInfo.history": + x.History = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleInfo")) } - panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.LifecycleInfo does not contain field %s", fd.FullName())) } } @@ -145,16 +1564,22 @@ func (x *fastReflection_NetworkInfo) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_NetworkInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_LifecycleInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "uvalidator.v1.NetworkInfo.ip": - value := x.Ip - return protoreflect.ValueOfString(value) + case "uvalidator.v1.LifecycleInfo.current_status": + value := x.CurrentStatus + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "uvalidator.v1.LifecycleInfo.history": + if len(x.History) == 0 { + return protoreflect.ValueOfList(&_LifecycleInfo_2_list{}) + } + listValue := &_LifecycleInfo_2_list{list: &x.History} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleInfo")) } - panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message uvalidator.v1.LifecycleInfo does not contain field %s", descriptor.FullName())) } } @@ -168,15 +1593,19 @@ func (x *fastReflection_NetworkInfo) Get(descriptor protoreflect.FieldDescriptor // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NetworkInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_LifecycleInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "uvalidator.v1.NetworkInfo.ip": - x.Ip = value.Interface().(string) + case "uvalidator.v1.LifecycleInfo.current_status": + x.CurrentStatus = (UVStatus)(value.Enum()) + case "uvalidator.v1.LifecycleInfo.history": + lv := value.List() + clv := lv.(*_LifecycleInfo_2_list) + x.History = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleInfo")) } - panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.LifecycleInfo does not contain field %s", fd.FullName())) } } @@ -190,40 +1619,49 @@ func (x *fastReflection_NetworkInfo) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NetworkInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_LifecycleInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uvalidator.v1.NetworkInfo.ip": - panic(fmt.Errorf("field ip of message uvalidator.v1.NetworkInfo is not mutable")) + case "uvalidator.v1.LifecycleInfo.history": + if x.History == nil { + x.History = []*LifecycleEvent{} + } + value := &_LifecycleInfo_2_list{list: &x.History} + return protoreflect.ValueOfList(value) + case "uvalidator.v1.LifecycleInfo.current_status": + panic(fmt.Errorf("field current_status of message uvalidator.v1.LifecycleInfo is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleInfo")) } - panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.LifecycleInfo does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_NetworkInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_LifecycleInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uvalidator.v1.NetworkInfo.ip": - return protoreflect.ValueOfString("") + case "uvalidator.v1.LifecycleInfo.current_status": + return protoreflect.ValueOfEnum(0) + case "uvalidator.v1.LifecycleInfo.history": + list := []*LifecycleEvent{} + return protoreflect.ValueOfList(&_LifecycleInfo_2_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.LifecycleInfo")) } - panic(fmt.Errorf("message uvalidator.v1.NetworkInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uvalidator.v1.LifecycleInfo does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_NetworkInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_LifecycleInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.NetworkInfo", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.LifecycleInfo", d.FullName())) } panic("unreachable") } @@ -231,7 +1669,7 @@ func (x *fastReflection_NetworkInfo) WhichOneof(d protoreflect.OneofDescriptor) // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_NetworkInfo) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_LifecycleInfo) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -242,7 +1680,7 @@ func (x *fastReflection_NetworkInfo) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NetworkInfo) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_LifecycleInfo) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -254,7 +1692,7 @@ func (x *fastReflection_NetworkInfo) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_NetworkInfo) IsValid() bool { +func (x *fastReflection_LifecycleInfo) IsValid() bool { return x != nil } @@ -264,9 +1702,9 @@ func (x *fastReflection_NetworkInfo) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_LifecycleInfo) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*NetworkInfo) + x := input.Message.Interface().(*LifecycleInfo) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -278,9 +1716,14 @@ func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Ip) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.CurrentStatus != 0 { + n += 1 + runtime.Sov(uint64(x.CurrentStatus)) + } + if len(x.History) > 0 { + for _, e := range x.History { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.unknownFields != nil { n += len(x.unknownFields) @@ -292,7 +1735,7 @@ func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*NetworkInfo) + x := input.Message.Interface().(*LifecycleInfo) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -311,12 +1754,26 @@ func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Ip) > 0 { - i -= len(x.Ip) - copy(dAtA[i:], x.Ip) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Ip))) + if len(x.History) > 0 { + for iNdEx := len(x.History) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.History[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if x.CurrentStatus != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CurrentStatus)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -329,7 +1786,7 @@ func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*NetworkInfo) + x := input.Message.Interface().(*LifecycleInfo) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -361,17 +1818,36 @@ func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NetworkInfo: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LifecycleInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NetworkInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LifecycleInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentStatus", wireType) + } + x.CurrentStatus = 0 + 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++ + x.CurrentStatus |= UVStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field History", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -381,23 +1857,25 @@ func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen 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.Ip = string(dAtA[iNdEx:postIndex]) + x.History = append(x.History, &LifecycleEvent{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.History[len(x.History)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex default: iNdEx = preIndex @@ -435,22 +1913,18 @@ func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { } var ( - md_UniversalValidator protoreflect.MessageDescriptor - fd_UniversalValidator_core_validator_address protoreflect.FieldDescriptor - fd_UniversalValidator_pubkey protoreflect.FieldDescriptor - fd_UniversalValidator_status protoreflect.FieldDescriptor - fd_UniversalValidator_network protoreflect.FieldDescriptor - fd_UniversalValidator_joined_at_block protoreflect.FieldDescriptor + md_UniversalValidator protoreflect.MessageDescriptor + fd_UniversalValidator_identify_info protoreflect.FieldDescriptor + fd_UniversalValidator_network protoreflect.FieldDescriptor + fd_UniversalValidator_lifecycle_info protoreflect.FieldDescriptor ) func init() { file_uvalidator_v1_validator_proto_init() md_UniversalValidator = File_uvalidator_v1_validator_proto.Messages().ByName("UniversalValidator") - fd_UniversalValidator_core_validator_address = md_UniversalValidator.Fields().ByName("core_validator_address") - fd_UniversalValidator_pubkey = md_UniversalValidator.Fields().ByName("pubkey") - fd_UniversalValidator_status = md_UniversalValidator.Fields().ByName("status") + fd_UniversalValidator_identify_info = md_UniversalValidator.Fields().ByName("identify_info") fd_UniversalValidator_network = md_UniversalValidator.Fields().ByName("network") - fd_UniversalValidator_joined_at_block = md_UniversalValidator.Fields().ByName("joined_at_block") + fd_UniversalValidator_lifecycle_info = md_UniversalValidator.Fields().ByName("lifecycle_info") } var _ protoreflect.Message = (*fastReflection_UniversalValidator)(nil) @@ -462,7 +1936,7 @@ func (x *UniversalValidator) ProtoReflect() protoreflect.Message { } func (x *UniversalValidator) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_validator_proto_msgTypes[1] + mi := &file_uvalidator_v1_validator_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -518,21 +1992,9 @@ func (x *fastReflection_UniversalValidator) Interface() protoreflect.ProtoMessag // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UniversalValidator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CoreValidatorAddress != "" { - value := protoreflect.ValueOfString(x.CoreValidatorAddress) - if !f(fd_UniversalValidator_core_validator_address, value) { - return - } - } - if x.Pubkey != "" { - value := protoreflect.ValueOfString(x.Pubkey) - if !f(fd_UniversalValidator_pubkey, value) { - return - } - } - if x.Status != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) - if !f(fd_UniversalValidator_status, value) { + if x.IdentifyInfo != nil { + value := protoreflect.ValueOfMessage(x.IdentifyInfo.ProtoReflect()) + if !f(fd_UniversalValidator_identify_info, value) { return } } @@ -542,9 +2004,9 @@ func (x *fastReflection_UniversalValidator) Range(f func(protoreflect.FieldDescr return } } - if x.JoinedAtBlock != int64(0) { - value := protoreflect.ValueOfInt64(x.JoinedAtBlock) - if !f(fd_UniversalValidator_joined_at_block, value) { + if x.LifecycleInfo != nil { + value := protoreflect.ValueOfMessage(x.LifecycleInfo.ProtoReflect()) + if !f(fd_UniversalValidator_lifecycle_info, value) { return } } @@ -563,16 +2025,12 @@ func (x *fastReflection_UniversalValidator) Range(f func(protoreflect.FieldDescr // a repeated field is populated if it is non-empty. func (x *fastReflection_UniversalValidator) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "uvalidator.v1.UniversalValidator.core_validator_address": - return x.CoreValidatorAddress != "" - case "uvalidator.v1.UniversalValidator.pubkey": - return x.Pubkey != "" - case "uvalidator.v1.UniversalValidator.status": - return x.Status != 0 + case "uvalidator.v1.UniversalValidator.identify_info": + return x.IdentifyInfo != nil case "uvalidator.v1.UniversalValidator.network": return x.Network != nil - case "uvalidator.v1.UniversalValidator.joined_at_block": - return x.JoinedAtBlock != int64(0) + case "uvalidator.v1.UniversalValidator.lifecycle_info": + return x.LifecycleInfo != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) @@ -589,16 +2047,12 @@ func (x *fastReflection_UniversalValidator) Has(fd protoreflect.FieldDescriptor) // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UniversalValidator) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "uvalidator.v1.UniversalValidator.core_validator_address": - x.CoreValidatorAddress = "" - case "uvalidator.v1.UniversalValidator.pubkey": - x.Pubkey = "" - case "uvalidator.v1.UniversalValidator.status": - x.Status = 0 + case "uvalidator.v1.UniversalValidator.identify_info": + x.IdentifyInfo = nil case "uvalidator.v1.UniversalValidator.network": x.Network = nil - case "uvalidator.v1.UniversalValidator.joined_at_block": - x.JoinedAtBlock = int64(0) + case "uvalidator.v1.UniversalValidator.lifecycle_info": + x.LifecycleInfo = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) @@ -615,21 +2069,15 @@ func (x *fastReflection_UniversalValidator) Clear(fd protoreflect.FieldDescripto // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UniversalValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "uvalidator.v1.UniversalValidator.core_validator_address": - value := x.CoreValidatorAddress - return protoreflect.ValueOfString(value) - case "uvalidator.v1.UniversalValidator.pubkey": - value := x.Pubkey - return protoreflect.ValueOfString(value) - case "uvalidator.v1.UniversalValidator.status": - value := x.Status - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "uvalidator.v1.UniversalValidator.identify_info": + value := x.IdentifyInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) case "uvalidator.v1.UniversalValidator.network": value := x.Network return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "uvalidator.v1.UniversalValidator.joined_at_block": - value := x.JoinedAtBlock - return protoreflect.ValueOfInt64(value) + case "uvalidator.v1.UniversalValidator.lifecycle_info": + value := x.LifecycleInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) @@ -650,16 +2098,12 @@ func (x *fastReflection_UniversalValidator) Get(descriptor protoreflect.FieldDes // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UniversalValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "uvalidator.v1.UniversalValidator.core_validator_address": - x.CoreValidatorAddress = value.Interface().(string) - case "uvalidator.v1.UniversalValidator.pubkey": - x.Pubkey = value.Interface().(string) - case "uvalidator.v1.UniversalValidator.status": - x.Status = (UVStatus)(value.Enum()) + case "uvalidator.v1.UniversalValidator.identify_info": + x.IdentifyInfo = value.Message().Interface().(*IdentityInfo) case "uvalidator.v1.UniversalValidator.network": x.Network = value.Message().Interface().(*NetworkInfo) - case "uvalidator.v1.UniversalValidator.joined_at_block": - x.JoinedAtBlock = value.Int() + case "uvalidator.v1.UniversalValidator.lifecycle_info": + x.LifecycleInfo = value.Message().Interface().(*LifecycleInfo) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) @@ -680,19 +2124,21 @@ func (x *fastReflection_UniversalValidator) Set(fd protoreflect.FieldDescriptor, // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UniversalValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "uvalidator.v1.UniversalValidator.identify_info": + if x.IdentifyInfo == nil { + x.IdentifyInfo = new(IdentityInfo) + } + return protoreflect.ValueOfMessage(x.IdentifyInfo.ProtoReflect()) case "uvalidator.v1.UniversalValidator.network": if x.Network == nil { x.Network = new(NetworkInfo) } return protoreflect.ValueOfMessage(x.Network.ProtoReflect()) - case "uvalidator.v1.UniversalValidator.core_validator_address": - panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.UniversalValidator is not mutable")) - case "uvalidator.v1.UniversalValidator.pubkey": - panic(fmt.Errorf("field pubkey of message uvalidator.v1.UniversalValidator is not mutable")) - case "uvalidator.v1.UniversalValidator.status": - panic(fmt.Errorf("field status of message uvalidator.v1.UniversalValidator is not mutable")) - case "uvalidator.v1.UniversalValidator.joined_at_block": - panic(fmt.Errorf("field joined_at_block of message uvalidator.v1.UniversalValidator is not mutable")) + case "uvalidator.v1.UniversalValidator.lifecycle_info": + if x.LifecycleInfo == nil { + x.LifecycleInfo = new(LifecycleInfo) + } + return protoreflect.ValueOfMessage(x.LifecycleInfo.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) @@ -706,17 +2152,15 @@ func (x *fastReflection_UniversalValidator) Mutable(fd protoreflect.FieldDescrip // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UniversalValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uvalidator.v1.UniversalValidator.core_validator_address": - return protoreflect.ValueOfString("") - case "uvalidator.v1.UniversalValidator.pubkey": - return protoreflect.ValueOfString("") - case "uvalidator.v1.UniversalValidator.status": - return protoreflect.ValueOfEnum(0) + case "uvalidator.v1.UniversalValidator.identify_info": + m := new(IdentityInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) case "uvalidator.v1.UniversalValidator.network": m := new(NetworkInfo) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "uvalidator.v1.UniversalValidator.joined_at_block": - return protoreflect.ValueOfInt64(int64(0)) + case "uvalidator.v1.UniversalValidator.lifecycle_info": + m := new(LifecycleInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.UniversalValidator")) @@ -786,23 +2230,17 @@ func (x *fastReflection_UniversalValidator) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.CoreValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Pubkey) - if l > 0 { + if x.IdentifyInfo != nil { + l = options.Size(x.IdentifyInfo) n += 1 + l + runtime.Sov(uint64(l)) } - if x.Status != 0 { - n += 1 + runtime.Sov(uint64(x.Status)) - } if x.Network != nil { l = options.Size(x.Network) n += 1 + l + runtime.Sov(uint64(l)) } - if x.JoinedAtBlock != 0 { - n += 1 + runtime.Sov(uint64(x.JoinedAtBlock)) + if x.LifecycleInfo != nil { + l = options.Size(x.LifecycleInfo) + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -833,10 +2271,19 @@ func (x *fastReflection_UniversalValidator) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.JoinedAtBlock != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.JoinedAtBlock)) + if x.LifecycleInfo != nil { + encoded, err := options.Marshal(x.LifecycleInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x1a } if x.Network != nil { encoded, err := options.Marshal(x.Network) @@ -850,24 +2297,19 @@ func (x *fastReflection_UniversalValidator) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x22 - } - if x.Status != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) - i-- - dAtA[i] = 0x18 - } - if len(x.Pubkey) > 0 { - i -= len(x.Pubkey) - copy(dAtA[i:], x.Pubkey) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pubkey))) - i-- dAtA[i] = 0x12 } - if len(x.CoreValidatorAddress) > 0 { - i -= len(x.CoreValidatorAddress) - copy(dAtA[i:], x.CoreValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoreValidatorAddress))) + if x.IdentifyInfo != nil { + encoded, err := options.Marshal(x.IdentifyInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } @@ -922,9 +2364,9 @@ func (x *fastReflection_UniversalValidator) ProtoMethods() *protoiface.Methods { switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IdentifyInfo", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -934,29 +2376,33 @@ func (x *fastReflection_UniversalValidator) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen 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.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + if x.IdentifyInfo == nil { + x.IdentifyInfo = &IdentityInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.IdentifyInfo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -966,46 +2412,31 @@ func (x *fastReflection_UniversalValidator) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen 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.Pubkey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + if x.Network == nil { + x.Network = &NetworkInfo{} } - x.Status = 0 - 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++ - x.Status |= UVStatus(b&0x7F) << shift - if b < 0x80 { - break - } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Network); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - case 4: + iNdEx = postIndex + case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LifecycleInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1032,32 +2463,13 @@ func (x *fastReflection_UniversalValidator) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Network == nil { - x.Network = &NetworkInfo{} + if x.LifecycleInfo == nil { + x.LifecycleInfo = &LifecycleInfo{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Network); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LifecycleInfo); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field JoinedAtBlock", wireType) - } - x.JoinedAtBlock = 0 - 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++ - x.JoinedAtBlock |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1162,6 +2574,50 @@ func (UVStatus) EnumDescriptor() ([]byte, []int) { return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{0} } +// Identity info for validator (chain-level) +type IdentityInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` // Core validator address + Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` // Validator consensus public key +} + +func (x *IdentityInfo) Reset() { + *x = IdentityInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_validator_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IdentityInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdentityInfo) ProtoMessage() {} + +// Deprecated: Use IdentityInfo.ProtoReflect.Descriptor instead. +func (*IdentityInfo) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{0} +} + +func (x *IdentityInfo) GetCoreValidatorAddress() string { + if x != nil { + return x.CoreValidatorAddress + } + return "" +} + +func (x *IdentityInfo) GetPubkey() string { + if x != nil { + return x.Pubkey + } + return "" +} + // Validator network metadata type NetworkInfo struct { state protoimpl.MessageState @@ -1174,7 +2630,7 @@ type NetworkInfo struct { func (x *NetworkInfo) Reset() { *x = NetworkInfo{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_validator_proto_msgTypes[0] + mi := &file_uvalidator_v1_validator_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1188,7 +2644,7 @@ func (*NetworkInfo) ProtoMessage() {} // Deprecated: Use NetworkInfo.ProtoReflect.Descriptor instead. func (*NetworkInfo) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{0} + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{1} } func (x *NetworkInfo) GetIp() string { @@ -1198,60 +2654,132 @@ func (x *NetworkInfo) GetIp() string { return "" } -// Core Universal Validator object -type UniversalValidator struct { +// Lifecycle event info +type LifecycleEvent struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` // Core validator address - Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` // Validator consensus public key - Status UVStatus `protobuf:"varint,3,opt,name=status,proto3,enum=uvalidator.v1.UVStatus" json:"status,omitempty"` // Current lifecycle status - Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` // Metadata for networking - JoinedAtBlock int64 `protobuf:"varint,5,opt,name=joined_at_block,json=joinedAtBlock,proto3" json:"joined_at_block,omitempty"` // Block height when added to UV set + Status UVStatus `protobuf:"varint,1,opt,name=status,proto3,enum=uvalidator.v1.UVStatus" json:"status,omitempty"` // Validator status at this point in time + BlockHeight int64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // Block height when this status transition occurred } -func (x *UniversalValidator) Reset() { - *x = UniversalValidator{} +func (x *LifecycleEvent) Reset() { + *x = LifecycleEvent{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_validator_proto_msgTypes[1] + mi := &file_uvalidator_v1_validator_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *UniversalValidator) String() string { +func (x *LifecycleEvent) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UniversalValidator) ProtoMessage() {} +func (*LifecycleEvent) ProtoMessage() {} -// Deprecated: Use UniversalValidator.ProtoReflect.Descriptor instead. -func (*UniversalValidator) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{1} +// Deprecated: Use LifecycleEvent.ProtoReflect.Descriptor instead. +func (*LifecycleEvent) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{2} } -func (x *UniversalValidator) GetCoreValidatorAddress() string { +func (x *LifecycleEvent) GetStatus() UVStatus { if x != nil { - return x.CoreValidatorAddress + return x.Status } - return "" + return UVStatus_UV_STATUS_UNSPECIFIED } -func (x *UniversalValidator) GetPubkey() string { +func (x *LifecycleEvent) GetBlockHeight() int64 { if x != nil { - return x.Pubkey + return x.BlockHeight } - return "" + return 0 +} + +// Validator lifecycle info +type LifecycleInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CurrentStatus UVStatus `protobuf:"varint,1,opt,name=current_status,json=currentStatus,proto3,enum=uvalidator.v1.UVStatus" json:"current_status,omitempty"` // Current validator state + History []*LifecycleEvent `protobuf:"bytes,2,rep,name=history,proto3" json:"history,omitempty"` // Added to registry +} + +func (x *LifecycleInfo) Reset() { + *x = LifecycleInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_validator_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LifecycleInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LifecycleInfo) ProtoMessage() {} + +// Deprecated: Use LifecycleInfo.ProtoReflect.Descriptor instead. +func (*LifecycleInfo) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{3} } -func (x *UniversalValidator) GetStatus() UVStatus { +func (x *LifecycleInfo) GetCurrentStatus() UVStatus { if x != nil { - return x.Status + return x.CurrentStatus } return UVStatus_UV_STATUS_UNSPECIFIED } +func (x *LifecycleInfo) GetHistory() []*LifecycleEvent { + if x != nil { + return x.History + } + return nil +} + +// Core Universal Validator object +type UniversalValidator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IdentifyInfo *IdentityInfo `protobuf:"bytes,1,opt,name=identify_info,json=identifyInfo,proto3" json:"identify_info,omitempty"` // Identity info of the validator + Network *NetworkInfo `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` // Metadata for networking + LifecycleInfo *LifecycleInfo `protobuf:"bytes,3,opt,name=lifecycle_info,json=lifecycleInfo,proto3" json:"lifecycle_info,omitempty"` // Lifecyle info of the validator +} + +func (x *UniversalValidator) Reset() { + *x = UniversalValidator{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_validator_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UniversalValidator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UniversalValidator) ProtoMessage() {} + +// Deprecated: Use UniversalValidator.ProtoReflect.Descriptor instead. +func (*UniversalValidator) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{4} +} + +func (x *UniversalValidator) GetIdentifyInfo() *IdentityInfo { + if x != nil { + return x.IdentifyInfo + } + return nil +} + func (x *UniversalValidator) GetNetwork() *NetworkInfo { if x != nil { return x.Network @@ -1259,11 +2787,11 @@ func (x *UniversalValidator) GetNetwork() *NetworkInfo { return nil } -func (x *UniversalValidator) GetJoinedAtBlock() int64 { +func (x *UniversalValidator) GetLifecycleInfo() *LifecycleInfo { if x != nil { - return x.JoinedAtBlock + return x.LifecycleInfo } - return 0 + return nil } var File_uvalidator_v1_validator_proto protoreflect.FileDescriptor @@ -1274,51 +2802,72 @@ var file_uvalidator_v1_validator_proto_rawDesc = []byte{ 0x0d, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3f, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x3a, 0x20, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, - 0x17, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x9e, 0x02, 0x0a, 0x12, 0x55, 0x6e, 0x69, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2f, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, - 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x56, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x34, - 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x26, 0x0a, 0x0f, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x61, - 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x6a, - 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x41, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x2b, 0x98, 0xa0, - 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2a, 0x92, 0x01, 0x0a, 0x08, 0x55, 0x56, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, - 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x56, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4a, 0x4f, 0x49, - 0x4e, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x03, - 0x12, 0x16, 0x0a, 0x12, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, - 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xbd, - 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, - 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, - 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, - 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7f, 0x0a, 0x0c, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x75, 0x62, 0x6b, 0x65, 0x79, 0x3a, 0x21, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, + 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x3f, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x3a, 0x20, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, + 0x2a, 0x17, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x64, 0x0a, 0x0e, 0x4c, 0x69, 0x66, + 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x75, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x56, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, + 0x88, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x3e, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x75, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x37, 0x0a, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x22, 0xfe, 0x01, 0x0a, 0x12, 0x55, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x40, 0x0a, 0x0d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x43, 0x0a, 0x0e, 0x6c, 0x69, 0x66, + 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x0d, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x2b, + 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2a, 0x92, 0x01, 0x0a, 0x08, + 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x56, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x56, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4a, + 0x4f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x45, 0x41, 0x56, 0x45, + 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, + 0x42, 0xbd, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, + 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, + 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1334,20 +2883,27 @@ func file_uvalidator_v1_validator_proto_rawDescGZIP() []byte { } var file_uvalidator_v1_validator_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_uvalidator_v1_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_uvalidator_v1_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_uvalidator_v1_validator_proto_goTypes = []interface{}{ (UVStatus)(0), // 0: uvalidator.v1.UVStatus - (*NetworkInfo)(nil), // 1: uvalidator.v1.NetworkInfo - (*UniversalValidator)(nil), // 2: uvalidator.v1.UniversalValidator + (*IdentityInfo)(nil), // 1: uvalidator.v1.IdentityInfo + (*NetworkInfo)(nil), // 2: uvalidator.v1.NetworkInfo + (*LifecycleEvent)(nil), // 3: uvalidator.v1.LifecycleEvent + (*LifecycleInfo)(nil), // 4: uvalidator.v1.LifecycleInfo + (*UniversalValidator)(nil), // 5: uvalidator.v1.UniversalValidator } var file_uvalidator_v1_validator_proto_depIdxs = []int32{ - 0, // 0: uvalidator.v1.UniversalValidator.status:type_name -> uvalidator.v1.UVStatus - 1, // 1: uvalidator.v1.UniversalValidator.network:type_name -> uvalidator.v1.NetworkInfo - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 0, // 0: uvalidator.v1.LifecycleEvent.status:type_name -> uvalidator.v1.UVStatus + 0, // 1: uvalidator.v1.LifecycleInfo.current_status:type_name -> uvalidator.v1.UVStatus + 3, // 2: uvalidator.v1.LifecycleInfo.history:type_name -> uvalidator.v1.LifecycleEvent + 1, // 3: uvalidator.v1.UniversalValidator.identify_info:type_name -> uvalidator.v1.IdentityInfo + 2, // 4: uvalidator.v1.UniversalValidator.network:type_name -> uvalidator.v1.NetworkInfo + 4, // 5: uvalidator.v1.UniversalValidator.lifecycle_info:type_name -> uvalidator.v1.LifecycleInfo + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_uvalidator_v1_validator_proto_init() } @@ -1357,7 +2913,7 @@ func file_uvalidator_v1_validator_proto_init() { } if !protoimpl.UnsafeEnabled { file_uvalidator_v1_validator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NetworkInfo); i { + switch v := v.(*IdentityInfo); i { case 0: return &v.state case 1: @@ -1369,6 +2925,42 @@ func file_uvalidator_v1_validator_proto_init() { } } file_uvalidator_v1_validator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_validator_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LifecycleEvent); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_validator_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LifecycleInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_validator_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UniversalValidator); i { case 0: return &v.state @@ -1387,7 +2979,7 @@ func file_uvalidator_v1_validator_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_uvalidator_v1_validator_proto_rawDesc, NumEnums: 1, - NumMessages: 2, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/uvalidator/v1/validator.proto b/proto/uvalidator/v1/validator.proto index 221b766b..738e8898 100644 --- a/proto/uvalidator/v1/validator.proto +++ b/proto/uvalidator/v1/validator.proto @@ -22,7 +22,7 @@ message IdentityInfo { option (amino.name) = "uvalidator/identity_info"; option (gogoproto.equal) = true; - string core_validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + string core_validator_address = 1; // Core validator address string pubkey = 2; // Validator consensus public key } diff --git a/x/uvalidator/types/validator.pb.go b/x/uvalidator/types/validator.pb.go index a7580086..835a471d 100644 --- a/x/uvalidator/types/validator.pb.go +++ b/x/uvalidator/types/validator.pb.go @@ -59,6 +59,59 @@ func (UVStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptor_317d9e276ec46d00, []int{0} } +// Identity info for validator (chain-level) +type IdentityInfo struct { + CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` + Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` +} + +func (m *IdentityInfo) Reset() { *m = IdentityInfo{} } +func (m *IdentityInfo) String() string { return proto.CompactTextString(m) } +func (*IdentityInfo) ProtoMessage() {} +func (*IdentityInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_317d9e276ec46d00, []int{0} +} +func (m *IdentityInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IdentityInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IdentityInfo.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 *IdentityInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_IdentityInfo.Merge(m, src) +} +func (m *IdentityInfo) XXX_Size() int { + return m.Size() +} +func (m *IdentityInfo) XXX_DiscardUnknown() { + xxx_messageInfo_IdentityInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_IdentityInfo proto.InternalMessageInfo + +func (m *IdentityInfo) GetCoreValidatorAddress() string { + if m != nil { + return m.CoreValidatorAddress + } + return "" +} + +func (m *IdentityInfo) GetPubkey() string { + if m != nil { + return m.Pubkey + } + return "" +} + // Validator network metadata type NetworkInfo struct { Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` @@ -68,7 +121,7 @@ func (m *NetworkInfo) Reset() { *m = NetworkInfo{} } func (m *NetworkInfo) String() string { return proto.CompactTextString(m) } func (*NetworkInfo) ProtoMessage() {} func (*NetworkInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_317d9e276ec46d00, []int{0} + return fileDescriptor_317d9e276ec46d00, []int{1} } func (m *NetworkInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -104,19 +157,123 @@ func (m *NetworkInfo) GetIp() string { return "" } +// Lifecycle event info +type LifecycleEvent struct { + Status UVStatus `protobuf:"varint,1,opt,name=status,proto3,enum=uvalidator.v1.UVStatus" json:"status,omitempty"` + BlockHeight int64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` +} + +func (m *LifecycleEvent) Reset() { *m = LifecycleEvent{} } +func (m *LifecycleEvent) String() string { return proto.CompactTextString(m) } +func (*LifecycleEvent) ProtoMessage() {} +func (*LifecycleEvent) Descriptor() ([]byte, []int) { + return fileDescriptor_317d9e276ec46d00, []int{2} +} +func (m *LifecycleEvent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LifecycleEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LifecycleEvent.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 *LifecycleEvent) XXX_Merge(src proto.Message) { + xxx_messageInfo_LifecycleEvent.Merge(m, src) +} +func (m *LifecycleEvent) XXX_Size() int { + return m.Size() +} +func (m *LifecycleEvent) XXX_DiscardUnknown() { + xxx_messageInfo_LifecycleEvent.DiscardUnknown(m) +} + +var xxx_messageInfo_LifecycleEvent proto.InternalMessageInfo + +func (m *LifecycleEvent) GetStatus() UVStatus { + if m != nil { + return m.Status + } + return UVStatus_UV_STATUS_UNSPECIFIED +} + +func (m *LifecycleEvent) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +// Validator lifecycle info +type LifecycleInfo struct { + CurrentStatus UVStatus `protobuf:"varint,1,opt,name=current_status,json=currentStatus,proto3,enum=uvalidator.v1.UVStatus" json:"current_status,omitempty"` + History []*LifecycleEvent `protobuf:"bytes,2,rep,name=history,proto3" json:"history,omitempty"` +} + +func (m *LifecycleInfo) Reset() { *m = LifecycleInfo{} } +func (m *LifecycleInfo) String() string { return proto.CompactTextString(m) } +func (*LifecycleInfo) ProtoMessage() {} +func (*LifecycleInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_317d9e276ec46d00, []int{3} +} +func (m *LifecycleInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LifecycleInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LifecycleInfo.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 *LifecycleInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_LifecycleInfo.Merge(m, src) +} +func (m *LifecycleInfo) XXX_Size() int { + return m.Size() +} +func (m *LifecycleInfo) XXX_DiscardUnknown() { + xxx_messageInfo_LifecycleInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_LifecycleInfo proto.InternalMessageInfo + +func (m *LifecycleInfo) GetCurrentStatus() UVStatus { + if m != nil { + return m.CurrentStatus + } + return UVStatus_UV_STATUS_UNSPECIFIED +} + +func (m *LifecycleInfo) GetHistory() []*LifecycleEvent { + if m != nil { + return m.History + } + return nil +} + // Core Universal Validator object type UniversalValidator struct { - CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` - Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - Status UVStatus `protobuf:"varint,3,opt,name=status,proto3,enum=uvalidator.v1.UVStatus" json:"status,omitempty"` - Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` - JoinedAtBlock int64 `protobuf:"varint,5,opt,name=joined_at_block,json=joinedAtBlock,proto3" json:"joined_at_block,omitempty"` + IdentifyInfo *IdentityInfo `protobuf:"bytes,1,opt,name=identify_info,json=identifyInfo,proto3" json:"identify_info,omitempty"` + Network *NetworkInfo `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` + LifecycleInfo *LifecycleInfo `protobuf:"bytes,3,opt,name=lifecycle_info,json=lifecycleInfo,proto3" json:"lifecycle_info,omitempty"` } func (m *UniversalValidator) Reset() { *m = UniversalValidator{} } func (*UniversalValidator) ProtoMessage() {} func (*UniversalValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_317d9e276ec46d00, []int{1} + return fileDescriptor_317d9e276ec46d00, []int{4} } func (m *UniversalValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -145,25 +302,11 @@ func (m *UniversalValidator) XXX_DiscardUnknown() { var xxx_messageInfo_UniversalValidator proto.InternalMessageInfo -func (m *UniversalValidator) GetCoreValidatorAddress() string { - if m != nil { - return m.CoreValidatorAddress - } - return "" -} - -func (m *UniversalValidator) GetPubkey() string { - if m != nil { - return m.Pubkey - } - return "" -} - -func (m *UniversalValidator) GetStatus() UVStatus { +func (m *UniversalValidator) GetIdentifyInfo() *IdentityInfo { if m != nil { - return m.Status + return m.IdentifyInfo } - return UVStatus_UV_STATUS_UNSPECIFIED + return nil } func (m *UniversalValidator) GetNetwork() *NetworkInfo { @@ -173,55 +316,92 @@ func (m *UniversalValidator) GetNetwork() *NetworkInfo { return nil } -func (m *UniversalValidator) GetJoinedAtBlock() int64 { +func (m *UniversalValidator) GetLifecycleInfo() *LifecycleInfo { if m != nil { - return m.JoinedAtBlock + return m.LifecycleInfo } - return 0 + return nil } func init() { proto.RegisterEnum("uvalidator.v1.UVStatus", UVStatus_name, UVStatus_value) + proto.RegisterType((*IdentityInfo)(nil), "uvalidator.v1.IdentityInfo") proto.RegisterType((*NetworkInfo)(nil), "uvalidator.v1.NetworkInfo") + proto.RegisterType((*LifecycleEvent)(nil), "uvalidator.v1.LifecycleEvent") + proto.RegisterType((*LifecycleInfo)(nil), "uvalidator.v1.LifecycleInfo") proto.RegisterType((*UniversalValidator)(nil), "uvalidator.v1.UniversalValidator") } func init() { proto.RegisterFile("uvalidator/v1/validator.proto", fileDescriptor_317d9e276ec46d00) } var fileDescriptor_317d9e276ec46d00 = []byte{ - // 470 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0x3f, 0x6f, 0xd3, 0x40, - 0x18, 0xc6, 0x7d, 0x4e, 0x08, 0x70, 0x55, 0x8b, 0x39, 0x85, 0xc4, 0x18, 0xe1, 0x5a, 0x1d, 0x50, - 0x54, 0x54, 0x5b, 0x2d, 0x95, 0x90, 0xba, 0x20, 0xb7, 0x35, 0xc8, 0x08, 0x99, 0x92, 0xc4, 0x1e, - 0x58, 0x2c, 0x27, 0x76, 0x93, 0x23, 0xe9, 0x9d, 0x65, 0x9f, 0x03, 0xfd, 0x0a, 0x4c, 0x88, 0x89, - 0x09, 0x75, 0x60, 0x60, 0xe4, 0x63, 0x30, 0x66, 0x64, 0x44, 0xc9, 0x00, 0x1f, 0x03, 0xc5, 0x7f, - 0x62, 0x03, 0x8b, 0xf5, 0xde, 0xf3, 0x7b, 0xde, 0xf3, 0xfb, 0xbc, 0x3a, 0x78, 0x3f, 0x99, 0x79, - 0x53, 0xec, 0x7b, 0x8c, 0x46, 0xda, 0x6c, 0x5f, 0x5b, 0x1f, 0xd4, 0x30, 0xa2, 0x8c, 0xa2, 0xcd, - 0x12, 0xab, 0xb3, 0x7d, 0xa9, 0x39, 0xa2, 0x23, 0x9a, 0x12, 0x6d, 0x55, 0x65, 0x26, 0xe9, 0xb6, - 0x77, 0x81, 0x09, 0xd5, 0xd2, 0x6f, 0x26, 0xed, 0x3c, 0x81, 0x1b, 0x56, 0xc0, 0xde, 0xd2, 0x68, - 0x62, 0x92, 0x73, 0x8a, 0xb6, 0x20, 0x8f, 0x43, 0x11, 0x28, 0xa0, 0x73, 0xb3, 0xcb, 0xe3, 0xf0, - 0x48, 0xf9, 0x7d, 0xb5, 0x0d, 0xde, 0xff, 0xfa, 0xb6, 0xdb, 0xae, 0xfc, 0x9e, 0x64, 0x0d, 0x2e, - 0x26, 0xe7, 0x74, 0xe7, 0x33, 0x0f, 0x91, 0x4d, 0xf0, 0x2c, 0x88, 0x62, 0x6f, 0xea, 0x14, 0x1e, - 0x74, 0x08, 0x5b, 0x43, 0x1a, 0x05, 0xee, 0xba, 0xcb, 0xf5, 0x7c, 0x3f, 0x0a, 0xe2, 0x38, 0xbf, - 0xbc, 0xb9, 0xa2, 0x6b, 0xbb, 0x9e, 0x31, 0xd4, 0x82, 0x8d, 0x30, 0x19, 0x4c, 0x82, 0x4b, 0x91, - 0x4f, 0x5d, 0xf9, 0x09, 0x69, 0xb0, 0x11, 0x33, 0x8f, 0x25, 0xb1, 0x58, 0x53, 0x40, 0x67, 0xeb, - 0xa0, 0xad, 0xfe, 0x15, 0x57, 0xb5, 0x9d, 0x5e, 0x8a, 0xbb, 0xb9, 0x0d, 0x1d, 0xc2, 0xeb, 0xf9, - 0x94, 0x62, 0x5d, 0x01, 0x9d, 0x8d, 0x03, 0xe9, 0x9f, 0x8e, 0x4a, 0xe8, 0x6e, 0x61, 0x45, 0x0f, - 0xe0, 0xad, 0x37, 0x14, 0x93, 0xc0, 0x77, 0x3d, 0xe6, 0x0e, 0xa6, 0x74, 0x38, 0x11, 0xaf, 0x29, - 0xa0, 0x53, 0xeb, 0x6e, 0x66, 0xb2, 0xce, 0x8e, 0x57, 0xe2, 0xd1, 0xc3, 0x4f, 0x57, 0xdb, 0x5c, - 0xb1, 0x19, 0xb9, 0xb2, 0x99, 0xa4, 0x58, 0x44, 0x99, 0x7b, 0xf7, 0x23, 0x80, 0x37, 0x8a, 0xf9, - 0xd0, 0x5d, 0x78, 0xc7, 0x76, 0xdc, 0x5e, 0x5f, 0xef, 0xdb, 0x3d, 0xd7, 0xb6, 0x7a, 0x67, 0xc6, - 0x89, 0xf9, 0xd4, 0x34, 0x4e, 0x05, 0x0e, 0x35, 0xa1, 0x50, 0x22, 0xfd, 0xa4, 0x6f, 0x3a, 0x86, - 0x00, 0x90, 0x04, 0x5b, 0xa5, 0x7a, 0x66, 0x58, 0xa7, 0xa6, 0xf5, 0xcc, 0x7d, 0xfe, 0xd2, 0xb4, - 0x04, 0x1e, 0xdd, 0x83, 0xed, 0xff, 0xd9, 0x0b, 0x43, 0x77, 0x0c, 0xa1, 0x86, 0x5a, 0x10, 0x95, - 0xd0, 0xb4, 0xf2, 0x0b, 0xeb, 0x52, 0xfd, 0xeb, 0x17, 0x19, 0x1c, 0xbf, 0xfa, 0xbe, 0x90, 0xc1, - 0x7c, 0x21, 0x83, 0x9f, 0x0b, 0x19, 0x7c, 0x58, 0xca, 0xdc, 0x7c, 0x29, 0x73, 0x3f, 0x96, 0x32, - 0xf7, 0xfa, 0xf1, 0x08, 0xb3, 0x71, 0x32, 0x50, 0x87, 0xf4, 0x42, 0x0b, 0x93, 0x78, 0x3c, 0x1c, - 0x7b, 0x98, 0xa4, 0xd5, 0x5e, 0x5a, 0xee, 0x11, 0xea, 0x07, 0xda, 0x3b, 0xad, 0x92, 0x9a, 0x5d, - 0x86, 0x41, 0x3c, 0x68, 0xa4, 0x0f, 0xea, 0xd1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x98, 0xa8, - 0x96, 0x81, 0xa9, 0x02, 0x00, 0x00, + // 583 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0x8e, 0x93, 0x2a, 0x85, 0xcb, 0x0f, 0x85, 0x53, 0x48, 0x42, 0x4a, 0xdd, 0x36, 0x53, 0x55, + 0xd4, 0x58, 0x0d, 0x48, 0x95, 0x32, 0x00, 0x21, 0x35, 0x60, 0x54, 0x99, 0xe2, 0xfc, 0x18, 0x58, + 0x2c, 0xc7, 0xbe, 0xc4, 0xa7, 0xb8, 0x3e, 0xcb, 0x3e, 0x07, 0x32, 0xb1, 0x22, 0x26, 0xc4, 0xc4, + 0xd8, 0x81, 0x81, 0x91, 0x3f, 0x83, 0xb1, 0x23, 0x23, 0x4a, 0x06, 0xf8, 0x2b, 0x10, 0xca, 0xd9, + 0x4e, 0xdc, 0x20, 0xa4, 0x2e, 0xd1, 0xbd, 0xf7, 0xbd, 0xf7, 0xbe, 0xf7, 0xbe, 0x2f, 0x06, 0xdb, + 0xfe, 0x44, 0xb3, 0xb0, 0xa1, 0x51, 0xe2, 0x0a, 0x93, 0x23, 0x61, 0x19, 0xd4, 0x1d, 0x97, 0x50, + 0x02, 0x73, 0x2b, 0xb8, 0x3e, 0x39, 0xaa, 0x16, 0x47, 0x64, 0x44, 0x18, 0x22, 0x2c, 0x5e, 0x41, + 0x51, 0xf5, 0x96, 0x76, 0x8e, 0x6d, 0x22, 0xb0, 0xdf, 0x20, 0x55, 0x7b, 0x07, 0xb2, 0x92, 0x81, + 0x6c, 0x8a, 0xe9, 0x54, 0xb2, 0x87, 0x04, 0x3e, 0x00, 0x25, 0x9d, 0xb8, 0x48, 0x5d, 0x4e, 0x53, + 0x35, 0xc3, 0x70, 0x91, 0xe7, 0x55, 0xb8, 0x5d, 0x6e, 0xff, 0xa6, 0x52, 0x5c, 0xa0, 0xfd, 0x08, + 0x6c, 0x05, 0x18, 0x2c, 0x81, 0xb4, 0xe3, 0x0f, 0xc6, 0x68, 0x5a, 0x49, 0xb2, 0xaa, 0x30, 0x6a, + 0xee, 0xfd, 0xbe, 0xd8, 0xe1, 0x3e, 0xfc, 0xfa, 0x76, 0x50, 0x89, 0x6d, 0x8f, 0x43, 0x3e, 0x15, + 0xdb, 0x43, 0x52, 0x7b, 0x04, 0x32, 0x32, 0xa2, 0x6f, 0x88, 0x3b, 0x66, 0xfc, 0x79, 0x90, 0xc4, + 0x4e, 0xc8, 0x95, 0xc4, 0x4e, 0x73, 0x37, 0x9a, 0x50, 0x8e, 0x4d, 0xb0, 0x83, 0x86, 0x60, 0x80, + 0x01, 0xf2, 0xa7, 0x78, 0x88, 0xf4, 0xa9, 0x6e, 0x21, 0x71, 0x82, 0x6c, 0x0a, 0x05, 0x90, 0xf6, + 0xa8, 0x46, 0xfd, 0x60, 0xe7, 0x7c, 0xa3, 0x5c, 0xbf, 0x22, 0x4e, 0xbd, 0xd7, 0xef, 0x30, 0x58, + 0x09, 0xcb, 0xe0, 0x1e, 0xc8, 0x0e, 0x2c, 0xa2, 0x8f, 0x55, 0x13, 0xe1, 0x91, 0x49, 0xd9, 0x11, + 0x29, 0x25, 0xc3, 0x72, 0xcf, 0x59, 0xaa, 0xf6, 0x9e, 0x03, 0xb9, 0x25, 0x0d, 0xdb, 0xf4, 0x21, + 0xc8, 0xeb, 0xbe, 0xeb, 0x22, 0x9b, 0xaa, 0xd7, 0x63, 0xcb, 0x85, 0xe5, 0x41, 0x08, 0x8f, 0xc1, + 0xa6, 0x89, 0x3d, 0x4a, 0xdc, 0x85, 0x68, 0xa9, 0xfd, 0x4c, 0x63, 0x7b, 0xad, 0xf1, 0xea, 0x55, + 0x4a, 0x54, 0x5d, 0xfb, 0xc3, 0x01, 0xd8, 0xb3, 0xf1, 0x04, 0xb9, 0x9e, 0x66, 0x2d, 0xad, 0x80, + 0x8f, 0x41, 0x2e, 0x50, 0x76, 0x18, 0x28, 0xcb, 0xd6, 0xc9, 0x34, 0xb6, 0xd6, 0xa6, 0xc6, 0xdd, + 0x56, 0xb2, 0x51, 0x47, 0xe8, 0xfd, 0x66, 0xa8, 0x2c, 0x53, 0x20, 0xd3, 0xa8, 0xae, 0xf5, 0xc6, + 0x8c, 0x52, 0xa2, 0x52, 0xd8, 0x06, 0x79, 0x2b, 0xda, 0x34, 0x20, 0x4e, 0xb1, 0xe6, 0xbb, 0xff, + 0x3b, 0x87, 0xb5, 0xe7, 0xac, 0x78, 0xd8, 0xbc, 0xf7, 0xf9, 0x62, 0x27, 0x11, 0x59, 0xcd, 0xc7, + 0xac, 0xf6, 0xa3, 0x43, 0x57, 0xff, 0xc8, 0x83, 0x4f, 0x1c, 0xb8, 0x11, 0xa9, 0x0a, 0xef, 0x80, + 0xdb, 0xbd, 0xbe, 0xda, 0xe9, 0xb6, 0xba, 0xbd, 0x8e, 0xda, 0x93, 0x3b, 0x67, 0x62, 0x5b, 0x7a, + 0x2a, 0x89, 0x27, 0x85, 0x04, 0x2c, 0x82, 0xc2, 0x0a, 0x6a, 0xb5, 0xbb, 0x52, 0x5f, 0x2c, 0x70, + 0xb0, 0x0a, 0x4a, 0xab, 0xec, 0x99, 0x28, 0x9f, 0x48, 0xf2, 0x33, 0xf5, 0xc5, 0x4b, 0x49, 0x2e, + 0x24, 0xe1, 0x16, 0x28, 0xff, 0x8b, 0x9d, 0x8a, 0xad, 0xbe, 0x58, 0x48, 0xc1, 0x12, 0x80, 0x2b, + 0x50, 0x92, 0xc3, 0x81, 0x1b, 0xd5, 0x8d, 0xaf, 0x5f, 0x78, 0xee, 0xc9, 0xab, 0xef, 0x33, 0x9e, + 0xbb, 0x9c, 0xf1, 0xdc, 0xcf, 0x19, 0xcf, 0x7d, 0x9c, 0xf3, 0x89, 0xcb, 0x39, 0x9f, 0xf8, 0x31, + 0xe7, 0x13, 0xaf, 0x8f, 0x47, 0x98, 0x9a, 0xfe, 0xa0, 0xae, 0x93, 0x73, 0xc1, 0xf1, 0x3d, 0x53, + 0x37, 0x35, 0x6c, 0xb3, 0xd7, 0x21, 0x7b, 0x1e, 0xda, 0xc4, 0x40, 0xc2, 0x5b, 0x21, 0x76, 0x35, + 0x9d, 0x3a, 0xc8, 0x1b, 0xa4, 0xd9, 0x27, 0x7a, 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, + 0x42, 0xe6, 0xc6, 0xfb, 0x03, 0x00, 0x00, } +func (this *IdentityInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*IdentityInfo) + if !ok { + that2, ok := that.(IdentityInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CoreValidatorAddress != that1.CoreValidatorAddress { + return false + } + if this.Pubkey != that1.Pubkey { + return false + } + return true +} func (this *NetworkInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -265,23 +445,54 @@ func (this *UniversalValidator) Equal(that interface{}) bool { } else if this == nil { return false } - if this.CoreValidatorAddress != that1.CoreValidatorAddress { - return false - } - if this.Pubkey != that1.Pubkey { - return false - } - if this.Status != that1.Status { + if !this.IdentifyInfo.Equal(that1.IdentifyInfo) { return false } if !this.Network.Equal(that1.Network) { return false } - if this.JoinedAtBlock != that1.JoinedAtBlock { + if !this.LifecycleInfo.Equal(that1.LifecycleInfo) { return false } return true } +func (m *IdentityInfo) 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 *IdentityInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *IdentityInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Pubkey) > 0 { + i -= len(m.Pubkey) + copy(dAtA[i:], m.Pubkey) + i = encodeVarintValidator(dAtA, i, uint64(len(m.Pubkey))) + i-- + dAtA[i] = 0x12 + } + if len(m.CoreValidatorAddress) > 0 { + i -= len(m.CoreValidatorAddress) + copy(dAtA[i:], m.CoreValidatorAddress) + i = encodeVarintValidator(dAtA, i, uint64(len(m.CoreValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *NetworkInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -312,6 +523,81 @@ func (m *NetworkInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *LifecycleEvent) 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 *LifecycleEvent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LifecycleEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BlockHeight != 0 { + i = encodeVarintValidator(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x10 + } + if m.Status != 0 { + i = encodeVarintValidator(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *LifecycleInfo) 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 *LifecycleInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LifecycleInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.History) > 0 { + for iNdEx := len(m.History) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.History[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintValidator(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.CurrentStatus != 0 { + i = encodeVarintValidator(dAtA, i, uint64(m.CurrentStatus)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *UniversalValidator) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -332,10 +618,17 @@ func (m *UniversalValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.JoinedAtBlock != 0 { - i = encodeVarintValidator(dAtA, i, uint64(m.JoinedAtBlock)) + if m.LifecycleInfo != nil { + { + size, err := m.LifecycleInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintValidator(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x28 + dAtA[i] = 0x1a } if m.Network != nil { { @@ -347,26 +640,19 @@ func (m *UniversalValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintValidator(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 } - if m.Status != 0 { - i = encodeVarintValidator(dAtA, i, uint64(m.Status)) + if m.IdentifyInfo != nil { + { + size, err := m.IdentifyInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintValidator(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x18 - } - if len(m.Pubkey) > 0 { - i -= len(m.Pubkey) - copy(dAtA[i:], m.Pubkey) - i = encodeVarintValidator(dAtA, i, uint64(len(m.Pubkey))) - i-- - dAtA[i] = 0x12 - } - if len(m.CoreValidatorAddress) > 0 { - i -= len(m.CoreValidatorAddress) - copy(dAtA[i:], m.CoreValidatorAddress) - i = encodeVarintValidator(dAtA, i, uint64(len(m.CoreValidatorAddress))) - i-- - dAtA[i] = 0xa + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -382,42 +668,86 @@ func encodeVarintValidator(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *NetworkInfo) Size() (n int) { +func (m *IdentityInfo) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Ip) + l = len(m.CoreValidatorAddress) + if l > 0 { + n += 1 + l + sovValidator(uint64(l)) + } + l = len(m.Pubkey) if l > 0 { n += 1 + l + sovValidator(uint64(l)) } return n } -func (m *UniversalValidator) Size() (n int) { +func (m *NetworkInfo) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.CoreValidatorAddress) + l = len(m.Ip) if l > 0 { n += 1 + l + sovValidator(uint64(l)) } - l = len(m.Pubkey) - if l > 0 { - n += 1 + l + sovValidator(uint64(l)) + return n +} + +func (m *LifecycleEvent) Size() (n int) { + if m == nil { + return 0 } + var l int + _ = l if m.Status != 0 { n += 1 + sovValidator(uint64(m.Status)) } + if m.BlockHeight != 0 { + n += 1 + sovValidator(uint64(m.BlockHeight)) + } + return n +} + +func (m *LifecycleInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CurrentStatus != 0 { + n += 1 + sovValidator(uint64(m.CurrentStatus)) + } + if len(m.History) > 0 { + for _, e := range m.History { + l = e.Size() + n += 1 + l + sovValidator(uint64(l)) + } + } + return n +} + +func (m *UniversalValidator) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IdentifyInfo != nil { + l = m.IdentifyInfo.Size() + n += 1 + l + sovValidator(uint64(l)) + } if m.Network != nil { l = m.Network.Size() n += 1 + l + sovValidator(uint64(l)) } - if m.JoinedAtBlock != 0 { - n += 1 + sovValidator(uint64(m.JoinedAtBlock)) + if m.LifecycleInfo != nil { + l = m.LifecycleInfo.Size() + n += 1 + l + sovValidator(uint64(l)) } return n } @@ -428,7 +758,7 @@ func sovValidator(x uint64) (n int) { func sozValidator(x uint64) (n int) { return sovValidator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *NetworkInfo) Unmarshal(dAtA []byte) error { +func (m *IdentityInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -451,15 +781,15 @@ func (m *NetworkInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: NetworkInfo: wiretype end group for non-group") + return fmt.Errorf("proto: IdentityInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: NetworkInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IdentityInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -487,7 +817,39 @@ func (m *NetworkInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ip = string(dAtA[iNdEx:postIndex]) + m.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + 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 ErrInvalidLengthValidator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pubkey = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -510,7 +872,7 @@ func (m *NetworkInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *UniversalValidator) Unmarshal(dAtA []byte) error { +func (m *NetworkInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -533,15 +895,15 @@ func (m *UniversalValidator) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: UniversalValidator: wiretype end group for non-group") + return fmt.Errorf("proto: NetworkInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: UniversalValidator: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: NetworkInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -569,13 +931,170 @@ func (m *UniversalValidator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + m.Ip = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipValidator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LifecycleEvent) 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 ErrIntOverflowValidator + } + 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: LifecycleEvent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LifecycleEvent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= UVStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipValidator(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LifecycleInfo) 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 ErrIntOverflowValidator + } + 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: LifecycleInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LifecycleInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentStatus", wireType) + } + m.CurrentStatus = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CurrentStatus |= UVStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field History", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowValidator @@ -585,29 +1104,81 @@ func (m *UniversalValidator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthValidator } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthValidator } if postIndex > l { return io.ErrUnexpectedEOF } - m.Pubkey = string(dAtA[iNdEx:postIndex]) + m.History = append(m.History, &LifecycleEvent{}) + if err := m.History[len(m.History)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + default: + iNdEx = preIndex + skippy, err := skipValidator(dAtA[iNdEx:]) + if err != nil { + return err } - m.Status = 0 + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthValidator + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UniversalValidator) 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 ErrIntOverflowValidator + } + 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: UniversalValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UniversalValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IdentifyInfo", wireType) + } + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowValidator @@ -617,12 +1188,29 @@ func (m *UniversalValidator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Status |= UVStatus(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - case 4: + if msglen < 0 { + return ErrInvalidLengthValidator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.IdentifyInfo == nil { + m.IdentifyInfo = &IdentityInfo{} + } + if err := m.IdentifyInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) } @@ -658,11 +1246,11 @@ func (m *UniversalValidator) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field JoinedAtBlock", wireType) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LifecycleInfo", wireType) } - m.JoinedAtBlock = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowValidator @@ -672,11 +1260,28 @@ func (m *UniversalValidator) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.JoinedAtBlock |= int64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } + if msglen < 0 { + return ErrInvalidLengthValidator + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LifecycleInfo == nil { + m.LifecycleInfo = &LifecycleInfo{} + } + if err := m.LifecycleInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipValidator(dAtA[iNdEx:]) From a6664306e47ed9b44d4e48df1cc2d21ea4a4d04c Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 6 Nov 2025 13:05:06 +0530 Subject: [PATCH 011/105] feat: added generated protobuf --- api/uvalidator/v1/validator.pulsar.go | 113 ++++++++++++++------------ proto/uvalidator/v1/validator.proto | 6 ++ 2 files changed, 65 insertions(+), 54 deletions(-) diff --git a/api/uvalidator/v1/validator.pulsar.go b/api/uvalidator/v1/validator.pulsar.go index 2f1c6f13..26855162 100644 --- a/api/uvalidator/v1/validator.pulsar.go +++ b/api/uvalidator/v1/validator.pulsar.go @@ -2814,60 +2814,65 @@ var file_uvalidator_v1_validator_proto_rawDesc = []byte{ 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x3a, 0x20, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x17, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x64, 0x0a, 0x0e, 0x4c, 0x69, 0x66, - 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x75, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x56, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, - 0x88, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x3e, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x75, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x37, 0x0a, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x22, 0xfe, 0x01, 0x0a, 0x12, 0x55, - 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x40, 0x0a, 0x0d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x43, 0x0a, 0x0e, 0x6c, 0x69, 0x66, - 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x0d, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x2b, - 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2a, 0x92, 0x01, 0x0a, 0x08, - 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x56, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x56, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4a, - 0x4f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x45, 0x41, 0x56, 0x45, - 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, - 0x42, 0xbd, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, - 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, - 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x0e, 0x4c, 0x69, + 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x56, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, + 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x3a, 0x23, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0xab, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, + 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3e, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x17, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, + 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x3a, 0x21, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x6c, 0x65, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x22, 0xfe, 0x01, 0x0a, 0x12, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x40, 0x0a, 0x0d, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x07, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x12, 0x43, 0x0a, 0x0e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, + 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, + 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x2b, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, + 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2a, 0x92, 0x01, 0x0a, 0x08, 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, + 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, + 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x1b, + 0x0a, 0x17, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, + 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x55, + 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, + 0x45, 0x10, 0x04, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xbd, 0x01, 0x0a, 0x11, 0x63, 0x6f, + 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, + 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, + 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/proto/uvalidator/v1/validator.proto b/proto/uvalidator/v1/validator.proto index 738e8898..1fa2bb17 100644 --- a/proto/uvalidator/v1/validator.proto +++ b/proto/uvalidator/v1/validator.proto @@ -36,12 +36,18 @@ message NetworkInfo { // Lifecycle event info message LifecycleEvent { + option (amino.name) = "uvalidator/lifecycle_event"; + option (gogoproto.equal) = true; + UVStatus status = 1; // Validator status at this point in time int64 block_height = 2; // Block height when this status transition occurred } // Validator lifecycle info message LifecycleInfo { + option (amino.name) = "uvalidator/lifecyle_info"; + option (gogoproto.equal) = true; + UVStatus current_status = 1; // Current validator state repeated LifecycleEvent history = 2; // Added to registry } From c8d46a7872e30475043dc5df19b3ee8da2464047 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 6 Nov 2025 13:13:54 +0530 Subject: [PATCH 012/105] refactor: added lifecyle_event message types --- x/uvalidator/types/lifecyle_event.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 x/uvalidator/types/lifecyle_event.go diff --git a/x/uvalidator/types/lifecyle_event.go b/x/uvalidator/types/lifecyle_event.go new file mode 100644 index 00000000..1c954270 --- /dev/null +++ b/x/uvalidator/types/lifecyle_event.go @@ -0,0 +1,16 @@ +package types + +import ( + "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Validate does the sanity check on the LifecycleEvent message type. +func (p LifecycleEvent) ValidateBasic() error { + // Validate uv_status is within known enum range + if _, ok := UVStatus_name[int32(p.Status)]; !ok { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid uv_status: %v", p.Status) + } + + return nil +} From 357403c3c822f6e759e59175e0857628d3d01fd0 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 6 Nov 2025 13:14:03 +0530 Subject: [PATCH 013/105] refactor: added lifecyle_info message types --- x/uvalidator/types/lifecyle_info.go | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 x/uvalidator/types/lifecyle_info.go diff --git a/x/uvalidator/types/lifecyle_info.go b/x/uvalidator/types/lifecyle_info.go new file mode 100644 index 00000000..31b48e40 --- /dev/null +++ b/x/uvalidator/types/lifecyle_info.go @@ -0,0 +1,35 @@ +package types + +import ( + "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// ValidateBasic performs stateless validation on the LifecycleInfo struct. +// Ensures that current status is valid and lifecycle history entries are consistent. +func (p LifecycleInfo) ValidateBasic() error { + // Validate that the current_status is within known enum range + if _, ok := UVStatus_name[int32(p.CurrentStatus)]; !ok { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid current_status: %v", p.CurrentStatus) + } + + // Validate each lifecycle event in history + for i, event := range p.History { + if err := event.ValidateBasic(); err != nil { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid history[%d]: %v", i, err) + } + } + + // Ensure the lifecycle history is ordered by block height + for i := 1; i < len(p.History); i++ { + if p.History[i].BlockHeight < p.History[i-1].BlockHeight { + return errors.Wrapf( + sdkerrors.ErrInvalidRequest, + "history not ordered: event[%d] (height %d) < event[%d] (height %d)", + i, p.History[i].BlockHeight, i-1, p.History[i-1].BlockHeight, + ) + } + } + + return nil +} From 31e4deca1203821a684c05489b00d1e32d4a471b Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 6 Nov 2025 13:14:15 +0530 Subject: [PATCH 014/105] refactor: added identity_info message types --- x/uvalidator/types/identity_info.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 x/uvalidator/types/identity_info.go diff --git a/x/uvalidator/types/identity_info.go b/x/uvalidator/types/identity_info.go new file mode 100644 index 00000000..c3f1da6e --- /dev/null +++ b/x/uvalidator/types/identity_info.go @@ -0,0 +1,26 @@ +package types + +import ( + "strings" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Validate does the sanity check on the IdentityInfo message type. +func (p IdentityInfo) ValidateBasic() error { + // Validate core validator address (must be a valid valoper address) + _, err := sdk.ValAddressFromBech32(p.CoreValidatorAddress) + if err != nil { + return errors.Wrap(err, "invalid core validator address") + } + + // Validate pubkey is non-empty + pubkey := strings.TrimSpace(p.Pubkey) + if pubkey == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "pubkey cannot be empty") + } + + return nil +} From 0933c07504dc7f68213666de4e03aa1222270689 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 6 Nov 2025 13:14:52 +0530 Subject: [PATCH 015/105] refactor: updated universal_validator validateBasic fn --- x/uvalidator/types/universal_validator.go | 25 ++-- x/uvalidator/types/validator.pb.go | 136 ++++++++++++++++------ 2 files changed, 109 insertions(+), 52 deletions(-) diff --git a/x/uvalidator/types/universal_validator.go b/x/uvalidator/types/universal_validator.go index 57028720..add490bc 100644 --- a/x/uvalidator/types/universal_validator.go +++ b/x/uvalidator/types/universal_validator.go @@ -2,10 +2,8 @@ package types import ( "encoding/json" - "strings" "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -21,22 +19,21 @@ func (p UniversalValidator) String() string { // Validate does the sanity check on the params. func (p UniversalValidator) ValidateBasic() error { - // Validate core validator address (must be a valid valoper address) - _, err := sdk.ValAddressFromBech32(p.CoreValidatorAddress) - if err != nil { - return errors.Wrap(err, "invalid core validator address") + + // Validate identity info + if err := p.IdentifyInfo.ValidateBasic(); err != nil { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid identify info [%d]: %v", err) } - // Validate pubkey is non-empty - pubkey := strings.TrimSpace(p.Pubkey) - if pubkey == "" { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "pubkey cannot be empty") + // Validate identity info + if err := p.LifecycleInfo.ValidateBasic(); err != nil { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid lifecycle info [%d]: %v", err) } - // Validate uv_status is within known enum range - if _, ok := UVStatus_name[int32(p.Status)]; !ok { - return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid uv_status: %v", p.Status) + // Validate identity info + if err := p.Network.ValidateBasic(); err != nil { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid network info [%d]: %v", err) } - return p.Network.ValidateBasic() + return nil } diff --git a/x/uvalidator/types/validator.pb.go b/x/uvalidator/types/validator.pb.go index 835a471d..88fda8d2 100644 --- a/x/uvalidator/types/validator.pb.go +++ b/x/uvalidator/types/validator.pb.go @@ -335,44 +335,45 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/validator.proto", fileDescriptor_317d9e276ec46d00) } var fileDescriptor_317d9e276ec46d00 = []byte{ - // 583 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0x8e, 0x93, 0x2a, 0x85, 0xcb, 0x0f, 0x85, 0x53, 0x48, 0x42, 0x4a, 0xdd, 0x36, 0x53, 0x55, - 0xd4, 0x58, 0x0d, 0x48, 0x95, 0x32, 0x00, 0x21, 0x35, 0x60, 0x54, 0x99, 0xe2, 0xfc, 0x18, 0x58, - 0x2c, 0xc7, 0xbe, 0xc4, 0xa7, 0xb8, 0x3e, 0xcb, 0x3e, 0x07, 0x32, 0xb1, 0x22, 0x26, 0xc4, 0xc4, - 0xd8, 0x81, 0x81, 0x91, 0x3f, 0x83, 0xb1, 0x23, 0x23, 0x4a, 0x06, 0xf8, 0x2b, 0x10, 0xca, 0xd9, - 0x4e, 0xdc, 0x20, 0xa4, 0x2e, 0xd1, 0xbd, 0xf7, 0xbd, 0xf7, 0xbe, 0xf7, 0xbe, 0x2f, 0x06, 0xdb, - 0xfe, 0x44, 0xb3, 0xb0, 0xa1, 0x51, 0xe2, 0x0a, 0x93, 0x23, 0x61, 0x19, 0xd4, 0x1d, 0x97, 0x50, - 0x02, 0x73, 0x2b, 0xb8, 0x3e, 0x39, 0xaa, 0x16, 0x47, 0x64, 0x44, 0x18, 0x22, 0x2c, 0x5e, 0x41, - 0x51, 0xf5, 0x96, 0x76, 0x8e, 0x6d, 0x22, 0xb0, 0xdf, 0x20, 0x55, 0x7b, 0x07, 0xb2, 0x92, 0x81, - 0x6c, 0x8a, 0xe9, 0x54, 0xb2, 0x87, 0x04, 0x3e, 0x00, 0x25, 0x9d, 0xb8, 0x48, 0x5d, 0x4e, 0x53, - 0x35, 0xc3, 0x70, 0x91, 0xe7, 0x55, 0xb8, 0x5d, 0x6e, 0xff, 0xa6, 0x52, 0x5c, 0xa0, 0xfd, 0x08, - 0x6c, 0x05, 0x18, 0x2c, 0x81, 0xb4, 0xe3, 0x0f, 0xc6, 0x68, 0x5a, 0x49, 0xb2, 0xaa, 0x30, 0x6a, - 0xee, 0xfd, 0xbe, 0xd8, 0xe1, 0x3e, 0xfc, 0xfa, 0x76, 0x50, 0x89, 0x6d, 0x8f, 0x43, 0x3e, 0x15, - 0xdb, 0x43, 0x52, 0x7b, 0x04, 0x32, 0x32, 0xa2, 0x6f, 0x88, 0x3b, 0x66, 0xfc, 0x79, 0x90, 0xc4, - 0x4e, 0xc8, 0x95, 0xc4, 0x4e, 0x73, 0x37, 0x9a, 0x50, 0x8e, 0x4d, 0xb0, 0x83, 0x86, 0x60, 0x80, - 0x01, 0xf2, 0xa7, 0x78, 0x88, 0xf4, 0xa9, 0x6e, 0x21, 0x71, 0x82, 0x6c, 0x0a, 0x05, 0x90, 0xf6, - 0xa8, 0x46, 0xfd, 0x60, 0xe7, 0x7c, 0xa3, 0x5c, 0xbf, 0x22, 0x4e, 0xbd, 0xd7, 0xef, 0x30, 0x58, - 0x09, 0xcb, 0xe0, 0x1e, 0xc8, 0x0e, 0x2c, 0xa2, 0x8f, 0x55, 0x13, 0xe1, 0x91, 0x49, 0xd9, 0x11, - 0x29, 0x25, 0xc3, 0x72, 0xcf, 0x59, 0xaa, 0xf6, 0x9e, 0x03, 0xb9, 0x25, 0x0d, 0xdb, 0xf4, 0x21, - 0xc8, 0xeb, 0xbe, 0xeb, 0x22, 0x9b, 0xaa, 0xd7, 0x63, 0xcb, 0x85, 0xe5, 0x41, 0x08, 0x8f, 0xc1, - 0xa6, 0x89, 0x3d, 0x4a, 0xdc, 0x85, 0x68, 0xa9, 0xfd, 0x4c, 0x63, 0x7b, 0xad, 0xf1, 0xea, 0x55, - 0x4a, 0x54, 0x5d, 0xfb, 0xc3, 0x01, 0xd8, 0xb3, 0xf1, 0x04, 0xb9, 0x9e, 0x66, 0x2d, 0xad, 0x80, - 0x8f, 0x41, 0x2e, 0x50, 0x76, 0x18, 0x28, 0xcb, 0xd6, 0xc9, 0x34, 0xb6, 0xd6, 0xa6, 0xc6, 0xdd, - 0x56, 0xb2, 0x51, 0x47, 0xe8, 0xfd, 0x66, 0xa8, 0x2c, 0x53, 0x20, 0xd3, 0xa8, 0xae, 0xf5, 0xc6, - 0x8c, 0x52, 0xa2, 0x52, 0xd8, 0x06, 0x79, 0x2b, 0xda, 0x34, 0x20, 0x4e, 0xb1, 0xe6, 0xbb, 0xff, - 0x3b, 0x87, 0xb5, 0xe7, 0xac, 0x78, 0xd8, 0xbc, 0xf7, 0xf9, 0x62, 0x27, 0x11, 0x59, 0xcd, 0xc7, - 0xac, 0xf6, 0xa3, 0x43, 0x57, 0xff, 0xc8, 0x83, 0x4f, 0x1c, 0xb8, 0x11, 0xa9, 0x0a, 0xef, 0x80, - 0xdb, 0xbd, 0xbe, 0xda, 0xe9, 0xb6, 0xba, 0xbd, 0x8e, 0xda, 0x93, 0x3b, 0x67, 0x62, 0x5b, 0x7a, - 0x2a, 0x89, 0x27, 0x85, 0x04, 0x2c, 0x82, 0xc2, 0x0a, 0x6a, 0xb5, 0xbb, 0x52, 0x5f, 0x2c, 0x70, - 0xb0, 0x0a, 0x4a, 0xab, 0xec, 0x99, 0x28, 0x9f, 0x48, 0xf2, 0x33, 0xf5, 0xc5, 0x4b, 0x49, 0x2e, - 0x24, 0xe1, 0x16, 0x28, 0xff, 0x8b, 0x9d, 0x8a, 0xad, 0xbe, 0x58, 0x48, 0xc1, 0x12, 0x80, 0x2b, - 0x50, 0x92, 0xc3, 0x81, 0x1b, 0xd5, 0x8d, 0xaf, 0x5f, 0x78, 0xee, 0xc9, 0xab, 0xef, 0x33, 0x9e, - 0xbb, 0x9c, 0xf1, 0xdc, 0xcf, 0x19, 0xcf, 0x7d, 0x9c, 0xf3, 0x89, 0xcb, 0x39, 0x9f, 0xf8, 0x31, - 0xe7, 0x13, 0xaf, 0x8f, 0x47, 0x98, 0x9a, 0xfe, 0xa0, 0xae, 0x93, 0x73, 0xc1, 0xf1, 0x3d, 0x53, - 0x37, 0x35, 0x6c, 0xb3, 0xd7, 0x21, 0x7b, 0x1e, 0xda, 0xc4, 0x40, 0xc2, 0x5b, 0x21, 0x76, 0x35, - 0x9d, 0x3a, 0xc8, 0x1b, 0xa4, 0xd9, 0x27, 0x7a, 0xff, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, - 0x42, 0xe6, 0xc6, 0xfb, 0x03, 0x00, 0x00, + // 604 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x3d, 0x6f, 0xd3, 0x40, + 0x18, 0xce, 0x25, 0x55, 0x0b, 0x97, 0x26, 0x0a, 0xa7, 0x92, 0x16, 0x97, 0xba, 0x1f, 0x2c, 0x55, + 0x51, 0x63, 0x35, 0x20, 0x55, 0xca, 0x00, 0x84, 0xd6, 0x80, 0x51, 0x65, 0x8a, 0xf3, 0x31, 0xb0, + 0x58, 0x8e, 0x73, 0x89, 0x4f, 0x71, 0x7d, 0x96, 0x7d, 0x0e, 0x64, 0x62, 0x86, 0x09, 0x31, 0x31, + 0x76, 0x60, 0x40, 0x62, 0xe1, 0x67, 0x30, 0x76, 0x64, 0x44, 0xc9, 0x00, 0xbf, 0x02, 0xa1, 0x9c, + 0xed, 0xd8, 0x0d, 0x20, 0xb1, 0x58, 0x77, 0xef, 0xf3, 0x7e, 0x3c, 0xcf, 0xf3, 0x9e, 0xe1, 0x46, + 0x30, 0x34, 0x6c, 0xd2, 0x35, 0x18, 0xf5, 0xa4, 0xe1, 0x81, 0x34, 0xbb, 0x54, 0x5c, 0x8f, 0x32, + 0x8a, 0x0a, 0x09, 0x5c, 0x19, 0x1e, 0x08, 0x2b, 0x7d, 0xda, 0xa7, 0x1c, 0x91, 0xa6, 0xa7, 0x30, + 0x49, 0xb8, 0x66, 0x9c, 0x11, 0x87, 0x4a, 0xfc, 0x1b, 0x86, 0x76, 0x5e, 0xc3, 0x65, 0xa5, 0x8b, + 0x1d, 0x46, 0xd8, 0x48, 0x71, 0x7a, 0x14, 0xdd, 0x85, 0x65, 0x93, 0x7a, 0x58, 0x9f, 0x75, 0xd3, + 0x8d, 0x6e, 0xd7, 0xc3, 0xbe, 0xbf, 0x06, 0xb6, 0xc0, 0xee, 0x55, 0x6d, 0x65, 0x8a, 0xb6, 0x63, + 0xb0, 0x1e, 0x62, 0xa8, 0x0c, 0x17, 0xdd, 0xa0, 0x33, 0xc0, 0xa3, 0xb5, 0x2c, 0xcf, 0x8a, 0x6e, + 0xb5, 0xed, 0x9f, 0xe7, 0x9b, 0xe0, 0xed, 0x8f, 0x2f, 0x7b, 0x6b, 0x29, 0xf6, 0x24, 0x9a, 0xa7, + 0x13, 0xa7, 0x47, 0x77, 0xee, 0xc3, 0xbc, 0x8a, 0xd9, 0x4b, 0xea, 0x0d, 0xf8, 0xfc, 0x22, 0xcc, + 0x12, 0x37, 0x9a, 0x95, 0x25, 0x6e, 0x6d, 0x2b, 0xee, 0xb0, 0x9a, 0xea, 0xe0, 0x84, 0x05, 0x61, + 0x83, 0x37, 0x00, 0x16, 0x4f, 0x48, 0x0f, 0x9b, 0x23, 0xd3, 0xc6, 0xf2, 0x10, 0x3b, 0x0c, 0x49, + 0x70, 0xd1, 0x67, 0x06, 0x0b, 0x42, 0xd2, 0xc5, 0xea, 0x6a, 0xe5, 0x92, 0x3b, 0x95, 0x56, 0xbb, + 0xc1, 0x61, 0x2d, 0x4a, 0x43, 0xdb, 0x70, 0xb9, 0x63, 0x53, 0x73, 0xa0, 0x5b, 0x98, 0xf4, 0x2d, + 0xc6, 0x55, 0xe4, 0xb4, 0x3c, 0x8f, 0x3d, 0xe1, 0xa1, 0xda, 0xad, 0x98, 0x88, 0x90, 0x22, 0x62, + 0xc7, 0x73, 0x75, 0x3c, 0x1d, 0xbc, 0xf3, 0x19, 0xc0, 0xc2, 0x8c, 0x0b, 0xd7, 0x73, 0x0f, 0x16, + 0xcd, 0xc0, 0xf3, 0xb0, 0xc3, 0xf4, 0xff, 0xa3, 0x54, 0x88, 0xd2, 0xc3, 0x2b, 0x3a, 0x84, 0x4b, + 0x16, 0xf1, 0x19, 0xf5, 0xa6, 0xd6, 0xe6, 0x76, 0xf3, 0xd5, 0x8d, 0xb9, 0xc2, 0xcb, 0xd2, 0xb5, + 0x38, 0xfb, 0xef, 0xd6, 0x87, 0x7c, 0x6d, 0x1c, 0x3a, 0xf7, 0x0b, 0x40, 0xd4, 0x72, 0xc8, 0x10, + 0x7b, 0xbe, 0x61, 0xcf, 0x76, 0x8a, 0x1e, 0xc0, 0x42, 0xb8, 0xa2, 0x5e, 0xb8, 0x22, 0xce, 0x38, + 0x5f, 0x5d, 0x9f, 0x1b, 0x9c, 0x7e, 0x36, 0xda, 0x72, 0x5c, 0x11, 0x3d, 0xa2, 0xa5, 0x68, 0x45, + 0xdc, 0xc9, 0x7c, 0x55, 0x98, 0xab, 0x4d, 0x6d, 0x5c, 0x8b, 0x53, 0xd1, 0x11, 0x2c, 0x26, 0x7e, + 0xf2, 0xc1, 0x39, 0x5e, 0x7c, 0xf3, 0x5f, 0x8a, 0x79, 0x79, 0xc1, 0x4e, 0x5f, 0x6b, 0xb7, 0x3f, + 0x9c, 0x6f, 0x66, 0x62, 0xe9, 0x62, 0x4a, 0x7a, 0x10, 0x0b, 0x4d, 0x9e, 0xf6, 0xde, 0x7b, 0x00, + 0xaf, 0xc4, 0xc6, 0xa3, 0x1b, 0xf0, 0x7a, 0xab, 0xad, 0x37, 0x9a, 0xf5, 0x66, 0xab, 0xa1, 0xb7, + 0xd4, 0xc6, 0xa9, 0x7c, 0xa4, 0x3c, 0x52, 0xe4, 0xe3, 0x52, 0x06, 0xad, 0xc0, 0x52, 0x02, 0xd5, + 0x8f, 0x9a, 0x4a, 0x5b, 0x2e, 0x01, 0x24, 0xc0, 0x72, 0x12, 0x3d, 0x95, 0xd5, 0x63, 0x45, 0x7d, + 0xac, 0x3f, 0x7d, 0xa6, 0xa8, 0xa5, 0x2c, 0x5a, 0x87, 0xab, 0x7f, 0x62, 0x27, 0x72, 0xbd, 0x2d, + 0x97, 0x72, 0xa8, 0x0c, 0x51, 0x02, 0x2a, 0x6a, 0xd4, 0x70, 0x41, 0x58, 0xf8, 0xf4, 0x51, 0x04, + 0x0f, 0x9f, 0x7f, 0x1d, 0x8b, 0xe0, 0x62, 0x2c, 0x82, 0xef, 0x63, 0x11, 0xbc, 0x9b, 0x88, 0x99, + 0x8b, 0x89, 0x98, 0xf9, 0x36, 0x11, 0x33, 0x2f, 0x0e, 0xfb, 0x84, 0x59, 0x41, 0xa7, 0x62, 0xd2, + 0x33, 0xc9, 0x0d, 0x7c, 0xcb, 0xb4, 0x0c, 0xe2, 0xf0, 0xd3, 0x3e, 0x3f, 0xee, 0x3b, 0xb4, 0x8b, + 0xa5, 0x57, 0x52, 0x4a, 0x35, 0x1b, 0xb9, 0xd8, 0xef, 0x2c, 0xf2, 0x7f, 0xfd, 0xce, 0xef, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xfa, 0xc5, 0xc5, 0x0d, 0x44, 0x04, 0x00, 0x00, } func (this *IdentityInfo) Equal(that interface{}) bool { @@ -426,6 +427,65 @@ func (this *NetworkInfo) Equal(that interface{}) bool { } return true } +func (this *LifecycleEvent) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*LifecycleEvent) + if !ok { + that2, ok := that.(LifecycleEvent) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Status != that1.Status { + return false + } + if this.BlockHeight != that1.BlockHeight { + return false + } + return true +} +func (this *LifecycleInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*LifecycleInfo) + if !ok { + that2, ok := that.(LifecycleInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CurrentStatus != that1.CurrentStatus { + return false + } + if len(this.History) != len(that1.History) { + return false + } + for i := range this.History { + if !this.History[i].Equal(that1.History[i]) { + return false + } + } + return true +} func (this *UniversalValidator) Equal(that interface{}) bool { if that == nil { return this == nil From 883e80035a923275e2c556a0c686402c68575a95 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 6 Nov 2025 13:33:18 +0530 Subject: [PATCH 016/105] refactor: updated universal_validator network info nomenclature --- api/uvalidator/v1/validator.pulsar.go | 130 +++++++++++----------- proto/uvalidator/v1/validator.proto | 2 +- x/uvalidator/types/universal_validator.go | 2 +- x/uvalidator/types/validator.pb.go | 103 ++++++++--------- 4 files changed, 119 insertions(+), 118 deletions(-) diff --git a/api/uvalidator/v1/validator.pulsar.go b/api/uvalidator/v1/validator.pulsar.go index 26855162..b34f0a2d 100644 --- a/api/uvalidator/v1/validator.pulsar.go +++ b/api/uvalidator/v1/validator.pulsar.go @@ -1915,7 +1915,7 @@ func (x *fastReflection_LifecycleInfo) ProtoMethods() *protoiface.Methods { var ( md_UniversalValidator protoreflect.MessageDescriptor fd_UniversalValidator_identify_info protoreflect.FieldDescriptor - fd_UniversalValidator_network protoreflect.FieldDescriptor + fd_UniversalValidator_network_info protoreflect.FieldDescriptor fd_UniversalValidator_lifecycle_info protoreflect.FieldDescriptor ) @@ -1923,7 +1923,7 @@ func init() { file_uvalidator_v1_validator_proto_init() md_UniversalValidator = File_uvalidator_v1_validator_proto.Messages().ByName("UniversalValidator") fd_UniversalValidator_identify_info = md_UniversalValidator.Fields().ByName("identify_info") - fd_UniversalValidator_network = md_UniversalValidator.Fields().ByName("network") + fd_UniversalValidator_network_info = md_UniversalValidator.Fields().ByName("network_info") fd_UniversalValidator_lifecycle_info = md_UniversalValidator.Fields().ByName("lifecycle_info") } @@ -1998,9 +1998,9 @@ func (x *fastReflection_UniversalValidator) Range(f func(protoreflect.FieldDescr return } } - if x.Network != nil { - value := protoreflect.ValueOfMessage(x.Network.ProtoReflect()) - if !f(fd_UniversalValidator_network, value) { + if x.NetworkInfo != nil { + value := protoreflect.ValueOfMessage(x.NetworkInfo.ProtoReflect()) + if !f(fd_UniversalValidator_network_info, value) { return } } @@ -2027,8 +2027,8 @@ func (x *fastReflection_UniversalValidator) Has(fd protoreflect.FieldDescriptor) switch fd.FullName() { case "uvalidator.v1.UniversalValidator.identify_info": return x.IdentifyInfo != nil - case "uvalidator.v1.UniversalValidator.network": - return x.Network != nil + case "uvalidator.v1.UniversalValidator.network_info": + return x.NetworkInfo != nil case "uvalidator.v1.UniversalValidator.lifecycle_info": return x.LifecycleInfo != nil default: @@ -2049,8 +2049,8 @@ func (x *fastReflection_UniversalValidator) Clear(fd protoreflect.FieldDescripto switch fd.FullName() { case "uvalidator.v1.UniversalValidator.identify_info": x.IdentifyInfo = nil - case "uvalidator.v1.UniversalValidator.network": - x.Network = nil + case "uvalidator.v1.UniversalValidator.network_info": + x.NetworkInfo = nil case "uvalidator.v1.UniversalValidator.lifecycle_info": x.LifecycleInfo = nil default: @@ -2072,8 +2072,8 @@ func (x *fastReflection_UniversalValidator) Get(descriptor protoreflect.FieldDes case "uvalidator.v1.UniversalValidator.identify_info": value := x.IdentifyInfo return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "uvalidator.v1.UniversalValidator.network": - value := x.Network + case "uvalidator.v1.UniversalValidator.network_info": + value := x.NetworkInfo return protoreflect.ValueOfMessage(value.ProtoReflect()) case "uvalidator.v1.UniversalValidator.lifecycle_info": value := x.LifecycleInfo @@ -2100,8 +2100,8 @@ func (x *fastReflection_UniversalValidator) Set(fd protoreflect.FieldDescriptor, switch fd.FullName() { case "uvalidator.v1.UniversalValidator.identify_info": x.IdentifyInfo = value.Message().Interface().(*IdentityInfo) - case "uvalidator.v1.UniversalValidator.network": - x.Network = value.Message().Interface().(*NetworkInfo) + case "uvalidator.v1.UniversalValidator.network_info": + x.NetworkInfo = value.Message().Interface().(*NetworkInfo) case "uvalidator.v1.UniversalValidator.lifecycle_info": x.LifecycleInfo = value.Message().Interface().(*LifecycleInfo) default: @@ -2129,11 +2129,11 @@ func (x *fastReflection_UniversalValidator) Mutable(fd protoreflect.FieldDescrip x.IdentifyInfo = new(IdentityInfo) } return protoreflect.ValueOfMessage(x.IdentifyInfo.ProtoReflect()) - case "uvalidator.v1.UniversalValidator.network": - if x.Network == nil { - x.Network = new(NetworkInfo) + case "uvalidator.v1.UniversalValidator.network_info": + if x.NetworkInfo == nil { + x.NetworkInfo = new(NetworkInfo) } - return protoreflect.ValueOfMessage(x.Network.ProtoReflect()) + return protoreflect.ValueOfMessage(x.NetworkInfo.ProtoReflect()) case "uvalidator.v1.UniversalValidator.lifecycle_info": if x.LifecycleInfo == nil { x.LifecycleInfo = new(LifecycleInfo) @@ -2155,7 +2155,7 @@ func (x *fastReflection_UniversalValidator) NewField(fd protoreflect.FieldDescri case "uvalidator.v1.UniversalValidator.identify_info": m := new(IdentityInfo) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "uvalidator.v1.UniversalValidator.network": + case "uvalidator.v1.UniversalValidator.network_info": m := new(NetworkInfo) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "uvalidator.v1.UniversalValidator.lifecycle_info": @@ -2234,8 +2234,8 @@ func (x *fastReflection_UniversalValidator) ProtoMethods() *protoiface.Methods { l = options.Size(x.IdentifyInfo) n += 1 + l + runtime.Sov(uint64(l)) } - if x.Network != nil { - l = options.Size(x.Network) + if x.NetworkInfo != nil { + l = options.Size(x.NetworkInfo) n += 1 + l + runtime.Sov(uint64(l)) } if x.LifecycleInfo != nil { @@ -2285,8 +2285,8 @@ func (x *fastReflection_UniversalValidator) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x1a } - if x.Network != nil { - encoded, err := options.Marshal(x.Network) + if x.NetworkInfo != nil { + encoded, err := options.Marshal(x.NetworkInfo) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2400,7 +2400,7 @@ func (x *fastReflection_UniversalValidator) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NetworkInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2427,10 +2427,10 @@ func (x *fastReflection_UniversalValidator) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Network == nil { - x.Network = &NetworkInfo{} + if x.NetworkInfo == nil { + x.NetworkInfo = &NetworkInfo{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Network); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.NetworkInfo); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -2749,7 +2749,7 @@ type UniversalValidator struct { unknownFields protoimpl.UnknownFields IdentifyInfo *IdentityInfo `protobuf:"bytes,1,opt,name=identify_info,json=identifyInfo,proto3" json:"identify_info,omitempty"` // Identity info of the validator - Network *NetworkInfo `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` // Metadata for networking + NetworkInfo *NetworkInfo `protobuf:"bytes,2,opt,name=network_info,json=networkInfo,proto3" json:"network_info,omitempty"` // Metadata for networking LifecycleInfo *LifecycleInfo `protobuf:"bytes,3,opt,name=lifecycle_info,json=lifecycleInfo,proto3" json:"lifecycle_info,omitempty"` // Lifecyle info of the validator } @@ -2780,9 +2780,9 @@ func (x *UniversalValidator) GetIdentifyInfo() *IdentityInfo { return nil } -func (x *UniversalValidator) GetNetwork() *NetworkInfo { +func (x *UniversalValidator) GetNetworkInfo() *NetworkInfo { if x != nil { - return x.Network + return x.NetworkInfo } return nil } @@ -2834,45 +2834,45 @@ var file_uvalidator_v1_validator_proto_rawDesc = []byte{ 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x3a, 0x21, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x6c, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x22, 0xfe, 0x01, 0x0a, 0x12, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x6e, 0x66, 0x6f, 0x22, 0x87, 0x02, 0x0a, 0x12, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x40, 0x0a, 0x0d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x07, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, - 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x12, 0x43, 0x0a, 0x0e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, - 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, - 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, - 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x2b, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x2a, 0x92, 0x01, 0x0a, 0x08, 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, - 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, - 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x1b, - 0x0a, 0x17, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, - 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x55, - 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, - 0x45, 0x10, 0x04, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xbd, 0x01, 0x0a, 0x11, 0x63, 0x6f, - 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, - 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, - 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0c, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x43, 0x0a, 0x0e, 0x6c, + 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x0d, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x3a, 0x2b, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2a, 0x92, 0x01, + 0x0a, 0x08, 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x56, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, + 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, + 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x56, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x45, 0x41, + 0x56, 0x45, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x1a, 0x04, 0xa8, 0xa4, + 0x1e, 0x01, 0x42, 0xbd, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, + 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2902,7 +2902,7 @@ var file_uvalidator_v1_validator_proto_depIdxs = []int32{ 0, // 1: uvalidator.v1.LifecycleInfo.current_status:type_name -> uvalidator.v1.UVStatus 3, // 2: uvalidator.v1.LifecycleInfo.history:type_name -> uvalidator.v1.LifecycleEvent 1, // 3: uvalidator.v1.UniversalValidator.identify_info:type_name -> uvalidator.v1.IdentityInfo - 2, // 4: uvalidator.v1.UniversalValidator.network:type_name -> uvalidator.v1.NetworkInfo + 2, // 4: uvalidator.v1.UniversalValidator.network_info:type_name -> uvalidator.v1.NetworkInfo 4, // 5: uvalidator.v1.UniversalValidator.lifecycle_info:type_name -> uvalidator.v1.LifecycleInfo 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type diff --git a/proto/uvalidator/v1/validator.proto b/proto/uvalidator/v1/validator.proto index 1fa2bb17..66ac59d3 100644 --- a/proto/uvalidator/v1/validator.proto +++ b/proto/uvalidator/v1/validator.proto @@ -59,6 +59,6 @@ message UniversalValidator { option (gogoproto.goproto_stringer) = false; IdentityInfo identify_info = 1; // Identity info of the validator - NetworkInfo network = 2; // Metadata for networking + NetworkInfo network_info = 2; // Metadata for networking LifecycleInfo lifecycle_info = 3; // Lifecyle info of the validator } \ No newline at end of file diff --git a/x/uvalidator/types/universal_validator.go b/x/uvalidator/types/universal_validator.go index add490bc..0777df5a 100644 --- a/x/uvalidator/types/universal_validator.go +++ b/x/uvalidator/types/universal_validator.go @@ -31,7 +31,7 @@ func (p UniversalValidator) ValidateBasic() error { } // Validate identity info - if err := p.Network.ValidateBasic(); err != nil { + if err := p.NetworkInfo.ValidateBasic(); err != nil { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid network info [%d]: %v", err) } diff --git a/x/uvalidator/types/validator.pb.go b/x/uvalidator/types/validator.pb.go index 88fda8d2..c65f3b38 100644 --- a/x/uvalidator/types/validator.pb.go +++ b/x/uvalidator/types/validator.pb.go @@ -266,7 +266,7 @@ func (m *LifecycleInfo) GetHistory() []*LifecycleEvent { // Core Universal Validator object type UniversalValidator struct { IdentifyInfo *IdentityInfo `protobuf:"bytes,1,opt,name=identify_info,json=identifyInfo,proto3" json:"identify_info,omitempty"` - Network *NetworkInfo `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` + NetworkInfo *NetworkInfo `protobuf:"bytes,2,opt,name=network_info,json=networkInfo,proto3" json:"network_info,omitempty"` LifecycleInfo *LifecycleInfo `protobuf:"bytes,3,opt,name=lifecycle_info,json=lifecycleInfo,proto3" json:"lifecycle_info,omitempty"` } @@ -309,9 +309,9 @@ func (m *UniversalValidator) GetIdentifyInfo() *IdentityInfo { return nil } -func (m *UniversalValidator) GetNetwork() *NetworkInfo { +func (m *UniversalValidator) GetNetworkInfo() *NetworkInfo { if m != nil { - return m.Network + return m.NetworkInfo } return nil } @@ -335,45 +335,46 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/validator.proto", fileDescriptor_317d9e276ec46d00) } var fileDescriptor_317d9e276ec46d00 = []byte{ - // 604 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x3d, 0x6f, 0xd3, 0x40, - 0x18, 0xce, 0x25, 0x55, 0x0b, 0x97, 0x26, 0x0a, 0xa7, 0x92, 0x16, 0x97, 0xba, 0x1f, 0x2c, 0x55, - 0x51, 0x63, 0x35, 0x20, 0x55, 0xca, 0x00, 0x84, 0xd6, 0x80, 0x51, 0x65, 0x8a, 0xf3, 0x31, 0xb0, - 0x58, 0x8e, 0x73, 0x89, 0x4f, 0x71, 0x7d, 0x96, 0x7d, 0x0e, 0x64, 0x62, 0x86, 0x09, 0x31, 0x31, - 0x76, 0x60, 0x40, 0x62, 0xe1, 0x67, 0x30, 0x76, 0x64, 0x44, 0xc9, 0x00, 0xbf, 0x02, 0xa1, 0x9c, - 0xed, 0xd8, 0x0d, 0x20, 0xb1, 0x58, 0x77, 0xef, 0xf3, 0x7e, 0x3c, 0xcf, 0xf3, 0x9e, 0xe1, 0x46, - 0x30, 0x34, 0x6c, 0xd2, 0x35, 0x18, 0xf5, 0xa4, 0xe1, 0x81, 0x34, 0xbb, 0x54, 0x5c, 0x8f, 0x32, - 0x8a, 0x0a, 0x09, 0x5c, 0x19, 0x1e, 0x08, 0x2b, 0x7d, 0xda, 0xa7, 0x1c, 0x91, 0xa6, 0xa7, 0x30, - 0x49, 0xb8, 0x66, 0x9c, 0x11, 0x87, 0x4a, 0xfc, 0x1b, 0x86, 0x76, 0x5e, 0xc3, 0x65, 0xa5, 0x8b, - 0x1d, 0x46, 0xd8, 0x48, 0x71, 0x7a, 0x14, 0xdd, 0x85, 0x65, 0x93, 0x7a, 0x58, 0x9f, 0x75, 0xd3, - 0x8d, 0x6e, 0xd7, 0xc3, 0xbe, 0xbf, 0x06, 0xb6, 0xc0, 0xee, 0x55, 0x6d, 0x65, 0x8a, 0xb6, 0x63, - 0xb0, 0x1e, 0x62, 0xa8, 0x0c, 0x17, 0xdd, 0xa0, 0x33, 0xc0, 0xa3, 0xb5, 0x2c, 0xcf, 0x8a, 0x6e, - 0xb5, 0xed, 0x9f, 0xe7, 0x9b, 0xe0, 0xed, 0x8f, 0x2f, 0x7b, 0x6b, 0x29, 0xf6, 0x24, 0x9a, 0xa7, - 0x13, 0xa7, 0x47, 0x77, 0xee, 0xc3, 0xbc, 0x8a, 0xd9, 0x4b, 0xea, 0x0d, 0xf8, 0xfc, 0x22, 0xcc, - 0x12, 0x37, 0x9a, 0x95, 0x25, 0x6e, 0x6d, 0x2b, 0xee, 0xb0, 0x9a, 0xea, 0xe0, 0x84, 0x05, 0x61, - 0x83, 0x37, 0x00, 0x16, 0x4f, 0x48, 0x0f, 0x9b, 0x23, 0xd3, 0xc6, 0xf2, 0x10, 0x3b, 0x0c, 0x49, - 0x70, 0xd1, 0x67, 0x06, 0x0b, 0x42, 0xd2, 0xc5, 0xea, 0x6a, 0xe5, 0x92, 0x3b, 0x95, 0x56, 0xbb, - 0xc1, 0x61, 0x2d, 0x4a, 0x43, 0xdb, 0x70, 0xb9, 0x63, 0x53, 0x73, 0xa0, 0x5b, 0x98, 0xf4, 0x2d, - 0xc6, 0x55, 0xe4, 0xb4, 0x3c, 0x8f, 0x3d, 0xe1, 0xa1, 0xda, 0xad, 0x98, 0x88, 0x90, 0x22, 0x62, - 0xc7, 0x73, 0x75, 0x3c, 0x1d, 0xbc, 0xf3, 0x19, 0xc0, 0xc2, 0x8c, 0x0b, 0xd7, 0x73, 0x0f, 0x16, - 0xcd, 0xc0, 0xf3, 0xb0, 0xc3, 0xf4, 0xff, 0xa3, 0x54, 0x88, 0xd2, 0xc3, 0x2b, 0x3a, 0x84, 0x4b, - 0x16, 0xf1, 0x19, 0xf5, 0xa6, 0xd6, 0xe6, 0x76, 0xf3, 0xd5, 0x8d, 0xb9, 0xc2, 0xcb, 0xd2, 0xb5, - 0x38, 0xfb, 0xef, 0xd6, 0x87, 0x7c, 0x6d, 0x1c, 0x3a, 0xf7, 0x0b, 0x40, 0xd4, 0x72, 0xc8, 0x10, - 0x7b, 0xbe, 0x61, 0xcf, 0x76, 0x8a, 0x1e, 0xc0, 0x42, 0xb8, 0xa2, 0x5e, 0xb8, 0x22, 0xce, 0x38, - 0x5f, 0x5d, 0x9f, 0x1b, 0x9c, 0x7e, 0x36, 0xda, 0x72, 0x5c, 0x11, 0x3d, 0xa2, 0xa5, 0x68, 0x45, - 0xdc, 0xc9, 0x7c, 0x55, 0x98, 0xab, 0x4d, 0x6d, 0x5c, 0x8b, 0x53, 0xd1, 0x11, 0x2c, 0x26, 0x7e, - 0xf2, 0xc1, 0x39, 0x5e, 0x7c, 0xf3, 0x5f, 0x8a, 0x79, 0x79, 0xc1, 0x4e, 0x5f, 0x6b, 0xb7, 0x3f, - 0x9c, 0x6f, 0x66, 0x62, 0xe9, 0x62, 0x4a, 0x7a, 0x10, 0x0b, 0x4d, 0x9e, 0xf6, 0xde, 0x7b, 0x00, - 0xaf, 0xc4, 0xc6, 0xa3, 0x1b, 0xf0, 0x7a, 0xab, 0xad, 0x37, 0x9a, 0xf5, 0x66, 0xab, 0xa1, 0xb7, - 0xd4, 0xc6, 0xa9, 0x7c, 0xa4, 0x3c, 0x52, 0xe4, 0xe3, 0x52, 0x06, 0xad, 0xc0, 0x52, 0x02, 0xd5, - 0x8f, 0x9a, 0x4a, 0x5b, 0x2e, 0x01, 0x24, 0xc0, 0x72, 0x12, 0x3d, 0x95, 0xd5, 0x63, 0x45, 0x7d, - 0xac, 0x3f, 0x7d, 0xa6, 0xa8, 0xa5, 0x2c, 0x5a, 0x87, 0xab, 0x7f, 0x62, 0x27, 0x72, 0xbd, 0x2d, - 0x97, 0x72, 0xa8, 0x0c, 0x51, 0x02, 0x2a, 0x6a, 0xd4, 0x70, 0x41, 0x58, 0xf8, 0xf4, 0x51, 0x04, - 0x0f, 0x9f, 0x7f, 0x1d, 0x8b, 0xe0, 0x62, 0x2c, 0x82, 0xef, 0x63, 0x11, 0xbc, 0x9b, 0x88, 0x99, - 0x8b, 0x89, 0x98, 0xf9, 0x36, 0x11, 0x33, 0x2f, 0x0e, 0xfb, 0x84, 0x59, 0x41, 0xa7, 0x62, 0xd2, - 0x33, 0xc9, 0x0d, 0x7c, 0xcb, 0xb4, 0x0c, 0xe2, 0xf0, 0xd3, 0x3e, 0x3f, 0xee, 0x3b, 0xb4, 0x8b, - 0xa5, 0x57, 0x52, 0x4a, 0x35, 0x1b, 0xb9, 0xd8, 0xef, 0x2c, 0xf2, 0x7f, 0xfd, 0xce, 0xef, 0x00, - 0x00, 0x00, 0xff, 0xff, 0xfa, 0xc5, 0xc5, 0x0d, 0x44, 0x04, 0x00, 0x00, + // 609 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0x8e, 0x93, 0xaa, 0xc0, 0x39, 0x89, 0xc2, 0xa9, 0xa4, 0xc5, 0xa5, 0xee, 0x0f, 0x96, 0xaa, + 0xa8, 0xb1, 0x1a, 0x90, 0x2a, 0x45, 0xe2, 0x47, 0x48, 0x0d, 0x18, 0x55, 0xa6, 0x38, 0x3f, 0x06, + 0x16, 0xcb, 0x71, 0x2e, 0xf1, 0x29, 0xae, 0xcf, 0xb2, 0xcf, 0x81, 0x4c, 0x8c, 0x08, 0x26, 0xc4, + 0xc4, 0xd8, 0x81, 0x01, 0x89, 0x85, 0x3f, 0x83, 0xb1, 0x23, 0x23, 0x4a, 0x06, 0xf8, 0x33, 0x50, + 0xce, 0x76, 0xec, 0x06, 0x90, 0x58, 0xac, 0x7b, 0xef, 0x7b, 0xf7, 0xbd, 0xef, 0x7d, 0xef, 0x0c, + 0x36, 0x82, 0x91, 0x61, 0xe3, 0x9e, 0x41, 0x89, 0x27, 0x8d, 0x0e, 0xa4, 0x79, 0x50, 0x71, 0x3d, + 0x42, 0x09, 0x2c, 0x24, 0x70, 0x65, 0x74, 0x20, 0xac, 0x0c, 0xc8, 0x80, 0x30, 0x44, 0x9a, 0x9d, + 0xc2, 0x22, 0xe1, 0xaa, 0x71, 0x8a, 0x1d, 0x22, 0xb1, 0x6f, 0x98, 0xda, 0x79, 0x0d, 0xf2, 0x4a, + 0x0f, 0x39, 0x14, 0xd3, 0xb1, 0xe2, 0xf4, 0x09, 0xbc, 0x03, 0xca, 0x26, 0xf1, 0x90, 0x3e, 0x67, + 0xd3, 0x8d, 0x5e, 0xcf, 0x43, 0xbe, 0xbf, 0xc6, 0x6d, 0x71, 0xbb, 0x57, 0xb4, 0x95, 0x19, 0xda, + 0x89, 0xc1, 0x7a, 0x88, 0xc1, 0x32, 0x58, 0x76, 0x83, 0xee, 0x10, 0x8d, 0xd7, 0xb2, 0xac, 0x2a, + 0x8a, 0x6a, 0xdb, 0xbf, 0xce, 0x36, 0xb9, 0x77, 0x3f, 0xbf, 0xee, 0xad, 0xa5, 0xd4, 0xe3, 0xa8, + 0x9f, 0x8e, 0x9d, 0x3e, 0xd9, 0xb9, 0x0f, 0x78, 0x15, 0xd1, 0x97, 0xc4, 0x1b, 0xb2, 0xfe, 0x45, + 0x90, 0xc5, 0x6e, 0xd4, 0x2b, 0x8b, 0xdd, 0xda, 0x56, 0xcc, 0xb0, 0x9a, 0x62, 0x70, 0xc2, 0x0b, + 0x21, 0xc1, 0x5b, 0x0e, 0x14, 0x8f, 0x71, 0x1f, 0x99, 0x63, 0xd3, 0x46, 0xf2, 0x08, 0x39, 0x14, + 0x4a, 0x60, 0xd9, 0xa7, 0x06, 0x0d, 0x42, 0xd1, 0xc5, 0xea, 0x6a, 0xe5, 0x82, 0x3b, 0x95, 0x76, + 0xa7, 0xc9, 0x60, 0x2d, 0x2a, 0x83, 0xdb, 0x20, 0xdf, 0xb5, 0x89, 0x39, 0xd4, 0x2d, 0x84, 0x07, + 0x16, 0x65, 0x53, 0xe4, 0x34, 0x9e, 0xe5, 0x9e, 0xb0, 0x54, 0xed, 0x66, 0x2c, 0x44, 0x48, 0x09, + 0xb1, 0xe3, 0xbe, 0x3a, 0x9a, 0x35, 0xde, 0xf9, 0xc2, 0x81, 0xc2, 0x5c, 0x0b, 0x9b, 0xe7, 0x1e, + 0x28, 0x9a, 0x81, 0xe7, 0x21, 0x87, 0xea, 0xff, 0x27, 0xa9, 0x10, 0x95, 0x87, 0x21, 0x3c, 0x04, + 0x97, 0x2c, 0xec, 0x53, 0xe2, 0xcd, 0xac, 0xcd, 0xed, 0xf2, 0xd5, 0x8d, 0x85, 0x8b, 0x17, 0x47, + 0xd7, 0xe2, 0xea, 0xbf, 0x5b, 0x1f, 0xea, 0xb5, 0x51, 0xe8, 0xdc, 0x9b, 0x2c, 0x80, 0x6d, 0x07, + 0x8f, 0x90, 0xe7, 0x1b, 0xf6, 0x7c, 0xa7, 0xf0, 0x01, 0x28, 0x84, 0x2b, 0xea, 0x87, 0x2b, 0x62, + 0x8a, 0xf9, 0xea, 0xfa, 0x42, 0xe3, 0xf4, 0xb3, 0xd1, 0xf2, 0xf1, 0x0d, 0x36, 0xf4, 0x5d, 0x90, + 0x4f, 0xaf, 0x88, 0xd9, 0xc9, 0x57, 0x85, 0x05, 0x82, 0xd4, 0xda, 0x35, 0xde, 0x49, 0xbd, 0x81, + 0x06, 0x28, 0x26, 0xc6, 0x32, 0x82, 0x1c, 0x23, 0xb8, 0xf1, 0xaf, 0xd1, 0x19, 0x45, 0xc1, 0x4e, + 0x87, 0xb5, 0x5b, 0x1f, 0xcf, 0x36, 0x33, 0xb1, 0x07, 0x62, 0xca, 0x83, 0x20, 0x9e, 0x38, 0x79, + 0xe3, 0x7b, 0x1f, 0x38, 0x70, 0x39, 0xde, 0x00, 0xbc, 0x0e, 0xae, 0xb5, 0x3b, 0x7a, 0xb3, 0x55, + 0x6f, 0xb5, 0x9b, 0x7a, 0x5b, 0x6d, 0x9e, 0xc8, 0x0d, 0xe5, 0x91, 0x22, 0x1f, 0x95, 0x32, 0x70, + 0x05, 0x94, 0x12, 0xa8, 0xde, 0x68, 0x29, 0x1d, 0xb9, 0xc4, 0x41, 0x01, 0x94, 0x93, 0xec, 0x89, + 0xac, 0x1e, 0x29, 0xea, 0x63, 0xfd, 0xe9, 0x33, 0x45, 0x2d, 0x65, 0xe1, 0x3a, 0x58, 0xfd, 0x13, + 0x3b, 0x96, 0xeb, 0x1d, 0xb9, 0x94, 0x83, 0x65, 0x00, 0x13, 0x50, 0x51, 0x23, 0xc2, 0x25, 0x61, + 0xe9, 0xf3, 0x27, 0x91, 0x7b, 0xf8, 0xfc, 0xdb, 0x44, 0xe4, 0xce, 0x27, 0x22, 0xf7, 0x63, 0x22, + 0x72, 0xef, 0xa7, 0x62, 0xe6, 0x7c, 0x2a, 0x66, 0xbe, 0x4f, 0xc5, 0xcc, 0x8b, 0xc3, 0x01, 0xa6, + 0x56, 0xd0, 0xad, 0x98, 0xe4, 0x54, 0x72, 0x03, 0xdf, 0x32, 0x2d, 0x03, 0x3b, 0xec, 0xb4, 0xcf, + 0x8e, 0xfb, 0x0e, 0xe9, 0x21, 0xe9, 0x95, 0x94, 0x9a, 0x9a, 0x8e, 0x5d, 0xe4, 0x77, 0x97, 0xd9, + 0x4f, 0x7f, 0xfb, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xa2, 0xcf, 0xf6, 0x4d, 0x04, 0x00, + 0x00, } func (this *IdentityInfo) Equal(that interface{}) bool { @@ -508,7 +509,7 @@ func (this *UniversalValidator) Equal(that interface{}) bool { if !this.IdentifyInfo.Equal(that1.IdentifyInfo) { return false } - if !this.Network.Equal(that1.Network) { + if !this.NetworkInfo.Equal(that1.NetworkInfo) { return false } if !this.LifecycleInfo.Equal(that1.LifecycleInfo) { @@ -690,9 +691,9 @@ func (m *UniversalValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if m.Network != nil { + if m.NetworkInfo != nil { { - size, err := m.Network.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.NetworkInfo.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -801,8 +802,8 @@ func (m *UniversalValidator) Size() (n int) { l = m.IdentifyInfo.Size() n += 1 + l + sovValidator(uint64(l)) } - if m.Network != nil { - l = m.Network.Size() + if m.NetworkInfo != nil { + l = m.NetworkInfo.Size() n += 1 + l + sovValidator(uint64(l)) } if m.LifecycleInfo != nil { @@ -1272,7 +1273,7 @@ func (m *UniversalValidator) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NetworkInfo", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1299,10 +1300,10 @@ func (m *UniversalValidator) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Network == nil { - m.Network = &NetworkInfo{} + if m.NetworkInfo == nil { + m.NetworkInfo = &NetworkInfo{} } - if err := m.Network.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.NetworkInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From c5a42c2a7fa47ede01814a0f4e819f95119278c2 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 7 Nov 2025 13:16:15 +0530 Subject: [PATCH 017/105] refactor: fixed universal validator validate basic --- x/uvalidator/types/universal_validator.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x/uvalidator/types/universal_validator.go b/x/uvalidator/types/universal_validator.go index 0777df5a..154fecc6 100644 --- a/x/uvalidator/types/universal_validator.go +++ b/x/uvalidator/types/universal_validator.go @@ -22,17 +22,17 @@ func (p UniversalValidator) ValidateBasic() error { // Validate identity info if err := p.IdentifyInfo.ValidateBasic(); err != nil { - return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid identify info [%d]: %v", err) + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid identify info: %v", err) } - // Validate identity info + // Validate lifecycle info if err := p.LifecycleInfo.ValidateBasic(); err != nil { - return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid lifecycle info [%d]: %v", err) + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid lifecycle info: %v", err) } - // Validate identity info + // Validate network info if err := p.NetworkInfo.ValidateBasic(); err != nil { - return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid network info [%d]: %v", err) + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid network info: %v", err) } return nil From 819e67d7c10381e7a1e1fa80d3743aefae894580 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 7 Nov 2025 13:16:54 +0530 Subject: [PATCH 018/105] feat: modified the universal validator storage from a set of string to a map --- x/uvalidator/keeper/keeper.go | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/x/uvalidator/keeper/keeper.go b/x/uvalidator/keeper/keeper.go index b9ca6d53..b6739588 100755 --- a/x/uvalidator/keeper/keeper.go +++ b/x/uvalidator/keeper/keeper.go @@ -22,8 +22,9 @@ type Keeper struct { logger log.Logger // state management - Params collections.Item[types.Params] - UniversalValidatorSet collections.KeySet[sdk.ValAddress] // Set of all registered Universal Validator addresses + Params collections.Item[types.Params] + // TODO: write the migration from sdk.ValAddress to current structure + UniversalValidatorSet collections.Map[sdk.ValAddress, types.UniversalValidator] // Set of all registered Universal Validator addresses // Ballots management Ballots collections.Map[string, types.Ballot] // stores the actual ballot object, keyed by ballot ID @@ -60,11 +61,12 @@ func NewKeeper( Params: collections.NewItem(sb, types.ParamsKey, types.ParamsName, codec.CollValue[types.Params](cdc)), - UniversalValidatorSet: collections.NewKeySet( + UniversalValidatorSet: collections.NewMap( sb, types.CoreValidatorSetKey, types.CoreValidatorSetName, sdk.ValAddressKey, + codec.CollValue[types.UniversalValidator](cdc), ), // Ballot collections @@ -119,10 +121,6 @@ func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { } } -func (k Keeper) AddUniversalValidatorToSet(ctx context.Context, uvAddr sdk.ValAddress) error { - return k.UniversalValidatorSet.Set(ctx, uvAddr) -} - func (k Keeper) HasUniversalValidatorInSet(ctx context.Context, uvAddr sdk.ValAddress) (bool, error) { return k.UniversalValidatorSet.Has(ctx, uvAddr) } @@ -135,18 +133,3 @@ func (k Keeper) GetBlockHeight(ctx context.Context) (int64, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) return sdkCtx.BlockHeight(), nil } - -// Returns the universal validator set -func (k Keeper) GetUniversalValidatorSet(ctx context.Context) ([]sdk.ValAddress, error) { - var validators []sdk.ValAddress - - err := k.UniversalValidatorSet.Walk(ctx, nil, func(key sdk.ValAddress) (stop bool, err error) { - validators = append(validators, key) - return false, nil - }) - if err != nil { - return nil, err - } - - return validators, nil -} From 3dc6c7cce1e5c50d7407544677bea84d4fb44e90 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 7 Nov 2025 13:17:51 +0530 Subject: [PATCH 019/105] refactor: added keeper methods for new map storage of UV --- x/uvalidator/keeper/validator.go | 111 +++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 x/uvalidator/keeper/validator.go diff --git a/x/uvalidator/keeper/validator.go b/x/uvalidator/keeper/validator.go new file mode 100644 index 00000000..36a72f25 --- /dev/null +++ b/x/uvalidator/keeper/validator.go @@ -0,0 +1,111 @@ +package keeper + +import ( + "context" + "errors" + "fmt" + + "cosmossdk.io/collections" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// GetAllUniversalValidators returns all validators in the UniversalValidatorSet. +func (k Keeper) GetAllUniversalValidators(ctx context.Context) ([]types.UniversalValidator, error) { + var vals []types.UniversalValidator + + err := k.UniversalValidatorSet.Walk(ctx, nil, func(addr sdk.ValAddress, val types.UniversalValidator) (stop bool, err error) { + vals = append(vals, val) + return false, nil + }) + + if err != nil { + return nil, err + } + return vals, nil +} + +// GetValidatorsByStatus returns a list of validators filtered by status (ACTIVE, PENDING_JOIN, etc.). +func (k Keeper) GetValidatorsByStatus(ctx context.Context, status types.UVStatus) ([]types.UniversalValidator, error) { + var vals []types.UniversalValidator + + err := k.UniversalValidatorSet.Walk(ctx, nil, func(addr sdk.ValAddress, val types.UniversalValidator) (stop bool, err error) { + if val.LifecycleInfo.CurrentStatus == status { + vals = append(vals, val) + } + return false, nil + }) + + if err != nil { + return nil, err + } + return vals, nil +} + +// GetEligibleVoters returns all validators that are eligible to vote on external transactions. +// Eligibility: validators with status ACTIVE or PENDING_JOIN. +func (k Keeper) GetEligibleVoters(ctx context.Context) ([]types.UniversalValidator, error) { + var voters []types.UniversalValidator + + err := k.UniversalValidatorSet.Walk(ctx, nil, func(addr sdk.ValAddress, val types.UniversalValidator) (stop bool, err error) { + switch val.LifecycleInfo.CurrentStatus { + case types.UVStatus_UV_STATUS_ACTIVE, types.UVStatus_UV_STATUS_PENDING_JOIN: + voters = append(voters, val) + } + return false, nil + }) + + if err != nil { + return nil, err + } + return voters, nil +} + +// UpdateValidatorStatus updates the validator’s lifecycle status. +// It appends a LifecycleEvent, validates legal transitions, and saves the updated record. +func (k Keeper) UpdateValidatorStatus(ctx context.Context, addr sdk.ValAddress, newStatus types.UVStatus) error { + val, err := k.UniversalValidatorSet.Get(ctx, addr) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return fmt.Errorf("validator %s not found", addr) + } + return err + } + + // Validate status transition + if err := validateStatusTransition(val.LifecycleInfo.CurrentStatus, newStatus); err != nil { + return err + } + + blockHeight := sdk.UnwrapSDKContext(ctx).BlockHeight() + + // Update lifecycle info + event := types.LifecycleEvent{ + Status: newStatus, + BlockHeight: blockHeight, + } + val.LifecycleInfo.History = append(val.LifecycleInfo.History, &event) + val.LifecycleInfo.CurrentStatus = newStatus + + // Save back to state + return k.UniversalValidatorSet.Set(ctx, addr, val) +} + +// validateStatusTransition ensures a validator can only move in a legal state order. +// only strict rule for two cases, pending join -> active & active -> pending_leave +// can see in future if a pending leave could be transitioned to pending_join +func validateStatusTransition(from, to types.UVStatus) error { + switch from { + case types.UVStatus_UV_STATUS_PENDING_JOIN: + if to != types.UVStatus_UV_STATUS_ACTIVE { + return fmt.Errorf("invalid transition: PENDING_JOIN → ACTIVE only, got %s", to) + } + case types.UVStatus_UV_STATUS_ACTIVE: + if to != types.UVStatus_UV_STATUS_PENDING_LEAVE { + return fmt.Errorf("invalid transition: ACTIVE → PENDING_LEAVE only, got %s", to) + } + default: + return fmt.Errorf("unknown current status: %s", from) + } + return nil +} From 43fb157bc7cda93cd7928ec8a21a0607de198d37 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 7 Nov 2025 13:19:07 +0530 Subject: [PATCH 020/105] refactor: modified the msg_add_universal_validator as per uv structure change --- .../keeper/msg_add_universal_validator.go | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/x/uvalidator/keeper/msg_add_universal_validator.go b/x/uvalidator/keeper/msg_add_universal_validator.go index efe507b0..de1af337 100644 --- a/x/uvalidator/keeper/msg_add_universal_validator.go +++ b/x/uvalidator/keeper/msg_add_universal_validator.go @@ -5,13 +5,15 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uvalidator/types" ) // AddUniversalValidator registers a core validator as a universal validator. // It ensures the core validator exists, is bonded, and not already present. func (k Keeper) AddUniversalValidator( ctx context.Context, - coreValidatorAddr string, + coreValidatorAddr, pubkey string, + networkInfo types.NetworkInfo, ) error { sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -39,9 +41,28 @@ func (k Keeper) AddUniversalValidator( return fmt.Errorf("validator %s already registered", coreValidatorAddr) } + initialStatus := types.UVStatus_UV_STATUS_PENDING_JOIN + + uv := types.UniversalValidator{ + IdentifyInfo: &types.IdentityInfo{ + CoreValidatorAddress: coreValidatorAddr, + Pubkey: pubkey, + }, + LifecycleInfo: &types.LifecycleInfo{ + CurrentStatus: initialStatus, + History: []*types.LifecycleEvent{ + { + Status: initialStatus, + BlockHeight: sdkCtx.BlockHeight(), + }, + }, + }, + NetworkInfo: &networkInfo, + } + // Add universal validator to the set - if err := k.AddUniversalValidatorToSet(ctx, valAddr); err != nil { - return err + if err := k.UniversalValidatorSet.Set(ctx, valAddr, uv); err != nil { + return fmt.Errorf("failed to store universal validator: %w", err) } return nil From 244368214a82155ee0000f32689e3a794041af57 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 7 Nov 2025 13:19:18 +0530 Subject: [PATCH 021/105] refactor: modified the msg_remove_universal_validator as per uv structure change --- .../keeper/msg_remove_universal_validator.go | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/x/uvalidator/keeper/msg_remove_universal_validator.go b/x/uvalidator/keeper/msg_remove_universal_validator.go index 3bb25c8a..ec62d417 100644 --- a/x/uvalidator/keeper/msg_remove_universal_validator.go +++ b/x/uvalidator/keeper/msg_remove_universal_validator.go @@ -5,6 +5,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uvalidator/types" ) // RemoveUniversalValidator removes a universal validator from the set and its associated mapping. @@ -19,18 +20,32 @@ func (k Keeper) RemoveUniversalValidator( return fmt.Errorf("invalid universal validator address: %w", err) } - // Check if the universal validator is in the set - exists, err := k.UniversalValidatorSet.Has(ctx, valAddr) + // Fetch validator entry + val, err := k.UniversalValidatorSet.Get(ctx, valAddr) if err != nil { - return fmt.Errorf("failed to check universal validator existence: %w", err) - } - if !exists { - return fmt.Errorf("universal validator %s is not registered", universalValidatorAddr) + return fmt.Errorf("universal validator %s not found: %w", universalValidatorAddr, err) } - // Remove from the set - if err := k.UniversalValidatorSet.Remove(ctx, valAddr); err != nil { - return fmt.Errorf("failed to remove universal validator from set: %w", err) + switch val.LifecycleInfo.CurrentStatus { + case types.UVStatus_UV_STATUS_ACTIVE: + // Active -> Pending Leave + if err := k.UpdateValidatorStatus(ctx, valAddr, types.UVStatus_UV_STATUS_PENDING_LEAVE); err != nil { + return fmt.Errorf("failed to mark validator %s as pending leave: %w", universalValidatorAddr, err) + } + + case types.UVStatus_UV_STATUS_PENDING_JOIN: + // TODO: check if its present in the current tss process + // If part of current keygen, reject removal + // Otherwise mark as inactive + if err := k.UpdateValidatorStatus(ctx, valAddr, types.UVStatus_UV_STATUS_INACTIVE); err != nil { + return fmt.Errorf("failed to inactivate validator %s: %w", universalValidatorAddr, err) + } + + case types.UVStatus_UV_STATUS_PENDING_LEAVE, types.UVStatus_UV_STATUS_INACTIVE: + return fmt.Errorf("validator %s is already in %s state", universalValidatorAddr, val.LifecycleInfo.CurrentStatus) + + default: + return fmt.Errorf("invalid lifecycle state for removal: %s", val.LifecycleInfo.CurrentStatus) } return nil From 3e3ff948f17054a8e7e94cc61f2c1ac9931c8886 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 7 Nov 2025 13:19:58 +0530 Subject: [PATCH 022/105] refactor: modified the voting ballot inbound to only allow active, pending_join UVs to vote --- x/uexecutor/keeper/voting.go | 4 ++-- x/uexecutor/types/expected_keepers.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x/uexecutor/keeper/voting.go b/x/uexecutor/keeper/voting.go index ccb62f6a..5af6a909 100644 --- a/x/uexecutor/keeper/voting.go +++ b/x/uexecutor/keeper/voting.go @@ -27,7 +27,7 @@ func (k Keeper) VoteOnInboundBallot( ballotKey := types.GetInboundKey(inbound) - universalValidatorSet, err := k.uvalidatorKeeper.GetUniversalValidatorSet(ctx) + universalValidatorSet, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) if err != nil { return false, false, err } @@ -42,7 +42,7 @@ func (k Keeper) VoteOnInboundBallot( // Convert []sdk.ValAddress → []string universalValidatorSetStrs := make([]string, len(universalValidatorSet)) for i, v := range universalValidatorSet { - universalValidatorSetStrs[i] = v.String() + universalValidatorSetStrs[i] = v.IdentifyInfo.CoreValidatorAddress } // Step 2: Call VoteOnBallot for this inbound synthetic diff --git a/x/uexecutor/types/expected_keepers.go b/x/uexecutor/types/expected_keepers.go index a193889f..1346328f 100644 --- a/x/uexecutor/types/expected_keepers.go +++ b/x/uexecutor/types/expected_keepers.go @@ -112,7 +112,7 @@ type UValidatorKeeper interface { isFinalized bool, isNew bool, err error) - GetUniversalValidatorSet(ctx context.Context) ([]sdk.ValAddress, error) + GetEligibleVoters(ctx context.Context) ([]uvalidatortypes.UniversalValidator, error) } // ParamSubspace defines the expected Subspace interface for parameters. From a568bd76ddaf92dd4b91c52d82868041a10b9e95 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 7 Nov 2025 13:20:31 +0530 Subject: [PATCH 023/105] refactor: added a new query for single universal validator --- proto/uvalidator/v1/query.proto | 17 ++++++++++++++++- x/uvalidator/keeper/msg_server.go | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/proto/uvalidator/v1/query.proto b/proto/uvalidator/v1/query.proto index 81da4119..929a7766 100755 --- a/proto/uvalidator/v1/query.proto +++ b/proto/uvalidator/v1/query.proto @@ -5,6 +5,7 @@ import "google/api/annotations.proto"; import "uvalidator/v1/genesis.proto"; import "uvalidator/v1/types.proto"; import "uvalidator/v1/ballot.proto"; +import "uvalidator/v1/validator.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; @@ -17,6 +18,11 @@ service Query { option (google.api.http).get = "/uvalidator/v1/params"; } + // UniversalValidator queries one universal validator by core validator address. + rpc UniversalValidator(QueryUniversalValidatorRequest) returns (QueryUniversalValidatorResponse) { + option (google.api.http).get = "/uvalidator/v1/universal_validator/{core_validator_address}"; + } + // AllUniversalValidators queries the details of a specific universal validator by its address. rpc AllUniversalValidators(QueryUniversalValidatorsSetRequest) returns (QueryUniversalValidatorsSetResponse) { option (google.api.http).get = "/uvalidator/v1/universal_validators"; @@ -71,13 +77,22 @@ message QueryParamsResponse { // params defines the parameters of the module. Params params = 1; } + +// Single Universal Validator +message QueryUniversalValidatorRequest { + string core_validator_address = 1; +} +message QueryUniversalValidatorResponse { + UniversalValidator universal_validator = 1; +} + // QueryUniversalValidatorsSetRequest is the request type for Query/UniversalValidatorAddresses. message QueryUniversalValidatorsSetRequest {} // QueryUniversalValidatorsSetResponse is the response type for Query/UniversalValidatorAddresses. message QueryUniversalValidatorsSetResponse { // addresses is the list of all universal validator addresses registered in the module. - repeated string addresses = 1; + repeated UniversalValidator universal_validator = 1; } // Single ballot diff --git a/x/uvalidator/keeper/msg_server.go b/x/uvalidator/keeper/msg_server.go index 947d8b45..c9ee37ae 100755 --- a/x/uvalidator/keeper/msg_server.go +++ b/x/uvalidator/keeper/msg_server.go @@ -48,7 +48,7 @@ func (ms msgServer) AddUniversalValidator(ctx context.Context, msg *types.MsgAdd return nil, errors.Wrapf(sdkErrors.ErrUnauthorized, "invalid authority; expected %s, got %s", params.Admin, msg.Signer) } - err = ms.k.AddUniversalValidator(ctx, msg.CoreValidatorAddress) + err = ms.k.AddUniversalValidator(ctx, msg.CoreValidatorAddress, msg.Pubkey, *msg.Network) if err != nil { return nil, err } From b6230a2242c06b22a832db52401b1161e45f1831 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 7 Nov 2025 13:20:48 +0530 Subject: [PATCH 024/105] refactor: added generated protobuf --- api/uvalidator/v1/query.pulsar.go | 1792 ++++++++++++++++++++++------ api/uvalidator/v1/query_grpc.pb.go | 39 + 2 files changed, 1436 insertions(+), 395 deletions(-) diff --git a/api/uvalidator/v1/query.pulsar.go b/api/uvalidator/v1/query.pulsar.go index 01461d82..1fede0aa 100644 --- a/api/uvalidator/v1/query.pulsar.go +++ b/api/uvalidator/v1/query.pulsar.go @@ -805,6 +805,861 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } } +var ( + md_QueryUniversalValidatorRequest protoreflect.MessageDescriptor + fd_QueryUniversalValidatorRequest_core_validator_address protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_query_proto_init() + md_QueryUniversalValidatorRequest = File_uvalidator_v1_query_proto.Messages().ByName("QueryUniversalValidatorRequest") + fd_QueryUniversalValidatorRequest_core_validator_address = md_QueryUniversalValidatorRequest.Fields().ByName("core_validator_address") +} + +var _ protoreflect.Message = (*fastReflection_QueryUniversalValidatorRequest)(nil) + +type fastReflection_QueryUniversalValidatorRequest QueryUniversalValidatorRequest + +func (x *QueryUniversalValidatorRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryUniversalValidatorRequest)(x) +} + +func (x *QueryUniversalValidatorRequest) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryUniversalValidatorRequest_messageType fastReflection_QueryUniversalValidatorRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryUniversalValidatorRequest_messageType{} + +type fastReflection_QueryUniversalValidatorRequest_messageType struct{} + +func (x fastReflection_QueryUniversalValidatorRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryUniversalValidatorRequest)(nil) +} +func (x fastReflection_QueryUniversalValidatorRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryUniversalValidatorRequest) +} +func (x fastReflection_QueryUniversalValidatorRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUniversalValidatorRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryUniversalValidatorRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUniversalValidatorRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryUniversalValidatorRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryUniversalValidatorRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryUniversalValidatorRequest) New() protoreflect.Message { + return new(fastReflection_QueryUniversalValidatorRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryUniversalValidatorRequest) Interface() protoreflect.ProtoMessage { + return (*QueryUniversalValidatorRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryUniversalValidatorRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CoreValidatorAddress != "" { + value := protoreflect.ValueOfString(x.CoreValidatorAddress) + if !f(fd_QueryUniversalValidatorRequest_core_validator_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryUniversalValidatorRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorRequest.core_validator_address": + return x.CoreValidatorAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorRequest")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUniversalValidatorRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorRequest.core_validator_address": + x.CoreValidatorAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorRequest")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryUniversalValidatorRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.QueryUniversalValidatorRequest.core_validator_address": + value := x.CoreValidatorAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorRequest")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUniversalValidatorRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorRequest.core_validator_address": + x.CoreValidatorAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorRequest")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUniversalValidatorRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorRequest.core_validator_address": + panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.QueryUniversalValidatorRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorRequest")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryUniversalValidatorRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorRequest.core_validator_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorRequest")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryUniversalValidatorRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.QueryUniversalValidatorRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryUniversalValidatorRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUniversalValidatorRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryUniversalValidatorRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryUniversalValidatorRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryUniversalValidatorRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.CoreValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryUniversalValidatorRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.CoreValidatorAddress) > 0 { + i -= len(x.CoreValidatorAddress) + copy(dAtA[i:], x.CoreValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoreValidatorAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryUniversalValidatorRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUniversalValidatorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUniversalValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", 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.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryUniversalValidatorResponse protoreflect.MessageDescriptor + fd_QueryUniversalValidatorResponse_universal_validator protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_query_proto_init() + md_QueryUniversalValidatorResponse = File_uvalidator_v1_query_proto.Messages().ByName("QueryUniversalValidatorResponse") + fd_QueryUniversalValidatorResponse_universal_validator = md_QueryUniversalValidatorResponse.Fields().ByName("universal_validator") +} + +var _ protoreflect.Message = (*fastReflection_QueryUniversalValidatorResponse)(nil) + +type fastReflection_QueryUniversalValidatorResponse QueryUniversalValidatorResponse + +func (x *QueryUniversalValidatorResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryUniversalValidatorResponse)(x) +} + +func (x *QueryUniversalValidatorResponse) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryUniversalValidatorResponse_messageType fastReflection_QueryUniversalValidatorResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryUniversalValidatorResponse_messageType{} + +type fastReflection_QueryUniversalValidatorResponse_messageType struct{} + +func (x fastReflection_QueryUniversalValidatorResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryUniversalValidatorResponse)(nil) +} +func (x fastReflection_QueryUniversalValidatorResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryUniversalValidatorResponse) +} +func (x fastReflection_QueryUniversalValidatorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUniversalValidatorResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryUniversalValidatorResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryUniversalValidatorResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryUniversalValidatorResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryUniversalValidatorResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryUniversalValidatorResponse) New() protoreflect.Message { + return new(fastReflection_QueryUniversalValidatorResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryUniversalValidatorResponse) Interface() protoreflect.ProtoMessage { + return (*QueryUniversalValidatorResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryUniversalValidatorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.UniversalValidator != nil { + value := protoreflect.ValueOfMessage(x.UniversalValidator.ProtoReflect()) + if !f(fd_QueryUniversalValidatorResponse_universal_validator, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryUniversalValidatorResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorResponse.universal_validator": + return x.UniversalValidator != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUniversalValidatorResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorResponse.universal_validator": + x.UniversalValidator = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryUniversalValidatorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.QueryUniversalValidatorResponse.universal_validator": + value := x.UniversalValidator + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUniversalValidatorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorResponse.universal_validator": + x.UniversalValidator = value.Message().Interface().(*UniversalValidator) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUniversalValidatorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorResponse.universal_validator": + if x.UniversalValidator == nil { + x.UniversalValidator = new(UniversalValidator) + } + return protoreflect.ValueOfMessage(x.UniversalValidator.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryUniversalValidatorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.QueryUniversalValidatorResponse.universal_validator": + m := new(UniversalValidator) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.QueryUniversalValidatorResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryUniversalValidatorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.QueryUniversalValidatorResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryUniversalValidatorResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryUniversalValidatorResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryUniversalValidatorResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryUniversalValidatorResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryUniversalValidatorResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.UniversalValidator != nil { + l = options.Size(x.UniversalValidator) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryUniversalValidatorResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.UniversalValidator != nil { + encoded, err := options.Marshal(x.UniversalValidator) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryUniversalValidatorResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUniversalValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryUniversalValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UniversalValidator", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.UniversalValidator == nil { + x.UniversalValidator = &UniversalValidator{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UniversalValidator); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_QueryUniversalValidatorsSetRequest protoreflect.MessageDescriptor ) @@ -823,7 +1678,7 @@ func (x *QueryUniversalValidatorsSetRequest) ProtoReflect() protoreflect.Message } func (x *QueryUniversalValidatorsSetRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[2] + mi := &file_uvalidator_v1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1164,7 +2019,7 @@ func (x *fastReflection_QueryUniversalValidatorsSetRequest) ProtoMethods() *prot var _ protoreflect.List = (*_QueryUniversalValidatorsSetResponse_1_list)(nil) type _QueryUniversalValidatorsSetResponse_1_list struct { - list *[]string + list *[]*UniversalValidator } func (x *_QueryUniversalValidatorsSetResponse_1_list) Len() int { @@ -1175,32 +2030,37 @@ func (x *_QueryUniversalValidatorsSetResponse_1_list) Len() int { } func (x *_QueryUniversalValidatorsSetResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_QueryUniversalValidatorsSetResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*UniversalValidator) (*x.list)[i] = concreteValue } func (x *_QueryUniversalValidatorsSetResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*UniversalValidator) *x.list = append(*x.list, concreteValue) } func (x *_QueryUniversalValidatorsSetResponse_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message QueryUniversalValidatorsSetResponse at list field Addresses as it is not of Message kind")) + v := new(UniversalValidator) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryUniversalValidatorsSetResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } *x.list = (*x.list)[:n] } func (x *_QueryUniversalValidatorsSetResponse_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) + v := new(UniversalValidator) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_QueryUniversalValidatorsSetResponse_1_list) IsValid() bool { @@ -1208,14 +2068,14 @@ func (x *_QueryUniversalValidatorsSetResponse_1_list) IsValid() bool { } var ( - md_QueryUniversalValidatorsSetResponse protoreflect.MessageDescriptor - fd_QueryUniversalValidatorsSetResponse_addresses protoreflect.FieldDescriptor + md_QueryUniversalValidatorsSetResponse protoreflect.MessageDescriptor + fd_QueryUniversalValidatorsSetResponse_universal_validator protoreflect.FieldDescriptor ) func init() { file_uvalidator_v1_query_proto_init() md_QueryUniversalValidatorsSetResponse = File_uvalidator_v1_query_proto.Messages().ByName("QueryUniversalValidatorsSetResponse") - fd_QueryUniversalValidatorsSetResponse_addresses = md_QueryUniversalValidatorsSetResponse.Fields().ByName("addresses") + fd_QueryUniversalValidatorsSetResponse_universal_validator = md_QueryUniversalValidatorsSetResponse.Fields().ByName("universal_validator") } var _ protoreflect.Message = (*fastReflection_QueryUniversalValidatorsSetResponse)(nil) @@ -1227,7 +2087,7 @@ func (x *QueryUniversalValidatorsSetResponse) ProtoReflect() protoreflect.Messag } func (x *QueryUniversalValidatorsSetResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[3] + mi := &file_uvalidator_v1_query_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1283,9 +2143,9 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Interface() protore // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryUniversalValidatorsSetResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Addresses) != 0 { - value := protoreflect.ValueOfList(&_QueryUniversalValidatorsSetResponse_1_list{list: &x.Addresses}) - if !f(fd_QueryUniversalValidatorsSetResponse_addresses, value) { + if len(x.UniversalValidator) != 0 { + value := protoreflect.ValueOfList(&_QueryUniversalValidatorsSetResponse_1_list{list: &x.UniversalValidator}) + if !f(fd_QueryUniversalValidatorsSetResponse_universal_validator, value) { return } } @@ -1304,8 +2164,8 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Range(f func(protor // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryUniversalValidatorsSetResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "uvalidator.v1.QueryUniversalValidatorsSetResponse.addresses": - return len(x.Addresses) != 0 + case "uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator": + return len(x.UniversalValidator) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorsSetResponse")) @@ -1322,8 +2182,8 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Has(fd protoreflect // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryUniversalValidatorsSetResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "uvalidator.v1.QueryUniversalValidatorsSetResponse.addresses": - x.Addresses = nil + case "uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator": + x.UniversalValidator = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorsSetResponse")) @@ -1340,11 +2200,11 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Clear(fd protorefle // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryUniversalValidatorsSetResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "uvalidator.v1.QueryUniversalValidatorsSetResponse.addresses": - if len(x.Addresses) == 0 { + case "uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator": + if len(x.UniversalValidator) == 0 { return protoreflect.ValueOfList(&_QueryUniversalValidatorsSetResponse_1_list{}) } - listValue := &_QueryUniversalValidatorsSetResponse_1_list{list: &x.Addresses} + listValue := &_QueryUniversalValidatorsSetResponse_1_list{list: &x.UniversalValidator} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { @@ -1366,10 +2226,10 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Get(descriptor prot // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryUniversalValidatorsSetResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "uvalidator.v1.QueryUniversalValidatorsSetResponse.addresses": + case "uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator": lv := value.List() clv := lv.(*_QueryUniversalValidatorsSetResponse_1_list) - x.Addresses = *clv.list + x.UniversalValidator = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.QueryUniversalValidatorsSetResponse")) @@ -1390,11 +2250,11 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Set(fd protoreflect // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryUniversalValidatorsSetResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uvalidator.v1.QueryUniversalValidatorsSetResponse.addresses": - if x.Addresses == nil { - x.Addresses = []string{} + case "uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator": + if x.UniversalValidator == nil { + x.UniversalValidator = []*UniversalValidator{} } - value := &_QueryUniversalValidatorsSetResponse_1_list{list: &x.Addresses} + value := &_QueryUniversalValidatorsSetResponse_1_list{list: &x.UniversalValidator} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { @@ -1409,8 +2269,8 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) Mutable(fd protoref // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryUniversalValidatorsSetResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uvalidator.v1.QueryUniversalValidatorsSetResponse.addresses": - list := []string{} + case "uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator": + list := []*UniversalValidator{} return protoreflect.ValueOfList(&_QueryUniversalValidatorsSetResponse_1_list{list: &list}) default: if fd.IsExtension() { @@ -1481,9 +2341,9 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) ProtoMethods() *pro var n int var l int _ = l - if len(x.Addresses) > 0 { - for _, s := range x.Addresses { - l = len(s) + if len(x.UniversalValidator) > 0 { + for _, e := range x.UniversalValidator { + l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } @@ -1516,11 +2376,18 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) ProtoMethods() *pro i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Addresses) > 0 { - for iNdEx := len(x.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Addresses[iNdEx]) - copy(dAtA[i:], x.Addresses[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Addresses[iNdEx]))) + if len(x.UniversalValidator) > 0 { + for iNdEx := len(x.UniversalValidator) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.UniversalValidator[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } @@ -1576,9 +2443,9 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) ProtoMethods() *pro switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UniversalValidator", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1588,23 +2455,25 @@ func (x *fastReflection_QueryUniversalValidatorsSetResponse) ProtoMethods() *pro } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen 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.Addresses = append(x.Addresses, string(dAtA[iNdEx:postIndex])) + x.UniversalValidator = append(x.UniversalValidator, &UniversalValidator{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UniversalValidator[len(x.UniversalValidator)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex default: iNdEx = preIndex @@ -1661,7 +2530,7 @@ func (x *QueryBallotRequest) ProtoReflect() protoreflect.Message { } func (x *QueryBallotRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[4] + mi := &file_uvalidator_v1_query_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2081,7 +2950,7 @@ func (x *QueryBallotResponse) ProtoReflect() protoreflect.Message { } func (x *QueryBallotResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[5] + mi := &file_uvalidator_v1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2516,7 +3385,7 @@ func (x *QueryBallotsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryBallotsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[6] + mi := &file_uvalidator_v1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3004,7 +3873,7 @@ func (x *QueryBallotsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryBallotsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[7] + mi := &file_uvalidator_v1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3524,7 +4393,7 @@ func (x *QueryActiveBallotIDsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryActiveBallotIDsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[8] + mi := &file_uvalidator_v1_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4007,7 +4876,7 @@ func (x *QueryActiveBallotIDsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryActiveBallotIDsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[9] + mi := &file_uvalidator_v1_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4518,7 +5387,7 @@ func (x *QueryActiveBallotsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryActiveBallotsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[10] + mi := &file_uvalidator_v1_query_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5006,7 +5875,7 @@ func (x *QueryActiveBallotsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryActiveBallotsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[11] + mi := &file_uvalidator_v1_query_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5526,7 +6395,7 @@ func (x *QueryExpiredBallotIDsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryExpiredBallotIDsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[12] + mi := &file_uvalidator_v1_query_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6009,7 +6878,7 @@ func (x *QueryExpiredBallotIDsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryExpiredBallotIDsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[13] + mi := &file_uvalidator_v1_query_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6520,7 +7389,7 @@ func (x *QueryExpiredBallotsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryExpiredBallotsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[14] + mi := &file_uvalidator_v1_query_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7008,7 +7877,7 @@ func (x *QueryExpiredBallotsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryExpiredBallotsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[15] + mi := &file_uvalidator_v1_query_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7528,7 +8397,7 @@ func (x *QueryFinalizedBallotIDsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryFinalizedBallotIDsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[16] + mi := &file_uvalidator_v1_query_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8011,7 +8880,7 @@ func (x *QueryFinalizedBallotIDsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryFinalizedBallotIDsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[17] + mi := &file_uvalidator_v1_query_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8522,7 +9391,7 @@ func (x *QueryFinalizedBallotsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryFinalizedBallotsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[18] + mi := &file_uvalidator_v1_query_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9010,7 +9879,7 @@ func (x *QueryFinalizedBallotsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryFinalizedBallotsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_query_proto_msgTypes[19] + mi := &file_uvalidator_v1_query_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9587,6 +10456,77 @@ func (x *QueryParamsResponse) GetParams() *Params { return nil } +// Single Universal Validator +type QueryUniversalValidatorRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` +} + +func (x *QueryUniversalValidatorRequest) Reset() { + *x = QueryUniversalValidatorRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryUniversalValidatorRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryUniversalValidatorRequest) ProtoMessage() {} + +// Deprecated: Use QueryUniversalValidatorRequest.ProtoReflect.Descriptor instead. +func (*QueryUniversalValidatorRequest) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{2} +} + +func (x *QueryUniversalValidatorRequest) GetCoreValidatorAddress() string { + if x != nil { + return x.CoreValidatorAddress + } + return "" +} + +type QueryUniversalValidatorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UniversalValidator *UniversalValidator `protobuf:"bytes,1,opt,name=universal_validator,json=universalValidator,proto3" json:"universal_validator,omitempty"` +} + +func (x *QueryUniversalValidatorResponse) Reset() { + *x = QueryUniversalValidatorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryUniversalValidatorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryUniversalValidatorResponse) ProtoMessage() {} + +// Deprecated: Use QueryUniversalValidatorResponse.ProtoReflect.Descriptor instead. +func (*QueryUniversalValidatorResponse) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryUniversalValidatorResponse) GetUniversalValidator() *UniversalValidator { + if x != nil { + return x.UniversalValidator + } + return nil +} + // QueryUniversalValidatorsSetRequest is the request type for Query/UniversalValidatorAddresses. type QueryUniversalValidatorsSetRequest struct { state protoimpl.MessageState @@ -9597,7 +10537,7 @@ type QueryUniversalValidatorsSetRequest struct { func (x *QueryUniversalValidatorsSetRequest) Reset() { *x = QueryUniversalValidatorsSetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[2] + mi := &file_uvalidator_v1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9611,7 +10551,7 @@ func (*QueryUniversalValidatorsSetRequest) ProtoMessage() {} // Deprecated: Use QueryUniversalValidatorsSetRequest.ProtoReflect.Descriptor instead. func (*QueryUniversalValidatorsSetRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{2} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{4} } // QueryUniversalValidatorsSetResponse is the response type for Query/UniversalValidatorAddresses. @@ -9621,13 +10561,13 @@ type QueryUniversalValidatorsSetResponse struct { unknownFields protoimpl.UnknownFields // addresses is the list of all universal validator addresses registered in the module. - Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` + UniversalValidator []*UniversalValidator `protobuf:"bytes,1,rep,name=universal_validator,json=universalValidator,proto3" json:"universal_validator,omitempty"` } func (x *QueryUniversalValidatorsSetResponse) Reset() { *x = QueryUniversalValidatorsSetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[3] + mi := &file_uvalidator_v1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9641,12 +10581,12 @@ func (*QueryUniversalValidatorsSetResponse) ProtoMessage() {} // Deprecated: Use QueryUniversalValidatorsSetResponse.ProtoReflect.Descriptor instead. func (*QueryUniversalValidatorsSetResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{3} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{5} } -func (x *QueryUniversalValidatorsSetResponse) GetAddresses() []string { +func (x *QueryUniversalValidatorsSetResponse) GetUniversalValidator() []*UniversalValidator { if x != nil { - return x.Addresses + return x.UniversalValidator } return nil } @@ -9663,7 +10603,7 @@ type QueryBallotRequest struct { func (x *QueryBallotRequest) Reset() { *x = QueryBallotRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[4] + mi := &file_uvalidator_v1_query_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9677,7 +10617,7 @@ func (*QueryBallotRequest) ProtoMessage() {} // Deprecated: Use QueryBallotRequest.ProtoReflect.Descriptor instead. func (*QueryBallotRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{4} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{6} } func (x *QueryBallotRequest) GetId() string { @@ -9698,7 +10638,7 @@ type QueryBallotResponse struct { func (x *QueryBallotResponse) Reset() { *x = QueryBallotResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[5] + mi := &file_uvalidator_v1_query_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9712,7 +10652,7 @@ func (*QueryBallotResponse) ProtoMessage() {} // Deprecated: Use QueryBallotResponse.ProtoReflect.Descriptor instead. func (*QueryBallotResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{5} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{7} } func (x *QueryBallotResponse) GetBallot() *Ballot { @@ -9734,7 +10674,7 @@ type QueryBallotsRequest struct { func (x *QueryBallotsRequest) Reset() { *x = QueryBallotsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[6] + mi := &file_uvalidator_v1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9748,7 +10688,7 @@ func (*QueryBallotsRequest) ProtoMessage() {} // Deprecated: Use QueryBallotsRequest.ProtoReflect.Descriptor instead. func (*QueryBallotsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{6} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{8} } func (x *QueryBallotsRequest) GetPagination() *v1beta1.PageRequest { @@ -9770,7 +10710,7 @@ type QueryBallotsResponse struct { func (x *QueryBallotsResponse) Reset() { *x = QueryBallotsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[7] + mi := &file_uvalidator_v1_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9784,7 +10724,7 @@ func (*QueryBallotsResponse) ProtoMessage() {} // Deprecated: Use QueryBallotsResponse.ProtoReflect.Descriptor instead. func (*QueryBallotsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{7} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{9} } func (x *QueryBallotsResponse) GetBallots() []*Ballot { @@ -9813,7 +10753,7 @@ type QueryActiveBallotIDsRequest struct { func (x *QueryActiveBallotIDsRequest) Reset() { *x = QueryActiveBallotIDsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[8] + mi := &file_uvalidator_v1_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9827,7 +10767,7 @@ func (*QueryActiveBallotIDsRequest) ProtoMessage() {} // Deprecated: Use QueryActiveBallotIDsRequest.ProtoReflect.Descriptor instead. func (*QueryActiveBallotIDsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{8} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{10} } func (x *QueryActiveBallotIDsRequest) GetPagination() *v1beta1.PageRequest { @@ -9849,7 +10789,7 @@ type QueryActiveBallotIDsResponse struct { func (x *QueryActiveBallotIDsResponse) Reset() { *x = QueryActiveBallotIDsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[9] + mi := &file_uvalidator_v1_query_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9863,7 +10803,7 @@ func (*QueryActiveBallotIDsResponse) ProtoMessage() {} // Deprecated: Use QueryActiveBallotIDsResponse.ProtoReflect.Descriptor instead. func (*QueryActiveBallotIDsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{9} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{11} } func (x *QueryActiveBallotIDsResponse) GetIds() []string { @@ -9891,7 +10831,7 @@ type QueryActiveBallotsRequest struct { func (x *QueryActiveBallotsRequest) Reset() { *x = QueryActiveBallotsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[10] + mi := &file_uvalidator_v1_query_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9905,7 +10845,7 @@ func (*QueryActiveBallotsRequest) ProtoMessage() {} // Deprecated: Use QueryActiveBallotsRequest.ProtoReflect.Descriptor instead. func (*QueryActiveBallotsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{10} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{12} } func (x *QueryActiveBallotsRequest) GetPagination() *v1beta1.PageRequest { @@ -9927,7 +10867,7 @@ type QueryActiveBallotsResponse struct { func (x *QueryActiveBallotsResponse) Reset() { *x = QueryActiveBallotsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[11] + mi := &file_uvalidator_v1_query_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9941,7 +10881,7 @@ func (*QueryActiveBallotsResponse) ProtoMessage() {} // Deprecated: Use QueryActiveBallotsResponse.ProtoReflect.Descriptor instead. func (*QueryActiveBallotsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{11} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{13} } func (x *QueryActiveBallotsResponse) GetBallots() []*Ballot { @@ -9970,7 +10910,7 @@ type QueryExpiredBallotIDsRequest struct { func (x *QueryExpiredBallotIDsRequest) Reset() { *x = QueryExpiredBallotIDsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[12] + mi := &file_uvalidator_v1_query_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9984,7 +10924,7 @@ func (*QueryExpiredBallotIDsRequest) ProtoMessage() {} // Deprecated: Use QueryExpiredBallotIDsRequest.ProtoReflect.Descriptor instead. func (*QueryExpiredBallotIDsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{12} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{14} } func (x *QueryExpiredBallotIDsRequest) GetPagination() *v1beta1.PageRequest { @@ -10006,7 +10946,7 @@ type QueryExpiredBallotIDsResponse struct { func (x *QueryExpiredBallotIDsResponse) Reset() { *x = QueryExpiredBallotIDsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[13] + mi := &file_uvalidator_v1_query_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10020,7 +10960,7 @@ func (*QueryExpiredBallotIDsResponse) ProtoMessage() {} // Deprecated: Use QueryExpiredBallotIDsResponse.ProtoReflect.Descriptor instead. func (*QueryExpiredBallotIDsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{13} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{15} } func (x *QueryExpiredBallotIDsResponse) GetIds() []string { @@ -10048,7 +10988,7 @@ type QueryExpiredBallotsRequest struct { func (x *QueryExpiredBallotsRequest) Reset() { *x = QueryExpiredBallotsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[14] + mi := &file_uvalidator_v1_query_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10062,7 +11002,7 @@ func (*QueryExpiredBallotsRequest) ProtoMessage() {} // Deprecated: Use QueryExpiredBallotsRequest.ProtoReflect.Descriptor instead. func (*QueryExpiredBallotsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{14} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{16} } func (x *QueryExpiredBallotsRequest) GetPagination() *v1beta1.PageRequest { @@ -10084,7 +11024,7 @@ type QueryExpiredBallotsResponse struct { func (x *QueryExpiredBallotsResponse) Reset() { *x = QueryExpiredBallotsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[15] + mi := &file_uvalidator_v1_query_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10098,7 +11038,7 @@ func (*QueryExpiredBallotsResponse) ProtoMessage() {} // Deprecated: Use QueryExpiredBallotsResponse.ProtoReflect.Descriptor instead. func (*QueryExpiredBallotsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{15} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{17} } func (x *QueryExpiredBallotsResponse) GetBallots() []*Ballot { @@ -10127,7 +11067,7 @@ type QueryFinalizedBallotIDsRequest struct { func (x *QueryFinalizedBallotIDsRequest) Reset() { *x = QueryFinalizedBallotIDsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[16] + mi := &file_uvalidator_v1_query_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10141,7 +11081,7 @@ func (*QueryFinalizedBallotIDsRequest) ProtoMessage() {} // Deprecated: Use QueryFinalizedBallotIDsRequest.ProtoReflect.Descriptor instead. func (*QueryFinalizedBallotIDsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{16} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{18} } func (x *QueryFinalizedBallotIDsRequest) GetPagination() *v1beta1.PageRequest { @@ -10163,7 +11103,7 @@ type QueryFinalizedBallotIDsResponse struct { func (x *QueryFinalizedBallotIDsResponse) Reset() { *x = QueryFinalizedBallotIDsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[17] + mi := &file_uvalidator_v1_query_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10177,7 +11117,7 @@ func (*QueryFinalizedBallotIDsResponse) ProtoMessage() {} // Deprecated: Use QueryFinalizedBallotIDsResponse.ProtoReflect.Descriptor instead. func (*QueryFinalizedBallotIDsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{17} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{19} } func (x *QueryFinalizedBallotIDsResponse) GetIds() []string { @@ -10205,7 +11145,7 @@ type QueryFinalizedBallotsRequest struct { func (x *QueryFinalizedBallotsRequest) Reset() { *x = QueryFinalizedBallotsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[18] + mi := &file_uvalidator_v1_query_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10219,7 +11159,7 @@ func (*QueryFinalizedBallotsRequest) ProtoMessage() {} // Deprecated: Use QueryFinalizedBallotsRequest.ProtoReflect.Descriptor instead. func (*QueryFinalizedBallotsRequest) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{18} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{20} } func (x *QueryFinalizedBallotsRequest) GetPagination() *v1beta1.PageRequest { @@ -10241,7 +11181,7 @@ type QueryFinalizedBallotsResponse struct { func (x *QueryFinalizedBallotsResponse) Reset() { *x = QueryFinalizedBallotsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_query_proto_msgTypes[19] + mi := &file_uvalidator_v1_query_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10255,7 +11195,7 @@ func (*QueryFinalizedBallotsResponse) ProtoMessage() {} // Deprecated: Use QueryFinalizedBallotsResponse.ProtoReflect.Descriptor instead. func (*QueryFinalizedBallotsResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{19} + return file_uvalidator_v1_query_proto_rawDescGZIP(), []int{21} } func (x *QueryFinalizedBallotsResponse) GetBallots() []*Ballot { @@ -10284,96 +11224,84 @@ var file_uvalidator_v1_query_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, - 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, - 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x22, 0x24, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x43, 0x0a, 0x23, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, - 0x24, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x44, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, - 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, - 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x52, 0x06, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x22, 0x5d, 0x0a, 0x13, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x90, 0x01, 0x0a, 0x14, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x65, 0x0a, - 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, - 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, + 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, 0x0a, + 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x22, 0x56, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x75, 0x0a, 0x1f, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, + 0x0a, 0x13, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x12, + 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x22, 0x24, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x79, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x52, 0x0a, 0x13, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x12, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x22, 0x24, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, + 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x44, 0x0a, 0x13, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2d, 0x0a, 0x06, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x06, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x22, + 0x5d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x63, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, - 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x96, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, - 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7a, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, - 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x90, + 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, + 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x64, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, + 0x6e, 0x22, 0x65, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x79, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x63, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x96, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, @@ -10382,141 +11310,183 @@ var file_uvalidator_v1_query_proto_rawDesc = []byte{ 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x68, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x6e, 0x22, 0x66, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, + 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7a, 0x0a, 0x1d, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, + 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, 0x1f, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x69, 0x64, 0x73, - 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, - 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, 0x1c, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x99, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x1b, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, + 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, + 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, + 0x6c, 0x6f, 0x74, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x68, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, + 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x7c, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x03, 0x69, 0x64, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xb7, 0x0b, - 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x21, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, - 0x12, 0x15, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, - 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xac, 0x01, 0x0a, 0x16, 0x41, 0x6c, 0x6c, 0x55, - 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x12, 0x31, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x66, 0x0a, + 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, + 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x99, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, + 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, + 0x07, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x32, 0xf2, 0x0c, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6e, 0x0a, 0x06, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0xb8, 0x01, 0x0a, 0x12, + 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x2d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x25, 0x12, 0x23, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, - 0x31, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x74, 0x0a, 0x06, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, - 0x12, 0x21, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, - 0x1b, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, - 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x75, 0x0a, 0x0a, - 0x41, 0x6c, 0x6c, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, - 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x75, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, - 0x6f, 0x74, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x12, 0x41, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x75, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, - 0x6f, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2f, 0x69, 0x64, 0x73, 0x12, 0x8e, - 0x01, 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, - 0x6f, 0x74, 0x73, 0x12, 0x28, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, - 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2e, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x75, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x63, + 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xac, 0x01, 0x0a, 0x16, 0x41, 0x6c, 0x6c, 0x55, 0x6e, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x73, 0x12, 0x31, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, + 0x12, 0x23, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, + 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x74, 0x0a, 0x06, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x12, + 0x21, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, + 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, + 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x75, 0x0a, 0x0a, 0x41, + 0x6c, 0x6c, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x22, 0x2e, 0x75, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, + 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, - 0x12, 0x1d, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, - 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, - 0x9c, 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, - 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, - 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x75, 0x76, 0x61, + 0x65, 0x72, 0x79, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, - 0x74, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x2f, 0x69, 0x64, 0x73, 0x12, 0x92, - 0x01, 0x0a, 0x11, 0x41, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, - 0x6c, 0x6f, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, - 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, - 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x65, 0x64, 0x12, 0xa4, 0x01, 0x0a, 0x15, 0x41, 0x6c, 0x6c, 0x46, 0x69, 0x6e, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2d, 0x2e, - 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, - 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x75, + 0x74, 0x73, 0x12, 0x98, 0x01, 0x0a, 0x12, 0x41, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, + 0x74, 0x73, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2f, 0x69, 0x64, 0x73, 0x12, 0x8e, 0x01, + 0x0a, 0x10, 0x41, 0x6c, 0x6c, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, + 0x74, 0x73, 0x12, 0x28, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, + 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, + 0x1d, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, + 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x9c, + 0x01, 0x0a, 0x13, 0x41, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, + 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, + 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x75, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, + 0x73, 0x2f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x2f, 0x69, 0x64, 0x73, 0x12, 0x92, 0x01, + 0x0a, 0x11, 0x41, 0x6c, 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, + 0x6f, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, + 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, + 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x12, 0xa4, 0x01, 0x0a, 0x15, 0x41, 0x6c, 0x6c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x49, 0x44, 0x73, 0x12, 0x2d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, - 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x74, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x75, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, + 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x66, 0x69, 0x6e, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x2f, 0x69, 0x64, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x13, 0x41, 0x6c, + 0x6c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, + 0x73, 0x12, 0x2b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, + 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, + 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x66, 0x69, 0x6e, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x2f, 0x69, 0x64, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x13, 0x41, - 0x6c, 0x6c, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, - 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x64, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2c, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x61, - 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x73, 0x2f, 0x66, 0x69, - 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0xb9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, - 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0xb9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, + 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -10531,79 +11501,86 @@ func file_uvalidator_v1_query_proto_rawDescGZIP() []byte { return file_uvalidator_v1_query_proto_rawDescData } -var file_uvalidator_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_uvalidator_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_uvalidator_v1_query_proto_goTypes = []interface{}{ (*QueryParamsRequest)(nil), // 0: uvalidator.v1.QueryParamsRequest (*QueryParamsResponse)(nil), // 1: uvalidator.v1.QueryParamsResponse - (*QueryUniversalValidatorsSetRequest)(nil), // 2: uvalidator.v1.QueryUniversalValidatorsSetRequest - (*QueryUniversalValidatorsSetResponse)(nil), // 3: uvalidator.v1.QueryUniversalValidatorsSetResponse - (*QueryBallotRequest)(nil), // 4: uvalidator.v1.QueryBallotRequest - (*QueryBallotResponse)(nil), // 5: uvalidator.v1.QueryBallotResponse - (*QueryBallotsRequest)(nil), // 6: uvalidator.v1.QueryBallotsRequest - (*QueryBallotsResponse)(nil), // 7: uvalidator.v1.QueryBallotsResponse - (*QueryActiveBallotIDsRequest)(nil), // 8: uvalidator.v1.QueryActiveBallotIDsRequest - (*QueryActiveBallotIDsResponse)(nil), // 9: uvalidator.v1.QueryActiveBallotIDsResponse - (*QueryActiveBallotsRequest)(nil), // 10: uvalidator.v1.QueryActiveBallotsRequest - (*QueryActiveBallotsResponse)(nil), // 11: uvalidator.v1.QueryActiveBallotsResponse - (*QueryExpiredBallotIDsRequest)(nil), // 12: uvalidator.v1.QueryExpiredBallotIDsRequest - (*QueryExpiredBallotIDsResponse)(nil), // 13: uvalidator.v1.QueryExpiredBallotIDsResponse - (*QueryExpiredBallotsRequest)(nil), // 14: uvalidator.v1.QueryExpiredBallotsRequest - (*QueryExpiredBallotsResponse)(nil), // 15: uvalidator.v1.QueryExpiredBallotsResponse - (*QueryFinalizedBallotIDsRequest)(nil), // 16: uvalidator.v1.QueryFinalizedBallotIDsRequest - (*QueryFinalizedBallotIDsResponse)(nil), // 17: uvalidator.v1.QueryFinalizedBallotIDsResponse - (*QueryFinalizedBallotsRequest)(nil), // 18: uvalidator.v1.QueryFinalizedBallotsRequest - (*QueryFinalizedBallotsResponse)(nil), // 19: uvalidator.v1.QueryFinalizedBallotsResponse - (*Params)(nil), // 20: uvalidator.v1.Params - (*Ballot)(nil), // 21: uvalidator.v1.Ballot - (*v1beta1.PageRequest)(nil), // 22: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 23: cosmos.base.query.v1beta1.PageResponse + (*QueryUniversalValidatorRequest)(nil), // 2: uvalidator.v1.QueryUniversalValidatorRequest + (*QueryUniversalValidatorResponse)(nil), // 3: uvalidator.v1.QueryUniversalValidatorResponse + (*QueryUniversalValidatorsSetRequest)(nil), // 4: uvalidator.v1.QueryUniversalValidatorsSetRequest + (*QueryUniversalValidatorsSetResponse)(nil), // 5: uvalidator.v1.QueryUniversalValidatorsSetResponse + (*QueryBallotRequest)(nil), // 6: uvalidator.v1.QueryBallotRequest + (*QueryBallotResponse)(nil), // 7: uvalidator.v1.QueryBallotResponse + (*QueryBallotsRequest)(nil), // 8: uvalidator.v1.QueryBallotsRequest + (*QueryBallotsResponse)(nil), // 9: uvalidator.v1.QueryBallotsResponse + (*QueryActiveBallotIDsRequest)(nil), // 10: uvalidator.v1.QueryActiveBallotIDsRequest + (*QueryActiveBallotIDsResponse)(nil), // 11: uvalidator.v1.QueryActiveBallotIDsResponse + (*QueryActiveBallotsRequest)(nil), // 12: uvalidator.v1.QueryActiveBallotsRequest + (*QueryActiveBallotsResponse)(nil), // 13: uvalidator.v1.QueryActiveBallotsResponse + (*QueryExpiredBallotIDsRequest)(nil), // 14: uvalidator.v1.QueryExpiredBallotIDsRequest + (*QueryExpiredBallotIDsResponse)(nil), // 15: uvalidator.v1.QueryExpiredBallotIDsResponse + (*QueryExpiredBallotsRequest)(nil), // 16: uvalidator.v1.QueryExpiredBallotsRequest + (*QueryExpiredBallotsResponse)(nil), // 17: uvalidator.v1.QueryExpiredBallotsResponse + (*QueryFinalizedBallotIDsRequest)(nil), // 18: uvalidator.v1.QueryFinalizedBallotIDsRequest + (*QueryFinalizedBallotIDsResponse)(nil), // 19: uvalidator.v1.QueryFinalizedBallotIDsResponse + (*QueryFinalizedBallotsRequest)(nil), // 20: uvalidator.v1.QueryFinalizedBallotsRequest + (*QueryFinalizedBallotsResponse)(nil), // 21: uvalidator.v1.QueryFinalizedBallotsResponse + (*Params)(nil), // 22: uvalidator.v1.Params + (*UniversalValidator)(nil), // 23: uvalidator.v1.UniversalValidator + (*Ballot)(nil), // 24: uvalidator.v1.Ballot + (*v1beta1.PageRequest)(nil), // 25: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 26: cosmos.base.query.v1beta1.PageResponse } var file_uvalidator_v1_query_proto_depIdxs = []int32{ - 20, // 0: uvalidator.v1.QueryParamsResponse.params:type_name -> uvalidator.v1.Params - 21, // 1: uvalidator.v1.QueryBallotResponse.ballot:type_name -> uvalidator.v1.Ballot - 22, // 2: uvalidator.v1.QueryBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 21, // 3: uvalidator.v1.QueryBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot - 23, // 4: uvalidator.v1.QueryBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 5: uvalidator.v1.QueryActiveBallotIDsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 6: uvalidator.v1.QueryActiveBallotIDsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 7: uvalidator.v1.QueryActiveBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 21, // 8: uvalidator.v1.QueryActiveBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot - 23, // 9: uvalidator.v1.QueryActiveBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 10: uvalidator.v1.QueryExpiredBallotIDsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 11: uvalidator.v1.QueryExpiredBallotIDsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 12: uvalidator.v1.QueryExpiredBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 21, // 13: uvalidator.v1.QueryExpiredBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot - 23, // 14: uvalidator.v1.QueryExpiredBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 15: uvalidator.v1.QueryFinalizedBallotIDsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 16: uvalidator.v1.QueryFinalizedBallotIDsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 22, // 17: uvalidator.v1.QueryFinalizedBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 21, // 18: uvalidator.v1.QueryFinalizedBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot - 23, // 19: uvalidator.v1.QueryFinalizedBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 20: uvalidator.v1.Query.Params:input_type -> uvalidator.v1.QueryParamsRequest - 2, // 21: uvalidator.v1.Query.AllUniversalValidators:input_type -> uvalidator.v1.QueryUniversalValidatorsSetRequest - 4, // 22: uvalidator.v1.Query.Ballot:input_type -> uvalidator.v1.QueryBallotRequest - 6, // 23: uvalidator.v1.Query.AllBallots:input_type -> uvalidator.v1.QueryBallotsRequest - 8, // 24: uvalidator.v1.Query.AllActiveBallotIDs:input_type -> uvalidator.v1.QueryActiveBallotIDsRequest - 10, // 25: uvalidator.v1.Query.AllActiveBallots:input_type -> uvalidator.v1.QueryActiveBallotsRequest - 12, // 26: uvalidator.v1.Query.AllExpiredBallotIDs:input_type -> uvalidator.v1.QueryExpiredBallotIDsRequest - 14, // 27: uvalidator.v1.Query.AllExpiredBallots:input_type -> uvalidator.v1.QueryExpiredBallotsRequest - 16, // 28: uvalidator.v1.Query.AllFinalizedBallotIDs:input_type -> uvalidator.v1.QueryFinalizedBallotIDsRequest - 18, // 29: uvalidator.v1.Query.AllFinalizedBallots:input_type -> uvalidator.v1.QueryFinalizedBallotsRequest - 1, // 30: uvalidator.v1.Query.Params:output_type -> uvalidator.v1.QueryParamsResponse - 3, // 31: uvalidator.v1.Query.AllUniversalValidators:output_type -> uvalidator.v1.QueryUniversalValidatorsSetResponse - 5, // 32: uvalidator.v1.Query.Ballot:output_type -> uvalidator.v1.QueryBallotResponse - 7, // 33: uvalidator.v1.Query.AllBallots:output_type -> uvalidator.v1.QueryBallotsResponse - 9, // 34: uvalidator.v1.Query.AllActiveBallotIDs:output_type -> uvalidator.v1.QueryActiveBallotIDsResponse - 11, // 35: uvalidator.v1.Query.AllActiveBallots:output_type -> uvalidator.v1.QueryActiveBallotsResponse - 13, // 36: uvalidator.v1.Query.AllExpiredBallotIDs:output_type -> uvalidator.v1.QueryExpiredBallotIDsResponse - 15, // 37: uvalidator.v1.Query.AllExpiredBallots:output_type -> uvalidator.v1.QueryExpiredBallotsResponse - 17, // 38: uvalidator.v1.Query.AllFinalizedBallotIDs:output_type -> uvalidator.v1.QueryFinalizedBallotIDsResponse - 19, // 39: uvalidator.v1.Query.AllFinalizedBallots:output_type -> uvalidator.v1.QueryFinalizedBallotsResponse - 30, // [30:40] is the sub-list for method output_type - 20, // [20:30] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name + 22, // 0: uvalidator.v1.QueryParamsResponse.params:type_name -> uvalidator.v1.Params + 23, // 1: uvalidator.v1.QueryUniversalValidatorResponse.universal_validator:type_name -> uvalidator.v1.UniversalValidator + 23, // 2: uvalidator.v1.QueryUniversalValidatorsSetResponse.universal_validator:type_name -> uvalidator.v1.UniversalValidator + 24, // 3: uvalidator.v1.QueryBallotResponse.ballot:type_name -> uvalidator.v1.Ballot + 25, // 4: uvalidator.v1.QueryBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 5: uvalidator.v1.QueryBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot + 26, // 6: uvalidator.v1.QueryBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 7: uvalidator.v1.QueryActiveBallotIDsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 26, // 8: uvalidator.v1.QueryActiveBallotIDsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 9: uvalidator.v1.QueryActiveBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 10: uvalidator.v1.QueryActiveBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot + 26, // 11: uvalidator.v1.QueryActiveBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 12: uvalidator.v1.QueryExpiredBallotIDsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 26, // 13: uvalidator.v1.QueryExpiredBallotIDsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 14: uvalidator.v1.QueryExpiredBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 15: uvalidator.v1.QueryExpiredBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot + 26, // 16: uvalidator.v1.QueryExpiredBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 17: uvalidator.v1.QueryFinalizedBallotIDsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 26, // 18: uvalidator.v1.QueryFinalizedBallotIDsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 25, // 19: uvalidator.v1.QueryFinalizedBallotsRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 24, // 20: uvalidator.v1.QueryFinalizedBallotsResponse.ballots:type_name -> uvalidator.v1.Ballot + 26, // 21: uvalidator.v1.QueryFinalizedBallotsResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 22: uvalidator.v1.Query.Params:input_type -> uvalidator.v1.QueryParamsRequest + 2, // 23: uvalidator.v1.Query.UniversalValidator:input_type -> uvalidator.v1.QueryUniversalValidatorRequest + 4, // 24: uvalidator.v1.Query.AllUniversalValidators:input_type -> uvalidator.v1.QueryUniversalValidatorsSetRequest + 6, // 25: uvalidator.v1.Query.Ballot:input_type -> uvalidator.v1.QueryBallotRequest + 8, // 26: uvalidator.v1.Query.AllBallots:input_type -> uvalidator.v1.QueryBallotsRequest + 10, // 27: uvalidator.v1.Query.AllActiveBallotIDs:input_type -> uvalidator.v1.QueryActiveBallotIDsRequest + 12, // 28: uvalidator.v1.Query.AllActiveBallots:input_type -> uvalidator.v1.QueryActiveBallotsRequest + 14, // 29: uvalidator.v1.Query.AllExpiredBallotIDs:input_type -> uvalidator.v1.QueryExpiredBallotIDsRequest + 16, // 30: uvalidator.v1.Query.AllExpiredBallots:input_type -> uvalidator.v1.QueryExpiredBallotsRequest + 18, // 31: uvalidator.v1.Query.AllFinalizedBallotIDs:input_type -> uvalidator.v1.QueryFinalizedBallotIDsRequest + 20, // 32: uvalidator.v1.Query.AllFinalizedBallots:input_type -> uvalidator.v1.QueryFinalizedBallotsRequest + 1, // 33: uvalidator.v1.Query.Params:output_type -> uvalidator.v1.QueryParamsResponse + 3, // 34: uvalidator.v1.Query.UniversalValidator:output_type -> uvalidator.v1.QueryUniversalValidatorResponse + 5, // 35: uvalidator.v1.Query.AllUniversalValidators:output_type -> uvalidator.v1.QueryUniversalValidatorsSetResponse + 7, // 36: uvalidator.v1.Query.Ballot:output_type -> uvalidator.v1.QueryBallotResponse + 9, // 37: uvalidator.v1.Query.AllBallots:output_type -> uvalidator.v1.QueryBallotsResponse + 11, // 38: uvalidator.v1.Query.AllActiveBallotIDs:output_type -> uvalidator.v1.QueryActiveBallotIDsResponse + 13, // 39: uvalidator.v1.Query.AllActiveBallots:output_type -> uvalidator.v1.QueryActiveBallotsResponse + 15, // 40: uvalidator.v1.Query.AllExpiredBallotIDs:output_type -> uvalidator.v1.QueryExpiredBallotIDsResponse + 17, // 41: uvalidator.v1.Query.AllExpiredBallots:output_type -> uvalidator.v1.QueryExpiredBallotsResponse + 19, // 42: uvalidator.v1.Query.AllFinalizedBallotIDs:output_type -> uvalidator.v1.QueryFinalizedBallotIDsResponse + 21, // 43: uvalidator.v1.Query.AllFinalizedBallots:output_type -> uvalidator.v1.QueryFinalizedBallotsResponse + 33, // [33:44] is the sub-list for method output_type + 22, // [22:33] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_uvalidator_v1_query_proto_init() } @@ -10614,6 +11591,7 @@ func file_uvalidator_v1_query_proto_init() { file_uvalidator_v1_genesis_proto_init() file_uvalidator_v1_types_proto_init() file_uvalidator_v1_ballot_proto_init() + file_uvalidator_v1_validator_proto_init() if !protoimpl.UnsafeEnabled { file_uvalidator_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { @@ -10640,7 +11618,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryUniversalValidatorsSetRequest); i { + switch v := v.(*QueryUniversalValidatorRequest); i { case 0: return &v.state case 1: @@ -10652,7 +11630,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryUniversalValidatorsSetResponse); i { + switch v := v.(*QueryUniversalValidatorResponse); i { case 0: return &v.state case 1: @@ -10664,7 +11642,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBallotRequest); i { + switch v := v.(*QueryUniversalValidatorsSetRequest); i { case 0: return &v.state case 1: @@ -10676,7 +11654,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBallotResponse); i { + switch v := v.(*QueryUniversalValidatorsSetResponse); i { case 0: return &v.state case 1: @@ -10688,7 +11666,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBallotsRequest); i { + switch v := v.(*QueryBallotRequest); i { case 0: return &v.state case 1: @@ -10700,7 +11678,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryBallotsResponse); i { + switch v := v.(*QueryBallotResponse); i { case 0: return &v.state case 1: @@ -10712,7 +11690,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryActiveBallotIDsRequest); i { + switch v := v.(*QueryBallotsRequest); i { case 0: return &v.state case 1: @@ -10724,7 +11702,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryActiveBallotIDsResponse); i { + switch v := v.(*QueryBallotsResponse); i { case 0: return &v.state case 1: @@ -10736,7 +11714,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryActiveBallotsRequest); i { + switch v := v.(*QueryActiveBallotIDsRequest); i { case 0: return &v.state case 1: @@ -10748,7 +11726,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryActiveBallotsResponse); i { + switch v := v.(*QueryActiveBallotIDsResponse); i { case 0: return &v.state case 1: @@ -10760,7 +11738,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryExpiredBallotIDsRequest); i { + switch v := v.(*QueryActiveBallotsRequest); i { case 0: return &v.state case 1: @@ -10772,7 +11750,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryExpiredBallotIDsResponse); i { + switch v := v.(*QueryActiveBallotsResponse); i { case 0: return &v.state case 1: @@ -10784,7 +11762,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryExpiredBallotsRequest); i { + switch v := v.(*QueryExpiredBallotIDsRequest); i { case 0: return &v.state case 1: @@ -10796,7 +11774,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryExpiredBallotsResponse); i { + switch v := v.(*QueryExpiredBallotIDsResponse); i { case 0: return &v.state case 1: @@ -10808,7 +11786,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryFinalizedBallotIDsRequest); i { + switch v := v.(*QueryExpiredBallotsRequest); i { case 0: return &v.state case 1: @@ -10820,7 +11798,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryFinalizedBallotIDsResponse); i { + switch v := v.(*QueryExpiredBallotsResponse); i { case 0: return &v.state case 1: @@ -10832,7 +11810,7 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryFinalizedBallotsRequest); i { + switch v := v.(*QueryFinalizedBallotIDsRequest); i { case 0: return &v.state case 1: @@ -10844,6 +11822,30 @@ func file_uvalidator_v1_query_proto_init() { } } file_uvalidator_v1_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryFinalizedBallotIDsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_query_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryFinalizedBallotsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_query_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryFinalizedBallotsResponse); i { case 0: return &v.state @@ -10862,7 +11864,7 @@ func file_uvalidator_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_uvalidator_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 20, + NumMessages: 22, NumExtensions: 0, NumServices: 1, }, diff --git a/api/uvalidator/v1/query_grpc.pb.go b/api/uvalidator/v1/query_grpc.pb.go index bdaedf81..2df92be1 100644 --- a/api/uvalidator/v1/query_grpc.pb.go +++ b/api/uvalidator/v1/query_grpc.pb.go @@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Query_Params_FullMethodName = "/uvalidator.v1.Query/Params" + Query_UniversalValidator_FullMethodName = "/uvalidator.v1.Query/UniversalValidator" Query_AllUniversalValidators_FullMethodName = "/uvalidator.v1.Query/AllUniversalValidators" Query_Ballot_FullMethodName = "/uvalidator.v1.Query/Ballot" Query_AllBallots_FullMethodName = "/uvalidator.v1.Query/AllBallots" @@ -37,6 +38,8 @@ const ( type QueryClient interface { // Params queries all parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // UniversalValidator queries one universal validator by core validator address. + UniversalValidator(ctx context.Context, in *QueryUniversalValidatorRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorResponse, error) // AllUniversalValidators queries the details of a specific universal validator by its address. AllUniversalValidators(ctx context.Context, in *QueryUniversalValidatorsSetRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorsSetResponse, error) // Ballot queries one ballot by ID. @@ -74,6 +77,15 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) UniversalValidator(ctx context.Context, in *QueryUniversalValidatorRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorResponse, error) { + out := new(QueryUniversalValidatorResponse) + err := c.cc.Invoke(ctx, Query_UniversalValidator_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) AllUniversalValidators(ctx context.Context, in *QueryUniversalValidatorsSetRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorsSetResponse, error) { out := new(QueryUniversalValidatorsSetResponse) err := c.cc.Invoke(ctx, Query_AllUniversalValidators_FullMethodName, in, out, opts...) @@ -161,6 +173,8 @@ func (c *queryClient) AllFinalizedBallots(ctx context.Context, in *QueryFinalize type QueryServer interface { // Params queries all parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // UniversalValidator queries one universal validator by core validator address. + UniversalValidator(context.Context, *QueryUniversalValidatorRequest) (*QueryUniversalValidatorResponse, error) // AllUniversalValidators queries the details of a specific universal validator by its address. AllUniversalValidators(context.Context, *QueryUniversalValidatorsSetRequest) (*QueryUniversalValidatorsSetResponse, error) // Ballot queries one ballot by ID. @@ -189,6 +203,9 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (UnimplementedQueryServer) UniversalValidator(context.Context, *QueryUniversalValidatorRequest) (*QueryUniversalValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UniversalValidator not implemented") +} func (UnimplementedQueryServer) AllUniversalValidators(context.Context, *QueryUniversalValidatorsSetRequest) (*QueryUniversalValidatorsSetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllUniversalValidators not implemented") } @@ -247,6 +264,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_UniversalValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUniversalValidatorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UniversalValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_UniversalValidator_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UniversalValidator(ctx, req.(*QueryUniversalValidatorRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_AllUniversalValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryUniversalValidatorsSetRequest) if err := dec(in); err != nil { @@ -420,6 +455,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "UniversalValidator", + Handler: _Query_UniversalValidator_Handler, + }, { MethodName: "AllUniversalValidators", Handler: _Query_AllUniversalValidators_Handler, From 7a3a5fa563efd0faa1606af66350db87a3b2a8de Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 7 Nov 2025 13:21:07 +0530 Subject: [PATCH 025/105] refactor: added query server impl for single universal validator --- x/uvalidator/keeper/query_server.go | 33 +++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/x/uvalidator/keeper/query_server.go b/x/uvalidator/keeper/query_server.go index a68ffde7..3dca7a5d 100755 --- a/x/uvalidator/keeper/query_server.go +++ b/x/uvalidator/keeper/query_server.go @@ -38,9 +38,9 @@ func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*type func (k Querier) AllUniversalValidators(goCtx context.Context, req *types.QueryUniversalValidatorsSetRequest) (*types.QueryUniversalValidatorsSetResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - var validators []string - err := k.Keeper.UniversalValidatorSet.Walk(ctx, nil, func(addr sdk.ValAddress) (stop bool, err error) { - validators = append(validators, addr.String()) + var validators []*types.UniversalValidator + err := k.Keeper.UniversalValidatorSet.Walk(ctx, nil, func(addr sdk.ValAddress, val types.UniversalValidator) (stop bool, err error) { + validators = append(validators, &val) return false, nil }) if err != nil { @@ -48,7 +48,32 @@ func (k Querier) AllUniversalValidators(goCtx context.Context, req *types.QueryU } return &types.QueryUniversalValidatorsSetResponse{ - Addresses: validators, + UniversalValidator: validators, + }, nil +} + +func (k Querier) UniversalValidator(goCtx context.Context, req *types.QueryUniversalValidatorRequest) (*types.QueryUniversalValidatorResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + if req == nil || req.CoreValidatorAddress == "" { + return nil, status.Error(codes.InvalidArgument, "core validator address is required") + } + + valAddr, err := sdk.ValAddressFromBech32(req.CoreValidatorAddress) + if err != nil { + return nil, status.Errorf(codes.InvalidArgument, "invalid validator address: %v", err) + } + + val, err := k.Keeper.UniversalValidatorSet.Get(ctx, valAddr) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return nil, status.Errorf(codes.NotFound, "universal validator %s not found", req.CoreValidatorAddress) + } + return nil, status.Errorf(codes.Internal, "failed to fetch validator: %v", err) + } + + return &types.QueryUniversalValidatorResponse{ + UniversalValidator: &val, }, nil } From dd8b7adfb38a677c58e1ae649b9c102ea09e7e22 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 7 Nov 2025 13:21:19 +0530 Subject: [PATCH 026/105] refactor: added generated protobuf --- .../types/msg_add_universal_validator_test.go | 4 + x/uvalidator/types/query.pb.go | 584 +++++++++++++++--- x/uvalidator/types/query.pb.gw.go | 101 +++ 3 files changed, 597 insertions(+), 92 deletions(-) diff --git a/x/uvalidator/types/msg_add_universal_validator_test.go b/x/uvalidator/types/msg_add_universal_validator_test.go index 3fa49f1d..8a177e55 100644 --- a/x/uvalidator/types/msg_add_universal_validator_test.go +++ b/x/uvalidator/types/msg_add_universal_validator_test.go @@ -29,6 +29,10 @@ func TestMsgAddUniversalValidator_ValidateBasic(t *testing.T) { msg: types.MsgAddUniversalValidator{ Signer: validAdmin, CoreValidatorAddress: validCoreVal, + Pubkey: "pubkey_temp", + Network: &types.NetworkInfo{ + Ip: "ip", + }, }, wantErr: false, }, diff --git a/x/uvalidator/types/query.pb.go b/x/uvalidator/types/query.pb.go index f868e36b..97f7653f 100644 --- a/x/uvalidator/types/query.pb.go +++ b/x/uvalidator/types/query.pb.go @@ -112,6 +112,95 @@ func (m *QueryParamsResponse) GetParams() *Params { return nil } +// Single Universal Validator +type QueryUniversalValidatorRequest struct { + CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` +} + +func (m *QueryUniversalValidatorRequest) Reset() { *m = QueryUniversalValidatorRequest{} } +func (m *QueryUniversalValidatorRequest) String() string { return proto.CompactTextString(m) } +func (*QueryUniversalValidatorRequest) ProtoMessage() {} +func (*QueryUniversalValidatorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f4cd4c651106fbb0, []int{2} +} +func (m *QueryUniversalValidatorRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUniversalValidatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUniversalValidatorRequest.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 *QueryUniversalValidatorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUniversalValidatorRequest.Merge(m, src) +} +func (m *QueryUniversalValidatorRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryUniversalValidatorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUniversalValidatorRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUniversalValidatorRequest proto.InternalMessageInfo + +func (m *QueryUniversalValidatorRequest) GetCoreValidatorAddress() string { + if m != nil { + return m.CoreValidatorAddress + } + return "" +} + +type QueryUniversalValidatorResponse struct { + UniversalValidator *UniversalValidator `protobuf:"bytes,1,opt,name=universal_validator,json=universalValidator,proto3" json:"universal_validator,omitempty"` +} + +func (m *QueryUniversalValidatorResponse) Reset() { *m = QueryUniversalValidatorResponse{} } +func (m *QueryUniversalValidatorResponse) String() string { return proto.CompactTextString(m) } +func (*QueryUniversalValidatorResponse) ProtoMessage() {} +func (*QueryUniversalValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f4cd4c651106fbb0, []int{3} +} +func (m *QueryUniversalValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryUniversalValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryUniversalValidatorResponse.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 *QueryUniversalValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryUniversalValidatorResponse.Merge(m, src) +} +func (m *QueryUniversalValidatorResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryUniversalValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryUniversalValidatorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryUniversalValidatorResponse proto.InternalMessageInfo + +func (m *QueryUniversalValidatorResponse) GetUniversalValidator() *UniversalValidator { + if m != nil { + return m.UniversalValidator + } + return nil +} + // QueryUniversalValidatorsSetRequest is the request type for Query/UniversalValidatorAddresses. type QueryUniversalValidatorsSetRequest struct { } @@ -120,7 +209,7 @@ func (m *QueryUniversalValidatorsSetRequest) Reset() { *m = QueryUnivers func (m *QueryUniversalValidatorsSetRequest) String() string { return proto.CompactTextString(m) } func (*QueryUniversalValidatorsSetRequest) ProtoMessage() {} func (*QueryUniversalValidatorsSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{2} + return fileDescriptor_f4cd4c651106fbb0, []int{4} } func (m *QueryUniversalValidatorsSetRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -152,14 +241,14 @@ var xxx_messageInfo_QueryUniversalValidatorsSetRequest proto.InternalMessageInfo // QueryUniversalValidatorsSetResponse is the response type for Query/UniversalValidatorAddresses. type QueryUniversalValidatorsSetResponse struct { // addresses is the list of all universal validator addresses registered in the module. - Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"` + UniversalValidator []*UniversalValidator `protobuf:"bytes,1,rep,name=universal_validator,json=universalValidator,proto3" json:"universal_validator,omitempty"` } func (m *QueryUniversalValidatorsSetResponse) Reset() { *m = QueryUniversalValidatorsSetResponse{} } func (m *QueryUniversalValidatorsSetResponse) String() string { return proto.CompactTextString(m) } func (*QueryUniversalValidatorsSetResponse) ProtoMessage() {} func (*QueryUniversalValidatorsSetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{3} + return fileDescriptor_f4cd4c651106fbb0, []int{5} } func (m *QueryUniversalValidatorsSetResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -188,9 +277,9 @@ func (m *QueryUniversalValidatorsSetResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryUniversalValidatorsSetResponse proto.InternalMessageInfo -func (m *QueryUniversalValidatorsSetResponse) GetAddresses() []string { +func (m *QueryUniversalValidatorsSetResponse) GetUniversalValidator() []*UniversalValidator { if m != nil { - return m.Addresses + return m.UniversalValidator } return nil } @@ -204,7 +293,7 @@ func (m *QueryBallotRequest) Reset() { *m = QueryBallotRequest{} } func (m *QueryBallotRequest) String() string { return proto.CompactTextString(m) } func (*QueryBallotRequest) ProtoMessage() {} func (*QueryBallotRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{4} + return fileDescriptor_f4cd4c651106fbb0, []int{6} } func (m *QueryBallotRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -248,7 +337,7 @@ func (m *QueryBallotResponse) Reset() { *m = QueryBallotResponse{} } func (m *QueryBallotResponse) String() string { return proto.CompactTextString(m) } func (*QueryBallotResponse) ProtoMessage() {} func (*QueryBallotResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{5} + return fileDescriptor_f4cd4c651106fbb0, []int{7} } func (m *QueryBallotResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -293,7 +382,7 @@ func (m *QueryBallotsRequest) Reset() { *m = QueryBallotsRequest{} } func (m *QueryBallotsRequest) String() string { return proto.CompactTextString(m) } func (*QueryBallotsRequest) ProtoMessage() {} func (*QueryBallotsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{6} + return fileDescriptor_f4cd4c651106fbb0, []int{8} } func (m *QueryBallotsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -338,7 +427,7 @@ func (m *QueryBallotsResponse) Reset() { *m = QueryBallotsResponse{} } func (m *QueryBallotsResponse) String() string { return proto.CompactTextString(m) } func (*QueryBallotsResponse) ProtoMessage() {} func (*QueryBallotsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{7} + return fileDescriptor_f4cd4c651106fbb0, []int{9} } func (m *QueryBallotsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -390,7 +479,7 @@ func (m *QueryActiveBallotIDsRequest) Reset() { *m = QueryActiveBallotID func (m *QueryActiveBallotIDsRequest) String() string { return proto.CompactTextString(m) } func (*QueryActiveBallotIDsRequest) ProtoMessage() {} func (*QueryActiveBallotIDsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{8} + return fileDescriptor_f4cd4c651106fbb0, []int{10} } func (m *QueryActiveBallotIDsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -435,7 +524,7 @@ func (m *QueryActiveBallotIDsResponse) Reset() { *m = QueryActiveBallotI func (m *QueryActiveBallotIDsResponse) String() string { return proto.CompactTextString(m) } func (*QueryActiveBallotIDsResponse) ProtoMessage() {} func (*QueryActiveBallotIDsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{9} + return fileDescriptor_f4cd4c651106fbb0, []int{11} } func (m *QueryActiveBallotIDsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -486,7 +575,7 @@ func (m *QueryActiveBallotsRequest) Reset() { *m = QueryActiveBallotsReq func (m *QueryActiveBallotsRequest) String() string { return proto.CompactTextString(m) } func (*QueryActiveBallotsRequest) ProtoMessage() {} func (*QueryActiveBallotsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{10} + return fileDescriptor_f4cd4c651106fbb0, []int{12} } func (m *QueryActiveBallotsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -531,7 +620,7 @@ func (m *QueryActiveBallotsResponse) Reset() { *m = QueryActiveBallotsRe func (m *QueryActiveBallotsResponse) String() string { return proto.CompactTextString(m) } func (*QueryActiveBallotsResponse) ProtoMessage() {} func (*QueryActiveBallotsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{11} + return fileDescriptor_f4cd4c651106fbb0, []int{13} } func (m *QueryActiveBallotsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -583,7 +672,7 @@ func (m *QueryExpiredBallotIDsRequest) Reset() { *m = QueryExpiredBallot func (m *QueryExpiredBallotIDsRequest) String() string { return proto.CompactTextString(m) } func (*QueryExpiredBallotIDsRequest) ProtoMessage() {} func (*QueryExpiredBallotIDsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{12} + return fileDescriptor_f4cd4c651106fbb0, []int{14} } func (m *QueryExpiredBallotIDsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -628,7 +717,7 @@ func (m *QueryExpiredBallotIDsResponse) Reset() { *m = QueryExpiredBallo func (m *QueryExpiredBallotIDsResponse) String() string { return proto.CompactTextString(m) } func (*QueryExpiredBallotIDsResponse) ProtoMessage() {} func (*QueryExpiredBallotIDsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{13} + return fileDescriptor_f4cd4c651106fbb0, []int{15} } func (m *QueryExpiredBallotIDsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -679,7 +768,7 @@ func (m *QueryExpiredBallotsRequest) Reset() { *m = QueryExpiredBallotsR func (m *QueryExpiredBallotsRequest) String() string { return proto.CompactTextString(m) } func (*QueryExpiredBallotsRequest) ProtoMessage() {} func (*QueryExpiredBallotsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{14} + return fileDescriptor_f4cd4c651106fbb0, []int{16} } func (m *QueryExpiredBallotsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -724,7 +813,7 @@ func (m *QueryExpiredBallotsResponse) Reset() { *m = QueryExpiredBallots func (m *QueryExpiredBallotsResponse) String() string { return proto.CompactTextString(m) } func (*QueryExpiredBallotsResponse) ProtoMessage() {} func (*QueryExpiredBallotsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{15} + return fileDescriptor_f4cd4c651106fbb0, []int{17} } func (m *QueryExpiredBallotsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -776,7 +865,7 @@ func (m *QueryFinalizedBallotIDsRequest) Reset() { *m = QueryFinalizedBa func (m *QueryFinalizedBallotIDsRequest) String() string { return proto.CompactTextString(m) } func (*QueryFinalizedBallotIDsRequest) ProtoMessage() {} func (*QueryFinalizedBallotIDsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{16} + return fileDescriptor_f4cd4c651106fbb0, []int{18} } func (m *QueryFinalizedBallotIDsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -821,7 +910,7 @@ func (m *QueryFinalizedBallotIDsResponse) Reset() { *m = QueryFinalizedB func (m *QueryFinalizedBallotIDsResponse) String() string { return proto.CompactTextString(m) } func (*QueryFinalizedBallotIDsResponse) ProtoMessage() {} func (*QueryFinalizedBallotIDsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{17} + return fileDescriptor_f4cd4c651106fbb0, []int{19} } func (m *QueryFinalizedBallotIDsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -872,7 +961,7 @@ func (m *QueryFinalizedBallotsRequest) Reset() { *m = QueryFinalizedBall func (m *QueryFinalizedBallotsRequest) String() string { return proto.CompactTextString(m) } func (*QueryFinalizedBallotsRequest) ProtoMessage() {} func (*QueryFinalizedBallotsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{18} + return fileDescriptor_f4cd4c651106fbb0, []int{20} } func (m *QueryFinalizedBallotsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -917,7 +1006,7 @@ func (m *QueryFinalizedBallotsResponse) Reset() { *m = QueryFinalizedBal func (m *QueryFinalizedBallotsResponse) String() string { return proto.CompactTextString(m) } func (*QueryFinalizedBallotsResponse) ProtoMessage() {} func (*QueryFinalizedBallotsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f4cd4c651106fbb0, []int{19} + return fileDescriptor_f4cd4c651106fbb0, []int{21} } func (m *QueryFinalizedBallotsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -963,6 +1052,8 @@ func (m *QueryFinalizedBallotsResponse) GetPagination() *query.PageResponse { func init() { proto.RegisterType((*QueryParamsRequest)(nil), "uvalidator.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "uvalidator.v1.QueryParamsResponse") + proto.RegisterType((*QueryUniversalValidatorRequest)(nil), "uvalidator.v1.QueryUniversalValidatorRequest") + proto.RegisterType((*QueryUniversalValidatorResponse)(nil), "uvalidator.v1.QueryUniversalValidatorResponse") proto.RegisterType((*QueryUniversalValidatorsSetRequest)(nil), "uvalidator.v1.QueryUniversalValidatorsSetRequest") proto.RegisterType((*QueryUniversalValidatorsSetResponse)(nil), "uvalidator.v1.QueryUniversalValidatorsSetResponse") proto.RegisterType((*QueryBallotRequest)(nil), "uvalidator.v1.QueryBallotRequest") @@ -986,62 +1077,67 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/query.proto", fileDescriptor_f4cd4c651106fbb0) } var fileDescriptor_f4cd4c651106fbb0 = []byte{ - // 867 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x97, 0xcf, 0x4f, 0xdb, 0x48, - 0x14, 0xc7, 0x71, 0xd0, 0x66, 0xc5, 0xa0, 0x5d, 0xb1, 0xc3, 0x8f, 0x05, 0x43, 0x0c, 0x38, 0x81, - 0x0d, 0x81, 0xd8, 0x0a, 0x7b, 0xe8, 0x39, 0x94, 0x52, 0xf5, 0x06, 0xa9, 0xda, 0x43, 0xa5, 0xaa, - 0x9a, 0xc4, 0x43, 0x32, 0xd2, 0x60, 0x9b, 0x8c, 0x13, 0x01, 0x6d, 0x2f, 0xfd, 0x03, 0x2a, 0xd4, - 0x4a, 0xfd, 0xa5, 0x1e, 0x7b, 0xec, 0xbd, 0xff, 0x42, 0x8f, 0x48, 0xbd, 0xf4, 0x58, 0x41, 0xff, - 0x90, 0x2a, 0x33, 0xe3, 0x04, 0x3b, 0x76, 0x92, 0x4a, 0x89, 0xb8, 0x59, 0x9e, 0xef, 0xbc, 0xef, - 0xe7, 0xbd, 0x37, 0xc9, 0x1b, 0x83, 0x85, 0x46, 0x13, 0x51, 0x62, 0x21, 0xcf, 0xa9, 0x9b, 0xcd, - 0x82, 0x79, 0xdc, 0xc0, 0xf5, 0x53, 0xc3, 0xad, 0x3b, 0x9e, 0x03, 0xff, 0xea, 0x2c, 0x19, 0xcd, - 0x82, 0xba, 0x54, 0x75, 0x9c, 0x2a, 0xc5, 0x26, 0x72, 0x89, 0x89, 0x6c, 0xdb, 0xf1, 0x90, 0x47, - 0x1c, 0x9b, 0x09, 0xb1, 0xba, 0x18, 0x8c, 0x53, 0xc5, 0x36, 0x66, 0xc4, 0x5f, 0x0c, 0x99, 0x78, - 0xa7, 0x2e, 0xf6, 0x97, 0xd4, 0xe0, 0x52, 0x19, 0x51, 0xea, 0x78, 0x72, 0x2d, 0x57, 0x71, 0xd8, - 0x91, 0xc3, 0xcc, 0x32, 0x62, 0x58, 0x90, 0x99, 0xcd, 0x42, 0x19, 0x7b, 0xa8, 0x60, 0xba, 0xa8, - 0x4a, 0x6c, 0x0e, 0x20, 0xb4, 0xfa, 0x0c, 0x80, 0x07, 0x2d, 0xc5, 0x3e, 0xaa, 0xa3, 0x23, 0x56, - 0xc2, 0xc7, 0x0d, 0xcc, 0x3c, 0x7d, 0x17, 0x4c, 0x07, 0xde, 0x32, 0xd7, 0xb1, 0x19, 0x86, 0x79, - 0x90, 0x74, 0xf9, 0x9b, 0x79, 0x65, 0x45, 0xc9, 0x4e, 0x6e, 0xcf, 0x1a, 0x81, 0x54, 0x0d, 0x29, - 0x97, 0x22, 0x3d, 0x03, 0x74, 0x1e, 0xe5, 0x81, 0x4d, 0x9a, 0xb8, 0xce, 0x10, 0x7d, 0xe8, 0x8b, - 0xd9, 0x7d, 0xec, 0xf9, 0x5e, 0xb7, 0x41, 0xba, 0xa7, 0x4a, 0x7a, 0x2f, 0x81, 0x09, 0x64, 0x59, - 0x75, 0xcc, 0x18, 0x6e, 0xd9, 0x8f, 0x67, 0x27, 0x4a, 0x9d, 0x17, 0x7a, 0x46, 0xa6, 0xb1, 0xc3, - 0xeb, 0x20, 0x43, 0xc3, 0xbf, 0x41, 0x82, 0x58, 0x9c, 0x75, 0xa2, 0x94, 0x20, 0x56, 0x3b, 0x2d, - 0x5f, 0xd5, 0x49, 0x4b, 0xd4, 0x2f, 0x26, 0x2d, 0x29, 0x97, 0x22, 0xfd, 0x71, 0x20, 0x8a, 0x5f, - 0x33, 0xb8, 0x07, 0x40, 0xa7, 0xba, 0x32, 0xd2, 0xba, 0x21, 0x5a, 0x61, 0xb4, 0x5a, 0x61, 0x88, - 0x43, 0x22, 0x5b, 0x61, 0xec, 0xa3, 0x2a, 0x96, 0x7b, 0x4b, 0xd7, 0x76, 0xea, 0xe7, 0x0a, 0x98, - 0x09, 0xc6, 0x97, 0x98, 0x26, 0xf8, 0x53, 0x10, 0x88, 0xfc, 0x63, 0x39, 0x7d, 0x15, 0xbc, 0x1b, - 0x20, 0x4a, 0x70, 0xa2, 0xff, 0xfa, 0x12, 0x09, 0xb7, 0x00, 0x12, 0x06, 0x8b, 0x9c, 0xa8, 0x58, - 0xf1, 0x48, 0x13, 0x0b, 0x9b, 0x7b, 0xbb, 0x43, 0xcf, 0xfc, 0x14, 0x2c, 0x45, 0xdb, 0xc8, 0x02, - 0x4c, 0x81, 0x71, 0x62, 0xf9, 0xcd, 0x6f, 0x3d, 0x0e, 0x2f, 0xc3, 0x0a, 0x58, 0xe8, 0xb2, 0x1e, - 0x7a, 0x7e, 0x6f, 0x14, 0xa0, 0x46, 0xb9, 0xdc, 0x78, 0x7f, 0x0f, 0x65, 0xe1, 0xef, 0x9c, 0xb8, - 0xa4, 0x8e, 0xad, 0x91, 0x35, 0xf8, 0x0c, 0xa4, 0x62, 0x7c, 0x46, 0xdf, 0x61, 0x4b, 0xd6, 0x3e, - 0xe0, 0x3d, 0xf4, 0x0c, 0xdf, 0x2a, 0xf2, 0xa7, 0x12, 0xb6, 0xb9, 0xf1, 0x1e, 0xd7, 0x80, 0xc6, - 0xc1, 0xf6, 0x88, 0x8d, 0x28, 0x39, 0x1b, 0x61, 0x97, 0x9f, 0x81, 0xe5, 0x58, 0xa7, 0xd1, 0xf7, - 0xd9, 0x3f, 0xcb, 0x21, 0xf7, 0xa1, 0x67, 0xf9, 0x5e, 0x91, 0x87, 0xb9, 0xdb, 0xe8, 0xa6, 0x7b, - 0xbd, 0xfd, 0x65, 0x12, 0xfc, 0xc1, 0xd9, 0xa0, 0x0d, 0x92, 0x62, 0x28, 0xc3, 0xd5, 0x90, 0x79, - 0xf7, 0xd4, 0x57, 0xf5, 0x5e, 0x12, 0x61, 0xa3, 0xa7, 0x5e, 0x7c, 0xfb, 0xf9, 0x3a, 0xf1, 0x2f, - 0x9c, 0x35, 0x83, 0x17, 0x10, 0x31, 0xf2, 0xe1, 0x67, 0x05, 0xcc, 0x15, 0x29, 0x8d, 0x98, 0xe5, - 0xb0, 0x10, 0x15, 0xbd, 0xe7, 0xd5, 0x40, 0xdd, 0xfe, 0x9d, 0x2d, 0x12, 0x70, 0x93, 0x03, 0xae, - 0xc1, 0x74, 0x08, 0xb0, 0xe1, 0x6f, 0x7b, 0xd2, 0xec, 0x30, 0x79, 0x20, 0x29, 0x9a, 0x10, 0x5d, - 0x9e, 0xc0, 0x6d, 0x22, 0xba, 0x3c, 0xc1, 0xab, 0x84, 0x9e, 0xe6, 0xee, 0x29, 0xb8, 0x68, 0x46, - 0xdd, 0xcf, 0x98, 0xf9, 0x94, 0x58, 0xcf, 0x61, 0x03, 0x80, 0x22, 0xa5, 0xf2, 0xb8, 0xc0, 0x1e, - 0x61, 0xdb, 0x9d, 0x49, 0xf7, 0xd4, 0x48, 0x6f, 0x8d, 0x7b, 0xcf, 0xc3, 0xb9, 0x68, 0x6f, 0xf8, - 0x4e, 0x01, 0xb0, 0x48, 0x69, 0x68, 0xba, 0xc2, 0x5c, 0x54, 0xec, 0xe8, 0x49, 0xaf, 0x6e, 0x0e, - 0xa4, 0x95, 0x3c, 0x1b, 0x9c, 0x27, 0x0d, 0x57, 0x63, 0x6a, 0x81, 0xf8, 0x3e, 0xb3, 0xf5, 0xeb, - 0x7f, 0xa9, 0x80, 0xa9, 0x10, 0x1a, 0x83, 0xd9, 0x7e, 0x66, 0x6d, 0xac, 0x8d, 0x01, 0x94, 0x12, - 0x6a, 0x8d, 0x43, 0x2d, 0xc3, 0x54, 0x4f, 0x28, 0xf8, 0x51, 0x01, 0xd3, 0x45, 0x4a, 0xc3, 0x83, - 0x0a, 0x46, 0x16, 0x20, 0x66, 0x6c, 0xaa, 0x5b, 0x83, 0x89, 0x25, 0x59, 0x8e, 0x93, 0x65, 0xa0, - 0x1e, 0x43, 0x86, 0xc5, 0x46, 0x5e, 0xaf, 0x57, 0x0a, 0xf8, 0x27, 0x8c, 0xc7, 0xe0, 0x46, 0x5f, - 0xbf, 0x36, 0x5a, 0x6e, 0x10, 0xa9, 0x04, 0x5b, 0xe7, 0x60, 0x2b, 0x50, 0xeb, 0x0d, 0x06, 0x3f, - 0x29, 0x60, 0xb6, 0x48, 0x69, 0xf7, 0xdf, 0x3e, 0xcc, 0x47, 0xb9, 0xc5, 0x0e, 0x22, 0xd5, 0x18, - 0x54, 0x2e, 0x01, 0xb7, 0x38, 0xe0, 0x3a, 0xcc, 0xc4, 0x00, 0x1e, 0xfa, 0x5b, 0x79, 0xed, 0x3e, - 0x88, 0xd6, 0x86, 0xff, 0xb6, 0xa3, 0x5b, 0x1b, 0x33, 0x45, 0xa2, 0x5b, 0x1b, 0x37, 0x09, 0xf4, - 0x2c, 0x07, 0xd4, 0xe1, 0x4a, 0x3f, 0xc0, 0x9d, 0x83, 0xaf, 0x97, 0x9a, 0x72, 0x71, 0xa9, 0x29, - 0x3f, 0x2e, 0x35, 0xe5, 0xfc, 0x4a, 0x1b, 0xbb, 0xb8, 0xd2, 0xc6, 0xbe, 0x5f, 0x69, 0x63, 0x8f, - 0x6e, 0x55, 0x89, 0x57, 0x6b, 0x94, 0x8d, 0x8a, 0x73, 0x64, 0xba, 0x0d, 0x56, 0xab, 0xd4, 0x10, - 0xb1, 0xf9, 0x53, 0x9e, 0x3f, 0xe6, 0x6d, 0xc7, 0xc2, 0xe6, 0xc9, 0x75, 0x07, 0xfe, 0xbd, 0x58, - 0x4e, 0xf2, 0x0f, 0xbd, 0xff, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x10, 0xb0, 0xfb, 0x4d, 0xb2, - 0x0e, 0x00, 0x00, + // 958 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x98, 0xcd, 0x6e, 0xdb, 0x46, + 0x10, 0xc7, 0xbd, 0x0e, 0xea, 0x22, 0xd3, 0x0f, 0xa4, 0xe3, 0x8f, 0x26, 0x74, 0xc4, 0x38, 0x94, + 0xe3, 0xda, 0x4e, 0x4c, 0x42, 0x6e, 0x81, 0x1e, 0x8a, 0x1e, 0x94, 0xa6, 0x29, 0x7a, 0x4b, 0x54, + 0x34, 0x87, 0x02, 0x45, 0xb0, 0x12, 0x37, 0xf2, 0x02, 0x6b, 0x52, 0xd1, 0x92, 0x42, 0x9c, 0x34, + 0x97, 0x3e, 0x40, 0x11, 0xb4, 0x40, 0xbf, 0xd0, 0x63, 0x8f, 0x7d, 0x80, 0x3e, 0x42, 0x8f, 0x06, + 0x7a, 0xe9, 0xb1, 0xb0, 0xfb, 0x04, 0x7d, 0x82, 0x42, 0xbb, 0x4b, 0xc9, 0xa4, 0x96, 0x92, 0x8a, + 0x48, 0xf0, 0x8d, 0xe0, 0xcc, 0xce, 0xff, 0xb7, 0x33, 0x23, 0xce, 0xd8, 0x70, 0x25, 0xed, 0x51, + 0xc1, 0x43, 0x9a, 0xc4, 0xdd, 0xa0, 0x57, 0x0b, 0x1e, 0xa7, 0xac, 0x7b, 0xe4, 0x77, 0xba, 0x71, + 0x12, 0xe3, 0x1b, 0x43, 0x93, 0xdf, 0xab, 0x39, 0x57, 0xdb, 0x71, 0xdc, 0x16, 0x2c, 0xa0, 0x1d, + 0x1e, 0xd0, 0x28, 0x8a, 0x13, 0x9a, 0xf0, 0x38, 0x92, 0xda, 0xd9, 0x59, 0xcf, 0xc7, 0x69, 0xb3, + 0x88, 0x49, 0x9e, 0x19, 0x0b, 0x22, 0xc9, 0x51, 0x87, 0x65, 0x26, 0x27, 0x6f, 0x6a, 0x52, 0x21, + 0xe2, 0xc4, 0xd8, 0x2a, 0x79, 0xdb, 0x90, 0x46, 0x9b, 0x77, 0x5b, 0xb1, 0x3c, 0x8c, 0x65, 0xd0, + 0xa4, 0x92, 0x69, 0xf0, 0xa0, 0x57, 0x6b, 0xb2, 0x84, 0xd6, 0x82, 0x0e, 0x6d, 0xf3, 0x48, 0xf1, + 0x69, 0x5f, 0x6f, 0x05, 0xf0, 0x7e, 0xdf, 0xe3, 0x1e, 0xed, 0xd2, 0x43, 0xd9, 0x60, 0x8f, 0x53, + 0x26, 0x13, 0xef, 0x0e, 0x2c, 0xe7, 0xde, 0xca, 0x4e, 0x1c, 0x49, 0x86, 0x7b, 0xb0, 0xd4, 0x51, + 0x6f, 0x2e, 0x93, 0x0d, 0xb2, 0xfd, 0xda, 0xfe, 0xaa, 0x9f, 0xcb, 0x84, 0x6f, 0xdc, 0x8d, 0x93, + 0xf7, 0x00, 0x5c, 0x15, 0xe5, 0xf3, 0x88, 0xf7, 0x58, 0x57, 0x52, 0xf1, 0x20, 0x73, 0x36, 0x3a, + 0xf8, 0x1e, 0xac, 0xb5, 0xe2, 0x2e, 0x7b, 0x38, 0x88, 0xf2, 0x90, 0x86, 0x61, 0x97, 0x49, 0x2d, + 0x70, 0xb1, 0xb1, 0xd2, 0xb7, 0x0e, 0x4e, 0xd5, 0xb5, 0xcd, 0x4b, 0xe1, 0x5a, 0x69, 0x5c, 0x43, + 0xda, 0x80, 0xe5, 0x34, 0xb3, 0x0e, 0xa3, 0x1b, 0xec, 0xeb, 0x05, 0x6c, 0x4b, 0x1c, 0x4c, 0x47, + 0xde, 0x79, 0x9b, 0xe0, 0x95, 0xc8, 0xca, 0xcf, 0x58, 0x92, 0xa5, 0xee, 0x08, 0xaa, 0x63, 0xbd, + 0x26, 0x01, 0x5e, 0x78, 0x19, 0x40, 0x5d, 0xcb, 0xdb, 0xaa, 0x57, 0xb2, 0x1c, 0xbf, 0x09, 0x8b, + 0x3c, 0x34, 0xf9, 0x5c, 0xe4, 0xe1, 0xa0, 0xb6, 0x99, 0xd7, 0xb0, 0xb6, 0xba, 0xc7, 0x4a, 0x6a, + 0x6b, 0xdc, 0x8d, 0x93, 0xf7, 0x65, 0x2e, 0x4a, 0xd6, 0x38, 0x78, 0x17, 0x60, 0xd8, 0x62, 0x26, + 0xd2, 0x96, 0xaf, 0xfb, 0xd1, 0xef, 0xf7, 0xa3, 0xaf, 0x7f, 0x48, 0xa6, 0x1f, 0xfd, 0x7b, 0xb4, + 0xcd, 0xcc, 0xd9, 0xc6, 0x99, 0x93, 0xde, 0x0b, 0x02, 0x2b, 0xf9, 0xf8, 0x06, 0x33, 0x80, 0x57, + 0x35, 0x81, 0x34, 0xb9, 0x2a, 0xe1, 0xcc, 0xbc, 0xf0, 0x93, 0x1c, 0xd1, 0xa2, 0x22, 0x7a, 0x67, + 0x22, 0x91, 0x56, 0xcb, 0x21, 0x31, 0x58, 0x57, 0x44, 0xf5, 0x56, 0xc2, 0x7b, 0x4c, 0xcb, 0x7c, + 0x7a, 0x67, 0xe6, 0x37, 0x3f, 0x82, 0xab, 0x76, 0x19, 0x93, 0x80, 0x4b, 0x70, 0x81, 0x87, 0xfa, + 0xf2, 0x17, 0x1b, 0xfd, 0xc7, 0xd9, 0xdd, 0xb0, 0x05, 0x57, 0x46, 0xa4, 0x67, 0x7e, 0xbf, 0xef, + 0x09, 0x38, 0x36, 0x95, 0x73, 0xaf, 0xef, 0x23, 0x93, 0xf8, 0x8f, 0x9f, 0x74, 0x78, 0x97, 0x85, + 0x73, 0x2b, 0xf0, 0x53, 0xa8, 0x94, 0xe8, 0xcc, 0xbf, 0xc2, 0xa1, 0xc9, 0x7d, 0x4e, 0x7b, 0xe6, + 0x37, 0xfc, 0x81, 0x98, 0x9f, 0x4a, 0x51, 0xe6, 0xdc, 0x6b, 0x7c, 0x60, 0x26, 0xd2, 0x5d, 0x1e, + 0x51, 0xc1, 0x9f, 0xce, 0xb1, 0xca, 0x5f, 0x99, 0x19, 0x65, 0x53, 0x9a, 0x7f, 0x9d, 0xb3, 0x5e, + 0x2e, 0xa8, 0xcf, 0xfc, 0x96, 0x3f, 0x11, 0xd3, 0xcc, 0xa3, 0x42, 0xe7, 0x5d, 0xeb, 0xfd, 0x7f, + 0x5f, 0x87, 0x57, 0x14, 0x1b, 0x46, 0xb0, 0xa4, 0x37, 0x13, 0x2c, 0x0e, 0xd6, 0xd1, 0xd5, 0xc7, + 0xf1, 0xc6, 0xb9, 0x68, 0x19, 0xaf, 0xf2, 0xf5, 0x9f, 0xff, 0x7c, 0xb7, 0xf8, 0x36, 0xae, 0x06, + 0xf9, 0x45, 0x4c, 0xef, 0x3d, 0xf8, 0x3b, 0x01, 0x1c, 0x1d, 0xd9, 0xb8, 0x67, 0x8b, 0x5c, 0xba, + 0x1b, 0x39, 0xfe, 0xb4, 0xee, 0x06, 0xea, 0x23, 0x05, 0xf5, 0x21, 0x7e, 0x50, 0x80, 0xb2, 0xac, + 0x19, 0xc1, 0x33, 0xfb, 0xd6, 0xf5, 0x1c, 0x7f, 0x23, 0xb0, 0x56, 0x17, 0xc2, 0xb2, 0xbc, 0x60, + 0x6d, 0x3a, 0x9e, 0x33, 0xbb, 0x90, 0xb3, 0xff, 0x7f, 0x8e, 0x98, 0x6b, 0xdc, 0x54, 0xd7, 0xb8, + 0x81, 0xd5, 0xc9, 0xd7, 0x90, 0x98, 0xc0, 0x92, 0xee, 0x1f, 0x7b, 0x65, 0x73, 0x8b, 0x90, 0xbd, + 0xb2, 0xf9, 0x2d, 0xc8, 0xab, 0x2a, 0xf5, 0x0a, 0xae, 0x07, 0xb6, 0xf5, 0x5b, 0x06, 0xcf, 0x78, + 0xf8, 0x1c, 0x53, 0x80, 0xba, 0x10, 0xa6, 0xd3, 0x71, 0x4c, 0xd8, 0x41, 0x53, 0x55, 0xc7, 0xfa, + 0x18, 0x6d, 0x57, 0x69, 0x5f, 0xc6, 0x35, 0xbb, 0x36, 0xfe, 0x48, 0x00, 0xeb, 0x42, 0x14, 0x16, + 0x03, 0xdc, 0xb5, 0xc5, 0xb6, 0x2f, 0x29, 0xce, 0xcd, 0xa9, 0x7c, 0x0d, 0xcf, 0x8e, 0xe2, 0xa9, + 0xe2, 0xf5, 0x92, 0x5c, 0x50, 0x75, 0x2e, 0xe8, 0x7f, 0xb8, 0xbe, 0x21, 0x70, 0xa9, 0x80, 0x26, + 0x71, 0x7b, 0x92, 0xd8, 0x00, 0x6b, 0x67, 0x0a, 0x4f, 0x03, 0x75, 0x43, 0x41, 0x5d, 0xc3, 0xca, + 0x58, 0x28, 0xfc, 0x85, 0xc0, 0x72, 0x5d, 0x88, 0xe2, 0x8c, 0x45, 0x6b, 0x02, 0x4a, 0x26, 0xbe, + 0x73, 0x6b, 0x3a, 0x67, 0x43, 0xb6, 0xab, 0xc8, 0x36, 0xd1, 0x2b, 0x21, 0x63, 0xfa, 0xa0, 0xca, + 0xd7, 0xb7, 0x04, 0xde, 0x2a, 0xe2, 0x49, 0xdc, 0x99, 0xa8, 0x37, 0x40, 0xdb, 0x9d, 0xc6, 0xd5, + 0x80, 0x6d, 0x29, 0xb0, 0x0d, 0x74, 0xc7, 0x83, 0xe1, 0xaf, 0x04, 0x56, 0xeb, 0x42, 0x8c, 0x4e, + 0x2c, 0xfb, 0x97, 0xab, 0x74, 0x86, 0xda, 0xbf, 0x5c, 0xe5, 0x83, 0xd0, 0xbb, 0xa5, 0x00, 0xb7, + 0x70, 0xb3, 0x04, 0xf0, 0x51, 0x76, 0x54, 0xe5, 0xee, 0x67, 0x5d, 0xda, 0xe2, 0xc4, 0xb1, 0x97, + 0xb6, 0x64, 0x00, 0xda, 0x4b, 0x5b, 0x36, 0xc4, 0xbc, 0x6d, 0x05, 0xe8, 0xe1, 0xc6, 0x24, 0xc0, + 0xdb, 0xf7, 0xff, 0x38, 0x71, 0xc9, 0xf1, 0x89, 0x4b, 0xfe, 0x3e, 0x71, 0xc9, 0x8b, 0x53, 0x77, + 0xe1, 0xf8, 0xd4, 0x5d, 0xf8, 0xeb, 0xd4, 0x5d, 0xf8, 0xe2, 0xfd, 0x36, 0x4f, 0x0e, 0xd2, 0xa6, + 0xdf, 0x8a, 0x0f, 0x83, 0x4e, 0x2a, 0x0f, 0x5a, 0x07, 0x94, 0x47, 0xea, 0x69, 0x4f, 0x3d, 0xee, + 0x45, 0x71, 0xc8, 0x82, 0x27, 0x67, 0x15, 0xd4, 0xbf, 0x03, 0x9a, 0x4b, 0xea, 0x0f, 0xf5, 0x77, + 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x38, 0x07, 0xb0, 0xe3, 0x91, 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1058,6 +1154,8 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Params queries all parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // UniversalValidator queries one universal validator by core validator address. + UniversalValidator(ctx context.Context, in *QueryUniversalValidatorRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorResponse, error) // AllUniversalValidators queries the details of a specific universal validator by its address. AllUniversalValidators(ctx context.Context, in *QueryUniversalValidatorsSetRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorsSetResponse, error) // Ballot queries one ballot by ID. @@ -1095,6 +1193,15 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) UniversalValidator(ctx context.Context, in *QueryUniversalValidatorRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorResponse, error) { + out := new(QueryUniversalValidatorResponse) + err := c.cc.Invoke(ctx, "/uvalidator.v1.Query/UniversalValidator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) AllUniversalValidators(ctx context.Context, in *QueryUniversalValidatorsSetRequest, opts ...grpc.CallOption) (*QueryUniversalValidatorsSetResponse, error) { out := new(QueryUniversalValidatorsSetResponse) err := c.cc.Invoke(ctx, "/uvalidator.v1.Query/AllUniversalValidators", in, out, opts...) @@ -1180,6 +1287,8 @@ func (c *queryClient) AllFinalizedBallots(ctx context.Context, in *QueryFinalize type QueryServer interface { // Params queries all parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // UniversalValidator queries one universal validator by core validator address. + UniversalValidator(context.Context, *QueryUniversalValidatorRequest) (*QueryUniversalValidatorResponse, error) // AllUniversalValidators queries the details of a specific universal validator by its address. AllUniversalValidators(context.Context, *QueryUniversalValidatorsSetRequest) (*QueryUniversalValidatorsSetResponse, error) // Ballot queries one ballot by ID. @@ -1207,6 +1316,9 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (*UnimplementedQueryServer) UniversalValidator(ctx context.Context, req *QueryUniversalValidatorRequest) (*QueryUniversalValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UniversalValidator not implemented") +} func (*UnimplementedQueryServer) AllUniversalValidators(ctx context.Context, req *QueryUniversalValidatorsSetRequest) (*QueryUniversalValidatorsSetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllUniversalValidators not implemented") } @@ -1257,6 +1369,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_UniversalValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryUniversalValidatorRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).UniversalValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/uvalidator.v1.Query/UniversalValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).UniversalValidator(ctx, req.(*QueryUniversalValidatorRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_AllUniversalValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryUniversalValidatorsSetRequest) if err := dec(in); err != nil { @@ -1427,6 +1557,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "UniversalValidator", + Handler: _Query_UniversalValidator_Handler, + }, { MethodName: "AllUniversalValidators", Handler: _Query_AllUniversalValidators_Handler, @@ -1526,6 +1660,71 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryUniversalValidatorRequest) 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 *QueryUniversalValidatorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUniversalValidatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CoreValidatorAddress) > 0 { + i -= len(m.CoreValidatorAddress) + copy(dAtA[i:], m.CoreValidatorAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.CoreValidatorAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryUniversalValidatorResponse) 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 *QueryUniversalValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryUniversalValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UniversalValidator != nil { + { + size, err := m.UniversalValidator.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *QueryUniversalValidatorsSetRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1569,11 +1768,16 @@ func (m *QueryUniversalValidatorsSetResponse) MarshalToSizedBuffer(dAtA []byte) _ = i var l int _ = l - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Addresses[iNdEx]) - copy(dAtA[i:], m.Addresses[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + if len(m.UniversalValidator) > 0 { + for iNdEx := len(m.UniversalValidator) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UniversalValidator[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa } @@ -2252,6 +2456,32 @@ func (m *QueryParamsResponse) Size() (n int) { return n } +func (m *QueryUniversalValidatorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CoreValidatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryUniversalValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.UniversalValidator != nil { + l = m.UniversalValidator.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryUniversalValidatorsSetRequest) Size() (n int) { if m == nil { return 0 @@ -2267,9 +2497,9 @@ func (m *QueryUniversalValidatorsSetResponse) Size() (n int) { } var l int _ = l - if len(m.Addresses) > 0 { - for _, s := range m.Addresses { - l = len(s) + if len(m.UniversalValidator) > 0 { + for _, e := range m.UniversalValidator { + l = e.Size() n += 1 + l + sovQuery(uint64(l)) } } @@ -2668,6 +2898,174 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryUniversalValidatorRequest) 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 ErrIntOverflowQuery + } + 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: QueryUniversalValidatorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUniversalValidatorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryUniversalValidatorResponse) 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 ErrIntOverflowQuery + } + 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: QueryUniversalValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryUniversalValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UniversalValidator", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UniversalValidator == nil { + m.UniversalValidator = &UniversalValidator{} + } + if err := m.UniversalValidator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryUniversalValidatorsSetRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2749,9 +3147,9 @@ func (m *QueryUniversalValidatorsSetResponse) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field UniversalValidator", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2761,23 +3159,25 @@ func (m *QueryUniversalValidatorsSetResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + m.UniversalValidator = append(m.UniversalValidator, &UniversalValidator{}) + if err := m.UniversalValidator[len(m.UniversalValidator)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/uvalidator/types/query.pb.gw.go b/x/uvalidator/types/query.pb.gw.go index ec38fee4..f36f6d81 100644 --- a/x/uvalidator/types/query.pb.gw.go +++ b/x/uvalidator/types/query.pb.gw.go @@ -51,6 +51,60 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +func request_Query_UniversalValidator_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUniversalValidatorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["core_validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "core_validator_address") + } + + protoReq.CoreValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "core_validator_address", err) + } + + msg, err := client.UniversalValidator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_UniversalValidator_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryUniversalValidatorRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["core_validator_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "core_validator_address") + } + + protoReq.CoreValidatorAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "core_validator_address", err) + } + + msg, err := server.UniversalValidator(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_AllUniversalValidators_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryUniversalValidatorsSetRequest var metadata runtime.ServerMetadata @@ -404,6 +458,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_UniversalValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_UniversalValidator_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_UniversalValidator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_AllUniversalValidators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -672,6 +749,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_UniversalValidator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_UniversalValidator_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_UniversalValidator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_AllUniversalValidators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -858,6 +955,8 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"uvalidator", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_UniversalValidator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"uvalidator", "v1", "universal_validator", "core_validator_address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AllUniversalValidators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"uvalidator", "v1", "universal_validators"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Ballot_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"uvalidator", "v1", "ballots", "id"}, "", runtime.AssumeColonVerbOpt(false))) @@ -880,6 +979,8 @@ var ( var ( forward_Query_Params_0 = runtime.ForwardResponseMessage + forward_Query_UniversalValidator_0 = runtime.ForwardResponseMessage + forward_Query_AllUniversalValidators_0 = runtime.ForwardResponseMessage forward_Query_Ballot_0 = runtime.ForwardResponseMessage From 9cbdebc8d182a0f3ab3e8a53ae1191f62c361f1e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 7 Nov 2025 13:21:44 +0530 Subject: [PATCH 027/105] refactor: fixed uexecutor integration tests as per new uv structure --- .../inbound_synthetic_bridge_payload_test.go | 6 +++++- .../integration-test/inbound_synthetic_bridge_test.go | 6 +++++- x/uexecutor/integration-test/vote_gas_price_test.go | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/x/uexecutor/integration-test/inbound_synthetic_bridge_payload_test.go b/x/uexecutor/integration-test/inbound_synthetic_bridge_payload_test.go index 583c9348..c829e269 100644 --- a/x/uexecutor/integration-test/inbound_synthetic_bridge_payload_test.go +++ b/x/uexecutor/integration-test/inbound_synthetic_bridge_payload_test.go @@ -14,6 +14,7 @@ import ( utils "github.com/pushchain/push-chain-node/testutils" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" "github.com/stretchr/testify/require" ) @@ -70,7 +71,10 @@ func setupInboundBridgePayloadTest(t *testing.T, numVals int) (*app.ChainApp, sd fmt.Sprintf("universal-validator-%d", i), )).String() - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr) + pubkey := fmt.Sprintf("pubkey-%d", i) + network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.0.%d", i+1)} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) require.NoError(t, err) universalVals[i] = universalValAddr diff --git a/x/uexecutor/integration-test/inbound_synthetic_bridge_test.go b/x/uexecutor/integration-test/inbound_synthetic_bridge_test.go index aa051806..dd66d18c 100644 --- a/x/uexecutor/integration-test/inbound_synthetic_bridge_test.go +++ b/x/uexecutor/integration-test/inbound_synthetic_bridge_test.go @@ -13,6 +13,7 @@ import ( uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" "github.com/stretchr/testify/require" "time" @@ -76,7 +77,10 @@ func setupInboundBridgeTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Conte fmt.Sprintf("universal-validator-%d", i), )).String() - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr) + pubkey := fmt.Sprintf("pubkey-%d", i) + network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.0.%d", i+1)} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) require.NoError(t, err) universalVals[i] = universalValAddr diff --git a/x/uexecutor/integration-test/vote_gas_price_test.go b/x/uexecutor/integration-test/vote_gas_price_test.go index 0125a362..d857d4e7 100644 --- a/x/uexecutor/integration-test/vote_gas_price_test.go +++ b/x/uexecutor/integration-test/vote_gas_price_test.go @@ -15,6 +15,7 @@ import ( utils "github.com/pushchain/push-chain-node/testutils" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" ) func setupVoteGasPriceTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []string, []stakingtypes.Validator) { @@ -36,7 +37,10 @@ func setupVoteGasPriceTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Contex // --- Register validators as universal validators --- universalVals := make([]string, len(validators)) for i, val := range validators { - require.NoError(t, app.UvalidatorKeeper.AddUniversalValidator(ctx, val.OperatorAddress)) + pubkey := fmt.Sprintf("pubkey-%d", i) + network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.0.%d", i+1)} + + require.NoError(t, app.UvalidatorKeeper.AddUniversalValidator(ctx, val.OperatorAddress, pubkey, network)) universalVals[i] = sdk.AccAddress([]byte(fmt.Sprintf("universal-validator-%d", i))).String() } From 80078a2275414da0b00baa208faae84b206715bf Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 10 Nov 2025 10:12:29 +0530 Subject: [PATCH 028/105] refactor: modified add uv endpoint to activate an inactive validator again --- .../keeper/msg_add_universal_validator.go | 52 +++++++++++++++---- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/x/uvalidator/keeper/msg_add_universal_validator.go b/x/uvalidator/keeper/msg_add_universal_validator.go index de1af337..7661971e 100644 --- a/x/uvalidator/keeper/msg_add_universal_validator.go +++ b/x/uvalidator/keeper/msg_add_universal_validator.go @@ -8,8 +8,12 @@ import ( "github.com/pushchain/push-chain-node/x/uvalidator/types" ) -// AddUniversalValidator registers a core validator as a universal validator. -// It ensures the core validator exists, is bonded, and not already present. +// new validator -> added as a PENDING_JOIN status +// if existing: +// inactive -> added as a PENDING_JOIN status +// any other status -> revert +// AddUniversalValidator registers or reactivates a core validator as a universal validator. +// It ensures the core validator exists, is bonded, and handles lifecycle reactivation. func (k Keeper) AddUniversalValidator( ctx context.Context, coreValidatorAddr, pubkey string, @@ -23,24 +27,54 @@ func (k Keeper) AddUniversalValidator( return fmt.Errorf("invalid core validator address: %w", err) } - // Ensure the core validator exists in the staking module + // Ensure validator exists in staking module validator, err := k.stakingKeeper.GetValidator(sdkCtx, valAddr) if err != nil { return fmt.Errorf("core validator not found: %w", err) } - // Check that the validator is in bonded status + // Must be bonded to join if !validator.IsBonded() { return fmt.Errorf("validator %s is not bonded", coreValidatorAddr) } - // Revert if already present - if exists, err := k.UniversalValidatorSet.Has(ctx, valAddr); err != nil { + // Check if already exists + exists, err := k.UniversalValidatorSet.Has(ctx, valAddr) + if err != nil { return err - } else if exists { - return fmt.Errorf("validator %s already registered", coreValidatorAddr) } + if exists { + // Fetch existing validator entry + existingVal, err := k.UniversalValidatorSet.Get(ctx, valAddr) + if err != nil { + return fmt.Errorf("failed to fetch existing validator: %w", err) + } + + switch existingVal.LifecycleInfo.CurrentStatus { + case types.UVStatus_UV_STATUS_INACTIVE: + // Reactivate: INACTIVE → PENDING_JOIN + existingVal.LifecycleInfo.CurrentStatus = types.UVStatus_UV_STATUS_PENDING_JOIN + existingVal.LifecycleInfo.History = append(existingVal.LifecycleInfo.History, &types.LifecycleEvent{ + Status: types.UVStatus_UV_STATUS_PENDING_JOIN, + BlockHeight: sdkCtx.BlockHeight(), + }) + existingVal.IdentifyInfo.Pubkey = pubkey + existingVal.NetworkInfo = &networkInfo + + if err := k.UniversalValidatorSet.Set(ctx, valAddr, existingVal); err != nil { + return fmt.Errorf("failed to reactivate validator: %w", err) + } + return nil + + default: + // Already active or pending — reject + return fmt.Errorf("validator %s already registered with status %s", + coreValidatorAddr, existingVal.LifecycleInfo.CurrentStatus) + } + } + + // New registration: start as PENDING_JOIN initialStatus := types.UVStatus_UV_STATUS_PENDING_JOIN uv := types.UniversalValidator{ @@ -60,7 +94,7 @@ func (k Keeper) AddUniversalValidator( NetworkInfo: &networkInfo, } - // Add universal validator to the set + // Store new universal validator if err := k.UniversalValidatorSet.Set(ctx, valAddr, uv); err != nil { return fmt.Errorf("failed to store universal validator: %w", err) } From 5b6226f452657df7d3bfee115ad3ef651f40261e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 10 Nov 2025 11:26:01 +0530 Subject: [PATCH 029/105] refactor: added hooks in the uvalidator module --- x/uvalidator/keeper/hooks.go | 48 +++++++++++++++++++++++++++++++++++ x/uvalidator/keeper/keeper.go | 9 +++++++ 2 files changed, 57 insertions(+) create mode 100644 x/uvalidator/keeper/hooks.go diff --git a/x/uvalidator/keeper/hooks.go b/x/uvalidator/keeper/hooks.go new file mode 100644 index 00000000..8322f76c --- /dev/null +++ b/x/uvalidator/keeper/hooks.go @@ -0,0 +1,48 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// UValidatorHooks defines the interface that external modules can implement +// to react to uvalidator lifecycle events. +type UValidatorHooks interface { + // Triggered when a validator enters PENDING_JOIN (newly added or rejoining) + AfterValidatorAdded(ctx sdk.Context, valAddr sdk.ValAddress) + + // Triggered when a validator enters PENDING_LEAVE status (starting removal) + AfterValidatorRemoved(ctx sdk.Context, valAddr sdk.ValAddress) + + // Triggered whenever a validator's status changes between any two valid states + AfterValidatorStatusChanged(ctx sdk.Context, valAddr sdk.ValAddress, oldStatus, newStatus types.UVStatus) +} + +// MultiUValidatorHooks allows multiple modules to listen to the same events. +type MultiUValidatorHooks []UValidatorHooks + +// NewMultiUValidatorHooks creates a new combined hook instance. +func NewMultiUValidatorHooks(hooks ...UValidatorHooks) MultiUValidatorHooks { + return hooks +} + +// AfterValidatorAdded calls every hook in the list. +func (mh MultiUValidatorHooks) AfterValidatorAdded(ctx sdk.Context, valAddr sdk.ValAddress) { + for _, h := range mh { + h.AfterValidatorAdded(ctx, valAddr) + } +} + +// AfterValidatorRemoved calls every hook in the list. +func (mh MultiUValidatorHooks) AfterValidatorRemoved(ctx sdk.Context, valAddr sdk.ValAddress) { + for _, h := range mh { + h.AfterValidatorRemoved(ctx, valAddr) + } +} + +// AfterValidatorStatusChanged calls every hook in the list. +func (mh MultiUValidatorHooks) AfterValidatorStatusChanged(ctx sdk.Context, valAddr sdk.ValAddress, oldStatus, newStatus types.UVStatus) { + for _, h := range mh { + h.AfterValidatorStatusChanged(ctx, valAddr, oldStatus, newStatus) + } +} diff --git a/x/uvalidator/keeper/keeper.go b/x/uvalidator/keeper/keeper.go index b6739588..3329a89b 100755 --- a/x/uvalidator/keeper/keeper.go +++ b/x/uvalidator/keeper/keeper.go @@ -36,6 +36,7 @@ type Keeper struct { slashingKeeper types.SlashingKeeper authority string + hooks UValidatorHooks } // NewKeeper creates a new Keeper instance @@ -133,3 +134,11 @@ func (k Keeper) GetBlockHeight(ctx context.Context) (int64, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) return sdkCtx.BlockHeight(), nil } + +func (k *Keeper) SetHooks(h UValidatorHooks) *Keeper { + if k.hooks != nil { + panic("cannot set uvalidator hooks twice") + } + k.hooks = h + return k +} From 81ca217f353da2f6fce0b7410a48952e6a27a1d7 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 10 Nov 2025 11:26:22 +0530 Subject: [PATCH 030/105] refactor: invoke hooks in add_uv msg endpoint --- .../keeper/msg_add_universal_validator.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/x/uvalidator/keeper/msg_add_universal_validator.go b/x/uvalidator/keeper/msg_add_universal_validator.go index 7661971e..8d32f5b5 100644 --- a/x/uvalidator/keeper/msg_add_universal_validator.go +++ b/x/uvalidator/keeper/msg_add_universal_validator.go @@ -53,6 +53,9 @@ func (k Keeper) AddUniversalValidator( switch existingVal.LifecycleInfo.CurrentStatus { case types.UVStatus_UV_STATUS_INACTIVE: + oldStatus := existingVal.LifecycleInfo.CurrentStatus + newStatus := types.UVStatus_UV_STATUS_PENDING_JOIN + // Reactivate: INACTIVE → PENDING_JOIN existingVal.LifecycleInfo.CurrentStatus = types.UVStatus_UV_STATUS_PENDING_JOIN existingVal.LifecycleInfo.History = append(existingVal.LifecycleInfo.History, &types.LifecycleEvent{ @@ -65,6 +68,12 @@ func (k Keeper) AddUniversalValidator( if err := k.UniversalValidatorSet.Set(ctx, valAddr, existingVal); err != nil { return fmt.Errorf("failed to reactivate validator: %w", err) } + + // ---- Trigger hooks ---- + if k.hooks != nil { + k.hooks.AfterValidatorStatusChanged(sdkCtx, valAddr, oldStatus, newStatus) + k.hooks.AfterValidatorAdded(sdkCtx, valAddr) + } return nil default: @@ -99,5 +108,11 @@ func (k Keeper) AddUniversalValidator( return fmt.Errorf("failed to store universal validator: %w", err) } + // ---- Trigger hooks ---- + if k.hooks != nil { + k.hooks.AfterValidatorStatusChanged(sdkCtx, valAddr, types.UVStatus_UV_STATUS_UNSPECIFIED, types.UVStatus_UV_STATUS_PENDING_JOIN) + k.hooks.AfterValidatorAdded(sdkCtx, valAddr) + } + return nil } From e1e074afd3bc7403af1201b626c09cb481e0526b Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 10 Nov 2025 11:37:53 +0530 Subject: [PATCH 031/105] refactor: invoke hooks in remove_uv msg endpoint --- .../keeper/msg_remove_universal_validator.go | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/x/uvalidator/keeper/msg_remove_universal_validator.go b/x/uvalidator/keeper/msg_remove_universal_validator.go index ec62d417..312f2e1d 100644 --- a/x/uvalidator/keeper/msg_remove_universal_validator.go +++ b/x/uvalidator/keeper/msg_remove_universal_validator.go @@ -8,12 +8,19 @@ import ( "github.com/pushchain/push-chain-node/x/uvalidator/types" ) -// RemoveUniversalValidator removes a universal validator from the set and its associated mapping. -// It ensures the validator exists before removal. +// RemoveUniversalValidator handles universal validator removal lifecycle: +// - ACTIVE -> PENDING_LEAVE +// - PENDING_JOIN -> +// - if in current TSS process → revert (keygen ongoing) +// - if not in current TSS process → INACTIVE +// +// It ensures the validator exists before removal and triggers hooks on status change. func (k Keeper) RemoveUniversalValidator( ctx context.Context, universalValidatorAddr string, ) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) + // Parse core validator address and validate format valAddr, err := sdk.ValAddressFromBech32(universalValidatorAddr) if err != nil { @@ -26,6 +33,9 @@ func (k Keeper) RemoveUniversalValidator( return fmt.Errorf("universal validator %s not found: %w", universalValidatorAddr, err) } + oldStatus := val.LifecycleInfo.CurrentStatus + var newStatus types.UVStatus + switch val.LifecycleInfo.CurrentStatus { case types.UVStatus_UV_STATUS_ACTIVE: // Active -> Pending Leave @@ -33,6 +43,8 @@ func (k Keeper) RemoveUniversalValidator( return fmt.Errorf("failed to mark validator %s as pending leave: %w", universalValidatorAddr, err) } + newStatus = types.UVStatus_UV_STATUS_PENDING_LEAVE + case types.UVStatus_UV_STATUS_PENDING_JOIN: // TODO: check if its present in the current tss process // If part of current keygen, reject removal @@ -41,6 +53,8 @@ func (k Keeper) RemoveUniversalValidator( return fmt.Errorf("failed to inactivate validator %s: %w", universalValidatorAddr, err) } + newStatus = types.UVStatus_UV_STATUS_INACTIVE + case types.UVStatus_UV_STATUS_PENDING_LEAVE, types.UVStatus_UV_STATUS_INACTIVE: return fmt.Errorf("validator %s is already in %s state", universalValidatorAddr, val.LifecycleInfo.CurrentStatus) @@ -48,5 +62,11 @@ func (k Keeper) RemoveUniversalValidator( return fmt.Errorf("invalid lifecycle state for removal: %s", val.LifecycleInfo.CurrentStatus) } + // ---- Trigger hooks ---- + if k.hooks != nil { + k.hooks.AfterValidatorStatusChanged(sdkCtx, valAddr, oldStatus, newStatus) + k.hooks.AfterValidatorRemoved(sdkCtx, valAddr) + } + return nil } From c7305651ed4a8c808b838b989e9104502cf12b8e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 10 Nov 2025 11:43:00 +0530 Subject: [PATCH 032/105] feat: added a new msg for updating a validator's metadata --- proto/uvalidator/v1/tx.proto | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/proto/uvalidator/v1/tx.proto b/proto/uvalidator/v1/tx.proto index ed4c01d3..b000898a 100755 --- a/proto/uvalidator/v1/tx.proto +++ b/proto/uvalidator/v1/tx.proto @@ -23,6 +23,9 @@ service Msg { // AddUniversalValidator defines a message to add a universal validator. rpc AddUniversalValidator(MsgAddUniversalValidator) returns (MsgAddUniversalValidatorResponse); + // UpdateUniversalValidator defines a message to update a universal validator. + rpc UpdateUniversalValidator(MsgUpdateUniversalValidator) returns (MsgUpdateUniversalValidatorResponse); + // RemoveUniversalValidator defines a message to remove a universal validator. rpc RemoveUniversalValidator(MsgRemoveUniversalValidator) returns (MsgRemoveUniversalValidatorResponse); } @@ -67,6 +70,25 @@ message MsgAddUniversalValidator { message MsgAddUniversalValidatorResponse {} +message MsgUpdateUniversalValidator { + option (amino.name) = "uvalidator/MsgUpdateUniversalValidator"; + option (cosmos.msg.v1.signer) = "signer"; + + // signer is the address authorized to execute this message + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // core_validator_address is the address of the core validator. + string core_validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; + + // pubkey is the consensus public key for this universal validator + string pubkey = 3; + + // network metadata for validator node (IP, etc.) + NetworkInfo network = 4; +} + +message MsgUpdateUniversalValidatorResponse {} + message MsgRemoveUniversalValidator { option (amino.name) = "uvalidator/MsgRemoveUniversalValidator"; option (cosmos.msg.v1.signer) = "signer"; From fd4d36e4258520af6bb25d3fdcd77796a5c7ab59 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 10 Nov 2025 11:43:21 +0530 Subject: [PATCH 033/105] refactor: added generated protobuf --- api/uvalidator/v1/tx.pulsar.go | 1269 +++++++++++++++++++++++++++++-- api/uvalidator/v1/tx_grpc.pb.go | 39 + 2 files changed, 1239 insertions(+), 69 deletions(-) diff --git a/api/uvalidator/v1/tx.pulsar.go b/api/uvalidator/v1/tx.pulsar.go index 900f0aa1..2eeacdb6 100644 --- a/api/uvalidator/v1/tx.pulsar.go +++ b/api/uvalidator/v1/tx.pulsar.go @@ -1854,6 +1854,989 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) ProtoMethods() *protoi } } +var ( + md_MsgUpdateUniversalValidator protoreflect.MessageDescriptor + fd_MsgUpdateUniversalValidator_signer protoreflect.FieldDescriptor + fd_MsgUpdateUniversalValidator_core_validator_address protoreflect.FieldDescriptor + fd_MsgUpdateUniversalValidator_pubkey protoreflect.FieldDescriptor + fd_MsgUpdateUniversalValidator_network protoreflect.FieldDescriptor +) + +func init() { + file_uvalidator_v1_tx_proto_init() + md_MsgUpdateUniversalValidator = File_uvalidator_v1_tx_proto.Messages().ByName("MsgUpdateUniversalValidator") + fd_MsgUpdateUniversalValidator_signer = md_MsgUpdateUniversalValidator.Fields().ByName("signer") + fd_MsgUpdateUniversalValidator_core_validator_address = md_MsgUpdateUniversalValidator.Fields().ByName("core_validator_address") + fd_MsgUpdateUniversalValidator_pubkey = md_MsgUpdateUniversalValidator.Fields().ByName("pubkey") + fd_MsgUpdateUniversalValidator_network = md_MsgUpdateUniversalValidator.Fields().ByName("network") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateUniversalValidator)(nil) + +type fastReflection_MsgUpdateUniversalValidator MsgUpdateUniversalValidator + +func (x *MsgUpdateUniversalValidator) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateUniversalValidator)(x) +} + +func (x *MsgUpdateUniversalValidator) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateUniversalValidator_messageType fastReflection_MsgUpdateUniversalValidator_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateUniversalValidator_messageType{} + +type fastReflection_MsgUpdateUniversalValidator_messageType struct{} + +func (x fastReflection_MsgUpdateUniversalValidator_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateUniversalValidator)(nil) +} +func (x fastReflection_MsgUpdateUniversalValidator_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateUniversalValidator) +} +func (x fastReflection_MsgUpdateUniversalValidator_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateUniversalValidator +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateUniversalValidator) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateUniversalValidator +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateUniversalValidator) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateUniversalValidator_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateUniversalValidator) New() protoreflect.Message { + return new(fastReflection_MsgUpdateUniversalValidator) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateUniversalValidator) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateUniversalValidator)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateUniversalValidator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgUpdateUniversalValidator_signer, value) { + return + } + } + if x.CoreValidatorAddress != "" { + value := protoreflect.ValueOfString(x.CoreValidatorAddress) + if !f(fd_MsgUpdateUniversalValidator_core_validator_address, value) { + return + } + } + if x.Pubkey != "" { + value := protoreflect.ValueOfString(x.Pubkey) + if !f(fd_MsgUpdateUniversalValidator_pubkey, value) { + return + } + } + if x.Network != nil { + value := protoreflect.ValueOfMessage(x.Network.ProtoReflect()) + if !f(fd_MsgUpdateUniversalValidator_network, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateUniversalValidator) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": + return x.Signer != "" + case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": + return x.CoreValidatorAddress != "" + case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": + return x.Pubkey != "" + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + return x.Network != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateUniversalValidator) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": + x.Signer = "" + case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": + x.CoreValidatorAddress = "" + case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": + x.Pubkey = "" + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + x.Network = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateUniversalValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": + value := x.CoreValidatorAddress + return protoreflect.ValueOfString(value) + case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": + value := x.Pubkey + return protoreflect.ValueOfString(value) + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + value := x.Network + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateUniversalValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": + x.Signer = value.Interface().(string) + case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": + x.CoreValidatorAddress = value.Interface().(string) + case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": + x.Pubkey = value.Interface().(string) + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + x.Network = value.Message().Interface().(*NetworkInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateUniversalValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + if x.Network == nil { + x.Network = new(NetworkInfo) + } + return protoreflect.ValueOfMessage(x.Network.ProtoReflect()) + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": + panic(fmt.Errorf("field signer of message uvalidator.v1.MsgUpdateUniversalValidator is not mutable")) + case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": + panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.MsgUpdateUniversalValidator is not mutable")) + case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": + panic(fmt.Errorf("field pubkey of message uvalidator.v1.MsgUpdateUniversalValidator is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateUniversalValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uvalidator.v1.MsgUpdateUniversalValidator.signer": + return protoreflect.ValueOfString("") + case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": + return protoreflect.ValueOfString("") + case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": + return protoreflect.ValueOfString("") + case "uvalidator.v1.MsgUpdateUniversalValidator.network": + m := new(NetworkInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidator does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateUniversalValidator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.MsgUpdateUniversalValidator", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateUniversalValidator) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateUniversalValidator) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateUniversalValidator) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateUniversalValidator) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateUniversalValidator) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CoreValidatorAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Pubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Network != nil { + l = options.Size(x.Network) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateUniversalValidator) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Network != nil { + encoded, err := options.Marshal(x.Network) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.Pubkey) > 0 { + i -= len(x.Pubkey) + copy(dAtA[i:], x.Pubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pubkey))) + i-- + dAtA[i] = 0x1a + } + if len(x.CoreValidatorAddress) > 0 { + i -= len(x.CoreValidatorAddress) + copy(dAtA[i:], x.CoreValidatorAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoreValidatorAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateUniversalValidator) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateUniversalValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateUniversalValidator: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", 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.CoreValidatorAddress = 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 Pubkey", 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.Pubkey = 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 Network", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Network == nil { + x.Network = &NetworkInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Network); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateUniversalValidatorResponse protoreflect.MessageDescriptor +) + +func init() { + file_uvalidator_v1_tx_proto_init() + md_MsgUpdateUniversalValidatorResponse = File_uvalidator_v1_tx_proto.Messages().ByName("MsgUpdateUniversalValidatorResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateUniversalValidatorResponse)(nil) + +type fastReflection_MsgUpdateUniversalValidatorResponse MsgUpdateUniversalValidatorResponse + +func (x *MsgUpdateUniversalValidatorResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateUniversalValidatorResponse)(x) +} + +func (x *MsgUpdateUniversalValidatorResponse) slowProtoReflect() protoreflect.Message { + mi := &file_uvalidator_v1_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateUniversalValidatorResponse_messageType fastReflection_MsgUpdateUniversalValidatorResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateUniversalValidatorResponse_messageType{} + +type fastReflection_MsgUpdateUniversalValidatorResponse_messageType struct{} + +func (x fastReflection_MsgUpdateUniversalValidatorResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateUniversalValidatorResponse)(nil) +} +func (x fastReflection_MsgUpdateUniversalValidatorResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateUniversalValidatorResponse) +} +func (x fastReflection_MsgUpdateUniversalValidatorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateUniversalValidatorResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateUniversalValidatorResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateUniversalValidatorResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateUniversalValidatorResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateUniversalValidatorResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidatorResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidatorResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidatorResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidatorResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidatorResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidatorResponse")) + } + panic(fmt.Errorf("message uvalidator.v1.MsgUpdateUniversalValidatorResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uvalidator.v1.MsgUpdateUniversalValidatorResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateUniversalValidatorResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateUniversalValidatorResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateUniversalValidatorResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateUniversalValidatorResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateUniversalValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateUniversalValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_MsgRemoveUniversalValidator protoreflect.MessageDescriptor fd_MsgRemoveUniversalValidator_signer protoreflect.FieldDescriptor @@ -1876,7 +2859,7 @@ func (x *MsgRemoveUniversalValidator) ProtoReflect() protoreflect.Message { } func (x *MsgRemoveUniversalValidator) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_tx_proto_msgTypes[4] + mi := &file_uvalidator_v1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2356,7 +3339,7 @@ func (x *MsgRemoveUniversalValidatorResponse) ProtoReflect() protoreflect.Messag } func (x *MsgRemoveUniversalValidatorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uvalidator_v1_tx_proto_msgTypes[5] + mi := &file_uvalidator_v1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2876,6 +3859,95 @@ func (*MsgAddUniversalValidatorResponse) Descriptor() ([]byte, []int) { return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{3} } +type MsgUpdateUniversalValidator struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signer is the address authorized to execute this message + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + // core_validator_address is the address of the core validator. + CoreValidatorAddress string `protobuf:"bytes,2,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` + // pubkey is the consensus public key for this universal validator + Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + // network metadata for validator node (IP, etc.) + Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` +} + +func (x *MsgUpdateUniversalValidator) Reset() { + *x = MsgUpdateUniversalValidator{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateUniversalValidator) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateUniversalValidator) ProtoMessage() {} + +// Deprecated: Use MsgUpdateUniversalValidator.ProtoReflect.Descriptor instead. +func (*MsgUpdateUniversalValidator) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgUpdateUniversalValidator) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *MsgUpdateUniversalValidator) GetCoreValidatorAddress() string { + if x != nil { + return x.CoreValidatorAddress + } + return "" +} + +func (x *MsgUpdateUniversalValidator) GetPubkey() string { + if x != nil { + return x.Pubkey + } + return "" +} + +func (x *MsgUpdateUniversalValidator) GetNetwork() *NetworkInfo { + if x != nil { + return x.Network + } + return nil +} + +type MsgUpdateUniversalValidatorResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateUniversalValidatorResponse) Reset() { + *x = MsgUpdateUniversalValidatorResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_uvalidator_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateUniversalValidatorResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateUniversalValidatorResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateUniversalValidatorResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateUniversalValidatorResponse) Descriptor() ([]byte, []int) { + return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{5} +} + type MsgRemoveUniversalValidator struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2890,7 +3962,7 @@ type MsgRemoveUniversalValidator struct { func (x *MsgRemoveUniversalValidator) Reset() { *x = MsgRemoveUniversalValidator{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_tx_proto_msgTypes[4] + mi := &file_uvalidator_v1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2904,7 +3976,7 @@ func (*MsgRemoveUniversalValidator) ProtoMessage() {} // Deprecated: Use MsgRemoveUniversalValidator.ProtoReflect.Descriptor instead. func (*MsgRemoveUniversalValidator) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{4} + return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgRemoveUniversalValidator) GetSigner() string { @@ -2930,7 +4002,7 @@ type MsgRemoveUniversalValidatorResponse struct { func (x *MsgRemoveUniversalValidatorResponse) Reset() { *x = MsgRemoveUniversalValidatorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uvalidator_v1_tx_proto_msgTypes[5] + mi := &file_uvalidator_v1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2944,7 +4016,7 @@ func (*MsgRemoveUniversalValidatorResponse) ProtoMessage() {} // Deprecated: Use MsgRemoveUniversalValidatorResponse.ProtoReflect.Descriptor instead. func (*MsgRemoveUniversalValidatorResponse) Descriptor() ([]byte, []int) { - return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{5} + return file_uvalidator_v1_tx_proto_rawDescGZIP(), []int{7} } var File_uvalidator_v1_tx_proto protoreflect.FileDescriptor @@ -2995,56 +4067,86 @@ var file_uvalidator_v1_tx_proto_rawDesc = []byte{ 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xae, 0x02, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, + 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x36, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, - 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd3, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, - 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x1e, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, - 0x26, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x55, 0x6e, - 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x27, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2f, 0x2e, 0x75, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, - 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x18, 0x52, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, + 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x07, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, + 0x36, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, + 0x26, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, + 0x01, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, + 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x12, 0x4e, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x3a, 0x36, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, + 0x2a, 0x26, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, + 0xcf, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x71, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x27, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x1a, 0x2f, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, + 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb6, 0x01, - 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, - 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, + 0x01, 0x42, 0xb6, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, + 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, + 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, + 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -3059,31 +4161,36 @@ func file_uvalidator_v1_tx_proto_rawDescGZIP() []byte { return file_uvalidator_v1_tx_proto_rawDescData } -var file_uvalidator_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_uvalidator_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_uvalidator_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: uvalidator.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: uvalidator.v1.MsgUpdateParamsResponse (*MsgAddUniversalValidator)(nil), // 2: uvalidator.v1.MsgAddUniversalValidator (*MsgAddUniversalValidatorResponse)(nil), // 3: uvalidator.v1.MsgAddUniversalValidatorResponse - (*MsgRemoveUniversalValidator)(nil), // 4: uvalidator.v1.MsgRemoveUniversalValidator - (*MsgRemoveUniversalValidatorResponse)(nil), // 5: uvalidator.v1.MsgRemoveUniversalValidatorResponse - (*Params)(nil), // 6: uvalidator.v1.Params - (*NetworkInfo)(nil), // 7: uvalidator.v1.NetworkInfo + (*MsgUpdateUniversalValidator)(nil), // 4: uvalidator.v1.MsgUpdateUniversalValidator + (*MsgUpdateUniversalValidatorResponse)(nil), // 5: uvalidator.v1.MsgUpdateUniversalValidatorResponse + (*MsgRemoveUniversalValidator)(nil), // 6: uvalidator.v1.MsgRemoveUniversalValidator + (*MsgRemoveUniversalValidatorResponse)(nil), // 7: uvalidator.v1.MsgRemoveUniversalValidatorResponse + (*Params)(nil), // 8: uvalidator.v1.Params + (*NetworkInfo)(nil), // 9: uvalidator.v1.NetworkInfo } var file_uvalidator_v1_tx_proto_depIdxs = []int32{ - 6, // 0: uvalidator.v1.MsgUpdateParams.params:type_name -> uvalidator.v1.Params - 7, // 1: uvalidator.v1.MsgAddUniversalValidator.network:type_name -> uvalidator.v1.NetworkInfo - 0, // 2: uvalidator.v1.Msg.UpdateParams:input_type -> uvalidator.v1.MsgUpdateParams - 2, // 3: uvalidator.v1.Msg.AddUniversalValidator:input_type -> uvalidator.v1.MsgAddUniversalValidator - 4, // 4: uvalidator.v1.Msg.RemoveUniversalValidator:input_type -> uvalidator.v1.MsgRemoveUniversalValidator - 1, // 5: uvalidator.v1.Msg.UpdateParams:output_type -> uvalidator.v1.MsgUpdateParamsResponse - 3, // 6: uvalidator.v1.Msg.AddUniversalValidator:output_type -> uvalidator.v1.MsgAddUniversalValidatorResponse - 5, // 7: uvalidator.v1.Msg.RemoveUniversalValidator:output_type -> uvalidator.v1.MsgRemoveUniversalValidatorResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 8, // 0: uvalidator.v1.MsgUpdateParams.params:type_name -> uvalidator.v1.Params + 9, // 1: uvalidator.v1.MsgAddUniversalValidator.network:type_name -> uvalidator.v1.NetworkInfo + 9, // 2: uvalidator.v1.MsgUpdateUniversalValidator.network:type_name -> uvalidator.v1.NetworkInfo + 0, // 3: uvalidator.v1.Msg.UpdateParams:input_type -> uvalidator.v1.MsgUpdateParams + 2, // 4: uvalidator.v1.Msg.AddUniversalValidator:input_type -> uvalidator.v1.MsgAddUniversalValidator + 4, // 5: uvalidator.v1.Msg.UpdateUniversalValidator:input_type -> uvalidator.v1.MsgUpdateUniversalValidator + 6, // 6: uvalidator.v1.Msg.RemoveUniversalValidator:input_type -> uvalidator.v1.MsgRemoveUniversalValidator + 1, // 7: uvalidator.v1.Msg.UpdateParams:output_type -> uvalidator.v1.MsgUpdateParamsResponse + 3, // 8: uvalidator.v1.Msg.AddUniversalValidator:output_type -> uvalidator.v1.MsgAddUniversalValidatorResponse + 5, // 9: uvalidator.v1.Msg.UpdateUniversalValidator:output_type -> uvalidator.v1.MsgUpdateUniversalValidatorResponse + 7, // 10: uvalidator.v1.Msg.RemoveUniversalValidator:output_type -> uvalidator.v1.MsgRemoveUniversalValidatorResponse + 7, // [7:11] is the sub-list for method output_type + 3, // [3:7] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_uvalidator_v1_tx_proto_init() } @@ -3144,7 +4251,7 @@ func file_uvalidator_v1_tx_proto_init() { } } file_uvalidator_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRemoveUniversalValidator); i { + switch v := v.(*MsgUpdateUniversalValidator); i { case 0: return &v.state case 1: @@ -3156,6 +4263,30 @@ func file_uvalidator_v1_tx_proto_init() { } } file_uvalidator_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateUniversalValidatorResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRemoveUniversalValidator); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uvalidator_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRemoveUniversalValidatorResponse); i { case 0: return &v.state @@ -3174,7 +4305,7 @@ func file_uvalidator_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_uvalidator_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, diff --git a/api/uvalidator/v1/tx_grpc.pb.go b/api/uvalidator/v1/tx_grpc.pb.go index fa8ebf8d..39739580 100644 --- a/api/uvalidator/v1/tx_grpc.pb.go +++ b/api/uvalidator/v1/tx_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_UpdateParams_FullMethodName = "/uvalidator.v1.Msg/UpdateParams" Msg_AddUniversalValidator_FullMethodName = "/uvalidator.v1.Msg/AddUniversalValidator" + Msg_UpdateUniversalValidator_FullMethodName = "/uvalidator.v1.Msg/UpdateUniversalValidator" Msg_RemoveUniversalValidator_FullMethodName = "/uvalidator.v1.Msg/RemoveUniversalValidator" ) @@ -34,6 +35,8 @@ type MsgClient interface { UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // AddUniversalValidator defines a message to add a universal validator. AddUniversalValidator(ctx context.Context, in *MsgAddUniversalValidator, opts ...grpc.CallOption) (*MsgAddUniversalValidatorResponse, error) + // UpdateUniversalValidator defines a message to update a universal validator. + UpdateUniversalValidator(ctx context.Context, in *MsgUpdateUniversalValidator, opts ...grpc.CallOption) (*MsgUpdateUniversalValidatorResponse, error) // RemoveUniversalValidator defines a message to remove a universal validator. RemoveUniversalValidator(ctx context.Context, in *MsgRemoveUniversalValidator, opts ...grpc.CallOption) (*MsgRemoveUniversalValidatorResponse, error) } @@ -64,6 +67,15 @@ func (c *msgClient) AddUniversalValidator(ctx context.Context, in *MsgAddUnivers return out, nil } +func (c *msgClient) UpdateUniversalValidator(ctx context.Context, in *MsgUpdateUniversalValidator, opts ...grpc.CallOption) (*MsgUpdateUniversalValidatorResponse, error) { + out := new(MsgUpdateUniversalValidatorResponse) + err := c.cc.Invoke(ctx, Msg_UpdateUniversalValidator_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) RemoveUniversalValidator(ctx context.Context, in *MsgRemoveUniversalValidator, opts ...grpc.CallOption) (*MsgRemoveUniversalValidatorResponse, error) { out := new(MsgRemoveUniversalValidatorResponse) err := c.cc.Invoke(ctx, Msg_RemoveUniversalValidator_FullMethodName, in, out, opts...) @@ -83,6 +95,8 @@ type MsgServer interface { UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // AddUniversalValidator defines a message to add a universal validator. AddUniversalValidator(context.Context, *MsgAddUniversalValidator) (*MsgAddUniversalValidatorResponse, error) + // UpdateUniversalValidator defines a message to update a universal validator. + UpdateUniversalValidator(context.Context, *MsgUpdateUniversalValidator) (*MsgUpdateUniversalValidatorResponse, error) // RemoveUniversalValidator defines a message to remove a universal validator. RemoveUniversalValidator(context.Context, *MsgRemoveUniversalValidator) (*MsgRemoveUniversalValidatorResponse, error) mustEmbedUnimplementedMsgServer() @@ -98,6 +112,9 @@ func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (* func (UnimplementedMsgServer) AddUniversalValidator(context.Context, *MsgAddUniversalValidator) (*MsgAddUniversalValidatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddUniversalValidator not implemented") } +func (UnimplementedMsgServer) UpdateUniversalValidator(context.Context, *MsgUpdateUniversalValidator) (*MsgUpdateUniversalValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUniversalValidator not implemented") +} func (UnimplementedMsgServer) RemoveUniversalValidator(context.Context, *MsgRemoveUniversalValidator) (*MsgRemoveUniversalValidatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveUniversalValidator not implemented") } @@ -150,6 +167,24 @@ func _Msg_AddUniversalValidator_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Msg_UpdateUniversalValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateUniversalValidator) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateUniversalValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateUniversalValidator_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateUniversalValidator(ctx, req.(*MsgUpdateUniversalValidator)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_RemoveUniversalValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRemoveUniversalValidator) if err := dec(in); err != nil { @@ -183,6 +218,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "AddUniversalValidator", Handler: _Msg_AddUniversalValidator_Handler, }, + { + MethodName: "UpdateUniversalValidator", + Handler: _Msg_UpdateUniversalValidator_Handler, + }, { MethodName: "RemoveUniversalValidator", Handler: _Msg_RemoveUniversalValidator_Handler, From 2d5ef92dd1063a087edc7e8bde5ba7a9837e81b7 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 10 Nov 2025 12:01:58 +0530 Subject: [PATCH 034/105] refactor: added types for msg_update_universal_validator --- .../types/msg_update_universal_validator.go | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 x/uvalidator/types/msg_update_universal_validator.go diff --git a/x/uvalidator/types/msg_update_universal_validator.go b/x/uvalidator/types/msg_update_universal_validator.go new file mode 100644 index 00000000..4a1da6a0 --- /dev/null +++ b/x/uvalidator/types/msg_update_universal_validator.go @@ -0,0 +1,66 @@ +package types + +import ( + "strings" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var ( + _ sdk.Msg = &MsgUpdateUniversalValidator{} +) + +// NewMsgUpdateUniversalValidator creates new instance of MsgUpdateUniversalValidator +func NewMsgUpdateUniversalValidator( + sender sdk.Address, + coreValidatorAddress sdk.Address, + pubKey string, + network NetworkInfo, +) *MsgUpdateUniversalValidator { + return &MsgUpdateUniversalValidator{ + Signer: sender.String(), + CoreValidatorAddress: coreValidatorAddress.String(), + Pubkey: pubKey, + Network: &network, + } +} + +// Route returns the name of the module +func (msg MsgUpdateUniversalValidator) Route() string { return ModuleName } + +// Type returns the action +func (msg MsgUpdateUniversalValidator) Type() string { return "update_universal_validator" } + +// GetSignBytes implements the LegacyMsg interface. +func (msg MsgUpdateUniversalValidator) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) +} + +// GetSigners returns the expected signers for a MsgUpdateUniversalValidator message. +func (msg *MsgUpdateUniversalValidator) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Signer) + return []sdk.AccAddress{addr} +} + +func (msg *MsgUpdateUniversalValidator) ValidateBasic() error { + // Validate signer + if _, err := sdk.AccAddressFromBech32(msg.Signer); err != nil { + return errors.Wrap(err, "invalid signer address") + } + + // Validate core validator address (must be a valid valoper address) + _, err := sdk.ValAddressFromBech32(msg.CoreValidatorAddress) + if err != nil { + return errors.Wrap(err, "invalid core validator address") + } + + // Validate pubkey is non-empty + pubkey := strings.TrimSpace(msg.Pubkey) + if pubkey == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "pubkey cannot be empty") + } + + return msg.Network.ValidateBasic() +} From e535c9e9d83690246990c92a5877f0b6a318215b Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 10 Nov 2025 12:02:28 +0530 Subject: [PATCH 035/105] refactor: added tests for msg_update_universal_validator validateBasic --- .../msg_update_universal_validator_test.go | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 x/uvalidator/types/msg_update_universal_validator_test.go diff --git a/x/uvalidator/types/msg_update_universal_validator_test.go b/x/uvalidator/types/msg_update_universal_validator_test.go new file mode 100644 index 00000000..88408f9e --- /dev/null +++ b/x/uvalidator/types/msg_update_universal_validator_test.go @@ -0,0 +1,104 @@ +package types_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/app" + "github.com/pushchain/push-chain-node/x/uvalidator/types" + "github.com/stretchr/testify/require" +) + +func TestMsgUpdateUniversalValidator_ValidateBasic(t *testing.T) { + cfg := sdk.GetConfig() + cfg.SetBech32PrefixForAccount(app.Bech32PrefixAccAddr, app.Bech32PrefixAccPub) + cfg.SetBech32PrefixForValidator(app.Bech32PrefixValAddr, app.Bech32PrefixValPub) + + validAdmin := "push1gjaw568e35hjc8udhat0xnsxxmkm2snrexxz20" + validCoreVal := "pushvaloper1gjaw568e35hjc8udhat0xnsxxmkm2snrjnakhg" + + tests := []struct { + name string + msg types.MsgUpdateUniversalValidator + wantErr bool + errMsg string + }{ + { + name: "valid message", + msg: types.MsgUpdateUniversalValidator{ + Signer: validAdmin, + CoreValidatorAddress: validCoreVal, + Pubkey: "updated_pubkey_123", + Network: &types.NetworkInfo{ + Ip: "127.0.0.1", + }, + }, + wantErr: false, + }, + { + name: "invalid signer address", + msg: types.MsgUpdateUniversalValidator{ + Signer: "invalid_signer", + CoreValidatorAddress: validCoreVal, + Pubkey: "pubkey_temp", + Network: &types.NetworkInfo{ + Ip: "10.0.0.1", + }, + }, + wantErr: true, + errMsg: "invalid signer address", + }, + { + name: "invalid core validator address format", + msg: types.MsgUpdateUniversalValidator{ + Signer: validAdmin, + CoreValidatorAddress: "bad_valoper_format", + Pubkey: "pubkey_temp", + Network: &types.NetworkInfo{ + Ip: "10.0.0.1", + }, + }, + wantErr: true, + errMsg: "invalid core validator address", + }, + { + name: "empty pubkey should fail", + msg: types.MsgUpdateUniversalValidator{ + Signer: validAdmin, + CoreValidatorAddress: validCoreVal, + Pubkey: " ", + Network: &types.NetworkInfo{ + Ip: "10.0.0.1", + }, + }, + wantErr: true, + errMsg: "pubkey cannot be empty", + }, + { + name: "empty network info should fail", + msg: types.MsgUpdateUniversalValidator{ + Signer: validAdmin, + CoreValidatorAddress: validCoreVal, + Pubkey: "valid_pubkey", + Network: &types.NetworkInfo{Ip: ""}, + }, + wantErr: true, + errMsg: "ip cannot be empty", + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + err := tc.msg.ValidateBasic() + + if tc.wantErr { + require.Error(t, err) + if tc.errMsg != "" { + require.Contains(t, err.Error(), tc.errMsg) + } + } else { + require.NoError(t, err) + } + }) + } +} From 60e3f6880946fc5a55d8cd18552f2668352aac38 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 10 Nov 2025 12:02:56 +0530 Subject: [PATCH 036/105] feat: added msg server impl for msg_update_universal_validator --- x/uvalidator/keeper/msg_server.go | 20 ++++++ .../keeper/msg_update_universal_validator.go | 66 +++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 x/uvalidator/keeper/msg_update_universal_validator.go diff --git a/x/uvalidator/keeper/msg_server.go b/x/uvalidator/keeper/msg_server.go index c9ee37ae..e372749f 100755 --- a/x/uvalidator/keeper/msg_server.go +++ b/x/uvalidator/keeper/msg_server.go @@ -75,3 +75,23 @@ func (ms msgServer) RemoveUniversalValidator(ctx context.Context, msg *types.Msg return &types.MsgRemoveUniversalValidatorResponse{}, nil } + +// UpdateUniversalValidator implements types.MsgServer. +func (ms msgServer) UpdateUniversalValidator(ctx context.Context, msg *types.MsgUpdateUniversalValidator) (*types.MsgUpdateUniversalValidatorResponse, error) { + // Retrieve the current Params + params, err := ms.k.Params.Get(ctx) + if err != nil { + return nil, errors.Wrapf(err, "failed to get params") + } + + if params.Admin != msg.Signer { + return nil, errors.Wrapf(sdkErrors.ErrUnauthorized, "invalid authority; expected %s, got %s", params.Admin, msg.Signer) + } + + err = ms.k.UpdateUniversalValidator(ctx, msg.CoreValidatorAddress, msg.Pubkey, *msg.Network) + if err != nil { + return nil, err + } + + return &types.MsgUpdateUniversalValidatorResponse{}, nil +} diff --git a/x/uvalidator/keeper/msg_update_universal_validator.go b/x/uvalidator/keeper/msg_update_universal_validator.go new file mode 100644 index 00000000..d89b7f61 --- /dev/null +++ b/x/uvalidator/keeper/msg_update_universal_validator.go @@ -0,0 +1,66 @@ +package keeper + +import ( + "context" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// new validator -> added as a PENDING_JOIN status +// if existing: +// inactive -> added as a PENDING_JOIN status +// any other status -> revert +// UpdateUniversalValidator registers or reactivates a core validator as a universal validator. +// It ensures the core validator exists, is bonded, and handles lifecycle reactivation. +func (k Keeper) UpdateUniversalValidator( + ctx context.Context, + coreValidatorAddr, pubkey string, + networkInfo types.NetworkInfo, +) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) + + // Parse core validator address and validate format + valAddr, err := sdk.ValAddressFromBech32(coreValidatorAddr) + if err != nil { + return fmt.Errorf("invalid core validator address: %w", err) + } + + // Ensure validator exists in staking module + validator, err := k.stakingKeeper.GetValidator(sdkCtx, valAddr) + if err != nil { + return fmt.Errorf("core validator not found: %w", err) + } + + // Must be bonded to join + if !validator.IsBonded() { + return fmt.Errorf("validator %s is not bonded", coreValidatorAddr) + } + + // Check if already exists + exists, err := k.UniversalValidatorSet.Has(ctx, valAddr) + if err != nil { + return err + } + if !exists { + return fmt.Errorf("validator %s does not exist", coreValidatorAddr) + } + + // Fetch existing universal validator + existingVal, err := k.UniversalValidatorSet.Get(ctx, valAddr) + if err != nil { + return fmt.Errorf("failed to fetch existing universal validator: %w", err) + } + + // Update only metadata + existingVal.IdentifyInfo.Pubkey = pubkey + existingVal.NetworkInfo = &networkInfo + + // Save updated entry + if err := k.UniversalValidatorSet.Set(ctx, valAddr, existingVal); err != nil { + return fmt.Errorf("failed to update universal validator: %w", err) + } + + return nil +} From 691b5ed9a95a3135f568b9610643fd602c765bfa Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 10 Nov 2025 12:03:10 +0530 Subject: [PATCH 037/105] refactor: added generated protobuf --- x/uvalidator/types/tx.pb.go | 573 +++++++++++++++++++++++++++++++++--- 1 file changed, 534 insertions(+), 39 deletions(-) diff --git a/x/uvalidator/types/tx.pb.go b/x/uvalidator/types/tx.pb.go index e3b40dae..599d3ee2 100644 --- a/x/uvalidator/types/tx.pb.go +++ b/x/uvalidator/types/tx.pb.go @@ -238,6 +238,114 @@ func (m *MsgAddUniversalValidatorResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAddUniversalValidatorResponse proto.InternalMessageInfo +type MsgUpdateUniversalValidator struct { + // signer is the address authorized to execute this message + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + // core_validator_address is the address of the core validator. + CoreValidatorAddress string `protobuf:"bytes,2,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` + // pubkey is the consensus public key for this universal validator + Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` + // network metadata for validator node (IP, etc.) + Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` +} + +func (m *MsgUpdateUniversalValidator) Reset() { *m = MsgUpdateUniversalValidator{} } +func (m *MsgUpdateUniversalValidator) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateUniversalValidator) ProtoMessage() {} +func (*MsgUpdateUniversalValidator) Descriptor() ([]byte, []int) { + return fileDescriptor_bea4c2a0c904c8a7, []int{4} +} +func (m *MsgUpdateUniversalValidator) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateUniversalValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateUniversalValidator.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 *MsgUpdateUniversalValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateUniversalValidator.Merge(m, src) +} +func (m *MsgUpdateUniversalValidator) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateUniversalValidator) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateUniversalValidator.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateUniversalValidator proto.InternalMessageInfo + +func (m *MsgUpdateUniversalValidator) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgUpdateUniversalValidator) GetCoreValidatorAddress() string { + if m != nil { + return m.CoreValidatorAddress + } + return "" +} + +func (m *MsgUpdateUniversalValidator) GetPubkey() string { + if m != nil { + return m.Pubkey + } + return "" +} + +func (m *MsgUpdateUniversalValidator) GetNetwork() *NetworkInfo { + if m != nil { + return m.Network + } + return nil +} + +type MsgUpdateUniversalValidatorResponse struct { +} + +func (m *MsgUpdateUniversalValidatorResponse) Reset() { *m = MsgUpdateUniversalValidatorResponse{} } +func (m *MsgUpdateUniversalValidatorResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateUniversalValidatorResponse) ProtoMessage() {} +func (*MsgUpdateUniversalValidatorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bea4c2a0c904c8a7, []int{5} +} +func (m *MsgUpdateUniversalValidatorResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateUniversalValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateUniversalValidatorResponse.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 *MsgUpdateUniversalValidatorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateUniversalValidatorResponse.Merge(m, src) +} +func (m *MsgUpdateUniversalValidatorResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateUniversalValidatorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateUniversalValidatorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateUniversalValidatorResponse proto.InternalMessageInfo + type MsgRemoveUniversalValidator struct { // signer is the address authorized to execute this message Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` @@ -249,7 +357,7 @@ func (m *MsgRemoveUniversalValidator) Reset() { *m = MsgRemoveUniversalV func (m *MsgRemoveUniversalValidator) String() string { return proto.CompactTextString(m) } func (*MsgRemoveUniversalValidator) ProtoMessage() {} func (*MsgRemoveUniversalValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_bea4c2a0c904c8a7, []int{4} + return fileDescriptor_bea4c2a0c904c8a7, []int{6} } func (m *MsgRemoveUniversalValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -299,7 +407,7 @@ func (m *MsgRemoveUniversalValidatorResponse) Reset() { *m = MsgRemoveUn func (m *MsgRemoveUniversalValidatorResponse) String() string { return proto.CompactTextString(m) } func (*MsgRemoveUniversalValidatorResponse) ProtoMessage() {} func (*MsgRemoveUniversalValidatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bea4c2a0c904c8a7, []int{5} + return fileDescriptor_bea4c2a0c904c8a7, []int{7} } func (m *MsgRemoveUniversalValidatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -333,6 +441,8 @@ func init() { proto.RegisterType((*MsgUpdateParamsResponse)(nil), "uvalidator.v1.MsgUpdateParamsResponse") proto.RegisterType((*MsgAddUniversalValidator)(nil), "uvalidator.v1.MsgAddUniversalValidator") proto.RegisterType((*MsgAddUniversalValidatorResponse)(nil), "uvalidator.v1.MsgAddUniversalValidatorResponse") + proto.RegisterType((*MsgUpdateUniversalValidator)(nil), "uvalidator.v1.MsgUpdateUniversalValidator") + proto.RegisterType((*MsgUpdateUniversalValidatorResponse)(nil), "uvalidator.v1.MsgUpdateUniversalValidatorResponse") proto.RegisterType((*MsgRemoveUniversalValidator)(nil), "uvalidator.v1.MsgRemoveUniversalValidator") proto.RegisterType((*MsgRemoveUniversalValidatorResponse)(nil), "uvalidator.v1.MsgRemoveUniversalValidatorResponse") } @@ -340,43 +450,45 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/tx.proto", fileDescriptor_bea4c2a0c904c8a7) } var fileDescriptor_bea4c2a0c904c8a7 = []byte{ - // 570 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x3f, 0x6f, 0xd3, 0x40, - 0x1c, 0x8d, 0xdb, 0x12, 0x94, 0xe3, 0x9f, 0xb0, 0xd2, 0xd4, 0x75, 0x55, 0x13, 0x5c, 0x51, 0xaa, - 0x48, 0x89, 0x69, 0x82, 0x8a, 0x94, 0xad, 0xd9, 0x18, 0x52, 0x81, 0x51, 0x8b, 0xc4, 0x12, 0x5d, - 0xe2, 0xe3, 0x62, 0xb5, 0xbe, 0x33, 0x77, 0x4e, 0x68, 0x98, 0x10, 0x23, 0x03, 0xe2, 0x63, 0x30, - 0x66, 0xe8, 0x87, 0xe8, 0x58, 0x95, 0x01, 0x26, 0x84, 0x92, 0x21, 0x5f, 0x03, 0xf9, 0x6c, 0x27, - 0xb5, 0x1b, 0xb7, 0x1d, 0x58, 0xac, 0xdf, 0xdd, 0x7b, 0x7e, 0xbf, 0x77, 0xef, 0x77, 0x3a, 0x50, - 0xe8, 0xf5, 0xe1, 0x91, 0x6d, 0x41, 0x8f, 0x32, 0xa3, 0xbf, 0x6d, 0x78, 0xc7, 0x15, 0x97, 0x51, - 0x8f, 0xca, 0xf7, 0x66, 0xfb, 0x95, 0xfe, 0xb6, 0xfa, 0x10, 0x3a, 0x36, 0xa1, 0x86, 0xf8, 0x06, - 0x0c, 0x75, 0xa5, 0x43, 0xb9, 0x43, 0xb9, 0xe1, 0x70, 0xec, 0xff, 0xe9, 0x70, 0x1c, 0x02, 0x6b, - 0x71, 0x49, 0x8c, 0x08, 0xe2, 0x36, 0x0f, 0xc1, 0x3c, 0xa6, 0x98, 0x8a, 0xd2, 0xf0, 0xab, 0x70, - 0x77, 0x35, 0xd0, 0x6a, 0x05, 0x40, 0xb0, 0x88, 0xa0, 0x84, 0xc1, 0x81, 0x8b, 0x22, 0x68, 0x3d, - 0x0e, 0xcd, 0x0c, 0x0b, 0x58, 0xff, 0x26, 0x81, 0x07, 0x4d, 0x8e, 0xf7, 0x5d, 0x0b, 0x7a, 0xe8, - 0x15, 0x64, 0xd0, 0xe1, 0xf2, 0x0e, 0xc8, 0xc1, 0x9e, 0xd7, 0xa5, 0xcc, 0xf6, 0x06, 0x8a, 0x54, - 0x94, 0xb6, 0x72, 0x0d, 0xe5, 0xfc, 0xa4, 0x9c, 0x0f, 0x5b, 0xee, 0x5a, 0x16, 0x43, 0x9c, 0xbf, - 0xf1, 0x98, 0x4d, 0xb0, 0x39, 0xa3, 0xca, 0x35, 0x90, 0x75, 0x85, 0x82, 0xb2, 0x50, 0x94, 0xb6, - 0xee, 0x54, 0x97, 0x2b, 0xb1, 0x7c, 0x2a, 0x81, 0x7c, 0x63, 0xe9, 0xf4, 0xcf, 0xa3, 0x8c, 0x19, - 0x52, 0xeb, 0xf7, 0xbf, 0x4c, 0x86, 0xa5, 0x99, 0x88, 0xbe, 0x0a, 0x56, 0x12, 0x7e, 0x4c, 0xc4, - 0x5d, 0x4a, 0x38, 0xd2, 0x7f, 0x2c, 0x00, 0xa5, 0xc9, 0xf1, 0xae, 0x65, 0xed, 0x13, 0xbb, 0x8f, - 0x18, 0x87, 0x47, 0x07, 0x91, 0xbe, 0xfc, 0x0c, 0x64, 0xb9, 0x8d, 0x09, 0x62, 0xd7, 0x3a, 0x0e, - 0x79, 0xf2, 0x5b, 0x50, 0xe8, 0x50, 0x86, 0x5a, 0x53, 0x8f, 0x2d, 0x18, 0xf0, 0x84, 0xfd, 0x5c, - 0xe3, 0xf1, 0xf9, 0x49, 0x79, 0x3d, 0x54, 0x98, 0xf6, 0x89, 0x4b, 0xe5, 0x7d, 0x81, 0x24, 0x26, - 0x17, 0x40, 0xd6, 0xed, 0xb5, 0x0f, 0xd1, 0x40, 0x59, 0xf4, 0x85, 0xcc, 0x70, 0x25, 0x3f, 0x07, - 0xb7, 0x09, 0xf2, 0x3e, 0x52, 0x76, 0xa8, 0x2c, 0x89, 0x80, 0xd4, 0x44, 0x40, 0x7b, 0x01, 0xfa, - 0x92, 0xbc, 0xa7, 0x66, 0x44, 0xad, 0xd7, 0xfc, 0x80, 0x42, 0xcf, 0x5f, 0x27, 0xc3, 0xd2, 0xc6, - 0x85, 0x81, 0xa6, 0xa5, 0xa1, 0xeb, 0xa0, 0x98, 0x86, 0x4d, 0xe3, 0xfc, 0x25, 0x81, 0xb5, 0x26, - 0xc7, 0x26, 0x72, 0x68, 0x1f, 0xfd, 0x97, 0x44, 0xf7, 0xae, 0x49, 0x34, 0x5d, 0x61, 0x6e, 0x90, - 0xf5, 0x9d, 0xc4, 0xd1, 0x37, 0xe3, 0x47, 0x4f, 0x73, 0xae, 0x3f, 0x01, 0x1b, 0x57, 0xc0, 0x51, - 0x00, 0xd5, 0x9f, 0x0b, 0x60, 0xb1, 0xc9, 0xb1, 0x7c, 0x00, 0xee, 0xc6, 0xee, 0xbf, 0x96, 0x18, - 0x4b, 0xe2, 0x3e, 0xaa, 0x9b, 0x57, 0xe3, 0x91, 0xbe, 0xfc, 0x01, 0x2c, 0xcf, 0xbf, 0xab, 0x4f, - 0x2f, 0x0b, 0xcc, 0x25, 0xaa, 0xc6, 0x0d, 0x89, 0xd3, 0x96, 0x9f, 0x80, 0x92, 0x3a, 0xcf, 0xd2, - 0x65, 0xb1, 0x34, 0xae, 0x5a, 0xbd, 0x39, 0x37, 0xea, 0xad, 0xde, 0xfa, 0x3c, 0x19, 0x96, 0xa4, - 0xc6, 0xeb, 0xd3, 0x91, 0x26, 0x9d, 0x8d, 0x34, 0xe9, 0xef, 0x48, 0x93, 0xbe, 0x8f, 0xb5, 0xcc, - 0xd9, 0x58, 0xcb, 0xfc, 0x1e, 0x6b, 0x99, 0x77, 0x2f, 0xb0, 0xed, 0x75, 0x7b, 0xed, 0x4a, 0x87, - 0x3a, 0x86, 0xdb, 0xe3, 0xdd, 0x4e, 0x17, 0xda, 0x44, 0x54, 0x65, 0x51, 0x96, 0x09, 0xb5, 0x90, - 0x71, 0x6c, 0x5c, 0x98, 0xb2, 0x78, 0xc9, 0xda, 0x59, 0xf1, 0x56, 0xd5, 0xfe, 0x05, 0x00, 0x00, - 0xff, 0xff, 0x2e, 0x59, 0xbb, 0x26, 0x88, 0x05, 0x00, 0x00, + // 600 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x95, 0x3d, 0x6f, 0xd3, 0x40, + 0x1c, 0xc6, 0xe3, 0xa4, 0x04, 0xe5, 0x78, 0x13, 0x56, 0x9a, 0xba, 0xae, 0x6a, 0x82, 0x2b, 0x4a, + 0x15, 0x29, 0x31, 0x4d, 0x50, 0x91, 0xba, 0x35, 0x1b, 0x43, 0x2a, 0x30, 0x6a, 0x91, 0x58, 0x22, + 0x27, 0x3e, 0x2e, 0x56, 0x6b, 0x9f, 0xf1, 0x39, 0xa1, 0x61, 0x42, 0x8c, 0x0c, 0x88, 0x8f, 0xc1, + 0x84, 0x32, 0xf4, 0x43, 0x74, 0xa3, 0xea, 0x02, 0x13, 0x42, 0xc9, 0x90, 0xaf, 0x81, 0x7c, 0x7e, + 0x49, 0x6c, 0x7c, 0x4d, 0x07, 0xb6, 0x2e, 0xd1, 0xd9, 0xcf, 0x93, 0xe7, 0xff, 0xe8, 0x77, 0xb6, + 0x0f, 0x94, 0xfa, 0x03, 0xed, 0xd8, 0xd0, 0x35, 0x17, 0x3b, 0xca, 0x60, 0x5b, 0x71, 0x4f, 0x6a, + 0xb6, 0x83, 0x5d, 0xcc, 0xdf, 0x99, 0xdd, 0xaf, 0x0d, 0xb6, 0xc5, 0xfb, 0x9a, 0x69, 0x58, 0x58, + 0xa1, 0xbf, 0xbe, 0x43, 0x5c, 0xe9, 0x62, 0x62, 0x62, 0xa2, 0x98, 0x04, 0x79, 0xff, 0x34, 0x09, + 0x0a, 0x84, 0xb5, 0x78, 0x24, 0x82, 0x16, 0x24, 0x06, 0x09, 0xc4, 0x22, 0xc2, 0x08, 0xd3, 0xa5, + 0xe2, 0xad, 0x82, 0xbb, 0xab, 0x7e, 0x56, 0xdb, 0x17, 0xfc, 0x8b, 0x50, 0x4a, 0x14, 0x1c, 0xda, + 0x30, 0x94, 0xd6, 0xe3, 0xd2, 0xac, 0x30, 0x95, 0xe5, 0x2f, 0x1c, 0xb8, 0xd7, 0x22, 0xe8, 0xc0, + 0xd6, 0x35, 0x17, 0xbe, 0xd0, 0x1c, 0xcd, 0x24, 0xfc, 0x0e, 0x28, 0x68, 0x7d, 0xb7, 0x87, 0x1d, + 0xc3, 0x1d, 0x0a, 0x5c, 0x99, 0xdb, 0x2a, 0x34, 0x85, 0x8b, 0xd3, 0x6a, 0x31, 0x18, 0xb9, 0xa7, + 0xeb, 0x0e, 0x24, 0xe4, 0x95, 0xeb, 0x18, 0x16, 0x52, 0x67, 0x56, 0xbe, 0x01, 0xf2, 0x36, 0x4d, + 0x10, 0xb2, 0x65, 0x6e, 0xeb, 0x56, 0x7d, 0xb9, 0x16, 0xe3, 0x53, 0xf3, 0xe3, 0x9b, 0x4b, 0x67, + 0xbf, 0x1f, 0x64, 0xd4, 0xc0, 0xba, 0x7b, 0xf7, 0xd3, 0x74, 0x54, 0x99, 0x85, 0xc8, 0xab, 0x60, + 0x25, 0xd1, 0x47, 0x85, 0xc4, 0xc6, 0x16, 0x81, 0xf2, 0xb7, 0x2c, 0x10, 0x5a, 0x04, 0xed, 0xe9, + 0xfa, 0x81, 0x65, 0x0c, 0xa0, 0x43, 0xb4, 0xe3, 0xc3, 0x30, 0x9f, 0x7f, 0x02, 0xf2, 0xc4, 0x40, + 0x16, 0x74, 0x16, 0x36, 0x0e, 0x7c, 0xfc, 0x6b, 0x50, 0xea, 0x62, 0x07, 0xb6, 0xa3, 0x8e, 0x6d, + 0xcd, 0xf7, 0xd1, 0xfa, 0x85, 0xe6, 0xc3, 0x8b, 0xd3, 0xea, 0x7a, 0x90, 0x10, 0xcd, 0x89, 0x47, + 0x15, 0xbd, 0x80, 0xa4, 0xc6, 0x97, 0x40, 0xde, 0xee, 0x77, 0x8e, 0xe0, 0x50, 0xc8, 0x79, 0x41, + 0x6a, 0x70, 0xc5, 0x3f, 0x05, 0x37, 0x2d, 0xe8, 0xbe, 0xc7, 0xce, 0x91, 0xb0, 0x44, 0x01, 0x89, + 0x09, 0x40, 0xfb, 0xbe, 0xfa, 0xdc, 0x7a, 0x8b, 0xd5, 0xd0, 0xba, 0xdb, 0xf0, 0x00, 0x05, 0x9d, + 0x3f, 0x4f, 0x47, 0x95, 0x8d, 0xb9, 0x0d, 0x65, 0xd1, 0x90, 0x65, 0x50, 0x66, 0x69, 0x11, 0xce, + 0xef, 0x59, 0xb0, 0x16, 0xa1, 0xbe, 0x4e, 0x44, 0x77, 0x12, 0x44, 0x37, 0xe3, 0x44, 0x59, 0x40, + 0xe4, 0x47, 0x60, 0xe3, 0x12, 0x39, 0xe2, 0xfa, 0x93, 0xa3, 0x5c, 0x55, 0x68, 0xe2, 0xc1, 0xff, + 0xe1, 0xba, 0xbf, 0x80, 0x2b, 0x3b, 0x21, 0x15, 0xe7, 0x22, 0x00, 0xac, 0xe6, 0x01, 0x00, 0x96, + 0x1c, 0x02, 0xa8, 0xff, 0xc8, 0x81, 0x5c, 0x8b, 0x20, 0xfe, 0x10, 0xdc, 0x8e, 0x7d, 0x57, 0xa4, + 0xc4, 0xe6, 0x24, 0xde, 0x73, 0x71, 0xf3, 0x72, 0x3d, 0xcc, 0xe7, 0xdf, 0x81, 0xe5, 0xf4, 0x6f, + 0xc0, 0xe3, 0x7f, 0x03, 0x52, 0x8d, 0xa2, 0x72, 0x45, 0x63, 0x34, 0xf2, 0x03, 0x10, 0x98, 0xef, + 0x49, 0x85, 0x55, 0x3b, 0x65, 0x70, 0xfd, 0xea, 0xde, 0xf9, 0xd9, 0xcc, 0x67, 0x29, 0x65, 0x36, + 0xcb, 0x9b, 0x36, 0x7b, 0xd1, 0x56, 0x8a, 0x37, 0x3e, 0x4e, 0x47, 0x15, 0xae, 0xf9, 0xf2, 0x6c, + 0x2c, 0x71, 0xe7, 0x63, 0x89, 0xfb, 0x33, 0x96, 0xb8, 0xaf, 0x13, 0x29, 0x73, 0x3e, 0x91, 0x32, + 0xbf, 0x26, 0x52, 0xe6, 0xcd, 0x33, 0x64, 0xb8, 0xbd, 0x7e, 0xa7, 0xd6, 0xc5, 0xa6, 0x62, 0xf7, + 0x49, 0xaf, 0xdb, 0xd3, 0x0c, 0x8b, 0xae, 0xaa, 0x74, 0x59, 0xb5, 0xb0, 0x0e, 0x95, 0x13, 0x65, + 0xee, 0x09, 0xa3, 0xa7, 0x53, 0x27, 0x4f, 0xcf, 0x9f, 0xc6, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xed, 0xa3, 0x26, 0xf8, 0x5c, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -397,6 +509,8 @@ type MsgClient interface { UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // AddUniversalValidator defines a message to add a universal validator. AddUniversalValidator(ctx context.Context, in *MsgAddUniversalValidator, opts ...grpc.CallOption) (*MsgAddUniversalValidatorResponse, error) + // UpdateUniversalValidator defines a message to update a universal validator. + UpdateUniversalValidator(ctx context.Context, in *MsgUpdateUniversalValidator, opts ...grpc.CallOption) (*MsgUpdateUniversalValidatorResponse, error) // RemoveUniversalValidator defines a message to remove a universal validator. RemoveUniversalValidator(ctx context.Context, in *MsgRemoveUniversalValidator, opts ...grpc.CallOption) (*MsgRemoveUniversalValidatorResponse, error) } @@ -427,6 +541,15 @@ func (c *msgClient) AddUniversalValidator(ctx context.Context, in *MsgAddUnivers return out, nil } +func (c *msgClient) UpdateUniversalValidator(ctx context.Context, in *MsgUpdateUniversalValidator, opts ...grpc.CallOption) (*MsgUpdateUniversalValidatorResponse, error) { + out := new(MsgUpdateUniversalValidatorResponse) + err := c.cc.Invoke(ctx, "/uvalidator.v1.Msg/UpdateUniversalValidator", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) RemoveUniversalValidator(ctx context.Context, in *MsgRemoveUniversalValidator, opts ...grpc.CallOption) (*MsgRemoveUniversalValidatorResponse, error) { out := new(MsgRemoveUniversalValidatorResponse) err := c.cc.Invoke(ctx, "/uvalidator.v1.Msg/RemoveUniversalValidator", in, out, opts...) @@ -444,6 +567,8 @@ type MsgServer interface { UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // AddUniversalValidator defines a message to add a universal validator. AddUniversalValidator(context.Context, *MsgAddUniversalValidator) (*MsgAddUniversalValidatorResponse, error) + // UpdateUniversalValidator defines a message to update a universal validator. + UpdateUniversalValidator(context.Context, *MsgUpdateUniversalValidator) (*MsgUpdateUniversalValidatorResponse, error) // RemoveUniversalValidator defines a message to remove a universal validator. RemoveUniversalValidator(context.Context, *MsgRemoveUniversalValidator) (*MsgRemoveUniversalValidatorResponse, error) } @@ -458,6 +583,9 @@ func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateP func (*UnimplementedMsgServer) AddUniversalValidator(ctx context.Context, req *MsgAddUniversalValidator) (*MsgAddUniversalValidatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddUniversalValidator not implemented") } +func (*UnimplementedMsgServer) UpdateUniversalValidator(ctx context.Context, req *MsgUpdateUniversalValidator) (*MsgUpdateUniversalValidatorResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateUniversalValidator not implemented") +} func (*UnimplementedMsgServer) RemoveUniversalValidator(ctx context.Context, req *MsgRemoveUniversalValidator) (*MsgRemoveUniversalValidatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveUniversalValidator not implemented") } @@ -502,6 +630,24 @@ func _Msg_AddUniversalValidator_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Msg_UpdateUniversalValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateUniversalValidator) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateUniversalValidator(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/uvalidator.v1.Msg/UpdateUniversalValidator", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateUniversalValidator(ctx, req.(*MsgUpdateUniversalValidator)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_RemoveUniversalValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgRemoveUniversalValidator) if err := dec(in); err != nil { @@ -532,6 +678,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "AddUniversalValidator", Handler: _Msg_AddUniversalValidator_Handler, }, + { + MethodName: "UpdateUniversalValidator", + Handler: _Msg_UpdateUniversalValidator_Handler, + }, { MethodName: "RemoveUniversalValidator", Handler: _Msg_RemoveUniversalValidator_Handler, @@ -683,6 +833,85 @@ func (m *MsgAddUniversalValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *MsgUpdateUniversalValidator) 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 *MsgUpdateUniversalValidator) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateUniversalValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Network != nil { + { + size, err := m.Network.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Pubkey) > 0 { + i -= len(m.Pubkey) + copy(dAtA[i:], m.Pubkey) + i = encodeVarintTx(dAtA, i, uint64(len(m.Pubkey))) + i-- + dAtA[i] = 0x1a + } + if len(m.CoreValidatorAddress) > 0 { + i -= len(m.CoreValidatorAddress) + copy(dAtA[i:], m.CoreValidatorAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.CoreValidatorAddress))) + 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 *MsgUpdateUniversalValidatorResponse) 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 *MsgUpdateUniversalValidatorResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateUniversalValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgRemoveUniversalValidator) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -812,6 +1041,40 @@ func (m *MsgAddUniversalValidatorResponse) Size() (n int) { return n } +func (m *MsgUpdateUniversalValidator) 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)) + } + l = len(m.CoreValidatorAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Pubkey) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Network != nil { + l = m.Network.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateUniversalValidatorResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgRemoveUniversalValidator) Size() (n int) { if m == nil { return 0 @@ -1241,6 +1504,238 @@ func (m *MsgAddUniversalValidatorResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgUpdateUniversalValidator) 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: MsgUpdateUniversalValidator: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateUniversalValidator: 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 CoreValidatorAddress", 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.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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.Pubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Network == nil { + m.Network = &NetworkInfo{} + } + if err := m.Network.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 *MsgUpdateUniversalValidatorResponse) 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: MsgUpdateUniversalValidatorResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateUniversalValidatorResponse: 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 (m *MsgRemoveUniversalValidator) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 46cbf78f0f4f6587368b21a1a7b58822cc777afa Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 10:53:57 +0530 Subject: [PATCH 038/105] feat: added utss module --- api/utss/module/v1/module.pulsar.go | 500 ++++++++++++ api/utss/v1/genesis.pulsar.go | 1051 ++++++++++++++++++++++++++ api/utss/v1/query.pulsar.go | 995 ++++++++++++++++++++++++ api/utss/v1/query_grpc.pb.go | 111 +++ api/utss/v1/tx.pulsar.go | 1084 +++++++++++++++++++++++++++ api/utss/v1/tx_grpc.pb.go | 115 +++ app/app.go | 25 + proto/utss/module/v1/module.proto | 13 + proto/utss/v1/genesis.proto | 22 + proto/utss/v1/query.proto | 24 + proto/utss/v1/tx.proto | 40 + x/uregistry/types/params.go | 2 +- x/utss/README.md | 13 + x/utss/autocli.go | 31 + x/utss/client/cli/query.go | 49 ++ x/utss/client/cli/tx.go | 67 ++ x/utss/depinject.go | 65 ++ x/utss/keeper/genesis_test.go | 22 + x/utss/keeper/keeper.go | 94 +++ x/utss/keeper/keeper_test.go | 150 ++++ x/utss/keeper/msg_server.go | 29 + x/utss/keeper/msg_server_test.go | 56 ++ x/utss/keeper/query_server.go | 30 + x/utss/module.go | 153 ++++ x/utss/types/codec.go | 35 + x/utss/types/events.go | 17 + x/utss/types/expected_keepers.go | 12 + x/utss/types/genesis.go | 19 + x/utss/types/genesis.pb.go | 510 +++++++++++++ x/utss/types/genesis_test.go | 38 + x/utss/types/keys.go | 21 + x/utss/types/msgs.go | 49 ++ x/utss/types/params.go | 29 + x/utss/types/query.pb.go | 540 +++++++++++++ x/utss/types/query.pb.gw.go | 153 ++++ x/utss/types/tx.pb.go | 602 +++++++++++++++ x/uvalidator/keeper/hooks.go | 17 +- x/uvalidator/types/hooks.go | 16 + 38 files changed, 6783 insertions(+), 16 deletions(-) create mode 100644 api/utss/module/v1/module.pulsar.go create mode 100644 api/utss/v1/genesis.pulsar.go create mode 100644 api/utss/v1/query.pulsar.go create mode 100644 api/utss/v1/query_grpc.pb.go create mode 100644 api/utss/v1/tx.pulsar.go create mode 100644 api/utss/v1/tx_grpc.pb.go create mode 100755 proto/utss/module/v1/module.proto create mode 100755 proto/utss/v1/genesis.proto create mode 100755 proto/utss/v1/query.proto create mode 100755 proto/utss/v1/tx.proto create mode 100755 x/utss/README.md create mode 100755 x/utss/autocli.go create mode 100755 x/utss/client/cli/query.go create mode 100755 x/utss/client/cli/tx.go create mode 100755 x/utss/depinject.go create mode 100755 x/utss/keeper/genesis_test.go create mode 100755 x/utss/keeper/keeper.go create mode 100755 x/utss/keeper/keeper_test.go create mode 100755 x/utss/keeper/msg_server.go create mode 100755 x/utss/keeper/msg_server_test.go create mode 100755 x/utss/keeper/query_server.go create mode 100755 x/utss/module.go create mode 100755 x/utss/types/codec.go create mode 100644 x/utss/types/events.go create mode 100644 x/utss/types/expected_keepers.go create mode 100755 x/utss/types/genesis.go create mode 100644 x/utss/types/genesis.pb.go create mode 100755 x/utss/types/genesis_test.go create mode 100755 x/utss/types/keys.go create mode 100755 x/utss/types/msgs.go create mode 100755 x/utss/types/params.go create mode 100644 x/utss/types/query.pb.go create mode 100644 x/utss/types/query.pb.gw.go create mode 100644 x/utss/types/tx.pb.go create mode 100644 x/uvalidator/types/hooks.go diff --git a/api/utss/module/v1/module.pulsar.go b/api/utss/module/v1/module.pulsar.go new file mode 100644 index 00000000..c3d0d9fc --- /dev/null +++ b/api/utss/module/v1/module.pulsar.go @@ -0,0 +1,500 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package modulev1 + +import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Module protoreflect.MessageDescriptor +) + +func init() { + file_utss_module_v1_module_proto_init() + md_Module = File_utss_module_v1_module_proto.Messages().ByName("Module") +} + +var _ protoreflect.Message = (*fastReflection_Module)(nil) + +type fastReflection_Module Module + +func (x *Module) ProtoReflect() protoreflect.Message { + return (*fastReflection_Module)(x) +} + +func (x *Module) slowProtoReflect() protoreflect.Message { + mi := &file_utss_module_v1_module_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Module_messageType fastReflection_Module_messageType +var _ protoreflect.MessageType = fastReflection_Module_messageType{} + +type fastReflection_Module_messageType struct{} + +func (x fastReflection_Module_messageType) Zero() protoreflect.Message { + return (*fastReflection_Module)(nil) +} +func (x fastReflection_Module_messageType) New() protoreflect.Message { + return new(fastReflection_Module) +} +func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Module) Type() protoreflect.MessageType { + return _fastReflection_Module_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Module) New() protoreflect.Message { + return new(fastReflection_Module) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { + return (*Module)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.module.v1.Module")) + } + panic(fmt.Errorf("message utss.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.module.v1.Module")) + } + panic(fmt.Errorf("message utss.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.module.v1.Module")) + } + panic(fmt.Errorf("message utss.module.v1.Module does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.module.v1.Module")) + } + panic(fmt.Errorf("message utss.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.module.v1.Module")) + } + panic(fmt.Errorf("message utss.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.module.v1.Module")) + } + panic(fmt.Errorf("message utss.module.v1.Module does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.module.v1.Module", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Module) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Module) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: utss/module/v1/module.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Module is the app config object of the module. +// Learn more: https://docs.cosmos.network/main/building-modules/depinject +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_module_v1_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module) ProtoMessage() {} + +// Deprecated: Use Module.ProtoReflect.Descriptor instead. +func (*Module) Descriptor() ([]byte, []int) { + return file_utss_module_v1_module_proto_rawDescGZIP(), []int{0} +} + +var File_utss_module_v1_module_proto protoreflect.FileDescriptor + +var file_utss_module_v1_module_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x75, + 0x74, 0x73, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x36, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x2c, 0xba, 0xc0, 0x96, 0xda, 0x01, + 0x26, 0x0a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, + 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x42, 0xbd, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, + 0x75, 0x74, 0x73, 0x73, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, + 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x55, 0x4d, 0x58, 0xaa, 0x02, 0x0e, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_utss_module_v1_module_proto_rawDescOnce sync.Once + file_utss_module_v1_module_proto_rawDescData = file_utss_module_v1_module_proto_rawDesc +) + +func file_utss_module_v1_module_proto_rawDescGZIP() []byte { + file_utss_module_v1_module_proto_rawDescOnce.Do(func() { + file_utss_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_utss_module_v1_module_proto_rawDescData) + }) + return file_utss_module_v1_module_proto_rawDescData +} + +var file_utss_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_utss_module_v1_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: utss.module.v1.Module +} +var file_utss_module_v1_module_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_utss_module_v1_module_proto_init() } +func file_utss_module_v1_module_proto_init() { + if File_utss_module_v1_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_utss_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_utss_module_v1_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_utss_module_v1_module_proto_goTypes, + DependencyIndexes: file_utss_module_v1_module_proto_depIdxs, + MessageInfos: file_utss_module_v1_module_proto_msgTypes, + }.Build() + File_utss_module_v1_module_proto = out.File + file_utss_module_v1_module_proto_rawDesc = nil + file_utss_module_v1_module_proto_goTypes = nil + file_utss_module_v1_module_proto_depIdxs = nil +} diff --git a/api/utss/v1/genesis.pulsar.go b/api/utss/v1/genesis.pulsar.go new file mode 100644 index 00000000..6b5c9490 --- /dev/null +++ b/api/utss/v1/genesis.pulsar.go @@ -0,0 +1,1051 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package utssv1 + +import ( + _ "cosmossdk.io/api/amino" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_genesis_proto_init() + md_GenesisState = File_utss_v1_genesis_proto.Messages().ByName("GenesisState") + fd_GenesisState_params = md_GenesisState.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) + +type fastReflection_GenesisState GenesisState + +func (x *GenesisState) ProtoReflect() protoreflect.Message { + return (*fastReflection_GenesisState)(x) +} + +func (x *GenesisState) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_genesis_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType +var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} + +type fastReflection_GenesisState_messageType struct{} + +func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { + return (*fastReflection_GenesisState)(nil) +} +func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} +func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { + return md_GenesisState +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { + return _fastReflection_GenesisState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GenesisState) New() protoreflect.Message { + return new(fastReflection_GenesisState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { + return (*GenesisState)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_GenesisState_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.GenesisState.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) + } + panic(fmt.Errorf("message utss.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.GenesisState.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) + } + panic(fmt.Errorf("message utss.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.GenesisState.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) + } + panic(fmt.Errorf("message utss.v1.GenesisState does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.GenesisState.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) + } + panic(fmt.Errorf("message utss.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.GenesisState.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) + } + panic(fmt.Errorf("message utss.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.GenesisState.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.GenesisState")) + } + panic(fmt.Errorf("message utss.v1.GenesisState does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.GenesisState", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_GenesisState) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GenesisState) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Params protoreflect.MessageDescriptor + fd_Params_some_value protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_genesis_proto_init() + md_Params = File_utss_v1_genesis_proto.Messages().ByName("Params") + fd_Params_some_value = md_Params.Fields().ByName("some_value") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_genesis_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SomeValue != false { + value := protoreflect.ValueOfBool(x.SomeValue) + if !f(fd_Params_some_value, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.Params.some_value": + return x.SomeValue != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.Params.some_value": + x.SomeValue = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.Params.some_value": + value := x.SomeValue + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.Params.some_value": + x.SomeValue = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.Params.some_value": + panic(fmt.Errorf("field some_value of message utss.v1.Params is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.Params.some_value": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.Params", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Params) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.SomeValue { + n += 2 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.SomeValue { + i-- + if x.SomeValue { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SomeValue", wireType) + } + var v int + 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.SomeValue = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: utss/v1/genesis.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// GenesisState defines the module genesis state +type GenesisState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Params defines all the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *GenesisState) Reset() { + *x = GenesisState{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_genesis_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GenesisState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GenesisState) ProtoMessage() {} + +// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. +func (*GenesisState) Descriptor() ([]byte, []int) { + return file_utss_v1_genesis_proto_rawDescGZIP(), []int{0} +} + +func (x *GenesisState) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// Params defines the set of module parameters. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SomeValue bool `protobuf:"varint,2,opt,name=some_value,json=someValue,proto3" json:"some_value,omitempty"` +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_genesis_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_utss_v1_genesis_proto_rawDescGZIP(), []int{1} +} + +func (x *Params) GetSomeValue() bool { + if x != nil { + return x.SomeValue + } + return false +} + +var File_utss_v1_genesis_proto protoreflect.FileDescriptor + +var file_utss_v1_genesis_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, + 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a, 0x0c, 0x47, 0x65, 0x6e, + 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x41, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x6f, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x18, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0b, + 0x75, 0x74, 0x73, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x91, 0x01, 0x0a, 0x0b, + 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, + 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, + 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, + 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_utss_v1_genesis_proto_rawDescOnce sync.Once + file_utss_v1_genesis_proto_rawDescData = file_utss_v1_genesis_proto_rawDesc +) + +func file_utss_v1_genesis_proto_rawDescGZIP() []byte { + file_utss_v1_genesis_proto_rawDescOnce.Do(func() { + file_utss_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_utss_v1_genesis_proto_rawDescData) + }) + return file_utss_v1_genesis_proto_rawDescData +} + +var file_utss_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_utss_v1_genesis_proto_goTypes = []interface{}{ + (*GenesisState)(nil), // 0: utss.v1.GenesisState + (*Params)(nil), // 1: utss.v1.Params +} +var file_utss_v1_genesis_proto_depIdxs = []int32{ + 1, // 0: utss.v1.GenesisState.params:type_name -> utss.v1.Params + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_utss_v1_genesis_proto_init() } +func file_utss_v1_genesis_proto_init() { + if File_utss_v1_genesis_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_utss_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenesisState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_utss_v1_genesis_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_utss_v1_genesis_proto_goTypes, + DependencyIndexes: file_utss_v1_genesis_proto_depIdxs, + MessageInfos: file_utss_v1_genesis_proto_msgTypes, + }.Build() + File_utss_v1_genesis_proto = out.File + file_utss_v1_genesis_proto_rawDesc = nil + file_utss_v1_genesis_proto_goTypes = nil + file_utss_v1_genesis_proto_depIdxs = nil +} diff --git a/api/utss/v1/query.pulsar.go b/api/utss/v1/query.pulsar.go new file mode 100644 index 00000000..ad2c98f8 --- /dev/null +++ b/api/utss/v1/query.pulsar.go @@ -0,0 +1,995 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package utssv1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_QueryParamsRequest protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryParamsRequest = File_utss_v1_query_proto.Messages().ByName("QueryParamsRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) + +type fastReflection_QueryParamsRequest QueryParamsRequest + +func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(x) +} + +func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} + +type fastReflection_QueryParamsRequest_messageType struct{} + +func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsRequest)(nil) +} +func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} +func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { + return new(fastReflection_QueryParamsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryParamsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryParamsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryParamsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryParamsResponse protoreflect.MessageDescriptor + fd_QueryParamsResponse_params protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryParamsResponse = File_utss_v1_query_proto.Messages().ByName("QueryParamsResponse") + fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) + +type fastReflection_QueryParamsResponse QueryParamsResponse + +func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(x) +} + +func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} + +type fastReflection_QueryParamsResponse_messageType struct{} + +func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryParamsResponse)(nil) +} +func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} +func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryParamsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { + return new(fastReflection_QueryParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryParamsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_QueryParamsResponse_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryParamsResponse.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryParamsResponse.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryParamsResponse.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryParamsResponse.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryParamsResponse.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryParamsResponse.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryParamsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryParamsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryParamsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryParamsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: utss/v1/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsRequest) ProtoMessage() {} + +// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{0} +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // params defines the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsResponse) ProtoMessage() {} + +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +var File_utss_v1_query_proto protoreflect.FileDescriptor + +var file_utss_v1_query_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1c, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x75, 0x74, + 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3e, 0x0a, 0x13, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x27, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x65, 0x0a, 0x05, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x5c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x75, + 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x75, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, + 0x0f, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x8f, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, + 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, + 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, + 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_utss_v1_query_proto_rawDescOnce sync.Once + file_utss_v1_query_proto_rawDescData = file_utss_v1_query_proto_rawDesc +) + +func file_utss_v1_query_proto_rawDescGZIP() []byte { + file_utss_v1_query_proto_rawDescOnce.Do(func() { + file_utss_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_utss_v1_query_proto_rawDescData) + }) + return file_utss_v1_query_proto_rawDescData +} + +var file_utss_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_utss_v1_query_proto_goTypes = []interface{}{ + (*QueryParamsRequest)(nil), // 0: utss.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: utss.v1.QueryParamsResponse + (*Params)(nil), // 2: utss.v1.Params +} +var file_utss_v1_query_proto_depIdxs = []int32{ + 2, // 0: utss.v1.QueryParamsResponse.params:type_name -> utss.v1.Params + 0, // 1: utss.v1.Query.Params:input_type -> utss.v1.QueryParamsRequest + 1, // 2: utss.v1.Query.Params:output_type -> utss.v1.QueryParamsResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_utss_v1_query_proto_init() } +func file_utss_v1_query_proto_init() { + if File_utss_v1_query_proto != nil { + return + } + file_utss_v1_genesis_proto_init() + if !protoimpl.UnsafeEnabled { + file_utss_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_utss_v1_query_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_utss_v1_query_proto_goTypes, + DependencyIndexes: file_utss_v1_query_proto_depIdxs, + MessageInfos: file_utss_v1_query_proto_msgTypes, + }.Build() + File_utss_v1_query_proto = out.File + file_utss_v1_query_proto_rawDesc = nil + file_utss_v1_query_proto_goTypes = nil + file_utss_v1_query_proto_depIdxs = nil +} diff --git a/api/utss/v1/query_grpc.pb.go b/api/utss/v1/query_grpc.pb.go new file mode 100644 index 00000000..dcc7d2a0 --- /dev/null +++ b/api/utss/v1/query_grpc.pb.go @@ -0,0 +1,111 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: utss/v1/query.proto + +package utssv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Query_Params_FullMethodName = "/utss.v1.Query/Params" +) + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type QueryClient interface { + // Params queries all parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +type QueryServer interface { + // Params queries all parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Params_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "utss.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "utss/v1/query.proto", +} diff --git a/api/utss/v1/tx.pulsar.go b/api/utss/v1/tx.pulsar.go new file mode 100644 index 00000000..4e3ca74f --- /dev/null +++ b/api/utss/v1/tx.pulsar.go @@ -0,0 +1,1084 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package utssv1 + +import ( + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_MsgUpdateParams protoreflect.MessageDescriptor + fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateParams_params protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgUpdateParams = File_utss_v1_tx_proto.Messages().ByName("MsgUpdateParams") + fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") + fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) + +type fastReflection_MsgUpdateParams MsgUpdateParams + +func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(x) +} + +func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} + +type fastReflection_MsgUpdateParams_messageType struct{} + +func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(nil) +} +func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} +func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParams)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateParams_authority, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParams_params, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.MsgUpdateParams.authority": + return x.Authority != "" + case "utss.v1.MsgUpdateParams.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.MsgUpdateParams.authority": + x.Authority = "" + case "utss.v1.MsgUpdateParams.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.MsgUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "utss.v1.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParams does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.MsgUpdateParams.authority": + x.Authority = value.Interface().(string) + case "utss.v1.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "utss.v1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message utss.v1.MsgUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "utss.v1.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParams does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgUpdateParams", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateParams) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Params != nil { + l = options.Size(x.Params) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgUpdateParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgUpdateParamsResponse = File_utss_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) + +type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse + +func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(x) +} + +func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} + +type fastReflection_MsgUpdateParamsResponse_messageType struct{} + +func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(nil) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParamsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgUpdateParamsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: utss/v1/tx.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the parameters to update. + // + // NOTE: All parameters must be supplied. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParams) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgUpdateParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateParams) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{1} +} + +var File_utss_v1_tx_proto protoreflect.FileDescriptor + +var file_utss_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x07, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, + 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x01, 0x0a, + 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 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, 0x58, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4a, 0x0a, 0x0c, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x2e, 0x75, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 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, 0x8c, 0x01, 0x0a, + 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, + 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, + 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_utss_v1_tx_proto_rawDescOnce sync.Once + file_utss_v1_tx_proto_rawDescData = file_utss_v1_tx_proto_rawDesc +) + +func file_utss_v1_tx_proto_rawDescGZIP() []byte { + file_utss_v1_tx_proto_rawDescOnce.Do(func() { + file_utss_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_utss_v1_tx_proto_rawDescData) + }) + return file_utss_v1_tx_proto_rawDescData +} + +var file_utss_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_utss_v1_tx_proto_goTypes = []interface{}{ + (*MsgUpdateParams)(nil), // 0: utss.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: utss.v1.MsgUpdateParamsResponse + (*Params)(nil), // 2: utss.v1.Params +} +var file_utss_v1_tx_proto_depIdxs = []int32{ + 2, // 0: utss.v1.MsgUpdateParams.params:type_name -> utss.v1.Params + 0, // 1: utss.v1.Msg.UpdateParams:input_type -> utss.v1.MsgUpdateParams + 1, // 2: utss.v1.Msg.UpdateParams:output_type -> utss.v1.MsgUpdateParamsResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_utss_v1_tx_proto_init() } +func file_utss_v1_tx_proto_init() { + if File_utss_v1_tx_proto != nil { + return + } + file_utss_v1_genesis_proto_init() + if !protoimpl.UnsafeEnabled { + file_utss_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_utss_v1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_utss_v1_tx_proto_goTypes, + DependencyIndexes: file_utss_v1_tx_proto_depIdxs, + MessageInfos: file_utss_v1_tx_proto_msgTypes, + }.Build() + File_utss_v1_tx_proto = out.File + file_utss_v1_tx_proto_rawDesc = nil + file_utss_v1_tx_proto_goTypes = nil + file_utss_v1_tx_proto_depIdxs = nil +} diff --git a/api/utss/v1/tx_grpc.pb.go b/api/utss/v1/tx_grpc.pb.go new file mode 100644 index 00000000..b3ca311f --- /dev/null +++ b/api/utss/v1/tx_grpc.pb.go @@ -0,0 +1,115 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: utss/v1/tx.proto + +package utssv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Msg_UpdateParams_FullMethodName = "/utss.v1.Msg/UpdateParams" +) + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a governance operation for updating the parameters. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility +type MsgServer interface { + // UpdateParams defines a governance operation for updating the parameters. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UpdateParams_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "utss.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "utss/v1/tx.proto", +} diff --git a/app/app.go b/app/app.go index a5e0160d..1f8d9157 100755 --- a/app/app.go +++ b/app/app.go @@ -166,6 +166,9 @@ import ( uregistry "github.com/pushchain/push-chain-node/x/uregistry" uregistrykeeper "github.com/pushchain/push-chain-node/x/uregistry/keeper" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + utss "github.com/pushchain/push-chain-node/x/utss" + utsskeeper "github.com/pushchain/push-chain-node/x/utss/keeper" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" utxverifier "github.com/pushchain/push-chain-node/x/utxverifier" utxverifierkeeper "github.com/pushchain/push-chain-node/x/utxverifier/keeper" utxverifiertypes "github.com/pushchain/push-chain-node/x/utxverifier/types" @@ -318,6 +321,7 @@ type ChainApp struct { UtxverifierKeeper utxverifierkeeper.Keeper UregistryKeeper uregistrykeeper.Keeper UvalidatorKeeper uvalidatorkeeper.Keeper + UtssKeeper utsskeeper.Keeper // the module manager ModuleManager *module.Manager @@ -432,6 +436,7 @@ func NewChainApp( utxverifiertypes.StoreKey, uregistrytypes.StoreKey, uvalidatortypes.StoreKey, + utsstypes.StoreKey, ) tkeys := storetypes.NewTransientStoreKeys( @@ -749,6 +754,21 @@ func NewChainApp( app.SlashingKeeper, ) + // Create the utss keeper + app.UtssKeeper = utsskeeper.NewKeeper( + appCodec, + runtime.NewKVStoreService(keys[utsstypes.StoreKey]), + logger, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), + app.UregistryKeeper, + ) + + app.UvalidatorKeeper.SetHooks( + uvalidatorkeeper.NewMultiUValidatorHooks( + app.UtssKeeper.Hooks(), + ), + ) + // NOTE: we are adding all available EVM extensions. // Not all of them need to be enabled, which can be configured on a per-chain basis. corePrecompiles := NewAvailableStaticPrecompiles( @@ -1018,6 +1038,7 @@ func NewChainApp( utxverifier.NewAppModule(appCodec, app.UtxverifierKeeper, app.UregistryKeeper), uregistry.NewAppModule(appCodec, app.UregistryKeeper, app.EVMKeeper), uvalidator.NewAppModule(appCodec, app.UvalidatorKeeper, app.StakingKeeper, app.SlashingKeeper), + utss.NewAppModule(appCodec, app.UtssKeeper, app.UregistryKeeper), ) // BasicModuleManager defines the module BasicManager is in charge of setting up basic, @@ -1067,6 +1088,7 @@ func NewChainApp( utxverifiertypes.ModuleName, uregistrytypes.ModuleName, uvalidatortypes.ModuleName, + utsstypes.ModuleName, ) app.ModuleManager.SetOrderEndBlockers( @@ -1090,6 +1112,7 @@ func NewChainApp( utxverifiertypes.ModuleName, uregistrytypes.ModuleName, uvalidatortypes.ModuleName, + utsstypes.ModuleName, ) // NOTE: The genutils module must occur after staking so that pools are @@ -1140,6 +1163,7 @@ func NewChainApp( utxverifiertypes.ModuleName, uregistrytypes.ModuleName, uvalidatortypes.ModuleName, + utsstypes.ModuleName, } app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...) app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...) @@ -1580,6 +1604,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(utxverifiertypes.ModuleName) paramsKeeper.Subspace(uregistrytypes.ModuleName) paramsKeeper.Subspace(uvalidatortypes.ModuleName) + paramsKeeper.Subspace(utsstypes.ModuleName) return paramsKeeper } diff --git a/proto/utss/module/v1/module.proto b/proto/utss/module/v1/module.proto new file mode 100755 index 00000000..c394c9c8 --- /dev/null +++ b/proto/utss/module/v1/module.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package utss.module.v1; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module is the app config object of the module. +// Learn more: https://docs.cosmos.network/main/building-modules/depinject +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import : "github.com/pushchain/push-chain-node" + }; +} \ No newline at end of file diff --git a/proto/utss/v1/genesis.proto b/proto/utss/v1/genesis.proto new file mode 100755 index 00000000..7cdec8aa --- /dev/null +++ b/proto/utss/v1/genesis.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package utss.v1; + +import "gogoproto/gogo.proto"; +import "amino/amino.proto"; + +option go_package = "github.com/pushchain/push-chain-node/x/utss/types"; + +// GenesisState defines the module genesis state +message GenesisState { + // Params defines all the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +// Params defines the set of module parameters. +message Params { + option (amino.name) = "utss/params"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + bool some_value = 2; +} \ No newline at end of file diff --git a/proto/utss/v1/query.proto b/proto/utss/v1/query.proto new file mode 100755 index 00000000..2ded9233 --- /dev/null +++ b/proto/utss/v1/query.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package utss.v1; + +import "google/api/annotations.proto"; +import "utss/v1/genesis.proto"; + +option go_package = "github.com/pushchain/push-chain-node/x/utss/types"; + +// Query provides defines the gRPC querier service. +service Query { + // Params queries all parameters of the module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/utss/v1/params"; + } +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1; +} diff --git a/proto/utss/v1/tx.proto b/proto/utss/v1/tx.proto new file mode 100755 index 00000000..8696f5d9 --- /dev/null +++ b/proto/utss/v1/tx.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package utss.v1; + +import "cosmos/msg/v1/msg.proto"; +import "utss/v1/genesis.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/pushchain/push-chain-node/x/utss/types"; + +// Msg defines the Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + // UpdateParams defines a governance operation for updating the parameters. + // + // Since: cosmos-sdk 0.47 + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParamsResponse {} diff --git a/x/uregistry/types/params.go b/x/uregistry/types/params.go index 548788eb..dc56afee 100755 --- a/x/uregistry/types/params.go +++ b/x/uregistry/types/params.go @@ -8,7 +8,7 @@ import ( func DefaultParams() Params { // TODO: return Params{ - Admin: "push1negskcfqu09j5zvpk7nhvacnwyy2mafffy7r6a", + Admin: "push1gjaw568e35hjc8udhat0xnsxxmkm2snrexxz20", } } diff --git a/x/utss/README.md b/x/utss/README.md new file mode 100755 index 00000000..de166ff6 --- /dev/null +++ b/x/utss/README.md @@ -0,0 +1,13 @@ +# Universal Transaction Verification (utss) Module + +This is utss (Universal Transaction Verification) module. + +## Responsibilities + +- Verifying transaction hashes of funds locked on source chains +- Performing RPC calls to external chains +- Storing verified transaction hashes for reference and validation + +## Overview + +The utss module acts as the verification layer in a universal system, ensuring the authenticity of transactions before execution on the destination chain. \ No newline at end of file diff --git a/x/utss/autocli.go b/x/utss/autocli.go new file mode 100755 index 00000000..1cd9e386 --- /dev/null +++ b/x/utss/autocli.go @@ -0,0 +1,31 @@ +package module + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + modulev1 "github.com/pushchain/push-chain-node/api/utss/v1" +) + +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: modulev1.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Params", + Use: "params", + Short: "Query the current consensus parameters", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: modulev1.Msg_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "UpdateParams", + Skip: false, // set to true if authority gated + }, + }, + }, + } +} diff --git a/x/utss/client/cli/query.go b/x/utss/client/cli/query.go new file mode 100755 index 00000000..4854c9ee --- /dev/null +++ b/x/utss/client/cli/query.go @@ -0,0 +1,49 @@ +package cli + +import ( + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// !NOTE: Must enable in module.go (disabled in favor of autocli.go) + +func GetQueryCmd() *cobra.Command { + queryCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "Querying commands for " + types.ModuleName, + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + queryCmd.AddCommand( + // GetCmdParams(), + ) + return queryCmd +} + +// func GetCmdParams() *cobra.Command { +// cmd := &cobra.Command{ +// Use: "params", +// Short: "Show all module params", +// Args: cobra.ExactArgs(0), +// RunE: func(cmd *cobra.Command, args []string) error { +// clientCtx, err := client.GetClientQueryContext(cmd) +// if err != nil { +// return err +// } + +// queryClient := types.NewQueryClient(clientCtx) +// res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) +// if err != nil { +// return err +// } + +// return clientCtx.PrintProto(res) +// }, +// } +// flags.AddQueryFlagsToCmd(cmd) +// return cmd +// } diff --git a/x/utss/client/cli/tx.go b/x/utss/client/cli/tx.go new file mode 100755 index 00000000..959ec045 --- /dev/null +++ b/x/utss/client/cli/tx.go @@ -0,0 +1,67 @@ +package cli + +import ( + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// !NOTE: Must enable in module.go (disabled in favor of autocli.go) + +// NewTxCmd returns a root CLI command handler for certain modules +// transaction commands. +func NewTxCmd() *cobra.Command { + txCmd := &cobra.Command{ + Use: types.ModuleName, + Short: types.ModuleName + " subcommands.", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + txCmd.AddCommand( + // MsgUpdateParams(), + ) + return txCmd +} + +// Returns a CLI command handler for registering a +// contract for the module. +// func MsgUpdateParams() *cobra.Command { +// cmd := &cobra.Command{ +// Use: "update-params [some-value]", +// Short: "Update the params (must be submitted from the authority)", +// Args: cobra.ExactArgs(1), +// RunE: func(cmd *cobra.Command, args []string) error { +// cliCtx, err := client.GetClientTxContext(cmd) +// if err != nil { +// return err +// } + +// senderAddress := cliCtx.GetFromAddress() + +// someValue, err := strconv.ParseBool(args[0]) +// if err != nil { +// return err +// } + +// msg := &types.MsgUpdateParams{ +// Authority: senderAddress.String(), +// Params: types.Params{ +// SomeValue: someValue, +// }, +// } + +// if err := msg.Validate(); err != nil { +// return err +// } + +// return tx.GenerateOrBroadcastTxCLI(cliCtx, cmd.Flags(), msg) +// }, +// } + +// flags.AddTxFlagsToCmd(cmd) +// return cmd +// } diff --git a/x/utss/depinject.go b/x/utss/depinject.go new file mode 100755 index 00000000..9d03059e --- /dev/null +++ b/x/utss/depinject.go @@ -0,0 +1,65 @@ +package module + +import ( + "os" + + "github.com/cosmos/cosmos-sdk/codec" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" + + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + + "cosmossdk.io/core/address" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + "cosmossdk.io/log" + + modulev1 "github.com/pushchain/push-chain-node/api/utss/module/v1" + "github.com/pushchain/push-chain-node/x/utss/keeper" + "github.com/pushchain/push-chain-node/x/utss/types" +) + +var _ appmodule.AppModule = AppModule{} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} + +func init() { + appmodule.Register( + &modulev1.Module{}, + appmodule.Provide(ProvideModule), + ) +} + +type ModuleInputs struct { + depinject.In + + Cdc codec.Codec + StoreService store.KVStoreService + AddressCodec address.Codec + + StakingKeeper stakingkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + UregistryKeeper types.UregistryKeeper +} + +type ModuleOutputs struct { + depinject.Out + + Module appmodule.AppModule + Keeper keeper.Keeper +} + +func ProvideModule(in ModuleInputs) ModuleOutputs { + govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() + + k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr, in.UregistryKeeper) + m := NewAppModule(in.Cdc, k, in.UregistryKeeper) + + return ModuleOutputs{Module: m, Keeper: k, Out: depinject.Out{}} +} diff --git a/x/utss/keeper/genesis_test.go b/x/utss/keeper/genesis_test.go new file mode 100755 index 00000000..1158dc6e --- /dev/null +++ b/x/utss/keeper/genesis_test.go @@ -0,0 +1,22 @@ +package keeper_test + +import ( + "testing" + + "github.com/pushchain/push-chain-node/x/utss/types" + "github.com/stretchr/testify/require" +) + +func TestGenesis(t *testing.T) { + f := SetupTest(t) + + genesisState := &types.GenesisState{ + Params: types.DefaultParams(), + } + + f.k.InitGenesis(f.ctx, genesisState) + + got := f.k.ExportGenesis(f.ctx) + require.NotNil(t, got) + +} diff --git a/x/utss/keeper/keeper.go b/x/utss/keeper/keeper.go new file mode 100755 index 00000000..12e96830 --- /dev/null +++ b/x/utss/keeper/keeper.go @@ -0,0 +1,94 @@ +package keeper + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/codec" + + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "cosmossdk.io/collections" + storetypes "cosmossdk.io/core/store" + "cosmossdk.io/log" + "github.com/pushchain/push-chain-node/x/utss/types" +) + +type Keeper struct { + cdc codec.BinaryCodec + + logger log.Logger + schemaBuilder *collections.SchemaBuilder + + // state management + Params collections.Item[types.Params] + + // keepers + uregistryKeeper types.UregistryKeeper + + authority string +} + +// NewKeeper creates a new Keeper instance +func NewKeeper( + cdc codec.BinaryCodec, + storeService storetypes.KVStoreService, + logger log.Logger, + authority string, + uregistryKeeper types.UregistryKeeper, +) Keeper { + logger = logger.With(log.ModuleKey, "x/"+types.ModuleName) + + sb := collections.NewSchemaBuilder(storeService) + + if authority == "" { + authority = authtypes.NewModuleAddress(govtypes.ModuleName).String() + } + + k := Keeper{ + cdc: cdc, + logger: logger, + schemaBuilder: sb, + + Params: collections.NewItem(sb, types.ParamsKey, types.ParamsName, codec.CollValue[types.Params](cdc)), + + authority: authority, + uregistryKeeper: uregistryKeeper, + } + + return k +} + +func (k Keeper) Logger() log.Logger { + return k.logger +} + +// InitGenesis initializes the module's state from a genesis state. +func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error { + + if err := data.Params.Validate(); err != nil { + return err + } + + return k.Params.Set(ctx, data.Params) +} + +// ExportGenesis exports the module's state to a genesis state. +func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState { + params, err := k.Params.Get(ctx) + if err != nil { + panic(err) + } + + return &types.GenesisState{ + Params: params, + } +} + +func (k Keeper) SchemaBuilder() *collections.SchemaBuilder { + return k.schemaBuilder +} + +func (k Keeper) GetURegistryKeeper() types.UregistryKeeper { + return k.uregistryKeeper +} diff --git a/x/utss/keeper/keeper_test.go b/x/utss/keeper/keeper_test.go new file mode 100755 index 00000000..a2af73e9 --- /dev/null +++ b/x/utss/keeper/keeper_test.go @@ -0,0 +1,150 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + "cosmossdk.io/core/address" + "cosmossdk.io/log" + storetypes "cosmossdk.io/store/types" + + cmtproto "github.com/cometbft/cometbft/proto/tendermint/types" + sdkaddress "github.com/cosmos/cosmos-sdk/codec/address" + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/cosmos/cosmos-sdk/testutil/integration" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/pushchain/push-chain-node/app" + module "github.com/pushchain/push-chain-node/x/utss" + "github.com/pushchain/push-chain-node/x/utss/keeper" + "github.com/pushchain/push-chain-node/x/utss/types" + + uregistryKeeper "github.com/pushchain/push-chain-node/x/uregistry/keeper" +) + +var maccPerms = map[string][]string{ + authtypes.FeeCollectorName: nil, + stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, + stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, + minttypes.ModuleName: {authtypes.Minter}, + govtypes.ModuleName: {authtypes.Burner}, +} + +type testFixture struct { + suite.Suite + + ctx sdk.Context + k keeper.Keeper + msgServer types.MsgServer + queryServer types.QueryServer + appModule *module.AppModule + + accountkeeper authkeeper.AccountKeeper + bankkeeper bankkeeper.BaseKeeper + stakingKeeper *stakingkeeper.Keeper + mintkeeper mintkeeper.Keeper + + addrs []sdk.AccAddress + govModAddr string +} + +func SetupTest(t *testing.T) *testFixture { + t.Helper() + f := new(testFixture) + + cfg := sdk.GetConfig() // do not seal, more set later + cfg.SetBech32PrefixForAccount(app.Bech32PrefixAccAddr, app.Bech32PrefixAccPub) + cfg.SetBech32PrefixForValidator(app.Bech32PrefixValAddr, app.Bech32PrefixValPub) + cfg.SetBech32PrefixForConsensusNode(app.Bech32PrefixConsAddr, app.Bech32PrefixConsPub) + cfg.SetCoinType(app.CoinType) + + validatorAddressCodec := sdkaddress.NewBech32Codec(app.Bech32PrefixValAddr) + accountAddressCodec := sdkaddress.NewBech32Codec(app.Bech32PrefixAccAddr) + consensusAddressCodec := sdkaddress.NewBech32Codec(app.Bech32PrefixConsAddr) + + // Base setup + logger := log.NewTestLogger(t) + encCfg := moduletestutil.MakeTestEncodingConfig() + + f.govModAddr = authtypes.NewModuleAddress(govtypes.ModuleName).String() + f.addrs = simtestutil.CreateIncrementalAccounts(3) + + keys := storetypes.NewKVStoreKeys(authtypes.ModuleName, banktypes.ModuleName, stakingtypes.ModuleName, minttypes.ModuleName, types.ModuleName) + f.ctx = sdk.NewContext(integration.CreateMultiStore(keys, logger), cmtproto.Header{}, false, logger) + + // Register SDK modules. + registerBaseSDKModules(logger, f, encCfg, keys, accountAddressCodec, validatorAddressCodec, consensusAddressCodec) + + // Setup Keeper. + f.k = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(keys[types.ModuleName]), logger, f.govModAddr, &uregistryKeeper.Keeper{}) + f.msgServer = keeper.NewMsgServerImpl(f.k) + f.queryServer = keeper.NewQuerier(f.k) + f.appModule = module.NewAppModule(encCfg.Codec, f.k, &uregistryKeeper.Keeper{}) + + return f +} + +func registerModuleInterfaces(encCfg moduletestutil.TestEncodingConfig) { + authtypes.RegisterInterfaces(encCfg.InterfaceRegistry) + stakingtypes.RegisterInterfaces(encCfg.InterfaceRegistry) + banktypes.RegisterInterfaces(encCfg.InterfaceRegistry) + minttypes.RegisterInterfaces(encCfg.InterfaceRegistry) + + types.RegisterInterfaces(encCfg.InterfaceRegistry) +} + +func registerBaseSDKModules( + logger log.Logger, + f *testFixture, + encCfg moduletestutil.TestEncodingConfig, + keys map[string]*storetypes.KVStoreKey, + ac address.Codec, + validator address.Codec, + consensus address.Codec, +) { + registerModuleInterfaces(encCfg) + + // Auth Keeper. + f.accountkeeper = authkeeper.NewAccountKeeper( + encCfg.Codec, runtime.NewKVStoreService(keys[authtypes.StoreKey]), + authtypes.ProtoBaseAccount, + maccPerms, + ac, app.Bech32PrefixAccAddr, + f.govModAddr, + ) + + // Bank Keeper. + f.bankkeeper = bankkeeper.NewBaseKeeper( + encCfg.Codec, runtime.NewKVStoreService(keys[banktypes.StoreKey]), + f.accountkeeper, + nil, + f.govModAddr, logger, + ) + + // Staking Keeper. + f.stakingKeeper = stakingkeeper.NewKeeper( + encCfg.Codec, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), + f.accountkeeper, f.bankkeeper, f.govModAddr, + validator, + consensus, + ) + + // Mint Keeper. + f.mintkeeper = mintkeeper.NewKeeper( + encCfg.Codec, runtime.NewKVStoreService(keys[minttypes.StoreKey]), + f.stakingKeeper, f.accountkeeper, f.bankkeeper, + authtypes.FeeCollectorName, f.govModAddr, + ) +} diff --git a/x/utss/keeper/msg_server.go b/x/utss/keeper/msg_server.go new file mode 100755 index 00000000..06a7e0c6 --- /dev/null +++ b/x/utss/keeper/msg_server.go @@ -0,0 +1,29 @@ +package keeper + +import ( + "context" + + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "cosmossdk.io/errors" + "github.com/pushchain/push-chain-node/x/utss/types" +) + +type msgServer struct { + k Keeper +} + +var _ types.MsgServer = msgServer{} + +// NewMsgServerImpl returns an implementation of the module MsgServer interface. +func NewMsgServerImpl(keeper Keeper) types.MsgServer { + return &msgServer{k: keeper} +} + +func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + if ms.k.authority != msg.Authority { + return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority) + } + + return nil, ms.k.Params.Set(ctx, msg.Params) +} diff --git a/x/utss/keeper/msg_server_test.go b/x/utss/keeper/msg_server_test.go new file mode 100755 index 00000000..48f33fde --- /dev/null +++ b/x/utss/keeper/msg_server_test.go @@ -0,0 +1,56 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +func TestParams(t *testing.T) { + f := SetupTest(t) + require := require.New(t) + + testCases := []struct { + name string + request *types.MsgUpdateParams + err bool + }{ + { + name: "fail; invalid authority", + request: &types.MsgUpdateParams{ + Authority: f.addrs[0].String(), + Params: types.DefaultParams(), + }, + err: true, + }, + { + name: "success", + request: &types.MsgUpdateParams{ + Authority: f.govModAddr, + Params: types.DefaultParams(), + }, + err: false, + }, + } + + for _, tc := range testCases { + tc := tc + t.Run(tc.name, func(t *testing.T) { + _, err := f.msgServer.UpdateParams(f.ctx, tc.request) + + if tc.err { + require.Error(err) + } else { + require.NoError(err) + + r, err := f.queryServer.Params(f.ctx, &types.QueryParamsRequest{}) + require.NoError(err) + + require.EqualValues(&tc.request.Params, r.Params) + } + + }) + } +} diff --git a/x/utss/keeper/query_server.go b/x/utss/keeper/query_server.go new file mode 100755 index 00000000..103c83c3 --- /dev/null +++ b/x/utss/keeper/query_server.go @@ -0,0 +1,30 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +var _ types.QueryServer = Querier{} + +type Querier struct { + Keeper +} + +func NewQuerier(keeper Keeper) Querier { + return Querier{Keeper: keeper} +} + +func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + ctx := sdk.UnwrapSDKContext(c) + + p, err := k.Keeper.Params.Get(ctx) + if err != nil { + return nil, err + } + + return &types.QueryParamsResponse{Params: &p}, nil +} diff --git a/x/utss/module.go b/x/utss/module.go new file mode 100755 index 00000000..a868b4ba --- /dev/null +++ b/x/utss/module.go @@ -0,0 +1,153 @@ +package module + +import ( + "context" + "encoding/json" + + "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + + abci "github.com/cometbft/cometbft/abci/types" + + "cosmossdk.io/client/v2/autocli" + errorsmod "cosmossdk.io/errors" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + + "github.com/pushchain/push-chain-node/x/utss/keeper" + "github.com/pushchain/push-chain-node/x/utss/types" +) + +const ( + // ConsensusVersion defines the current x/utss module consensus version. + ConsensusVersion = 1 +) + +var ( + _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleGenesis = AppModule{} + _ module.AppModule = AppModule{} + + _ autocli.HasAutoCLIConfig = AppModule{} +) + +// AppModuleBasic defines the basic application module used by the wasm module. +type AppModuleBasic struct { + cdc codec.Codec +} + +type AppModule struct { + AppModuleBasic + + keeper keeper.Keeper + uregistryKeeper types.UregistryKeeper +} + +// NewAppModule constructor +func NewAppModule( + cdc codec.Codec, + keeper keeper.Keeper, + uregistryKeeper types.UregistryKeeper, +) *AppModule { + return &AppModule{ + AppModuleBasic: AppModuleBasic{cdc: cdc}, + keeper: keeper, + uregistryKeeper: uregistryKeeper, + } +} + +func (a AppModuleBasic) Name() string { + return types.ModuleName +} + +func (a AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(&types.GenesisState{ + Params: types.DefaultParams(), + }) +} + +func (a AppModuleBasic) ValidateGenesis(marshaler codec.JSONCodec, _ client.TxEncodingConfig, message json.RawMessage) error { + var data types.GenesisState + err := marshaler.UnmarshalJSON(message, &data) + if err != nil { + return err + } + if err := data.Params.Validate(); err != nil { + return errorsmod.Wrap(err, "params") + } + return nil +} + +func (a AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) { +} + +func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { + err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err != nil { + // same behavior as in cosmos-sdk + panic(err) + } +} + +// Disable in favor of autocli.go. If you wish to use these, it will override AutoCLI methods. +/* +func (a AppModuleBasic) GetTxCmd() *cobra.Command { + return cli.NewTxCmd() +} + +func (a AppModuleBasic) GetQueryCmd() *cobra.Command { + return cli.GetQueryCmd() +} +*/ + +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + types.RegisterLegacyAminoCodec(cdc) +} + +func (a AppModuleBasic) RegisterInterfaces(r codectypes.InterfaceRegistry) { + types.RegisterInterfaces(r) +} + +func (a AppModule) InitGenesis(ctx sdk.Context, marshaler codec.JSONCodec, message json.RawMessage) []abci.ValidatorUpdate { + var genesisState types.GenesisState + marshaler.MustUnmarshalJSON(message, &genesisState) + + if err := a.keeper.Params.Set(ctx, genesisState.Params); err != nil { + panic(err) + } + + if err := a.keeper.InitGenesis(ctx, &genesisState); err != nil { + panic(err) + } + + return nil +} + +func (a AppModule) ExportGenesis(ctx sdk.Context, marshaler codec.JSONCodec) json.RawMessage { + genState := a.keeper.ExportGenesis(ctx) + return marshaler.MustMarshalJSON(genState) +} + +func (a AppModule) RegisterInvariants(_ sdk.InvariantRegistry) { +} + +func (a AppModule) QuerierRoute() string { + return types.QuerierRoute +} + +func (a AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(a.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(a.keeper)) +} + +// ConsensusVersion is a sequence number for state-breaking change of the +// module. It should be incremented on each consensus-breaking change +// introduced by the module. To avoid wrong/empty versions, the initial version +// should be set to 1. +func (a AppModule) ConsensusVersion() uint64 { + return ConsensusVersion +} diff --git a/x/utss/types/codec.go b/x/utss/types/codec.go new file mode 100755 index 00000000..6d57a9e3 --- /dev/null +++ b/x/utss/types/codec.go @@ -0,0 +1,35 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +var ( + amino = codec.NewLegacyAmino() + AminoCdc = codec.NewAminoCodec(amino) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + sdk.RegisterLegacyAminoCodec(amino) +} + +// RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgUpdateParams{}, ModuleName+"/MsgUpdateParams", nil) +} + +func RegisterInterfaces(registry types.InterfaceRegistry) { + + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgUpdateParams{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/utss/types/events.go b/x/utss/types/events.go new file mode 100644 index 00000000..24ae013b --- /dev/null +++ b/x/utss/types/events.go @@ -0,0 +1,17 @@ +package types + +import "math/big" + +// EVMFundsAddedEventData represents decoded data from the `FundsAdded` EVM event. +type EVMFundsAddedEventData struct { + AmountInUSD *big.Int + Decimals uint32 + PayloadHash string +} + +// SVMFundsAddedEventData represents decoded FundsAdded event from Solana +type SVMFundsAddedEventData struct { + AmountInUSD *big.Int + Decimals uint32 + PayloadHash string // hex-encoded +} diff --git a/x/utss/types/expected_keepers.go b/x/utss/types/expected_keepers.go new file mode 100644 index 00000000..2d58bee3 --- /dev/null +++ b/x/utss/types/expected_keepers.go @@ -0,0 +1,12 @@ +package types + +import ( + "context" + + "github.com/pushchain/push-chain-node/x/uregistry/types" +) + +// UregistryKeeper defines the expected interface for the Uregistry module. +type UregistryKeeper interface { + GetChainConfig(ctx context.Context, chain string) (types.ChainConfig, error) +} diff --git a/x/utss/types/genesis.go b/x/utss/types/genesis.go new file mode 100755 index 00000000..97cad761 --- /dev/null +++ b/x/utss/types/genesis.go @@ -0,0 +1,19 @@ +package types + +// DefaultIndex is the default global index +const DefaultIndex uint64 = 1 + +// DefaultGenesis returns the default genesis state +func DefaultGenesis() *GenesisState { + return &GenesisState{ + + Params: DefaultParams(), + } +} + +// Validate performs basic genesis state validation returning an error upon any +// failure. +func (gs GenesisState) Validate() error { + + return gs.Params.Validate() +} diff --git a/x/utss/types/genesis.pb.go b/x/utss/types/genesis.pb.go new file mode 100644 index 00000000..13f7ea83 --- /dev/null +++ b/x/utss/types/genesis.pb.go @@ -0,0 +1,510 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: utss/v1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState defines the module genesis state +type GenesisState struct { + // Params defines all the parameters of the module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_340c354866cd9772, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// Params defines the set of module parameters. +type Params struct { + SomeValue bool `protobuf:"varint,2,opt,name=some_value,json=someValue,proto3" json:"some_value,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_340c354866cd9772, []int{1} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetSomeValue() bool { + if m != nil { + return m.SomeValue + } + return false +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "utss.v1.GenesisState") + proto.RegisterType((*Params)(nil), "utss.v1.Params") +} + +func init() { proto.RegisterFile("utss/v1/genesis.proto", fileDescriptor_340c354866cd9772) } + +var fileDescriptor_340c354866cd9772 = []byte{ + // 251 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0x2d, 0x29, 0x2e, + 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x62, 0x07, 0x09, 0xeb, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0xc5, + 0xf4, 0x41, 0x2c, 0x88, 0xb4, 0x94, 0x60, 0x62, 0x6e, 0x66, 0x5e, 0xbe, 0x3e, 0x98, 0x84, 0x08, + 0x29, 0xd9, 0x72, 0xf1, 0xb8, 0x43, 0x8c, 0x08, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0xd2, 0xe5, 0x62, + 0x2b, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0xe2, 0xd7, 0x83, + 0x1a, 0xa9, 0x17, 0x00, 0x16, 0x76, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xaa, 0x48, 0xc9, + 0x91, 0x8b, 0x0d, 0x22, 0x2e, 0x24, 0xcb, 0xc5, 0x55, 0x9c, 0x9f, 0x9b, 0x1a, 0x5f, 0x96, 0x98, + 0x53, 0x9a, 0x2a, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x11, 0xc4, 0x09, 0x12, 0x09, 0x03, 0x09, 0x58, + 0x49, 0xcc, 0x58, 0x20, 0xcf, 0xf0, 0x62, 0x81, 0x3c, 0x63, 0xd7, 0xf3, 0x0d, 0x5a, 0xdc, 0x60, + 0xd7, 0x43, 0x8c, 0x70, 0xf2, 0x3e, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, + 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, + 0xc3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x82, 0xd2, 0xe2, 0x8c, + 0xe4, 0x8c, 0xc4, 0xcc, 0x3c, 0x30, 0x4b, 0x17, 0xcc, 0xd4, 0xcd, 0xcb, 0x4f, 0x49, 0xd5, 0xaf, + 0xd0, 0x07, 0x9b, 0x56, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0xf6, 0x95, 0x31, 0x20, 0x00, + 0x00, 0xff, 0xff, 0x69, 0x73, 0x3a, 0xe5, 0x20, 0x01, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.SomeValue != that1.SomeValue { + return false + } + return true +} +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SomeValue { + i-- + if m.SomeValue { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SomeValue { + n += 2 + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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 ErrIntOverflowGenesis + } + 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Params) 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 ErrIntOverflowGenesis + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SomeValue", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SomeValue = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/utss/types/genesis_test.go b/x/utss/types/genesis_test.go new file mode 100755 index 00000000..11f19ac4 --- /dev/null +++ b/x/utss/types/genesis_test.go @@ -0,0 +1,38 @@ +package types_test + +import ( + "testing" + + "github.com/pushchain/push-chain-node/x/utss/types" + + "github.com/stretchr/testify/require" +) + +func TestGenesisState_Validate(t *testing.T) { + tests := []struct { + desc string + genState *types.GenesisState + valid bool + }{ + { + desc: "default is valid", + genState: types.DefaultGenesis(), + valid: true, + }, + { + desc: "valid genesis state", + genState: &types.GenesisState{}, + valid: true, + }, + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + err := tc.genState.Validate() + if tc.valid { + require.NoError(t, err) + } else { + require.Error(t, err) + } + }) + } +} diff --git a/x/utss/types/keys.go b/x/utss/types/keys.go new file mode 100755 index 00000000..d0f91292 --- /dev/null +++ b/x/utss/types/keys.go @@ -0,0 +1,21 @@ +package types + +import ( + "cosmossdk.io/collections" +) + +var ( + // ParamsKey saves the current module params. + ParamsKey = collections.NewPrefix(0) + + // ParamsName is the name of the params collection. + ParamsName = "params" +) + +const ( + ModuleName = "utss" + + StoreKey = ModuleName + + QuerierRoute = ModuleName +) diff --git a/x/utss/types/msgs.go b/x/utss/types/msgs.go new file mode 100755 index 00000000..e93e95b0 --- /dev/null +++ b/x/utss/types/msgs.go @@ -0,0 +1,49 @@ +package types + +import ( + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var ( + _ sdk.Msg = &MsgUpdateParams{} +) + +// NewMsgUpdateParams creates new instance of MsgUpdateParams +func NewMsgUpdateParams( + sender sdk.Address, + someValue bool, +) *MsgUpdateParams { + return &MsgUpdateParams{ + Authority: sender.String(), + Params: Params{ + SomeValue: someValue, + }, + } +} + +// Route returns the name of the module +func (msg MsgUpdateParams) Route() string { return ModuleName } + +// Type returns the action +func (msg MsgUpdateParams) Type() string { return "update_params" } + +// GetSignBytes implements the LegacyMsg interface. +func (msg MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) +} + +// GetSigners returns the expected signers for a MsgUpdateParams message. +func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Authority) + return []sdk.AccAddress{addr} +} + +// ValidateBasic does a sanity check on the provided data. +func (msg *MsgUpdateParams) Validate() error { + if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { + return errors.Wrap(err, "invalid authority address") + } + + return msg.Params.Validate() +} diff --git a/x/utss/types/params.go b/x/utss/types/params.go new file mode 100755 index 00000000..d9be77ae --- /dev/null +++ b/x/utss/types/params.go @@ -0,0 +1,29 @@ +package types + +import ( + "encoding/json" +) + +// DefaultParams returns default module parameters. +func DefaultParams() Params { + // TODO: + return Params{ + SomeValue: true, + } +} + +// Stringer method for Params. +func (p Params) String() string { + bz, err := json.Marshal(p) + if err != nil { + panic(err) + } + + return string(bz) +} + +// Validate does the sanity check on the params. +func (p Params) Validate() error { + // TODO: + return nil +} diff --git a/x/utss/types/query.pb.go b/x/utss/types/query.pb.go new file mode 100644 index 00000000..268fdfa9 --- /dev/null +++ b/x/utss/types/query.pb.go @@ -0,0 +1,540 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: utss/v1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{0} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type QueryParamsResponse struct { + // params defines the parameters of the module. + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{1} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "utss.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "utss.v1.QueryParamsResponse") +} + +func init() { proto.RegisterFile("utss/v1/query.proto", fileDescriptor_2af2863e9a096df1) } + +var fileDescriptor_2af2863e9a096df1 = []byte{ + // 258 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2e, 0x2d, 0x29, 0x2e, + 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, + 0x62, 0x07, 0x09, 0xea, 0x95, 0x19, 0x4a, 0xc9, 0xa4, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, 0xea, 0x27, + 0x16, 0x64, 0xea, 0x27, 0xe6, 0xe5, 0xe5, 0x97, 0x24, 0x96, 0x64, 0xe6, 0xe7, 0x15, 0x43, 0x94, + 0x49, 0x89, 0xc2, 0xf4, 0xa6, 0xa7, 0xe6, 0xa5, 0x16, 0x67, 0x42, 0x85, 0x95, 0x44, 0xb8, 0x84, + 0x02, 0x41, 0x86, 0x05, 0x24, 0x16, 0x25, 0xe6, 0x16, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, + 0x28, 0xd9, 0x71, 0x09, 0xa3, 0x88, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x0a, 0xa9, 0x73, 0xb1, + 0x15, 0x80, 0x45, 0x24, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0xf8, 0xf5, 0xa0, 0x76, 0xeb, 0x41, + 0x15, 0x42, 0xa5, 0x8d, 0x52, 0xb9, 0x58, 0xc1, 0xfa, 0x85, 0x62, 0xb8, 0xd8, 0x20, 0x52, 0x42, + 0xd2, 0x70, 0xb5, 0x98, 0xf6, 0x49, 0xc9, 0x60, 0x97, 0x84, 0x58, 0xab, 0x24, 0xde, 0x74, 0xf9, + 0xc9, 0x64, 0x26, 0x41, 0x21, 0x7e, 0x7d, 0x98, 0x1f, 0x20, 0xd6, 0x38, 0x79, 0x9f, 0x78, 0x24, + 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, + 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x61, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, + 0x72, 0x7e, 0xae, 0x7e, 0x41, 0x69, 0x71, 0x46, 0x72, 0x46, 0x62, 0x66, 0x1e, 0x98, 0xa5, 0x0b, + 0x66, 0xea, 0xe6, 0xe5, 0xa7, 0xa4, 0xea, 0x57, 0x40, 0x0c, 0x2c, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, + 0x62, 0x03, 0x07, 0x88, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xf3, 0xb3, 0x09, 0xd9, 0x65, 0x01, + 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Params queries all parameters of the module. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Params queries all parameters of the module. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "utss.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "utss/v1/query.proto", +} + +func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) 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 ErrIntOverflowQuery + } + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) 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 ErrIntOverflowQuery + } + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/utss/types/query.pb.gw.go b/x/utss/types/query.pb.gw.go new file mode 100644 index 00000000..d003c7c8 --- /dev/null +++ b/x/utss/types/query.pb.gw.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: utss/v1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"utss", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/utss/types/tx.pb.go b/x/utss/types/tx.pb.go new file mode 100644 index 00000000..39872450 --- /dev/null +++ b/x/utss/types/tx.pb.go @@ -0,0 +1,602 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: utss/v1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{0} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.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 *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{1} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgUpdateParams)(nil), "utss.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "utss.v1.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("utss/v1/tx.proto", fileDescriptor_4dcb8cba4d8073e4) } + +var fileDescriptor_4dcb8cba4d8073e4 = []byte{ + // 325 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x28, 0x2d, 0x29, 0x2e, + 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x07, 0x89, + 0xe8, 0x95, 0x19, 0x4a, 0x89, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xeb, 0xe7, 0x16, 0xa7, 0x83, + 0x14, 0xe4, 0x16, 0xa7, 0x43, 0x54, 0x48, 0x89, 0xc2, 0xf4, 0xa4, 0xa7, 0xe6, 0xa5, 0x16, 0x67, + 0x16, 0x43, 0x85, 0x45, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x4c, 0x7d, 0x10, 0x0b, 0x2a, 0x2a, 0x09, + 0x31, 0x25, 0x1e, 0x22, 0x01, 0xe1, 0x40, 0xa4, 0x94, 0x3a, 0x18, 0xb9, 0xf8, 0x7d, 0x8b, 0xd3, + 0x43, 0x0b, 0x52, 0x12, 0x4b, 0x52, 0x03, 0x12, 0x8b, 0x12, 0x73, 0x8b, 0x85, 0xcc, 0xb8, 0x38, + 0x13, 0x4b, 0x4b, 0x32, 0xf2, 0x8b, 0x32, 0x4b, 0x2a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x9d, + 0x24, 0x2e, 0x6d, 0xd1, 0x15, 0x81, 0x6a, 0x74, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x0e, 0x2e, + 0x29, 0xca, 0xcc, 0x4b, 0x0f, 0x42, 0x28, 0x15, 0xd2, 0xe5, 0x62, 0x2b, 0x00, 0x9b, 0x20, 0xc1, + 0xa4, 0xc0, 0xa8, 0xc1, 0x6d, 0xc4, 0xaf, 0x07, 0xf5, 0x86, 0x1e, 0xc4, 0x60, 0x27, 0x96, 0x13, + 0xf7, 0xe4, 0x19, 0x82, 0xa0, 0x8a, 0xac, 0xf8, 0x9a, 0x9e, 0x6f, 0xd0, 0x42, 0x68, 0x57, 0x92, + 0xe4, 0x12, 0x47, 0x73, 0x49, 0x50, 0x6a, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x51, 0x04, 0x17, + 0xb3, 0x6f, 0x71, 0xba, 0x90, 0x17, 0x17, 0x0f, 0x8a, 0x43, 0x25, 0xe0, 0x16, 0xa0, 0x69, 0x94, + 0x52, 0xc0, 0x25, 0x03, 0x33, 0x52, 0x8a, 0xb5, 0xe1, 0xf9, 0x06, 0x2d, 0x46, 0x27, 0xef, 0x13, + 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, + 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, + 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x28, 0x2d, 0xce, 0x48, 0xce, 0x48, 0xcc, 0xcc, 0x03, 0xb3, + 0x74, 0xc1, 0x4c, 0xdd, 0xbc, 0xfc, 0x94, 0x54, 0xfd, 0x0a, 0x7d, 0x70, 0x44, 0x94, 0x54, 0x16, + 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xc3, 0xd4, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x10, 0x88, + 0xdc, 0xd1, 0x01, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // UpdateParams defines a governance operation for updating the parameters. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // UpdateParams defines a governance operation for updating the parameters. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "utss.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "utss/v1/tx.proto", +} + +func (m *MsgUpdateParams) 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 *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgUpdateParams) 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: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/uvalidator/keeper/hooks.go b/x/uvalidator/keeper/hooks.go index 8322f76c..173cf730 100644 --- a/x/uvalidator/keeper/hooks.go +++ b/x/uvalidator/keeper/hooks.go @@ -5,24 +5,11 @@ import ( "github.com/pushchain/push-chain-node/x/uvalidator/types" ) -// UValidatorHooks defines the interface that external modules can implement -// to react to uvalidator lifecycle events. -type UValidatorHooks interface { - // Triggered when a validator enters PENDING_JOIN (newly added or rejoining) - AfterValidatorAdded(ctx sdk.Context, valAddr sdk.ValAddress) - - // Triggered when a validator enters PENDING_LEAVE status (starting removal) - AfterValidatorRemoved(ctx sdk.Context, valAddr sdk.ValAddress) - - // Triggered whenever a validator's status changes between any two valid states - AfterValidatorStatusChanged(ctx sdk.Context, valAddr sdk.ValAddress, oldStatus, newStatus types.UVStatus) -} - // MultiUValidatorHooks allows multiple modules to listen to the same events. -type MultiUValidatorHooks []UValidatorHooks +type MultiUValidatorHooks []types.UValidatorHooks // NewMultiUValidatorHooks creates a new combined hook instance. -func NewMultiUValidatorHooks(hooks ...UValidatorHooks) MultiUValidatorHooks { +func NewMultiUValidatorHooks(hooks ...types.UValidatorHooks) MultiUValidatorHooks { return hooks } diff --git a/x/uvalidator/types/hooks.go b/x/uvalidator/types/hooks.go new file mode 100644 index 00000000..041a9f3a --- /dev/null +++ b/x/uvalidator/types/hooks.go @@ -0,0 +1,16 @@ +package types + +import sdk "github.com/cosmos/cosmos-sdk/types" + +// UValidatorHooks defines the interface that external modules can implement +// to react to uvalidator lifecycle events. +type UValidatorHooks interface { + // Triggered when a validator enters PENDING_JOIN (newly added or rejoining) + AfterValidatorAdded(ctx sdk.Context, valAddr sdk.ValAddress) + + // Triggered when a validator enters PENDING_LEAVE status (starting removal) + AfterValidatorRemoved(ctx sdk.Context, valAddr sdk.ValAddress) + + // Triggered whenever a validator's status changes between any two valid states + AfterValidatorStatusChanged(ctx sdk.Context, valAddr sdk.ValAddress, oldStatus, newStatus UVStatus) +} From 93c61bf9655ec4c4dfbe5da33462278e9a76cff7 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 10:54:19 +0530 Subject: [PATCH 039/105] refactor: added uvalidator hook impl in utss --- x/utss/keeper/hooks.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 x/utss/keeper/hooks.go diff --git a/x/utss/keeper/hooks.go b/x/utss/keeper/hooks.go new file mode 100644 index 00000000..f2c83fa3 --- /dev/null +++ b/x/utss/keeper/hooks.go @@ -0,0 +1,33 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +var _ uvalidatortypes.UValidatorHooks = Hooks{} + +type Hooks struct { + k Keeper +} + +func (k Keeper) Hooks() Hooks { return Hooks{k} } + +func (h Hooks) AfterValidatorAdded(ctx sdk.Context, valAddr sdk.ValAddress) { + // Example: trigger new TSS participation setup + h.k.Logger().Info("TSS Hook: Universal validator added", "address", valAddr.String()) + + // you can enqueue this validator for keygen participation here +} + +func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, valAddr sdk.ValAddress) { + h.k.Logger().Info("TSS Hook: Universal validator removed", "address", valAddr.String()) + + // maybe mark as inactive in current TSS session +} + +func (h Hooks) AfterValidatorStatusChanged(ctx sdk.Context, valAddr sdk.ValAddress, oldStatus, newStatus uvalidatortypes.UVStatus) { + h.k.Logger().Info("TSS Hook: Universal validator status changed", "address", oldStatus, newStatus) + + // maybe mark as inactive in current TSS session +} From 388fcbe9a9ec1f0b09491b9e05a2e13374a4b1fe Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:08:37 +0530 Subject: [PATCH 040/105] feat: added tssKey messages in proto --- proto/utss/v1/types.proto | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 proto/utss/v1/types.proto diff --git a/proto/utss/v1/types.proto b/proto/utss/v1/types.proto new file mode 100644 index 00000000..19bafb90 --- /dev/null +++ b/proto/utss/v1/types.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; +package utss.v1; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/msg/v1/msg.proto"; +import "gogoproto/gogo.proto"; +import "amino/amino.proto"; + +option go_package = "github.com/pushchain/push-chain-node/x/utss/types"; + +message Params { + option (amino.name) = "utss/params"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // The admin account of the utss module. + string admin = 1; +} + +enum TssKeyProcessStatus { + TSS_KEY_PROCESS_PENDING = 0; + TSS_KEY_PROCESS_SUCCESS = 1; + TSS_KEY_PROCESS_FAILED = 2; +} + +enum TssProcessType { + TSS_PROCESS_KEYGEN = 0; + TSS_PROCESS_RESHARE = 1; +} + +// TSS key process information +message TssKeyProcess { + option (amino.name) = "utss/tss_key_process"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + TssKeyProcessStatus status = 1; + repeated string participants = 2; + int64 block_height = 3; + int64 expiry_height = 4; + TssProcessType process_type = 5; + uint64 id = 6; // process id +} + +// Finalized TSS key details +message TssKey { + option (amino.name) = "utss/tss_key"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string tss_pubkey = 1; + string key_id = 2; + repeated string participants = 3; + int64 finalized_block_height = 4; + int64 keygen_block_height = 5; + uint64 process_id = 6; +} From 602bcaff5672080d41f0abc8ca78f6f0839e5ad8 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:09:15 +0530 Subject: [PATCH 041/105] refactor: added msg for tss process initiation and voting --- proto/utss/v1/genesis.proto | 10 +--------- proto/utss/v1/query.proto | 1 + proto/utss/v1/tx.proto | 24 ++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/proto/utss/v1/genesis.proto b/proto/utss/v1/genesis.proto index 7cdec8aa..bdbba98a 100755 --- a/proto/utss/v1/genesis.proto +++ b/proto/utss/v1/genesis.proto @@ -3,6 +3,7 @@ package utss.v1; import "gogoproto/gogo.proto"; import "amino/amino.proto"; +import "utss/v1/types.proto"; option go_package = "github.com/pushchain/push-chain-node/x/utss/types"; @@ -11,12 +12,3 @@ message GenesisState { // Params defines all the parameters of the module. Params params = 1 [(gogoproto.nullable) = false]; } - -// Params defines the set of module parameters. -message Params { - option (amino.name) = "utss/params"; - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - bool some_value = 2; -} \ No newline at end of file diff --git a/proto/utss/v1/query.proto b/proto/utss/v1/query.proto index 2ded9233..55233cee 100755 --- a/proto/utss/v1/query.proto +++ b/proto/utss/v1/query.proto @@ -3,6 +3,7 @@ package utss.v1; import "google/api/annotations.proto"; import "utss/v1/genesis.proto"; +import "utss/v1/types.proto"; option go_package = "github.com/pushchain/push-chain-node/x/utss/types"; diff --git a/proto/utss/v1/tx.proto b/proto/utss/v1/tx.proto index 8696f5d9..d5ee620d 100755 --- a/proto/utss/v1/tx.proto +++ b/proto/utss/v1/tx.proto @@ -3,8 +3,10 @@ package utss.v1; import "cosmos/msg/v1/msg.proto"; import "utss/v1/genesis.proto"; +import "utss/v1/types.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; +import "amino/amino.proto"; option go_package = "github.com/pushchain/push-chain-node/x/utss/types"; @@ -38,3 +40,25 @@ message MsgUpdateParams { // // Since: cosmos-sdk 0.47 message MsgUpdateParamsResponse {} + + +// Admin initiates new keygen/reshare process +message MsgInitiateTssKeyProcess { + option (amino.name) = "utss/MsgVoteInitiateKeyProcess"; + option (cosmos.msg.v1.signer) = "signer"; + + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + TssProcessType process_type = 2; + uint64 expiry_height = 3; +} + +// Universal validator votes on an ongoing TSS key process +message MsgVoteTssKeyProcess { + option (amino.name) = "utss/MsgVoteTssKeyProcess"; + option (cosmos.msg.v1.signer) = "signer"; + + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; ; // universal validator address + uint64 process_id = 2; // id of the process + string tss_pubkey = 3; + string key_id = 4; +} From a355c18e9df57e3274791b764b332ed70ab1af14 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:09:49 +0530 Subject: [PATCH 042/105] refactor: imported uvalidator module in utss module --- x/utss/depinject.go | 10 +++++----- x/utss/keeper/keeper.go | 34 ++++++++++++++++++++++---------- x/utss/keeper/keeper_test.go | 6 +++--- x/utss/module.go | 14 ++++++------- x/utss/types/expected_keepers.go | 24 ++++++++++++++++++---- 5 files changed, 59 insertions(+), 29 deletions(-) diff --git a/x/utss/depinject.go b/x/utss/depinject.go index 9d03059e..542c9db5 100755 --- a/x/utss/depinject.go +++ b/x/utss/depinject.go @@ -43,9 +43,9 @@ type ModuleInputs struct { StoreService store.KVStoreService AddressCodec address.Codec - StakingKeeper stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - UregistryKeeper types.UregistryKeeper + StakingKeeper stakingkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + UValidatorKeeper types.UValidatorKeeper } type ModuleOutputs struct { @@ -58,8 +58,8 @@ type ModuleOutputs struct { func ProvideModule(in ModuleInputs) ModuleOutputs { govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() - k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr, in.UregistryKeeper) - m := NewAppModule(in.Cdc, k, in.UregistryKeeper) + k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr, in.UValidatorKeeper) + m := NewAppModule(in.Cdc, k, in.UValidatorKeeper) return ModuleOutputs{Module: m, Keeper: k, Out: depinject.Out{}} } diff --git a/x/utss/keeper/keeper.go b/x/utss/keeper/keeper.go index 12e96830..4c115f97 100755 --- a/x/utss/keeper/keeper.go +++ b/x/utss/keeper/keeper.go @@ -20,11 +20,18 @@ type Keeper struct { logger log.Logger schemaBuilder *collections.SchemaBuilder - // state management - Params collections.Item[types.Params] + // Module State + Params collections.Item[types.Params] // module params + NextProcessId collections.Sequence // counter for next process id + CurrentTssProcess collections.Item[types.TssKeyProcess] // current/active process + ProcessHistory collections.Map[uint64, types.TssKeyProcess] // history of past processes + + // TSS Key Storage + CurrentTssKey collections.Item[types.TssKey] // currently active finalized key + TssKeyHistory collections.Map[string, types.TssKey] // map of key_id → TssKey // keepers - uregistryKeeper types.UregistryKeeper + uvalidatorKeeper types.UValidatorKeeper authority string } @@ -35,7 +42,7 @@ func NewKeeper( storeService storetypes.KVStoreService, logger log.Logger, authority string, - uregistryKeeper types.UregistryKeeper, + uvalidatorKeeper types.UValidatorKeeper, ) Keeper { logger = logger.With(log.ModuleKey, "x/"+types.ModuleName) @@ -50,10 +57,17 @@ func NewKeeper( logger: logger, schemaBuilder: sb, - Params: collections.NewItem(sb, types.ParamsKey, types.ParamsName, codec.CollValue[types.Params](cdc)), + Params: collections.NewItem(sb, types.ParamsKey, types.ParamsName, codec.CollValue[types.Params](cdc)), + NextProcessId: collections.NewSequence(sb, types.NextProcessIdKey, "next_process_id"), + CurrentTssProcess: collections.NewItem(sb, types.CurrentTssProcessKey, "current_tss_process", codec.CollValue[types.TssKeyProcess](cdc)), + ProcessHistory: collections.NewMap(sb, types.ProcessHistoryKey, "process_history", collections.Uint64Key, codec.CollValue[types.TssKeyProcess](cdc)), + + // TSS key storage + CurrentTssKey: collections.NewItem(sb, types.CurrentTssKeyKeyPrefix, "current_tss_key", codec.CollValue[types.TssKey](cdc)), + TssKeyHistory: collections.NewMap(sb, types.TssKeyHistoryKey, "tss_key_history", collections.StringKey, codec.CollValue[types.TssKey](cdc)), - authority: authority, - uregistryKeeper: uregistryKeeper, + authority: authority, + uvalidatorKeeper: uvalidatorKeeper, } return k @@ -66,7 +80,7 @@ func (k Keeper) Logger() log.Logger { // InitGenesis initializes the module's state from a genesis state. func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error { - if err := data.Params.Validate(); err != nil { + if err := data.Params.ValidateBasic(); err != nil { return err } @@ -89,6 +103,6 @@ func (k Keeper) SchemaBuilder() *collections.SchemaBuilder { return k.schemaBuilder } -func (k Keeper) GetURegistryKeeper() types.UregistryKeeper { - return k.uregistryKeeper +func (k Keeper) GetUValidatorKeeper() types.UValidatorKeeper { + return k.uvalidatorKeeper } diff --git a/x/utss/keeper/keeper_test.go b/x/utss/keeper/keeper_test.go index a2af73e9..8ab7d736 100755 --- a/x/utss/keeper/keeper_test.go +++ b/x/utss/keeper/keeper_test.go @@ -31,7 +31,7 @@ import ( "github.com/pushchain/push-chain-node/x/utss/keeper" "github.com/pushchain/push-chain-node/x/utss/types" - uregistryKeeper "github.com/pushchain/push-chain-node/x/uregistry/keeper" + uvalidatorKeeper "github.com/pushchain/push-chain-node/x/uvalidator/keeper" ) var maccPerms = map[string][]string{ @@ -88,10 +88,10 @@ func SetupTest(t *testing.T) *testFixture { registerBaseSDKModules(logger, f, encCfg, keys, accountAddressCodec, validatorAddressCodec, consensusAddressCodec) // Setup Keeper. - f.k = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(keys[types.ModuleName]), logger, f.govModAddr, &uregistryKeeper.Keeper{}) + f.k = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(keys[types.ModuleName]), logger, f.govModAddr, &uvalidatorKeeper.Keeper{}) f.msgServer = keeper.NewMsgServerImpl(f.k) f.queryServer = keeper.NewQuerier(f.k) - f.appModule = module.NewAppModule(encCfg.Codec, f.k, &uregistryKeeper.Keeper{}) + f.appModule = module.NewAppModule(encCfg.Codec, f.k, &uvalidatorKeeper.Keeper{}) return f } diff --git a/x/utss/module.go b/x/utss/module.go index a868b4ba..caee793b 100755 --- a/x/utss/module.go +++ b/x/utss/module.go @@ -43,20 +43,20 @@ type AppModuleBasic struct { type AppModule struct { AppModuleBasic - keeper keeper.Keeper - uregistryKeeper types.UregistryKeeper + keeper keeper.Keeper + uvalidatorKeeper types.UValidatorKeeper } // NewAppModule constructor func NewAppModule( cdc codec.Codec, keeper keeper.Keeper, - uregistryKeeper types.UregistryKeeper, + uvalidatorKeeper types.UValidatorKeeper, ) *AppModule { return &AppModule{ - AppModuleBasic: AppModuleBasic{cdc: cdc}, - keeper: keeper, - uregistryKeeper: uregistryKeeper, + AppModuleBasic: AppModuleBasic{cdc: cdc}, + keeper: keeper, + uvalidatorKeeper: uvalidatorKeeper, } } @@ -76,7 +76,7 @@ func (a AppModuleBasic) ValidateGenesis(marshaler codec.JSONCodec, _ client.TxEn if err != nil { return err } - if err := data.Params.Validate(); err != nil { + if err := data.Params.ValidateBasic(); err != nil { return errorsmod.Wrap(err, "params") } return nil diff --git a/x/utss/types/expected_keepers.go b/x/utss/types/expected_keepers.go index 2d58bee3..d1efc302 100644 --- a/x/utss/types/expected_keepers.go +++ b/x/utss/types/expected_keepers.go @@ -3,10 +3,26 @@ package types import ( "context" - "github.com/pushchain/push-chain-node/x/uregistry/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" ) -// UregistryKeeper defines the expected interface for the Uregistry module. -type UregistryKeeper interface { - GetChainConfig(ctx context.Context, chain string) (types.ChainConfig, error) +// Uvalidator keeper +type UValidatorKeeper interface { + IsTombstonedUniversalValidator(ctx context.Context, universalValidator string) (bool, error) + IsBondedUniversalValidator(ctx context.Context, universalValidator string) (bool, error) + VoteOnBallot( + ctx context.Context, + id string, + ballotType uvalidatortypes.BallotObservationType, + voter string, + voteResult uvalidatortypes.VoteResult, + voters []string, + votesNeeded int64, + expiryAfterBlocks int64, + ) ( + ballot uvalidatortypes.Ballot, + isFinalized bool, + isNew bool, + err error) + GetEligibleVoters(ctx context.Context) ([]uvalidatortypes.UniversalValidator, error) } From 509f10c155e155ab252dd9b9e1c8491c79a4301b Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:10:11 +0530 Subject: [PATCH 043/105] refactor: added types of msg_update_params --- x/utss/types/msg_update_params.go | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 x/utss/types/msg_update_params.go diff --git a/x/utss/types/msg_update_params.go b/x/utss/types/msg_update_params.go new file mode 100755 index 00000000..d250bd28 --- /dev/null +++ b/x/utss/types/msg_update_params.go @@ -0,0 +1,56 @@ +package types + +import ( + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/pushchain/push-chain-node/utils" +) + +var ( + _ sdk.Msg = &MsgUpdateParams{} +) + +// NewMsgUpdateParams creates new instance of MsgUpdateParams +func NewMsgUpdateParams( + sender sdk.Address, + admin sdk.Address, +) *MsgUpdateParams { + return &MsgUpdateParams{ + Authority: sender.String(), + Params: Params{ + Admin: admin.String(), + }, + } +} + +// Route returns the name of the module +func (msg MsgUpdateParams) Route() string { return ModuleName } + +// Type returns the action +func (msg MsgUpdateParams) Type() string { return "update_params" } + +// GetSignBytes implements the LegacyMsg interface. +func (msg MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) +} + +// GetSigners returns the expected signers for a MsgUpdateParams message. +func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Authority) + return []sdk.AccAddress{addr} +} + +// ValidateBasic does a sanity check on the provided data. +func (msg *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { + return errors.Wrap(err, "invalid authority address") + } + + isValidAdmin := utils.IsValidAddress(msg.Params.Admin, utils.COSMOS) + if !isValidAdmin { + return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid admin address: %s", msg.Params.Admin) + } + + return msg.Params.ValidateBasic() +} From e14978e3f49f65e8e424382a92079f575bd578d8 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:10:26 +0530 Subject: [PATCH 044/105] refactor: added msg_update_params types tests --- x/utss/types/msg_update_params_test.go | 78 ++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 x/utss/types/msg_update_params_test.go diff --git a/x/utss/types/msg_update_params_test.go b/x/utss/types/msg_update_params_test.go new file mode 100644 index 00000000..71efc556 --- /dev/null +++ b/x/utss/types/msg_update_params_test.go @@ -0,0 +1,78 @@ +package types_test + +import ( + "testing" + + "github.com/pushchain/push-chain-node/x/utss/types" + "github.com/stretchr/testify/require" +) + +func TestMsgUpdateParams_ValidateBasic(t *testing.T) { + validBech32 := "push1fgaewhyd9fkwtqaj9c233letwcuey6dgly9gv9" + + tests := []struct { + name string + msg types.MsgUpdateParams + wantErr bool + errMsg string + }{ + { + name: "valid message", + msg: types.MsgUpdateParams{ + Authority: validBech32, + Params: types.Params{ + Admin: validBech32, + }, + }, + wantErr: false, + }, + { + name: "invalid authority address", + msg: types.MsgUpdateParams{ + Authority: "invalid_bech32", + Params: types.Params{ + Admin: validBech32, + }, + }, + wantErr: true, + errMsg: "invalid authority address", + }, + { + name: "invalid admin address", + msg: types.MsgUpdateParams{ + Authority: validBech32, + Params: types.Params{ + Admin: "not_cosmos_address", + }, + }, + wantErr: true, + errMsg: "invalid admin address", + }, + { + name: "empty admin address", + msg: types.MsgUpdateParams{ + Authority: validBech32, + Params: types.Params{ + Admin: "", + }, + }, + wantErr: true, + errMsg: "invalid admin address", + }, + } + + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + err := tc.msg.ValidateBasic() + + if tc.wantErr { + require.Error(t, err) + if tc.errMsg != "" { + require.Contains(t, err.Error(), tc.errMsg) + } + } else { + require.NoError(t, err) + } + }) + } +} From 03e9c9a6b0953246df21de4a62d6b11d6ad42c02 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:10:33 +0530 Subject: [PATCH 045/105] refactor: added types of tss_process --- x/utss/keeper/tss_key_process.go | 90 ++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 x/utss/keeper/tss_key_process.go diff --git a/x/utss/keeper/tss_key_process.go b/x/utss/keeper/tss_key_process.go new file mode 100644 index 00000000..8ff3e12a --- /dev/null +++ b/x/utss/keeper/tss_key_process.go @@ -0,0 +1,90 @@ +package keeper + +import ( + "context" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// InitiateTssKeyProcess creates a new keygen or reshare process. +func (k Keeper) InitiateTssKeyProcess( + ctx context.Context, + processType types.TssProcessType, + expiryHeight int64, + participants []string, +) (types.TssKeyProcess, error) { + + sdkCtx := sdk.UnwrapSDKContext(ctx) + + // Check if a current process exists and is still active (not expired and pending) + existing, err := k.CurrentTssProcess.Get(ctx) + if err == nil { + if sdkCtx.BlockHeight() < existing.ExpiryHeight && + existing.Status == types.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING { + return types.TssKeyProcess{}, fmt.Errorf("an active TSS process already exists (id: %d)", existing.Id) + } + } + + // Generate new process ID + processID, err := k.NextProcessId.Next(ctx) + if err != nil { + return types.TssKeyProcess{}, fmt.Errorf("failed to generate process id: %w", err) + } + + // Create a new process + process := types.TssKeyProcess{ + Status: types.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING, + Participants: participants, + BlockHeight: sdkCtx.BlockHeight(), + ExpiryHeight: expiryHeight, + ProcessType: processType, + Id: processID, + } + + if err := process.ValidateBasic(); err != nil { + return types.TssKeyProcess{}, fmt.Errorf("invalid tss process: %w", err) + } + + // Store as current + if err := k.CurrentTssProcess.Set(ctx, process); err != nil { + return types.TssKeyProcess{}, fmt.Errorf("failed to set current process: %w", err) + } + + // Add to history + if err := k.ProcessHistory.Set(ctx, process.Id, process); err != nil { + return types.TssKeyProcess{}, fmt.Errorf("failed to store process history: %w", err) + } + + k.Logger().Info("🚀 New TSS process initiated", + "id", process.Id, + "type", process.ProcessType, + "participants", len(participants), + ) + + return process, nil +} + +// FinalizeTssKeyProcess updates a process status and removes it from current if completed. +func (k Keeper) FinalizeTssKeyProcess(ctx context.Context, processID uint64, status types.TssKeyProcessStatus) error { + process, err := k.ProcessHistory.Get(ctx, processID) + if err != nil { + return fmt.Errorf("tss process %d not found: %w", processID, err) + } + + process.Status = status + if err := k.ProcessHistory.Set(ctx, processID, process); err != nil { + return fmt.Errorf("failed to update process: %w", err) + } + + if status != types.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING { + if err := k.CurrentTssProcess.Remove(ctx); err != nil { + k.Logger().Error("failed to clear current process", "err", err) + } + } + + k.Logger().Info("✅ TSS process finalized", "id", processID, "status", status.String()) + return nil +} From a54187547fafe381a0f8ce175277aedf1bf64d06 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:10:39 +0530 Subject: [PATCH 046/105] refactor: added types of tss_key --- x/utss/keeper/tss_key.go | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 x/utss/keeper/tss_key.go diff --git a/x/utss/keeper/tss_key.go b/x/utss/keeper/tss_key.go new file mode 100644 index 00000000..59e96e8e --- /dev/null +++ b/x/utss/keeper/tss_key.go @@ -0,0 +1,54 @@ +package keeper + +import ( + "context" + "errors" + "fmt" + + "cosmossdk.io/collections" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// SetCurrentTssKey stores the finalized active TSS key. +func (k Keeper) SetCurrentTssKey(ctx context.Context, key types.TssKey) error { + if err := key.ValidateBasic(); err != nil { + return fmt.Errorf("invalid tss key: %w", err) + } + + if err := k.CurrentTssKey.Set(ctx, key); err != nil { + return fmt.Errorf("failed to set current tss key: %w", err) + } + + // Also store in TssKeyHistory for reference + if err := k.TssKeyHistory.Set(ctx, key.KeyId, key); err != nil { + return fmt.Errorf("failed to record tss key history: %w", err) + } + + k.Logger().Info("New TSS key finalized", "key_id", key.KeyId, "pubkey", key.TssPubkey) + return nil +} + +// GetCurrentTssKey fetches the currently active finalized key. +func (k Keeper) GetCurrentTssKey(ctx context.Context) (types.TssKey, bool, error) { + key, err := k.CurrentTssKey.Get(ctx) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return types.TssKey{}, false, nil + } + return types.TssKey{}, false, err + } + return key, true, nil +} + +// GetTssKeyByID retrieves a specific key from history using key_id. +func (k Keeper) GetTssKeyByID(ctx context.Context, keyID string) (types.TssKey, bool, error) { + key, err := k.TssKeyHistory.Get(ctx, keyID) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return types.TssKey{}, false, nil + } + return types.TssKey{}, false, err + } + return key, true, nil +} From 19ae4f2208eac718947bf8b120b0f028243cc8f1 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:10:57 +0530 Subject: [PATCH 047/105] refactor: added keys of keeper storage --- x/utss/types/genesis.go | 2 +- x/utss/types/genesis.pb.go | 209 ++----------------------------------- 2 files changed, 12 insertions(+), 199 deletions(-) diff --git a/x/utss/types/genesis.go b/x/utss/types/genesis.go index 97cad761..ab311ab0 100755 --- a/x/utss/types/genesis.go +++ b/x/utss/types/genesis.go @@ -15,5 +15,5 @@ func DefaultGenesis() *GenesisState { // failure. func (gs GenesisState) Validate() error { - return gs.Params.Validate() + return gs.Params.ValidateBasic() } diff --git a/x/utss/types/genesis.pb.go b/x/utss/types/genesis.pb.go index 13f7ea83..57f56d78 100644 --- a/x/utss/types/genesis.pb.go +++ b/x/utss/types/genesis.pb.go @@ -70,101 +70,29 @@ func (m *GenesisState) GetParams() Params { return Params{} } -// Params defines the set of module parameters. -type Params struct { - SomeValue bool `protobuf:"varint,2,opt,name=some_value,json=someValue,proto3" json:"some_value,omitempty"` -} - -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_340c354866cd9772, []int{1} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetSomeValue() bool { - if m != nil { - return m.SomeValue - } - return false -} - func init() { proto.RegisterType((*GenesisState)(nil), "utss.v1.GenesisState") - proto.RegisterType((*Params)(nil), "utss.v1.Params") } func init() { proto.RegisterFile("utss/v1/genesis.proto", fileDescriptor_340c354866cd9772) } var fileDescriptor_340c354866cd9772 = []byte{ - // 251 bytes of a gzipped FileDescriptorProto + // 205 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0x2d, 0x29, 0x2e, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x07, 0x09, 0xeb, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0xc5, - 0xf4, 0x41, 0x2c, 0x88, 0xb4, 0x94, 0x60, 0x62, 0x6e, 0x66, 0x5e, 0xbe, 0x3e, 0x98, 0x84, 0x08, - 0x29, 0xd9, 0x72, 0xf1, 0xb8, 0x43, 0x8c, 0x08, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0xd2, 0xe5, 0x62, - 0x2b, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0xe2, 0xd7, 0x83, - 0x1a, 0xa9, 0x17, 0x00, 0x16, 0x76, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xaa, 0x48, 0xc9, - 0x91, 0x8b, 0x0d, 0x22, 0x2e, 0x24, 0xcb, 0xc5, 0x55, 0x9c, 0x9f, 0x9b, 0x1a, 0x5f, 0x96, 0x98, - 0x53, 0x9a, 0x2a, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x11, 0xc4, 0x09, 0x12, 0x09, 0x03, 0x09, 0x58, - 0x49, 0xcc, 0x58, 0x20, 0xcf, 0xf0, 0x62, 0x81, 0x3c, 0x63, 0xd7, 0xf3, 0x0d, 0x5a, 0xdc, 0x60, - 0xd7, 0x43, 0x8c, 0x70, 0xf2, 0x3e, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, - 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, - 0xc3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x82, 0xd2, 0xe2, 0x8c, - 0xe4, 0x8c, 0xc4, 0xcc, 0x3c, 0x30, 0x4b, 0x17, 0xcc, 0xd4, 0xcd, 0xcb, 0x4f, 0x49, 0xd5, 0xaf, - 0xd0, 0x07, 0x9b, 0x56, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0xf6, 0x95, 0x31, 0x20, 0x00, - 0x00, 0xff, 0xff, 0x69, 0x73, 0x3a, 0xe5, 0x20, 0x01, 0x00, 0x00, + 0xf4, 0x41, 0x2c, 0x88, 0xb4, 0x94, 0x60, 0x62, 0x6e, 0x66, 0x5e, 0xbe, 0x3e, 0x98, 0x84, 0x0a, + 0x09, 0xc3, 0x0c, 0x2a, 0xa9, 0x2c, 0x48, 0x85, 0x1a, 0xa3, 0x64, 0xcb, 0xc5, 0xe3, 0x0e, 0x31, + 0x37, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0x48, 0x97, 0x8b, 0xad, 0x20, 0xb1, 0x28, 0x31, 0xb7, 0x58, + 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x88, 0x5f, 0x0f, 0x6a, 0x8f, 0x5e, 0x00, 0x58, 0xd8, 0x89, + 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0xa8, 0x22, 0x27, 0xef, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, + 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, + 0x3c, 0x96, 0x63, 0x88, 0x32, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, + 0x2f, 0x28, 0x2d, 0xce, 0x48, 0xce, 0x48, 0xcc, 0xcc, 0x03, 0xb3, 0x74, 0xc1, 0x4c, 0xdd, 0xbc, + 0xfc, 0x94, 0x54, 0xfd, 0x0a, 0x7d, 0xb0, 0xa3, 0xc0, 0x2e, 0x4a, 0x62, 0x03, 0x3b, 0xc9, 0x18, + 0x10, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xbf, 0xeb, 0x8f, 0xf2, 0x00, 0x00, 0x00, } -func (this *Params) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Params) - if !ok { - that2, ok := that.(Params) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.SomeValue != that1.SomeValue { - return false - } - return true -} func (m *GenesisState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -198,39 +126,6 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SomeValue { - i-- - if m.SomeValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - return len(dAtA) - i, nil -} - func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -253,18 +148,6 @@ func (m *GenesisState) Size() (n int) { return n } -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.SomeValue { - n += 2 - } - return n -} - func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -354,76 +237,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } return nil } -func (m *Params) 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 ErrIntOverflowGenesis - } - 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: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SomeValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SomeValue = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From 1e9666456f972852b3b8ddb56734d8046f1124d4 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:11:25 +0530 Subject: [PATCH 048/105] refactor: added params msg impl --- x/utss/keeper/msg_update_params.go | 12 ++++++++ x/utss/types/keys.go | 30 ++++++++++++++++++ x/utss/types/msgs.go | 49 ------------------------------ x/utss/types/params.go | 6 ++-- 4 files changed, 44 insertions(+), 53 deletions(-) create mode 100644 x/utss/keeper/msg_update_params.go delete mode 100755 x/utss/types/msgs.go diff --git a/x/utss/keeper/msg_update_params.go b/x/utss/keeper/msg_update_params.go new file mode 100644 index 00000000..18182db3 --- /dev/null +++ b/x/utss/keeper/msg_update_params.go @@ -0,0 +1,12 @@ +package keeper + +import ( + "context" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// updateParams is for updating params collections of the module +func (k Keeper) UpdateParams(ctx context.Context, params types.Params) error { + return k.Params.Set(ctx, params) +} diff --git a/x/utss/types/keys.go b/x/utss/types/keys.go index d0f91292..ccbb787a 100755 --- a/x/utss/types/keys.go +++ b/x/utss/types/keys.go @@ -10,6 +10,36 @@ var ( // ParamsName is the name of the params collection. ParamsName = "params" + + // NextProcessIdKey saves the current module NextProcessId. + NextProcessIdKey = collections.NewPrefix(1) + + // NextProcessIdName is the name of the NextProcessId collection. + NextProcessIdName = "next_process_id" + + // CurrentTssProcessKey saves the current module CurrentTssProcess. + CurrentTssProcessKey = collections.NewPrefix(2) + + // CurrentTssProcessName is the name of the CurrentTssProcess collection. + CurrentTssProcessName = "current_tss_process" + + // ProcessHistoryKey saves the current module ProcessHistory. + ProcessHistoryKey = collections.NewPrefix(3) + + // ProcessHistoryName is the name of the ProcessHistory collection. + ProcessHistoryName = "process_history" + + // CurrentTssKeyPrefix saves the current module CurrentTssKey. + CurrentTssKeyKeyPrefix = collections.NewPrefix(4) + + // CurrentTssKeyName is the name of the CurrentTssKey collection. + CurrentTssKeyName = "current_tss_key" + + // TssKeyHistoryKey saves the current module TssKeyHistory. + TssKeyHistoryKey = collections.NewPrefix(5) + + // TssKeyHistoryName is the name of the TssKeyHistory collection. + TssKeyHistoryName = "tss_key_history" ) const ( diff --git a/x/utss/types/msgs.go b/x/utss/types/msgs.go deleted file mode 100755 index e93e95b0..00000000 --- a/x/utss/types/msgs.go +++ /dev/null @@ -1,49 +0,0 @@ -package types - -import ( - "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -var ( - _ sdk.Msg = &MsgUpdateParams{} -) - -// NewMsgUpdateParams creates new instance of MsgUpdateParams -func NewMsgUpdateParams( - sender sdk.Address, - someValue bool, -) *MsgUpdateParams { - return &MsgUpdateParams{ - Authority: sender.String(), - Params: Params{ - SomeValue: someValue, - }, - } -} - -// Route returns the name of the module -func (msg MsgUpdateParams) Route() string { return ModuleName } - -// Type returns the action -func (msg MsgUpdateParams) Type() string { return "update_params" } - -// GetSignBytes implements the LegacyMsg interface. -func (msg MsgUpdateParams) GetSignBytes() []byte { - return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) -} - -// GetSigners returns the expected signers for a MsgUpdateParams message. -func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{addr} -} - -// ValidateBasic does a sanity check on the provided data. -func (msg *MsgUpdateParams) Validate() error { - if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { - return errors.Wrap(err, "invalid authority address") - } - - return msg.Params.Validate() -} diff --git a/x/utss/types/params.go b/x/utss/types/params.go index d9be77ae..a269f2af 100755 --- a/x/utss/types/params.go +++ b/x/utss/types/params.go @@ -6,9 +6,8 @@ import ( // DefaultParams returns default module parameters. func DefaultParams() Params { - // TODO: return Params{ - SomeValue: true, + Admin: "push1gjaw568e35hjc8udhat0xnsxxmkm2snrexxz20", } } @@ -23,7 +22,6 @@ func (p Params) String() string { } // Validate does the sanity check on the params. -func (p Params) Validate() error { - // TODO: +func (p Params) ValidateBasic() error { return nil } From bf2d7c0ea489db0c77b2fb84e1971a66493e2d2d Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:11:34 +0530 Subject: [PATCH 049/105] refactor: added types of tss_key --- x/utss/types/tss_key.go | 60 +++++++++++++++++++++++++++++++++ x/utss/types/tss_key_process.go | 60 +++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 x/utss/types/tss_key.go create mode 100644 x/utss/types/tss_key_process.go diff --git a/x/utss/types/tss_key.go b/x/utss/types/tss_key.go new file mode 100644 index 00000000..28f9e6eb --- /dev/null +++ b/x/utss/types/tss_key.go @@ -0,0 +1,60 @@ +package types + +import ( + "encoding/json" + "strings" + + errorsmod "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// String returns a JSON string representation of TssKey +func (p TssKey) String() string { + bz, err := json.Marshal(p) + if err != nil { + panic(err) + } + return string(bz) +} + +// ValidateBasic performs basic validation on TssKey fields +func (p TssKey) ValidateBasic() error { + // Validate TSS public key + if strings.TrimSpace(p.TssPubkey) == "" { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "tss_pubkey cannot be empty") + } + + // Validate Key ID + if strings.TrimSpace(p.KeyId) == "" { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "key_id cannot be empty") + } + + // Validate participants + if len(p.Participants) == 0 { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "participants list cannot be empty") + } + for i, participant := range p.Participants { + if strings.TrimSpace(participant) == "" { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "participant at index %d is empty", i) + } + } + + // Validate keygen and finalized block heights + if p.KeygenBlockHeight <= 0 { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid keygen_block_height: %d", p.KeygenBlockHeight) + } + if p.FinalizedBlockHeight < p.KeygenBlockHeight { + return errorsmod.Wrapf( + sdkerrors.ErrInvalidRequest, + "finalized_block_height (%d) cannot be less than keygen_block_height (%d)", + p.FinalizedBlockHeight, p.KeygenBlockHeight, + ) + } + + // Validate process ID + if p.ProcessId == 0 { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "process_id cannot be zero") + } + + return nil +} diff --git a/x/utss/types/tss_key_process.go b/x/utss/types/tss_key_process.go new file mode 100644 index 00000000..39c7937a --- /dev/null +++ b/x/utss/types/tss_key_process.go @@ -0,0 +1,60 @@ +package types + +import ( + "encoding/json" + + errorsmod "cosmossdk.io/errors" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// Stringer method. +func (p TssKeyProcess) String() string { + bz, err := json.Marshal(p) + if err != nil { + panic(err) + } + + return string(bz) +} + +// ValidateBasic performs basic validation on TssKeyProcess fields +func (p TssKeyProcess) ValidateBasic() error { + // Validate participants list + if len(p.Participants) == 0 { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "participants list cannot be empty") + } + for i, participant := range p.Participants { + if participant == "" { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "participant at index %d is empty", i) + } + } + + // Validate block height + if p.BlockHeight <= 0 { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid block height: %d", p.BlockHeight) + } + + // Validate expiry height + if p.ExpiryHeight <= p.BlockHeight { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "expiry height (%d) must be greater than block height (%d)", p.ExpiryHeight, p.BlockHeight) + } + + // Validate process type + if p.ProcessType != TssProcessType_TSS_PROCESS_KEYGEN && p.ProcessType != TssProcessType_TSS_PROCESS_RESHARE { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid process type: %v", p.ProcessType) + } + + // Validate status + if p.Status != TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING && + p.Status != TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS && + p.Status != TssKeyProcessStatus_TSS_KEY_PROCESS_FAILED { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid process status: %v", p.Status) + } + + // Validate ID + if p.Id == 0 { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "process id cannot be zero") + } + + return nil +} From a9ecd1f1a30ac328232a815aebab74f1373e5356 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:12:31 +0530 Subject: [PATCH 050/105] refactor: added generated protobuf --- api/utss/v1/genesis.pulsar.go | 498 +------ api/utss/v1/query.pulsar.go | 46 +- api/utss/v1/tx.pulsar.go | 1367 ++++++++++++++++++- api/utss/v1/types.pulsar.go | 2372 +++++++++++++++++++++++++++++++++ app/app.go | 4 +- x/utss/types/query.pb.go | 28 +- x/utss/types/tx.pb.go | 606 ++++++++- x/utss/types/types.pb.go | 1243 +++++++++++++++++ x/uvalidator/keeper/keeper.go | 4 +- 9 files changed, 5585 insertions(+), 583 deletions(-) create mode 100644 api/utss/v1/types.pulsar.go create mode 100644 x/utss/types/types.pb.go diff --git a/api/utss/v1/genesis.pulsar.go b/api/utss/v1/genesis.pulsar.go index 6b5c9490..954b2319 100644 --- a/api/utss/v1/genesis.pulsar.go +++ b/api/utss/v1/genesis.pulsar.go @@ -449,416 +449,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } } -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_some_value protoreflect.FieldDescriptor -) - -func init() { - file_utss_v1_genesis_proto_init() - md_Params = File_utss_v1_genesis_proto.Messages().ByName("Params") - fd_Params_some_value = md_Params.Fields().ByName("some_value") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_utss_v1_genesis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.SomeValue != false { - value := protoreflect.ValueOfBool(x.SomeValue) - if !f(fd_Params_some_value, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "utss.v1.Params.some_value": - return x.SomeValue != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) - } - panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "utss.v1.Params.some_value": - x.SomeValue = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) - } - panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "utss.v1.Params.some_value": - value := x.SomeValue - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) - } - panic(fmt.Errorf("message utss.v1.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "utss.v1.Params.some_value": - x.SomeValue = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) - } - panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "utss.v1.Params.some_value": - panic(fmt.Errorf("field some_value of message utss.v1.Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) - } - panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "utss.v1.Params.some_value": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) - } - panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in utss.v1.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.SomeValue { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.SomeValue { - i-- - if x.SomeValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire 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++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SomeValue", wireType) - } - var v int - 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++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.SomeValue = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -909,42 +499,6 @@ func (x *GenesisState) GetParams() *Params { return nil } -// Params defines the set of module parameters. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SomeValue bool `protobuf:"varint,2,opt,name=some_value,json=someValue,proto3" json:"some_value,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_utss_v1_genesis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_utss_v1_genesis_proto_rawDescGZIP(), []int{1} -} - -func (x *Params) GetSomeValue() bool { - if x != nil { - return x.SomeValue - } - return false -} - var File_utss_v1_genesis_proto protoreflect.FileDescriptor var file_utss_v1_genesis_proto_rawDesc = []byte{ @@ -952,25 +506,22 @@ var file_utss_v1_genesis_proto_rawDesc = []byte{ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, - 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a, 0x0c, 0x47, 0x65, 0x6e, - 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x41, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x6f, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x18, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0b, - 0x75, 0x74, 0x73, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x91, 0x01, 0x0a, 0x0b, - 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, - 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, - 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, - 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x75, 0x74, 0x73, 0x73, 0x2f, + 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, + 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2d, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x91, 0x01, + 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, + 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, + 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -985,7 +536,7 @@ func file_utss_v1_genesis_proto_rawDescGZIP() []byte { return file_utss_v1_genesis_proto_rawDescData } -var file_utss_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_utss_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_utss_v1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: utss.v1.GenesisState (*Params)(nil), // 1: utss.v1.Params @@ -1004,6 +555,7 @@ func file_utss_v1_genesis_proto_init() { if File_utss_v1_genesis_proto != nil { return } + file_utss_v1_types_proto_init() if !protoimpl.UnsafeEnabled { file_utss_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { @@ -1017,18 +569,6 @@ func file_utss_v1_genesis_proto_init() { return nil } } - file_utss_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1036,7 +576,7 @@ func file_utss_v1_genesis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_utss_v1_genesis_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, diff --git a/api/utss/v1/query.pulsar.go b/api/utss/v1/query.pulsar.go index ad2c98f8..c4e40cf9 100644 --- a/api/utss/v1/query.pulsar.go +++ b/api/utss/v1/query.pulsar.go @@ -889,28 +889,29 @@ var file_utss_v1_query_proto_rawDesc = []byte{ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3e, 0x0a, 0x13, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x27, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x65, 0x0a, 0x05, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x5c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x75, - 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x75, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, - 0x0f, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x42, 0x8f, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, - 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, - 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, - 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3e, + 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x65, + 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x1b, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x8f, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, + 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, + 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, + 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, + 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -948,6 +949,7 @@ func file_utss_v1_query_proto_init() { return } file_utss_v1_genesis_proto_init() + file_utss_v1_types_proto_init() if !protoimpl.UnsafeEnabled { file_utss_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { diff --git a/api/utss/v1/tx.pulsar.go b/api/utss/v1/tx.pulsar.go index 4e3ca74f..fd8a2b4a 100644 --- a/api/utss/v1/tx.pulsar.go +++ b/api/utss/v1/tx.pulsar.go @@ -2,6 +2,7 @@ package utssv1 import ( + _ "cosmossdk.io/api/amino" _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" @@ -870,6 +871,1118 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } } +var ( + md_MsgInitiateTssKeyProcess protoreflect.MessageDescriptor + fd_MsgInitiateTssKeyProcess_signer protoreflect.FieldDescriptor + fd_MsgInitiateTssKeyProcess_process_type protoreflect.FieldDescriptor + fd_MsgInitiateTssKeyProcess_expiry_height protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgInitiateTssKeyProcess = File_utss_v1_tx_proto.Messages().ByName("MsgInitiateTssKeyProcess") + fd_MsgInitiateTssKeyProcess_signer = md_MsgInitiateTssKeyProcess.Fields().ByName("signer") + fd_MsgInitiateTssKeyProcess_process_type = md_MsgInitiateTssKeyProcess.Fields().ByName("process_type") + fd_MsgInitiateTssKeyProcess_expiry_height = md_MsgInitiateTssKeyProcess.Fields().ByName("expiry_height") +} + +var _ protoreflect.Message = (*fastReflection_MsgInitiateTssKeyProcess)(nil) + +type fastReflection_MsgInitiateTssKeyProcess MsgInitiateTssKeyProcess + +func (x *MsgInitiateTssKeyProcess) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitiateTssKeyProcess)(x) +} + +func (x *MsgInitiateTssKeyProcess) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgInitiateTssKeyProcess_messageType fastReflection_MsgInitiateTssKeyProcess_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitiateTssKeyProcess_messageType{} + +type fastReflection_MsgInitiateTssKeyProcess_messageType struct{} + +func (x fastReflection_MsgInitiateTssKeyProcess_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitiateTssKeyProcess)(nil) +} +func (x fastReflection_MsgInitiateTssKeyProcess_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitiateTssKeyProcess) +} +func (x fastReflection_MsgInitiateTssKeyProcess_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitiateTssKeyProcess +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgInitiateTssKeyProcess) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitiateTssKeyProcess +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgInitiateTssKeyProcess) Type() protoreflect.MessageType { + return _fastReflection_MsgInitiateTssKeyProcess_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgInitiateTssKeyProcess) New() protoreflect.Message { + return new(fastReflection_MsgInitiateTssKeyProcess) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgInitiateTssKeyProcess) Interface() protoreflect.ProtoMessage { + return (*MsgInitiateTssKeyProcess)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgInitiateTssKeyProcess) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgInitiateTssKeyProcess_signer, value) { + return + } + } + if x.ProcessType != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.ProcessType)) + if !f(fd_MsgInitiateTssKeyProcess_process_type, value) { + return + } + } + if x.ExpiryHeight != uint64(0) { + value := protoreflect.ValueOfUint64(x.ExpiryHeight) + if !f(fd_MsgInitiateTssKeyProcess_expiry_height, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgInitiateTssKeyProcess) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.MsgInitiateTssKeyProcess.signer": + return x.Signer != "" + case "utss.v1.MsgInitiateTssKeyProcess.process_type": + return x.ProcessType != 0 + case "utss.v1.MsgInitiateTssKeyProcess.expiry_height": + return x.ExpiryHeight != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitiateTssKeyProcess) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.MsgInitiateTssKeyProcess.signer": + x.Signer = "" + case "utss.v1.MsgInitiateTssKeyProcess.process_type": + x.ProcessType = 0 + case "utss.v1.MsgInitiateTssKeyProcess.expiry_height": + x.ExpiryHeight = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgInitiateTssKeyProcess) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.MsgInitiateTssKeyProcess.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "utss.v1.MsgInitiateTssKeyProcess.process_type": + value := x.ProcessType + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "utss.v1.MsgInitiateTssKeyProcess.expiry_height": + value := x.ExpiryHeight + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcess does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitiateTssKeyProcess) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.MsgInitiateTssKeyProcess.signer": + x.Signer = value.Interface().(string) + case "utss.v1.MsgInitiateTssKeyProcess.process_type": + x.ProcessType = (TssProcessType)(value.Enum()) + case "utss.v1.MsgInitiateTssKeyProcess.expiry_height": + x.ExpiryHeight = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitiateTssKeyProcess) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgInitiateTssKeyProcess.signer": + panic(fmt.Errorf("field signer of message utss.v1.MsgInitiateTssKeyProcess is not mutable")) + case "utss.v1.MsgInitiateTssKeyProcess.process_type": + panic(fmt.Errorf("field process_type of message utss.v1.MsgInitiateTssKeyProcess is not mutable")) + case "utss.v1.MsgInitiateTssKeyProcess.expiry_height": + panic(fmt.Errorf("field expiry_height of message utss.v1.MsgInitiateTssKeyProcess is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgInitiateTssKeyProcess) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgInitiateTssKeyProcess.signer": + return protoreflect.ValueOfString("") + case "utss.v1.MsgInitiateTssKeyProcess.process_type": + return protoreflect.ValueOfEnum(0) + case "utss.v1.MsgInitiateTssKeyProcess.expiry_height": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgInitiateTssKeyProcess) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgInitiateTssKeyProcess", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgInitiateTssKeyProcess) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitiateTssKeyProcess) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgInitiateTssKeyProcess) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgInitiateTssKeyProcess) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitiateTssKeyProcess) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProcessType != 0 { + n += 1 + runtime.Sov(uint64(x.ProcessType)) + } + if x.ExpiryHeight != 0 { + n += 1 + runtime.Sov(uint64(x.ExpiryHeight)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInitiateTssKeyProcess) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ExpiryHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpiryHeight)) + i-- + dAtA[i] = 0x18 + } + if x.ProcessType != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProcessType)) + i-- + dAtA[i] = 0x10 + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgInitiateTssKeyProcess) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitiateTssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitiateTssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProcessType", wireType) + } + x.ProcessType = 0 + 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++ + x.ProcessType |= TssProcessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) + } + x.ExpiryHeight = 0 + 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++ + x.ExpiryHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgVoteTssKeyProcess protoreflect.MessageDescriptor + fd_MsgVoteTssKeyProcess_signer protoreflect.FieldDescriptor + fd_MsgVoteTssKeyProcess_process_id protoreflect.FieldDescriptor + fd_MsgVoteTssKeyProcess_tss_pubkey protoreflect.FieldDescriptor + fd_MsgVoteTssKeyProcess_key_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgVoteTssKeyProcess = File_utss_v1_tx_proto.Messages().ByName("MsgVoteTssKeyProcess") + fd_MsgVoteTssKeyProcess_signer = md_MsgVoteTssKeyProcess.Fields().ByName("signer") + fd_MsgVoteTssKeyProcess_process_id = md_MsgVoteTssKeyProcess.Fields().ByName("process_id") + fd_MsgVoteTssKeyProcess_tss_pubkey = md_MsgVoteTssKeyProcess.Fields().ByName("tss_pubkey") + fd_MsgVoteTssKeyProcess_key_id = md_MsgVoteTssKeyProcess.Fields().ByName("key_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgVoteTssKeyProcess)(nil) + +type fastReflection_MsgVoteTssKeyProcess MsgVoteTssKeyProcess + +func (x *MsgVoteTssKeyProcess) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteTssKeyProcess)(x) +} + +func (x *MsgVoteTssKeyProcess) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgVoteTssKeyProcess_messageType fastReflection_MsgVoteTssKeyProcess_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteTssKeyProcess_messageType{} + +type fastReflection_MsgVoteTssKeyProcess_messageType struct{} + +func (x fastReflection_MsgVoteTssKeyProcess_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteTssKeyProcess)(nil) +} +func (x fastReflection_MsgVoteTssKeyProcess_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteTssKeyProcess) +} +func (x fastReflection_MsgVoteTssKeyProcess_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteTssKeyProcess +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVoteTssKeyProcess) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteTssKeyProcess +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgVoteTssKeyProcess) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteTssKeyProcess_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVoteTssKeyProcess) New() protoreflect.Message { + return new(fastReflection_MsgVoteTssKeyProcess) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVoteTssKeyProcess) Interface() protoreflect.ProtoMessage { + return (*MsgVoteTssKeyProcess)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgVoteTssKeyProcess) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgVoteTssKeyProcess_signer, value) { + return + } + } + if x.ProcessId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ProcessId) + if !f(fd_MsgVoteTssKeyProcess_process_id, value) { + return + } + } + if x.TssPubkey != "" { + value := protoreflect.ValueOfString(x.TssPubkey) + if !f(fd_MsgVoteTssKeyProcess_tss_pubkey, value) { + return + } + } + if x.KeyId != "" { + value := protoreflect.ValueOfString(x.KeyId) + if !f(fd_MsgVoteTssKeyProcess_key_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgVoteTssKeyProcess) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + return x.Signer != "" + case "utss.v1.MsgVoteTssKeyProcess.process_id": + return x.ProcessId != uint64(0) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + return x.TssPubkey != "" + case "utss.v1.MsgVoteTssKeyProcess.key_id": + return x.KeyId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteTssKeyProcess) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + x.Signer = "" + case "utss.v1.MsgVoteTssKeyProcess.process_id": + x.ProcessId = uint64(0) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + x.TssPubkey = "" + case "utss.v1.MsgVoteTssKeyProcess.key_id": + x.KeyId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgVoteTssKeyProcess) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "utss.v1.MsgVoteTssKeyProcess.process_id": + value := x.ProcessId + return protoreflect.ValueOfUint64(value) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + value := x.TssPubkey + return protoreflect.ValueOfString(value) + case "utss.v1.MsgVoteTssKeyProcess.key_id": + value := x.KeyId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteTssKeyProcess) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + x.Signer = value.Interface().(string) + case "utss.v1.MsgVoteTssKeyProcess.process_id": + x.ProcessId = value.Uint() + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + x.TssPubkey = value.Interface().(string) + case "utss.v1.MsgVoteTssKeyProcess.key_id": + x.KeyId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteTssKeyProcess) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + panic(fmt.Errorf("field signer of message utss.v1.MsgVoteTssKeyProcess is not mutable")) + case "utss.v1.MsgVoteTssKeyProcess.process_id": + panic(fmt.Errorf("field process_id of message utss.v1.MsgVoteTssKeyProcess is not mutable")) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + panic(fmt.Errorf("field tss_pubkey of message utss.v1.MsgVoteTssKeyProcess is not mutable")) + case "utss.v1.MsgVoteTssKeyProcess.key_id": + panic(fmt.Errorf("field key_id of message utss.v1.MsgVoteTssKeyProcess is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgVoteTssKeyProcess) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + return protoreflect.ValueOfString("") + case "utss.v1.MsgVoteTssKeyProcess.process_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + return protoreflect.ValueOfString("") + case "utss.v1.MsgVoteTssKeyProcess.key_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgVoteTssKeyProcess) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgVoteTssKeyProcess", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgVoteTssKeyProcess) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteTssKeyProcess) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgVoteTssKeyProcess) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgVoteTssKeyProcess) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProcessId != 0 { + n += 1 + runtime.Sov(uint64(x.ProcessId)) + } + l = len(x.TssPubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.KeyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgVoteTssKeyProcess) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.KeyId) > 0 { + i -= len(x.KeyId) + copy(dAtA[i:], x.KeyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyId))) + i-- + dAtA[i] = 0x22 + } + if len(x.TssPubkey) > 0 { + i -= len(x.TssPubkey) + copy(dAtA[i:], x.TssPubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TssPubkey))) + i-- + dAtA[i] = 0x1a + } + if x.ProcessId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProcessId)) + i-- + dAtA[i] = 0x10 + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgVoteTssKeyProcess) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteTssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteTssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) + } + x.ProcessId = 0 + 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++ + x.ProcessId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", 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.TssPubkey = 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 KeyId", 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.KeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -963,6 +2076,118 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_utss_v1_tx_proto_rawDescGZIP(), []int{1} } +// Admin initiates new keygen/reshare process +type MsgInitiateTssKeyProcess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + ProcessType TssProcessType `protobuf:"varint,2,opt,name=process_type,json=processType,proto3,enum=utss.v1.TssProcessType" json:"process_type,omitempty"` + ExpiryHeight uint64 `protobuf:"varint,3,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` +} + +func (x *MsgInitiateTssKeyProcess) Reset() { + *x = MsgInitiateTssKeyProcess{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitiateTssKeyProcess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitiateTssKeyProcess) ProtoMessage() {} + +// Deprecated: Use MsgInitiateTssKeyProcess.ProtoReflect.Descriptor instead. +func (*MsgInitiateTssKeyProcess) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgInitiateTssKeyProcess) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *MsgInitiateTssKeyProcess) GetProcessType() TssProcessType { + if x != nil { + return x.ProcessType + } + return TssProcessType_TSS_PROCESS_KEYGEN +} + +func (x *MsgInitiateTssKeyProcess) GetExpiryHeight() uint64 { + if x != nil { + return x.ExpiryHeight + } + return 0 +} + +// Universal validator votes on an ongoing TSS key process +type MsgVoteTssKeyProcess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + ProcessId uint64 `protobuf:"varint,2,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` // id of the process + TssPubkey string `protobuf:"bytes,3,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` + KeyId string `protobuf:"bytes,4,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` +} + +func (x *MsgVoteTssKeyProcess) Reset() { + *x = MsgVoteTssKeyProcess{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgVoteTssKeyProcess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgVoteTssKeyProcess) ProtoMessage() {} + +// Deprecated: Use MsgVoteTssKeyProcess.ProtoReflect.Descriptor instead. +func (*MsgVoteTssKeyProcess) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgVoteTssKeyProcess) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *MsgVoteTssKeyProcess) GetProcessId() uint64 { + if x != nil { + return x.ProcessId + } + return 0 +} + +func (x *MsgVoteTssKeyProcess) GetTssPubkey() string { + if x != nil { + return x.TssPubkey + } + return "" +} + +func (x *MsgVoteTssKeyProcess) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + var File_utss_v1_tx_proto protoreflect.FileDescriptor var file_utss_v1_tx_proto_rawDesc = []byte{ @@ -970,36 +2195,65 @@ var file_utss_v1_tx_proto_rawDesc = []byte{ 0x74, 0x6f, 0x12, 0x07, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, - 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x01, 0x0a, - 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x75, 0x74, 0x73, + 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, + 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 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, 0x22, 0xdd, 0x01, 0x0a, 0x18, 0x4d, + 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0c, 0x70, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x17, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x74, 0x73, 0x73, + 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x14, 0x4d, + 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, - 0x76, 0x31, 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, 0x58, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4a, 0x0a, 0x0c, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x2e, 0x75, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 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, 0x8c, 0x01, 0x0a, - 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, - 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, - 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, 0x73, 0x50, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x74, 0x73, 0x73, + 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x32, 0x58, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4a, 0x0a, 0x0c, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x2e, 0x75, + 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 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, + 0x8c, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, + 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, + 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, + 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1014,21 +2268,25 @@ func file_utss_v1_tx_proto_rawDescGZIP() []byte { return file_utss_v1_tx_proto_rawDescData } -var file_utss_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_utss_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_utss_v1_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: utss.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: utss.v1.MsgUpdateParamsResponse - (*Params)(nil), // 2: utss.v1.Params + (*MsgUpdateParams)(nil), // 0: utss.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: utss.v1.MsgUpdateParamsResponse + (*MsgInitiateTssKeyProcess)(nil), // 2: utss.v1.MsgInitiateTssKeyProcess + (*MsgVoteTssKeyProcess)(nil), // 3: utss.v1.MsgVoteTssKeyProcess + (*Params)(nil), // 4: utss.v1.Params + (TssProcessType)(0), // 5: utss.v1.TssProcessType } var file_utss_v1_tx_proto_depIdxs = []int32{ - 2, // 0: utss.v1.MsgUpdateParams.params:type_name -> utss.v1.Params - 0, // 1: utss.v1.Msg.UpdateParams:input_type -> utss.v1.MsgUpdateParams - 1, // 2: utss.v1.Msg.UpdateParams:output_type -> utss.v1.MsgUpdateParamsResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 4, // 0: utss.v1.MsgUpdateParams.params:type_name -> utss.v1.Params + 5, // 1: utss.v1.MsgInitiateTssKeyProcess.process_type:type_name -> utss.v1.TssProcessType + 0, // 2: utss.v1.Msg.UpdateParams:input_type -> utss.v1.MsgUpdateParams + 1, // 3: utss.v1.Msg.UpdateParams:output_type -> utss.v1.MsgUpdateParamsResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_utss_v1_tx_proto_init() } @@ -1037,6 +2295,7 @@ func file_utss_v1_tx_proto_init() { return } file_utss_v1_genesis_proto_init() + file_utss_v1_types_proto_init() if !protoimpl.UnsafeEnabled { file_utss_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { @@ -1062,6 +2321,30 @@ func file_utss_v1_tx_proto_init() { return nil } } + file_utss_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitiateTssKeyProcess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVoteTssKeyProcess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1069,7 +2352,7 @@ func file_utss_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_utss_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/api/utss/v1/types.pulsar.go b/api/utss/v1/types.pulsar.go new file mode 100644 index 00000000..3f359d44 --- /dev/null +++ b/api/utss/v1/types.pulsar.go @@ -0,0 +1,2372 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package utssv1 + +import ( + _ "cosmossdk.io/api/amino" + _ "cosmossdk.io/api/cosmos/base/v1beta1" + _ "cosmossdk.io/api/cosmos/msg/v1" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var ( + md_Params protoreflect.MessageDescriptor + fd_Params_admin protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_types_proto_init() + md_Params = File_utss_v1_types_proto.Messages().ByName("Params") + fd_Params_admin = md_Params.Fields().ByName("admin") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_types_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Admin != "" { + value := protoreflect.ValueOfString(x.Admin) + if !f(fd_Params_admin, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.Params.admin": + return x.Admin != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.Params.admin": + x.Admin = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.Params.admin": + value := x.Admin + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.Params.admin": + x.Admin = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.Params.admin": + panic(fmt.Errorf("field admin of message utss.v1.Params is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.Params.admin": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.Params")) + } + panic(fmt.Errorf("message utss.v1.Params does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.Params", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Params) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Admin) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Admin) > 0 { + i -= len(x.Admin) + copy(dAtA[i:], x.Admin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admin))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Params) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Admin", 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.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_TssKeyProcess_2_list)(nil) + +type _TssKeyProcess_2_list struct { + list *[]string +} + +func (x *_TssKeyProcess_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_TssKeyProcess_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_TssKeyProcess_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_TssKeyProcess_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_TssKeyProcess_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message TssKeyProcess at list field Participants as it is not of Message kind")) +} + +func (x *_TssKeyProcess_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_TssKeyProcess_2_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_TssKeyProcess_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_TssKeyProcess protoreflect.MessageDescriptor + fd_TssKeyProcess_status protoreflect.FieldDescriptor + fd_TssKeyProcess_participants protoreflect.FieldDescriptor + fd_TssKeyProcess_block_height protoreflect.FieldDescriptor + fd_TssKeyProcess_expiry_height protoreflect.FieldDescriptor + fd_TssKeyProcess_process_type protoreflect.FieldDescriptor + fd_TssKeyProcess_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_types_proto_init() + md_TssKeyProcess = File_utss_v1_types_proto.Messages().ByName("TssKeyProcess") + fd_TssKeyProcess_status = md_TssKeyProcess.Fields().ByName("status") + fd_TssKeyProcess_participants = md_TssKeyProcess.Fields().ByName("participants") + fd_TssKeyProcess_block_height = md_TssKeyProcess.Fields().ByName("block_height") + fd_TssKeyProcess_expiry_height = md_TssKeyProcess.Fields().ByName("expiry_height") + fd_TssKeyProcess_process_type = md_TssKeyProcess.Fields().ByName("process_type") + fd_TssKeyProcess_id = md_TssKeyProcess.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_TssKeyProcess)(nil) + +type fastReflection_TssKeyProcess TssKeyProcess + +func (x *TssKeyProcess) ProtoReflect() protoreflect.Message { + return (*fastReflection_TssKeyProcess)(x) +} + +func (x *TssKeyProcess) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_TssKeyProcess_messageType fastReflection_TssKeyProcess_messageType +var _ protoreflect.MessageType = fastReflection_TssKeyProcess_messageType{} + +type fastReflection_TssKeyProcess_messageType struct{} + +func (x fastReflection_TssKeyProcess_messageType) Zero() protoreflect.Message { + return (*fastReflection_TssKeyProcess)(nil) +} +func (x fastReflection_TssKeyProcess_messageType) New() protoreflect.Message { + return new(fastReflection_TssKeyProcess) +} +func (x fastReflection_TssKeyProcess_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TssKeyProcess +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TssKeyProcess) Descriptor() protoreflect.MessageDescriptor { + return md_TssKeyProcess +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_TssKeyProcess) Type() protoreflect.MessageType { + return _fastReflection_TssKeyProcess_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TssKeyProcess) New() protoreflect.Message { + return new(fastReflection_TssKeyProcess) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TssKeyProcess) Interface() protoreflect.ProtoMessage { + return (*TssKeyProcess)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_TssKeyProcess) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Status != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) + if !f(fd_TssKeyProcess_status, value) { + return + } + } + if len(x.Participants) != 0 { + value := protoreflect.ValueOfList(&_TssKeyProcess_2_list{list: &x.Participants}) + if !f(fd_TssKeyProcess_participants, value) { + return + } + } + if x.BlockHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.BlockHeight) + if !f(fd_TssKeyProcess_block_height, value) { + return + } + } + if x.ExpiryHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.ExpiryHeight) + if !f(fd_TssKeyProcess_expiry_height, value) { + return + } + } + if x.ProcessType != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.ProcessType)) + if !f(fd_TssKeyProcess_process_type, value) { + return + } + } + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_TssKeyProcess_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_TssKeyProcess) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.TssKeyProcess.status": + return x.Status != 0 + case "utss.v1.TssKeyProcess.participants": + return len(x.Participants) != 0 + case "utss.v1.TssKeyProcess.block_height": + return x.BlockHeight != int64(0) + case "utss.v1.TssKeyProcess.expiry_height": + return x.ExpiryHeight != int64(0) + case "utss.v1.TssKeyProcess.process_type": + return x.ProcessType != 0 + case "utss.v1.TssKeyProcess.id": + return x.Id != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.TssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_TssKeyProcess) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.TssKeyProcess.status": + x.Status = 0 + case "utss.v1.TssKeyProcess.participants": + x.Participants = nil + case "utss.v1.TssKeyProcess.block_height": + x.BlockHeight = int64(0) + case "utss.v1.TssKeyProcess.expiry_height": + x.ExpiryHeight = int64(0) + case "utss.v1.TssKeyProcess.process_type": + x.ProcessType = 0 + case "utss.v1.TssKeyProcess.id": + x.Id = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.TssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_TssKeyProcess) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.TssKeyProcess.status": + value := x.Status + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "utss.v1.TssKeyProcess.participants": + if len(x.Participants) == 0 { + return protoreflect.ValueOfList(&_TssKeyProcess_2_list{}) + } + listValue := &_TssKeyProcess_2_list{list: &x.Participants} + return protoreflect.ValueOfList(listValue) + case "utss.v1.TssKeyProcess.block_height": + value := x.BlockHeight + return protoreflect.ValueOfInt64(value) + case "utss.v1.TssKeyProcess.expiry_height": + value := x.ExpiryHeight + return protoreflect.ValueOfInt64(value) + case "utss.v1.TssKeyProcess.process_type": + value := x.ProcessType + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "utss.v1.TssKeyProcess.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.TssKeyProcess does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_TssKeyProcess) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.TssKeyProcess.status": + x.Status = (TssKeyProcessStatus)(value.Enum()) + case "utss.v1.TssKeyProcess.participants": + lv := value.List() + clv := lv.(*_TssKeyProcess_2_list) + x.Participants = *clv.list + case "utss.v1.TssKeyProcess.block_height": + x.BlockHeight = value.Int() + case "utss.v1.TssKeyProcess.expiry_height": + x.ExpiryHeight = value.Int() + case "utss.v1.TssKeyProcess.process_type": + x.ProcessType = (TssProcessType)(value.Enum()) + case "utss.v1.TssKeyProcess.id": + x.Id = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.TssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_TssKeyProcess) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.TssKeyProcess.participants": + if x.Participants == nil { + x.Participants = []string{} + } + value := &_TssKeyProcess_2_list{list: &x.Participants} + return protoreflect.ValueOfList(value) + case "utss.v1.TssKeyProcess.status": + panic(fmt.Errorf("field status of message utss.v1.TssKeyProcess is not mutable")) + case "utss.v1.TssKeyProcess.block_height": + panic(fmt.Errorf("field block_height of message utss.v1.TssKeyProcess is not mutable")) + case "utss.v1.TssKeyProcess.expiry_height": + panic(fmt.Errorf("field expiry_height of message utss.v1.TssKeyProcess is not mutable")) + case "utss.v1.TssKeyProcess.process_type": + panic(fmt.Errorf("field process_type of message utss.v1.TssKeyProcess is not mutable")) + case "utss.v1.TssKeyProcess.id": + panic(fmt.Errorf("field id of message utss.v1.TssKeyProcess is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.TssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_TssKeyProcess) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.TssKeyProcess.status": + return protoreflect.ValueOfEnum(0) + case "utss.v1.TssKeyProcess.participants": + list := []string{} + return protoreflect.ValueOfList(&_TssKeyProcess_2_list{list: &list}) + case "utss.v1.TssKeyProcess.block_height": + return protoreflect.ValueOfInt64(int64(0)) + case "utss.v1.TssKeyProcess.expiry_height": + return protoreflect.ValueOfInt64(int64(0)) + case "utss.v1.TssKeyProcess.process_type": + return protoreflect.ValueOfEnum(0) + case "utss.v1.TssKeyProcess.id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.TssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_TssKeyProcess) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.TssKeyProcess", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_TssKeyProcess) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_TssKeyProcess) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_TssKeyProcess) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_TssKeyProcess) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TssKeyProcess) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Status != 0 { + n += 1 + runtime.Sov(uint64(x.Status)) + } + if len(x.Participants) > 0 { + for _, s := range x.Participants { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.BlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.BlockHeight)) + } + if x.ExpiryHeight != 0 { + n += 1 + runtime.Sov(uint64(x.ExpiryHeight)) + } + if x.ProcessType != 0 { + n += 1 + runtime.Sov(uint64(x.ProcessType)) + } + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*TssKeyProcess) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x30 + } + if x.ProcessType != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProcessType)) + i-- + dAtA[i] = 0x28 + } + if x.ExpiryHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpiryHeight)) + i-- + dAtA[i] = 0x20 + } + if x.BlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) + i-- + dAtA[i] = 0x18 + } + if len(x.Participants) > 0 { + for iNdEx := len(x.Participants) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Participants[iNdEx]) + copy(dAtA[i:], x.Participants[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Participants[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if x.Status != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*TssKeyProcess) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + x.Status = 0 + 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++ + x.Status |= TssKeyProcessStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Participants", 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.Participants = append(x.Participants, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + x.BlockHeight = 0 + 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++ + x.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) + } + x.ExpiryHeight = 0 + 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++ + x.ExpiryHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProcessType", wireType) + } + x.ProcessType = 0 + 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++ + x.ProcessType |= TssProcessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + 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++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_TssKey_3_list)(nil) + +type _TssKey_3_list struct { + list *[]string +} + +func (x *_TssKey_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_TssKey_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_TssKey_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_TssKey_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_TssKey_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message TssKey at list field Participants as it is not of Message kind")) +} + +func (x *_TssKey_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_TssKey_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_TssKey_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_TssKey protoreflect.MessageDescriptor + fd_TssKey_tss_pubkey protoreflect.FieldDescriptor + fd_TssKey_key_id protoreflect.FieldDescriptor + fd_TssKey_participants protoreflect.FieldDescriptor + fd_TssKey_finalized_block_height protoreflect.FieldDescriptor + fd_TssKey_keygen_block_height protoreflect.FieldDescriptor + fd_TssKey_process_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_types_proto_init() + md_TssKey = File_utss_v1_types_proto.Messages().ByName("TssKey") + fd_TssKey_tss_pubkey = md_TssKey.Fields().ByName("tss_pubkey") + fd_TssKey_key_id = md_TssKey.Fields().ByName("key_id") + fd_TssKey_participants = md_TssKey.Fields().ByName("participants") + fd_TssKey_finalized_block_height = md_TssKey.Fields().ByName("finalized_block_height") + fd_TssKey_keygen_block_height = md_TssKey.Fields().ByName("keygen_block_height") + fd_TssKey_process_id = md_TssKey.Fields().ByName("process_id") +} + +var _ protoreflect.Message = (*fastReflection_TssKey)(nil) + +type fastReflection_TssKey TssKey + +func (x *TssKey) ProtoReflect() protoreflect.Message { + return (*fastReflection_TssKey)(x) +} + +func (x *TssKey) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_types_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_TssKey_messageType fastReflection_TssKey_messageType +var _ protoreflect.MessageType = fastReflection_TssKey_messageType{} + +type fastReflection_TssKey_messageType struct{} + +func (x fastReflection_TssKey_messageType) Zero() protoreflect.Message { + return (*fastReflection_TssKey)(nil) +} +func (x fastReflection_TssKey_messageType) New() protoreflect.Message { + return new(fastReflection_TssKey) +} +func (x fastReflection_TssKey_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_TssKey +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_TssKey) Descriptor() protoreflect.MessageDescriptor { + return md_TssKey +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_TssKey) Type() protoreflect.MessageType { + return _fastReflection_TssKey_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_TssKey) New() protoreflect.Message { + return new(fastReflection_TssKey) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_TssKey) Interface() protoreflect.ProtoMessage { + return (*TssKey)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_TssKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TssPubkey != "" { + value := protoreflect.ValueOfString(x.TssPubkey) + if !f(fd_TssKey_tss_pubkey, value) { + return + } + } + if x.KeyId != "" { + value := protoreflect.ValueOfString(x.KeyId) + if !f(fd_TssKey_key_id, value) { + return + } + } + if len(x.Participants) != 0 { + value := protoreflect.ValueOfList(&_TssKey_3_list{list: &x.Participants}) + if !f(fd_TssKey_participants, value) { + return + } + } + if x.FinalizedBlockHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.FinalizedBlockHeight) + if !f(fd_TssKey_finalized_block_height, value) { + return + } + } + if x.KeygenBlockHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.KeygenBlockHeight) + if !f(fd_TssKey_keygen_block_height, value) { + return + } + } + if x.ProcessId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ProcessId) + if !f(fd_TssKey_process_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_TssKey) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.TssKey.tss_pubkey": + return x.TssPubkey != "" + case "utss.v1.TssKey.key_id": + return x.KeyId != "" + case "utss.v1.TssKey.participants": + return len(x.Participants) != 0 + case "utss.v1.TssKey.finalized_block_height": + return x.FinalizedBlockHeight != int64(0) + case "utss.v1.TssKey.keygen_block_height": + return x.KeygenBlockHeight != int64(0) + case "utss.v1.TssKey.process_id": + return x.ProcessId != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKey")) + } + panic(fmt.Errorf("message utss.v1.TssKey does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_TssKey) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.TssKey.tss_pubkey": + x.TssPubkey = "" + case "utss.v1.TssKey.key_id": + x.KeyId = "" + case "utss.v1.TssKey.participants": + x.Participants = nil + case "utss.v1.TssKey.finalized_block_height": + x.FinalizedBlockHeight = int64(0) + case "utss.v1.TssKey.keygen_block_height": + x.KeygenBlockHeight = int64(0) + case "utss.v1.TssKey.process_id": + x.ProcessId = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKey")) + } + panic(fmt.Errorf("message utss.v1.TssKey does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_TssKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.TssKey.tss_pubkey": + value := x.TssPubkey + return protoreflect.ValueOfString(value) + case "utss.v1.TssKey.key_id": + value := x.KeyId + return protoreflect.ValueOfString(value) + case "utss.v1.TssKey.participants": + if len(x.Participants) == 0 { + return protoreflect.ValueOfList(&_TssKey_3_list{}) + } + listValue := &_TssKey_3_list{list: &x.Participants} + return protoreflect.ValueOfList(listValue) + case "utss.v1.TssKey.finalized_block_height": + value := x.FinalizedBlockHeight + return protoreflect.ValueOfInt64(value) + case "utss.v1.TssKey.keygen_block_height": + value := x.KeygenBlockHeight + return protoreflect.ValueOfInt64(value) + case "utss.v1.TssKey.process_id": + value := x.ProcessId + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKey")) + } + panic(fmt.Errorf("message utss.v1.TssKey does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_TssKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.TssKey.tss_pubkey": + x.TssPubkey = value.Interface().(string) + case "utss.v1.TssKey.key_id": + x.KeyId = value.Interface().(string) + case "utss.v1.TssKey.participants": + lv := value.List() + clv := lv.(*_TssKey_3_list) + x.Participants = *clv.list + case "utss.v1.TssKey.finalized_block_height": + x.FinalizedBlockHeight = value.Int() + case "utss.v1.TssKey.keygen_block_height": + x.KeygenBlockHeight = value.Int() + case "utss.v1.TssKey.process_id": + x.ProcessId = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKey")) + } + panic(fmt.Errorf("message utss.v1.TssKey does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_TssKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.TssKey.participants": + if x.Participants == nil { + x.Participants = []string{} + } + value := &_TssKey_3_list{list: &x.Participants} + return protoreflect.ValueOfList(value) + case "utss.v1.TssKey.tss_pubkey": + panic(fmt.Errorf("field tss_pubkey of message utss.v1.TssKey is not mutable")) + case "utss.v1.TssKey.key_id": + panic(fmt.Errorf("field key_id of message utss.v1.TssKey is not mutable")) + case "utss.v1.TssKey.finalized_block_height": + panic(fmt.Errorf("field finalized_block_height of message utss.v1.TssKey is not mutable")) + case "utss.v1.TssKey.keygen_block_height": + panic(fmt.Errorf("field keygen_block_height of message utss.v1.TssKey is not mutable")) + case "utss.v1.TssKey.process_id": + panic(fmt.Errorf("field process_id of message utss.v1.TssKey is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKey")) + } + panic(fmt.Errorf("message utss.v1.TssKey does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_TssKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.TssKey.tss_pubkey": + return protoreflect.ValueOfString("") + case "utss.v1.TssKey.key_id": + return protoreflect.ValueOfString("") + case "utss.v1.TssKey.participants": + list := []string{} + return protoreflect.ValueOfList(&_TssKey_3_list{list: &list}) + case "utss.v1.TssKey.finalized_block_height": + return protoreflect.ValueOfInt64(int64(0)) + case "utss.v1.TssKey.keygen_block_height": + return protoreflect.ValueOfInt64(int64(0)) + case "utss.v1.TssKey.process_id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.TssKey")) + } + panic(fmt.Errorf("message utss.v1.TssKey does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_TssKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.TssKey", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_TssKey) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_TssKey) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_TssKey) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_TssKey) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*TssKey) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.TssPubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.KeyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Participants) > 0 { + for _, s := range x.Participants { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.FinalizedBlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.FinalizedBlockHeight)) + } + if x.KeygenBlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.KeygenBlockHeight)) + } + if x.ProcessId != 0 { + n += 1 + runtime.Sov(uint64(x.ProcessId)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*TssKey) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ProcessId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProcessId)) + i-- + dAtA[i] = 0x30 + } + if x.KeygenBlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.KeygenBlockHeight)) + i-- + dAtA[i] = 0x28 + } + if x.FinalizedBlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.FinalizedBlockHeight)) + i-- + dAtA[i] = 0x20 + } + if len(x.Participants) > 0 { + for iNdEx := len(x.Participants) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Participants[iNdEx]) + copy(dAtA[i:], x.Participants[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Participants[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.KeyId) > 0 { + i -= len(x.KeyId) + copy(dAtA[i:], x.KeyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyId))) + i-- + dAtA[i] = 0x12 + } + if len(x.TssPubkey) > 0 { + i -= len(x.TssPubkey) + copy(dAtA[i:], x.TssPubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TssPubkey))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*TssKey) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TssKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TssKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", 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.TssPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyId", 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.KeyId = 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 Participants", 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.Participants = append(x.Participants, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FinalizedBlockHeight", wireType) + } + x.FinalizedBlockHeight = 0 + 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++ + x.FinalizedBlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeygenBlockHeight", wireType) + } + x.KeygenBlockHeight = 0 + 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++ + x.KeygenBlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) + } + x.ProcessId = 0 + 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++ + x.ProcessId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: utss/v1/types.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TssKeyProcessStatus int32 + +const ( + TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING TssKeyProcessStatus = 0 + TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS TssKeyProcessStatus = 1 + TssKeyProcessStatus_TSS_KEY_PROCESS_FAILED TssKeyProcessStatus = 2 +) + +// Enum value maps for TssKeyProcessStatus. +var ( + TssKeyProcessStatus_name = map[int32]string{ + 0: "TSS_KEY_PROCESS_PENDING", + 1: "TSS_KEY_PROCESS_SUCCESS", + 2: "TSS_KEY_PROCESS_FAILED", + } + TssKeyProcessStatus_value = map[string]int32{ + "TSS_KEY_PROCESS_PENDING": 0, + "TSS_KEY_PROCESS_SUCCESS": 1, + "TSS_KEY_PROCESS_FAILED": 2, + } +) + +func (x TssKeyProcessStatus) Enum() *TssKeyProcessStatus { + p := new(TssKeyProcessStatus) + *p = x + return p +} + +func (x TssKeyProcessStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TssKeyProcessStatus) Descriptor() protoreflect.EnumDescriptor { + return file_utss_v1_types_proto_enumTypes[0].Descriptor() +} + +func (TssKeyProcessStatus) Type() protoreflect.EnumType { + return &file_utss_v1_types_proto_enumTypes[0] +} + +func (x TssKeyProcessStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TssKeyProcessStatus.Descriptor instead. +func (TssKeyProcessStatus) EnumDescriptor() ([]byte, []int) { + return file_utss_v1_types_proto_rawDescGZIP(), []int{0} +} + +type TssProcessType int32 + +const ( + TssProcessType_TSS_PROCESS_KEYGEN TssProcessType = 0 + TssProcessType_TSS_PROCESS_RESHARE TssProcessType = 1 +) + +// Enum value maps for TssProcessType. +var ( + TssProcessType_name = map[int32]string{ + 0: "TSS_PROCESS_KEYGEN", + 1: "TSS_PROCESS_RESHARE", + } + TssProcessType_value = map[string]int32{ + "TSS_PROCESS_KEYGEN": 0, + "TSS_PROCESS_RESHARE": 1, + } +) + +func (x TssProcessType) Enum() *TssProcessType { + p := new(TssProcessType) + *p = x + return p +} + +func (x TssProcessType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TssProcessType) Descriptor() protoreflect.EnumDescriptor { + return file_utss_v1_types_proto_enumTypes[1].Descriptor() +} + +func (TssProcessType) Type() protoreflect.EnumType { + return &file_utss_v1_types_proto_enumTypes[1] +} + +func (x TssProcessType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TssProcessType.Descriptor instead. +func (TssProcessType) EnumDescriptor() ([]byte, []int) { + return file_utss_v1_types_proto_rawDescGZIP(), []int{1} +} + +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The admin account of the utss module. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_utss_v1_types_proto_rawDescGZIP(), []int{0} +} + +func (x *Params) GetAdmin() string { + if x != nil { + return x.Admin + } + return "" +} + +// TSS key process information +type TssKeyProcess struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status TssKeyProcessStatus `protobuf:"varint,1,opt,name=status,proto3,enum=utss.v1.TssKeyProcessStatus" json:"status,omitempty"` + Participants []string `protobuf:"bytes,2,rep,name=participants,proto3" json:"participants,omitempty"` + BlockHeight int64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + ExpiryHeight int64 `protobuf:"varint,4,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` + ProcessType TssProcessType `protobuf:"varint,5,opt,name=process_type,json=processType,proto3,enum=utss.v1.TssProcessType" json:"process_type,omitempty"` + Id uint64 `protobuf:"varint,6,opt,name=id,proto3" json:"id,omitempty"` // process id +} + +func (x *TssKeyProcess) Reset() { + *x = TssKeyProcess{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TssKeyProcess) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TssKeyProcess) ProtoMessage() {} + +// Deprecated: Use TssKeyProcess.ProtoReflect.Descriptor instead. +func (*TssKeyProcess) Descriptor() ([]byte, []int) { + return file_utss_v1_types_proto_rawDescGZIP(), []int{1} +} + +func (x *TssKeyProcess) GetStatus() TssKeyProcessStatus { + if x != nil { + return x.Status + } + return TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING +} + +func (x *TssKeyProcess) GetParticipants() []string { + if x != nil { + return x.Participants + } + return nil +} + +func (x *TssKeyProcess) GetBlockHeight() int64 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +func (x *TssKeyProcess) GetExpiryHeight() int64 { + if x != nil { + return x.ExpiryHeight + } + return 0 +} + +func (x *TssKeyProcess) GetProcessType() TssProcessType { + if x != nil { + return x.ProcessType + } + return TssProcessType_TSS_PROCESS_KEYGEN +} + +func (x *TssKeyProcess) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +// Finalized TSS key details +type TssKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TssPubkey string `protobuf:"bytes,1,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` + KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + Participants []string `protobuf:"bytes,3,rep,name=participants,proto3" json:"participants,omitempty"` + FinalizedBlockHeight int64 `protobuf:"varint,4,opt,name=finalized_block_height,json=finalizedBlockHeight,proto3" json:"finalized_block_height,omitempty"` + KeygenBlockHeight int64 `protobuf:"varint,5,opt,name=keygen_block_height,json=keygenBlockHeight,proto3" json:"keygen_block_height,omitempty"` + ProcessId uint64 `protobuf:"varint,6,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` +} + +func (x *TssKey) Reset() { + *x = TssKey{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TssKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TssKey) ProtoMessage() {} + +// Deprecated: Use TssKey.ProtoReflect.Descriptor instead. +func (*TssKey) Descriptor() ([]byte, []int) { + return file_utss_v1_types_proto_rawDescGZIP(), []int{2} +} + +func (x *TssKey) GetTssPubkey() string { + if x != nil { + return x.TssPubkey + } + return "" +} + +func (x *TssKey) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +func (x *TssKey) GetParticipants() []string { + if x != nil { + return x.Participants + } + return nil +} + +func (x *TssKey) GetFinalizedBlockHeight() int64 { + if x != nil { + return x.FinalizedBlockHeight + } + return 0 +} + +func (x *TssKey) GetKeygenBlockHeight() int64 { + if x != nil { + return x.KeygenBlockHeight + } + return 0 +} + +func (x *TssKey) GetProcessId() uint64 { + if x != nil { + return x.ProcessId + } + return 0 +} + +var File_utss_v1_types_proto protoreflect.FileDescriptor + +var file_utss_v1_types_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, + 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, + 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x38, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x64, + 0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x64, 0x6d, 0x69, 0x6e, + 0x3a, 0x18, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0b, 0x75, + 0x74, 0x73, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa0, 0x02, 0x0a, 0x0d, 0x54, + 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x34, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x75, + 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 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, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x79, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3a, + 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x73, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x3a, 0x21, 0x98, 0xa0, 0x1f, 0x00, + 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x14, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x74, 0x73, + 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x82, 0x02, + 0x0a, 0x06, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x73, 0x5f, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, + 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x12, 0x22, + 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, + 0x74, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x14, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x6b, 0x65, 0x79, 0x67, + 0x65, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x6b, 0x65, 0x79, 0x67, 0x65, 0x6e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x3a, 0x19, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, + 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0c, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x74, 0x73, 0x73, 0x5f, 0x6b, + 0x65, 0x79, 0x2a, 0x6b, 0x0a, 0x13, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x53, 0x53, + 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x50, 0x45, 0x4e, + 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x53, 0x53, 0x5f, 0x4b, 0x45, + 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, + 0x53, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x50, + 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x02, 0x2a, + 0x41, 0x0a, 0x0e, 0x54, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x53, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, + 0x5f, 0x4b, 0x45, 0x59, 0x47, 0x45, 0x4e, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x53, 0x53, + 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x52, 0x45, 0x53, 0x48, 0x41, 0x52, 0x45, + 0x10, 0x01, 0x42, 0x8f, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, + 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, + 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, + 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_utss_v1_types_proto_rawDescOnce sync.Once + file_utss_v1_types_proto_rawDescData = file_utss_v1_types_proto_rawDesc +) + +func file_utss_v1_types_proto_rawDescGZIP() []byte { + file_utss_v1_types_proto_rawDescOnce.Do(func() { + file_utss_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_utss_v1_types_proto_rawDescData) + }) + return file_utss_v1_types_proto_rawDescData +} + +var file_utss_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_utss_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_utss_v1_types_proto_goTypes = []interface{}{ + (TssKeyProcessStatus)(0), // 0: utss.v1.TssKeyProcessStatus + (TssProcessType)(0), // 1: utss.v1.TssProcessType + (*Params)(nil), // 2: utss.v1.Params + (*TssKeyProcess)(nil), // 3: utss.v1.TssKeyProcess + (*TssKey)(nil), // 4: utss.v1.TssKey +} +var file_utss_v1_types_proto_depIdxs = []int32{ + 0, // 0: utss.v1.TssKeyProcess.status:type_name -> utss.v1.TssKeyProcessStatus + 1, // 1: utss.v1.TssKeyProcess.process_type:type_name -> utss.v1.TssProcessType + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_utss_v1_types_proto_init() } +func file_utss_v1_types_proto_init() { + if File_utss_v1_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_utss_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TssKeyProcess); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TssKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_utss_v1_types_proto_rawDesc, + NumEnums: 2, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_utss_v1_types_proto_goTypes, + DependencyIndexes: file_utss_v1_types_proto_depIdxs, + EnumInfos: file_utss_v1_types_proto_enumTypes, + MessageInfos: file_utss_v1_types_proto_msgTypes, + }.Build() + File_utss_v1_types_proto = out.File + file_utss_v1_types_proto_rawDesc = nil + file_utss_v1_types_proto_goTypes = nil + file_utss_v1_types_proto_depIdxs = nil +} diff --git a/app/app.go b/app/app.go index 1f8d9157..20097f07 100755 --- a/app/app.go +++ b/app/app.go @@ -760,7 +760,7 @@ func NewChainApp( runtime.NewKVStoreService(keys[utsstypes.StoreKey]), logger, authtypes.NewModuleAddress(govtypes.ModuleName).String(), - app.UregistryKeeper, + app.UvalidatorKeeper, ) app.UvalidatorKeeper.SetHooks( @@ -1038,7 +1038,7 @@ func NewChainApp( utxverifier.NewAppModule(appCodec, app.UtxverifierKeeper, app.UregistryKeeper), uregistry.NewAppModule(appCodec, app.UregistryKeeper, app.EVMKeeper), uvalidator.NewAppModule(appCodec, app.UvalidatorKeeper, app.StakingKeeper, app.SlashingKeeper), - utss.NewAppModule(appCodec, app.UtssKeeper, app.UregistryKeeper), + utss.NewAppModule(appCodec, app.UtssKeeper, app.UvalidatorKeeper), ) // BasicModuleManager defines the module BasicManager is in charge of setting up basic, diff --git a/x/utss/types/query.pb.go b/x/utss/types/query.pb.go index 268fdfa9..b785104d 100644 --- a/x/utss/types/query.pb.go +++ b/x/utss/types/query.pb.go @@ -119,24 +119,24 @@ func init() { func init() { proto.RegisterFile("utss/v1/query.proto", fileDescriptor_2af2863e9a096df1) } var fileDescriptor_2af2863e9a096df1 = []byte{ - // 258 bytes of a gzipped FileDescriptorProto + // 264 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2e, 0x2d, 0x29, 0x2e, 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x07, 0x09, 0xea, 0x95, 0x19, 0x4a, 0xc9, 0xa4, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, 0xea, 0x27, 0x16, 0x64, 0xea, 0x27, 0xe6, 0xe5, 0xe5, 0x97, 0x24, 0x96, 0x64, 0xe6, 0xe7, 0x15, 0x43, 0x94, - 0x49, 0x89, 0xc2, 0xf4, 0xa6, 0xa7, 0xe6, 0xa5, 0x16, 0x67, 0x42, 0x85, 0x95, 0x44, 0xb8, 0x84, - 0x02, 0x41, 0x86, 0x05, 0x24, 0x16, 0x25, 0xe6, 0x16, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, - 0x28, 0xd9, 0x71, 0x09, 0xa3, 0x88, 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x0a, 0xa9, 0x73, 0xb1, - 0x15, 0x80, 0x45, 0x24, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0xf8, 0xf5, 0xa0, 0x76, 0xeb, 0x41, - 0x15, 0x42, 0xa5, 0x8d, 0x52, 0xb9, 0x58, 0xc1, 0xfa, 0x85, 0x62, 0xb8, 0xd8, 0x20, 0x52, 0x42, - 0xd2, 0x70, 0xb5, 0x98, 0xf6, 0x49, 0xc9, 0x60, 0x97, 0x84, 0x58, 0xab, 0x24, 0xde, 0x74, 0xf9, - 0xc9, 0x64, 0x26, 0x41, 0x21, 0x7e, 0x7d, 0x98, 0x1f, 0x20, 0xd6, 0x38, 0x79, 0x9f, 0x78, 0x24, - 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, - 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x61, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, - 0x72, 0x7e, 0xae, 0x7e, 0x41, 0x69, 0x71, 0x46, 0x72, 0x46, 0x62, 0x66, 0x1e, 0x98, 0xa5, 0x0b, - 0x66, 0xea, 0xe6, 0xe5, 0xa7, 0xa4, 0xea, 0x57, 0x40, 0x0c, 0x2c, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, - 0x62, 0x03, 0x07, 0x88, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xf3, 0xb3, 0x09, 0xd9, 0x65, 0x01, - 0x00, 0x00, + 0x49, 0x89, 0xc2, 0xf4, 0xa6, 0xa7, 0xe6, 0xa5, 0x16, 0x67, 0xc2, 0x84, 0xe1, 0x46, 0x96, 0x54, + 0x16, 0xa4, 0x42, 0x05, 0x95, 0x44, 0xb8, 0x84, 0x02, 0x41, 0x36, 0x04, 0x24, 0x16, 0x25, 0xe6, + 0x16, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x28, 0xd9, 0x71, 0x09, 0xa3, 0x88, 0x16, 0x17, + 0xe4, 0xe7, 0x15, 0xa7, 0x0a, 0xa9, 0x73, 0xb1, 0x15, 0x80, 0x45, 0x24, 0x18, 0x15, 0x18, 0x35, + 0xb8, 0x8d, 0xf8, 0xf5, 0xa0, 0x0e, 0xd2, 0x83, 0x2a, 0x84, 0x4a, 0x1b, 0xa5, 0x72, 0xb1, 0x82, + 0xf5, 0x0b, 0xc5, 0x70, 0xb1, 0x41, 0xa4, 0x84, 0xa4, 0xe1, 0x6a, 0x31, 0xed, 0x93, 0x92, 0xc1, + 0x2e, 0x09, 0xb1, 0x56, 0x49, 0xbc, 0xe9, 0xf2, 0x93, 0xc9, 0x4c, 0x82, 0x42, 0xfc, 0xfa, 0x30, + 0x1f, 0x40, 0xac, 0x71, 0xf2, 0x3e, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, + 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, + 0xc3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x82, 0xd2, 0xe2, 0x8c, + 0xe4, 0x8c, 0xc4, 0xcc, 0x3c, 0x30, 0x4b, 0x17, 0xcc, 0xd4, 0xcd, 0xcb, 0x4f, 0x49, 0xd5, 0xaf, + 0x80, 0x18, 0x08, 0x0e, 0x8f, 0x24, 0x36, 0x70, 0x80, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, + 0x47, 0x26, 0xb9, 0xda, 0x7a, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/utss/types/tx.pb.go b/x/utss/types/tx.pb.go index 39872450..90450b45 100644 --- a/x/utss/types/tx.pb.go +++ b/x/utss/types/tx.pb.go @@ -8,6 +8,7 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -129,36 +130,180 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo +// Admin initiates new keygen/reshare process +type MsgInitiateTssKeyProcess struct { + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + ProcessType TssProcessType `protobuf:"varint,2,opt,name=process_type,json=processType,proto3,enum=utss.v1.TssProcessType" json:"process_type,omitempty"` + ExpiryHeight uint64 `protobuf:"varint,3,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` +} + +func (m *MsgInitiateTssKeyProcess) Reset() { *m = MsgInitiateTssKeyProcess{} } +func (m *MsgInitiateTssKeyProcess) String() string { return proto.CompactTextString(m) } +func (*MsgInitiateTssKeyProcess) ProtoMessage() {} +func (*MsgInitiateTssKeyProcess) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{2} +} +func (m *MsgInitiateTssKeyProcess) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitiateTssKeyProcess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitiateTssKeyProcess.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 *MsgInitiateTssKeyProcess) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitiateTssKeyProcess.Merge(m, src) +} +func (m *MsgInitiateTssKeyProcess) XXX_Size() int { + return m.Size() +} +func (m *MsgInitiateTssKeyProcess) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitiateTssKeyProcess.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitiateTssKeyProcess proto.InternalMessageInfo + +func (m *MsgInitiateTssKeyProcess) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgInitiateTssKeyProcess) GetProcessType() TssProcessType { + if m != nil { + return m.ProcessType + } + return TssProcessType_TSS_PROCESS_KEYGEN +} + +func (m *MsgInitiateTssKeyProcess) GetExpiryHeight() uint64 { + if m != nil { + return m.ExpiryHeight + } + return 0 +} + +// Universal validator votes on an ongoing TSS key process +type MsgVoteTssKeyProcess struct { + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + ProcessId uint64 `protobuf:"varint,2,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` + TssPubkey string `protobuf:"bytes,3,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` + KeyId string `protobuf:"bytes,4,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` +} + +func (m *MsgVoteTssKeyProcess) Reset() { *m = MsgVoteTssKeyProcess{} } +func (m *MsgVoteTssKeyProcess) String() string { return proto.CompactTextString(m) } +func (*MsgVoteTssKeyProcess) ProtoMessage() {} +func (*MsgVoteTssKeyProcess) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{3} +} +func (m *MsgVoteTssKeyProcess) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteTssKeyProcess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteTssKeyProcess.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 *MsgVoteTssKeyProcess) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteTssKeyProcess.Merge(m, src) +} +func (m *MsgVoteTssKeyProcess) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteTssKeyProcess) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteTssKeyProcess.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteTssKeyProcess proto.InternalMessageInfo + +func (m *MsgVoteTssKeyProcess) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgVoteTssKeyProcess) GetProcessId() uint64 { + if m != nil { + return m.ProcessId + } + return 0 +} + +func (m *MsgVoteTssKeyProcess) GetTssPubkey() string { + if m != nil { + return m.TssPubkey + } + return "" +} + +func (m *MsgVoteTssKeyProcess) GetKeyId() string { + if m != nil { + return m.KeyId + } + return "" +} + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "utss.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "utss.v1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgInitiateTssKeyProcess)(nil), "utss.v1.MsgInitiateTssKeyProcess") + proto.RegisterType((*MsgVoteTssKeyProcess)(nil), "utss.v1.MsgVoteTssKeyProcess") } func init() { proto.RegisterFile("utss/v1/tx.proto", fileDescriptor_4dcb8cba4d8073e4) } var fileDescriptor_4dcb8cba4d8073e4 = []byte{ - // 325 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x28, 0x2d, 0x29, 0x2e, - 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x07, 0x89, - 0xe8, 0x95, 0x19, 0x4a, 0x89, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xeb, 0xe7, 0x16, 0xa7, 0x83, - 0x14, 0xe4, 0x16, 0xa7, 0x43, 0x54, 0x48, 0x89, 0xc2, 0xf4, 0xa4, 0xa7, 0xe6, 0xa5, 0x16, 0x67, - 0x16, 0x43, 0x85, 0x45, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x4c, 0x7d, 0x10, 0x0b, 0x2a, 0x2a, 0x09, - 0x31, 0x25, 0x1e, 0x22, 0x01, 0xe1, 0x40, 0xa4, 0x94, 0x3a, 0x18, 0xb9, 0xf8, 0x7d, 0x8b, 0xd3, - 0x43, 0x0b, 0x52, 0x12, 0x4b, 0x52, 0x03, 0x12, 0x8b, 0x12, 0x73, 0x8b, 0x85, 0xcc, 0xb8, 0x38, - 0x13, 0x4b, 0x4b, 0x32, 0xf2, 0x8b, 0x32, 0x4b, 0x2a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x9d, - 0x24, 0x2e, 0x6d, 0xd1, 0x15, 0x81, 0x6a, 0x74, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x0e, 0x2e, - 0x29, 0xca, 0xcc, 0x4b, 0x0f, 0x42, 0x28, 0x15, 0xd2, 0xe5, 0x62, 0x2b, 0x00, 0x9b, 0x20, 0xc1, - 0xa4, 0xc0, 0xa8, 0xc1, 0x6d, 0xc4, 0xaf, 0x07, 0xf5, 0x86, 0x1e, 0xc4, 0x60, 0x27, 0x96, 0x13, - 0xf7, 0xe4, 0x19, 0x82, 0xa0, 0x8a, 0xac, 0xf8, 0x9a, 0x9e, 0x6f, 0xd0, 0x42, 0x68, 0x57, 0x92, - 0xe4, 0x12, 0x47, 0x73, 0x49, 0x50, 0x6a, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x51, 0x04, 0x17, - 0xb3, 0x6f, 0x71, 0xba, 0x90, 0x17, 0x17, 0x0f, 0x8a, 0x43, 0x25, 0xe0, 0x16, 0xa0, 0x69, 0x94, - 0x52, 0xc0, 0x25, 0x03, 0x33, 0x52, 0x8a, 0xb5, 0xe1, 0xf9, 0x06, 0x2d, 0x46, 0x27, 0xef, 0x13, - 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, - 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, - 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x28, 0x2d, 0xce, 0x48, 0xce, 0x48, 0xcc, 0xcc, 0x03, 0xb3, - 0x74, 0xc1, 0x4c, 0xdd, 0xbc, 0xfc, 0x94, 0x54, 0xfd, 0x0a, 0x7d, 0x70, 0x44, 0x94, 0x54, 0x16, - 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xc3, 0xd4, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x10, 0x88, - 0xdc, 0xd1, 0x01, 0x00, 0x00, + // 525 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xc1, 0x8f, 0xd2, 0x4e, + 0x14, 0x66, 0x7e, 0xcb, 0xf2, 0x0b, 0xb3, 0xeb, 0xae, 0xd6, 0xdd, 0x50, 0x48, 0xac, 0x04, 0x2f, + 0x48, 0x42, 0x2b, 0x98, 0x78, 0xe0, 0x26, 0x27, 0x71, 0x43, 0x42, 0x2a, 0x1a, 0xe3, 0x85, 0x14, + 0x3a, 0x99, 0x4e, 0x48, 0x3b, 0x93, 0xbe, 0x61, 0x43, 0x6f, 0xc6, 0x93, 0xf1, 0xe4, 0x9f, 0xc2, + 0xc1, 0x3f, 0x82, 0xe3, 0xc6, 0x93, 0x17, 0x8d, 0x81, 0x03, 0xff, 0x86, 0xe9, 0x74, 0x00, 0x97, + 0xc4, 0x78, 0xf0, 0x42, 0xde, 0x7c, 0xdf, 0x7b, 0x1f, 0xdf, 0x37, 0x6f, 0x8a, 0xef, 0xce, 0x24, + 0x80, 0x73, 0xdd, 0x72, 0xe4, 0xdc, 0x16, 0x31, 0x97, 0xdc, 0xf8, 0x3f, 0x45, 0xec, 0xeb, 0x56, + 0xa5, 0x34, 0xe1, 0x10, 0x72, 0x70, 0x42, 0xa0, 0x69, 0x43, 0x08, 0x34, 0xeb, 0xa8, 0x5c, 0x6e, + 0x67, 0x28, 0x89, 0x08, 0x30, 0xd0, 0xf0, 0xfd, 0x9d, 0x54, 0x22, 0xc8, 0x16, 0xbc, 0xa0, 0x9c, + 0x72, 0x55, 0x3a, 0x69, 0xa5, 0xd1, 0x72, 0x26, 0x3d, 0xca, 0x88, 0xec, 0xa0, 0xa9, 0x7b, 0x5e, + 0xc8, 0x22, 0xee, 0xa8, 0xdf, 0x0c, 0xaa, 0x7d, 0x44, 0xf8, 0xbc, 0x0f, 0xf4, 0xb5, 0xf0, 0x3d, + 0x49, 0x06, 0x5e, 0xec, 0x85, 0x60, 0x3c, 0xc3, 0x45, 0x6f, 0x26, 0x03, 0x1e, 0x33, 0x99, 0x98, + 0xa8, 0x8a, 0xea, 0xc5, 0xae, 0xf9, 0xf5, 0x4b, 0xf3, 0x42, 0x6b, 0x3d, 0xf7, 0xfd, 0x98, 0x00, + 0xbc, 0x92, 0x31, 0x8b, 0xa8, 0xbb, 0x6f, 0x35, 0x9a, 0xb8, 0x20, 0x94, 0x82, 0xf9, 0x5f, 0x15, + 0xd5, 0x4f, 0xda, 0xe7, 0xb6, 0x8e, 0x6b, 0x67, 0xc2, 0xdd, 0xfc, 0xf2, 0xc7, 0xc3, 0x9c, 0xab, + 0x9b, 0x3a, 0x67, 0x1f, 0x36, 0x8b, 0xc6, 0x7e, 0xbc, 0x56, 0xc6, 0xa5, 0x03, 0x27, 0x2e, 0x01, + 0xc1, 0x23, 0x20, 0xb5, 0xef, 0x08, 0x9b, 0x7d, 0xa0, 0xbd, 0x88, 0x49, 0xe6, 0x49, 0x32, 0x04, + 0xb8, 0x22, 0xc9, 0x20, 0xe6, 0x13, 0x02, 0x60, 0x3c, 0xc1, 0x05, 0x60, 0x34, 0x22, 0xf1, 0x5f, + 0xbd, 0xea, 0x3e, 0xa3, 0x83, 0x4f, 0x45, 0x36, 0x3c, 0x4a, 0xef, 0x53, 0xd9, 0x3d, 0x6b, 0x97, + 0x76, 0x76, 0x87, 0x00, 0x5a, 0x7c, 0x98, 0x08, 0xe2, 0x9e, 0x88, 0xfd, 0xc1, 0x78, 0x84, 0xef, + 0x90, 0xb9, 0x60, 0x71, 0x32, 0x0a, 0x08, 0xa3, 0x81, 0x34, 0x8f, 0xaa, 0xa8, 0x9e, 0x77, 0x4f, + 0x33, 0xf0, 0x85, 0xc2, 0x3a, 0x76, 0x1a, 0x4d, 0xff, 0xdb, 0xa7, 0xcd, 0xa2, 0x61, 0xa9, 0xf5, + 0xf5, 0x81, 0xbe, 0xe1, 0x92, 0x6c, 0x53, 0xec, 0x23, 0xd4, 0x96, 0x08, 0x5f, 0x68, 0xf6, 0x5f, + 0xb3, 0x3d, 0xc0, 0x78, 0x9b, 0x8d, 0xf9, 0x2a, 0x59, 0xde, 0x2d, 0x6a, 0xa4, 0xe7, 0xa7, 0xb4, + 0x04, 0x18, 0x89, 0xd9, 0x78, 0x4a, 0x12, 0xe5, 0xbd, 0xe8, 0x16, 0x25, 0xc0, 0x40, 0x01, 0xc6, + 0x25, 0x2e, 0x4c, 0x49, 0x92, 0x4e, 0xe6, 0x15, 0x75, 0x3c, 0x25, 0x49, 0xcf, 0xef, 0x3c, 0x3e, + 0xc8, 0x53, 0xfe, 0x3d, 0xcf, 0x2d, 0xc7, 0xed, 0xb7, 0xf8, 0xa8, 0x0f, 0xd4, 0x78, 0x89, 0x4f, + 0x6f, 0xbd, 0x29, 0x73, 0x77, 0xb9, 0x07, 0x3b, 0xae, 0x54, 0xff, 0xc4, 0x6c, 0xb7, 0x5f, 0x39, + 0x7e, 0xbf, 0x59, 0x34, 0x50, 0xf7, 0x6a, 0xb9, 0xb2, 0xd0, 0xcd, 0xca, 0x42, 0x3f, 0x57, 0x16, + 0xfa, 0xbc, 0xb6, 0x72, 0x37, 0x6b, 0x2b, 0xf7, 0x6d, 0x6d, 0xe5, 0xde, 0xb5, 0x28, 0x93, 0xc1, + 0x6c, 0x6c, 0x4f, 0x78, 0xe8, 0x88, 0x19, 0x04, 0x93, 0xc0, 0x63, 0x91, 0xaa, 0x9a, 0xaa, 0x6c, + 0x46, 0xdc, 0x27, 0xce, 0xdc, 0x51, 0xae, 0xd5, 0x17, 0x34, 0x2e, 0xa8, 0xe7, 0xff, 0xf4, 0x57, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xfe, 0x91, 0xa4, 0xa4, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -310,6 +455,95 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *MsgInitiateTssKeyProcess) 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 *MsgInitiateTssKeyProcess) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitiateTssKeyProcess) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ExpiryHeight != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ExpiryHeight)) + i-- + dAtA[i] = 0x18 + } + if m.ProcessType != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ProcessType)) + i-- + dAtA[i] = 0x10 + } + 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 *MsgVoteTssKeyProcess) 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 *MsgVoteTssKeyProcess) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteTssKeyProcess) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.KeyId) > 0 { + i -= len(m.KeyId) + copy(dAtA[i:], m.KeyId) + i = encodeVarintTx(dAtA, i, uint64(len(m.KeyId))) + i-- + dAtA[i] = 0x22 + } + if len(m.TssPubkey) > 0 { + i -= len(m.TssPubkey) + copy(dAtA[i:], m.TssPubkey) + i = encodeVarintTx(dAtA, i, uint64(len(m.TssPubkey))) + i-- + dAtA[i] = 0x1a + } + if m.ProcessId != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ProcessId)) + i-- + dAtA[i] = 0x10 + } + 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 encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -345,6 +579,49 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } +func (m *MsgInitiateTssKeyProcess) 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.ProcessType != 0 { + n += 1 + sovTx(uint64(m.ProcessType)) + } + if m.ExpiryHeight != 0 { + n += 1 + sovTx(uint64(m.ExpiryHeight)) + } + return n +} + +func (m *MsgVoteTssKeyProcess) 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.ProcessId != 0 { + n += 1 + sovTx(uint64(m.ProcessId)) + } + l = len(m.TssPubkey) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.KeyId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -516,6 +793,291 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgInitiateTssKeyProcess) 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: MsgInitiateTssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitiateTssKeyProcess: 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 != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessType", wireType) + } + m.ProcessType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessType |= TssProcessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) + } + m.ExpiryHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpiryHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *MsgVoteTssKeyProcess) 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: MsgVoteTssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteTssKeyProcess: 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 != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) + } + m.ProcessId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", 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.TssPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyId", 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.KeyId = string(dAtA[iNdEx:postIndex]) + 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 skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/utss/types/types.pb.go b/x/utss/types/types.pb.go new file mode 100644 index 00000000..5c3ed21e --- /dev/null +++ b/x/utss/types/types.pb.go @@ -0,0 +1,1243 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: utss/v1/types.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type TssKeyProcessStatus int32 + +const ( + TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING TssKeyProcessStatus = 0 + TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS TssKeyProcessStatus = 1 + TssKeyProcessStatus_TSS_KEY_PROCESS_FAILED TssKeyProcessStatus = 2 +) + +var TssKeyProcessStatus_name = map[int32]string{ + 0: "TSS_KEY_PROCESS_PENDING", + 1: "TSS_KEY_PROCESS_SUCCESS", + 2: "TSS_KEY_PROCESS_FAILED", +} + +var TssKeyProcessStatus_value = map[string]int32{ + "TSS_KEY_PROCESS_PENDING": 0, + "TSS_KEY_PROCESS_SUCCESS": 1, + "TSS_KEY_PROCESS_FAILED": 2, +} + +func (x TssKeyProcessStatus) String() string { + return proto.EnumName(TssKeyProcessStatus_name, int32(x)) +} + +func (TssKeyProcessStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_6ecfa9650339f6c3, []int{0} +} + +type TssProcessType int32 + +const ( + TssProcessType_TSS_PROCESS_KEYGEN TssProcessType = 0 + TssProcessType_TSS_PROCESS_RESHARE TssProcessType = 1 +) + +var TssProcessType_name = map[int32]string{ + 0: "TSS_PROCESS_KEYGEN", + 1: "TSS_PROCESS_RESHARE", +} + +var TssProcessType_value = map[string]int32{ + "TSS_PROCESS_KEYGEN": 0, + "TSS_PROCESS_RESHARE": 1, +} + +func (x TssProcessType) String() string { + return proto.EnumName(TssProcessType_name, int32(x)) +} + +func (TssProcessType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_6ecfa9650339f6c3, []int{1} +} + +type Params struct { + // The admin account of the utss module. + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_6ecfa9650339f6c3, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +// TSS key process information +type TssKeyProcess struct { + Status TssKeyProcessStatus `protobuf:"varint,1,opt,name=status,proto3,enum=utss.v1.TssKeyProcessStatus" json:"status,omitempty"` + Participants []string `protobuf:"bytes,2,rep,name=participants,proto3" json:"participants,omitempty"` + BlockHeight int64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + ExpiryHeight int64 `protobuf:"varint,4,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` + ProcessType TssProcessType `protobuf:"varint,5,opt,name=process_type,json=processType,proto3,enum=utss.v1.TssProcessType" json:"process_type,omitempty"` + Id uint64 `protobuf:"varint,6,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *TssKeyProcess) Reset() { *m = TssKeyProcess{} } +func (*TssKeyProcess) ProtoMessage() {} +func (*TssKeyProcess) Descriptor() ([]byte, []int) { + return fileDescriptor_6ecfa9650339f6c3, []int{1} +} +func (m *TssKeyProcess) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TssKeyProcess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TssKeyProcess.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 *TssKeyProcess) XXX_Merge(src proto.Message) { + xxx_messageInfo_TssKeyProcess.Merge(m, src) +} +func (m *TssKeyProcess) XXX_Size() int { + return m.Size() +} +func (m *TssKeyProcess) XXX_DiscardUnknown() { + xxx_messageInfo_TssKeyProcess.DiscardUnknown(m) +} + +var xxx_messageInfo_TssKeyProcess proto.InternalMessageInfo + +func (m *TssKeyProcess) GetStatus() TssKeyProcessStatus { + if m != nil { + return m.Status + } + return TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING +} + +func (m *TssKeyProcess) GetParticipants() []string { + if m != nil { + return m.Participants + } + return nil +} + +func (m *TssKeyProcess) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *TssKeyProcess) GetExpiryHeight() int64 { + if m != nil { + return m.ExpiryHeight + } + return 0 +} + +func (m *TssKeyProcess) GetProcessType() TssProcessType { + if m != nil { + return m.ProcessType + } + return TssProcessType_TSS_PROCESS_KEYGEN +} + +func (m *TssKeyProcess) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +// Finalized TSS key details +type TssKey struct { + TssPubkey string `protobuf:"bytes,1,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` + KeyId string `protobuf:"bytes,2,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + Participants []string `protobuf:"bytes,3,rep,name=participants,proto3" json:"participants,omitempty"` + FinalizedBlockHeight int64 `protobuf:"varint,4,opt,name=finalized_block_height,json=finalizedBlockHeight,proto3" json:"finalized_block_height,omitempty"` + KeygenBlockHeight int64 `protobuf:"varint,5,opt,name=keygen_block_height,json=keygenBlockHeight,proto3" json:"keygen_block_height,omitempty"` + ProcessId uint64 `protobuf:"varint,6,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` +} + +func (m *TssKey) Reset() { *m = TssKey{} } +func (*TssKey) ProtoMessage() {} +func (*TssKey) Descriptor() ([]byte, []int) { + return fileDescriptor_6ecfa9650339f6c3, []int{2} +} +func (m *TssKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TssKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TssKey.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 *TssKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_TssKey.Merge(m, src) +} +func (m *TssKey) XXX_Size() int { + return m.Size() +} +func (m *TssKey) XXX_DiscardUnknown() { + xxx_messageInfo_TssKey.DiscardUnknown(m) +} + +var xxx_messageInfo_TssKey proto.InternalMessageInfo + +func (m *TssKey) GetTssPubkey() string { + if m != nil { + return m.TssPubkey + } + return "" +} + +func (m *TssKey) GetKeyId() string { + if m != nil { + return m.KeyId + } + return "" +} + +func (m *TssKey) GetParticipants() []string { + if m != nil { + return m.Participants + } + return nil +} + +func (m *TssKey) GetFinalizedBlockHeight() int64 { + if m != nil { + return m.FinalizedBlockHeight + } + return 0 +} + +func (m *TssKey) GetKeygenBlockHeight() int64 { + if m != nil { + return m.KeygenBlockHeight + } + return 0 +} + +func (m *TssKey) GetProcessId() uint64 { + if m != nil { + return m.ProcessId + } + return 0 +} + +func init() { + proto.RegisterEnum("utss.v1.TssKeyProcessStatus", TssKeyProcessStatus_name, TssKeyProcessStatus_value) + proto.RegisterEnum("utss.v1.TssProcessType", TssProcessType_name, TssProcessType_value) + proto.RegisterType((*Params)(nil), "utss.v1.Params") + proto.RegisterType((*TssKeyProcess)(nil), "utss.v1.TssKeyProcess") + proto.RegisterType((*TssKey)(nil), "utss.v1.TssKey") +} + +func init() { proto.RegisterFile("utss/v1/types.proto", fileDescriptor_6ecfa9650339f6c3) } + +var fileDescriptor_6ecfa9650339f6c3 = []byte{ + // 596 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0x3f, 0x6f, 0xd3, 0x40, + 0x18, 0xc6, 0x63, 0xa7, 0x0d, 0xca, 0xdb, 0xb4, 0x4a, 0x2f, 0xa1, 0x31, 0x85, 0xba, 0x69, 0x58, + 0xa2, 0x4a, 0x8d, 0x15, 0xe8, 0x80, 0xb2, 0xf5, 0x8f, 0x69, 0xa3, 0xa0, 0x12, 0xd9, 0x65, 0x28, + 0x8b, 0xe5, 0x3f, 0x87, 0x73, 0x72, 0xed, 0xb3, 0x72, 0x97, 0xaa, 0x66, 0x64, 0x64, 0x62, 0x64, + 0xec, 0x47, 0xe0, 0x63, 0x30, 0x76, 0x64, 0x44, 0xed, 0x00, 0x1f, 0x03, 0xf9, 0xec, 0x16, 0x07, + 0xba, 0xd8, 0xef, 0x3d, 0xcf, 0xf3, 0x9e, 0xde, 0xfb, 0x9d, 0x0e, 0x1a, 0x33, 0xce, 0x98, 0x76, + 0xd1, 0xd7, 0x78, 0x12, 0x63, 0xd6, 0x8b, 0xa7, 0x94, 0x53, 0xf4, 0x28, 0x15, 0x7b, 0x17, 0xfd, + 0x75, 0xd5, 0xa5, 0x2c, 0xa4, 0x4c, 0x73, 0x6c, 0x86, 0xb5, 0x8b, 0xbe, 0x83, 0xb9, 0xdd, 0xd7, + 0x5c, 0x4a, 0xa2, 0x2c, 0xb8, 0xde, 0xca, 0xfd, 0x90, 0xf9, 0xe9, 0x1e, 0x21, 0xf3, 0x73, 0xa3, + 0xe9, 0x53, 0x9f, 0x8a, 0x52, 0x4b, 0xab, 0x5c, 0x5d, 0xb5, 0x43, 0x12, 0x51, 0x4d, 0x7c, 0x33, + 0xa9, 0xf3, 0x0a, 0x2a, 0x63, 0x7b, 0x6a, 0x87, 0x0c, 0x35, 0x61, 0xd1, 0xf6, 0x42, 0x12, 0x29, + 0x52, 0x5b, 0xea, 0x56, 0x8d, 0x6c, 0x31, 0x50, 0xbe, 0x5e, 0x6d, 0x96, 0x7e, 0x5f, 0x6d, 0x4a, + 0x9f, 0x7f, 0x7d, 0xdb, 0x5e, 0x12, 0xc3, 0xc6, 0x22, 0xdf, 0xb9, 0x92, 0x61, 0xf9, 0x94, 0xb1, + 0x11, 0x4e, 0xc6, 0x53, 0xea, 0x62, 0xc6, 0xd0, 0x2e, 0x54, 0x18, 0xb7, 0xf9, 0x8c, 0x89, 0x2d, + 0x56, 0x5e, 0x3c, 0xeb, 0xe5, 0xe7, 0xe8, 0xcd, 0xe5, 0x4c, 0x91, 0x31, 0xf2, 0x2c, 0xea, 0x40, + 0x2d, 0xb6, 0xa7, 0x9c, 0xb8, 0x24, 0xb6, 0x23, 0xce, 0x14, 0xb9, 0x5d, 0xee, 0x56, 0x8d, 0x39, + 0x0d, 0x6d, 0x41, 0xcd, 0x39, 0xa7, 0x6e, 0x60, 0x4d, 0x30, 0xf1, 0x27, 0x5c, 0x29, 0xb7, 0xa5, + 0x6e, 0xd9, 0x58, 0x12, 0xda, 0xb1, 0x90, 0xd0, 0x73, 0x58, 0xc6, 0x97, 0x31, 0x99, 0x26, 0x77, + 0x99, 0x05, 0x91, 0xa9, 0x65, 0x62, 0x1e, 0x1a, 0x40, 0x2d, 0xce, 0x86, 0xb0, 0x52, 0xde, 0xca, + 0xa2, 0x98, 0xb3, 0x55, 0x9c, 0x33, 0x1f, 0xf2, 0x34, 0x89, 0xb1, 0xb1, 0x14, 0xff, 0x5d, 0xa0, + 0x15, 0x90, 0x89, 0xa7, 0x54, 0xda, 0x52, 0x77, 0xc1, 0x90, 0x89, 0x37, 0xd8, 0x2a, 0x92, 0x69, + 0x0a, 0x32, 0x9c, 0x31, 0x2b, 0xc0, 0x89, 0x95, 0xb7, 0x75, 0x3e, 0xc9, 0x50, 0xc9, 0x8e, 0x8e, + 0x36, 0x00, 0x52, 0x37, 0x9e, 0x39, 0x01, 0x4e, 0x72, 0xc4, 0x55, 0xce, 0xd8, 0x58, 0x08, 0xe8, + 0x31, 0x54, 0xd2, 0x46, 0xe2, 0x29, 0x72, 0x46, 0x3f, 0xc0, 0xc9, 0xd0, 0xfb, 0x8f, 0x4d, 0xf9, + 0x01, 0x36, 0xbb, 0xb0, 0xf6, 0x81, 0x44, 0xf6, 0x39, 0xf9, 0x88, 0x3d, 0x6b, 0x8e, 0x52, 0x46, + 0xa0, 0x79, 0xef, 0xee, 0x17, 0x70, 0xf5, 0xa0, 0x11, 0xe0, 0xc4, 0xc7, 0xd1, 0x7c, 0xcb, 0xa2, + 0x68, 0x59, 0xcd, 0xac, 0x62, 0x7e, 0x03, 0xe0, 0x8e, 0xdc, 0x3d, 0x85, 0x6a, 0xae, 0x0c, 0xbd, + 0xc1, 0x93, 0x22, 0x8c, 0x5a, 0x11, 0xc6, 0x76, 0x00, 0x8d, 0x07, 0xae, 0x1f, 0x3d, 0x85, 0xd6, + 0xa9, 0x69, 0x5a, 0x23, 0xfd, 0xcc, 0x1a, 0x1b, 0x6f, 0x0f, 0x74, 0xd3, 0xb4, 0xc6, 0xfa, 0xc9, + 0xe1, 0xf0, 0xe4, 0xa8, 0x5e, 0x7a, 0xc8, 0x34, 0xdf, 0x1d, 0xa4, 0xff, 0xba, 0x84, 0xd6, 0x61, + 0xed, 0x5f, 0xf3, 0xf5, 0xde, 0xf0, 0x8d, 0x7e, 0x58, 0x97, 0xb7, 0xf7, 0x60, 0x65, 0xfe, 0x0e, + 0xd1, 0x1a, 0xa0, 0x34, 0x7d, 0x97, 0x1c, 0xe9, 0x67, 0x47, 0xfa, 0x49, 0xbd, 0x84, 0x5a, 0xd0, + 0x28, 0xea, 0x86, 0x6e, 0x1e, 0xef, 0x19, 0x7a, 0x5d, 0xda, 0x1f, 0x7d, 0xbf, 0x51, 0xa5, 0xeb, + 0x1b, 0x55, 0xfa, 0x79, 0xa3, 0x4a, 0x5f, 0x6e, 0xd5, 0xd2, 0xf5, 0xad, 0x5a, 0xfa, 0x71, 0xab, + 0x96, 0xde, 0xf7, 0x7d, 0xc2, 0x27, 0x33, 0xa7, 0xe7, 0xd2, 0x50, 0x8b, 0x67, 0x6c, 0xe2, 0x4e, + 0x6c, 0x12, 0x89, 0x6a, 0x47, 0x94, 0x3b, 0x11, 0xf5, 0xb0, 0x76, 0xa9, 0x65, 0xc7, 0x4f, 0xdf, + 0xb3, 0x53, 0x11, 0xaf, 0xec, 0xe5, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x93, 0xe2, 0x2c, + 0xe7, 0x03, 0x00, 0x00, +} + +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Admin != that1.Admin { + return false + } + return true +} +func (this *TssKeyProcess) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TssKeyProcess) + if !ok { + that2, ok := that.(TssKeyProcess) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Status != that1.Status { + return false + } + if len(this.Participants) != len(that1.Participants) { + return false + } + for i := range this.Participants { + if this.Participants[i] != that1.Participants[i] { + return false + } + } + if this.BlockHeight != that1.BlockHeight { + return false + } + if this.ExpiryHeight != that1.ExpiryHeight { + return false + } + if this.ProcessType != that1.ProcessType { + return false + } + if this.Id != that1.Id { + return false + } + return true +} +func (this *TssKey) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TssKey) + if !ok { + that2, ok := that.(TssKey) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.TssPubkey != that1.TssPubkey { + return false + } + if this.KeyId != that1.KeyId { + return false + } + if len(this.Participants) != len(that1.Participants) { + return false + } + for i := range this.Participants { + if this.Participants[i] != that1.Participants[i] { + return false + } + } + if this.FinalizedBlockHeight != that1.FinalizedBlockHeight { + return false + } + if this.KeygenBlockHeight != that1.KeygenBlockHeight { + return false + } + if this.ProcessId != that1.ProcessId { + return false + } + return true +} +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TssKeyProcess) 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 *TssKeyProcess) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TssKeyProcess) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x30 + } + if m.ProcessType != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ProcessType)) + i-- + dAtA[i] = 0x28 + } + if m.ExpiryHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ExpiryHeight)) + i-- + dAtA[i] = 0x20 + } + if m.BlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x18 + } + if len(m.Participants) > 0 { + for iNdEx := len(m.Participants) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Participants[iNdEx]) + copy(dAtA[i:], m.Participants[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Participants[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.Status != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *TssKey) 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 *TssKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TssKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProcessId != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ProcessId)) + i-- + dAtA[i] = 0x30 + } + if m.KeygenBlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.KeygenBlockHeight)) + i-- + dAtA[i] = 0x28 + } + if m.FinalizedBlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.FinalizedBlockHeight)) + i-- + dAtA[i] = 0x20 + } + if len(m.Participants) > 0 { + for iNdEx := len(m.Participants) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Participants[iNdEx]) + copy(dAtA[i:], m.Participants[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Participants[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.KeyId) > 0 { + i -= len(m.KeyId) + copy(dAtA[i:], m.KeyId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.KeyId))) + i-- + dAtA[i] = 0x12 + } + if len(m.TssPubkey) > 0 { + i -= len(m.TssPubkey) + copy(dAtA[i:], m.TssPubkey) + i = encodeVarintTypes(dAtA, i, uint64(len(m.TssPubkey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *TssKeyProcess) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) + } + if len(m.Participants) > 0 { + for _, s := range m.Participants { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.BlockHeight != 0 { + n += 1 + sovTypes(uint64(m.BlockHeight)) + } + if m.ExpiryHeight != 0 { + n += 1 + sovTypes(uint64(m.ExpiryHeight)) + } + if m.ProcessType != 0 { + n += 1 + sovTypes(uint64(m.ProcessType)) + } + if m.Id != 0 { + n += 1 + sovTypes(uint64(m.Id)) + } + return n +} + +func (m *TssKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TssPubkey) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.KeyId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Participants) > 0 { + for _, s := range m.Participants { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.FinalizedBlockHeight != 0 { + n += 1 + sovTypes(uint64(m.FinalizedBlockHeight)) + } + if m.KeygenBlockHeight != 0 { + n += 1 + sovTypes(uint64(m.KeygenBlockHeight)) + } + if m.ProcessId != 0 { + n += 1 + sovTypes(uint64(m.ProcessId)) + } + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowTypes + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TssKeyProcess) 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 ErrIntOverflowTypes + } + 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: TssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + m.Status = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Status |= TssKeyProcessStatus(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Participants", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Participants = append(m.Participants, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) + } + m.ExpiryHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpiryHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessType", wireType) + } + m.ProcessType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessType |= TssProcessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TssKey) 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 ErrIntOverflowTypes + } + 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: TssKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TssKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TssPubkey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Participants", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Participants = append(m.Participants, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FinalizedBlockHeight", wireType) + } + m.FinalizedBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FinalizedBlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeygenBlockHeight", wireType) + } + m.KeygenBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KeygenBlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) + } + m.ProcessId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProcessId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/uvalidator/keeper/keeper.go b/x/uvalidator/keeper/keeper.go index 3329a89b..3c44be11 100755 --- a/x/uvalidator/keeper/keeper.go +++ b/x/uvalidator/keeper/keeper.go @@ -36,7 +36,7 @@ type Keeper struct { slashingKeeper types.SlashingKeeper authority string - hooks UValidatorHooks + hooks types.UValidatorHooks } // NewKeeper creates a new Keeper instance @@ -135,7 +135,7 @@ func (k Keeper) GetBlockHeight(ctx context.Context) (int64, error) { return sdkCtx.BlockHeight(), nil } -func (k *Keeper) SetHooks(h UValidatorHooks) *Keeper { +func (k *Keeper) SetHooks(h types.UValidatorHooks) *Keeper { if k.hooks != nil { panic("cannot set uvalidator hooks twice") } From 2c2381f3480e0aa4e370ccc497ab075034bbb207 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:13:38 +0530 Subject: [PATCH 051/105] fix: revert admin of uregistry module --- x/uregistry/types/params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/uregistry/types/params.go b/x/uregistry/types/params.go index dc56afee..548788eb 100755 --- a/x/uregistry/types/params.go +++ b/x/uregistry/types/params.go @@ -8,7 +8,7 @@ import ( func DefaultParams() Params { // TODO: return Params{ - Admin: "push1gjaw568e35hjc8udhat0xnsxxmkm2snrexxz20", + Admin: "push1negskcfqu09j5zvpk7nhvacnwyy2mafffy7r6a", } } From 07744c825f011343b373328fb97a9889d865921d Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:17:59 +0530 Subject: [PATCH 052/105] feat: added messages for initiating tss process and voting in proto --- proto/utss/v1/tx.proto | 10 ++++++++++ x/utss/keeper/msg_server.go | 23 ++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/proto/utss/v1/tx.proto b/proto/utss/v1/tx.proto index d5ee620d..ba504231 100755 --- a/proto/utss/v1/tx.proto +++ b/proto/utss/v1/tx.proto @@ -18,6 +18,12 @@ service Msg { // // Since: cosmos-sdk 0.47 rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + + // InitiateTssKeyProcess defines a operation for initiating a new tss key process + rpc InitiateTssKeyProcess(MsgInitiateTssKeyProcess) returns (MsgInitiateTssKeyProcessResponse); + + // VoteTssKeyProcess defines a operation for voting on an existing tss key process + rpc VoteTssKeyProcess(MsgVoteTssKeyProcess) returns (MsgVoteTssKeyProcessResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -52,6 +58,8 @@ message MsgInitiateTssKeyProcess { uint64 expiry_height = 3; } +message MsgInitiateTssKeyProcessResponse {} + // Universal validator votes on an ongoing TSS key process message MsgVoteTssKeyProcess { option (amino.name) = "utss/MsgVoteTssKeyProcess"; @@ -62,3 +70,5 @@ message MsgVoteTssKeyProcess { string tss_pubkey = 3; string key_id = 4; } + +message MsgVoteTssKeyProcessResponse {} \ No newline at end of file diff --git a/x/utss/keeper/msg_server.go b/x/utss/keeper/msg_server.go index 06a7e0c6..1fa9c580 100755 --- a/x/utss/keeper/msg_server.go +++ b/x/utss/keeper/msg_server.go @@ -20,10 +20,31 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &msgServer{k: keeper} } +// UpdateParams handles MsgUpdateParams for updating module parameters. +// Only authorized governance account can execute this. func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { if ms.k.authority != msg.Authority { return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority) } - return nil, ms.k.Params.Set(ctx, msg.Params) + err := ms.k.UpdateParams(ctx, msg.Params) + if err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} + +// InitiateTssKeyProcess implements types.MsgServer. +func (ms msgServer) InitiateTssKeyProcess(ctx context.Context, msg *types.MsgInitiateTssKeyProcess) (*types.MsgInitiateTssKeyProcessResponse, error) { + // ctx := sdk.UnwrapSDKContext(goCtx) + panic("InitiateTssKeyProcess is unimplemented") + return &types.MsgInitiateTssKeyProcessResponse{}, nil +} + +// VoteTssKeyProcess implements types.MsgServer. +func (ms msgServer) VoteTssKeyProcess(ctx context.Context, msg *types.MsgVoteTssKeyProcess) (*types.MsgVoteTssKeyProcessResponse, error) { + // ctx := sdk.UnwrapSDKContext(goCtx) + panic("VoteTssKeyProcess is unimplemented") + return &types.MsgVoteTssKeyProcessResponse{}, nil } From 19ad203affcee0375915d3bbf136a7a55139a935 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 12:18:16 +0530 Subject: [PATCH 053/105] refactor: added generated protobuf --- api/utss/v1/tx.pulsar.go | 1486 ++++++++++++++++++++++++++++--------- api/utss/v1/tx_grpc.pb.go | 80 +- x/utss/types/tx.pb.go | 388 +++++++++- 3 files changed, 1580 insertions(+), 374 deletions(-) diff --git a/api/utss/v1/tx.pulsar.go b/api/utss/v1/tx.pulsar.go index fd8a2b4a..10e174e4 100644 --- a/api/utss/v1/tx.pulsar.go +++ b/api/utss/v1/tx.pulsar.go @@ -1388,31 +1388,23 @@ func (x *fastReflection_MsgInitiateTssKeyProcess) ProtoMethods() *protoiface.Met } var ( - md_MsgVoteTssKeyProcess protoreflect.MessageDescriptor - fd_MsgVoteTssKeyProcess_signer protoreflect.FieldDescriptor - fd_MsgVoteTssKeyProcess_process_id protoreflect.FieldDescriptor - fd_MsgVoteTssKeyProcess_tss_pubkey protoreflect.FieldDescriptor - fd_MsgVoteTssKeyProcess_key_id protoreflect.FieldDescriptor + md_MsgInitiateTssKeyProcessResponse protoreflect.MessageDescriptor ) func init() { file_utss_v1_tx_proto_init() - md_MsgVoteTssKeyProcess = File_utss_v1_tx_proto.Messages().ByName("MsgVoteTssKeyProcess") - fd_MsgVoteTssKeyProcess_signer = md_MsgVoteTssKeyProcess.Fields().ByName("signer") - fd_MsgVoteTssKeyProcess_process_id = md_MsgVoteTssKeyProcess.Fields().ByName("process_id") - fd_MsgVoteTssKeyProcess_tss_pubkey = md_MsgVoteTssKeyProcess.Fields().ByName("tss_pubkey") - fd_MsgVoteTssKeyProcess_key_id = md_MsgVoteTssKeyProcess.Fields().ByName("key_id") + md_MsgInitiateTssKeyProcessResponse = File_utss_v1_tx_proto.Messages().ByName("MsgInitiateTssKeyProcessResponse") } -var _ protoreflect.Message = (*fastReflection_MsgVoteTssKeyProcess)(nil) +var _ protoreflect.Message = (*fastReflection_MsgInitiateTssKeyProcessResponse)(nil) -type fastReflection_MsgVoteTssKeyProcess MsgVoteTssKeyProcess +type fastReflection_MsgInitiateTssKeyProcessResponse MsgInitiateTssKeyProcessResponse -func (x *MsgVoteTssKeyProcess) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgVoteTssKeyProcess)(x) +func (x *MsgInitiateTssKeyProcessResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgInitiateTssKeyProcessResponse)(x) } -func (x *MsgVoteTssKeyProcess) slowProtoReflect() protoreflect.Message { +func (x *MsgInitiateTssKeyProcessResponse) slowProtoReflect() protoreflect.Message { mi := &file_utss_v1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1424,43 +1416,43 @@ func (x *MsgVoteTssKeyProcess) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgVoteTssKeyProcess_messageType fastReflection_MsgVoteTssKeyProcess_messageType -var _ protoreflect.MessageType = fastReflection_MsgVoteTssKeyProcess_messageType{} +var _fastReflection_MsgInitiateTssKeyProcessResponse_messageType fastReflection_MsgInitiateTssKeyProcessResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgInitiateTssKeyProcessResponse_messageType{} -type fastReflection_MsgVoteTssKeyProcess_messageType struct{} +type fastReflection_MsgInitiateTssKeyProcessResponse_messageType struct{} -func (x fastReflection_MsgVoteTssKeyProcess_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgVoteTssKeyProcess)(nil) +func (x fastReflection_MsgInitiateTssKeyProcessResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgInitiateTssKeyProcessResponse)(nil) } -func (x fastReflection_MsgVoteTssKeyProcess_messageType) New() protoreflect.Message { - return new(fastReflection_MsgVoteTssKeyProcess) +func (x fastReflection_MsgInitiateTssKeyProcessResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgInitiateTssKeyProcessResponse) } -func (x fastReflection_MsgVoteTssKeyProcess_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteTssKeyProcess +func (x fastReflection_MsgInitiateTssKeyProcessResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitiateTssKeyProcessResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgVoteTssKeyProcess) Descriptor() protoreflect.MessageDescriptor { - return md_MsgVoteTssKeyProcess +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgInitiateTssKeyProcessResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgVoteTssKeyProcess) Type() protoreflect.MessageType { - return _fastReflection_MsgVoteTssKeyProcess_messageType +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgInitiateTssKeyProcessResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgVoteTssKeyProcess) New() protoreflect.Message { - return new(fastReflection_MsgVoteTssKeyProcess) +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) New() protoreflect.Message { + return new(fastReflection_MsgInitiateTssKeyProcessResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgVoteTssKeyProcess) Interface() protoreflect.ProtoMessage { - return (*MsgVoteTssKeyProcess)(x) +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) Interface() protoreflect.ProtoMessage { + return (*MsgInitiateTssKeyProcessResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1468,31 +1460,7 @@ func (x *fastReflection_MsgVoteTssKeyProcess) Interface() protoreflect.ProtoMess // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgVoteTssKeyProcess) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Signer != "" { - value := protoreflect.ValueOfString(x.Signer) - if !f(fd_MsgVoteTssKeyProcess_signer, value) { - return - } - } - if x.ProcessId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProcessId) - if !f(fd_MsgVoteTssKeyProcess_process_id, value) { - return - } - } - if x.TssPubkey != "" { - value := protoreflect.ValueOfString(x.TssPubkey) - if !f(fd_MsgVoteTssKeyProcess_tss_pubkey, value) { - return - } - } - if x.KeyId != "" { - value := protoreflect.ValueOfString(x.KeyId) - if !f(fd_MsgVoteTssKeyProcess_key_id, value) { - return - } - } +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -1506,21 +1474,13 @@ func (x *fastReflection_MsgVoteTssKeyProcess) Range(f func(protoreflect.FieldDes // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgVoteTssKeyProcess) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "utss.v1.MsgVoteTssKeyProcess.signer": - return x.Signer != "" - case "utss.v1.MsgVoteTssKeyProcess.process_id": - return x.ProcessId != uint64(0) - case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": - return x.TssPubkey != "" - case "utss.v1.MsgVoteTssKeyProcess.key_id": - return x.KeyId != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcessResponse")) } - panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcessResponse does not contain field %s", fd.FullName())) } } @@ -1530,21 +1490,13 @@ func (x *fastReflection_MsgVoteTssKeyProcess) Has(fd protoreflect.FieldDescripto // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVoteTssKeyProcess) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "utss.v1.MsgVoteTssKeyProcess.signer": - x.Signer = "" - case "utss.v1.MsgVoteTssKeyProcess.process_id": - x.ProcessId = uint64(0) - case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": - x.TssPubkey = "" - case "utss.v1.MsgVoteTssKeyProcess.key_id": - x.KeyId = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcessResponse")) } - panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcessResponse does not contain field %s", fd.FullName())) } } @@ -1554,25 +1506,13 @@ func (x *fastReflection_MsgVoteTssKeyProcess) Clear(fd protoreflect.FieldDescrip // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgVoteTssKeyProcess) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "utss.v1.MsgVoteTssKeyProcess.signer": - value := x.Signer - return protoreflect.ValueOfString(value) - case "utss.v1.MsgVoteTssKeyProcess.process_id": - value := x.ProcessId - return protoreflect.ValueOfUint64(value) - case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": - value := x.TssPubkey - return protoreflect.ValueOfString(value) - case "utss.v1.MsgVoteTssKeyProcess.key_id": - value := x.KeyId - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcessResponse")) } - panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcessResponse does not contain field %s", descriptor.FullName())) } } @@ -1586,21 +1526,965 @@ func (x *fastReflection_MsgVoteTssKeyProcess) Get(descriptor protoreflect.FieldD // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVoteTssKeyProcess) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcessResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcessResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgInitiateTssKeyProcessResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgInitiateTssKeyProcessResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgInitiateTssKeyProcessResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgInitiateTssKeyProcessResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgInitiateTssKeyProcessResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgInitiateTssKeyProcessResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitiateTssKeyProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitiateTssKeyProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgVoteTssKeyProcess protoreflect.MessageDescriptor + fd_MsgVoteTssKeyProcess_signer protoreflect.FieldDescriptor + fd_MsgVoteTssKeyProcess_process_id protoreflect.FieldDescriptor + fd_MsgVoteTssKeyProcess_tss_pubkey protoreflect.FieldDescriptor + fd_MsgVoteTssKeyProcess_key_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgVoteTssKeyProcess = File_utss_v1_tx_proto.Messages().ByName("MsgVoteTssKeyProcess") + fd_MsgVoteTssKeyProcess_signer = md_MsgVoteTssKeyProcess.Fields().ByName("signer") + fd_MsgVoteTssKeyProcess_process_id = md_MsgVoteTssKeyProcess.Fields().ByName("process_id") + fd_MsgVoteTssKeyProcess_tss_pubkey = md_MsgVoteTssKeyProcess.Fields().ByName("tss_pubkey") + fd_MsgVoteTssKeyProcess_key_id = md_MsgVoteTssKeyProcess.Fields().ByName("key_id") +} + +var _ protoreflect.Message = (*fastReflection_MsgVoteTssKeyProcess)(nil) + +type fastReflection_MsgVoteTssKeyProcess MsgVoteTssKeyProcess + +func (x *MsgVoteTssKeyProcess) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteTssKeyProcess)(x) +} + +func (x *MsgVoteTssKeyProcess) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgVoteTssKeyProcess_messageType fastReflection_MsgVoteTssKeyProcess_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteTssKeyProcess_messageType{} + +type fastReflection_MsgVoteTssKeyProcess_messageType struct{} + +func (x fastReflection_MsgVoteTssKeyProcess_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteTssKeyProcess)(nil) +} +func (x fastReflection_MsgVoteTssKeyProcess_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteTssKeyProcess) +} +func (x fastReflection_MsgVoteTssKeyProcess_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteTssKeyProcess +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVoteTssKeyProcess) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteTssKeyProcess +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgVoteTssKeyProcess) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteTssKeyProcess_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVoteTssKeyProcess) New() protoreflect.Message { + return new(fastReflection_MsgVoteTssKeyProcess) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVoteTssKeyProcess) Interface() protoreflect.ProtoMessage { + return (*MsgVoteTssKeyProcess)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgVoteTssKeyProcess) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgVoteTssKeyProcess_signer, value) { + return + } + } + if x.ProcessId != uint64(0) { + value := protoreflect.ValueOfUint64(x.ProcessId) + if !f(fd_MsgVoteTssKeyProcess_process_id, value) { + return + } + } + if x.TssPubkey != "" { + value := protoreflect.ValueOfString(x.TssPubkey) + if !f(fd_MsgVoteTssKeyProcess_tss_pubkey, value) { + return + } + } + if x.KeyId != "" { + value := protoreflect.ValueOfString(x.KeyId) + if !f(fd_MsgVoteTssKeyProcess_key_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgVoteTssKeyProcess) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + return x.Signer != "" + case "utss.v1.MsgVoteTssKeyProcess.process_id": + return x.ProcessId != uint64(0) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + return x.TssPubkey != "" + case "utss.v1.MsgVoteTssKeyProcess.key_id": + return x.KeyId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteTssKeyProcess) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + x.Signer = "" + case "utss.v1.MsgVoteTssKeyProcess.process_id": + x.ProcessId = uint64(0) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + x.TssPubkey = "" + case "utss.v1.MsgVoteTssKeyProcess.key_id": + x.KeyId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgVoteTssKeyProcess) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "utss.v1.MsgVoteTssKeyProcess.process_id": + value := x.ProcessId + return protoreflect.ValueOfUint64(value) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + value := x.TssPubkey + return protoreflect.ValueOfString(value) + case "utss.v1.MsgVoteTssKeyProcess.key_id": + value := x.KeyId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteTssKeyProcess) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + x.Signer = value.Interface().(string) + case "utss.v1.MsgVoteTssKeyProcess.process_id": + x.ProcessId = value.Uint() + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + x.TssPubkey = value.Interface().(string) + case "utss.v1.MsgVoteTssKeyProcess.key_id": + x.KeyId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteTssKeyProcess) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + panic(fmt.Errorf("field signer of message utss.v1.MsgVoteTssKeyProcess is not mutable")) + case "utss.v1.MsgVoteTssKeyProcess.process_id": + panic(fmt.Errorf("field process_id of message utss.v1.MsgVoteTssKeyProcess is not mutable")) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + panic(fmt.Errorf("field tss_pubkey of message utss.v1.MsgVoteTssKeyProcess is not mutable")) + case "utss.v1.MsgVoteTssKeyProcess.key_id": + panic(fmt.Errorf("field key_id of message utss.v1.MsgVoteTssKeyProcess is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgVoteTssKeyProcess) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.MsgVoteTssKeyProcess.signer": + return protoreflect.ValueOfString("") + case "utss.v1.MsgVoteTssKeyProcess.process_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": + return protoreflect.ValueOfString("") + case "utss.v1.MsgVoteTssKeyProcess.key_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgVoteTssKeyProcess) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgVoteTssKeyProcess", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgVoteTssKeyProcess) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteTssKeyProcess) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgVoteTssKeyProcess) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgVoteTssKeyProcess) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ProcessId != 0 { + n += 1 + runtime.Sov(uint64(x.ProcessId)) + } + l = len(x.TssPubkey) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.KeyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgVoteTssKeyProcess) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.KeyId) > 0 { + i -= len(x.KeyId) + copy(dAtA[i:], x.KeyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyId))) + i-- + dAtA[i] = 0x22 + } + if len(x.TssPubkey) > 0 { + i -= len(x.TssPubkey) + copy(dAtA[i:], x.TssPubkey) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TssPubkey))) + i-- + dAtA[i] = 0x1a + } + if x.ProcessId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProcessId)) + i-- + dAtA[i] = 0x10 + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgVoteTssKeyProcess) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteTssKeyProcess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteTssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) + } + x.ProcessId = 0 + 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++ + x.ProcessId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", 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.TssPubkey = 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 KeyId", 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.KeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgVoteTssKeyProcessResponse protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_tx_proto_init() + md_MsgVoteTssKeyProcessResponse = File_utss_v1_tx_proto.Messages().ByName("MsgVoteTssKeyProcessResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgVoteTssKeyProcessResponse)(nil) + +type fastReflection_MsgVoteTssKeyProcessResponse MsgVoteTssKeyProcessResponse + +func (x *MsgVoteTssKeyProcessResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteTssKeyProcessResponse)(x) +} + +func (x *MsgVoteTssKeyProcessResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgVoteTssKeyProcessResponse_messageType fastReflection_MsgVoteTssKeyProcessResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteTssKeyProcessResponse_messageType{} + +type fastReflection_MsgVoteTssKeyProcessResponse_messageType struct{} + +func (x fastReflection_MsgVoteTssKeyProcessResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteTssKeyProcessResponse)(nil) +} +func (x fastReflection_MsgVoteTssKeyProcessResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteTssKeyProcessResponse) +} +func (x fastReflection_MsgVoteTssKeyProcessResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteTssKeyProcessResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteTssKeyProcessResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteTssKeyProcessResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) New() protoreflect.Message { + return new(fastReflection_MsgVoteTssKeyProcessResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) Interface() protoreflect.ProtoMessage { + return (*MsgVoteTssKeyProcessResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcessResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcessResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcessResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteTssKeyProcessResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "utss.v1.MsgVoteTssKeyProcess.signer": - x.Signer = value.Interface().(string) - case "utss.v1.MsgVoteTssKeyProcess.process_id": - x.ProcessId = value.Uint() - case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": - x.TssPubkey = value.Interface().(string) - case "utss.v1.MsgVoteTssKeyProcess.key_id": - x.KeyId = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcessResponse")) } - panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcessResponse does not contain field %s", fd.FullName())) } } @@ -1614,52 +2498,36 @@ func (x *fastReflection_MsgVoteTssKeyProcess) Set(fd protoreflect.FieldDescripto // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVoteTssKeyProcess) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVoteTssKeyProcessResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "utss.v1.MsgVoteTssKeyProcess.signer": - panic(fmt.Errorf("field signer of message utss.v1.MsgVoteTssKeyProcess is not mutable")) - case "utss.v1.MsgVoteTssKeyProcess.process_id": - panic(fmt.Errorf("field process_id of message utss.v1.MsgVoteTssKeyProcess is not mutable")) - case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": - panic(fmt.Errorf("field tss_pubkey of message utss.v1.MsgVoteTssKeyProcess is not mutable")) - case "utss.v1.MsgVoteTssKeyProcess.key_id": - panic(fmt.Errorf("field key_id of message utss.v1.MsgVoteTssKeyProcess is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcessResponse")) } - panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcessResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgVoteTssKeyProcess) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgVoteTssKeyProcessResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "utss.v1.MsgVoteTssKeyProcess.signer": - return protoreflect.ValueOfString("") - case "utss.v1.MsgVoteTssKeyProcess.process_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": - return protoreflect.ValueOfString("") - case "utss.v1.MsgVoteTssKeyProcess.key_id": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcess")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgVoteTssKeyProcessResponse")) } - panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcess does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message utss.v1.MsgVoteTssKeyProcessResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgVoteTssKeyProcess) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgVoteTssKeyProcessResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgVoteTssKeyProcess", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in utss.v1.MsgVoteTssKeyProcessResponse", d.FullName())) } panic("unreachable") } @@ -1667,7 +2535,7 @@ func (x *fastReflection_MsgVoteTssKeyProcess) WhichOneof(d protoreflect.OneofDes // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgVoteTssKeyProcess) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgVoteTssKeyProcessResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1678,7 +2546,7 @@ func (x *fastReflection_MsgVoteTssKeyProcess) GetUnknown() protoreflect.RawField // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgVoteTssKeyProcess) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgVoteTssKeyProcessResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1690,7 +2558,7 @@ func (x *fastReflection_MsgVoteTssKeyProcess) SetUnknown(fields protoreflect.Raw // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgVoteTssKeyProcess) IsValid() bool { +func (x *fastReflection_MsgVoteTssKeyProcessResponse) IsValid() bool { return x != nil } @@ -1700,9 +2568,9 @@ func (x *fastReflection_MsgVoteTssKeyProcess) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgVoteTssKeyProcessResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgVoteTssKeyProcess) + x := input.Message.Interface().(*MsgVoteTssKeyProcessResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1714,21 +2582,6 @@ func (x *fastReflection_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods var n int var l int _ = l - l = len(x.Signer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ProcessId != 0 { - n += 1 + runtime.Sov(uint64(x.ProcessId)) - } - l = len(x.TssPubkey) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.KeyId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1739,7 +2592,7 @@ func (x *fastReflection_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgVoteTssKeyProcess) + x := input.Message.Interface().(*MsgVoteTssKeyProcessResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1758,32 +2611,6 @@ func (x *fastReflection_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.KeyId) > 0 { - i -= len(x.KeyId) - copy(dAtA[i:], x.KeyId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyId))) - i-- - dAtA[i] = 0x22 - } - if len(x.TssPubkey) > 0 { - i -= len(x.TssPubkey) - copy(dAtA[i:], x.TssPubkey) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TssPubkey))) - i-- - dAtA[i] = 0x1a - } - if x.ProcessId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProcessId)) - i-- - dAtA[i] = 0x10 - } - if len(x.Signer) > 0 { - i -= len(x.Signer) - copy(dAtA[i:], x.Signer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) - i-- - dAtA[i] = 0xa - } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -1795,7 +2622,7 @@ func (x *fastReflection_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgVoteTssKeyProcess) + x := input.Message.Interface().(*MsgVoteTssKeyProcessResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1827,127 +2654,12 @@ func (x *fastReflection_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteTssKeyProcess: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteTssKeyProcessResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteTssKeyProcess: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteTssKeyProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", 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.Signer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) - } - x.ProcessId = 0 - 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++ - x.ProcessId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", 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.TssPubkey = 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 KeyId", 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.KeyId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2128,6 +2840,32 @@ func (x *MsgInitiateTssKeyProcess) GetExpiryHeight() uint64 { return 0 } +type MsgInitiateTssKeyProcessResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgInitiateTssKeyProcessResponse) Reset() { + *x = MsgInitiateTssKeyProcessResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgInitiateTssKeyProcessResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgInitiateTssKeyProcessResponse) ProtoMessage() {} + +// Deprecated: Use MsgInitiateTssKeyProcessResponse.ProtoReflect.Descriptor instead. +func (*MsgInitiateTssKeyProcessResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{3} +} + // Universal validator votes on an ongoing TSS key process type MsgVoteTssKeyProcess struct { state protoimpl.MessageState @@ -2143,7 +2881,7 @@ type MsgVoteTssKeyProcess struct { func (x *MsgVoteTssKeyProcess) Reset() { *x = MsgVoteTssKeyProcess{} if protoimpl.UnsafeEnabled { - mi := &file_utss_v1_tx_proto_msgTypes[3] + mi := &file_utss_v1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2157,7 +2895,7 @@ func (*MsgVoteTssKeyProcess) ProtoMessage() {} // Deprecated: Use MsgVoteTssKeyProcess.ProtoReflect.Descriptor instead. func (*MsgVoteTssKeyProcess) Descriptor() ([]byte, []int) { - return file_utss_v1_tx_proto_rawDescGZIP(), []int{3} + return file_utss_v1_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgVoteTssKeyProcess) GetSigner() string { @@ -2188,6 +2926,32 @@ func (x *MsgVoteTssKeyProcess) GetKeyId() string { return "" } +type MsgVoteTssKeyProcessResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgVoteTssKeyProcessResponse) Reset() { + *x = MsgVoteTssKeyProcessResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgVoteTssKeyProcessResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgVoteTssKeyProcessResponse) ProtoMessage() {} + +// Deprecated: Use MsgVoteTssKeyProcessResponse.ProtoReflect.Descriptor instead. +func (*MsgVoteTssKeyProcessResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_tx_proto_rawDescGZIP(), []int{5} +} + var File_utss_v1_tx_proto protoreflect.FileDescriptor var file_utss_v1_tx_proto_rawDesc = []byte{ @@ -2225,35 +2989,51 @@ var file_utss_v1_tx_proto_rawDesc = []byte{ 0x70, 0x69, 0x72, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x14, 0x4d, - 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, 0x73, 0x50, 0x75, 0x62, - 0x6b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x74, 0x73, 0x73, - 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x32, 0x58, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4a, 0x0a, 0x0c, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x2e, 0x75, - 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 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, - 0x8c, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, - 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, - 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, + 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc8, + 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x73, 0x5f, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, + 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x3a, 0x29, + 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, + 0x75, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, + 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9a, 0x02, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x4a, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x18, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e, 0x75, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, + 0x15, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x29, 0x2e, 0x75, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, + 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x11, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, + 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, + 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x8c, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, + 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, + 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, + 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, + 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, + 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, + 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2268,22 +3048,28 @@ func file_utss_v1_tx_proto_rawDescGZIP() []byte { return file_utss_v1_tx_proto_rawDescData } -var file_utss_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_utss_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_utss_v1_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: utss.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: utss.v1.MsgUpdateParamsResponse - (*MsgInitiateTssKeyProcess)(nil), // 2: utss.v1.MsgInitiateTssKeyProcess - (*MsgVoteTssKeyProcess)(nil), // 3: utss.v1.MsgVoteTssKeyProcess - (*Params)(nil), // 4: utss.v1.Params - (TssProcessType)(0), // 5: utss.v1.TssProcessType + (*MsgUpdateParams)(nil), // 0: utss.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: utss.v1.MsgUpdateParamsResponse + (*MsgInitiateTssKeyProcess)(nil), // 2: utss.v1.MsgInitiateTssKeyProcess + (*MsgInitiateTssKeyProcessResponse)(nil), // 3: utss.v1.MsgInitiateTssKeyProcessResponse + (*MsgVoteTssKeyProcess)(nil), // 4: utss.v1.MsgVoteTssKeyProcess + (*MsgVoteTssKeyProcessResponse)(nil), // 5: utss.v1.MsgVoteTssKeyProcessResponse + (*Params)(nil), // 6: utss.v1.Params + (TssProcessType)(0), // 7: utss.v1.TssProcessType } var file_utss_v1_tx_proto_depIdxs = []int32{ - 4, // 0: utss.v1.MsgUpdateParams.params:type_name -> utss.v1.Params - 5, // 1: utss.v1.MsgInitiateTssKeyProcess.process_type:type_name -> utss.v1.TssProcessType + 6, // 0: utss.v1.MsgUpdateParams.params:type_name -> utss.v1.Params + 7, // 1: utss.v1.MsgInitiateTssKeyProcess.process_type:type_name -> utss.v1.TssProcessType 0, // 2: utss.v1.Msg.UpdateParams:input_type -> utss.v1.MsgUpdateParams - 1, // 3: utss.v1.Msg.UpdateParams:output_type -> utss.v1.MsgUpdateParamsResponse - 3, // [3:4] is the sub-list for method output_type - 2, // [2:3] is the sub-list for method input_type + 2, // 3: utss.v1.Msg.InitiateTssKeyProcess:input_type -> utss.v1.MsgInitiateTssKeyProcess + 4, // 4: utss.v1.Msg.VoteTssKeyProcess:input_type -> utss.v1.MsgVoteTssKeyProcess + 1, // 5: utss.v1.Msg.UpdateParams:output_type -> utss.v1.MsgUpdateParamsResponse + 3, // 6: utss.v1.Msg.InitiateTssKeyProcess:output_type -> utss.v1.MsgInitiateTssKeyProcessResponse + 5, // 7: utss.v1.Msg.VoteTssKeyProcess:output_type -> utss.v1.MsgVoteTssKeyProcessResponse + 5, // [5:8] is the sub-list for method output_type + 2, // [2:5] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name @@ -2334,6 +3120,18 @@ func file_utss_v1_tx_proto_init() { } } file_utss_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgInitiateTssKeyProcessResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgVoteTssKeyProcess); i { case 0: return &v.state @@ -2345,6 +3143,18 @@ func file_utss_v1_tx_proto_init() { return nil } } + file_utss_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVoteTssKeyProcessResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2352,7 +3162,7 @@ func file_utss_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_utss_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/api/utss/v1/tx_grpc.pb.go b/api/utss/v1/tx_grpc.pb.go index b3ca311f..eb692345 100644 --- a/api/utss/v1/tx_grpc.pb.go +++ b/api/utss/v1/tx_grpc.pb.go @@ -19,7 +19,9 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_UpdateParams_FullMethodName = "/utss.v1.Msg/UpdateParams" + Msg_UpdateParams_FullMethodName = "/utss.v1.Msg/UpdateParams" + Msg_InitiateTssKeyProcess_FullMethodName = "/utss.v1.Msg/InitiateTssKeyProcess" + Msg_VoteTssKeyProcess_FullMethodName = "/utss.v1.Msg/VoteTssKeyProcess" ) // MsgClient is the client API for Msg service. @@ -30,6 +32,10 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // InitiateTssKeyProcess defines a operation for initiating a new tss key process + InitiateTssKeyProcess(ctx context.Context, in *MsgInitiateTssKeyProcess, opts ...grpc.CallOption) (*MsgInitiateTssKeyProcessResponse, error) + // VoteTssKeyProcess defines a operation for voting on an existing tss key process + VoteTssKeyProcess(ctx context.Context, in *MsgVoteTssKeyProcess, opts ...grpc.CallOption) (*MsgVoteTssKeyProcessResponse, error) } type msgClient struct { @@ -49,6 +55,24 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) InitiateTssKeyProcess(ctx context.Context, in *MsgInitiateTssKeyProcess, opts ...grpc.CallOption) (*MsgInitiateTssKeyProcessResponse, error) { + out := new(MsgInitiateTssKeyProcessResponse) + err := c.cc.Invoke(ctx, Msg_InitiateTssKeyProcess_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) VoteTssKeyProcess(ctx context.Context, in *MsgVoteTssKeyProcess, opts ...grpc.CallOption) (*MsgVoteTssKeyProcessResponse, error) { + out := new(MsgVoteTssKeyProcessResponse) + err := c.cc.Invoke(ctx, Msg_VoteTssKeyProcess_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -57,6 +81,10 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // InitiateTssKeyProcess defines a operation for initiating a new tss key process + InitiateTssKeyProcess(context.Context, *MsgInitiateTssKeyProcess) (*MsgInitiateTssKeyProcessResponse, error) + // VoteTssKeyProcess defines a operation for voting on an existing tss key process + VoteTssKeyProcess(context.Context, *MsgVoteTssKeyProcess) (*MsgVoteTssKeyProcessResponse, error) mustEmbedUnimplementedMsgServer() } @@ -67,6 +95,12 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (UnimplementedMsgServer) InitiateTssKeyProcess(context.Context, *MsgInitiateTssKeyProcess) (*MsgInitiateTssKeyProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InitiateTssKeyProcess not implemented") +} +func (UnimplementedMsgServer) VoteTssKeyProcess(context.Context, *MsgVoteTssKeyProcess) (*MsgVoteTssKeyProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteTssKeyProcess not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -98,6 +132,42 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_InitiateTssKeyProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgInitiateTssKeyProcess) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).InitiateTssKeyProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_InitiateTssKeyProcess_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).InitiateTssKeyProcess(ctx, req.(*MsgInitiateTssKeyProcess)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_VoteTssKeyProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteTssKeyProcess) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).VoteTssKeyProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_VoteTssKeyProcess_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).VoteTssKeyProcess(ctx, req.(*MsgVoteTssKeyProcess)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -109,6 +179,14 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "InitiateTssKeyProcess", + Handler: _Msg_InitiateTssKeyProcess_Handler, + }, + { + MethodName: "VoteTssKeyProcess", + Handler: _Msg_VoteTssKeyProcess_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "utss/v1/tx.proto", diff --git a/x/utss/types/tx.pb.go b/x/utss/types/tx.pb.go index 90450b45..4b4c77e6 100644 --- a/x/utss/types/tx.pb.go +++ b/x/utss/types/tx.pb.go @@ -191,6 +191,42 @@ func (m *MsgInitiateTssKeyProcess) GetExpiryHeight() uint64 { return 0 } +type MsgInitiateTssKeyProcessResponse struct { +} + +func (m *MsgInitiateTssKeyProcessResponse) Reset() { *m = MsgInitiateTssKeyProcessResponse{} } +func (m *MsgInitiateTssKeyProcessResponse) String() string { return proto.CompactTextString(m) } +func (*MsgInitiateTssKeyProcessResponse) ProtoMessage() {} +func (*MsgInitiateTssKeyProcessResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{3} +} +func (m *MsgInitiateTssKeyProcessResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgInitiateTssKeyProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgInitiateTssKeyProcessResponse.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 *MsgInitiateTssKeyProcessResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgInitiateTssKeyProcessResponse.Merge(m, src) +} +func (m *MsgInitiateTssKeyProcessResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgInitiateTssKeyProcessResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgInitiateTssKeyProcessResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgInitiateTssKeyProcessResponse proto.InternalMessageInfo + // Universal validator votes on an ongoing TSS key process type MsgVoteTssKeyProcess struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` @@ -203,7 +239,7 @@ func (m *MsgVoteTssKeyProcess) Reset() { *m = MsgVoteTssKeyProcess{} } func (m *MsgVoteTssKeyProcess) String() string { return proto.CompactTextString(m) } func (*MsgVoteTssKeyProcess) ProtoMessage() {} func (*MsgVoteTssKeyProcess) Descriptor() ([]byte, []int) { - return fileDescriptor_4dcb8cba4d8073e4, []int{3} + return fileDescriptor_4dcb8cba4d8073e4, []int{4} } func (m *MsgVoteTssKeyProcess) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -260,50 +296,92 @@ func (m *MsgVoteTssKeyProcess) GetKeyId() string { return "" } +type MsgVoteTssKeyProcessResponse struct { +} + +func (m *MsgVoteTssKeyProcessResponse) Reset() { *m = MsgVoteTssKeyProcessResponse{} } +func (m *MsgVoteTssKeyProcessResponse) String() string { return proto.CompactTextString(m) } +func (*MsgVoteTssKeyProcessResponse) ProtoMessage() {} +func (*MsgVoteTssKeyProcessResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dcb8cba4d8073e4, []int{5} +} +func (m *MsgVoteTssKeyProcessResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteTssKeyProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteTssKeyProcessResponse.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 *MsgVoteTssKeyProcessResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteTssKeyProcessResponse.Merge(m, src) +} +func (m *MsgVoteTssKeyProcessResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteTssKeyProcessResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteTssKeyProcessResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteTssKeyProcessResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "utss.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "utss.v1.MsgUpdateParamsResponse") proto.RegisterType((*MsgInitiateTssKeyProcess)(nil), "utss.v1.MsgInitiateTssKeyProcess") + proto.RegisterType((*MsgInitiateTssKeyProcessResponse)(nil), "utss.v1.MsgInitiateTssKeyProcessResponse") proto.RegisterType((*MsgVoteTssKeyProcess)(nil), "utss.v1.MsgVoteTssKeyProcess") + proto.RegisterType((*MsgVoteTssKeyProcessResponse)(nil), "utss.v1.MsgVoteTssKeyProcessResponse") } func init() { proto.RegisterFile("utss/v1/tx.proto", fileDescriptor_4dcb8cba4d8073e4) } var fileDescriptor_4dcb8cba4d8073e4 = []byte{ - // 525 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xc1, 0x8f, 0xd2, 0x4e, - 0x14, 0x66, 0x7e, 0xcb, 0xf2, 0x0b, 0xb3, 0xeb, 0xae, 0xd6, 0xdd, 0x50, 0x48, 0xac, 0x04, 0x2f, - 0x48, 0x42, 0x2b, 0x98, 0x78, 0xe0, 0x26, 0x27, 0x71, 0x43, 0x42, 0x2a, 0x1a, 0xe3, 0x85, 0x14, - 0x3a, 0x99, 0x4e, 0x48, 0x3b, 0x93, 0xbe, 0x61, 0x43, 0x6f, 0xc6, 0x93, 0xf1, 0xe4, 0x9f, 0xc2, - 0xc1, 0x3f, 0x82, 0xe3, 0xc6, 0x93, 0x17, 0x8d, 0x81, 0x03, 0xff, 0x86, 0xe9, 0x74, 0x00, 0x97, - 0xc4, 0x78, 0xf0, 0x42, 0xde, 0x7c, 0xdf, 0x7b, 0x1f, 0xdf, 0x37, 0x6f, 0x8a, 0xef, 0xce, 0x24, - 0x80, 0x73, 0xdd, 0x72, 0xe4, 0xdc, 0x16, 0x31, 0x97, 0xdc, 0xf8, 0x3f, 0x45, 0xec, 0xeb, 0x56, - 0xa5, 0x34, 0xe1, 0x10, 0x72, 0x70, 0x42, 0xa0, 0x69, 0x43, 0x08, 0x34, 0xeb, 0xa8, 0x5c, 0x6e, - 0x67, 0x28, 0x89, 0x08, 0x30, 0xd0, 0xf0, 0xfd, 0x9d, 0x54, 0x22, 0xc8, 0x16, 0xbc, 0xa0, 0x9c, - 0x72, 0x55, 0x3a, 0x69, 0xa5, 0xd1, 0x72, 0x26, 0x3d, 0xca, 0x88, 0xec, 0xa0, 0xa9, 0x7b, 0x5e, - 0xc8, 0x22, 0xee, 0xa8, 0xdf, 0x0c, 0xaa, 0x7d, 0x44, 0xf8, 0xbc, 0x0f, 0xf4, 0xb5, 0xf0, 0x3d, - 0x49, 0x06, 0x5e, 0xec, 0x85, 0x60, 0x3c, 0xc3, 0x45, 0x6f, 0x26, 0x03, 0x1e, 0x33, 0x99, 0x98, - 0xa8, 0x8a, 0xea, 0xc5, 0xae, 0xf9, 0xf5, 0x4b, 0xf3, 0x42, 0x6b, 0x3d, 0xf7, 0xfd, 0x98, 0x00, - 0xbc, 0x92, 0x31, 0x8b, 0xa8, 0xbb, 0x6f, 0x35, 0x9a, 0xb8, 0x20, 0x94, 0x82, 0xf9, 0x5f, 0x15, - 0xd5, 0x4f, 0xda, 0xe7, 0xb6, 0x8e, 0x6b, 0x67, 0xc2, 0xdd, 0xfc, 0xf2, 0xc7, 0xc3, 0x9c, 0xab, - 0x9b, 0x3a, 0x67, 0x1f, 0x36, 0x8b, 0xc6, 0x7e, 0xbc, 0x56, 0xc6, 0xa5, 0x03, 0x27, 0x2e, 0x01, - 0xc1, 0x23, 0x20, 0xb5, 0xef, 0x08, 0x9b, 0x7d, 0xa0, 0xbd, 0x88, 0x49, 0xe6, 0x49, 0x32, 0x04, - 0xb8, 0x22, 0xc9, 0x20, 0xe6, 0x13, 0x02, 0x60, 0x3c, 0xc1, 0x05, 0x60, 0x34, 0x22, 0xf1, 0x5f, - 0xbd, 0xea, 0x3e, 0xa3, 0x83, 0x4f, 0x45, 0x36, 0x3c, 0x4a, 0xef, 0x53, 0xd9, 0x3d, 0x6b, 0x97, - 0x76, 0x76, 0x87, 0x00, 0x5a, 0x7c, 0x98, 0x08, 0xe2, 0x9e, 0x88, 0xfd, 0xc1, 0x78, 0x84, 0xef, - 0x90, 0xb9, 0x60, 0x71, 0x32, 0x0a, 0x08, 0xa3, 0x81, 0x34, 0x8f, 0xaa, 0xa8, 0x9e, 0x77, 0x4f, - 0x33, 0xf0, 0x85, 0xc2, 0x3a, 0x76, 0x1a, 0x4d, 0xff, 0xdb, 0xa7, 0xcd, 0xa2, 0x61, 0xa9, 0xf5, - 0xf5, 0x81, 0xbe, 0xe1, 0x92, 0x6c, 0x53, 0xec, 0x23, 0xd4, 0x96, 0x08, 0x5f, 0x68, 0xf6, 0x5f, - 0xb3, 0x3d, 0xc0, 0x78, 0x9b, 0x8d, 0xf9, 0x2a, 0x59, 0xde, 0x2d, 0x6a, 0xa4, 0xe7, 0xa7, 0xb4, - 0x04, 0x18, 0x89, 0xd9, 0x78, 0x4a, 0x12, 0xe5, 0xbd, 0xe8, 0x16, 0x25, 0xc0, 0x40, 0x01, 0xc6, - 0x25, 0x2e, 0x4c, 0x49, 0x92, 0x4e, 0xe6, 0x15, 0x75, 0x3c, 0x25, 0x49, 0xcf, 0xef, 0x3c, 0x3e, - 0xc8, 0x53, 0xfe, 0x3d, 0xcf, 0x2d, 0xc7, 0xed, 0xb7, 0xf8, 0xa8, 0x0f, 0xd4, 0x78, 0x89, 0x4f, - 0x6f, 0xbd, 0x29, 0x73, 0x77, 0xb9, 0x07, 0x3b, 0xae, 0x54, 0xff, 0xc4, 0x6c, 0xb7, 0x5f, 0x39, - 0x7e, 0xbf, 0x59, 0x34, 0x50, 0xf7, 0x6a, 0xb9, 0xb2, 0xd0, 0xcd, 0xca, 0x42, 0x3f, 0x57, 0x16, - 0xfa, 0xbc, 0xb6, 0x72, 0x37, 0x6b, 0x2b, 0xf7, 0x6d, 0x6d, 0xe5, 0xde, 0xb5, 0x28, 0x93, 0xc1, - 0x6c, 0x6c, 0x4f, 0x78, 0xe8, 0x88, 0x19, 0x04, 0x93, 0xc0, 0x63, 0x91, 0xaa, 0x9a, 0xaa, 0x6c, - 0x46, 0xdc, 0x27, 0xce, 0xdc, 0x51, 0xae, 0xd5, 0x17, 0x34, 0x2e, 0xa8, 0xe7, 0xff, 0xf4, 0x57, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xfe, 0x91, 0xa4, 0xa4, 0x03, 0x00, 0x00, + // 579 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x31, 0x6f, 0xd3, 0x5c, + 0x14, 0x8d, 0xdb, 0x34, 0x9f, 0xf2, 0xda, 0xaf, 0xa5, 0xa6, 0x55, 0x5d, 0x8b, 0x9a, 0x60, 0x84, + 0xd4, 0x56, 0x8a, 0x4d, 0x82, 0xc4, 0x90, 0x8d, 0x4c, 0x84, 0x2a, 0x52, 0x64, 0x02, 0x12, 0x2c, + 0x91, 0x13, 0x3f, 0x3d, 0x3f, 0x45, 0xf6, 0xb3, 0x7c, 0x5f, 0xaa, 0x78, 0x43, 0x4c, 0x88, 0x89, + 0x99, 0x5f, 0x91, 0x81, 0x1f, 0x91, 0xb1, 0x62, 0x62, 0x01, 0xa1, 0x64, 0xc8, 0xdf, 0x40, 0x7e, + 0xb6, 0x93, 0x34, 0x4d, 0xe9, 0xc0, 0x62, 0x5d, 0x9f, 0x73, 0xee, 0xf1, 0x3d, 0xbe, 0x4f, 0x0f, + 0xdd, 0x1b, 0x70, 0x00, 0xf3, 0xb2, 0x62, 0xf2, 0xa1, 0x11, 0x84, 0x8c, 0x33, 0xf9, 0xbf, 0x18, + 0x31, 0x2e, 0x2b, 0xea, 0x51, 0x8f, 0x81, 0xc7, 0xc0, 0xf4, 0x80, 0xc4, 0x02, 0x0f, 0x48, 0xa2, + 0x50, 0x0f, 0xb3, 0x1e, 0x82, 0x7d, 0x0c, 0x14, 0x52, 0xf8, 0xfe, 0xdc, 0x2a, 0x0a, 0x70, 0x06, + 0x1e, 0x10, 0x46, 0x98, 0x28, 0xcd, 0xb8, 0x4a, 0xd1, 0xe3, 0xc4, 0xba, 0x93, 0x10, 0xc9, 0x4b, + 0x4a, 0xed, 0xdb, 0x1e, 0xf5, 0x99, 0x29, 0x9e, 0x09, 0xa4, 0x7f, 0x92, 0xd0, 0x5e, 0x13, 0xc8, + 0x9b, 0xc0, 0xb1, 0x39, 0x6e, 0xd9, 0xa1, 0xed, 0x81, 0xfc, 0x1c, 0x15, 0xed, 0x01, 0x77, 0x59, + 0x48, 0x79, 0xa4, 0x48, 0x25, 0xe9, 0xb4, 0x58, 0x57, 0xbe, 0x7f, 0x2b, 0x1f, 0xa4, 0x5e, 0x2f, + 0x1c, 0x27, 0xc4, 0x00, 0xaf, 0x79, 0x48, 0x7d, 0x62, 0x2d, 0xa4, 0x72, 0x19, 0x15, 0x02, 0xe1, + 0xa0, 0x6c, 0x94, 0xa4, 0xd3, 0xed, 0xea, 0x9e, 0x91, 0xc6, 0x35, 0x12, 0xe3, 0x7a, 0x7e, 0xfc, + 0xeb, 0x61, 0xce, 0x4a, 0x45, 0xb5, 0xdd, 0x8f, 0xb3, 0xd1, 0xf9, 0xa2, 0x5d, 0x3f, 0x46, 0x47, + 0x2b, 0x93, 0x58, 0x18, 0x02, 0xe6, 0x03, 0xd6, 0x7f, 0x4a, 0x48, 0x69, 0x02, 0x69, 0xf8, 0x94, + 0x53, 0x9b, 0xe3, 0x36, 0xc0, 0x05, 0x8e, 0x5a, 0x21, 0xeb, 0x61, 0x00, 0xf9, 0x29, 0x2a, 0x00, + 0x25, 0x3e, 0x0e, 0xef, 0x9c, 0x35, 0xd5, 0xc9, 0x35, 0xb4, 0x13, 0x24, 0xcd, 0x9d, 0xf8, 0x7f, + 0x8a, 0x71, 0x77, 0xab, 0x47, 0xf3, 0x71, 0xdb, 0x00, 0xa9, 0x79, 0x3b, 0x0a, 0xb0, 0xb5, 0x1d, + 0x2c, 0x5e, 0xe4, 0xc7, 0xe8, 0x7f, 0x3c, 0x0c, 0x68, 0x18, 0x75, 0x5c, 0x4c, 0x89, 0xcb, 0x95, + 0xcd, 0x92, 0x74, 0x9a, 0xb7, 0x76, 0x12, 0xf0, 0xa5, 0xc0, 0x6a, 0x46, 0x1c, 0x2d, 0xfd, 0xda, + 0xe7, 0xd9, 0xe8, 0x5c, 0x13, 0xeb, 0x6b, 0x02, 0x79, 0xcb, 0x38, 0xce, 0x52, 0x2c, 0x22, 0xe8, + 0x3a, 0x2a, 0xdd, 0x16, 0x6f, 0xfe, 0x0f, 0xc6, 0x12, 0x3a, 0x48, 0x1d, 0xfe, 0x35, 0xff, 0x09, + 0x42, 0x59, 0x7e, 0xea, 0x88, 0xf4, 0x79, 0xab, 0x98, 0x22, 0x0d, 0x27, 0xa6, 0x39, 0x40, 0x27, + 0x18, 0x74, 0xfb, 0x38, 0x12, 0xf9, 0x8a, 0x56, 0x91, 0x03, 0xb4, 0x04, 0x20, 0x1f, 0xa2, 0x42, + 0x1f, 0x47, 0x71, 0x67, 0x5e, 0x50, 0x5b, 0x7d, 0x1c, 0x35, 0x9c, 0xda, 0xd9, 0x4a, 0xe6, 0xe3, + 0xe5, 0xcc, 0xd7, 0x26, 0xd6, 0x35, 0xf4, 0x60, 0x1d, 0x9e, 0x45, 0xad, 0x7e, 0xdd, 0x40, 0x9b, + 0x4d, 0x20, 0xf2, 0x2b, 0xb4, 0x73, 0xed, 0x60, 0x2a, 0xf3, 0x0d, 0xad, 0x1c, 0x14, 0xb5, 0x74, + 0x1b, 0x93, 0x79, 0xca, 0x18, 0x1d, 0xae, 0x3f, 0x3e, 0x8f, 0x96, 0x5b, 0xd7, 0x4a, 0xd4, 0xb3, + 0x3b, 0x25, 0xf3, 0xcf, 0xbc, 0x43, 0xfb, 0x37, 0x37, 0x74, 0xb2, 0xdc, 0x7f, 0x83, 0x56, 0x9f, + 0xfc, 0x95, 0xce, 0xac, 0xd5, 0xad, 0x0f, 0xb3, 0xd1, 0xb9, 0x54, 0xbf, 0x18, 0x4f, 0x34, 0xe9, + 0x6a, 0xa2, 0x49, 0xbf, 0x27, 0x9a, 0xf4, 0x65, 0xaa, 0xe5, 0xae, 0xa6, 0x5a, 0xee, 0xc7, 0x54, + 0xcb, 0xbd, 0xaf, 0x10, 0xca, 0xdd, 0x41, 0xd7, 0xe8, 0x31, 0xcf, 0x0c, 0x06, 0xe0, 0xf6, 0x5c, + 0x9b, 0xfa, 0xa2, 0x2a, 0x8b, 0xb2, 0xec, 0x33, 0x07, 0x9b, 0x43, 0x53, 0x2c, 0x46, 0x5c, 0x24, + 0xdd, 0x82, 0xb8, 0x05, 0x9e, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x63, 0x5f, 0xe6, 0xab, + 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -322,6 +400,10 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // InitiateTssKeyProcess defines a operation for initiating a new tss key process + InitiateTssKeyProcess(ctx context.Context, in *MsgInitiateTssKeyProcess, opts ...grpc.CallOption) (*MsgInitiateTssKeyProcessResponse, error) + // VoteTssKeyProcess defines a operation for voting on an existing tss key process + VoteTssKeyProcess(ctx context.Context, in *MsgVoteTssKeyProcess, opts ...grpc.CallOption) (*MsgVoteTssKeyProcessResponse, error) } type msgClient struct { @@ -341,12 +423,34 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) InitiateTssKeyProcess(ctx context.Context, in *MsgInitiateTssKeyProcess, opts ...grpc.CallOption) (*MsgInitiateTssKeyProcessResponse, error) { + out := new(MsgInitiateTssKeyProcessResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Msg/InitiateTssKeyProcess", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) VoteTssKeyProcess(ctx context.Context, in *MsgVoteTssKeyProcess, opts ...grpc.CallOption) (*MsgVoteTssKeyProcessResponse, error) { + out := new(MsgVoteTssKeyProcessResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Msg/VoteTssKeyProcess", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // UpdateParams defines a governance operation for updating the parameters. // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // InitiateTssKeyProcess defines a operation for initiating a new tss key process + InitiateTssKeyProcess(context.Context, *MsgInitiateTssKeyProcess) (*MsgInitiateTssKeyProcessResponse, error) + // VoteTssKeyProcess defines a operation for voting on an existing tss key process + VoteTssKeyProcess(context.Context, *MsgVoteTssKeyProcess) (*MsgVoteTssKeyProcessResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -356,6 +460,12 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (*UnimplementedMsgServer) InitiateTssKeyProcess(ctx context.Context, req *MsgInitiateTssKeyProcess) (*MsgInitiateTssKeyProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InitiateTssKeyProcess not implemented") +} +func (*UnimplementedMsgServer) VoteTssKeyProcess(ctx context.Context, req *MsgVoteTssKeyProcess) (*MsgVoteTssKeyProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteTssKeyProcess not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -379,6 +489,42 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_InitiateTssKeyProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgInitiateTssKeyProcess) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).InitiateTssKeyProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Msg/InitiateTssKeyProcess", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).InitiateTssKeyProcess(ctx, req.(*MsgInitiateTssKeyProcess)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_VoteTssKeyProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteTssKeyProcess) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).VoteTssKeyProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Msg/VoteTssKeyProcess", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).VoteTssKeyProcess(ctx, req.(*MsgVoteTssKeyProcess)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "utss.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -387,6 +533,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "InitiateTssKeyProcess", + Handler: _Msg_InitiateTssKeyProcess_Handler, + }, + { + MethodName: "VoteTssKeyProcess", + Handler: _Msg_VoteTssKeyProcess_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "utss/v1/tx.proto", @@ -495,6 +649,29 @@ func (m *MsgInitiateTssKeyProcess) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *MsgInitiateTssKeyProcessResponse) 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 *MsgInitiateTssKeyProcessResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgInitiateTssKeyProcessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgVoteTssKeyProcess) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -544,6 +721,29 @@ func (m *MsgVoteTssKeyProcess) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *MsgVoteTssKeyProcessResponse) 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 *MsgVoteTssKeyProcessResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteTssKeyProcessResponse) 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 @@ -598,6 +798,15 @@ func (m *MsgInitiateTssKeyProcess) Size() (n int) { return n } +func (m *MsgInitiateTssKeyProcessResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgVoteTssKeyProcess) Size() (n int) { if m == nil { return 0 @@ -622,6 +831,15 @@ func (m *MsgVoteTssKeyProcess) Size() (n int) { return n } +func (m *MsgVoteTssKeyProcessResponse) 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 } @@ -913,6 +1131,56 @@ func (m *MsgInitiateTssKeyProcess) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgInitiateTssKeyProcessResponse) 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: MsgInitiateTssKeyProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgInitiateTssKeyProcessResponse: 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 (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1078,6 +1346,56 @@ func (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgVoteTssKeyProcessResponse) 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: MsgVoteTssKeyProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteTssKeyProcessResponse: 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 From 95265e48c1033623aaf7251f586d139894a5fbae Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 13:05:24 +0530 Subject: [PATCH 054/105] refactor: updated proto for tss_key_process --- proto/utss/v1/tx.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/proto/utss/v1/tx.proto b/proto/utss/v1/tx.proto index ba504231..1f19bcb2 100755 --- a/proto/utss/v1/tx.proto +++ b/proto/utss/v1/tx.proto @@ -55,7 +55,6 @@ message MsgInitiateTssKeyProcess { string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; TssProcessType process_type = 2; - uint64 expiry_height = 3; } message MsgInitiateTssKeyProcessResponse {} From 457200a89c78d054f5d12e09a7b7d775f224c645 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 13:05:43 +0530 Subject: [PATCH 055/105] refactor: added generated protobuf --- api/utss/v1/tx.pulsar.go | 164 +++++++++++++-------------------------- 1 file changed, 53 insertions(+), 111 deletions(-) diff --git a/api/utss/v1/tx.pulsar.go b/api/utss/v1/tx.pulsar.go index 10e174e4..81f6929c 100644 --- a/api/utss/v1/tx.pulsar.go +++ b/api/utss/v1/tx.pulsar.go @@ -872,10 +872,9 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } var ( - md_MsgInitiateTssKeyProcess protoreflect.MessageDescriptor - fd_MsgInitiateTssKeyProcess_signer protoreflect.FieldDescriptor - fd_MsgInitiateTssKeyProcess_process_type protoreflect.FieldDescriptor - fd_MsgInitiateTssKeyProcess_expiry_height protoreflect.FieldDescriptor + md_MsgInitiateTssKeyProcess protoreflect.MessageDescriptor + fd_MsgInitiateTssKeyProcess_signer protoreflect.FieldDescriptor + fd_MsgInitiateTssKeyProcess_process_type protoreflect.FieldDescriptor ) func init() { @@ -883,7 +882,6 @@ func init() { md_MsgInitiateTssKeyProcess = File_utss_v1_tx_proto.Messages().ByName("MsgInitiateTssKeyProcess") fd_MsgInitiateTssKeyProcess_signer = md_MsgInitiateTssKeyProcess.Fields().ByName("signer") fd_MsgInitiateTssKeyProcess_process_type = md_MsgInitiateTssKeyProcess.Fields().ByName("process_type") - fd_MsgInitiateTssKeyProcess_expiry_height = md_MsgInitiateTssKeyProcess.Fields().ByName("expiry_height") } var _ protoreflect.Message = (*fastReflection_MsgInitiateTssKeyProcess)(nil) @@ -963,12 +961,6 @@ func (x *fastReflection_MsgInitiateTssKeyProcess) Range(f func(protoreflect.Fiel return } } - if x.ExpiryHeight != uint64(0) { - value := protoreflect.ValueOfUint64(x.ExpiryHeight) - if !f(fd_MsgInitiateTssKeyProcess_expiry_height, value) { - return - } - } } // Has reports whether a field is populated. @@ -988,8 +980,6 @@ func (x *fastReflection_MsgInitiateTssKeyProcess) Has(fd protoreflect.FieldDescr return x.Signer != "" case "utss.v1.MsgInitiateTssKeyProcess.process_type": return x.ProcessType != 0 - case "utss.v1.MsgInitiateTssKeyProcess.expiry_height": - return x.ExpiryHeight != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) @@ -1010,8 +1000,6 @@ func (x *fastReflection_MsgInitiateTssKeyProcess) Clear(fd protoreflect.FieldDes x.Signer = "" case "utss.v1.MsgInitiateTssKeyProcess.process_type": x.ProcessType = 0 - case "utss.v1.MsgInitiateTssKeyProcess.expiry_height": - x.ExpiryHeight = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) @@ -1034,9 +1022,6 @@ func (x *fastReflection_MsgInitiateTssKeyProcess) Get(descriptor protoreflect.Fi case "utss.v1.MsgInitiateTssKeyProcess.process_type": value := x.ProcessType return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "utss.v1.MsgInitiateTssKeyProcess.expiry_height": - value := x.ExpiryHeight - return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) @@ -1061,8 +1046,6 @@ func (x *fastReflection_MsgInitiateTssKeyProcess) Set(fd protoreflect.FieldDescr x.Signer = value.Interface().(string) case "utss.v1.MsgInitiateTssKeyProcess.process_type": x.ProcessType = (TssProcessType)(value.Enum()) - case "utss.v1.MsgInitiateTssKeyProcess.expiry_height": - x.ExpiryHeight = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) @@ -1087,8 +1070,6 @@ func (x *fastReflection_MsgInitiateTssKeyProcess) Mutable(fd protoreflect.FieldD panic(fmt.Errorf("field signer of message utss.v1.MsgInitiateTssKeyProcess is not mutable")) case "utss.v1.MsgInitiateTssKeyProcess.process_type": panic(fmt.Errorf("field process_type of message utss.v1.MsgInitiateTssKeyProcess is not mutable")) - case "utss.v1.MsgInitiateTssKeyProcess.expiry_height": - panic(fmt.Errorf("field expiry_height of message utss.v1.MsgInitiateTssKeyProcess is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) @@ -1106,8 +1087,6 @@ func (x *fastReflection_MsgInitiateTssKeyProcess) NewField(fd protoreflect.Field return protoreflect.ValueOfString("") case "utss.v1.MsgInitiateTssKeyProcess.process_type": return protoreflect.ValueOfEnum(0) - case "utss.v1.MsgInitiateTssKeyProcess.expiry_height": - return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.MsgInitiateTssKeyProcess")) @@ -1184,9 +1163,6 @@ func (x *fastReflection_MsgInitiateTssKeyProcess) ProtoMethods() *protoiface.Met if x.ProcessType != 0 { n += 1 + runtime.Sov(uint64(x.ProcessType)) } - if x.ExpiryHeight != 0 { - n += 1 + runtime.Sov(uint64(x.ExpiryHeight)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1216,11 +1192,6 @@ func (x *fastReflection_MsgInitiateTssKeyProcess) ProtoMethods() *protoiface.Met i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.ExpiryHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpiryHeight)) - i-- - dAtA[i] = 0x18 - } if x.ProcessType != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.ProcessType)) i-- @@ -1333,25 +1304,6 @@ func (x *fastReflection_MsgInitiateTssKeyProcess) ProtoMethods() *protoiface.Met break } } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) - } - x.ExpiryHeight = 0 - 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++ - x.ExpiryHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2794,9 +2746,8 @@ type MsgInitiateTssKeyProcess struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - ProcessType TssProcessType `protobuf:"varint,2,opt,name=process_type,json=processType,proto3,enum=utss.v1.TssProcessType" json:"process_type,omitempty"` - ExpiryHeight uint64 `protobuf:"varint,3,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + ProcessType TssProcessType `protobuf:"varint,2,opt,name=process_type,json=processType,proto3,enum=utss.v1.TssProcessType" json:"process_type,omitempty"` } func (x *MsgInitiateTssKeyProcess) Reset() { @@ -2833,13 +2784,6 @@ func (x *MsgInitiateTssKeyProcess) GetProcessType() TssProcessType { return TssProcessType_TSS_PROCESS_KEYGEN } -func (x *MsgInitiateTssKeyProcess) GetExpiryHeight() uint64 { - if x != nil { - return x.ExpiryHeight - } - return 0 -} - type MsgInitiateTssKeyProcessResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2975,7 +2919,7 @@ var file_utss_v1_tx_proto_rawDesc = []byte{ 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, 0x22, 0xdd, 0x01, 0x0a, 0x18, 0x4d, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb8, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, @@ -2984,56 +2928,54 @@ var file_utss_v1_tx_proto_rawDesc = []byte{ 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x65, 0x78, - 0x70, 0x69, 0x72, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x74, 0x73, 0x73, - 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, - 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc8, - 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x73, 0x5f, - 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, - 0x73, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x3a, 0x29, - 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, - 0x75, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, - 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, - 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9a, 0x02, 0x0a, 0x03, 0x4d, 0x73, - 0x67, 0x12, 0x4a, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x18, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e, 0x75, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, - 0x15, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, - 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, - 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x29, 0x2e, 0x75, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, + 0x73, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x2e, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x56, + 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x14, 0x4d, 0x73, + 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, 0x73, 0x50, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x06, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x74, 0x73, 0x73, 0x2f, + 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x11, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, - 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x74, 0x73, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, - 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, - 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x8c, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, - 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, - 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, - 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, - 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, - 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, - 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9a, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4a, 0x0a, 0x0c, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x2e, 0x75, + 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x15, 0x49, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, + 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x1a, 0x29, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x59, 0x0a, 0x11, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, + 0x01, 0x42, 0x8c, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, + 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, + 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, + 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From dcf6f2c52c01915e569673027e3db904d6a21b9f Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 13:06:13 +0530 Subject: [PATCH 056/105] refactor: added initiate key tss msg impl --- x/utss/keeper/initiate_tss_key_process.go | 91 +++++++++++++++++++++++ x/utss/keeper/msg_server.go | 27 ++++++- x/utss/keeper/tss_key_process.go | 60 --------------- 3 files changed, 116 insertions(+), 62 deletions(-) create mode 100644 x/utss/keeper/initiate_tss_key_process.go diff --git a/x/utss/keeper/initiate_tss_key_process.go b/x/utss/keeper/initiate_tss_key_process.go new file mode 100644 index 00000000..7e82786a --- /dev/null +++ b/x/utss/keeper/initiate_tss_key_process.go @@ -0,0 +1,91 @@ +package keeper + +import ( + "context" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/pushchain/push-chain-node/x/utss/types" +) + +// InitiateTssKeyProcess creates a new keygen or reshare process. +func (k Keeper) InitiateTssKeyProcess( + ctx context.Context, + processType types.TssProcessType, +) error { + + sdkCtx := sdk.UnwrapSDKContext(ctx) + + // Check if a current process exists and is still active (not expired and pending) + existing, err := k.CurrentTssProcess.Get(ctx) + if err == nil { + if sdkCtx.BlockHeight() < existing.ExpiryHeight { + return fmt.Errorf("an active TSS process already exists (id: %d)", existing.Id) + } + } + + // Generate new process ID + processID, err := k.NextProcessId.Next(ctx) + if err != nil { + return fmt.Errorf("failed to generate process id: %w", err) + } + + // initiate a tss key process only for those validators which are either pending_join or active + universalValidators, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) + if err != nil { + return fmt.Errorf("failed to fetch eligible validators: %w", err) + } + + // Convert []sdk.ValAddress -> []string + universalValidatorSetStrs := make([]string, len(universalValidators)) + for i, v := range universalValidators { + universalValidatorSetStrs[i] = v.IdentifyInfo.CoreValidatorAddress + } + + // Create a new process + process := types.TssKeyProcess{ + Status: types.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING, + Participants: universalValidatorSetStrs, + BlockHeight: sdkCtx.BlockHeight(), + ExpiryHeight: int64(types.DefaultTssProcessExpiryAfterBlocks), + ProcessType: processType, + Id: processID, + } + + if err := process.ValidateBasic(); err != nil { + return fmt.Errorf("invalid tss process: %w", err) + } + + // Store as current + if err := k.CurrentTssProcess.Set(ctx, process); err != nil { + return fmt.Errorf("failed to set current process: %w", err) + } + + // Add to history + if err := k.ProcessHistory.Set(ctx, process.Id, process); err != nil { + return fmt.Errorf("failed to store process history: %w", err) + } + + // Emit TSS Process Initiated Event + event, err := types.NewTssProcessInitiatedEvent(types.TssProcessInitiatedEvent{ + ProcessID: process.Id, + ProcessType: process.ProcessType.String(), + Participants: len(process.Participants), + ExpiryHeight: process.ExpiryHeight, + }) + if err != nil { + return err + } + + sdkCtx.EventManager().EmitEvent(event) + + k.Logger().Info("New TSS process initiated", + "id", process.Id, + "type", process.ProcessType, + "participants", len(universalValidatorSetStrs), + "expiry_height", process.ExpiryHeight, + ) + + return nil +} diff --git a/x/utss/keeper/msg_server.go b/x/utss/keeper/msg_server.go index 1fa9c580..93dc7b34 100755 --- a/x/utss/keeper/msg_server.go +++ b/x/utss/keeper/msg_server.go @@ -6,6 +6,7 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "cosmossdk.io/errors" + sdkErrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/pushchain/push-chain-node/x/utss/types" ) @@ -37,13 +38,35 @@ func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams // InitiateTssKeyProcess implements types.MsgServer. func (ms msgServer) InitiateTssKeyProcess(ctx context.Context, msg *types.MsgInitiateTssKeyProcess) (*types.MsgInitiateTssKeyProcessResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - panic("InitiateTssKeyProcess is unimplemented") + // Retrieve the current Params + params, err := ms.k.Params.Get(ctx) + if err != nil { + return nil, errors.Wrapf(err, "failed to get params") + } + + if params.Admin != msg.Signer { + return nil, errors.Wrapf(sdkErrors.ErrUnauthorized, "invalid authority; expected %s, got %s", params.Admin, msg.Signer) + } + + err = ms.k.InitiateTssKeyProcess(ctx, msg.ProcessType) + if err != nil { + return nil, err + } return &types.MsgInitiateTssKeyProcessResponse{}, nil } // VoteTssKeyProcess implements types.MsgServer. func (ms msgServer) VoteTssKeyProcess(ctx context.Context, msg *types.MsgVoteTssKeyProcess) (*types.MsgVoteTssKeyProcessResponse, error) { + // Retrieve the current Params + params, err := ms.k.Params.Get(ctx) + if err != nil { + return nil, errors.Wrapf(err, "failed to get params") + } + + if params.Admin != msg.Signer { + return nil, errors.Wrapf(sdkErrors.ErrUnauthorized, "invalid authority; expected %s, got %s", params.Admin, msg.Signer) + } + // ctx := sdk.UnwrapSDKContext(goCtx) panic("VoteTssKeyProcess is unimplemented") return &types.MsgVoteTssKeyProcessResponse{}, nil diff --git a/x/utss/keeper/tss_key_process.go b/x/utss/keeper/tss_key_process.go index 8ff3e12a..ff195375 100644 --- a/x/utss/keeper/tss_key_process.go +++ b/x/utss/keeper/tss_key_process.go @@ -4,69 +4,9 @@ import ( "context" "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/pushchain/push-chain-node/x/utss/types" ) -// InitiateTssKeyProcess creates a new keygen or reshare process. -func (k Keeper) InitiateTssKeyProcess( - ctx context.Context, - processType types.TssProcessType, - expiryHeight int64, - participants []string, -) (types.TssKeyProcess, error) { - - sdkCtx := sdk.UnwrapSDKContext(ctx) - - // Check if a current process exists and is still active (not expired and pending) - existing, err := k.CurrentTssProcess.Get(ctx) - if err == nil { - if sdkCtx.BlockHeight() < existing.ExpiryHeight && - existing.Status == types.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING { - return types.TssKeyProcess{}, fmt.Errorf("an active TSS process already exists (id: %d)", existing.Id) - } - } - - // Generate new process ID - processID, err := k.NextProcessId.Next(ctx) - if err != nil { - return types.TssKeyProcess{}, fmt.Errorf("failed to generate process id: %w", err) - } - - // Create a new process - process := types.TssKeyProcess{ - Status: types.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING, - Participants: participants, - BlockHeight: sdkCtx.BlockHeight(), - ExpiryHeight: expiryHeight, - ProcessType: processType, - Id: processID, - } - - if err := process.ValidateBasic(); err != nil { - return types.TssKeyProcess{}, fmt.Errorf("invalid tss process: %w", err) - } - - // Store as current - if err := k.CurrentTssProcess.Set(ctx, process); err != nil { - return types.TssKeyProcess{}, fmt.Errorf("failed to set current process: %w", err) - } - - // Add to history - if err := k.ProcessHistory.Set(ctx, process.Id, process); err != nil { - return types.TssKeyProcess{}, fmt.Errorf("failed to store process history: %w", err) - } - - k.Logger().Info("🚀 New TSS process initiated", - "id", process.Id, - "type", process.ProcessType, - "participants", len(participants), - ) - - return process, nil -} - // FinalizeTssKeyProcess updates a process status and removes it from current if completed. func (k Keeper) FinalizeTssKeyProcess(ctx context.Context, processID uint64, status types.TssKeyProcessStatus) error { process, err := k.ProcessHistory.Get(ctx, processID) From d1c0d80fd9d7ab3bab95247eecdd2d9faf512ec2 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 13:06:46 +0530 Subject: [PATCH 057/105] refactor: added event for tss key process initiation --- x/utss/types/constants.go | 10 +++ x/utss/types/events.go | 52 +++++++++++--- x/utss/types/expected_keepers.go | 1 + x/utss/types/tx.pb.go | 113 +++++++++++-------------------- 4 files changed, 90 insertions(+), 86 deletions(-) create mode 100644 x/utss/types/constants.go diff --git a/x/utss/types/constants.go b/x/utss/types/constants.go new file mode 100644 index 00000000..c258c577 --- /dev/null +++ b/x/utss/types/constants.go @@ -0,0 +1,10 @@ +package types + +// Quorum numerator/denominator for validator votes (>2/3) +const ( + VotesThresholdNumerator = 2 + VotesThresholdDenominator = 3 + + // Default number of blocks after which tss process expires + DefaultTssProcessExpiryAfterBlocks = 1000 +) diff --git a/x/utss/types/events.go b/x/utss/types/events.go index 24ae013b..1938c71f 100644 --- a/x/utss/types/events.go +++ b/x/utss/types/events.go @@ -1,17 +1,47 @@ package types -import "math/big" +import ( + "encoding/json" + fmt "fmt" -// EVMFundsAddedEventData represents decoded data from the `FundsAdded` EVM event. -type EVMFundsAddedEventData struct { - AmountInUSD *big.Int - Decimals uint32 - PayloadHash string + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + EventTypeTssProcessInitiated = "tss_process_initiated" +) + +// TssProcessInitiatedEvent represents the emitted event when a new TSS key process starts. +type TssProcessInitiatedEvent struct { + ProcessID uint64 `json:"process_id"` + ProcessType string `json:"process_type"` + Participants int `json:"participants"` + ExpiryHeight int64 `json:"expiry_height"` +} + +// NewTssProcessInitiatedEvent creates and returns a Cosmos SDK event +func NewTssProcessInitiatedEvent(e TssProcessInitiatedEvent) (sdk.Event, error) { + bz, err := json.Marshal(e) + if err != nil { + return sdk.Event{}, fmt.Errorf("failed to marshal event: %w", err) + } + + event := sdk.NewEvent( + EventTypeTssProcessInitiated, + sdk.NewAttribute("process_id", fmt.Sprintf("%d", e.ProcessID)), + sdk.NewAttribute("process_type", e.ProcessType), + sdk.NewAttribute("participants", fmt.Sprintf("%d", e.Participants)), + sdk.NewAttribute("expiry_height", fmt.Sprintf("%d", e.ExpiryHeight)), + sdk.NewAttribute("data", string(bz)), // full JSON payload for off-chain consumption + ) + + return event, nil } -// SVMFundsAddedEventData represents decoded FundsAdded event from Solana -type SVMFundsAddedEventData struct { - AmountInUSD *big.Int - Decimals uint32 - PayloadHash string // hex-encoded +// String returns a readable log for CLI +func (e TssProcessInitiatedEvent) String() string { + return fmt.Sprintf( + "TSS process initiated | ID: %d | Type: %s | Participants: %d | ExpiryHeight: %d", + e.ProcessID, e.ProcessType, e.Participants, e.ExpiryHeight, + ) } diff --git a/x/utss/types/expected_keepers.go b/x/utss/types/expected_keepers.go index d1efc302..4ef6afaa 100644 --- a/x/utss/types/expected_keepers.go +++ b/x/utss/types/expected_keepers.go @@ -25,4 +25,5 @@ type UValidatorKeeper interface { isNew bool, err error) GetEligibleVoters(ctx context.Context) ([]uvalidatortypes.UniversalValidator, error) + GetAllUniversalValidators(ctx context.Context) ([]uvalidatortypes.UniversalValidator, error) } diff --git a/x/utss/types/tx.pb.go b/x/utss/types/tx.pb.go index 4b4c77e6..1e6df39c 100644 --- a/x/utss/types/tx.pb.go +++ b/x/utss/types/tx.pb.go @@ -132,9 +132,8 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo // Admin initiates new keygen/reshare process type MsgInitiateTssKeyProcess struct { - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - ProcessType TssProcessType `protobuf:"varint,2,opt,name=process_type,json=processType,proto3,enum=utss.v1.TssProcessType" json:"process_type,omitempty"` - ExpiryHeight uint64 `protobuf:"varint,3,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + ProcessType TssProcessType `protobuf:"varint,2,opt,name=process_type,json=processType,proto3,enum=utss.v1.TssProcessType" json:"process_type,omitempty"` } func (m *MsgInitiateTssKeyProcess) Reset() { *m = MsgInitiateTssKeyProcess{} } @@ -184,13 +183,6 @@ func (m *MsgInitiateTssKeyProcess) GetProcessType() TssProcessType { return TssProcessType_TSS_PROCESS_KEYGEN } -func (m *MsgInitiateTssKeyProcess) GetExpiryHeight() uint64 { - if m != nil { - return m.ExpiryHeight - } - return 0 -} - type MsgInitiateTssKeyProcessResponse struct { } @@ -344,44 +336,42 @@ func init() { func init() { proto.RegisterFile("utss/v1/tx.proto", fileDescriptor_4dcb8cba4d8073e4) } var fileDescriptor_4dcb8cba4d8073e4 = []byte{ - // 579 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x31, 0x6f, 0xd3, 0x5c, - 0x14, 0x8d, 0xdb, 0x34, 0x9f, 0xf2, 0xda, 0xaf, 0xa5, 0xa6, 0x55, 0x5d, 0x8b, 0x9a, 0x60, 0x84, - 0xd4, 0x56, 0x8a, 0x4d, 0x82, 0xc4, 0x90, 0x8d, 0x4c, 0x84, 0x2a, 0x52, 0x64, 0x02, 0x12, 0x2c, - 0x91, 0x13, 0x3f, 0x3d, 0x3f, 0x45, 0xf6, 0xb3, 0x7c, 0x5f, 0xaa, 0x78, 0x43, 0x4c, 0x88, 0x89, - 0x99, 0x5f, 0x91, 0x81, 0x1f, 0x91, 0xb1, 0x62, 0x62, 0x01, 0xa1, 0x64, 0xc8, 0xdf, 0x40, 0x7e, - 0xb6, 0x93, 0x34, 0x4d, 0xe9, 0xc0, 0x62, 0x5d, 0x9f, 0x73, 0xee, 0xf1, 0x3d, 0xbe, 0x4f, 0x0f, - 0xdd, 0x1b, 0x70, 0x00, 0xf3, 0xb2, 0x62, 0xf2, 0xa1, 0x11, 0x84, 0x8c, 0x33, 0xf9, 0xbf, 0x18, - 0x31, 0x2e, 0x2b, 0xea, 0x51, 0x8f, 0x81, 0xc7, 0xc0, 0xf4, 0x80, 0xc4, 0x02, 0x0f, 0x48, 0xa2, - 0x50, 0x0f, 0xb3, 0x1e, 0x82, 0x7d, 0x0c, 0x14, 0x52, 0xf8, 0xfe, 0xdc, 0x2a, 0x0a, 0x70, 0x06, - 0x1e, 0x10, 0x46, 0x98, 0x28, 0xcd, 0xb8, 0x4a, 0xd1, 0xe3, 0xc4, 0xba, 0x93, 0x10, 0xc9, 0x4b, - 0x4a, 0xed, 0xdb, 0x1e, 0xf5, 0x99, 0x29, 0x9e, 0x09, 0xa4, 0x7f, 0x92, 0xd0, 0x5e, 0x13, 0xc8, - 0x9b, 0xc0, 0xb1, 0x39, 0x6e, 0xd9, 0xa1, 0xed, 0x81, 0xfc, 0x1c, 0x15, 0xed, 0x01, 0x77, 0x59, - 0x48, 0x79, 0xa4, 0x48, 0x25, 0xe9, 0xb4, 0x58, 0x57, 0xbe, 0x7f, 0x2b, 0x1f, 0xa4, 0x5e, 0x2f, - 0x1c, 0x27, 0xc4, 0x00, 0xaf, 0x79, 0x48, 0x7d, 0x62, 0x2d, 0xa4, 0x72, 0x19, 0x15, 0x02, 0xe1, - 0xa0, 0x6c, 0x94, 0xa4, 0xd3, 0xed, 0xea, 0x9e, 0x91, 0xc6, 0x35, 0x12, 0xe3, 0x7a, 0x7e, 0xfc, - 0xeb, 0x61, 0xce, 0x4a, 0x45, 0xb5, 0xdd, 0x8f, 0xb3, 0xd1, 0xf9, 0xa2, 0x5d, 0x3f, 0x46, 0x47, - 0x2b, 0x93, 0x58, 0x18, 0x02, 0xe6, 0x03, 0xd6, 0x7f, 0x4a, 0x48, 0x69, 0x02, 0x69, 0xf8, 0x94, - 0x53, 0x9b, 0xe3, 0x36, 0xc0, 0x05, 0x8e, 0x5a, 0x21, 0xeb, 0x61, 0x00, 0xf9, 0x29, 0x2a, 0x00, - 0x25, 0x3e, 0x0e, 0xef, 0x9c, 0x35, 0xd5, 0xc9, 0x35, 0xb4, 0x13, 0x24, 0xcd, 0x9d, 0xf8, 0x7f, - 0x8a, 0x71, 0x77, 0xab, 0x47, 0xf3, 0x71, 0xdb, 0x00, 0xa9, 0x79, 0x3b, 0x0a, 0xb0, 0xb5, 0x1d, - 0x2c, 0x5e, 0xe4, 0xc7, 0xe8, 0x7f, 0x3c, 0x0c, 0x68, 0x18, 0x75, 0x5c, 0x4c, 0x89, 0xcb, 0x95, - 0xcd, 0x92, 0x74, 0x9a, 0xb7, 0x76, 0x12, 0xf0, 0xa5, 0xc0, 0x6a, 0x46, 0x1c, 0x2d, 0xfd, 0xda, - 0xe7, 0xd9, 0xe8, 0x5c, 0x13, 0xeb, 0x6b, 0x02, 0x79, 0xcb, 0x38, 0xce, 0x52, 0x2c, 0x22, 0xe8, - 0x3a, 0x2a, 0xdd, 0x16, 0x6f, 0xfe, 0x0f, 0xc6, 0x12, 0x3a, 0x48, 0x1d, 0xfe, 0x35, 0xff, 0x09, - 0x42, 0x59, 0x7e, 0xea, 0x88, 0xf4, 0x79, 0xab, 0x98, 0x22, 0x0d, 0x27, 0xa6, 0x39, 0x40, 0x27, - 0x18, 0x74, 0xfb, 0x38, 0x12, 0xf9, 0x8a, 0x56, 0x91, 0x03, 0xb4, 0x04, 0x20, 0x1f, 0xa2, 0x42, - 0x1f, 0x47, 0x71, 0x67, 0x5e, 0x50, 0x5b, 0x7d, 0x1c, 0x35, 0x9c, 0xda, 0xd9, 0x4a, 0xe6, 0xe3, - 0xe5, 0xcc, 0xd7, 0x26, 0xd6, 0x35, 0xf4, 0x60, 0x1d, 0x9e, 0x45, 0xad, 0x7e, 0xdd, 0x40, 0x9b, - 0x4d, 0x20, 0xf2, 0x2b, 0xb4, 0x73, 0xed, 0x60, 0x2a, 0xf3, 0x0d, 0xad, 0x1c, 0x14, 0xb5, 0x74, - 0x1b, 0x93, 0x79, 0xca, 0x18, 0x1d, 0xae, 0x3f, 0x3e, 0x8f, 0x96, 0x5b, 0xd7, 0x4a, 0xd4, 0xb3, - 0x3b, 0x25, 0xf3, 0xcf, 0xbc, 0x43, 0xfb, 0x37, 0x37, 0x74, 0xb2, 0xdc, 0x7f, 0x83, 0x56, 0x9f, - 0xfc, 0x95, 0xce, 0xac, 0xd5, 0xad, 0x0f, 0xb3, 0xd1, 0xb9, 0x54, 0xbf, 0x18, 0x4f, 0x34, 0xe9, - 0x6a, 0xa2, 0x49, 0xbf, 0x27, 0x9a, 0xf4, 0x65, 0xaa, 0xe5, 0xae, 0xa6, 0x5a, 0xee, 0xc7, 0x54, - 0xcb, 0xbd, 0xaf, 0x10, 0xca, 0xdd, 0x41, 0xd7, 0xe8, 0x31, 0xcf, 0x0c, 0x06, 0xe0, 0xf6, 0x5c, - 0x9b, 0xfa, 0xa2, 0x2a, 0x8b, 0xb2, 0xec, 0x33, 0x07, 0x9b, 0x43, 0x53, 0x2c, 0x46, 0x5c, 0x24, - 0xdd, 0x82, 0xb8, 0x05, 0x9e, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x63, 0x5f, 0xe6, 0xab, - 0x04, 0x00, 0x00, + // 554 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xbf, 0x6f, 0xda, 0x40, + 0x18, 0xc5, 0xf9, 0x41, 0xc5, 0x25, 0x4a, 0x1a, 0x17, 0x84, 0xb1, 0x1a, 0x97, 0x5a, 0xaa, 0x94, + 0x20, 0x61, 0x17, 0x2a, 0x75, 0x60, 0x2b, 0x1b, 0x8d, 0x90, 0x90, 0x4b, 0x2b, 0xb5, 0x0b, 0x32, + 0xf8, 0x74, 0x58, 0xc8, 0x3e, 0xcb, 0xdf, 0x11, 0xc5, 0x5b, 0xd5, 0xa9, 0xea, 0xd4, 0xb9, 0x7f, + 0x05, 0x43, 0x87, 0xfe, 0x09, 0x8c, 0x51, 0xa7, 0x4e, 0x55, 0x05, 0x03, 0xff, 0x46, 0xe5, 0xf3, + 0x19, 0x08, 0x21, 0xcd, 0xd0, 0xc5, 0xfa, 0xee, 0x7d, 0xef, 0x7b, 0x7e, 0xef, 0xee, 0x6c, 0xf4, + 0x70, 0xcc, 0x00, 0xcc, 0xcb, 0x9a, 0xc9, 0xae, 0x8c, 0x20, 0xa4, 0x8c, 0xca, 0x0f, 0x62, 0xc4, + 0xb8, 0xac, 0xa9, 0xc5, 0x01, 0x05, 0x8f, 0x82, 0xe9, 0x01, 0x89, 0x09, 0x1e, 0x90, 0x84, 0xa1, + 0x16, 0xd2, 0x19, 0x82, 0x7d, 0x0c, 0x2e, 0x08, 0xf8, 0xd1, 0x52, 0x2a, 0x0a, 0x70, 0x0a, 0xe6, + 0x09, 0x25, 0x94, 0x97, 0x66, 0x5c, 0x09, 0xb4, 0x94, 0x48, 0xf7, 0x92, 0x46, 0xb2, 0x10, 0xad, + 0x13, 0xdb, 0x73, 0x7d, 0x6a, 0xf2, 0x67, 0x02, 0xe9, 0x9f, 0x25, 0x74, 0xdc, 0x06, 0xf2, 0x36, + 0x70, 0x6c, 0x86, 0x3b, 0x76, 0x68, 0x7b, 0x20, 0xbf, 0x44, 0x39, 0x7b, 0xcc, 0x86, 0x34, 0x74, + 0x59, 0xa4, 0x48, 0x65, 0xe9, 0x2c, 0xd7, 0x54, 0x7e, 0x7e, 0xaf, 0xe6, 0x85, 0xd6, 0x2b, 0xc7, + 0x09, 0x31, 0xc0, 0x1b, 0x16, 0xba, 0x3e, 0xb1, 0x56, 0x54, 0xb9, 0x8a, 0xb2, 0x01, 0x57, 0x50, + 0x76, 0xca, 0xd2, 0xd9, 0x41, 0xfd, 0xd8, 0x10, 0x71, 0x8d, 0x44, 0xb8, 0xb9, 0x37, 0xfd, 0xfd, + 0x24, 0x63, 0x09, 0x52, 0xe3, 0xe8, 0xd3, 0x62, 0x52, 0x59, 0x8d, 0xeb, 0x25, 0x54, 0xdc, 0x70, + 0x62, 0x61, 0x08, 0xa8, 0x0f, 0x58, 0xff, 0x21, 0x21, 0xa5, 0x0d, 0xa4, 0xe5, 0xbb, 0xcc, 0xb5, + 0x19, 0xee, 0x02, 0x5c, 0xe0, 0xa8, 0x13, 0xd2, 0x01, 0x06, 0x90, 0x9f, 0xa3, 0x2c, 0xb8, 0xc4, + 0xc7, 0xe1, 0xbd, 0x5e, 0x05, 0x4f, 0x6e, 0xa0, 0xc3, 0x20, 0x19, 0xee, 0xc5, 0xfb, 0xc9, 0xed, + 0x1e, 0xd5, 0x8b, 0x4b, 0xbb, 0x5d, 0x00, 0x21, 0xde, 0x8d, 0x02, 0x6c, 0x1d, 0x04, 0xab, 0x45, + 0xc3, 0x88, 0x5d, 0x0b, 0xa1, 0x2f, 0x8b, 0x49, 0x45, 0xe3, 0x27, 0xd3, 0x06, 0xf2, 0x8e, 0x32, + 0x9c, 0x1a, 0x5c, 0xb9, 0xd3, 0x75, 0x54, 0xbe, 0xcb, 0xf9, 0x32, 0xde, 0x54, 0x42, 0x79, 0xa1, + 0xf0, 0xbf, 0xd1, 0x4e, 0x11, 0x4a, 0xa3, 0xb9, 0x0e, 0x0f, 0xb6, 0x67, 0xe5, 0x04, 0xd2, 0x72, + 0xe2, 0x36, 0x03, 0xe8, 0x05, 0xe3, 0xfe, 0x08, 0x47, 0xca, 0x6e, 0x2c, 0x6a, 0xe5, 0x18, 0x40, + 0x87, 0x03, 0x72, 0x01, 0x65, 0x47, 0x38, 0x8a, 0x27, 0xf7, 0x78, 0x6b, 0x7f, 0x84, 0xa3, 0x96, + 0xd3, 0x38, 0xdf, 0xc8, 0x5c, 0x5a, 0xcf, 0x7c, 0xc3, 0xb1, 0xae, 0xa1, 0xc7, 0xdb, 0xf0, 0x34, + 0x6a, 0xfd, 0xdb, 0x0e, 0xda, 0x6d, 0x03, 0x91, 0x5f, 0xa3, 0xc3, 0x1b, 0x77, 0x4e, 0x59, 0x6e, + 0xfe, 0xc6, 0x1d, 0x50, 0xcb, 0x77, 0x75, 0x52, 0x4d, 0x19, 0xa3, 0xc2, 0xf6, 0x9b, 0xf1, 0x74, + 0x7d, 0x74, 0x2b, 0x45, 0x3d, 0xbf, 0x97, 0xb2, 0x7c, 0xcd, 0x7b, 0x74, 0x72, 0xfb, 0x84, 0x4e, + 0xd7, 0xe7, 0x6f, 0xb5, 0xd5, 0x67, 0xff, 0x6c, 0xa7, 0xd2, 0xea, 0xfe, 0xc7, 0xc5, 0xa4, 0x22, + 0x35, 0x2f, 0xa6, 0x33, 0x4d, 0xba, 0x9e, 0x69, 0xd2, 0x9f, 0x99, 0x26, 0x7d, 0x9d, 0x6b, 0x99, + 0xeb, 0xb9, 0x96, 0xf9, 0x35, 0xd7, 0x32, 0x1f, 0x6a, 0xc4, 0x65, 0xc3, 0x71, 0xdf, 0x18, 0x50, + 0xcf, 0x0c, 0xc6, 0x30, 0x1c, 0x0c, 0x6d, 0xd7, 0xe7, 0x55, 0x95, 0x97, 0x55, 0x9f, 0x3a, 0xd8, + 0xbc, 0x32, 0xf9, 0xc1, 0xf0, 0x7f, 0x44, 0x3f, 0xcb, 0x3f, 0xf0, 0x17, 0x7f, 0x03, 0x00, 0x00, + 0xff, 0xff, 0x18, 0x10, 0x39, 0x56, 0x86, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -629,11 +619,6 @@ func (m *MsgInitiateTssKeyProcess) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - if m.ExpiryHeight != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.ExpiryHeight)) - i-- - dAtA[i] = 0x18 - } if m.ProcessType != 0 { i = encodeVarintTx(dAtA, i, uint64(m.ProcessType)) i-- @@ -792,9 +777,6 @@ func (m *MsgInitiateTssKeyProcess) Size() (n int) { if m.ProcessType != 0 { n += 1 + sovTx(uint64(m.ProcessType)) } - if m.ExpiryHeight != 0 { - n += 1 + sovTx(uint64(m.ExpiryHeight)) - } return n } @@ -1091,25 +1073,6 @@ func (m *MsgInitiateTssKeyProcess) Unmarshal(dAtA []byte) error { break } } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) - } - m.ExpiryHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpiryHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) From 821de7263d3d12a0cf4c86fed7f5ecaa41def722 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 16:30:05 +0530 Subject: [PATCH 058/105] refactor: modified ballot proto to support tss --- proto/uvalidator/v1/ballot.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/proto/uvalidator/v1/ballot.proto b/proto/uvalidator/v1/ballot.proto index 8e408a0a..02bcad3a 100644 --- a/proto/uvalidator/v1/ballot.proto +++ b/proto/uvalidator/v1/ballot.proto @@ -28,6 +28,7 @@ enum BallotObservationType { BALLOT_OBSERVATION_TYPE_UNSPECIFIED = 0; BALLOT_OBSERVATION_TYPE_INBOUND_TX = 1; BALLOT_OBSERVATION_TYPE_OUTBOUND_TX = 2; + BALLOT_OBSERVATION_TYPE_TSS_KEY = 3; } // --------------------------- From b096a5825c1e36a63c1b8e7cddb674823b8e2f13 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 16:31:39 +0530 Subject: [PATCH 059/105] refactor: added generated protobuf --- api/uvalidator/v1/ballot.pulsar.go | 47 ++++++++++-------- x/uvalidator/types/ballot.pb.go | 80 ++++++++++++++++-------------- 2 files changed, 68 insertions(+), 59 deletions(-) diff --git a/api/uvalidator/v1/ballot.pulsar.go b/api/uvalidator/v1/ballot.pulsar.go index e44b59db..e1f3e123 100644 --- a/api/uvalidator/v1/ballot.pulsar.go +++ b/api/uvalidator/v1/ballot.pulsar.go @@ -1052,6 +1052,7 @@ const ( BallotObservationType_BALLOT_OBSERVATION_TYPE_UNSPECIFIED BallotObservationType = 0 BallotObservationType_BALLOT_OBSERVATION_TYPE_INBOUND_TX BallotObservationType = 1 BallotObservationType_BALLOT_OBSERVATION_TYPE_OUTBOUND_TX BallotObservationType = 2 + BallotObservationType_BALLOT_OBSERVATION_TYPE_TSS_KEY BallotObservationType = 3 ) // Enum value maps for BallotObservationType. @@ -1060,11 +1061,13 @@ var ( 0: "BALLOT_OBSERVATION_TYPE_UNSPECIFIED", 1: "BALLOT_OBSERVATION_TYPE_INBOUND_TX", 2: "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX", + 3: "BALLOT_OBSERVATION_TYPE_TSS_KEY", } BallotObservationType_value = map[string]int32{ "BALLOT_OBSERVATION_TYPE_UNSPECIFIED": 0, "BALLOT_OBSERVATION_TYPE_INBOUND_TX": 1, "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX": 2, + "BALLOT_OBSERVATION_TYPE_TSS_KEY": 3, } ) @@ -1283,7 +1286,7 @@ var file_uvalidator_v1_ballot_proto_rawDesc = []byte{ 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x42, 0x41, 0x4c, 0x4c, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x04, 0x1a, 0x04, - 0xa8, 0xa4, 0x1e, 0x01, 0x2a, 0x97, 0x01, 0x0a, 0x15, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x4f, + 0xa8, 0xa4, 0x1e, 0x01, 0x2a, 0xbc, 0x01, 0x0a, 0x15, 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x23, 0x42, 0x41, 0x4c, 0x4c, 0x4f, 0x54, 0x5f, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, @@ -1292,26 +1295,28 @@ var file_uvalidator_v1_ballot_proto_rawDesc = []byte{ 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x42, 0x41, 0x4c, 0x4c, 0x4f, 0x54, 0x5f, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x55, 0x54, 0x42, 0x4f, - 0x55, 0x4e, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x02, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, 0x2a, 0x63, - 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1d, 0x0a, 0x19, - 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, - 0x59, 0x45, 0x54, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x56, - 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, - 0x53, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, - 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x02, 0x1a, 0x04, 0xa8, - 0xa4, 0x1e, 0x01, 0x42, 0xba, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x42, 0x61, 0x6c, 0x6c, 0x6f, - 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, - 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, - 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x55, 0x4e, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x02, 0x12, 0x23, 0x0a, 0x1f, 0x42, 0x41, 0x4c, 0x4c, + 0x4f, 0x54, 0x5f, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x54, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x03, 0x1a, 0x04, 0xa8, + 0xa4, 0x1e, 0x01, 0x2a, 0x63, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, + 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x59, 0x45, 0x54, 0x5f, 0x56, 0x4f, 0x54, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, + 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, + 0x45, 0x5f, 0x52, 0x45, 0x53, 0x55, 0x4c, 0x54, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x10, 0x02, 0x1a, 0x04, 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xba, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0b, + 0x42, 0x61, 0x6c, 0x6c, 0x6f, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, + 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/x/uvalidator/types/ballot.pb.go b/x/uvalidator/types/ballot.pb.go index 1324e538..68d10d68 100644 --- a/x/uvalidator/types/ballot.pb.go +++ b/x/uvalidator/types/ballot.pb.go @@ -70,18 +70,21 @@ const ( BallotObservationType_BALLOT_OBSERVATION_TYPE_UNSPECIFIED BallotObservationType = 0 BallotObservationType_BALLOT_OBSERVATION_TYPE_INBOUND_TX BallotObservationType = 1 BallotObservationType_BALLOT_OBSERVATION_TYPE_OUTBOUND_TX BallotObservationType = 2 + BallotObservationType_BALLOT_OBSERVATION_TYPE_TSS_KEY BallotObservationType = 3 ) var BallotObservationType_name = map[int32]string{ 0: "BALLOT_OBSERVATION_TYPE_UNSPECIFIED", 1: "BALLOT_OBSERVATION_TYPE_INBOUND_TX", 2: "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX", + 3: "BALLOT_OBSERVATION_TYPE_TSS_KEY", } var BallotObservationType_value = map[string]int32{ "BALLOT_OBSERVATION_TYPE_UNSPECIFIED": 0, "BALLOT_OBSERVATION_TYPE_INBOUND_TX": 1, "BALLOT_OBSERVATION_TYPE_OUTBOUND_TX": 2, + "BALLOT_OBSERVATION_TYPE_TSS_KEY": 3, } func (x BallotObservationType) String() string { @@ -236,44 +239,45 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/ballot.proto", fileDescriptor_b9f9c8e0d3c818f3) } var fileDescriptor_b9f9c8e0d3c818f3 = []byte{ - // 585 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x4f, 0x6f, 0xd3, 0x3e, - 0x1c, 0xc6, 0xeb, 0x76, 0xeb, 0xef, 0x37, 0x03, 0x5d, 0xe6, 0x6d, 0x90, 0x15, 0x11, 0x55, 0x03, - 0xb1, 0x32, 0x69, 0x0d, 0xdb, 0x0e, 0x9c, 0xfb, 0xc7, 0x83, 0xa0, 0x2a, 0x29, 0x89, 0x33, 0x6d, - 0x5c, 0xac, 0xb4, 0xb5, 0x1a, 0x8b, 0xac, 0xae, 0x12, 0xb7, 0xda, 0xde, 0x05, 0x37, 0x8e, 0x5c, - 0x38, 0xf0, 0x52, 0x38, 0xee, 0xc8, 0x11, 0x6d, 0x2f, 0x83, 0x0b, 0x8a, 0xb3, 0xb2, 0xb6, 0x0c, - 0x2e, 0xd1, 0x57, 0xcf, 0xe7, 0x79, 0xfc, 0xd8, 0x49, 0x0c, 0xcb, 0xe3, 0x49, 0x10, 0xf1, 0x7e, - 0x20, 0x45, 0x6c, 0x4e, 0xf6, 0xcd, 0x6e, 0x10, 0x45, 0x42, 0xd6, 0x46, 0xb1, 0x90, 0x02, 0x3d, - 0xb8, 0x65, 0xb5, 0xc9, 0x7e, 0x79, 0x63, 0x20, 0x06, 0x42, 0x11, 0x33, 0x9d, 0x32, 0x53, 0x79, - 0x2d, 0x38, 0xe3, 0x43, 0x61, 0xaa, 0x67, 0x26, 0x6d, 0xff, 0xcc, 0xc3, 0x62, 0x43, 0x2d, 0x84, - 0x4a, 0x30, 0xcf, 0xfb, 0x3a, 0xa8, 0x80, 0xea, 0x8a, 0x9b, 0xe7, 0x7d, 0x84, 0xe1, 0xbd, 0xac, - 0x82, 0xca, 0x8b, 0x11, 0xd3, 0xf3, 0x15, 0x50, 0x2d, 0x1d, 0x3c, 0xab, 0xcd, 0x15, 0xd5, 0xb2, - 0xac, 0xd3, 0x4d, 0x58, 0x3c, 0x09, 0x24, 0x17, 0x43, 0x72, 0x31, 0x62, 0x2e, 0xcc, 0x82, 0xe9, - 0x8c, 0x76, 0xe0, 0x2a, 0x8b, 0xf8, 0x80, 0x77, 0x23, 0x46, 0x27, 0x42, 0xb2, 0x38, 0xd1, 0x0b, - 0x95, 0x42, 0x75, 0xc5, 0x2d, 0x4d, 0xe5, 0x63, 0xa5, 0x22, 0x13, 0x2e, 0xa7, 0x3c, 0xd1, 0x97, - 0x2a, 0x85, 0x6a, 0xe9, 0x60, 0x6b, 0xa1, 0x29, 0x75, 0xb9, 0x2c, 0x19, 0x47, 0xd2, 0xcd, 0x7c, - 0xe8, 0x05, 0xd4, 0x26, 0x42, 0xf2, 0xe1, 0x80, 0xca, 0x30, 0x66, 0x49, 0x28, 0xa2, 0xbe, 0xbe, - 0x5c, 0x01, 0xd5, 0x82, 0xbb, 0x9a, 0xe9, 0x64, 0x2a, 0xa3, 0x43, 0x58, 0x4c, 0x64, 0x20, 0xc7, - 0x89, 0x5e, 0x54, 0xc7, 0x78, 0x7c, 0xe7, 0x31, 0x3c, 0x65, 0x71, 0x6f, 0xac, 0xe8, 0x25, 0xdc, - 0xe8, 0x46, 0xa2, 0xf7, 0x81, 0x86, 0x8c, 0x0f, 0x42, 0x49, 0x7b, 0x31, 0x0b, 0x24, 0xeb, 0xeb, - 0xff, 0xa9, 0x0e, 0xa4, 0xd8, 0x1b, 0x85, 0x9a, 0x19, 0x41, 0x35, 0xb8, 0x3e, 0x97, 0x60, 0xe7, - 0x23, 0x1e, 0x5f, 0xe8, 0xff, 0xab, 0xc0, 0xda, 0x4c, 0x00, 0x2b, 0xb0, 0xfb, 0x19, 0xc0, 0xfb, - 0xb3, 0xd5, 0xe8, 0x09, 0xdc, 0x6a, 0xd4, 0xdb, 0x6d, 0x87, 0x50, 0x8f, 0xd4, 0x89, 0xef, 0x51, - 0xdf, 0xf6, 0x3a, 0xb8, 0x69, 0x1d, 0x59, 0xb8, 0xa5, 0xe5, 0xd0, 0x16, 0xdc, 0x9c, 0xc7, 0x1d, - 0x6c, 0xb7, 0x2c, 0xfb, 0xb5, 0x06, 0x90, 0x0e, 0x37, 0x16, 0x50, 0xdd, 0xf3, 0x70, 0x4b, 0xcb, - 0xa3, 0x32, 0x7c, 0x38, 0x4f, 0x5c, 0xfc, 0x16, 0x37, 0x09, 0x6e, 0x69, 0x85, 0x3f, 0x17, 0xc4, - 0x27, 0x1d, 0xcb, 0xc5, 0x2d, 0x6d, 0xa9, 0xbc, 0xf4, 0xf5, 0x8b, 0x01, 0x76, 0x3f, 0x01, 0xb8, - 0x79, 0xe7, 0x37, 0x46, 0x3b, 0xf0, 0xe9, 0x4d, 0xd4, 0x69, 0x78, 0xd8, 0x3d, 0xae, 0x13, 0xcb, - 0xb1, 0x29, 0x39, 0xed, 0xe0, 0x85, 0x4d, 0x3f, 0x87, 0xdb, 0x7f, 0x33, 0x5a, 0x76, 0xc3, 0xf1, - 0xed, 0x16, 0x25, 0x27, 0x1a, 0xf8, 0xd7, 0x82, 0x8e, 0x4f, 0x7e, 0x1b, 0xf3, 0x37, 0x3b, 0xeb, - 0x41, 0x78, 0xfb, 0x4b, 0xa4, 0x2f, 0xee, 0xd8, 0x21, 0x98, 0xba, 0xd8, 0xf3, 0xdb, 0x84, 0xda, - 0x0e, 0xa1, 0xa7, 0x98, 0xd0, 0x54, 0x4b, 0xf7, 0xf0, 0x08, 0xae, 0xcf, 0x62, 0xcf, 0x6f, 0x36, - 0xb1, 0xe7, 0x69, 0x60, 0x11, 0x1c, 0xd5, 0xad, 0xb6, 0xef, 0xe2, 0x69, 0x49, 0xe3, 0xdd, 0xb7, - 0x2b, 0x03, 0x5c, 0x5e, 0x19, 0xe0, 0xc7, 0x95, 0x01, 0x3e, 0x5e, 0x1b, 0xb9, 0xcb, 0x6b, 0x23, - 0xf7, 0xfd, 0xda, 0xc8, 0xbd, 0x7f, 0x35, 0xe0, 0x32, 0x1c, 0x77, 0x6b, 0x3d, 0x71, 0x66, 0x8e, - 0xc6, 0x49, 0xd8, 0x0b, 0x03, 0x3e, 0x54, 0xd3, 0x9e, 0x1a, 0xf7, 0x86, 0xa2, 0xcf, 0xcc, 0x73, - 0x73, 0xe6, 0xce, 0xa6, 0xd7, 0x28, 0xe9, 0x16, 0xd5, 0xc5, 0x3b, 0xfc, 0x15, 0x00, 0x00, 0xff, - 0xff, 0xaf, 0xa0, 0x83, 0xb4, 0xce, 0x03, 0x00, 0x00, + // 601 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x4f, 0x53, 0xd3, 0x4e, + 0x1c, 0xc6, 0x9b, 0x14, 0xfa, 0xfb, 0xb1, 0x6a, 0x09, 0x0b, 0x68, 0xa8, 0x63, 0xec, 0x80, 0x23, + 0x95, 0x19, 0x1a, 0x81, 0x83, 0xe7, 0xfe, 0x59, 0x34, 0xda, 0x49, 0x6a, 0x76, 0xc3, 0x80, 0x97, + 0x9d, 0xb4, 0xdd, 0x69, 0x32, 0x86, 0x6e, 0x27, 0xd9, 0x76, 0xe0, 0x5d, 0xf8, 0x0e, 0xbc, 0x78, + 0xf0, 0x45, 0xf8, 0x02, 0x3c, 0x72, 0xf4, 0xe8, 0xc0, 0xcb, 0xf0, 0xe2, 0x64, 0x53, 0xa4, 0xad, + 0xe0, 0x25, 0xf3, 0x9d, 0xe7, 0xf3, 0x3c, 0xfb, 0xec, 0x26, 0x59, 0x50, 0x1a, 0x8d, 0xfd, 0x28, + 0xec, 0xf9, 0x82, 0xc7, 0xe6, 0x78, 0xcf, 0xec, 0xf8, 0x51, 0xc4, 0x45, 0x75, 0x18, 0x73, 0xc1, + 0xe1, 0x83, 0x1b, 0x56, 0x1d, 0xef, 0x95, 0xd6, 0xfa, 0xbc, 0xcf, 0x25, 0x31, 0xd3, 0x29, 0x33, + 0x95, 0x56, 0xfc, 0xd3, 0x70, 0xc0, 0x4d, 0xf9, 0xcc, 0xa4, 0xcd, 0x5f, 0x2a, 0x28, 0xd4, 0xe5, + 0x42, 0xb0, 0x08, 0xd4, 0xb0, 0xa7, 0x2b, 0x65, 0xa5, 0xb2, 0xe4, 0xaa, 0x61, 0x0f, 0x22, 0x70, + 0x2f, 0xab, 0xa0, 0xe2, 0x7c, 0xc8, 0x74, 0xb5, 0xac, 0x54, 0x8a, 0xfb, 0xcf, 0xaa, 0x33, 0x45, + 0xd5, 0x2c, 0xeb, 0x74, 0x12, 0x16, 0x8f, 0x7d, 0x11, 0xf2, 0x01, 0x39, 0x1f, 0x32, 0x17, 0x64, + 0xc1, 0x74, 0x86, 0xdb, 0x60, 0x99, 0x45, 0x61, 0x3f, 0xec, 0x44, 0x8c, 0x8e, 0xb9, 0x60, 0x71, + 0xa2, 0xe7, 0xcb, 0xf9, 0xca, 0x92, 0x5b, 0xbc, 0x96, 0x8f, 0xa4, 0x0a, 0x4d, 0xb0, 0x98, 0xf2, + 0x44, 0x5f, 0x28, 0xe7, 0x2b, 0xc5, 0xfd, 0x8d, 0xb9, 0xa6, 0xd4, 0xe5, 0xb2, 0x64, 0x14, 0x09, + 0x37, 0xf3, 0xc1, 0x17, 0x40, 0x1b, 0x73, 0x11, 0x0e, 0xfa, 0x54, 0x04, 0x31, 0x4b, 0x02, 0x1e, + 0xf5, 0xf4, 0xc5, 0xb2, 0x52, 0xc9, 0xbb, 0xcb, 0x99, 0x4e, 0xae, 0x65, 0x78, 0x00, 0x0a, 0x89, + 0xf0, 0xc5, 0x28, 0xd1, 0x0b, 0xf2, 0x18, 0x8f, 0x6f, 0x3d, 0x06, 0x96, 0x16, 0x77, 0x62, 0x85, + 0x2f, 0xc1, 0x5a, 0x27, 0xe2, 0xdd, 0x8f, 0x34, 0x60, 0x61, 0x3f, 0x10, 0xb4, 0x1b, 0x33, 0x5f, + 0xb0, 0x9e, 0xfe, 0x9f, 0xec, 0x80, 0x92, 0xbd, 0x91, 0xa8, 0x91, 0x11, 0x58, 0x05, 0xab, 0x33, + 0x09, 0x76, 0x36, 0x0c, 0xe3, 0x73, 0xfd, 0x7f, 0x19, 0x58, 0x99, 0x0a, 0x20, 0x09, 0x76, 0x3e, + 0x2b, 0xe0, 0xfe, 0x74, 0x35, 0x7c, 0x02, 0x36, 0xea, 0xb5, 0x56, 0xcb, 0x21, 0x14, 0x93, 0x1a, + 0xf1, 0x30, 0xf5, 0x6c, 0xdc, 0x46, 0x0d, 0xeb, 0xd0, 0x42, 0x4d, 0x2d, 0x07, 0x37, 0xc0, 0xfa, + 0x2c, 0x6e, 0x23, 0xbb, 0x69, 0xd9, 0xaf, 0x35, 0x05, 0xea, 0x60, 0x6d, 0x0e, 0xd5, 0x30, 0x46, + 0x4d, 0x4d, 0x85, 0x25, 0xf0, 0x70, 0x96, 0xb8, 0xe8, 0x2d, 0x6a, 0x10, 0xd4, 0xd4, 0xf2, 0x7f, + 0x2f, 0x88, 0x8e, 0xdb, 0x96, 0x8b, 0x9a, 0xda, 0x42, 0x69, 0xe1, 0xeb, 0x17, 0x43, 0xd9, 0xf9, + 0xa6, 0x80, 0xf5, 0x5b, 0xbf, 0x31, 0xdc, 0x06, 0x5b, 0x93, 0xa8, 0x53, 0xc7, 0xc8, 0x3d, 0xaa, + 0x11, 0xcb, 0xb1, 0x29, 0x39, 0x69, 0xa3, 0xb9, 0x4d, 0x3f, 0x07, 0x9b, 0x77, 0x19, 0x2d, 0xbb, + 0xee, 0x78, 0x76, 0x93, 0x92, 0x63, 0x4d, 0xf9, 0xd7, 0x82, 0x8e, 0x47, 0xfe, 0x18, 0x55, 0xb8, + 0x05, 0x9e, 0xde, 0x65, 0x24, 0x18, 0xd3, 0x77, 0xe8, 0x44, 0xcb, 0x4f, 0xb6, 0xdf, 0x05, 0xe0, + 0xe6, 0xbf, 0x49, 0xdf, 0xee, 0x91, 0x43, 0x10, 0x75, 0x11, 0xf6, 0x5a, 0x84, 0xda, 0x0e, 0xa1, + 0x27, 0x88, 0xd0, 0x54, 0x4b, 0x37, 0xfa, 0x08, 0xac, 0x4e, 0x63, 0xec, 0x35, 0x1a, 0x08, 0x63, + 0x4d, 0x99, 0x07, 0x87, 0x35, 0xab, 0xe5, 0xb9, 0x48, 0x53, 0xb3, 0x92, 0xfa, 0xfb, 0xef, 0x97, + 0x86, 0x72, 0x71, 0x69, 0x28, 0x3f, 0x2f, 0x0d, 0xe5, 0xd3, 0x95, 0x91, 0xbb, 0xb8, 0x32, 0x72, + 0x3f, 0xae, 0x8c, 0xdc, 0x87, 0x57, 0xfd, 0x50, 0x04, 0xa3, 0x4e, 0xb5, 0xcb, 0x4f, 0xcd, 0xe1, + 0x28, 0x09, 0xba, 0x81, 0x1f, 0x0e, 0xe4, 0xb4, 0x2b, 0xc7, 0xdd, 0x01, 0xef, 0x31, 0xf3, 0xcc, + 0x9c, 0xba, 0xd8, 0xe9, 0x5d, 0x4b, 0x3a, 0x05, 0x79, 0x3b, 0x0f, 0x7e, 0x07, 0x00, 0x00, 0xff, + 0xff, 0xa1, 0xfd, 0xe6, 0x6e, 0xf3, 0x03, 0x00, 0x00, } func (m *Ballot) Marshal() (dAtA []byte, err error) { From 2ae0a9df80688096a7f3bd76352c3a6d617695ae Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 16:32:17 +0530 Subject: [PATCH 060/105] refactor: added msg_vote_key_process impl --- x/utss/keeper/keeper.go | 2 +- x/utss/keeper/msg_server.go | 34 +++++++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/x/utss/keeper/keeper.go b/x/utss/keeper/keeper.go index 4c115f97..a47a4deb 100755 --- a/x/utss/keeper/keeper.go +++ b/x/utss/keeper/keeper.go @@ -28,7 +28,7 @@ type Keeper struct { // TSS Key Storage CurrentTssKey collections.Item[types.TssKey] // currently active finalized key - TssKeyHistory collections.Map[string, types.TssKey] // map of key_id → TssKey + TssKeyHistory collections.Map[string, types.TssKey] // map of key_id -> TssKey // keepers uvalidatorKeeper types.UValidatorKeeper diff --git a/x/utss/keeper/msg_server.go b/x/utss/keeper/msg_server.go index 93dc7b34..7b186572 100755 --- a/x/utss/keeper/msg_server.go +++ b/x/utss/keeper/msg_server.go @@ -2,10 +2,12 @@ package keeper import ( "context" + "fmt" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" sdkErrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/pushchain/push-chain-node/x/utss/types" ) @@ -57,17 +59,35 @@ func (ms msgServer) InitiateTssKeyProcess(ctx context.Context, msg *types.MsgIni // VoteTssKeyProcess implements types.MsgServer. func (ms msgServer) VoteTssKeyProcess(ctx context.Context, msg *types.MsgVoteTssKeyProcess) (*types.MsgVoteTssKeyProcessResponse, error) { - // Retrieve the current Params - params, err := ms.k.Params.Get(ctx) + signerAccAddr, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { - return nil, errors.Wrapf(err, "failed to get params") + return nil, fmt.Errorf("invalid signer address: %w", err) } - if params.Admin != msg.Signer { - return nil, errors.Wrapf(sdkErrors.ErrUnauthorized, "invalid authority; expected %s, got %s", params.Admin, msg.Signer) + // Convert account to validator operator address + signerValAddr := sdk.ValAddress(signerAccAddr) + + // Lookup the linked universal validator for this signer + isBonded, err := ms.k.uvalidatorKeeper.IsBondedUniversalValidator(ctx, msg.Signer) + if err != nil { + return nil, errors.Wrapf(err, "failed to check bonded status for signer %s", msg.Signer) + } + if !isBonded { + return nil, fmt.Errorf("universal validator for signer %s is not bonded", msg.Signer) + } + + isTombstoned, err := ms.k.uvalidatorKeeper.IsTombstonedUniversalValidator(ctx, msg.Signer) + if err != nil { + return nil, errors.Wrapf(err, "failed to check tombstoned status for signer %s", msg.Signer) + } + if isTombstoned { + return nil, fmt.Errorf("universal validator for signer %s is tombstoned", msg.Signer) + } + + err = ms.k.VoteTssKeyProcess(ctx, signerValAddr, msg.ProcessId, msg.TssPubkey, msg.KeyId) + if err != nil { + return nil, err } - // ctx := sdk.UnwrapSDKContext(goCtx) - panic("VoteTssKeyProcess is unimplemented") return &types.MsgVoteTssKeyProcessResponse{}, nil } From 9bb8eb8221975ff90b8e4b4d3d48de2373ece847 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 16:32:32 +0530 Subject: [PATCH 061/105] refactor: added msg_vote_key_process impl --- x/utss/keeper/msg_vote_tss_key_process.go | 95 +++++++++++++++++++++++ x/utss/keeper/tss_key_process.go | 14 ++++ x/utss/keeper/voting.go | 68 ++++++++++++++++ x/utss/types/events.go | 44 ++++++++++- 4 files changed, 218 insertions(+), 3 deletions(-) create mode 100644 x/utss/keeper/msg_vote_tss_key_process.go create mode 100644 x/utss/keeper/voting.go diff --git a/x/utss/keeper/msg_vote_tss_key_process.go b/x/utss/keeper/msg_vote_tss_key_process.go new file mode 100644 index 00000000..9cbf8819 --- /dev/null +++ b/x/utss/keeper/msg_vote_tss_key_process.go @@ -0,0 +1,95 @@ +package keeper + +import ( + "context" + "fmt" + + errors "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/utss/types" +) + +func (k Keeper) VoteTssKeyProcess( + ctx context.Context, + universalValidator sdk.ValAddress, + processId uint64, + tssPubKey, keyId string, +) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) + + // Step 1: Ensure the key doesn't already exist + _, found, err := k.GetTssKeyByID(ctx, keyId) + if err != nil { + return errors.Wrap(err, "failed to check existing TSS key") + } + if found { + return fmt.Errorf("tss key with key_id %s already exists", keyId) + } + + // Step 2: Vote on the ballot (using a cache context so we don’t mutate state on failure) + tmpCtx, commit := sdkCtx.CacheContext() + isFinalized, _, err := k.VoteOnTssBallot(tmpCtx, universalValidator, processId, keyId) + if err != nil { + return errors.Wrap(err, "failed to vote on TSS ballot") + } + + // Commit the vote + commit() + + // Step 3: If not finalized yet, do nothing + if !isFinalized { + return nil + } + + // Step 4: Mark process as successful + process, found, err := k.GetTssKeyProcessByID(ctx, processId) + if err != nil { + return errors.Wrap(err, "failed to fetch TSS process") + } + if !found { + return fmt.Errorf("TSS process %d not found", processId) + } + process.Status = types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS + + // Step 5: Ballot finalized — create the TssKey record + tssKey := types.TssKey{ + TssPubkey: tssPubKey, + KeyId: keyId, + Participants: []string{universalValidator.String()}, + FinalizedBlockHeight: sdkCtx.BlockHeight(), + KeygenBlockHeight: process.BlockHeight, + ProcessId: processId, + } + + // Step 6: Store updates + if err := k.CurrentTssKey.Set(ctx, tssKey); err != nil { + return errors.Wrap(err, "failed to set current TSS key") + } + if err := k.TssKeyHistory.Set(ctx, keyId, tssKey); err != nil { + return errors.Wrap(err, "failed to store TSS key history") + } + if err := k.CurrentTssProcess.Remove(ctx); err != nil { + return errors.Wrap(err, "failed to clear current TSS process") + } + if err := k.ProcessHistory.Set(ctx, processId, process); err != nil { + return errors.Wrap(err, "failed to archive TSS process") + } + + // Step 7: Emit finalized event + event, _ := types.NewTssKeyFinalizedEvent(types.TssKeyFinalizedEvent{ + ProcessID: processId, + KeyID: keyId, + TssPubKey: tssPubKey, + }) + sdkCtx.EventManager().EmitEvent(event) + + k.logger.Info( + "TSS key finalized", + "key_id", keyId, + "process_id", processId, + "pubkey", tssPubKey, + ) + + return nil +} diff --git a/x/utss/keeper/tss_key_process.go b/x/utss/keeper/tss_key_process.go index ff195375..65af8ea8 100644 --- a/x/utss/keeper/tss_key_process.go +++ b/x/utss/keeper/tss_key_process.go @@ -2,8 +2,10 @@ package keeper import ( "context" + "errors" "fmt" + "cosmossdk.io/collections" "github.com/pushchain/push-chain-node/x/utss/types" ) @@ -28,3 +30,15 @@ func (k Keeper) FinalizeTssKeyProcess(ctx context.Context, processID uint64, sta k.Logger().Info("✅ TSS process finalized", "id", processID, "status", status.String()) return nil } + +// GetTssKeyProcessByID retrieves a specific tss key process from history using process_id. +func (k Keeper) GetTssKeyProcessByID(ctx context.Context, processID uint64) (types.TssKeyProcess, bool, error) { + key, err := k.ProcessHistory.Get(ctx, processID) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return types.TssKeyProcess{}, false, nil + } + return types.TssKeyProcess{}, false, err + } + return key, true, nil +} diff --git a/x/utss/keeper/voting.go b/x/utss/keeper/voting.go new file mode 100644 index 00000000..6163ac1f --- /dev/null +++ b/x/utss/keeper/voting.go @@ -0,0 +1,68 @@ +package keeper + +import ( + "context" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uexecutor/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +func (k Keeper) VoteOnTssBallot( + ctx context.Context, + universalValidator sdk.ValAddress, + processId uint64, + keyId string, +) (isFinalized bool, + isNew bool, + err error) { + + sdkCtx := sdk.UnwrapSDKContext(ctx) + ballotKey := keyId + + universalValidatorSet, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) + if err != nil { + return false, false, err + } + + // Check if a current process exists and is still active (not expired and pending) + existing, err := k.CurrentTssProcess.Get(ctx) + if err == nil { + if sdkCtx.BlockHeight() < existing.ExpiryHeight { + return false, false, fmt.Errorf("an active TSS process already exists (id: %d)", existing.Id) + } + } + + expiryHeight := existing.ExpiryHeight + + // number of validators + totalValidators := len(universalValidatorSet) + + // votesNeeded = ceil(2/3 * totalValidators) + // >2/3 quorum similar to tendermint + votesNeeded := (totalValidators*types.VotesThresholdNumerator + types.VotesThresholdDenominator - 1) / types.VotesThresholdDenominator + + // Convert []sdk.ValAddress -> []string + universalValidatorSetStrs := make([]string, len(universalValidatorSet)) + for i, v := range universalValidatorSet { + universalValidatorSetStrs[i] = v.IdentifyInfo.CoreValidatorAddress + } + + // Step 2: Call VoteOnBallot for this inbound synthetic + _, isFinalized, isNew, err = k.uvalidatorKeeper.VoteOnBallot( + ctx, + ballotKey, + uvalidatortypes.BallotObservationType_BALLOT_OBSERVATION_TYPE_TSS_KEY, + universalValidator.String(), + uvalidatortypes.VoteResult_VOTE_RESULT_SUCCESS, + universalValidatorSetStrs, + int64(votesNeeded), + expiryHeight, + ) + if err != nil { + return false, false, err + } + + return isFinalized, isNew, nil +} diff --git a/x/utss/types/events.go b/x/utss/types/events.go index 1938c71f..0836debe 100644 --- a/x/utss/types/events.go +++ b/x/utss/types/events.go @@ -2,13 +2,14 @@ package types import ( "encoding/json" - fmt "fmt" + "fmt" sdk "github.com/cosmos/cosmos-sdk/types" ) const ( EventTypeTssProcessInitiated = "tss_process_initiated" + EventTypeTssKeyFinalized = "tss_key_finalized" ) // TssProcessInitiatedEvent represents the emitted event when a new TSS key process starts. @@ -19,7 +20,7 @@ type TssProcessInitiatedEvent struct { ExpiryHeight int64 `json:"expiry_height"` } -// NewTssProcessInitiatedEvent creates and returns a Cosmos SDK event +// NewTssProcessInitiatedEvent creates and returns a Cosmos SDK event. func NewTssProcessInitiatedEvent(e TssProcessInitiatedEvent) (sdk.Event, error) { bz, err := json.Marshal(e) if err != nil { @@ -38,10 +39,47 @@ func NewTssProcessInitiatedEvent(e TssProcessInitiatedEvent) (sdk.Event, error) return event, nil } -// String returns a readable log for CLI +// String returns a readable log for CLI. func (e TssProcessInitiatedEvent) String() string { return fmt.Sprintf( "TSS process initiated | ID: %d | Type: %s | Participants: %d | ExpiryHeight: %d", e.ProcessID, e.ProcessType, e.Participants, e.ExpiryHeight, ) } + +// ----------------------------------------------------------------------------- +// Finalized Event +// ----------------------------------------------------------------------------- + +// TssKeyFinalizedEvent represents when a TSS keygen or reshare process completes successfully. +type TssKeyFinalizedEvent struct { + ProcessID uint64 `json:"process_id"` + KeyID string `json:"key_id"` + TssPubKey string `json:"tss_pubkey"` +} + +// NewTssKeyFinalizedEvent creates and returns a Cosmos SDK event. +func NewTssKeyFinalizedEvent(e TssKeyFinalizedEvent) (sdk.Event, error) { + bz, err := json.Marshal(e) + if err != nil { + return sdk.Event{}, fmt.Errorf("failed to marshal event: %w", err) + } + + event := sdk.NewEvent( + EventTypeTssKeyFinalized, + sdk.NewAttribute("process_id", fmt.Sprintf("%d", e.ProcessID)), + sdk.NewAttribute("key_id", e.KeyID), + sdk.NewAttribute("tss_pubkey", e.TssPubKey), + sdk.NewAttribute("data", string(bz)), + ) + + return event, nil +} + +// String returns a readable log for CLI. +func (e TssKeyFinalizedEvent) String() string { + return fmt.Sprintf( + "TSS key finalized | ProcessID: %d | KeyID: %s | PubKey: %s", + e.ProcessID, e.KeyID, e.TssPubKey, + ) +} From 5d3ec796ba23803a9fcf691fd370b172d3fb6ff8 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 11 Nov 2025 22:00:14 +0530 Subject: [PATCH 062/105] refactor: added hooks implementation for initiating tss process --- x/utss/keeper/hooks.go | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/x/utss/keeper/hooks.go b/x/utss/keeper/hooks.go index f2c83fa3..49960911 100644 --- a/x/utss/keeper/hooks.go +++ b/x/utss/keeper/hooks.go @@ -2,6 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/utss/types" uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" ) @@ -14,20 +15,35 @@ type Hooks struct { func (k Keeper) Hooks() Hooks { return Hooks{k} } func (h Hooks) AfterValidatorAdded(ctx sdk.Context, valAddr sdk.ValAddress) { - // Example: trigger new TSS participation setup h.k.Logger().Info("TSS Hook: Universal validator added", "address", valAddr.String()) - // you can enqueue this validator for keygen participation here + if err := h.k.InitiateTssKeyProcess(ctx, types.TssProcessType_TSS_PROCESS_RESHARE); err != nil { + h.k.Logger().Error("Failed to initiate TSS key process in hook", "error", err) + ctx.EventManager().EmitEvent( + sdk.NewEvent( + "tss_process_initiation_failed", + sdk.NewAttribute("reason", err.Error()), + sdk.NewAttribute("validator", valAddr.String()), + ), + ) + } } func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, valAddr sdk.ValAddress) { h.k.Logger().Info("TSS Hook: Universal validator removed", "address", valAddr.String()) - // maybe mark as inactive in current TSS session + if err := h.k.InitiateTssKeyProcess(ctx, types.TssProcessType_TSS_PROCESS_RESHARE); err != nil { + h.k.Logger().Error("Failed to initiate TSS key process in hook", "error", err) + ctx.EventManager().EmitEvent( + sdk.NewEvent( + "tss_process_initiation_failed", + sdk.NewAttribute("reason", err.Error()), + sdk.NewAttribute("validator", valAddr.String()), + ), + ) + } } func (h Hooks) AfterValidatorStatusChanged(ctx sdk.Context, valAddr sdk.ValAddress, oldStatus, newStatus uvalidatortypes.UVStatus) { h.k.Logger().Info("TSS Hook: Universal validator status changed", "address", oldStatus, newStatus) - - // maybe mark as inactive in current TSS session } From 1949c318454a04c5b516491a52300406f59e00bd Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 12 Nov 2025 16:02:12 +0530 Subject: [PATCH 063/105] feat: modified the integration-test directory --- .../integration/uexecutor}/deploy_uea_test.go | 2 +- .../integration/uexecutor}/execute_payload_test.go | 2 +- .../uexecutor}/inbound_synthetic_bridge_payload_test.go | 2 +- .../integration/uexecutor}/inbound_synthetic_bridge_test.go | 2 +- .../integration/uexecutor}/mint_pc_test.go | 2 +- .../integration/uexecutor}/vote_gas_price_test.go | 2 +- {testutils => test/utils}/account_setup.go | 2 +- {testutils => test/utils}/bytecode.go | 2 +- {testutils => test/utils}/constants.go | 2 +- {testutils => test/utils}/contracts_setup.go | 2 +- {testutils => test/utils}/helpers.go | 2 +- {testutils => test/utils}/setup_app.go | 2 +- x/utss/types/msg_update_params_test.go | 6 ++++++ 13 files changed, 18 insertions(+), 12 deletions(-) rename {x/uexecutor/integration-test => test/integration/uexecutor}/deploy_uea_test.go (98%) rename {x/uexecutor/integration-test => test/integration/uexecutor}/execute_payload_test.go (98%) rename {x/uexecutor/integration-test => test/integration/uexecutor}/inbound_synthetic_bridge_payload_test.go (99%) rename {x/uexecutor/integration-test => test/integration/uexecutor}/inbound_synthetic_bridge_test.go (99%) rename {x/uexecutor/integration-test => test/integration/uexecutor}/mint_pc_test.go (98%) rename {x/uexecutor/integration-test => test/integration/uexecutor}/vote_gas_price_test.go (98%) rename {testutils => test/utils}/account_setup.go (99%) rename {testutils => test/utils}/bytecode.go (99%) rename {testutils => test/utils}/constants.go (98%) rename {testutils => test/utils}/contracts_setup.go (99%) rename {testutils => test/utils}/helpers.go (98%) rename {testutils => test/utils}/setup_app.go (99%) diff --git a/x/uexecutor/integration-test/deploy_uea_test.go b/test/integration/uexecutor/deploy_uea_test.go similarity index 98% rename from x/uexecutor/integration-test/deploy_uea_test.go rename to test/integration/uexecutor/deploy_uea_test.go index 3e6b0793..82bf65fa 100644 --- a/x/uexecutor/integration-test/deploy_uea_test.go +++ b/test/integration/uexecutor/deploy_uea_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" - utils "github.com/pushchain/push-chain-node/testutils" + utils "github.com/pushchain/push-chain-node/test/utils" uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" diff --git a/x/uexecutor/integration-test/execute_payload_test.go b/test/integration/uexecutor/execute_payload_test.go similarity index 98% rename from x/uexecutor/integration-test/execute_payload_test.go rename to test/integration/uexecutor/execute_payload_test.go index 350ce542..60fb0c18 100644 --- a/x/uexecutor/integration-test/execute_payload_test.go +++ b/test/integration/uexecutor/execute_payload_test.go @@ -4,7 +4,7 @@ import ( "testing" "cosmossdk.io/math" - utils "github.com/pushchain/push-chain-node/testutils" + utils "github.com/pushchain/push-chain-node/test/utils" uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" diff --git a/x/uexecutor/integration-test/inbound_synthetic_bridge_payload_test.go b/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go similarity index 99% rename from x/uexecutor/integration-test/inbound_synthetic_bridge_payload_test.go rename to test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go index c829e269..986e127b 100644 --- a/x/uexecutor/integration-test/inbound_synthetic_bridge_payload_test.go +++ b/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go @@ -11,7 +11,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/pushchain/push-chain-node/app" - utils "github.com/pushchain/push-chain-node/testutils" + utils "github.com/pushchain/push-chain-node/test/utils" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" diff --git a/x/uexecutor/integration-test/inbound_synthetic_bridge_test.go b/test/integration/uexecutor/inbound_synthetic_bridge_test.go similarity index 99% rename from x/uexecutor/integration-test/inbound_synthetic_bridge_test.go rename to test/integration/uexecutor/inbound_synthetic_bridge_test.go index dd66d18c..17aaf2bd 100644 --- a/x/uexecutor/integration-test/inbound_synthetic_bridge_test.go +++ b/test/integration/uexecutor/inbound_synthetic_bridge_test.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/pushchain/push-chain-node/app" - utils "github.com/pushchain/push-chain-node/testutils" + utils "github.com/pushchain/push-chain-node/test/utils" uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" diff --git a/x/uexecutor/integration-test/mint_pc_test.go b/test/integration/uexecutor/mint_pc_test.go similarity index 98% rename from x/uexecutor/integration-test/mint_pc_test.go rename to test/integration/uexecutor/mint_pc_test.go index 41274ea5..52fd5d21 100644 --- a/x/uexecutor/integration-test/mint_pc_test.go +++ b/test/integration/uexecutor/mint_pc_test.go @@ -5,7 +5,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - utils "github.com/pushchain/push-chain-node/testutils" + utils "github.com/pushchain/push-chain-node/test/utils" uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" diff --git a/x/uexecutor/integration-test/vote_gas_price_test.go b/test/integration/uexecutor/vote_gas_price_test.go similarity index 98% rename from x/uexecutor/integration-test/vote_gas_price_test.go rename to test/integration/uexecutor/vote_gas_price_test.go index d857d4e7..fa6b9af0 100644 --- a/x/uexecutor/integration-test/vote_gas_price_test.go +++ b/test/integration/uexecutor/vote_gas_price_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "github.com/pushchain/push-chain-node/app" - utils "github.com/pushchain/push-chain-node/testutils" + utils "github.com/pushchain/push-chain-node/test/utils" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" diff --git a/testutils/account_setup.go b/test/utils/account_setup.go similarity index 99% rename from testutils/account_setup.go rename to test/utils/account_setup.go index 04f0e9c0..e519627d 100644 --- a/testutils/account_setup.go +++ b/test/utils/account_setup.go @@ -1,4 +1,4 @@ -package testutils +package utils import ( "testing" diff --git a/testutils/bytecode.go b/test/utils/bytecode.go similarity index 99% rename from testutils/bytecode.go rename to test/utils/bytecode.go index 2acd8244..22df05f2 100644 --- a/testutils/bytecode.go +++ b/test/utils/bytecode.go @@ -1,4 +1,4 @@ -package testutils +package utils const UEA_EVM_BYTECODE = "6080604052348015600e575f80fd5b5060015f55611a2d806100205f395ff3fe6080604052600436106100bb575f3560e01c8063affed0e011610071578063f698da251161004c578063f698da2514610208578063f85135cc1461021c578063ffa1ad741461023d575f80fd5b8063affed0e0146101a5578063ebcd653b146101ba578063f0a136bc146101e9575f80fd5b80633042c33e116100a15780633042c33e1461012b57806338e198011461014c578063872347cf14610186575f80fd5b80631db61b54146100c65780632f546ac91461010c575f80fd5b366100c257005b5f80fd5b3480156100d1575f80fd5b506100f97f2aef22f9d7df5f9d21c56d14029233f3fdaa91917727e1eb68e504d27072d6cd81565b6040519081526020015b60405180910390f35b348015610117575f80fd5b506100f961012636600461102f565b610292565b348015610136575f80fd5b5061014a61014536600461116e565b610451565b005b348015610157575f80fd5b5061016161090181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610103565b348015610191575f80fd5b5061014a6101a0366004611275565b6104fd565b3480156101b0575f80fd5b506100f960055481565b3480156101c5575f80fd5b506101d96101d43660046112de565b610740565b6040519015158152602001610103565b3480156101f4575f80fd5b506101d9610203366004611322565b610793565b348015610213575f80fd5b506100f96108d3565b348015610227575f80fd5b50610230610a17565b60405161010391906113bc565b348015610248575f80fd5b506102856040518060400160405280600581526020017f302e312e3000000000000000000000000000000000000000000000000000000081525081565b6040516101039190611457565b5f60e0820135156102db578160e001354211156102db576040517ff87d927100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f1d8b43e5066bd20bfdacf7b8f4790c0309403b18434e3699ce3c5e57502ed8c461030a6020850185611470565b602085013561031c60408701876114a3565b60405161032a929190611504565b6040518091039020866060013587608001358860a001356005548a60e001358b61010001602081019061035d9190611513565b600181111561036e5761036e611531565b60408051602081019b909b5273ffffffffffffffffffffffffffffffffffffffff909916988a01989098526060890196909652608088019490945260a087019290925260c086015260e085015261010084015261012083015260ff16610140820152610160016040516020818303038152906040528051906020012090505f6103f56108d3565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101829052604281018490529091506062016040516020818303038152906040528051906020012092505050919050565b60045460ff161561048e576040517f69783db700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815182919081906104cd90826115f4565b50602082015160018201906104e290826115f4565b50604082015160028201906104f790826115f4565b50505050565b610505610bfc565b5f61050f84610292565b9050600161052561012086016101008701611513565b600181111561053657610536611531565b0361058c57811580610550575061054e818484610793565b155b15610587576040517fce5a759800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610601565b6105cb8184848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061074092505050565b610601576040517fc7dbd31d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805460010190555f806106196020870187611470565b73ffffffffffffffffffffffffffffffffffffffff16602087013561064160408901896114a3565b60405161064f929190611504565b5f6040518083038185875af1925050503d805f8114610689576040519150601f19603f3d011682016040523d82523d5f602084013e61068e565b606091505b5091509150816106da578051156106a85780518082602001fd5b6040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fafc6dd5d2ec56ba31e4cd9723889549a104622ecdb580761d055cde575365b7d600361070a6020890189611470565b61071760408a018a6114a3565b60405161072794939291906117ef565b60405180910390a150505061073b60015f55565b505050565b5f8061074c8484610c3d565b9050610758600361183b565b60601c73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149150505b92915050565b6040515f9081908190610901906107bb906001906002906003908b908b908b906024016118c0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f45048e03000000000000000000000000000000000000000000000000000000001790525161083c9190611920565b5f60405180830381855afa9150503d805f8114610874576040519150601f19603f3d011682016040523d82523d5f602084013e610879565b606091505b5091509150816108b5576040517ffd23ff6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808060200190518101906108c9919061193b565b9695505050505050565b5f806109686001800180546108e79061155e565b80601f01602080910402602001604051908101604052809291908181526020018280546109139061155e565b801561095e5780601f106109355761010080835404028352916020019161095e565b820191905f5260205f20905b81548152906001019060200180831161094157829003601f168201915b5050505050610c65565b604080518082018252600581527f302e312e3000000000000000000000000000000000000000000000000000000060209182015281517f2aef22f9d7df5f9d21c56d14029233f3fdaa91917727e1eb68e504d27072d6cd818301527faa7cdbe2cce2ec7b606b0e199ddd9b264a6e645e767fb8479a7917dcd1b8693f818401526060810193909352306080808501919091528251808503909101815260a0909301909152815191012092915050565b610a3b60405180606001604052806060815260200160608152602001606081525090565b60016040518060600160405290815f82018054610a579061155e565b80601f0160208091040260200160405190810160405280929190818152602001828054610a839061155e565b8015610ace5780601f10610aa557610100808354040283529160200191610ace565b820191905f5260205f20905b815481529060010190602001808311610ab157829003601f168201915b50505050508152602001600182018054610ae79061155e565b80601f0160208091040260200160405190810160405280929190818152602001828054610b139061155e565b8015610b5e5780601f10610b3557610100808354040283529160200191610b5e565b820191905f5260205f20905b815481529060010190602001808311610b4157829003601f168201915b50505050508152602001600282018054610b779061155e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba39061155e565b8015610bee5780601f10610bc557610100808354040283529160200191610bee565b820191905f5260205f20905b815481529060010190602001808311610bd157829003601f168201915b505050505081525050905090565b60025f5403610c37576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f55565b5f805f80610c4b8686610dd5565b925092509250610c5b8282610e1e565b5090949350505050565b80515f90829080610cfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f456d70747920737472696e672063616e6e6f7420626520636f6e76657274656460448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5f5b81811015610dcd575f838281518110610d1a57610d1a61195a565b016020015160f81c905060308110801590610d39575060398160ff1611155b610d9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e6f6e2d64696769742063686172616374657220666f756e642e0000000000006044820152606401610cf4565b610daa6030826119b4565b60ff16610db886600a6119cd565b610dc291906119e4565b945050600101610cff565b505050919050565b5f805f8351604103610e0c576020840151604085015160608601515f1a610dfe88828585610f25565b955095509550505050610e17565b505081515f91506002905b9250925092565b5f826003811115610e3157610e31611531565b03610e3a575050565b6001826003811115610e4e57610e4e611531565b03610e85576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115610e9957610e99611531565b03610ed3576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610cf4565b6003826003811115610ee757610ee7611531565b03610f21576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610cf4565b5050565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610f5e57505f9150600390508261100e565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610faf573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661100557505f92506001915082905061100e565b92505f91508190505b9450945094915050565b5f6101208284031215611029575f80fd5b50919050565b5f6020828403121561103f575f80fd5b813567ffffffffffffffff811115611055575f80fd5b61106184828501611018565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156110b9576110b9611069565b60405290565b5f82601f8301126110ce575f80fd5b8135602083015f8067ffffffffffffffff8411156110ee576110ee611069565b506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85018116603f0116810181811067ffffffffffffffff8211171561113b5761113b611069565b604052838152905080828401871015611152575f80fd5b838360208301375f602085830101528094505050505092915050565b5f6020828403121561117e575f80fd5b813567ffffffffffffffff811115611194575f80fd5b8201606081850312156111a5575f80fd5b6111ad611096565b813567ffffffffffffffff8111156111c3575f80fd5b6111cf868285016110bf565b825250602082013567ffffffffffffffff8111156111eb575f80fd5b6111f7868285016110bf565b602083015250604082013567ffffffffffffffff811115611216575f80fd5b611222868285016110bf565b604083015250949350505050565b5f8083601f840112611240575f80fd5b50813567ffffffffffffffff811115611257575f80fd5b60208301915083602082850101111561126e575f80fd5b9250929050565b5f805f60408486031215611287575f80fd5b833567ffffffffffffffff81111561129d575f80fd5b6112a986828701611018565b935050602084013567ffffffffffffffff8111156112c5575f80fd5b6112d186828701611230565b9497909650939450505050565b5f80604083850312156112ef575f80fd5b82359150602083013567ffffffffffffffff81111561130c575f80fd5b611318858286016110bf565b9150509250929050565b5f805f60408486031215611334575f80fd5b83359250602084013567ffffffffffffffff8111156112c5575f80fd5b5f5b8381101561136b578181015183820152602001611353565b50505f910152565b5f815180845261138a816020860160208601611351565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f8251606060208401526113d76080840182611373565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160408501526114128282611373565b91505060408401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084830301606085015261144e8282611373565b95945050505050565b602081525f6114696020830184611373565b9392505050565b5f60208284031215611480575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114611469575f80fd5b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126114d6575f80fd5b83018035915067ffffffffffffffff8211156114f0575f80fd5b60200191503681900382131561126e575f80fd5b818382375f9101908152919050565b5f60208284031215611523575f80fd5b813560028110611469575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600181811c9082168061157257607f821691505b602082108103611029577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f82111561073b57805f5260205f20601f840160051c810160208510156115ce5750805b601f840160051c820191505b818110156115ed575f81556001016115da565b5050505050565b815167ffffffffffffffff81111561160e5761160e611069565b6116228161161c845461155e565b846115a9565b6020601f821160018114611673575f831561163d5750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b1784556115ed565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b828110156116c057878501518255602094850194600190920191016116a0565b50848210156116fc57868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b5f81546117178161155e565b808552600182168015611731576001811461176b5761179f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083166020870152602082151560051b870101935061179f565b845f5260205f205f5b838110156117965781546020828a010152600182019150602081019050611774565b87016020019450505b50505092915050565b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081525f611801606083018761170b565b73ffffffffffffffffffffffffffffffffffffffff8616602084015282810360408401526118308185876117a8565b979650505050505050565b5f611846825461155e565b82601f82111561185a57835f5260205f2090505b547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008116925060148210156118b9577fffffffffffffffffffffffffffffffffffffffff000000000000000000000000808360140360031b1b82161692505b5050919050565b60a081525f6118d260a083018961170b565b82810360208401526118e4818961170b565b905082810360408401526118f8818861170b565b905085606084015282810360808401526119138185876117a8565b9998505050505050505050565b5f8251611931818460208701611351565b9190910192915050565b5f6020828403121561194b575f80fd5b81518015158114611469575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60ff828116828216039081111561078d5761078d611987565b808202811582820484141761078d5761078d611987565b8082018082111561078d5761078d61198756fea2646970667358221220cd3107c9a2166b22a9f2db8af03f9834a7f41cdf5fd1af8ad7c1b47e3378c18e64736f6c634300081a0033" diff --git a/testutils/constants.go b/test/utils/constants.go similarity index 98% rename from testutils/constants.go rename to test/utils/constants.go index 4e4e7b38..b93089fe 100644 --- a/testutils/constants.go +++ b/test/utils/constants.go @@ -1,4 +1,4 @@ -package testutils +package utils import ( "github.com/ethereum/go-ethereum/common" diff --git a/testutils/contracts_setup.go b/test/utils/contracts_setup.go similarity index 99% rename from testutils/contracts_setup.go rename to test/utils/contracts_setup.go index d54611db..186d5dc8 100644 --- a/testutils/contracts_setup.go +++ b/test/utils/contracts_setup.go @@ -1,4 +1,4 @@ -package testutils +package utils import ( "testing" diff --git a/testutils/helpers.go b/test/utils/helpers.go similarity index 98% rename from testutils/helpers.go rename to test/utils/helpers.go index 9a0a0a69..83c45c7a 100644 --- a/testutils/helpers.go +++ b/test/utils/helpers.go @@ -1,4 +1,4 @@ -package testutils +package utils import ( "testing" diff --git a/testutils/setup_app.go b/test/utils/setup_app.go similarity index 99% rename from testutils/setup_app.go rename to test/utils/setup_app.go index 1b584369..e9fa8e98 100644 --- a/testutils/setup_app.go +++ b/test/utils/setup_app.go @@ -1,4 +1,4 @@ -package testutils +package utils import ( "fmt" diff --git a/x/utss/types/msg_update_params_test.go b/x/utss/types/msg_update_params_test.go index 71efc556..4cd3ee9a 100644 --- a/x/utss/types/msg_update_params_test.go +++ b/x/utss/types/msg_update_params_test.go @@ -3,11 +3,17 @@ package types_test import ( "testing" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/app" "github.com/pushchain/push-chain-node/x/utss/types" "github.com/stretchr/testify/require" ) func TestMsgUpdateParams_ValidateBasic(t *testing.T) { + cfg := sdk.GetConfig() + cfg.SetBech32PrefixForAccount(app.Bech32PrefixAccAddr, app.Bech32PrefixAccPub) + cfg.SetBech32PrefixForValidator(app.Bech32PrefixValAddr, app.Bech32PrefixValPub) + validBech32 := "push1fgaewhyd9fkwtqaj9c233letwcuey6dgly9gv9" tests := []struct { From cc33ff88cca4f78e8259dcfeef0ec0a70f06bc03 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 12 Nov 2025 16:27:20 +0530 Subject: [PATCH 064/105] tests: added integration tests for msg_add_universal_validator --- .../msg_add_universal_validator_test.go | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 test/integration/uvalidator/msg_add_universal_validator_test.go diff --git a/test/integration/uvalidator/msg_add_universal_validator_test.go b/test/integration/uvalidator/msg_add_universal_validator_test.go new file mode 100644 index 00000000..91aec2fb --- /dev/null +++ b/test/integration/uvalidator/msg_add_universal_validator_test.go @@ -0,0 +1,111 @@ +package integrationtest + +import ( + "fmt" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/app" + utils "github.com/pushchain/push-chain-node/test/utils" + + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +func setupUniversalValidatorTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []stakingtypes.Validator) { + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) + return app, ctx, validators +} + +func TestAddUniversalValidator(t *testing.T) { + t.Run("Successfully adds multiple bonded validators", func(t *testing.T) { + app, ctx, validators := setupUniversalValidatorTest(t, 3) + + for i, val := range validators { + coreValAddr := val.OperatorAddress + pubkey := fmt.Sprintf("pubkey-%d", i) + network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.1.%d", i+1)} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) + require.NoError(t, err) + + valAddr, err := sdk.ValAddressFromBech32(coreValAddr) + require.NoError(t, err) + + exists, err := app.UvalidatorKeeper.UniversalValidatorSet.Has(ctx, valAddr) + require.NoError(t, err) + require.True(t, exists, "validator should exist in universal set") + + uv, _ := app.UvalidatorKeeper.UniversalValidatorSet.Get(ctx, valAddr) + require.Equal(t, uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN, uv.LifecycleInfo.CurrentStatus) + require.Equal(t, pubkey, uv.IdentifyInfo.Pubkey) + } + }) + + t.Run("Reactivates an inactive validator", func(t *testing.T) { + app, ctx, validators := setupUniversalValidatorTest(t, 1) + k := app.UvalidatorKeeper + val := validators[0] + valAddr, _ := sdk.ValAddressFromBech32(val.OperatorAddress) + + // pre-store inactive + old := uvalidatortypes.UniversalValidator{ + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: val.OperatorAddress, Pubkey: "old-pub"}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_INACTIVE, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, old)) + + pubkey := "new-pub" + network := uvalidatortypes.NetworkInfo{Ip: "10.0.0.1"} + err := k.AddUniversalValidator(ctx, val.OperatorAddress, pubkey, network) + require.NoError(t, err) + + uv, _ := k.UniversalValidatorSet.Get(ctx, valAddr) + require.Equal(t, uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN, uv.LifecycleInfo.CurrentStatus) + require.Equal(t, pubkey, uv.IdentifyInfo.Pubkey) + }) + + t.Run("Adding already active validator fails", func(t *testing.T) { + app, ctx, validators := setupUniversalValidatorTest(t, 1) + k := app.UvalidatorKeeper + val := validators[0] + valAddr, _ := sdk.ValAddressFromBech32(val.OperatorAddress) + + active := uvalidatortypes.UniversalValidator{ + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: val.OperatorAddress}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_ACTIVE, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, active)) + + err := k.AddUniversalValidator(ctx, val.OperatorAddress, "pub", uvalidatortypes.NetworkInfo{}) + require.ErrorContains(t, err, "already registered") + }) + + t.Run("Unbonded validator cannot join", func(t *testing.T) { + app, ctx, validators := setupUniversalValidatorTest(t, 1) + val := validators[0] + valAddr, _ := sdk.ValAddressFromBech32(val.OperatorAddress) + + // make validator unbonded manually + valBonded := val + valBonded.Status = stakingtypes.Unbonded + app.StakingKeeper.SetValidator(ctx, valBonded) + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, valAddr.String(), "pub", uvalidatortypes.NetworkInfo{}) + require.ErrorContains(t, err, "not bonded") + }) + + t.Run("Invalid validator address format fails", func(t *testing.T) { + app, ctx, _ := setupUniversalValidatorTest(t, 1) + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, "invalid_bech32", "pub", uvalidatortypes.NetworkInfo{}) + require.ErrorContains(t, err, "invalid core validator address") + }) +} From dd517d6209f6f51a3566f4c56bf3461ec72309e9 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 12 Nov 2025 16:36:17 +0530 Subject: [PATCH 065/105] tests: added integration tests for msg_update_universal_validator --- .../msg_add_universal_validator_test.go | 12 +-- .../msg_update_universal_validator_test.go | 81 +++++++++++++++++++ .../keeper/msg_update_universal_validator.go | 14 +--- 3 files changed, 89 insertions(+), 18 deletions(-) create mode 100644 test/integration/uvalidator/msg_update_universal_validator_test.go diff --git a/test/integration/uvalidator/msg_add_universal_validator_test.go b/test/integration/uvalidator/msg_add_universal_validator_test.go index 91aec2fb..faaf7005 100644 --- a/test/integration/uvalidator/msg_add_universal_validator_test.go +++ b/test/integration/uvalidator/msg_add_universal_validator_test.go @@ -15,14 +15,14 @@ import ( uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" ) -func setupUniversalValidatorTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []stakingtypes.Validator) { +func setupAddUniversalValidatorTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []stakingtypes.Validator) { app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) return app, ctx, validators } func TestAddUniversalValidator(t *testing.T) { t.Run("Successfully adds multiple bonded validators", func(t *testing.T) { - app, ctx, validators := setupUniversalValidatorTest(t, 3) + app, ctx, validators := setupAddUniversalValidatorTest(t, 3) for i, val := range validators { coreValAddr := val.OperatorAddress @@ -46,7 +46,7 @@ func TestAddUniversalValidator(t *testing.T) { }) t.Run("Reactivates an inactive validator", func(t *testing.T) { - app, ctx, validators := setupUniversalValidatorTest(t, 1) + app, ctx, validators := setupAddUniversalValidatorTest(t, 1) k := app.UvalidatorKeeper val := validators[0] valAddr, _ := sdk.ValAddressFromBech32(val.OperatorAddress) @@ -71,7 +71,7 @@ func TestAddUniversalValidator(t *testing.T) { }) t.Run("Adding already active validator fails", func(t *testing.T) { - app, ctx, validators := setupUniversalValidatorTest(t, 1) + app, ctx, validators := setupAddUniversalValidatorTest(t, 1) k := app.UvalidatorKeeper val := validators[0] valAddr, _ := sdk.ValAddressFromBech32(val.OperatorAddress) @@ -89,7 +89,7 @@ func TestAddUniversalValidator(t *testing.T) { }) t.Run("Unbonded validator cannot join", func(t *testing.T) { - app, ctx, validators := setupUniversalValidatorTest(t, 1) + app, ctx, validators := setupAddUniversalValidatorTest(t, 1) val := validators[0] valAddr, _ := sdk.ValAddressFromBech32(val.OperatorAddress) @@ -103,7 +103,7 @@ func TestAddUniversalValidator(t *testing.T) { }) t.Run("Invalid validator address format fails", func(t *testing.T) { - app, ctx, _ := setupUniversalValidatorTest(t, 1) + app, ctx, _ := setupAddUniversalValidatorTest(t, 1) err := app.UvalidatorKeeper.AddUniversalValidator(ctx, "invalid_bech32", "pub", uvalidatortypes.NetworkInfo{}) require.ErrorContains(t, err, "invalid core validator address") diff --git a/test/integration/uvalidator/msg_update_universal_validator_test.go b/test/integration/uvalidator/msg_update_universal_validator_test.go new file mode 100644 index 00000000..f51a7367 --- /dev/null +++ b/test/integration/uvalidator/msg_update_universal_validator_test.go @@ -0,0 +1,81 @@ +package integrationtest + +import ( + "fmt" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/app" + utils "github.com/pushchain/push-chain-node/test/utils" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// setupUpdateUniversalValidatorTest initializes an app with multiple validators +// and registers one universal validator entry. +func setupUpdateUniversalValidatorTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []string) { + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) + + universalVals := make([]string, len(validators)) + + // add one universal validator to update later + for i, val := range validators { + coreValAddr := val.OperatorAddress + pubkey := fmt.Sprintf("pubkey-%d", i) + network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.1.%d", i+1)} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) + require.NoError(t, err) + + universalVals[i] = coreValAddr + } + + return app, ctx, universalVals +} + +func TestUpdateUniversalValidator(t *testing.T) { + t.Run("successfully updates existing universal validator metadata", func(t *testing.T) { + app, ctx, vals := setupUpdateUniversalValidatorTest(t, 1) + coreVal := vals[0] + + newPubkey := "updated-pubkey" + newNetwork := uvalidatortypes.NetworkInfo{Ip: "10.0.0.1"} + + err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, newPubkey, newNetwork) + require.NoError(t, err) + + valAddr, err := sdk.ValAddressFromBech32(coreVal) + require.NoError(t, err) + + updatedVal, err := app.UvalidatorKeeper.UniversalValidatorSet.Get(ctx, valAddr) + require.NoError(t, err) + + require.Equal(t, newPubkey, updatedVal.IdentifyInfo.Pubkey) + require.Equal(t, newNetwork.Ip, updatedVal.NetworkInfo.Ip) + }) + + t.Run("fails when validator does not exist", func(t *testing.T) { + app, ctx, _ := setupUpdateUniversalValidatorTest(t, 1) + + coreVal := "pushvaloper1invalidaddress00000000000000000000000" + pubkey := "somekey" + network := uvalidatortypes.NetworkInfo{Ip: "10.0.0.2"} + + err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, pubkey, network) + require.Error(t, err) + require.Contains(t, err.Error(), "invalid core validator address") + }) + + t.Run("fails when validator not registered as universal", func(t *testing.T) { + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, 1) + coreVal := validators[0].OperatorAddress + + pubkey := "random" + network := uvalidatortypes.NetworkInfo{Ip: "10.0.0.4"} + + err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, pubkey, network) + require.Error(t, err) + require.Contains(t, err.Error(), "does not exist") + }) +} diff --git a/x/uvalidator/keeper/msg_update_universal_validator.go b/x/uvalidator/keeper/msg_update_universal_validator.go index d89b7f61..0f01414d 100644 --- a/x/uvalidator/keeper/msg_update_universal_validator.go +++ b/x/uvalidator/keeper/msg_update_universal_validator.go @@ -8,12 +8,7 @@ import ( "github.com/pushchain/push-chain-node/x/uvalidator/types" ) -// new validator -> added as a PENDING_JOIN status -// if existing: -// inactive -> added as a PENDING_JOIN status -// any other status -> revert -// UpdateUniversalValidator registers or reactivates a core validator as a universal validator. -// It ensures the core validator exists, is bonded, and handles lifecycle reactivation. +// UpdateUniversalValidator updates the metadata of the registered universal validator func (k Keeper) UpdateUniversalValidator( ctx context.Context, coreValidatorAddr, pubkey string, @@ -28,16 +23,11 @@ func (k Keeper) UpdateUniversalValidator( } // Ensure validator exists in staking module - validator, err := k.stakingKeeper.GetValidator(sdkCtx, valAddr) + _, err = k.stakingKeeper.GetValidator(sdkCtx, valAddr) if err != nil { return fmt.Errorf("core validator not found: %w", err) } - // Must be bonded to join - if !validator.IsBonded() { - return fmt.Errorf("validator %s is not bonded", coreValidatorAddr) - } - // Check if already exists exists, err := k.UniversalValidatorSet.Has(ctx, valAddr) if err != nil { From f2c100cb9f3c4d7aa5a13e7ad25801a8ccc73682 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 13 Nov 2025 11:40:35 +0530 Subject: [PATCH 066/105] feat: update UVs status when tss vote finalises --- x/utss/keeper/msg_vote_tss_key_process.go | 38 +++++++++++++++++++++++ x/utss/types/expected_keepers.go | 2 ++ 2 files changed, 40 insertions(+) diff --git a/x/utss/keeper/msg_vote_tss_key_process.go b/x/utss/keeper/msg_vote_tss_key_process.go index 9cbf8819..a411bea9 100644 --- a/x/utss/keeper/msg_vote_tss_key_process.go +++ b/x/utss/keeper/msg_vote_tss_key_process.go @@ -8,6 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/pushchain/push-chain-node/x/utss/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" ) func (k Keeper) VoteTssKeyProcess( @@ -76,6 +77,43 @@ func (k Keeper) VoteTssKeyProcess( return errors.Wrap(err, "failed to archive TSS process") } + universalValidatorSet, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) + if err != nil { + return err + } + + for i := range universalValidatorSet { + uv := &universalValidatorSet[i] + coreValidatorAddress := uv.IdentifyInfo.CoreValidatorAddress + + foundInParticipants := false + for _, participant := range tssKey.Participants { + if participant == coreValidatorAddress { + foundInParticipants = true + break + } + } + + // update pending_join validator to active + switch uv.LifecycleInfo.CurrentStatus { + case uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN: + if foundInParticipants { + uv.LifecycleInfo.CurrentStatus = uvalidatortypes.UVStatus_UV_STATUS_ACTIVE + if err := k.uvalidatorKeeper.UpdateValidatorStatus(ctx, sdk.ValAddress(coreValidatorAddress), uvalidatortypes.UVStatus_UV_STATUS_ACTIVE); err != nil { + k.logger.Error("failed to activate universal validator", "valAddr", coreValidatorAddress, "err", err) + } + } + // update pending_leave validator to inactive + case uvalidatortypes.UVStatus_UV_STATUS_PENDING_LEAVE: + if !foundInParticipants { + uv.LifecycleInfo.CurrentStatus = uvalidatortypes.UVStatus_UV_STATUS_INACTIVE + if err := k.uvalidatorKeeper.UpdateValidatorStatus(ctx, sdk.ValAddress(coreValidatorAddress), uvalidatortypes.UVStatus_UV_STATUS_INACTIVE); err != nil { + k.logger.Error("failed to inactivate universal validator", "valAddr", coreValidatorAddress, "err", err) + } + } + } + } + // Step 7: Emit finalized event event, _ := types.NewTssKeyFinalizedEvent(types.TssKeyFinalizedEvent{ ProcessID: processId, diff --git a/x/utss/types/expected_keepers.go b/x/utss/types/expected_keepers.go index 4ef6afaa..8aa4599b 100644 --- a/x/utss/types/expected_keepers.go +++ b/x/utss/types/expected_keepers.go @@ -3,6 +3,7 @@ package types import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" ) @@ -26,4 +27,5 @@ type UValidatorKeeper interface { err error) GetEligibleVoters(ctx context.Context) ([]uvalidatortypes.UniversalValidator, error) GetAllUniversalValidators(ctx context.Context) ([]uvalidatortypes.UniversalValidator, error) + UpdateValidatorStatus(ctx context.Context, addr sdk.ValAddress, newStatus uvalidatortypes.UVStatus) error } From a907fd1e72cee553c0d18a38cde7f6cf7850bbec Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 13 Nov 2025 11:47:32 +0530 Subject: [PATCH 067/105] feat: imported utssKeeper in uvalidatorKeeper --- app/app.go | 3 ++- x/uvalidator/depinject.go | 6 ++++-- x/uvalidator/keeper/keeper.go | 3 +++ x/uvalidator/keeper/keeper_test.go | 11 +++++++++-- x/uvalidator/module.go | 3 +++ x/uvalidator/types/expected_keepers.go | 5 +++++ 6 files changed, 26 insertions(+), 5 deletions(-) diff --git a/app/app.go b/app/app.go index 20097f07..be0ce571 100755 --- a/app/app.go +++ b/app/app.go @@ -752,6 +752,7 @@ func NewChainApp( authtypes.NewModuleAddress(govtypes.ModuleName).String(), app.StakingKeeper, app.SlashingKeeper, + &app.UtssKeeper, ) // Create the utss keeper @@ -1037,7 +1038,7 @@ func NewChainApp( uexecutor.NewAppModule(appCodec, app.UexecutorKeeper, app.EVMKeeper, app.FeeMarketKeeper, app.BankKeeper, app.AccountKeeper, app.UregistryKeeper, app.UtxverifierKeeper, app.UvalidatorKeeper), utxverifier.NewAppModule(appCodec, app.UtxverifierKeeper, app.UregistryKeeper), uregistry.NewAppModule(appCodec, app.UregistryKeeper, app.EVMKeeper), - uvalidator.NewAppModule(appCodec, app.UvalidatorKeeper, app.StakingKeeper, app.SlashingKeeper), + uvalidator.NewAppModule(appCodec, app.UvalidatorKeeper, app.StakingKeeper, app.SlashingKeeper, &app.UtssKeeper), utss.NewAppModule(appCodec, app.UtssKeeper, app.UvalidatorKeeper), ) diff --git a/x/uvalidator/depinject.go b/x/uvalidator/depinject.go index 6e611426..e4803687 100755 --- a/x/uvalidator/depinject.go +++ b/x/uvalidator/depinject.go @@ -18,6 +18,7 @@ import ( modulev1 "github.com/pushchain/push-chain-node/api/uvalidator/module/v1" "github.com/pushchain/push-chain-node/x/uvalidator/keeper" + "github.com/pushchain/push-chain-node/x/uvalidator/types" ) var _ appmodule.AppModule = AppModule{} @@ -44,6 +45,7 @@ type ModuleInputs struct { StakingKeeper stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper + UtssKeeper types.UtssKeeper } type ModuleOutputs struct { @@ -56,8 +58,8 @@ type ModuleOutputs struct { func ProvideModule(in ModuleInputs) ModuleOutputs { govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String() - k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr, in.StakingKeeper, in.SlashingKeeper) - m := NewAppModule(in.Cdc, k, in.StakingKeeper, in.SlashingKeeper) + k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr, in.StakingKeeper, in.SlashingKeeper, in.UtssKeeper) + m := NewAppModule(in.Cdc, k, in.StakingKeeper, in.SlashingKeeper, in.UtssKeeper) return ModuleOutputs{Module: m, Keeper: k, Out: depinject.Out{}} } diff --git a/x/uvalidator/keeper/keeper.go b/x/uvalidator/keeper/keeper.go index 3c44be11..ec11daaa 100755 --- a/x/uvalidator/keeper/keeper.go +++ b/x/uvalidator/keeper/keeper.go @@ -34,6 +34,7 @@ type Keeper struct { stakingKeeper types.StakingKeeper slashingKeeper types.SlashingKeeper + utssKeeper types.UtssKeeper authority string hooks types.UValidatorHooks @@ -47,6 +48,7 @@ func NewKeeper( authority string, stakingKeeper types.StakingKeeper, slashingKeeper types.SlashingKeeper, + utssKeeper types.UtssKeeper, ) Keeper { logger = logger.With(log.ModuleKey, "x/"+types.ModuleName) @@ -91,6 +93,7 @@ func NewKeeper( authority: authority, stakingKeeper: stakingKeeper, slashingKeeper: slashingKeeper, + utssKeeper: utssKeeper, } return k diff --git a/x/uvalidator/keeper/keeper_test.go b/x/uvalidator/keeper/keeper_test.go index d5cd14ff..fd5c3d6b 100755 --- a/x/uvalidator/keeper/keeper_test.go +++ b/x/uvalidator/keeper/keeper_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "context" "testing" "github.com/stretchr/testify/suite" @@ -87,10 +88,10 @@ func SetupTest(t *testing.T) *testFixture { registerBaseSDKModules(logger, f, encCfg, keys, accountAddressCodec, validatorAddressCodec, consensusAddressCodec) // Setup Keeper. - f.k = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(keys[types.ModuleName]), logger, f.govModAddr, f.stakingKeeper, slashingKeeper.Keeper{}) + f.k = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(keys[types.ModuleName]), logger, f.govModAddr, f.stakingKeeper, slashingKeeper.Keeper{}, mockUtssKeeper{}) f.msgServer = keeper.NewMsgServerImpl(f.k) f.queryServer = keeper.NewQuerier(f.k) - f.appModule = module.NewAppModule(encCfg.Codec, f.k, f.stakingKeeper, slashingKeeper.Keeper{}) + f.appModule = module.NewAppModule(encCfg.Codec, f.k, f.stakingKeeper, slashingKeeper.Keeper{}, mockUtssKeeper{}) return f } @@ -147,3 +148,9 @@ func registerBaseSDKModules( authtypes.FeeCollectorName, f.govModAddr, ) } + +type mockUtssKeeper struct{} + +func (m mockUtssKeeper) GetCurrentTssParticipants(ctx context.Context) ([]string, error) { + return []string{"val1", "val2"}, nil +} diff --git a/x/uvalidator/module.go b/x/uvalidator/module.go index 99caecef..7e47eab5 100755 --- a/x/uvalidator/module.go +++ b/x/uvalidator/module.go @@ -46,6 +46,7 @@ type AppModule struct { keeper keeper.Keeper stakingKeeper types.StakingKeeper slashingKeeper types.SlashingKeeper + utssKeeper types.UtssKeeper } // NewAppModule constructor @@ -54,12 +55,14 @@ func NewAppModule( keeper keeper.Keeper, stakingKeeper types.StakingKeeper, slashingKeeper types.SlashingKeeper, + utssKeeper types.UtssKeeper, ) *AppModule { return &AppModule{ AppModuleBasic: AppModuleBasic{cdc: cdc}, keeper: keeper, stakingKeeper: stakingKeeper, slashingKeeper: slashingKeeper, + utssKeeper: utssKeeper, } } diff --git a/x/uvalidator/types/expected_keepers.go b/x/uvalidator/types/expected_keepers.go index b2f2d183..c30061d7 100644 --- a/x/uvalidator/types/expected_keepers.go +++ b/x/uvalidator/types/expected_keepers.go @@ -17,3 +17,8 @@ type StakingKeeper interface { type SlashingKeeper interface { IsTombstoned(ctx context.Context, addr sdk.ConsAddress) bool } + +// UtssKeeper defines the expected interface for the utss module. +type UtssKeeper interface { + GetCurrentTssParticipants(ctx context.Context) ([]string, error) +} From bb54e18f5521768c09549887f4b853ef79b1e932 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 13 Nov 2025 11:47:54 +0530 Subject: [PATCH 068/105] refactor: added a helper fn for getParticipants in utss module --- x/utss/keeper/tss_key_process.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/x/utss/keeper/tss_key_process.go b/x/utss/keeper/tss_key_process.go index 65af8ea8..e734f9b0 100644 --- a/x/utss/keeper/tss_key_process.go +++ b/x/utss/keeper/tss_key_process.go @@ -42,3 +42,15 @@ func (k Keeper) GetTssKeyProcessByID(ctx context.Context, processID uint64) (typ } return key, true, nil } + +// GetCurrentTssParticipants returns the participants of current tss +func (k Keeper) GetCurrentTssParticipants(ctx context.Context) ([]string, error) { + currentProcess, err := k.CurrentTssProcess.Get(ctx) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return []string{}, nil + } + return nil, err + } + return currentProcess.Participants, nil +} From b66b32edbfd329fac148cf71428a76c57951f6e7 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 13 Nov 2025 11:50:28 +0530 Subject: [PATCH 069/105] refactor: updated remove universal validator endpoint to reject removal of pending join UV --- .../keeper/msg_remove_universal_validator.go | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/x/uvalidator/keeper/msg_remove_universal_validator.go b/x/uvalidator/keeper/msg_remove_universal_validator.go index 312f2e1d..d8769d0d 100644 --- a/x/uvalidator/keeper/msg_remove_universal_validator.go +++ b/x/uvalidator/keeper/msg_remove_universal_validator.go @@ -46,13 +46,29 @@ func (k Keeper) RemoveUniversalValidator( newStatus = types.UVStatus_UV_STATUS_PENDING_LEAVE case types.UVStatus_UV_STATUS_PENDING_JOIN: - // TODO: check if its present in the current tss process + // Check if validator is part of the current TSS process + currentParticipants, err := k.utssKeeper.GetCurrentTssParticipants(ctx) + if err != nil { + return fmt.Errorf("failed to fetch current TSS participants: %w", err) + } + + isParticipant := false + for _, p := range currentParticipants { + if p == universalValidatorAddr { + isParticipant = true + break + } + } + // If part of current keygen, reject removal - // Otherwise mark as inactive + if isParticipant { + return fmt.Errorf("validator %s is part of the current TSS process and cannot be removed", universalValidatorAddr) + } + + // Otherwise, mark as inactive if err := k.UpdateValidatorStatus(ctx, valAddr, types.UVStatus_UV_STATUS_INACTIVE); err != nil { return fmt.Errorf("failed to inactivate validator %s: %w", universalValidatorAddr, err) } - newStatus = types.UVStatus_UV_STATUS_INACTIVE case types.UVStatus_UV_STATUS_PENDING_LEAVE, types.UVStatus_UV_STATUS_INACTIVE: From 515394b8ea231690efe29639b83f82ba2484dbd5 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 13 Nov 2025 12:07:30 +0530 Subject: [PATCH 070/105] test: added integration tests of remove_universal_validator msg --- .../msg_remove_universal_validator_test.go | 122 ++++++++++++++++++ x/uvalidator/keeper/validator.go | 16 +-- 2 files changed, 129 insertions(+), 9 deletions(-) create mode 100644 test/integration/uvalidator/msg_remove_universal_validator_test.go diff --git a/test/integration/uvalidator/msg_remove_universal_validator_test.go b/test/integration/uvalidator/msg_remove_universal_validator_test.go new file mode 100644 index 00000000..4d962984 --- /dev/null +++ b/test/integration/uvalidator/msg_remove_universal_validator_test.go @@ -0,0 +1,122 @@ +package integrationtest + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/app" + utils "github.com/pushchain/push-chain-node/test/utils" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// setup function (same as before) +func setupRemoveUniversalValidatorTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []stakingtypes.Validator) { + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) + return app, ctx, validators +} + +func TestRemoveUniversalValidator(t *testing.T) { + t.Run("ACTIVE -> PENDING_LEAVE", func(t *testing.T) { + app, ctx, validators := setupRemoveUniversalValidatorTest(t, 1) + k := app.UvalidatorKeeper + + valAddr, _ := sdk.ValAddressFromBech32(validators[0].OperatorAddress) + + uv := uvalidatortypes.UniversalValidator{ + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: valAddr.String()}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_ACTIVE, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, uv)) + + err := k.RemoveUniversalValidator(ctx, valAddr.String()) + require.NoError(t, err) + + updated, _ := k.UniversalValidatorSet.Get(ctx, valAddr) + require.Equal(t, uvalidatortypes.UVStatus_UV_STATUS_PENDING_LEAVE, updated.LifecycleInfo.CurrentStatus) + }) + + t.Run("PENDING_JOIN -> INACTIVE (not in TSS)", func(t *testing.T) { + app, ctx, validators := setupRemoveUniversalValidatorTest(t, 1) + k := app.UvalidatorKeeper + valAddr, _ := sdk.ValAddressFromBech32(validators[0].OperatorAddress) + + // ensure utssKeeper has no current TSS process set + err := app.UtssKeeper.CurrentTssProcess.Remove(ctx) + require.NoError(t, err) + + uv := uvalidatortypes.UniversalValidator{ + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: valAddr.String()}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, uv)) + + err = k.RemoveUniversalValidator(ctx, valAddr.String()) + require.NoError(t, err) + + updated, _ := k.UniversalValidatorSet.Get(ctx, valAddr) + require.Equal(t, uvalidatortypes.UVStatus_UV_STATUS_INACTIVE, updated.LifecycleInfo.CurrentStatus) + }) + + t.Run("PENDING_JOIN -> REVERT if in current TSS process", func(t *testing.T) { + app, ctx, validators := setupRemoveUniversalValidatorTest(t, 1) + k := app.UvalidatorKeeper + valAddr, _ := sdk.ValAddressFromBech32(validators[0].OperatorAddress) + + // add fake current TSS process with this validator as participant + process := utsstypes.TssKeyProcess{ + Participants: []string{valAddr.String()}, + } + require.NoError(t, app.UtssKeeper.CurrentTssProcess.Set(ctx, process)) + + uv := uvalidatortypes.UniversalValidator{ + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: valAddr.String()}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, uv)) + + err := k.RemoveUniversalValidator(ctx, valAddr.String()) + require.ErrorContains(t, err, "cannot be removed") + }) + + t.Run("Already INACTIVE -> error", func(t *testing.T) { + app, ctx, validators := setupRemoveUniversalValidatorTest(t, 1) + k := app.UvalidatorKeeper + valAddr, _ := sdk.ValAddressFromBech32(validators[0].OperatorAddress) + + uv := uvalidatortypes.UniversalValidator{ + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: valAddr.String()}, + LifecycleInfo: &uvalidatortypes.LifecycleInfo{ + CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_INACTIVE, + }, + } + require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, uv)) + + err := k.RemoveUniversalValidator(ctx, valAddr.String()) + require.ErrorContains(t, err, "already in UV_STATUS_INACTIVE") + }) + + t.Run("Invalid validator address format fails", func(t *testing.T) { + app, ctx, _ := setupRemoveUniversalValidatorTest(t, 1) + err := app.UvalidatorKeeper.RemoveUniversalValidator(ctx, "invalid_bech32") + require.ErrorContains(t, err, "invalid universal validator address") + }) + + t.Run("Non-existent validator fails", func(t *testing.T) { + app, ctx, validators := setupRemoveUniversalValidatorTest(t, 1) + valAddr, _ := sdk.ValAddressFromBech32(validators[0].OperatorAddress) + + err := app.UvalidatorKeeper.RemoveUniversalValidator(ctx, valAddr.String()) + require.ErrorContains(t, err, "not found") + }) +} diff --git a/x/uvalidator/keeper/validator.go b/x/uvalidator/keeper/validator.go index 36a72f25..876be3a1 100644 --- a/x/uvalidator/keeper/validator.go +++ b/x/uvalidator/keeper/validator.go @@ -95,17 +95,15 @@ func (k Keeper) UpdateValidatorStatus(ctx context.Context, addr sdk.ValAddress, // only strict rule for two cases, pending join -> active & active -> pending_leave // can see in future if a pending leave could be transitioned to pending_join func validateStatusTransition(from, to types.UVStatus) error { - switch from { - case types.UVStatus_UV_STATUS_PENDING_JOIN: - if to != types.UVStatus_UV_STATUS_ACTIVE { - return fmt.Errorf("invalid transition: PENDING_JOIN → ACTIVE only, got %s", to) - } + switch to { case types.UVStatus_UV_STATUS_ACTIVE: - if to != types.UVStatus_UV_STATUS_PENDING_LEAVE { - return fmt.Errorf("invalid transition: ACTIVE → PENDING_LEAVE only, got %s", to) + if from != types.UVStatus_UV_STATUS_PENDING_JOIN { + return fmt.Errorf("invalid transition: can only become ACTIVE from PENDING_JOIN, got %s → %s", from, to) + } + case types.UVStatus_UV_STATUS_PENDING_LEAVE: + if from != types.UVStatus_UV_STATUS_ACTIVE { + return fmt.Errorf("invalid transition: can only become PENDING_LEAVE from ACTIVE, got %s → %s", from, to) } - default: - return fmt.Errorf("unknown current status: %s", from) } return nil } From 3c2460786b384736f66fa6b6bb861e628a17ea3e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 13 Nov 2025 13:23:49 +0530 Subject: [PATCH 071/105] fix: fixed the removal of UV endpoint --- x/utss/keeper/tss_key_process.go | 7 ++++++- x/uvalidator/keeper/msg_remove_universal_validator.go | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/x/utss/keeper/tss_key_process.go b/x/utss/keeper/tss_key_process.go index e734f9b0..56b6c37b 100644 --- a/x/utss/keeper/tss_key_process.go +++ b/x/utss/keeper/tss_key_process.go @@ -6,6 +6,7 @@ import ( "fmt" "cosmossdk.io/collections" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/pushchain/push-chain-node/x/utss/types" ) @@ -43,8 +44,9 @@ func (k Keeper) GetTssKeyProcessByID(ctx context.Context, processID uint64) (typ return key, true, nil } -// GetCurrentTssParticipants returns the participants of current tss +// GetCurrentTssParticipants returns the participants of current tss (ongoing) func (k Keeper) GetCurrentTssParticipants(ctx context.Context) ([]string, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) currentProcess, err := k.CurrentTssProcess.Get(ctx) if err != nil { if errors.Is(err, collections.ErrNotFound) { @@ -52,5 +54,8 @@ func (k Keeper) GetCurrentTssParticipants(ctx context.Context) ([]string, error) } return nil, err } + if sdkCtx.BlockHeight() < currentProcess.ExpiryHeight { + return []string{}, nil + } return currentProcess.Participants, nil } diff --git a/x/uvalidator/keeper/msg_remove_universal_validator.go b/x/uvalidator/keeper/msg_remove_universal_validator.go index d8769d0d..84aecf93 100644 --- a/x/uvalidator/keeper/msg_remove_universal_validator.go +++ b/x/uvalidator/keeper/msg_remove_universal_validator.go @@ -11,8 +11,8 @@ import ( // RemoveUniversalValidator handles universal validator removal lifecycle: // - ACTIVE -> PENDING_LEAVE // - PENDING_JOIN -> -// - if in current TSS process → revert (keygen ongoing) -// - if not in current TSS process → INACTIVE +// - if in current TSS process (ongoing) → revert (keygen ongoing) +// - if not in current TSS process (ongoing) → INACTIVE // // It ensures the validator exists before removal and triggers hooks on status change. func (k Keeper) RemoveUniversalValidator( From e3513b75d5e91e01eb993eea9e85cdcb662f71c4 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 13 Nov 2025 13:26:30 +0530 Subject: [PATCH 072/105] refactor: modified tss key process type from reshare to refresh --- proto/utss/v1/types.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/utss/v1/types.proto b/proto/utss/v1/types.proto index 19bafb90..5eb25530 100644 --- a/proto/utss/v1/types.proto +++ b/proto/utss/v1/types.proto @@ -25,7 +25,7 @@ enum TssKeyProcessStatus { enum TssProcessType { TSS_PROCESS_KEYGEN = 0; - TSS_PROCESS_RESHARE = 1; + TSS_PROCESS_REFRESH = 1; } // TSS key process information From e377fa27b218845c42dddf5d5c992ac7e4de1a4e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 13 Nov 2025 13:26:44 +0530 Subject: [PATCH 073/105] refactor: added generated protobuf --- api/utss/v1/types.pulsar.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/utss/v1/types.pulsar.go b/api/utss/v1/types.pulsar.go index 3f359d44..7925e893 100644 --- a/api/utss/v1/types.pulsar.go +++ b/api/utss/v1/types.pulsar.go @@ -1974,18 +1974,18 @@ type TssProcessType int32 const ( TssProcessType_TSS_PROCESS_KEYGEN TssProcessType = 0 - TssProcessType_TSS_PROCESS_RESHARE TssProcessType = 1 + TssProcessType_TSS_PROCESS_REFRESH TssProcessType = 1 ) // Enum value maps for TssProcessType. var ( TssProcessType_name = map[int32]string{ 0: "TSS_PROCESS_KEYGEN", - 1: "TSS_PROCESS_RESHARE", + 1: "TSS_PROCESS_REFRESH", } TssProcessType_value = map[string]int32{ "TSS_PROCESS_KEYGEN": 0, - "TSS_PROCESS_RESHARE": 1, + "TSS_PROCESS_REFRESH": 1, } ) @@ -2263,7 +2263,7 @@ var file_utss_v1_types_proto_rawDesc = []byte{ 0x41, 0x0a, 0x0e, 0x54, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x53, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x4b, 0x45, 0x59, 0x47, 0x45, 0x4e, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x53, 0x53, - 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x52, 0x45, 0x53, 0x48, 0x41, 0x52, 0x45, + 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x52, 0x45, 0x46, 0x52, 0x45, 0x53, 0x48, 0x10, 0x01, 0x42, 0x8f, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, From 2be1e23492d4bbbe5ab0d61aee7c8afd589ae662 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 13 Nov 2025 13:27:14 +0530 Subject: [PATCH 074/105] refactor: added tss_process_type rename in module --- x/utss/keeper/hooks.go | 4 +- x/utss/types/tss_key_process.go | 2 +- x/utss/types/types.pb.go | 84 ++++++++++++++++----------------- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/x/utss/keeper/hooks.go b/x/utss/keeper/hooks.go index 49960911..8429f1e9 100644 --- a/x/utss/keeper/hooks.go +++ b/x/utss/keeper/hooks.go @@ -17,7 +17,7 @@ func (k Keeper) Hooks() Hooks { return Hooks{k} } func (h Hooks) AfterValidatorAdded(ctx sdk.Context, valAddr sdk.ValAddress) { h.k.Logger().Info("TSS Hook: Universal validator added", "address", valAddr.String()) - if err := h.k.InitiateTssKeyProcess(ctx, types.TssProcessType_TSS_PROCESS_RESHARE); err != nil { + if err := h.k.InitiateTssKeyProcess(ctx, types.TssProcessType_TSS_PROCESS_REFRESH); err != nil { h.k.Logger().Error("Failed to initiate TSS key process in hook", "error", err) ctx.EventManager().EmitEvent( sdk.NewEvent( @@ -32,7 +32,7 @@ func (h Hooks) AfterValidatorAdded(ctx sdk.Context, valAddr sdk.ValAddress) { func (h Hooks) AfterValidatorRemoved(ctx sdk.Context, valAddr sdk.ValAddress) { h.k.Logger().Info("TSS Hook: Universal validator removed", "address", valAddr.String()) - if err := h.k.InitiateTssKeyProcess(ctx, types.TssProcessType_TSS_PROCESS_RESHARE); err != nil { + if err := h.k.InitiateTssKeyProcess(ctx, types.TssProcessType_TSS_PROCESS_REFRESH); err != nil { h.k.Logger().Error("Failed to initiate TSS key process in hook", "error", err) ctx.EventManager().EmitEvent( sdk.NewEvent( diff --git a/x/utss/types/tss_key_process.go b/x/utss/types/tss_key_process.go index 39c7937a..811fae76 100644 --- a/x/utss/types/tss_key_process.go +++ b/x/utss/types/tss_key_process.go @@ -40,7 +40,7 @@ func (p TssKeyProcess) ValidateBasic() error { } // Validate process type - if p.ProcessType != TssProcessType_TSS_PROCESS_KEYGEN && p.ProcessType != TssProcessType_TSS_PROCESS_RESHARE { + if p.ProcessType != TssProcessType_TSS_PROCESS_KEYGEN && p.ProcessType != TssProcessType_TSS_PROCESS_REFRESH { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid process type: %v", p.ProcessType) } diff --git a/x/utss/types/types.pb.go b/x/utss/types/types.pb.go index 5c3ed21e..3c9320e6 100644 --- a/x/utss/types/types.pb.go +++ b/x/utss/types/types.pb.go @@ -58,17 +58,17 @@ type TssProcessType int32 const ( TssProcessType_TSS_PROCESS_KEYGEN TssProcessType = 0 - TssProcessType_TSS_PROCESS_RESHARE TssProcessType = 1 + TssProcessType_TSS_PROCESS_REFRESH TssProcessType = 1 ) var TssProcessType_name = map[int32]string{ 0: "TSS_PROCESS_KEYGEN", - 1: "TSS_PROCESS_RESHARE", + 1: "TSS_PROCESS_REFRESH", } var TssProcessType_value = map[string]int32{ "TSS_PROCESS_KEYGEN": 0, - "TSS_PROCESS_RESHARE": 1, + "TSS_PROCESS_REFRESH": 1, } func (x TssProcessType) String() string { @@ -302,45 +302,45 @@ func init() { func init() { proto.RegisterFile("utss/v1/types.proto", fileDescriptor_6ecfa9650339f6c3) } var fileDescriptor_6ecfa9650339f6c3 = []byte{ - // 596 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0x3f, 0x6f, 0xd3, 0x40, - 0x18, 0xc6, 0x63, 0xa7, 0x0d, 0xca, 0xdb, 0xb4, 0x4a, 0x2f, 0xa1, 0x31, 0x85, 0xba, 0x69, 0x58, - 0xa2, 0x4a, 0x8d, 0x15, 0xe8, 0x80, 0xb2, 0xf5, 0x8f, 0x69, 0xa3, 0xa0, 0x12, 0xd9, 0x65, 0x28, - 0x8b, 0xe5, 0x3f, 0x87, 0x73, 0x72, 0xed, 0xb3, 0x72, 0x97, 0xaa, 0x66, 0x64, 0x64, 0x62, 0x64, - 0xec, 0x47, 0xe0, 0x63, 0x30, 0x76, 0x64, 0x44, 0xed, 0x00, 0x1f, 0x03, 0xf9, 0xec, 0x16, 0x07, - 0xba, 0xd8, 0xef, 0x3d, 0xcf, 0xf3, 0x9e, 0xde, 0xfb, 0x9d, 0x0e, 0x1a, 0x33, 0xce, 0x98, 0x76, - 0xd1, 0xd7, 0x78, 0x12, 0x63, 0xd6, 0x8b, 0xa7, 0x94, 0x53, 0xf4, 0x28, 0x15, 0x7b, 0x17, 0xfd, - 0x75, 0xd5, 0xa5, 0x2c, 0xa4, 0x4c, 0x73, 0x6c, 0x86, 0xb5, 0x8b, 0xbe, 0x83, 0xb9, 0xdd, 0xd7, - 0x5c, 0x4a, 0xa2, 0x2c, 0xb8, 0xde, 0xca, 0xfd, 0x90, 0xf9, 0xe9, 0x1e, 0x21, 0xf3, 0x73, 0xa3, - 0xe9, 0x53, 0x9f, 0x8a, 0x52, 0x4b, 0xab, 0x5c, 0x5d, 0xb5, 0x43, 0x12, 0x51, 0x4d, 0x7c, 0x33, - 0xa9, 0xf3, 0x0a, 0x2a, 0x63, 0x7b, 0x6a, 0x87, 0x0c, 0x35, 0x61, 0xd1, 0xf6, 0x42, 0x12, 0x29, - 0x52, 0x5b, 0xea, 0x56, 0x8d, 0x6c, 0x31, 0x50, 0xbe, 0x5e, 0x6d, 0x96, 0x7e, 0x5f, 0x6d, 0x4a, - 0x9f, 0x7f, 0x7d, 0xdb, 0x5e, 0x12, 0xc3, 0xc6, 0x22, 0xdf, 0xb9, 0x92, 0x61, 0xf9, 0x94, 0xb1, - 0x11, 0x4e, 0xc6, 0x53, 0xea, 0x62, 0xc6, 0xd0, 0x2e, 0x54, 0x18, 0xb7, 0xf9, 0x8c, 0x89, 0x2d, - 0x56, 0x5e, 0x3c, 0xeb, 0xe5, 0xe7, 0xe8, 0xcd, 0xe5, 0x4c, 0x91, 0x31, 0xf2, 0x2c, 0xea, 0x40, - 0x2d, 0xb6, 0xa7, 0x9c, 0xb8, 0x24, 0xb6, 0x23, 0xce, 0x14, 0xb9, 0x5d, 0xee, 0x56, 0x8d, 0x39, - 0x0d, 0x6d, 0x41, 0xcd, 0x39, 0xa7, 0x6e, 0x60, 0x4d, 0x30, 0xf1, 0x27, 0x5c, 0x29, 0xb7, 0xa5, - 0x6e, 0xd9, 0x58, 0x12, 0xda, 0xb1, 0x90, 0xd0, 0x73, 0x58, 0xc6, 0x97, 0x31, 0x99, 0x26, 0x77, - 0x99, 0x05, 0x91, 0xa9, 0x65, 0x62, 0x1e, 0x1a, 0x40, 0x2d, 0xce, 0x86, 0xb0, 0x52, 0xde, 0xca, - 0xa2, 0x98, 0xb3, 0x55, 0x9c, 0x33, 0x1f, 0xf2, 0x34, 0x89, 0xb1, 0xb1, 0x14, 0xff, 0x5d, 0xa0, - 0x15, 0x90, 0x89, 0xa7, 0x54, 0xda, 0x52, 0x77, 0xc1, 0x90, 0x89, 0x37, 0xd8, 0x2a, 0x92, 0x69, - 0x0a, 0x32, 0x9c, 0x31, 0x2b, 0xc0, 0x89, 0x95, 0xb7, 0x75, 0x3e, 0xc9, 0x50, 0xc9, 0x8e, 0x8e, - 0x36, 0x00, 0x52, 0x37, 0x9e, 0x39, 0x01, 0x4e, 0x72, 0xc4, 0x55, 0xce, 0xd8, 0x58, 0x08, 0xe8, - 0x31, 0x54, 0xd2, 0x46, 0xe2, 0x29, 0x72, 0x46, 0x3f, 0xc0, 0xc9, 0xd0, 0xfb, 0x8f, 0x4d, 0xf9, - 0x01, 0x36, 0xbb, 0xb0, 0xf6, 0x81, 0x44, 0xf6, 0x39, 0xf9, 0x88, 0x3d, 0x6b, 0x8e, 0x52, 0x46, - 0xa0, 0x79, 0xef, 0xee, 0x17, 0x70, 0xf5, 0xa0, 0x11, 0xe0, 0xc4, 0xc7, 0xd1, 0x7c, 0xcb, 0xa2, - 0x68, 0x59, 0xcd, 0xac, 0x62, 0x7e, 0x03, 0xe0, 0x8e, 0xdc, 0x3d, 0x85, 0x6a, 0xae, 0x0c, 0xbd, - 0xc1, 0x93, 0x22, 0x8c, 0x5a, 0x11, 0xc6, 0x76, 0x00, 0x8d, 0x07, 0xae, 0x1f, 0x3d, 0x85, 0xd6, - 0xa9, 0x69, 0x5a, 0x23, 0xfd, 0xcc, 0x1a, 0x1b, 0x6f, 0x0f, 0x74, 0xd3, 0xb4, 0xc6, 0xfa, 0xc9, - 0xe1, 0xf0, 0xe4, 0xa8, 0x5e, 0x7a, 0xc8, 0x34, 0xdf, 0x1d, 0xa4, 0xff, 0xba, 0x84, 0xd6, 0x61, - 0xed, 0x5f, 0xf3, 0xf5, 0xde, 0xf0, 0x8d, 0x7e, 0x58, 0x97, 0xb7, 0xf7, 0x60, 0x65, 0xfe, 0x0e, - 0xd1, 0x1a, 0xa0, 0x34, 0x7d, 0x97, 0x1c, 0xe9, 0x67, 0x47, 0xfa, 0x49, 0xbd, 0x84, 0x5a, 0xd0, - 0x28, 0xea, 0x86, 0x6e, 0x1e, 0xef, 0x19, 0x7a, 0x5d, 0xda, 0x1f, 0x7d, 0xbf, 0x51, 0xa5, 0xeb, - 0x1b, 0x55, 0xfa, 0x79, 0xa3, 0x4a, 0x5f, 0x6e, 0xd5, 0xd2, 0xf5, 0xad, 0x5a, 0xfa, 0x71, 0xab, - 0x96, 0xde, 0xf7, 0x7d, 0xc2, 0x27, 0x33, 0xa7, 0xe7, 0xd2, 0x50, 0x8b, 0x67, 0x6c, 0xe2, 0x4e, - 0x6c, 0x12, 0x89, 0x6a, 0x47, 0x94, 0x3b, 0x11, 0xf5, 0xb0, 0x76, 0xa9, 0x65, 0xc7, 0x4f, 0xdf, - 0xb3, 0x53, 0x11, 0xaf, 0xec, 0xe5, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x93, 0xe2, 0x2c, - 0xe7, 0x03, 0x00, 0x00, + // 597 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0x3f, 0x4f, 0xdb, 0x4e, + 0x18, 0xc7, 0x63, 0x07, 0xf2, 0x53, 0x1e, 0x02, 0x0a, 0x97, 0xfc, 0x88, 0x4b, 0x8b, 0x09, 0xe9, + 0x12, 0x21, 0x11, 0x2b, 0x2d, 0x43, 0x95, 0x8d, 0x3f, 0x06, 0xa2, 0x54, 0x34, 0xb2, 0xe9, 0x40, + 0x17, 0xcb, 0x7f, 0xae, 0xce, 0xc9, 0xd8, 0x67, 0xe5, 0x2e, 0x08, 0x77, 0xec, 0xd8, 0xa9, 0x63, + 0x47, 0x5e, 0x42, 0x5f, 0x46, 0x47, 0xc6, 0x8e, 0x15, 0x0c, 0xed, 0xcb, 0xa8, 0x7c, 0x36, 0xd4, + 0x69, 0x59, 0xec, 0xe7, 0xbe, 0xdf, 0xef, 0x73, 0x7a, 0xee, 0x73, 0x3a, 0x68, 0xcc, 0x38, 0x63, + 0xda, 0x65, 0x5f, 0xe3, 0x49, 0x8c, 0x59, 0x2f, 0x9e, 0x52, 0x4e, 0xd1, 0x7f, 0xa9, 0xd8, 0xbb, + 0xec, 0xaf, 0xab, 0x2e, 0x65, 0x21, 0x65, 0x9a, 0x63, 0x33, 0xac, 0x5d, 0xf6, 0x1d, 0xcc, 0xed, + 0xbe, 0xe6, 0x52, 0x12, 0x65, 0xc1, 0xf5, 0x56, 0xee, 0x87, 0xcc, 0x4f, 0xf7, 0x08, 0x99, 0x9f, + 0x1b, 0x4d, 0x9f, 0xfa, 0x54, 0x94, 0x5a, 0x5a, 0xe5, 0xea, 0xaa, 0x1d, 0x92, 0x88, 0x6a, 0xe2, + 0x9b, 0x49, 0x9d, 0x57, 0x50, 0x19, 0xdb, 0x53, 0x3b, 0x64, 0xa8, 0x09, 0x8b, 0xb6, 0x17, 0x92, + 0x48, 0x91, 0xda, 0x52, 0xb7, 0x6a, 0x64, 0x8b, 0x81, 0xf2, 0xe5, 0x7a, 0xb3, 0xf4, 0xeb, 0x7a, + 0x53, 0xfa, 0xf4, 0xf3, 0xeb, 0xf6, 0x92, 0x18, 0x36, 0x16, 0xf9, 0xce, 0xb5, 0x0c, 0xcb, 0x67, + 0x8c, 0x8d, 0x70, 0x32, 0x9e, 0x52, 0x17, 0x33, 0x86, 0x76, 0xa1, 0xc2, 0xb8, 0xcd, 0x67, 0x4c, + 0x6c, 0xb1, 0xf2, 0xe2, 0x59, 0x2f, 0x3f, 0x47, 0x6f, 0x2e, 0x67, 0x8a, 0x8c, 0x91, 0x67, 0x51, + 0x07, 0x6a, 0xb1, 0x3d, 0xe5, 0xc4, 0x25, 0xb1, 0x1d, 0x71, 0xa6, 0xc8, 0xed, 0x72, 0xb7, 0x6a, + 0xcc, 0x69, 0x68, 0x0b, 0x6a, 0xce, 0x05, 0x75, 0x03, 0x6b, 0x82, 0x89, 0x3f, 0xe1, 0x4a, 0xb9, + 0x2d, 0x75, 0xcb, 0xc6, 0x92, 0xd0, 0x4e, 0x84, 0x84, 0x9e, 0xc3, 0x32, 0xbe, 0x8a, 0xc9, 0x34, + 0xb9, 0xcf, 0x2c, 0x88, 0x4c, 0x2d, 0x13, 0xf3, 0xd0, 0x00, 0x6a, 0x71, 0x36, 0x84, 0x95, 0xf2, + 0x56, 0x16, 0xc5, 0x9c, 0xad, 0xe2, 0x9c, 0xf9, 0x90, 0x67, 0x49, 0x8c, 0x8d, 0xa5, 0xf8, 0xcf, + 0x02, 0xad, 0x80, 0x4c, 0x3c, 0xa5, 0xd2, 0x96, 0xba, 0x0b, 0x86, 0x4c, 0xbc, 0xc1, 0x56, 0x91, + 0x4c, 0x53, 0x90, 0xe1, 0x8c, 0x59, 0x01, 0x4e, 0xac, 0xbc, 0xad, 0xf3, 0x51, 0x86, 0x4a, 0x76, + 0x74, 0xb4, 0x01, 0x90, 0xba, 0xf1, 0xcc, 0x09, 0x70, 0x92, 0x23, 0xae, 0x72, 0xc6, 0xc6, 0x42, + 0x40, 0xff, 0x43, 0x25, 0x6d, 0x24, 0x9e, 0x22, 0x67, 0xf4, 0x03, 0x9c, 0x0c, 0xbd, 0x7f, 0xd8, + 0x94, 0x1f, 0x61, 0xb3, 0x0b, 0x6b, 0xef, 0x49, 0x64, 0x5f, 0x90, 0x0f, 0xd8, 0xb3, 0xe6, 0x28, + 0x65, 0x04, 0x9a, 0x0f, 0xee, 0x7e, 0x01, 0x57, 0x0f, 0x1a, 0x01, 0x4e, 0x7c, 0x1c, 0xcd, 0xb7, + 0x2c, 0x8a, 0x96, 0xd5, 0xcc, 0x2a, 0xe6, 0x37, 0x00, 0xee, 0xc9, 0x3d, 0x50, 0xa8, 0xe6, 0xca, + 0xd0, 0x1b, 0x3c, 0x29, 0xc2, 0xa8, 0x15, 0x61, 0x6c, 0x07, 0xd0, 0x78, 0xe4, 0xfa, 0xd1, 0x53, + 0x68, 0x9d, 0x99, 0xa6, 0x35, 0xd2, 0xcf, 0xad, 0xb1, 0xf1, 0xe6, 0x40, 0x37, 0x4d, 0x6b, 0xac, + 0x9f, 0x1e, 0x0e, 0x4f, 0x8f, 0xeb, 0xa5, 0xc7, 0x4c, 0xf3, 0xed, 0x41, 0xfa, 0xaf, 0x4b, 0x68, + 0x1d, 0xd6, 0xfe, 0x36, 0x8f, 0xf6, 0x86, 0xaf, 0xf5, 0xc3, 0xba, 0xbc, 0xbd, 0x07, 0x2b, 0xf3, + 0x77, 0x88, 0xd6, 0x00, 0xa5, 0xe9, 0xfb, 0xe4, 0x48, 0x3f, 0x3f, 0xd6, 0x4f, 0xeb, 0x25, 0xd4, + 0x82, 0x46, 0x51, 0x37, 0xf4, 0x23, 0x43, 0x37, 0x4f, 0xea, 0xd2, 0xfe, 0xe8, 0xdb, 0xad, 0x2a, + 0xdd, 0xdc, 0xaa, 0xd2, 0x8f, 0x5b, 0x55, 0xfa, 0x7c, 0xa7, 0x96, 0x6e, 0xee, 0xd4, 0xd2, 0xf7, + 0x3b, 0xb5, 0xf4, 0xae, 0xef, 0x13, 0x3e, 0x99, 0x39, 0x3d, 0x97, 0x86, 0x5a, 0x3c, 0x63, 0x13, + 0x77, 0x62, 0x93, 0x48, 0x54, 0x3b, 0xa2, 0xdc, 0x89, 0xa8, 0x87, 0xb5, 0x2b, 0x2d, 0x3b, 0x7e, + 0xfa, 0x9e, 0x9d, 0x8a, 0x78, 0x65, 0x2f, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x82, 0xa9, + 0xa4, 0xe7, 0x03, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { From fa9493fbef202bcaf80cb774883432efe901c6e0 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 10:27:07 +0530 Subject: [PATCH 075/105] feat: mitigated ballot unique key by hashing whole inbound --- x/uexecutor/keeper/execute_inbound_funds.go | 2 +- .../keeper/execute_inbound_funds_and_payload.go | 2 +- x/uexecutor/keeper/execute_inbound_gas.go | 2 +- x/uexecutor/keeper/execute_inbound_gas_and_payload.go | 2 +- x/uexecutor/keeper/inbound.go | 6 +++--- x/uexecutor/keeper/msg_vote_inbound.go | 8 +++----- x/uexecutor/keeper/voting.go | 5 ++++- x/uexecutor/types/keys.go | 10 +++++++++- 8 files changed, 23 insertions(+), 14 deletions(-) diff --git a/x/uexecutor/keeper/execute_inbound_funds.go b/x/uexecutor/keeper/execute_inbound_funds.go index 8f901086..ef828dd7 100644 --- a/x/uexecutor/keeper/execute_inbound_funds.go +++ b/x/uexecutor/keeper/execute_inbound_funds.go @@ -20,7 +20,7 @@ func (k Keeper) ExecuteInboundFunds(ctx context.Context, utx types.UniversalTx) ) _, ueModuleAddressStr := k.GetUeModuleAddress(ctx) - universalTxKey := types.GetInboundKey(*utx.InboundTx) + universalTxKey := types.GetInboundUniversalTxKey(*utx.InboundTx) updateErr := k.UpdateUniversalTx(ctx, universalTxKey, func(utx *types.UniversalTx) error { pcTx := types.PCTx{ TxHash: "", // no hash if depositPRC20 failed diff --git a/x/uexecutor/keeper/execute_inbound_funds_and_payload.go b/x/uexecutor/keeper/execute_inbound_funds_and_payload.go index a64fa751..6b3e6520 100644 --- a/x/uexecutor/keeper/execute_inbound_funds_and_payload.go +++ b/x/uexecutor/keeper/execute_inbound_funds_and_payload.go @@ -14,7 +14,7 @@ import ( func (k Keeper) ExecuteInboundFundsAndPayload(ctx context.Context, utx types.UniversalTx) error { sdkCtx := sdk.UnwrapSDKContext(ctx) _, ueModuleAddressStr := k.GetUeModuleAddress(ctx) - universalTxKey := types.GetInboundKey(*utx.InboundTx) + universalTxKey := types.GetInboundUniversalTxKey(*utx.InboundTx) // Build universalAccountId universalAccountId := types.UniversalAccountId{ diff --git a/x/uexecutor/keeper/execute_inbound_gas.go b/x/uexecutor/keeper/execute_inbound_gas.go index 6180f036..a9c28fcc 100644 --- a/x/uexecutor/keeper/execute_inbound_gas.go +++ b/x/uexecutor/keeper/execute_inbound_gas.go @@ -15,7 +15,7 @@ import ( func (k Keeper) ExecuteInboundGas(ctx context.Context, inbound types.Inbound) error { sdkCtx := sdk.UnwrapSDKContext(ctx) ueModuleAccAddress, ueModuleAddressStr := k.GetUeModuleAddress(ctx) - universalTxKey := types.GetInboundKey(inbound) + universalTxKey := types.GetInboundUniversalTxKey(inbound) // Default pcTx, will be filled along the way pcTx := types.PCTx{ diff --git a/x/uexecutor/keeper/execute_inbound_gas_and_payload.go b/x/uexecutor/keeper/execute_inbound_gas_and_payload.go index 9d85e8a1..9290bf24 100644 --- a/x/uexecutor/keeper/execute_inbound_gas_and_payload.go +++ b/x/uexecutor/keeper/execute_inbound_gas_and_payload.go @@ -15,7 +15,7 @@ import ( func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.UniversalTx) error { sdkCtx := sdk.UnwrapSDKContext(ctx) _, ueModuleAddressStr := k.GetUeModuleAddress(ctx) - universalTxKey := types.GetInboundKey(*utx.InboundTx) + universalTxKey := types.GetInboundUniversalTxKey(*utx.InboundTx) universalAccountId := types.UniversalAccountId{ ChainNamespace: strings.Split(utx.InboundTx.SourceChain, ":")[0], diff --git a/x/uexecutor/keeper/inbound.go b/x/uexecutor/keeper/inbound.go index 20e88cc9..16a45949 100644 --- a/x/uexecutor/keeper/inbound.go +++ b/x/uexecutor/keeper/inbound.go @@ -8,7 +8,7 @@ import ( // AddPendingInbound adds an inbound synthetic to the pending set if not already present func (k Keeper) AddPendingInbound(ctx context.Context, inbound types.Inbound) error { - key := types.GetInboundKey(inbound) + key := types.GetInboundUniversalTxKey(inbound) has, err := k.PendingInbounds.Has(ctx, key) if err != nil { return err @@ -22,12 +22,12 @@ func (k Keeper) AddPendingInbound(ctx context.Context, inbound types.Inbound) er // IsPendingInbound checks if an inbound synthetic is pending func (k Keeper) IsPendingInbound(ctx context.Context, inbound types.Inbound) (bool, error) { - key := types.GetInboundKey(inbound) + key := types.GetInboundUniversalTxKey(inbound) return k.PendingInbounds.Has(ctx, key) } // RemovePendingInbound removes an inbound synthetic from the pending set func (k Keeper) RemovePendingInbound(ctx context.Context, inbound types.Inbound) error { - key := types.GetInboundKey(inbound) + key := types.GetInboundUniversalTxKey(inbound) return k.PendingInbounds.Remove(ctx, key) } diff --git a/x/uexecutor/keeper/msg_vote_inbound.go b/x/uexecutor/keeper/msg_vote_inbound.go index ca6aceae..70c6ec2e 100644 --- a/x/uexecutor/keeper/msg_vote_inbound.go +++ b/x/uexecutor/keeper/msg_vote_inbound.go @@ -14,13 +14,13 @@ import ( func (k Keeper) VoteInbound(ctx context.Context, universalValidator sdk.ValAddress, inbound types.Inbound) error { sdkCtx := sdk.UnwrapSDKContext(ctx) // Step 1: Check if inbound synthetic is there in the UTX - key := types.GetInboundKey(inbound) - found, err := k.HasUniversalTx(ctx, key) + universalTxKey := types.GetInboundUniversalTxKey(inbound) + found, err := k.HasUniversalTx(ctx, universalTxKey) if err != nil { return errors.Wrap(err, "failed to check UniversalTx") } if found { - return fmt.Errorf("universal tx with key %s already exists", key) + return fmt.Errorf("universal tx with key %s already exists", universalTxKey) } // use a temporary context to not commit any ballot state change in case of error @@ -52,8 +52,6 @@ func (k Keeper) VoteInbound(ctx context.Context, universalValidator sdk.ValAddre UniversalStatus: types.UniversalTxStatus_PENDING_INBOUND_EXECUTION, } - universalTxKey := types.GetInboundKey(inbound) - // Step 4: If finalized, create the UniversalTx if err := k.CreateUniversalTx(ctx, universalTxKey, utx); err != nil { return err diff --git a/x/uexecutor/keeper/voting.go b/x/uexecutor/keeper/voting.go index 5af6a909..f728f00c 100644 --- a/x/uexecutor/keeper/voting.go +++ b/x/uexecutor/keeper/voting.go @@ -25,7 +25,10 @@ func (k Keeper) VoteOnInboundBallot( return false, false, fmt.Errorf("inbound tx is not enabled") } - ballotKey := types.GetInboundKey(inbound) + ballotKey, err := types.GetInboundBallotKey(inbound) + if err != nil { + return false, false, err + } universalValidatorSet, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) if err != nil { diff --git a/x/uexecutor/types/keys.go b/x/uexecutor/types/keys.go index 17ad7d36..7c4ce3e4 100755 --- a/x/uexecutor/types/keys.go +++ b/x/uexecutor/types/keys.go @@ -40,8 +40,16 @@ const ( QuerierRoute = ModuleName ) -func GetInboundKey(inbound Inbound) string { +func GetInboundUniversalTxKey(inbound Inbound) string { data := fmt.Sprintf("%s:%s:%s", inbound.SourceChain, inbound.TxHash, inbound.LogIndex) hash := sha256.Sum256([]byte(data)) return hex.EncodeToString(hash[:]) // hash[:] converts [32]byte → []byte } + +func GetInboundBallotKey(inbound Inbound) (string, error) { + bz, err := inbound.Marshal() + if err != nil { + return "", err + } + return hex.EncodeToString(bz), nil +} From 7629624203a2a061500c878fcb16f4abfa4b5661 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 10:34:24 +0530 Subject: [PATCH 076/105] feat: mitigated tss ballot unique key --- x/utss/keeper/voting.go | 6 +++--- x/utss/types/keys.go | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/x/utss/keeper/voting.go b/x/utss/keeper/voting.go index 6163ac1f..8748491c 100644 --- a/x/utss/keeper/voting.go +++ b/x/utss/keeper/voting.go @@ -5,7 +5,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/pushchain/push-chain-node/x/uexecutor/types" + "github.com/pushchain/push-chain-node/x/utss/types" uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" ) @@ -13,13 +13,13 @@ func (k Keeper) VoteOnTssBallot( ctx context.Context, universalValidator sdk.ValAddress, processId uint64, - keyId string, + tssPubKey, keyId string, ) (isFinalized bool, isNew bool, err error) { sdkCtx := sdk.UnwrapSDKContext(ctx) - ballotKey := keyId + ballotKey := types.GetTssBallotKey(processId, tssPubKey, keyId) universalValidatorSet, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) if err != nil { diff --git a/x/utss/types/keys.go b/x/utss/types/keys.go index ccbb787a..b92d09c7 100755 --- a/x/utss/types/keys.go +++ b/x/utss/types/keys.go @@ -1,6 +1,10 @@ package types import ( + "crypto/sha256" + "encoding/hex" + "fmt" + "cosmossdk.io/collections" ) @@ -49,3 +53,9 @@ const ( QuerierRoute = ModuleName ) + +func GetTssBallotKey(processId uint64, tssPubKey, keyId string) string { + canonical := fmt.Sprintf("%d:%s:%s", processId, tssPubKey, keyId) + h := sha256.Sum256([]byte(canonical)) + return hex.EncodeToString(h[:]) +} From 825ca41bacd5180daa6ac636da3af7b037f23543 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 12:17:40 +0530 Subject: [PATCH 077/105] feat: added integration test for initiate tss key and removed process id from voting --- api/utss/v1/tx.pulsar.go | 138 +++++------------ proto/utss/v1/tx.proto | 5 +- .../inbound_synthetic_bridge_payload_test.go | 4 +- .../utss/initiate_tss_key_process_test.go | 143 ++++++++++++++++++ test/utils/setup_app.go | 7 + x/utss/keeper/initiate_tss_key_process.go | 2 +- x/utss/keeper/msg_server.go | 2 +- x/utss/keeper/msg_vote_tss_key_process.go | 40 ++--- x/utss/keeper/tss_key_process.go | 2 +- x/utss/keeper/tss_key_process_test.go | 116 ++++++++++++++ x/utss/keeper/tss_key_test.go | 66 ++++++++ x/utss/keeper/voting.go | 17 ++- x/utss/types/tss_key_process.go | 7 +- x/utss/types/tx.pb.go | 116 +++++--------- 14 files changed, 455 insertions(+), 210 deletions(-) create mode 100644 test/integration/utss/initiate_tss_key_process_test.go create mode 100644 x/utss/keeper/tss_key_process_test.go create mode 100644 x/utss/keeper/tss_key_test.go diff --git a/api/utss/v1/tx.pulsar.go b/api/utss/v1/tx.pulsar.go index 81f6929c..4bf5abef 100644 --- a/api/utss/v1/tx.pulsar.go +++ b/api/utss/v1/tx.pulsar.go @@ -1698,7 +1698,6 @@ func (x *fastReflection_MsgInitiateTssKeyProcessResponse) ProtoMethods() *protoi var ( md_MsgVoteTssKeyProcess protoreflect.MessageDescriptor fd_MsgVoteTssKeyProcess_signer protoreflect.FieldDescriptor - fd_MsgVoteTssKeyProcess_process_id protoreflect.FieldDescriptor fd_MsgVoteTssKeyProcess_tss_pubkey protoreflect.FieldDescriptor fd_MsgVoteTssKeyProcess_key_id protoreflect.FieldDescriptor ) @@ -1707,7 +1706,6 @@ func init() { file_utss_v1_tx_proto_init() md_MsgVoteTssKeyProcess = File_utss_v1_tx_proto.Messages().ByName("MsgVoteTssKeyProcess") fd_MsgVoteTssKeyProcess_signer = md_MsgVoteTssKeyProcess.Fields().ByName("signer") - fd_MsgVoteTssKeyProcess_process_id = md_MsgVoteTssKeyProcess.Fields().ByName("process_id") fd_MsgVoteTssKeyProcess_tss_pubkey = md_MsgVoteTssKeyProcess.Fields().ByName("tss_pubkey") fd_MsgVoteTssKeyProcess_key_id = md_MsgVoteTssKeyProcess.Fields().ByName("key_id") } @@ -1783,12 +1781,6 @@ func (x *fastReflection_MsgVoteTssKeyProcess) Range(f func(protoreflect.FieldDes return } } - if x.ProcessId != uint64(0) { - value := protoreflect.ValueOfUint64(x.ProcessId) - if !f(fd_MsgVoteTssKeyProcess_process_id, value) { - return - } - } if x.TssPubkey != "" { value := protoreflect.ValueOfString(x.TssPubkey) if !f(fd_MsgVoteTssKeyProcess_tss_pubkey, value) { @@ -1818,8 +1810,6 @@ func (x *fastReflection_MsgVoteTssKeyProcess) Has(fd protoreflect.FieldDescripto switch fd.FullName() { case "utss.v1.MsgVoteTssKeyProcess.signer": return x.Signer != "" - case "utss.v1.MsgVoteTssKeyProcess.process_id": - return x.ProcessId != uint64(0) case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": return x.TssPubkey != "" case "utss.v1.MsgVoteTssKeyProcess.key_id": @@ -1842,8 +1832,6 @@ func (x *fastReflection_MsgVoteTssKeyProcess) Clear(fd protoreflect.FieldDescrip switch fd.FullName() { case "utss.v1.MsgVoteTssKeyProcess.signer": x.Signer = "" - case "utss.v1.MsgVoteTssKeyProcess.process_id": - x.ProcessId = uint64(0) case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": x.TssPubkey = "" case "utss.v1.MsgVoteTssKeyProcess.key_id": @@ -1867,9 +1855,6 @@ func (x *fastReflection_MsgVoteTssKeyProcess) Get(descriptor protoreflect.FieldD case "utss.v1.MsgVoteTssKeyProcess.signer": value := x.Signer return protoreflect.ValueOfString(value) - case "utss.v1.MsgVoteTssKeyProcess.process_id": - value := x.ProcessId - return protoreflect.ValueOfUint64(value) case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": value := x.TssPubkey return protoreflect.ValueOfString(value) @@ -1898,8 +1883,6 @@ func (x *fastReflection_MsgVoteTssKeyProcess) Set(fd protoreflect.FieldDescripto switch fd.FullName() { case "utss.v1.MsgVoteTssKeyProcess.signer": x.Signer = value.Interface().(string) - case "utss.v1.MsgVoteTssKeyProcess.process_id": - x.ProcessId = value.Uint() case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": x.TssPubkey = value.Interface().(string) case "utss.v1.MsgVoteTssKeyProcess.key_id": @@ -1926,8 +1909,6 @@ func (x *fastReflection_MsgVoteTssKeyProcess) Mutable(fd protoreflect.FieldDescr switch fd.FullName() { case "utss.v1.MsgVoteTssKeyProcess.signer": panic(fmt.Errorf("field signer of message utss.v1.MsgVoteTssKeyProcess is not mutable")) - case "utss.v1.MsgVoteTssKeyProcess.process_id": - panic(fmt.Errorf("field process_id of message utss.v1.MsgVoteTssKeyProcess is not mutable")) case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": panic(fmt.Errorf("field tss_pubkey of message utss.v1.MsgVoteTssKeyProcess is not mutable")) case "utss.v1.MsgVoteTssKeyProcess.key_id": @@ -1947,8 +1928,6 @@ func (x *fastReflection_MsgVoteTssKeyProcess) NewField(fd protoreflect.FieldDesc switch fd.FullName() { case "utss.v1.MsgVoteTssKeyProcess.signer": return protoreflect.ValueOfString("") - case "utss.v1.MsgVoteTssKeyProcess.process_id": - return protoreflect.ValueOfUint64(uint64(0)) case "utss.v1.MsgVoteTssKeyProcess.tss_pubkey": return protoreflect.ValueOfString("") case "utss.v1.MsgVoteTssKeyProcess.key_id": @@ -2026,9 +2005,6 @@ func (x *fastReflection_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.ProcessId != 0 { - n += 1 + runtime.Sov(uint64(x.ProcessId)) - } l = len(x.TssPubkey) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -2071,19 +2047,14 @@ func (x *fastReflection_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods copy(dAtA[i:], x.KeyId) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyId))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if len(x.TssPubkey) > 0 { i -= len(x.TssPubkey) copy(dAtA[i:], x.TssPubkey) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TssPubkey))) i-- - dAtA[i] = 0x1a - } - if x.ProcessId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ProcessId)) - i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } if len(x.Signer) > 0 { i -= len(x.Signer) @@ -2174,25 +2145,6 @@ func (x *fastReflection_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods x.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) - } - x.ProcessId = 0 - 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++ - x.ProcessId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", wireType) } @@ -2224,7 +2176,7 @@ func (x *fastReflection_MsgVoteTssKeyProcess) ProtoMethods() *protoiface.Methods } x.TssPubkey = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) } @@ -2817,9 +2769,8 @@ type MsgVoteTssKeyProcess struct { unknownFields protoimpl.UnknownFields Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - ProcessId uint64 `protobuf:"varint,2,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` // id of the process - TssPubkey string `protobuf:"bytes,3,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` - KeyId string `protobuf:"bytes,4,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + TssPubkey string `protobuf:"bytes,2,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` + KeyId string `protobuf:"bytes,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` } func (x *MsgVoteTssKeyProcess) Reset() { @@ -2849,13 +2800,6 @@ func (x *MsgVoteTssKeyProcess) GetSigner() string { return "" } -func (x *MsgVoteTssKeyProcess) GetProcessId() uint64 { - if x != nil { - return x.ProcessId - } - return 0 -} - func (x *MsgVoteTssKeyProcess) GetTssPubkey() string { if x != nil { return x.TssPubkey @@ -2933,49 +2877,47 @@ var file_utss_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x14, 0x4d, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa9, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, - 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, 0x73, 0x50, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x06, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x74, 0x73, 0x73, 0x2f, + 0x67, 0x6e, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, 0x73, 0x50, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x74, 0x73, 0x73, + 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, + 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9a, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4a, 0x0a, + 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x2e, + 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x15, 0x49, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x1a, 0x29, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, + 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x59, 0x0a, 0x11, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, - 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9a, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x4a, 0x0a, 0x0c, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x18, 0x2e, 0x75, - 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x15, 0x49, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x1a, 0x29, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, - 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x59, 0x0a, 0x11, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x63, 0x65, 0x73, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, - 0x65, 0x73, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x56, 0x6f, 0x74, 0x65, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, - 0x01, 0x42, 0x8c, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, - 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, - 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, - 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, - 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, + 0x2a, 0x01, 0x42, 0x8c, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, + 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, + 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/utss/v1/tx.proto b/proto/utss/v1/tx.proto index 1f19bcb2..4b2ac7cc 100755 --- a/proto/utss/v1/tx.proto +++ b/proto/utss/v1/tx.proto @@ -65,9 +65,8 @@ message MsgVoteTssKeyProcess { option (cosmos.msg.v1.signer) = "signer"; string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; ; // universal validator address - uint64 process_id = 2; // id of the process - string tss_pubkey = 3; - string key_id = 4; + string tss_pubkey = 2; + string key_id = 3; } message MsgVoteTssKeyProcessResponse {} \ No newline at end of file diff --git a/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go b/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go index 986e127b..57fd7886 100644 --- a/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go +++ b/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go @@ -223,7 +223,7 @@ func TestInboundSyntheticBridgePayload(t *testing.T) { require.NoError(t, err) // Now check UniversalTx state - utxKey := uexecutortypes.GetInboundKey(*invalidInbound) + utxKey := uexecutortypes.GetInboundUniversalTxKey(*invalidInbound) utx, found, err := app.UexecutorKeeper.GetUniversalTx(ctx, utxKey) require.NoError(t, err) require.True(t, found, "universal tx should exist after quorum is reached") @@ -301,7 +301,7 @@ func TestInboundSyntheticBridgePayload(t *testing.T) { } // Get the universal tx - utxKey := uexecutortypes.GetInboundKey(*inbound) + utxKey := uexecutortypes.GetInboundUniversalTxKey(*inbound) utx, found, err := app.UexecutorKeeper.GetUniversalTx(ctx, utxKey) require.NoError(t, err) require.True(t, found) diff --git a/test/integration/utss/initiate_tss_key_process_test.go b/test/integration/utss/initiate_tss_key_process_test.go new file mode 100644 index 00000000..503d1545 --- /dev/null +++ b/test/integration/utss/initiate_tss_key_process_test.go @@ -0,0 +1,143 @@ +package integrationtest + +import ( + "fmt" + "strconv" + "testing" + + "cosmossdk.io/collections" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/app" + utils "github.com/pushchain/push-chain-node/test/utils" + + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// setupTssKeyProcessTest initializes app, context, and validators +func setupTssKeyProcessTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []string) { + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) + + // register them as universal validators (eligible) + universalVals := make([]string, len(validators)) + for i, val := range validators { + coreValAddr := val.OperatorAddress + pubkey := "pubkey-tss-" + coreValAddr + network := uvalidatortypes.NetworkInfo{Ip: "192.168.1." + string(rune(i+1))} + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) + require.NoError(t, err) + + // Finalize the auto-initiated TSS process BEFORE next validator is added + finalizeAutoInitiatedTssProcess(t, app, ctx, pubkey, "Key-id-tss-"+strconv.Itoa(i)) + universalVals[i] = coreValAddr + } + + return app, ctx, universalVals +} + +func finalizeAutoInitiatedTssProcess(t *testing.T, app *app.ChainApp, ctx sdk.Context, pubKey, keyId string) { + // Step 1: check if a process exists + _, err := app.UtssKeeper.CurrentTssProcess.Get(ctx) + if err != nil { + return // nothing to finalize + } + + // Step 2: get current eligible voters + voters, err := app.UvalidatorKeeper.GetEligibleVoters(ctx) + require.NoError(t, err) + + // Step 3: cast votes until process finalizes + for _, uv := range voters { + coreVal := uv.IdentifyInfo.CoreValidatorAddress + valAddr, err := sdk.ValAddressFromBech32(coreVal) + require.NoError(t, err) + + // This triggers your normal Vote flow and internally finalizes when quorum reached + err = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pubKey, keyId) + require.NoError(t, err) + + // Step 4: Check if finalized now + p, err := app.UtssKeeper.CurrentTssProcess.Get(ctx) + if err != nil || p.Status == utsstypes.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS { + return + } + } +} + +func TestInitiateTssKeyProcess(t *testing.T) { + t.Run("Successfully initiates new keygen process", func(t *testing.T) { + app, ctx, _ := setupTssKeyProcessTest(t, 4) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + current, err := app.UtssKeeper.CurrentTssProcess.Get(ctx) + fmt.Println(current) + require.NoError(t, err) + require.Equal(t, utsstypes.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING, current.Status) + require.Equal(t, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN, current.ProcessType) + require.NotZero(t, current.Id) + require.NotEmpty(t, current.Participants) + }) + + t.Run("Fails when active process already exists", func(t *testing.T) { + app, ctx, _ := setupTssKeyProcessTest(t, 3) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + // simulate that process still active (same block height) + err = app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_REFRESH) + require.ErrorContains(t, err, "active TSS process already exists") + }) + + t.Run("Allows new process after expiry height", func(t *testing.T) { + app, ctx, _ := setupTssKeyProcessTest(t, 2) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + current, err := app.UtssKeeper.CurrentTssProcess.Get(ctx) + fmt.Println(current) + + // move block height beyond expiry + ctx = ctx.WithBlockHeight(int64(utsstypes.DefaultTssProcessExpiryAfterBlocks) + 100) + + err = app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_REFRESH) + require.NoError(t, err) + + current, err = app.UtssKeeper.CurrentTssProcess.Get(ctx) + require.NoError(t, err) + require.Equal(t, utsstypes.TssProcessType_TSS_PROCESS_REFRESH, current.ProcessType) + }) + + t.Run("Fails if eligible validators cannot be fetched", func(t *testing.T) { + app, ctx, _ := setupTssKeyProcessTest(t, 1) + + // corrupt the uvalidator keeper mock or clear state + app.UvalidatorKeeper.UniversalValidatorSet.Clear(ctx, collections.Ranger[sdk.ValAddress](nil)) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.ErrorContains(t, err, "invalid tss process: participants list cannot be empty") + }) + + t.Run("Emits correct event on initiation", func(t *testing.T) { + universalValsNum := 3 + app, ctx, _ := setupTssKeyProcessTest(t, universalValsNum) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + events := ctx.EventManager().Events() + require.NotEmpty(t, events) + + last := events[len(events)-1] + require.Equal(t, utsstypes.EventTypeTssProcessInitiated, last.Type) + + pid := last.Attributes[0].Value + require.Equal(t, strconv.Itoa(universalValsNum), pid) + + }) +} diff --git a/test/utils/setup_app.go b/test/utils/setup_app.go index e9fa8e98..2c832db5 100644 --- a/test/utils/setup_app.go +++ b/test/utils/setup_app.go @@ -36,6 +36,10 @@ func SetAppWithValidators(t *testing.T) (*app.ChainApp, sdk.Context, sdk.Account app := SetupApp(t) ctx := app.BaseApp.NewContext(true) + + // start with block height 1 + ctx = ctx.WithBlockHeight(1) + //configure EVM params for PUSH0 opcode configureEVMParams(app, ctx) @@ -60,6 +64,9 @@ func SetAppWithMultipleValidators(t *testing.T, numVals int) (*app.ChainApp, sdk ctx := app.BaseApp.NewContext(true) + // start with block height 1 + ctx = ctx.WithBlockHeight(1) + params, err := app.StakingKeeper.GetParams(ctx) require.NoError(t, err) params.BondDenom = "upc" // must match your token denom diff --git a/x/utss/keeper/initiate_tss_key_process.go b/x/utss/keeper/initiate_tss_key_process.go index 7e82786a..4ac36dee 100644 --- a/x/utss/keeper/initiate_tss_key_process.go +++ b/x/utss/keeper/initiate_tss_key_process.go @@ -48,7 +48,7 @@ func (k Keeper) InitiateTssKeyProcess( Status: types.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING, Participants: universalValidatorSetStrs, BlockHeight: sdkCtx.BlockHeight(), - ExpiryHeight: int64(types.DefaultTssProcessExpiryAfterBlocks), + ExpiryHeight: sdkCtx.BlockHeight() + int64(types.DefaultTssProcessExpiryAfterBlocks), ProcessType: processType, Id: processID, } diff --git a/x/utss/keeper/msg_server.go b/x/utss/keeper/msg_server.go index 7b186572..79d82903 100755 --- a/x/utss/keeper/msg_server.go +++ b/x/utss/keeper/msg_server.go @@ -84,7 +84,7 @@ func (ms msgServer) VoteTssKeyProcess(ctx context.Context, msg *types.MsgVoteTss return nil, fmt.Errorf("universal validator for signer %s is tombstoned", msg.Signer) } - err = ms.k.VoteTssKeyProcess(ctx, signerValAddr, msg.ProcessId, msg.TssPubkey, msg.KeyId) + err = ms.k.VoteTssKeyProcess(ctx, signerValAddr, msg.TssPubkey, msg.KeyId) if err != nil { return nil, err } diff --git a/x/utss/keeper/msg_vote_tss_key_process.go b/x/utss/keeper/msg_vote_tss_key_process.go index a411bea9..81077247 100644 --- a/x/utss/keeper/msg_vote_tss_key_process.go +++ b/x/utss/keeper/msg_vote_tss_key_process.go @@ -14,11 +14,21 @@ import ( func (k Keeper) VoteTssKeyProcess( ctx context.Context, universalValidator sdk.ValAddress, - processId uint64, tssPubKey, keyId string, ) error { sdkCtx := sdk.UnwrapSDKContext(ctx) + process, err := k.CurrentTssProcess.Get(ctx) + if err != nil { + return fmt.Errorf("no active TSS process running") + } + + processId := process.Id + + if sdkCtx.BlockHeight() >= process.ExpiryHeight { + return fmt.Errorf("TSS process %d has expired", process.Id) + } + // Step 1: Ensure the key doesn't already exist _, found, err := k.GetTssKeyByID(ctx, keyId) if err != nil { @@ -30,7 +40,7 @@ func (k Keeper) VoteTssKeyProcess( // Step 2: Vote on the ballot (using a cache context so we don’t mutate state on failure) tmpCtx, commit := sdkCtx.CacheContext() - isFinalized, _, err := k.VoteOnTssBallot(tmpCtx, universalValidator, processId, keyId) + isFinalized, _, err := k.VoteOnTssBallot(tmpCtx, universalValidator, processId, tssPubKey, keyId) if err != nil { return errors.Wrap(err, "failed to vote on TSS ballot") } @@ -43,21 +53,13 @@ func (k Keeper) VoteTssKeyProcess( return nil } - // Step 4: Mark process as successful - process, found, err := k.GetTssKeyProcessByID(ctx, processId) - if err != nil { - return errors.Wrap(err, "failed to fetch TSS process") - } - if !found { - return fmt.Errorf("TSS process %d not found", processId) - } process.Status = types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS // Step 5: Ballot finalized — create the TssKey record tssKey := types.TssKey{ TssPubkey: tssPubKey, KeyId: keyId, - Participants: []string{universalValidator.String()}, + Participants: process.Participants, FinalizedBlockHeight: sdkCtx.BlockHeight(), KeygenBlockHeight: process.BlockHeight, ProcessId: processId, @@ -70,11 +72,8 @@ func (k Keeper) VoteTssKeyProcess( if err := k.TssKeyHistory.Set(ctx, keyId, tssKey); err != nil { return errors.Wrap(err, "failed to store TSS key history") } - if err := k.CurrentTssProcess.Remove(ctx); err != nil { - return errors.Wrap(err, "failed to clear current TSS process") - } - if err := k.ProcessHistory.Set(ctx, processId, process); err != nil { - return errors.Wrap(err, "failed to archive TSS process") + if err := k.FinalizeTssKeyProcess(ctx, processId, types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS); err != nil { + return errors.Wrap(err, "failed to finalise TSS process") } universalValidatorSet, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) @@ -94,12 +93,17 @@ func (k Keeper) VoteTssKeyProcess( } } + valAddr, err := sdk.ValAddressFromBech32(coreValidatorAddress) + if err != nil { + return err + } + // update pending_join validator to active switch uv.LifecycleInfo.CurrentStatus { case uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN: if foundInParticipants { uv.LifecycleInfo.CurrentStatus = uvalidatortypes.UVStatus_UV_STATUS_ACTIVE - if err := k.uvalidatorKeeper.UpdateValidatorStatus(ctx, sdk.ValAddress(coreValidatorAddress), uvalidatortypes.UVStatus_UV_STATUS_ACTIVE); err != nil { + if err := k.uvalidatorKeeper.UpdateValidatorStatus(ctx, valAddr, uvalidatortypes.UVStatus_UV_STATUS_ACTIVE); err != nil { k.logger.Error("failed to activate universal validator", "valAddr", coreValidatorAddress, "err", err) } } @@ -107,7 +111,7 @@ func (k Keeper) VoteTssKeyProcess( case uvalidatortypes.UVStatus_UV_STATUS_PENDING_LEAVE: if !foundInParticipants { uv.LifecycleInfo.CurrentStatus = uvalidatortypes.UVStatus_UV_STATUS_INACTIVE - if err := k.uvalidatorKeeper.UpdateValidatorStatus(ctx, sdk.ValAddress(coreValidatorAddress), uvalidatortypes.UVStatus_UV_STATUS_INACTIVE); err != nil { + if err := k.uvalidatorKeeper.UpdateValidatorStatus(ctx, valAddr, uvalidatortypes.UVStatus_UV_STATUS_INACTIVE); err != nil { k.logger.Error("failed to inactivate universal validator", "valAddr", coreValidatorAddress, "err", err) } } diff --git a/x/utss/keeper/tss_key_process.go b/x/utss/keeper/tss_key_process.go index 56b6c37b..328cc496 100644 --- a/x/utss/keeper/tss_key_process.go +++ b/x/utss/keeper/tss_key_process.go @@ -28,7 +28,7 @@ func (k Keeper) FinalizeTssKeyProcess(ctx context.Context, processID uint64, sta } } - k.Logger().Info("✅ TSS process finalized", "id", processID, "status", status.String()) + k.Logger().Info("TSS process finalized", "id", processID, "status", status.String()) return nil } diff --git a/x/utss/keeper/tss_key_process_test.go b/x/utss/keeper/tss_key_process_test.go new file mode 100644 index 00000000..300eb8f5 --- /dev/null +++ b/x/utss/keeper/tss_key_process_test.go @@ -0,0 +1,116 @@ +package keeper_test + +import ( + "testing" + + "github.com/pushchain/push-chain-node/x/utss/types" + "github.com/stretchr/testify/require" +) + +func TestFinalizeTssKeyProcess(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + process := types.TssKeyProcess{ + Id: 1, + Status: types.TssKeyProcessStatus_TSS_KEY_PROCESS_PENDING, + Participants: []string{"val1", "val2"}, + BlockHeight: 100, + ExpiryHeight: 200, + ProcessType: types.TssProcessType_TSS_PROCESS_KEYGEN, + } + + // Store a pending process + err := f.k.ProcessHistory.Set(ctx, process.Id, process) + require.NoError(t, err) + + // Set this as the current process + err = f.k.CurrentTssProcess.Set(ctx, process) + require.NoError(t, err) + + // Finalize with SUCCESS + err = f.k.FinalizeTssKeyProcess(ctx, process.Id, types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS) + require.NoError(t, err) + + // Check ProcessHistory updated + got, found, err := f.k.GetTssKeyProcessByID(ctx, process.Id) + require.NoError(t, err) + require.True(t, found) + require.Equal(t, types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS, got.Status) + + // Ensure current process is removed after finalize + _, err = f.k.CurrentTssProcess.Get(ctx) + require.Error(t, err) +} + +func TestFinalizeTssKeyProcess_NotFound(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + err := f.k.FinalizeTssKeyProcess(ctx, 999, types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS) + require.ErrorContains(t, err, "not found") +} + +func TestGetTssKeyProcessByID(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + proc := types.TssKeyProcess{ + Id: 2, + Status: types.TssKeyProcessStatus_TSS_KEY_PROCESS_SUCCESS, + ProcessType: types.TssProcessType_TSS_PROCESS_KEYGEN, + } + err := f.k.ProcessHistory.Set(ctx, proc.Id, proc) + require.NoError(t, err) + + got, found, err := f.k.GetTssKeyProcessByID(ctx, proc.Id) + require.NoError(t, err) + require.True(t, found) + require.Equal(t, proc.Status, got.Status) + require.Equal(t, proc.ProcessType, got.ProcessType) +} + +func TestGetTssKeyProcessByID_NotFound(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + _, found, err := f.k.GetTssKeyProcessByID(ctx, 42) + require.NoError(t, err) + require.False(t, found) +} + +func TestGetCurrentTssParticipants(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + proc := types.TssKeyProcess{ + Id: 10, + Participants: []string{"alice", "bob"}, + ExpiryHeight: 5, + BlockHeight: 1, + ProcessType: types.TssProcessType_TSS_PROCESS_KEYGEN, + } + err := f.k.CurrentTssProcess.Set(ctx, proc) + require.NoError(t, err) + + // Case 1: blockHeight < ExpiryHeight → return empty + f.ctx = f.ctx.WithBlockHeight(3) + participants, err := f.k.GetCurrentTssParticipants(f.ctx) + require.NoError(t, err) + require.Empty(t, participants) + + // Case 2: blockHeight > ExpiryHeight → return participants + f.ctx = f.ctx.WithBlockHeight(10) + participants, err = f.k.GetCurrentTssParticipants(f.ctx) + require.NoError(t, err) + require.Equal(t, []string{"alice", "bob"}, participants) +} + +func TestGetCurrentTssParticipants_NotFound(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + participants, err := f.k.GetCurrentTssParticipants(ctx) + require.NoError(t, err) + require.Empty(t, participants) +} diff --git a/x/utss/keeper/tss_key_test.go b/x/utss/keeper/tss_key_test.go new file mode 100644 index 00000000..6fed5c01 --- /dev/null +++ b/x/utss/keeper/tss_key_test.go @@ -0,0 +1,66 @@ +package keeper_test + +import ( + "testing" + + "github.com/pushchain/push-chain-node/x/utss/types" + "github.com/stretchr/testify/require" +) + +func TestSetAndGetCurrentTssKey(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + key := types.TssKey{ + KeyId: "tss-key-001", + TssPubkey: "pubkey123", + Participants: []string{"validator1", "validator2"}, + KeygenBlockHeight: 1, + FinalizedBlockHeight: 2, + ProcessId: 1, + } + + // Set key + err := f.k.SetCurrentTssKey(ctx, key) + require.NoError(t, err) + + // Get key + got, found, err := f.k.GetCurrentTssKey(ctx) + require.NoError(t, err) + require.True(t, found) + require.Equal(t, key.KeyId, got.KeyId) + require.Equal(t, key.TssPubkey, got.TssPubkey) +} + +func TestGetTssKeyByID(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + key := types.TssKey{ + KeyId: "key-abc", + TssPubkey: "pub123", + Participants: []string{"validator1", "validator2"}, + KeygenBlockHeight: 1, + FinalizedBlockHeight: 2, + ProcessId: 1, + } + + err := f.k.SetCurrentTssKey(ctx, key) + require.NoError(t, err) + + got, found, err := f.k.GetTssKeyByID(ctx, "key-abc") + require.NoError(t, err) + require.True(t, found) + require.Equal(t, key.KeyId, got.KeyId) + require.Equal(t, key.TssPubkey, got.TssPubkey) +} + +func TestGetCurrentTssKey_NotFound(t *testing.T) { + f := SetupTest(t) + ctx := f.ctx + + got, found, err := f.k.GetCurrentTssKey(ctx) + require.NoError(t, err) + require.False(t, found) + require.Empty(t, got.KeyId) +} diff --git a/x/utss/keeper/voting.go b/x/utss/keeper/voting.go index 8748491c..88934552 100644 --- a/x/utss/keeper/voting.go +++ b/x/utss/keeper/voting.go @@ -28,10 +28,19 @@ func (k Keeper) VoteOnTssBallot( // Check if a current process exists and is still active (not expired and pending) existing, err := k.CurrentTssProcess.Get(ctx) - if err == nil { - if sdkCtx.BlockHeight() < existing.ExpiryHeight { - return false, false, fmt.Errorf("an active TSS process already exists (id: %d)", existing.Id) - } + if err != nil { + return false, false, fmt.Errorf("no active TSS process") + } + + if existing.Id != processId { + return false, false, fmt.Errorf( + "invalid vote: active process is %d, got %d", + existing.Id, processId, + ) + } + + if sdkCtx.BlockHeight() >= existing.ExpiryHeight { + return false, false, fmt.Errorf("process expired") } expiryHeight := existing.ExpiryHeight diff --git a/x/utss/types/tss_key_process.go b/x/utss/types/tss_key_process.go index 811fae76..a03a103a 100644 --- a/x/utss/types/tss_key_process.go +++ b/x/utss/types/tss_key_process.go @@ -30,7 +30,7 @@ func (p TssKeyProcess) ValidateBasic() error { } // Validate block height - if p.BlockHeight <= 0 { + if p.BlockHeight < 0 { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid block height: %d", p.BlockHeight) } @@ -51,10 +51,5 @@ func (p TssKeyProcess) ValidateBasic() error { return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid process status: %v", p.Status) } - // Validate ID - if p.Id == 0 { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "process id cannot be zero") - } - return nil } diff --git a/x/utss/types/tx.pb.go b/x/utss/types/tx.pb.go index 1e6df39c..be964f34 100644 --- a/x/utss/types/tx.pb.go +++ b/x/utss/types/tx.pb.go @@ -222,9 +222,8 @@ var xxx_messageInfo_MsgInitiateTssKeyProcessResponse proto.InternalMessageInfo // Universal validator votes on an ongoing TSS key process type MsgVoteTssKeyProcess struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - ProcessId uint64 `protobuf:"varint,2,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"` - TssPubkey string `protobuf:"bytes,3,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` - KeyId string `protobuf:"bytes,4,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` + TssPubkey string `protobuf:"bytes,2,opt,name=tss_pubkey,json=tssPubkey,proto3" json:"tss_pubkey,omitempty"` + KeyId string `protobuf:"bytes,3,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` } func (m *MsgVoteTssKeyProcess) Reset() { *m = MsgVoteTssKeyProcess{} } @@ -267,13 +266,6 @@ func (m *MsgVoteTssKeyProcess) GetSigner() string { return "" } -func (m *MsgVoteTssKeyProcess) GetProcessId() uint64 { - if m != nil { - return m.ProcessId - } - return 0 -} - func (m *MsgVoteTssKeyProcess) GetTssPubkey() string { if m != nil { return m.TssPubkey @@ -336,42 +328,41 @@ func init() { func init() { proto.RegisterFile("utss/v1/tx.proto", fileDescriptor_4dcb8cba4d8073e4) } var fileDescriptor_4dcb8cba4d8073e4 = []byte{ - // 554 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xbf, 0x6f, 0xda, 0x40, - 0x18, 0xc5, 0xf9, 0x41, 0xc5, 0x25, 0x4a, 0x1a, 0x17, 0x84, 0xb1, 0x1a, 0x97, 0x5a, 0xaa, 0x94, - 0x20, 0x61, 0x17, 0x2a, 0x75, 0x60, 0x2b, 0x1b, 0x8d, 0x90, 0x90, 0x4b, 0x2b, 0xb5, 0x0b, 0x32, - 0xf8, 0x74, 0x58, 0xc8, 0x3e, 0xcb, 0xdf, 0x11, 0xc5, 0x5b, 0xd5, 0xa9, 0xea, 0xd4, 0xb9, 0x7f, - 0x05, 0x43, 0x87, 0xfe, 0x09, 0x8c, 0x51, 0xa7, 0x4e, 0x55, 0x05, 0x03, 0xff, 0x46, 0xe5, 0xf3, - 0x19, 0x08, 0x21, 0xcd, 0xd0, 0xc5, 0xfa, 0xee, 0x7d, 0xef, 0x7b, 0x7e, 0xef, 0xee, 0x6c, 0xf4, - 0x70, 0xcc, 0x00, 0xcc, 0xcb, 0x9a, 0xc9, 0xae, 0x8c, 0x20, 0xa4, 0x8c, 0xca, 0x0f, 0x62, 0xc4, - 0xb8, 0xac, 0xa9, 0xc5, 0x01, 0x05, 0x8f, 0x82, 0xe9, 0x01, 0x89, 0x09, 0x1e, 0x90, 0x84, 0xa1, - 0x16, 0xd2, 0x19, 0x82, 0x7d, 0x0c, 0x2e, 0x08, 0xf8, 0xd1, 0x52, 0x2a, 0x0a, 0x70, 0x0a, 0xe6, - 0x09, 0x25, 0x94, 0x97, 0x66, 0x5c, 0x09, 0xb4, 0x94, 0x48, 0xf7, 0x92, 0x46, 0xb2, 0x10, 0xad, - 0x13, 0xdb, 0x73, 0x7d, 0x6a, 0xf2, 0x67, 0x02, 0xe9, 0x9f, 0x25, 0x74, 0xdc, 0x06, 0xf2, 0x36, - 0x70, 0x6c, 0x86, 0x3b, 0x76, 0x68, 0x7b, 0x20, 0xbf, 0x44, 0x39, 0x7b, 0xcc, 0x86, 0x34, 0x74, - 0x59, 0xa4, 0x48, 0x65, 0xe9, 0x2c, 0xd7, 0x54, 0x7e, 0x7e, 0xaf, 0xe6, 0x85, 0xd6, 0x2b, 0xc7, - 0x09, 0x31, 0xc0, 0x1b, 0x16, 0xba, 0x3e, 0xb1, 0x56, 0x54, 0xb9, 0x8a, 0xb2, 0x01, 0x57, 0x50, - 0x76, 0xca, 0xd2, 0xd9, 0x41, 0xfd, 0xd8, 0x10, 0x71, 0x8d, 0x44, 0xb8, 0xb9, 0x37, 0xfd, 0xfd, - 0x24, 0x63, 0x09, 0x52, 0xe3, 0xe8, 0xd3, 0x62, 0x52, 0x59, 0x8d, 0xeb, 0x25, 0x54, 0xdc, 0x70, - 0x62, 0x61, 0x08, 0xa8, 0x0f, 0x58, 0xff, 0x21, 0x21, 0xa5, 0x0d, 0xa4, 0xe5, 0xbb, 0xcc, 0xb5, - 0x19, 0xee, 0x02, 0x5c, 0xe0, 0xa8, 0x13, 0xd2, 0x01, 0x06, 0x90, 0x9f, 0xa3, 0x2c, 0xb8, 0xc4, - 0xc7, 0xe1, 0xbd, 0x5e, 0x05, 0x4f, 0x6e, 0xa0, 0xc3, 0x20, 0x19, 0xee, 0xc5, 0xfb, 0xc9, 0xed, - 0x1e, 0xd5, 0x8b, 0x4b, 0xbb, 0x5d, 0x00, 0x21, 0xde, 0x8d, 0x02, 0x6c, 0x1d, 0x04, 0xab, 0x45, - 0xc3, 0x88, 0x5d, 0x0b, 0xa1, 0x2f, 0x8b, 0x49, 0x45, 0xe3, 0x27, 0xd3, 0x06, 0xf2, 0x8e, 0x32, - 0x9c, 0x1a, 0x5c, 0xb9, 0xd3, 0x75, 0x54, 0xbe, 0xcb, 0xf9, 0x32, 0xde, 0x54, 0x42, 0x79, 0xa1, - 0xf0, 0xbf, 0xd1, 0x4e, 0x11, 0x4a, 0xa3, 0xb9, 0x0e, 0x0f, 0xb6, 0x67, 0xe5, 0x04, 0xd2, 0x72, - 0xe2, 0x36, 0x03, 0xe8, 0x05, 0xe3, 0xfe, 0x08, 0x47, 0xca, 0x6e, 0x2c, 0x6a, 0xe5, 0x18, 0x40, - 0x87, 0x03, 0x72, 0x01, 0x65, 0x47, 0x38, 0x8a, 0x27, 0xf7, 0x78, 0x6b, 0x7f, 0x84, 0xa3, 0x96, - 0xd3, 0x38, 0xdf, 0xc8, 0x5c, 0x5a, 0xcf, 0x7c, 0xc3, 0xb1, 0xae, 0xa1, 0xc7, 0xdb, 0xf0, 0x34, - 0x6a, 0xfd, 0xdb, 0x0e, 0xda, 0x6d, 0x03, 0x91, 0x5f, 0xa3, 0xc3, 0x1b, 0x77, 0x4e, 0x59, 0x6e, - 0xfe, 0xc6, 0x1d, 0x50, 0xcb, 0x77, 0x75, 0x52, 0x4d, 0x19, 0xa3, 0xc2, 0xf6, 0x9b, 0xf1, 0x74, - 0x7d, 0x74, 0x2b, 0x45, 0x3d, 0xbf, 0x97, 0xb2, 0x7c, 0xcd, 0x7b, 0x74, 0x72, 0xfb, 0x84, 0x4e, - 0xd7, 0xe7, 0x6f, 0xb5, 0xd5, 0x67, 0xff, 0x6c, 0xa7, 0xd2, 0xea, 0xfe, 0xc7, 0xc5, 0xa4, 0x22, - 0x35, 0x2f, 0xa6, 0x33, 0x4d, 0xba, 0x9e, 0x69, 0xd2, 0x9f, 0x99, 0x26, 0x7d, 0x9d, 0x6b, 0x99, - 0xeb, 0xb9, 0x96, 0xf9, 0x35, 0xd7, 0x32, 0x1f, 0x6a, 0xc4, 0x65, 0xc3, 0x71, 0xdf, 0x18, 0x50, - 0xcf, 0x0c, 0xc6, 0x30, 0x1c, 0x0c, 0x6d, 0xd7, 0xe7, 0x55, 0x95, 0x97, 0x55, 0x9f, 0x3a, 0xd8, - 0xbc, 0x32, 0xf9, 0xc1, 0xf0, 0x7f, 0x44, 0x3f, 0xcb, 0x3f, 0xf0, 0x17, 0x7f, 0x03, 0x00, 0x00, - 0xff, 0xff, 0x18, 0x10, 0x39, 0x56, 0x86, 0x04, 0x00, 0x00, + // 543 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x31, 0x6f, 0xda, 0x40, + 0x14, 0xc6, 0x49, 0x43, 0xc5, 0x25, 0x4a, 0x1a, 0x17, 0x84, 0xb1, 0x1a, 0x97, 0x5a, 0xaa, 0x94, + 0x20, 0x61, 0x17, 0x2a, 0x75, 0x60, 0x2b, 0x5b, 0x1a, 0x21, 0x21, 0x4a, 0x2b, 0xb5, 0x0b, 0x32, + 0xf8, 0x74, 0x58, 0xc8, 0xbe, 0x93, 0xdf, 0x11, 0xc5, 0x5b, 0xd5, 0xa9, 0xea, 0xd4, 0xb9, 0xff, + 0xa0, 0x1b, 0x43, 0x87, 0xfe, 0x84, 0x8c, 0x51, 0xa7, 0x4e, 0x55, 0x05, 0x03, 0x7f, 0xa3, 0xe2, + 0x7c, 0x36, 0x84, 0x90, 0x66, 0xe8, 0x82, 0xde, 0x7d, 0xef, 0x7b, 0x1f, 0xdf, 0x77, 0xcf, 0x36, + 0x7a, 0x30, 0xe6, 0x00, 0xf6, 0x79, 0xcd, 0xe6, 0x17, 0x16, 0x0b, 0x29, 0xa7, 0xea, 0xfd, 0x05, + 0x62, 0x9d, 0xd7, 0xf4, 0xe2, 0x80, 0x82, 0x4f, 0xc1, 0xf6, 0x81, 0x2c, 0x08, 0x3e, 0x90, 0x98, + 0xa1, 0x17, 0x92, 0x19, 0x82, 0x03, 0x0c, 0x1e, 0x48, 0xf8, 0x61, 0x2a, 0x15, 0x31, 0x9c, 0x80, + 0x79, 0x42, 0x09, 0x15, 0xa5, 0xbd, 0xa8, 0x24, 0x5a, 0x8a, 0xa5, 0x7b, 0x71, 0x23, 0x3e, 0xc8, + 0xd6, 0xa1, 0xe3, 0x7b, 0x01, 0xb5, 0xc5, 0x6f, 0x0c, 0x99, 0x9f, 0x14, 0x74, 0xd0, 0x02, 0xf2, + 0x86, 0xb9, 0x0e, 0xc7, 0x6d, 0x27, 0x74, 0x7c, 0x50, 0x5f, 0xa0, 0x9c, 0x33, 0xe6, 0x43, 0x1a, + 0x7a, 0x3c, 0xd2, 0x94, 0xb2, 0x72, 0x9c, 0x6b, 0x6a, 0x3f, 0xbf, 0x57, 0xf3, 0x52, 0xeb, 0xa5, + 0xeb, 0x86, 0x18, 0xe0, 0x35, 0x0f, 0xbd, 0x80, 0x74, 0x96, 0x54, 0xb5, 0x8a, 0xb2, 0x4c, 0x28, + 0x68, 0x5b, 0x65, 0xe5, 0x78, 0xb7, 0x7e, 0x60, 0xc9, 0xb8, 0x56, 0x2c, 0xdc, 0xbc, 0x77, 0xf9, + 0xfb, 0x71, 0xa6, 0x23, 0x49, 0x8d, 0xfd, 0x8f, 0xf3, 0x49, 0x65, 0x39, 0x6e, 0x96, 0x50, 0x71, + 0xcd, 0x49, 0x07, 0x03, 0xa3, 0x01, 0x60, 0xf3, 0x87, 0x82, 0xb4, 0x16, 0x90, 0xd3, 0xc0, 0xe3, + 0x9e, 0xc3, 0x71, 0x17, 0xe0, 0x0c, 0x47, 0xed, 0x90, 0x0e, 0x30, 0x80, 0xfa, 0x0c, 0x65, 0xc1, + 0x23, 0x01, 0x0e, 0xef, 0xf4, 0x2a, 0x79, 0x6a, 0x03, 0xed, 0xb1, 0x78, 0xb8, 0xb7, 0xb8, 0x4f, + 0x61, 0x77, 0xbf, 0x5e, 0x4c, 0xed, 0x76, 0x01, 0xa4, 0x78, 0x37, 0x62, 0xb8, 0xb3, 0xcb, 0x96, + 0x87, 0x86, 0xb5, 0x70, 0x2d, 0x85, 0x3e, 0xcf, 0x27, 0x15, 0x43, 0x6c, 0xa6, 0x05, 0xe4, 0x2d, + 0xe5, 0x38, 0x31, 0xb8, 0x74, 0x67, 0x9a, 0xa8, 0x7c, 0x9b, 0xf3, 0x34, 0xde, 0x37, 0x05, 0xe5, + 0xa5, 0xc2, 0xff, 0x46, 0x3b, 0x42, 0x88, 0x03, 0xf4, 0xd8, 0xb8, 0x3f, 0xc2, 0x91, 0x08, 0x96, + 0xeb, 0xe4, 0x38, 0x40, 0x5b, 0x00, 0x6a, 0x01, 0x65, 0x47, 0x38, 0xea, 0x79, 0xae, 0xb6, 0x2d, + 0x5a, 0x3b, 0x23, 0x1c, 0x9d, 0xba, 0x8d, 0x93, 0xb5, 0x50, 0xa5, 0xd5, 0x50, 0xd7, 0x2c, 0x99, + 0x06, 0x7a, 0xb4, 0x09, 0x4f, 0xb2, 0xd4, 0xbf, 0x6e, 0xa1, 0xed, 0x16, 0x10, 0xf5, 0x15, 0xda, + 0xbb, 0xf6, 0x50, 0x69, 0xe9, 0xed, 0xae, 0x2d, 0x59, 0x2f, 0xdf, 0xd6, 0x49, 0x34, 0x55, 0x8c, + 0x0a, 0x9b, 0x57, 0xff, 0x64, 0x75, 0x74, 0x23, 0x45, 0x3f, 0xb9, 0x93, 0x92, 0xfe, 0xcd, 0x3b, + 0x74, 0x78, 0x73, 0x05, 0x47, 0xab, 0xf3, 0x37, 0xda, 0xfa, 0xd3, 0x7f, 0xb6, 0x13, 0x69, 0x7d, + 0xe7, 0xc3, 0x7c, 0x52, 0x51, 0x9a, 0x67, 0x97, 0x53, 0x43, 0xb9, 0x9a, 0x1a, 0xca, 0x9f, 0xa9, + 0xa1, 0x7c, 0x99, 0x19, 0x99, 0xab, 0x99, 0x91, 0xf9, 0x35, 0x33, 0x32, 0xef, 0x6b, 0xc4, 0xe3, + 0xc3, 0x71, 0xdf, 0x1a, 0x50, 0xdf, 0x66, 0x63, 0x18, 0x0e, 0x86, 0x8e, 0x17, 0x88, 0xaa, 0x2a, + 0xca, 0x6a, 0x40, 0x5d, 0x6c, 0x5f, 0xd8, 0x62, 0x31, 0xe2, 0x23, 0xd0, 0xcf, 0x8a, 0x37, 0xf8, + 0xf9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x2d, 0x4b, 0x15, 0x67, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -682,19 +673,14 @@ func (m *MsgVoteTssKeyProcess) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.KeyId) i = encodeVarintTx(dAtA, i, uint64(len(m.KeyId))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if len(m.TssPubkey) > 0 { i -= len(m.TssPubkey) copy(dAtA[i:], m.TssPubkey) i = encodeVarintTx(dAtA, i, uint64(len(m.TssPubkey))) i-- - dAtA[i] = 0x1a - } - if m.ProcessId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.ProcessId)) - i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } if len(m.Signer) > 0 { i -= len(m.Signer) @@ -799,9 +785,6 @@ func (m *MsgVoteTssKeyProcess) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.ProcessId != 0 { - n += 1 + sovTx(uint64(m.ProcessId)) - } l = len(m.TssPubkey) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1206,25 +1189,6 @@ func (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessId", wireType) - } - m.ProcessId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProcessId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TssPubkey", wireType) } @@ -1256,7 +1220,7 @@ func (m *MsgVoteTssKeyProcess) Unmarshal(dAtA []byte) error { } m.TssPubkey = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) } From 8432152509c4d3d8800a97508b1fec2e2de7a286 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 12:48:56 +0530 Subject: [PATCH 078/105] feat: added integration test for vote tss key process --- .../utss/vote_tss_key_process_test.go | 180 ++++++++++++++++++ x/uexecutor/keeper/voting.go | 2 +- x/utss/keeper/voting.go | 2 +- x/uvalidator/keeper/validator.go | 17 ++ 4 files changed, 199 insertions(+), 2 deletions(-) create mode 100644 test/integration/utss/vote_tss_key_process_test.go diff --git a/test/integration/utss/vote_tss_key_process_test.go b/test/integration/utss/vote_tss_key_process_test.go new file mode 100644 index 00000000..3d06c354 --- /dev/null +++ b/test/integration/utss/vote_tss_key_process_test.go @@ -0,0 +1,180 @@ +package integrationtest + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// Integration tests for VoteTssKeyProcess +func TestVoteTssKeyProcess(t *testing.T) { + + //----------------------------------------------------------- + t.Run("Allows vote but does not finalize with insufficient votes", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 3) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + // first vote only (quorum = 2) + v := validators[0] + valAddr, _ := sdk.ValAddressFromBech32(v) + + pub := "pub-k1" + key := "key-k2" + + err = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pub, key) + require.NoError(t, err) + + // should not finalize yet + tssKey, err := app.UtssKeeper.CurrentTssKey.Get(ctx) + if err == nil { + require.NotEqual(t, pub, tssKey.TssPubkey) + require.NotEqual(t, key, tssKey.KeyId) + } + }) + + //----------------------------------------------------------- + t.Run("Successfully finalizes after quorum reached", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 3) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + pub := "pub-final" + key := "key-final" + + // vote from all 3 → quorum = 2 reached → finalized + for _, v := range validators { + valAddr, _ := sdk.ValAddressFromBech32(v) + err := app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pub, key) + require.NoError(t, err) + } + + tssKey, err := app.UtssKeeper.CurrentTssKey.Get(ctx) + require.NoError(t, err) + require.Equal(t, key, tssKey.KeyId) + require.Equal(t, pub, tssKey.TssPubkey) + }) + + //----------------------------------------------------------- + t.Run("Fails when no active process exists", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 2) + + // clear active process + app.UtssKeeper.CurrentTssProcess.Remove(ctx) + + valAddr, _ := sdk.ValAddressFromBech32(validators[0]) + + err := app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, "pk", "key") + require.ErrorContains(t, err, "no active TSS process") + }) + + //----------------------------------------------------------- + t.Run("Fails when keyId already exists", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 3) + + pub := "dupPub" + key := "dupKey" + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + // finalize once + for _, v := range validators { + valAddr, _ := sdk.ValAddressFromBech32(v) + _ = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pub, key) + } + + err = app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + // vote again with SAME keyId + valAddr, _ := sdk.ValAddressFromBech32(validators[0]) + err = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pub, key) + require.ErrorContains(t, err, "already exists") + }) + + //----------------------------------------------------------- + t.Run("Fails when process expired", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 2) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + process, _ := app.UtssKeeper.CurrentTssProcess.Get(ctx) + + // set block height to AFTER expiry + ctx = ctx.WithBlockHeight(process.ExpiryHeight + 10) + + valAddr, _ := sdk.ValAddressFromBech32(validators[0]) + err = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, "pub", "key") + require.ErrorContains(t, err, "expired") + }) + + //----------------------------------------------------------- + t.Run("Emits correct TSS_KEY_FINALIZED event", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 3) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + pub := "eventPub" + key := "eventKey" + + for _, v := range validators { + valAddr, _ := sdk.ValAddressFromBech32(v) + _ = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pub, key) + } + + events := ctx.EventManager().Events() + require.NotEmpty(t, events) + + // check LAST event + last := events[len(events)-1] + require.Equal(t, utsstypes.EventTypeTssKeyFinalized, last.Type) + + attrs := last.Attributes + require.Equal(t, key, attrs[1].Value) + require.Equal(t, pub, attrs[2].Value) + }) + + //----------------------------------------------------------- + t.Run("Updates validator lifecycle from pending->active", func(t *testing.T) { + app, ctx, validators := setupTssKeyProcessTest(t, 3) + + // set validator[0] to pending_join + v1 := validators[0] + valAddr1, _ := sdk.ValAddressFromBech32(v1) + + app.UvalidatorKeeper.UpdateValidatorStatus(ctx, + valAddr1, + uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN, + ) + + err := app.UtssKeeper.InitiateTssKeyProcess(ctx, utsstypes.TssProcessType_TSS_PROCESS_KEYGEN) + require.NoError(t, err) + + pubkey := "ls_pub" + keyId := "ls_key" + + // vote from all validators → finalizes + for _, v := range validators { + valAddr, _ := sdk.ValAddressFromBech32(v) + err = app.UtssKeeper.VoteTssKeyProcess(ctx, valAddr, pubkey, keyId) + require.NoError(t, err) + } + + uv, found, err := app.UvalidatorKeeper.GetUniversalValidator(ctx, valAddr1) + require.NoError(t, err) + require.True(t, found) + require.Equal(t, + uvalidatortypes.UVStatus_UV_STATUS_ACTIVE, + uv.LifecycleInfo.CurrentStatus, + ) + }) +} diff --git a/x/uexecutor/keeper/voting.go b/x/uexecutor/keeper/voting.go index f728f00c..0fced64d 100644 --- a/x/uexecutor/keeper/voting.go +++ b/x/uexecutor/keeper/voting.go @@ -40,7 +40,7 @@ func (k Keeper) VoteOnInboundBallot( // votesNeeded = ceil(2/3 * totalValidators) // >2/3 quorum similar to tendermint - votesNeeded := (totalValidators*types.VotesThresholdNumerator + types.VotesThresholdDenominator - 1) / types.VotesThresholdDenominator + votesNeeded := (types.VotesThresholdNumerator*totalValidators)/types.VotesThresholdDenominator + 1 // Convert []sdk.ValAddress → []string universalValidatorSetStrs := make([]string, len(universalValidatorSet)) diff --git a/x/utss/keeper/voting.go b/x/utss/keeper/voting.go index 88934552..eac7ba2d 100644 --- a/x/utss/keeper/voting.go +++ b/x/utss/keeper/voting.go @@ -50,7 +50,7 @@ func (k Keeper) VoteOnTssBallot( // votesNeeded = ceil(2/3 * totalValidators) // >2/3 quorum similar to tendermint - votesNeeded := (totalValidators*types.VotesThresholdNumerator + types.VotesThresholdDenominator - 1) / types.VotesThresholdDenominator + votesNeeded := (types.VotesThresholdNumerator*totalValidators)/types.VotesThresholdDenominator + 1 // Convert []sdk.ValAddress -> []string universalValidatorSetStrs := make([]string, len(universalValidatorSet)) diff --git a/x/uvalidator/keeper/validator.go b/x/uvalidator/keeper/validator.go index 876be3a1..3218c762 100644 --- a/x/uvalidator/keeper/validator.go +++ b/x/uvalidator/keeper/validator.go @@ -107,3 +107,20 @@ func validateStatusTransition(from, to types.UVStatus) error { } return nil } + +// GetUniversalValidator returns a single UniversalValidator by address. +func (k Keeper) GetUniversalValidator( + ctx context.Context, + addr sdk.ValAddress, +) (types.UniversalValidator, bool, error) { + + val, err := k.UniversalValidatorSet.Get(ctx, addr) + if err != nil { + if errors.Is(err, collections.ErrNotFound) { + return types.UniversalValidator{}, false, nil + } + return types.UniversalValidator{}, false, err + } + + return val, true, nil +} From c1f48c48f6d9e41efae019b386438d09f0f7fc36 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 12:56:37 +0530 Subject: [PATCH 079/105] feat: added queries in proto for utss module --- proto/utss/v1/query.proto | 82 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 76 insertions(+), 6 deletions(-) diff --git a/proto/utss/v1/query.proto b/proto/utss/v1/query.proto index 55233cee..82fb95b8 100755 --- a/proto/utss/v1/query.proto +++ b/proto/utss/v1/query.proto @@ -1,25 +1,95 @@ syntax = "proto3"; + package utss.v1; import "google/api/annotations.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + import "utss/v1/genesis.proto"; import "utss/v1/types.proto"; option go_package = "github.com/pushchain/push-chain-node/x/utss/types"; -// Query provides defines the gRPC querier service. +// Query Service service Query { - // Params queries all parameters of the module. + // Params queries module parameters. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/utss/v1/params"; } + + // Current TSS Process + rpc CurrentProcess(QueryCurrentProcessRequest) returns (QueryCurrentProcessResponse) { + option (google.api.http).get = "/utss/v1/process/current"; + } + + // Process by ID + rpc ProcessById(QueryProcessByIdRequest) returns (QueryProcessByIdResponse) { + option (google.api.http).get = "/utss/v1/process/{id}"; + } + + // List all processes (paginated) + rpc AllProcesses(QueryAllProcessesRequest) returns (QueryAllProcessesResponse) { + option (google.api.http).get = "/utss/v1/process"; + } + + // Current TSS Key + rpc CurrentKey(QueryCurrentKeyRequest) returns (QueryCurrentKeyResponse) { + option (google.api.http).get = "/utss/v1/key/current"; + } + + // Get finalized TSS key by key_id + rpc KeyById(QueryKeyByIdRequest) returns (QueryKeyByIdResponse) { + option (google.api.http).get = "/utss/v1/key/{key_id}"; + } + + // List all finalized keys (paginated) + rpc AllKeys(QueryAllKeysRequest) returns (QueryAllKeysResponse) { + option (google.api.http).get = "/utss/v1/key"; + } } -// QueryParamsRequest is the request type for the Query/Params RPC method. +// Messages message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { - // params defines the parameters of the module. Params params = 1; } + +message QueryCurrentProcessRequest {} +message QueryCurrentProcessResponse { + TssKeyProcess process = 1; +} + +message QueryProcessByIdRequest { + uint64 id = 1; +} +message QueryProcessByIdResponse { + TssKeyProcess process = 1; +} + +message QueryAllProcessesRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} +message QueryAllProcessesResponse { + repeated TssKeyProcess processes = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +message QueryCurrentKeyRequest {} +message QueryCurrentKeyResponse { + TssKey key = 1; +} + +message QueryKeyByIdRequest { + string key_id = 1; +} +message QueryKeyByIdResponse { + TssKey key = 1; +} + +message QueryAllKeysRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} +message QueryAllKeysResponse { + repeated TssKey keys = 1; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} From 3aebd30502782013975bc87556dd7ade1bc3f1e3 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 12:56:57 +0530 Subject: [PATCH 080/105] refactor: added generated protobuf --- api/utss/v1/query.pulsar.go | 6125 +++++++++++++++++++++++++++++++++- api/utss/v1/query_grpc.pb.go | 240 +- 2 files changed, 6296 insertions(+), 69 deletions(-) diff --git a/api/utss/v1/query.pulsar.go b/api/utss/v1/query.pulsar.go index c4e40cf9..7ae1d10f 100644 --- a/api/utss/v1/query.pulsar.go +++ b/api/utss/v1/query.pulsar.go @@ -2,6 +2,7 @@ package utssv1 import ( + v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -804,79 +805,5787 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } } +var ( + md_QueryCurrentProcessRequest protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryCurrentProcessRequest = File_utss_v1_query_proto.Messages().ByName("QueryCurrentProcessRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryCurrentProcessRequest)(nil) + +type fastReflection_QueryCurrentProcessRequest QueryCurrentProcessRequest + +func (x *QueryCurrentProcessRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCurrentProcessRequest)(x) +} + +func (x *QueryCurrentProcessRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCurrentProcessRequest_messageType fastReflection_QueryCurrentProcessRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryCurrentProcessRequest_messageType{} + +type fastReflection_QueryCurrentProcessRequest_messageType struct{} + +func (x fastReflection_QueryCurrentProcessRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCurrentProcessRequest)(nil) +} +func (x fastReflection_QueryCurrentProcessRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCurrentProcessRequest) +} +func (x fastReflection_QueryCurrentProcessRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentProcessRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCurrentProcessRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentProcessRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryCurrentProcessRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryCurrentProcessRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCurrentProcessRequest) New() protoreflect.Message { + return new(fastReflection_QueryCurrentProcessRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCurrentProcessRequest) Interface() protoreflect.ProtoMessage { + return (*QueryCurrentProcessRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryCurrentProcessRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCurrentProcessRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentProcessRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryCurrentProcessRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentProcessRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentProcessRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryCurrentProcessRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryCurrentProcessRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryCurrentProcessRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryCurrentProcessRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentProcessRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryCurrentProcessRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryCurrentProcessRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCurrentProcessRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentProcessRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentProcessRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentProcessRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentProcessRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryCurrentProcessResponse protoreflect.MessageDescriptor + fd_QueryCurrentProcessResponse_process protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryCurrentProcessResponse = File_utss_v1_query_proto.Messages().ByName("QueryCurrentProcessResponse") + fd_QueryCurrentProcessResponse_process = md_QueryCurrentProcessResponse.Fields().ByName("process") +} + +var _ protoreflect.Message = (*fastReflection_QueryCurrentProcessResponse)(nil) + +type fastReflection_QueryCurrentProcessResponse QueryCurrentProcessResponse + +func (x *QueryCurrentProcessResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCurrentProcessResponse)(x) +} + +func (x *QueryCurrentProcessResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCurrentProcessResponse_messageType fastReflection_QueryCurrentProcessResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryCurrentProcessResponse_messageType{} + +type fastReflection_QueryCurrentProcessResponse_messageType struct{} + +func (x fastReflection_QueryCurrentProcessResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCurrentProcessResponse)(nil) +} +func (x fastReflection_QueryCurrentProcessResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCurrentProcessResponse) +} +func (x fastReflection_QueryCurrentProcessResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentProcessResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCurrentProcessResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentProcessResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryCurrentProcessResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryCurrentProcessResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCurrentProcessResponse) New() protoreflect.Message { + return new(fastReflection_QueryCurrentProcessResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCurrentProcessResponse) Interface() protoreflect.ProtoMessage { + return (*QueryCurrentProcessResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryCurrentProcessResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Process != nil { + value := protoreflect.ValueOfMessage(x.Process.ProtoReflect()) + if !f(fd_QueryCurrentProcessResponse_process, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCurrentProcessResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryCurrentProcessResponse.process": + return x.Process != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentProcessResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryCurrentProcessResponse.process": + x.Process = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryCurrentProcessResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryCurrentProcessResponse.process": + value := x.Process + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentProcessResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryCurrentProcessResponse.process": + x.Process = value.Message().Interface().(*TssKeyProcess) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentProcessResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryCurrentProcessResponse.process": + if x.Process == nil { + x.Process = new(TssKeyProcess) + } + return protoreflect.ValueOfMessage(x.Process.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryCurrentProcessResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryCurrentProcessResponse.process": + m := new(TssKeyProcess) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentProcessResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentProcessResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryCurrentProcessResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryCurrentProcessResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryCurrentProcessResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentProcessResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryCurrentProcessResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryCurrentProcessResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCurrentProcessResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Process != nil { + l = options.Size(x.Process) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentProcessResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Process != nil { + encoded, err := options.Marshal(x.Process) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentProcessResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Process", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Process == nil { + x.Process = &TssKeyProcess{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Process); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryProcessByIdRequest protoreflect.MessageDescriptor + fd_QueryProcessByIdRequest_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryProcessByIdRequest = File_utss_v1_query_proto.Messages().ByName("QueryProcessByIdRequest") + fd_QueryProcessByIdRequest_id = md_QueryProcessByIdRequest.Fields().ByName("id") +} + +var _ protoreflect.Message = (*fastReflection_QueryProcessByIdRequest)(nil) + +type fastReflection_QueryProcessByIdRequest QueryProcessByIdRequest + +func (x *QueryProcessByIdRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryProcessByIdRequest)(x) +} + +func (x *QueryProcessByIdRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryProcessByIdRequest_messageType fastReflection_QueryProcessByIdRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryProcessByIdRequest_messageType{} + +type fastReflection_QueryProcessByIdRequest_messageType struct{} + +func (x fastReflection_QueryProcessByIdRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryProcessByIdRequest)(nil) +} +func (x fastReflection_QueryProcessByIdRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryProcessByIdRequest) +} +func (x fastReflection_QueryProcessByIdRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProcessByIdRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryProcessByIdRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProcessByIdRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryProcessByIdRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryProcessByIdRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryProcessByIdRequest) New() protoreflect.Message { + return new(fastReflection_QueryProcessByIdRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryProcessByIdRequest) Interface() protoreflect.ProtoMessage { + return (*QueryProcessByIdRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryProcessByIdRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_QueryProcessByIdRequest_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryProcessByIdRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdRequest.id": + return x.Id != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryProcessByIdRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdRequest.id": + x.Id = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryProcessByIdRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryProcessByIdRequest.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryProcessByIdRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdRequest.id": + x.Id = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryProcessByIdRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdRequest.id": + panic(fmt.Errorf("field id of message utss.v1.QueryProcessByIdRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryProcessByIdRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdRequest.id": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryProcessByIdRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryProcessByIdRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryProcessByIdRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryProcessByIdRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryProcessByIdRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryProcessByIdRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryProcessByIdRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryProcessByIdRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryProcessByIdRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProcessByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProcessByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + 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++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryProcessByIdResponse protoreflect.MessageDescriptor + fd_QueryProcessByIdResponse_process protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryProcessByIdResponse = File_utss_v1_query_proto.Messages().ByName("QueryProcessByIdResponse") + fd_QueryProcessByIdResponse_process = md_QueryProcessByIdResponse.Fields().ByName("process") +} + +var _ protoreflect.Message = (*fastReflection_QueryProcessByIdResponse)(nil) + +type fastReflection_QueryProcessByIdResponse QueryProcessByIdResponse + +func (x *QueryProcessByIdResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryProcessByIdResponse)(x) +} + +func (x *QueryProcessByIdResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryProcessByIdResponse_messageType fastReflection_QueryProcessByIdResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryProcessByIdResponse_messageType{} + +type fastReflection_QueryProcessByIdResponse_messageType struct{} + +func (x fastReflection_QueryProcessByIdResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryProcessByIdResponse)(nil) +} +func (x fastReflection_QueryProcessByIdResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryProcessByIdResponse) +} +func (x fastReflection_QueryProcessByIdResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProcessByIdResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryProcessByIdResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryProcessByIdResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryProcessByIdResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryProcessByIdResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryProcessByIdResponse) New() protoreflect.Message { + return new(fastReflection_QueryProcessByIdResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryProcessByIdResponse) Interface() protoreflect.ProtoMessage { + return (*QueryProcessByIdResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryProcessByIdResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Process != nil { + value := protoreflect.ValueOfMessage(x.Process.ProtoReflect()) + if !f(fd_QueryProcessByIdResponse_process, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryProcessByIdResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdResponse.process": + return x.Process != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryProcessByIdResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdResponse.process": + x.Process = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryProcessByIdResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryProcessByIdResponse.process": + value := x.Process + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryProcessByIdResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdResponse.process": + x.Process = value.Message().Interface().(*TssKeyProcess) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryProcessByIdResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdResponse.process": + if x.Process == nil { + x.Process = new(TssKeyProcess) + } + return protoreflect.ValueOfMessage(x.Process.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryProcessByIdResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryProcessByIdResponse.process": + m := new(TssKeyProcess) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryProcessByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryProcessByIdResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryProcessByIdResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryProcessByIdResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryProcessByIdResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryProcessByIdResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryProcessByIdResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryProcessByIdResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryProcessByIdResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Process != nil { + l = options.Size(x.Process) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryProcessByIdResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Process != nil { + encoded, err := options.Marshal(x.Process) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryProcessByIdResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProcessByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryProcessByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Process", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Process == nil { + x.Process = &TssKeyProcess{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Process); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAllProcessesRequest protoreflect.MessageDescriptor + fd_QueryAllProcessesRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryAllProcessesRequest = File_utss_v1_query_proto.Messages().ByName("QueryAllProcessesRequest") + fd_QueryAllProcessesRequest_pagination = md_QueryAllProcessesRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllProcessesRequest)(nil) + +type fastReflection_QueryAllProcessesRequest QueryAllProcessesRequest + +func (x *QueryAllProcessesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllProcessesRequest)(x) +} + +func (x *QueryAllProcessesRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAllProcessesRequest_messageType fastReflection_QueryAllProcessesRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllProcessesRequest_messageType{} + +type fastReflection_QueryAllProcessesRequest_messageType struct{} + +func (x fastReflection_QueryAllProcessesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllProcessesRequest)(nil) +} +func (x fastReflection_QueryAllProcessesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllProcessesRequest) +} +func (x fastReflection_QueryAllProcessesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllProcessesRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllProcessesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllProcessesRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAllProcessesRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAllProcessesRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllProcessesRequest) New() protoreflect.Message { + return new(fastReflection_QueryAllProcessesRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllProcessesRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAllProcessesRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAllProcessesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllProcessesRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAllProcessesRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllProcessesRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAllProcessesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryAllProcessesRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllProcessesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllProcessesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAllProcessesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAllProcessesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryAllProcessesRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAllProcessesRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllProcessesRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAllProcessesRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAllProcessesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllProcessesRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAllProcessesRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAllProcessesRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllProcessesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllProcessesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryAllProcessesResponse_1_list)(nil) + +type _QueryAllProcessesResponse_1_list struct { + list *[]*TssKeyProcess +} + +func (x *_QueryAllProcessesResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAllProcessesResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAllProcessesResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*TssKeyProcess) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAllProcessesResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*TssKeyProcess) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAllProcessesResponse_1_list) AppendMutable() protoreflect.Value { + v := new(TssKeyProcess) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllProcessesResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAllProcessesResponse_1_list) NewElement() protoreflect.Value { + v := new(TssKeyProcess) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllProcessesResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAllProcessesResponse protoreflect.MessageDescriptor + fd_QueryAllProcessesResponse_processes protoreflect.FieldDescriptor + fd_QueryAllProcessesResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryAllProcessesResponse = File_utss_v1_query_proto.Messages().ByName("QueryAllProcessesResponse") + fd_QueryAllProcessesResponse_processes = md_QueryAllProcessesResponse.Fields().ByName("processes") + fd_QueryAllProcessesResponse_pagination = md_QueryAllProcessesResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllProcessesResponse)(nil) + +type fastReflection_QueryAllProcessesResponse QueryAllProcessesResponse + +func (x *QueryAllProcessesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllProcessesResponse)(x) +} + +func (x *QueryAllProcessesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAllProcessesResponse_messageType fastReflection_QueryAllProcessesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllProcessesResponse_messageType{} + +type fastReflection_QueryAllProcessesResponse_messageType struct{} + +func (x fastReflection_QueryAllProcessesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllProcessesResponse)(nil) +} +func (x fastReflection_QueryAllProcessesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllProcessesResponse) +} +func (x fastReflection_QueryAllProcessesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllProcessesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllProcessesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllProcessesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAllProcessesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAllProcessesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllProcessesResponse) New() protoreflect.Message { + return new(fastReflection_QueryAllProcessesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllProcessesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAllProcessesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAllProcessesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Processes) != 0 { + value := protoreflect.ValueOfList(&_QueryAllProcessesResponse_1_list{list: &x.Processes}) + if !f(fd_QueryAllProcessesResponse_processes, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllProcessesResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAllProcessesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesResponse.processes": + return len(x.Processes) != 0 + case "utss.v1.QueryAllProcessesResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllProcessesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesResponse.processes": + x.Processes = nil + case "utss.v1.QueryAllProcessesResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAllProcessesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryAllProcessesResponse.processes": + if len(x.Processes) == 0 { + return protoreflect.ValueOfList(&_QueryAllProcessesResponse_1_list{}) + } + listValue := &_QueryAllProcessesResponse_1_list{list: &x.Processes} + return protoreflect.ValueOfList(listValue) + case "utss.v1.QueryAllProcessesResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllProcessesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesResponse.processes": + lv := value.List() + clv := lv.(*_QueryAllProcessesResponse_1_list) + x.Processes = *clv.list + case "utss.v1.QueryAllProcessesResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllProcessesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesResponse.processes": + if x.Processes == nil { + x.Processes = []*TssKeyProcess{} + } + value := &_QueryAllProcessesResponse_1_list{list: &x.Processes} + return protoreflect.ValueOfList(value) + case "utss.v1.QueryAllProcessesResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAllProcessesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllProcessesResponse.processes": + list := []*TssKeyProcess{} + return protoreflect.ValueOfList(&_QueryAllProcessesResponse_1_list{list: &list}) + case "utss.v1.QueryAllProcessesResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllProcessesResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllProcessesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAllProcessesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryAllProcessesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAllProcessesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllProcessesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAllProcessesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAllProcessesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllProcessesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Processes) > 0 { + for _, e := range x.Processes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAllProcessesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Processes) > 0 { + for iNdEx := len(x.Processes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Processes[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAllProcessesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllProcessesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllProcessesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Processes", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.Processes = append(x.Processes, &TssKeyProcess{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Processes[len(x.Processes)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryCurrentKeyRequest protoreflect.MessageDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryCurrentKeyRequest = File_utss_v1_query_proto.Messages().ByName("QueryCurrentKeyRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryCurrentKeyRequest)(nil) + +type fastReflection_QueryCurrentKeyRequest QueryCurrentKeyRequest + +func (x *QueryCurrentKeyRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCurrentKeyRequest)(x) +} + +func (x *QueryCurrentKeyRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCurrentKeyRequest_messageType fastReflection_QueryCurrentKeyRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryCurrentKeyRequest_messageType{} + +type fastReflection_QueryCurrentKeyRequest_messageType struct{} + +func (x fastReflection_QueryCurrentKeyRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCurrentKeyRequest)(nil) +} +func (x fastReflection_QueryCurrentKeyRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCurrentKeyRequest) +} +func (x fastReflection_QueryCurrentKeyRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentKeyRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCurrentKeyRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentKeyRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryCurrentKeyRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryCurrentKeyRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCurrentKeyRequest) New() protoreflect.Message { + return new(fastReflection_QueryCurrentKeyRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCurrentKeyRequest) Interface() protoreflect.ProtoMessage { + return (*QueryCurrentKeyRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryCurrentKeyRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCurrentKeyRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentKeyRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryCurrentKeyRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentKeyRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentKeyRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryCurrentKeyRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryCurrentKeyRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryCurrentKeyRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryCurrentKeyRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentKeyRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryCurrentKeyRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryCurrentKeyRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCurrentKeyRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentKeyRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentKeyRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentKeyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryCurrentKeyResponse protoreflect.MessageDescriptor + fd_QueryCurrentKeyResponse_key protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryCurrentKeyResponse = File_utss_v1_query_proto.Messages().ByName("QueryCurrentKeyResponse") + fd_QueryCurrentKeyResponse_key = md_QueryCurrentKeyResponse.Fields().ByName("key") +} + +var _ protoreflect.Message = (*fastReflection_QueryCurrentKeyResponse)(nil) + +type fastReflection_QueryCurrentKeyResponse QueryCurrentKeyResponse + +func (x *QueryCurrentKeyResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCurrentKeyResponse)(x) +} + +func (x *QueryCurrentKeyResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCurrentKeyResponse_messageType fastReflection_QueryCurrentKeyResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryCurrentKeyResponse_messageType{} + +type fastReflection_QueryCurrentKeyResponse_messageType struct{} + +func (x fastReflection_QueryCurrentKeyResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCurrentKeyResponse)(nil) +} +func (x fastReflection_QueryCurrentKeyResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCurrentKeyResponse) +} +func (x fastReflection_QueryCurrentKeyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentKeyResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCurrentKeyResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCurrentKeyResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryCurrentKeyResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryCurrentKeyResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCurrentKeyResponse) New() protoreflect.Message { + return new(fastReflection_QueryCurrentKeyResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCurrentKeyResponse) Interface() protoreflect.ProtoMessage { + return (*QueryCurrentKeyResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryCurrentKeyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Key != nil { + value := protoreflect.ValueOfMessage(x.Key.ProtoReflect()) + if !f(fd_QueryCurrentKeyResponse_key, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCurrentKeyResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryCurrentKeyResponse.key": + return x.Key != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentKeyResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryCurrentKeyResponse.key": + x.Key = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryCurrentKeyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryCurrentKeyResponse.key": + value := x.Key + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentKeyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryCurrentKeyResponse.key": + x.Key = value.Message().Interface().(*TssKey) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentKeyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryCurrentKeyResponse.key": + if x.Key == nil { + x.Key = new(TssKey) + } + return protoreflect.ValueOfMessage(x.Key.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryCurrentKeyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryCurrentKeyResponse.key": + m := new(TssKey) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryCurrentKeyResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryCurrentKeyResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryCurrentKeyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryCurrentKeyResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryCurrentKeyResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCurrentKeyResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryCurrentKeyResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryCurrentKeyResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCurrentKeyResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Key != nil { + l = options.Size(x.Key) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentKeyResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Key != nil { + encoded, err := options.Marshal(x.Key) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCurrentKeyResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentKeyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Key == nil { + x.Key = &TssKey{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Key); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryKeyByIdRequest protoreflect.MessageDescriptor + fd_QueryKeyByIdRequest_key_id protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryKeyByIdRequest = File_utss_v1_query_proto.Messages().ByName("QueryKeyByIdRequest") + fd_QueryKeyByIdRequest_key_id = md_QueryKeyByIdRequest.Fields().ByName("key_id") +} + +var _ protoreflect.Message = (*fastReflection_QueryKeyByIdRequest)(nil) + +type fastReflection_QueryKeyByIdRequest QueryKeyByIdRequest + +func (x *QueryKeyByIdRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryKeyByIdRequest)(x) +} + +func (x *QueryKeyByIdRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryKeyByIdRequest_messageType fastReflection_QueryKeyByIdRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryKeyByIdRequest_messageType{} + +type fastReflection_QueryKeyByIdRequest_messageType struct{} + +func (x fastReflection_QueryKeyByIdRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryKeyByIdRequest)(nil) +} +func (x fastReflection_QueryKeyByIdRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryKeyByIdRequest) +} +func (x fastReflection_QueryKeyByIdRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyByIdRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryKeyByIdRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyByIdRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryKeyByIdRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryKeyByIdRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryKeyByIdRequest) New() protoreflect.Message { + return new(fastReflection_QueryKeyByIdRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryKeyByIdRequest) Interface() protoreflect.ProtoMessage { + return (*QueryKeyByIdRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryKeyByIdRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.KeyId != "" { + value := protoreflect.ValueOfString(x.KeyId) + if !f(fd_QueryKeyByIdRequest_key_id, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryKeyByIdRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdRequest.key_id": + return x.KeyId != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryKeyByIdRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdRequest.key_id": + x.KeyId = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryKeyByIdRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryKeyByIdRequest.key_id": + value := x.KeyId + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryKeyByIdRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdRequest.key_id": + x.KeyId = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryKeyByIdRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdRequest.key_id": + panic(fmt.Errorf("field key_id of message utss.v1.QueryKeyByIdRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryKeyByIdRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdRequest.key_id": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryKeyByIdRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryKeyByIdRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryKeyByIdRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryKeyByIdRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryKeyByIdRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryKeyByIdRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryKeyByIdRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.KeyId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryKeyByIdRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.KeyId) > 0 { + i -= len(x.KeyId) + copy(dAtA[i:], x.KeyId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyId))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryKeyByIdRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryKeyByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryKeyByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyId", 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.KeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryKeyByIdResponse protoreflect.MessageDescriptor + fd_QueryKeyByIdResponse_key protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryKeyByIdResponse = File_utss_v1_query_proto.Messages().ByName("QueryKeyByIdResponse") + fd_QueryKeyByIdResponse_key = md_QueryKeyByIdResponse.Fields().ByName("key") +} + +var _ protoreflect.Message = (*fastReflection_QueryKeyByIdResponse)(nil) + +type fastReflection_QueryKeyByIdResponse QueryKeyByIdResponse + +func (x *QueryKeyByIdResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryKeyByIdResponse)(x) +} + +func (x *QueryKeyByIdResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryKeyByIdResponse_messageType fastReflection_QueryKeyByIdResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryKeyByIdResponse_messageType{} + +type fastReflection_QueryKeyByIdResponse_messageType struct{} + +func (x fastReflection_QueryKeyByIdResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryKeyByIdResponse)(nil) +} +func (x fastReflection_QueryKeyByIdResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryKeyByIdResponse) +} +func (x fastReflection_QueryKeyByIdResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyByIdResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryKeyByIdResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryKeyByIdResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryKeyByIdResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryKeyByIdResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryKeyByIdResponse) New() protoreflect.Message { + return new(fastReflection_QueryKeyByIdResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryKeyByIdResponse) Interface() protoreflect.ProtoMessage { + return (*QueryKeyByIdResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryKeyByIdResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Key != nil { + value := protoreflect.ValueOfMessage(x.Key.ProtoReflect()) + if !f(fd_QueryKeyByIdResponse_key, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryKeyByIdResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdResponse.key": + return x.Key != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryKeyByIdResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdResponse.key": + x.Key = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryKeyByIdResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryKeyByIdResponse.key": + value := x.Key + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryKeyByIdResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdResponse.key": + x.Key = value.Message().Interface().(*TssKey) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryKeyByIdResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdResponse.key": + if x.Key == nil { + x.Key = new(TssKey) + } + return protoreflect.ValueOfMessage(x.Key.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryKeyByIdResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryKeyByIdResponse.key": + m := new(TssKey) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryKeyByIdResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryKeyByIdResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryKeyByIdResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryKeyByIdResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryKeyByIdResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryKeyByIdResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryKeyByIdResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryKeyByIdResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryKeyByIdResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Key != nil { + l = options.Size(x.Key) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryKeyByIdResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Key != nil { + encoded, err := options.Marshal(x.Key) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryKeyByIdResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryKeyByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryKeyByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Key == nil { + x.Key = &TssKey{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Key); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryAllKeysRequest protoreflect.MessageDescriptor + fd_QueryAllKeysRequest_pagination protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryAllKeysRequest = File_utss_v1_query_proto.Messages().ByName("QueryAllKeysRequest") + fd_QueryAllKeysRequest_pagination = md_QueryAllKeysRequest.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllKeysRequest)(nil) + +type fastReflection_QueryAllKeysRequest QueryAllKeysRequest + +func (x *QueryAllKeysRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllKeysRequest)(x) +} + +func (x *QueryAllKeysRequest) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAllKeysRequest_messageType fastReflection_QueryAllKeysRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllKeysRequest_messageType{} + +type fastReflection_QueryAllKeysRequest_messageType struct{} + +func (x fastReflection_QueryAllKeysRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllKeysRequest)(nil) +} +func (x fastReflection_QueryAllKeysRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllKeysRequest) +} +func (x fastReflection_QueryAllKeysRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllKeysRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllKeysRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllKeysRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAllKeysRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAllKeysRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllKeysRequest) New() protoreflect.Message { + return new(fastReflection_QueryAllKeysRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllKeysRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAllKeysRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAllKeysRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllKeysRequest_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAllKeysRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryAllKeysRequest.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllKeysRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryAllKeysRequest.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAllKeysRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryAllKeysRequest.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllKeysRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryAllKeysRequest.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllKeysRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllKeysRequest.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageRequest) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAllKeysRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllKeysRequest.pagination": + m := new(v1beta1.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysRequest")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAllKeysRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryAllKeysRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAllKeysRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllKeysRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAllKeysRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAllKeysRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllKeysRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAllKeysRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAllKeysRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllKeysRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryAllKeysResponse_1_list)(nil) + +type _QueryAllKeysResponse_1_list struct { + list *[]*TssKey +} + +func (x *_QueryAllKeysResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryAllKeysResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryAllKeysResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*TssKey) + (*x.list)[i] = concreteValue +} + +func (x *_QueryAllKeysResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*TssKey) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryAllKeysResponse_1_list) AppendMutable() protoreflect.Value { + v := new(TssKey) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllKeysResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryAllKeysResponse_1_list) NewElement() protoreflect.Value { + v := new(TssKey) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryAllKeysResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryAllKeysResponse protoreflect.MessageDescriptor + fd_QueryAllKeysResponse_keys protoreflect.FieldDescriptor + fd_QueryAllKeysResponse_pagination protoreflect.FieldDescriptor +) + +func init() { + file_utss_v1_query_proto_init() + md_QueryAllKeysResponse = File_utss_v1_query_proto.Messages().ByName("QueryAllKeysResponse") + fd_QueryAllKeysResponse_keys = md_QueryAllKeysResponse.Fields().ByName("keys") + fd_QueryAllKeysResponse_pagination = md_QueryAllKeysResponse.Fields().ByName("pagination") +} + +var _ protoreflect.Message = (*fastReflection_QueryAllKeysResponse)(nil) + +type fastReflection_QueryAllKeysResponse QueryAllKeysResponse + +func (x *QueryAllKeysResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAllKeysResponse)(x) +} + +func (x *QueryAllKeysResponse) slowProtoReflect() protoreflect.Message { + mi := &file_utss_v1_query_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryAllKeysResponse_messageType fastReflection_QueryAllKeysResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAllKeysResponse_messageType{} + +type fastReflection_QueryAllKeysResponse_messageType struct{} + +func (x fastReflection_QueryAllKeysResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAllKeysResponse)(nil) +} +func (x fastReflection_QueryAllKeysResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAllKeysResponse) +} +func (x fastReflection_QueryAllKeysResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllKeysResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAllKeysResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAllKeysResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryAllKeysResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAllKeysResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAllKeysResponse) New() protoreflect.Message { + return new(fastReflection_QueryAllKeysResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAllKeysResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAllKeysResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryAllKeysResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Keys) != 0 { + value := protoreflect.ValueOfList(&_QueryAllKeysResponse_1_list{list: &x.Keys}) + if !f(fd_QueryAllKeysResponse_keys, value) { + return + } + } + if x.Pagination != nil { + value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + if !f(fd_QueryAllKeysResponse_pagination, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryAllKeysResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "utss.v1.QueryAllKeysResponse.keys": + return len(x.Keys) != 0 + case "utss.v1.QueryAllKeysResponse.pagination": + return x.Pagination != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllKeysResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "utss.v1.QueryAllKeysResponse.keys": + x.Keys = nil + case "utss.v1.QueryAllKeysResponse.pagination": + x.Pagination = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryAllKeysResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "utss.v1.QueryAllKeysResponse.keys": + if len(x.Keys) == 0 { + return protoreflect.ValueOfList(&_QueryAllKeysResponse_1_list{}) + } + listValue := &_QueryAllKeysResponse_1_list{list: &x.Keys} + return protoreflect.ValueOfList(listValue) + case "utss.v1.QueryAllKeysResponse.pagination": + value := x.Pagination + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllKeysResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "utss.v1.QueryAllKeysResponse.keys": + lv := value.List() + clv := lv.(*_QueryAllKeysResponse_1_list) + x.Keys = *clv.list + case "utss.v1.QueryAllKeysResponse.pagination": + x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllKeysResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllKeysResponse.keys": + if x.Keys == nil { + x.Keys = []*TssKey{} + } + value := &_QueryAllKeysResponse_1_list{list: &x.Keys} + return protoreflect.ValueOfList(value) + case "utss.v1.QueryAllKeysResponse.pagination": + if x.Pagination == nil { + x.Pagination = new(v1beta1.PageResponse) + } + return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryAllKeysResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "utss.v1.QueryAllKeysResponse.keys": + list := []*TssKey{} + return protoreflect.ValueOfList(&_QueryAllKeysResponse_1_list{list: &list}) + case "utss.v1.QueryAllKeysResponse.pagination": + m := new(v1beta1.PageResponse) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: utss.v1.QueryAllKeysResponse")) + } + panic(fmt.Errorf("message utss.v1.QueryAllKeysResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryAllKeysResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in utss.v1.QueryAllKeysResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryAllKeysResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryAllKeysResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryAllKeysResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryAllKeysResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAllKeysResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Keys) > 0 { + for _, e := range x.Keys { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Pagination != nil { + l = options.Size(x.Pagination) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryAllKeysResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Pagination != nil { + encoded, err := options.Marshal(x.Pagination) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Keys) > 0 { + for iNdEx := len(x.Keys) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Keys[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryAllKeysResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllKeysResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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.Keys = append(x.Keys, &TssKey{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Keys[len(x.Keys)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + 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++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + 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 + } + if x.Pagination == nil { + x.Pagination = &v1beta1.PageResponse{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) // source: utss/v1/query.proto -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Messages +type QueryParamsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryParamsRequest) Reset() { + *x = QueryParamsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsRequest) ProtoMessage() {} + +// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{0} +} + +type QueryParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *QueryParamsResponse) Reset() { + *x = QueryParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryParamsResponse) ProtoMessage() {} + +// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryParamsResponse) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +type QueryCurrentProcessRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryCurrentProcessRequest) Reset() { + *x = QueryCurrentProcessRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCurrentProcessRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCurrentProcessRequest) ProtoMessage() {} + +// Deprecated: Use QueryCurrentProcessRequest.ProtoReflect.Descriptor instead. +func (*QueryCurrentProcessRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{2} +} + +type QueryCurrentProcessResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Process *TssKeyProcess `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` +} + +func (x *QueryCurrentProcessResponse) Reset() { + *x = QueryCurrentProcessResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCurrentProcessResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCurrentProcessResponse) ProtoMessage() {} + +// Deprecated: Use QueryCurrentProcessResponse.ProtoReflect.Descriptor instead. +func (*QueryCurrentProcessResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryCurrentProcessResponse) GetProcess() *TssKeyProcess { + if x != nil { + return x.Process + } + return nil +} + +type QueryProcessByIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *QueryProcessByIdRequest) Reset() { + *x = QueryProcessByIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryProcessByIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryProcessByIdRequest) ProtoMessage() {} + +// Deprecated: Use QueryProcessByIdRequest.ProtoReflect.Descriptor instead. +func (*QueryProcessByIdRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryProcessByIdRequest) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +type QueryProcessByIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Process *TssKeyProcess `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` +} + +func (x *QueryProcessByIdResponse) Reset() { + *x = QueryProcessByIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryProcessByIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryProcessByIdResponse) ProtoMessage() {} + +// Deprecated: Use QueryProcessByIdResponse.ProtoReflect.Descriptor instead. +func (*QueryProcessByIdResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryProcessByIdResponse) GetProcess() *TssKeyProcess { + if x != nil { + return x.Process + } + return nil +} + +type QueryAllProcessesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAllProcessesRequest) Reset() { + *x = QueryAllProcessesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllProcessesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllProcessesRequest) ProtoMessage() {} + +// Deprecated: Use QueryAllProcessesRequest.ProtoReflect.Descriptor instead. +func (*QueryAllProcessesRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryAllProcessesRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryAllProcessesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Processes []*TssKeyProcess `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"` + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAllProcessesResponse) Reset() { + *x = QueryAllProcessesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllProcessesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllProcessesResponse) ProtoMessage() {} -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { +// Deprecated: Use QueryAllProcessesResponse.ProtoReflect.Descriptor instead. +func (*QueryAllProcessesResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryAllProcessesResponse) GetProcesses() []*TssKeyProcess { + if x != nil { + return x.Processes + } + return nil +} + +func (x *QueryAllProcessesResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryCurrentKeyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} +func (x *QueryCurrentKeyRequest) Reset() { + *x = QueryCurrentKeyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_utss_v1_query_proto_msgTypes[0] + mi := &file_utss_v1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryParamsRequest) String() string { +func (x *QueryCurrentKeyRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryCurrentKeyRequest) ProtoMessage() {} -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_utss_v1_query_proto_rawDescGZIP(), []int{0} +// Deprecated: Use QueryCurrentKeyRequest.ProtoReflect.Descriptor instead. +func (*QueryCurrentKeyRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{8} } -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { +type QueryCurrentKeyResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + Key *TssKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} +func (x *QueryCurrentKeyResponse) Reset() { + *x = QueryCurrentKeyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_utss_v1_query_proto_msgTypes[1] + mi := &file_utss_v1_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryParamsResponse) String() string { +func (x *QueryCurrentKeyResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryCurrentKeyResponse) ProtoMessage() {} -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_utss_v1_query_proto_rawDescGZIP(), []int{1} +// Deprecated: Use QueryCurrentKeyResponse.ProtoReflect.Descriptor instead. +func (*QueryCurrentKeyResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{9} } -func (x *QueryParamsResponse) GetParams() *Params { +func (x *QueryCurrentKeyResponse) GetKey() *TssKey { if x != nil { - return x.Params + return x.Key + } + return nil +} + +type QueryKeyByIdRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` +} + +func (x *QueryKeyByIdRequest) Reset() { + *x = QueryKeyByIdRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryKeyByIdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryKeyByIdRequest) ProtoMessage() {} + +// Deprecated: Use QueryKeyByIdRequest.ProtoReflect.Descriptor instead. +func (*QueryKeyByIdRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{10} +} + +func (x *QueryKeyByIdRequest) GetKeyId() string { + if x != nil { + return x.KeyId + } + return "" +} + +type QueryKeyByIdResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key *TssKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (x *QueryKeyByIdResponse) Reset() { + *x = QueryKeyByIdResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryKeyByIdResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryKeyByIdResponse) ProtoMessage() {} + +// Deprecated: Use QueryKeyByIdResponse.ProtoReflect.Descriptor instead. +func (*QueryKeyByIdResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{11} +} + +func (x *QueryKeyByIdResponse) GetKey() *TssKey { + if x != nil { + return x.Key + } + return nil +} + +type QueryAllKeysRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAllKeysRequest) Reset() { + *x = QueryAllKeysRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllKeysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllKeysRequest) ProtoMessage() {} + +// Deprecated: Use QueryAllKeysRequest.ProtoReflect.Descriptor instead. +func (*QueryAllKeysRequest) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{12} +} + +func (x *QueryAllKeysRequest) GetPagination() *v1beta1.PageRequest { + if x != nil { + return x.Pagination + } + return nil +} + +type QueryAllKeysResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Keys []*TssKey `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` + Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (x *QueryAllKeysResponse) Reset() { + *x = QueryAllKeysResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_utss_v1_query_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAllKeysResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAllKeysResponse) ProtoMessage() {} + +// Deprecated: Use QueryAllKeysResponse.ProtoReflect.Descriptor instead. +func (*QueryAllKeysResponse) Descriptor() ([]byte, []int) { + return file_utss_v1_query_proto_rawDescGZIP(), []int{13} +} + +func (x *QueryAllKeysResponse) GetKeys() []*TssKey { + if x != nil { + return x.Keys + } + return nil +} + +func (x *QueryAllKeysResponse) GetPagination() *v1beta1.PageResponse { + if x != nil { + return x.Pagination } return nil } @@ -887,31 +6596,133 @@ var file_utss_v1_query_proto_rawDesc = []byte{ 0x0a, 0x13, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x75, 0x74, - 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3e, - 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x13, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3e, 0x0a, 0x13, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x27, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0x29, 0x0a, 0x17, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x30, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, + 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x22, 0x62, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, + 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9a, 0x01, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, + 0x09, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, + 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x18, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, 0x0a, + 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x65, - 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x1b, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x2c, 0x0a, 0x13, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x14, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x21, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x22, 0x5d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, + 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x84, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, + 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, + 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x75, 0x74, 0x73, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x52, 0x04, 0x6b, 0x65, 0x79, + 0x73, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xfc, 0x05, 0x0a, 0x05, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x5c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1b, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x8f, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x74, - 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x74, - 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, - 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x55, - 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x55, - 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x75, 0x74, + 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x11, 0x12, 0x0f, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x7d, 0x0a, 0x0e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x23, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x75, 0x74, 0x73, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x74, 0x12, 0x71, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, + 0x12, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, + 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x2f, + 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x6f, 0x0a, 0x0c, 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, + 0x73, 0x73, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x6d, 0x0a, 0x0a, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, + 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x2f, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x12, 0x65, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x12, + 0x1c, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, + 0x65, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4b, 0x65, 0x79, + 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6b, + 0x65, 0x79, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x5c, 0x0a, 0x07, 0x41, + 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1c, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x75, 0x74, + 0x73, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x42, 0x8f, 0x01, 0x0a, 0x0b, 0x63, 0x6f, + 0x6d, 0x2e, 0x75, 0x74, 0x73, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, + 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x75, 0x74, 0x73, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x74, 0x73, 0x73, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x07, 0x55, 0x74, 0x73, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x55, 0x74, 0x73, + 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x08, 0x55, 0x74, 0x73, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -926,21 +6737,59 @@ func file_utss_v1_query_proto_rawDescGZIP() []byte { return file_utss_v1_query_proto_rawDescData } -var file_utss_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_utss_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_utss_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: utss.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: utss.v1.QueryParamsResponse - (*Params)(nil), // 2: utss.v1.Params + (*QueryParamsRequest)(nil), // 0: utss.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: utss.v1.QueryParamsResponse + (*QueryCurrentProcessRequest)(nil), // 2: utss.v1.QueryCurrentProcessRequest + (*QueryCurrentProcessResponse)(nil), // 3: utss.v1.QueryCurrentProcessResponse + (*QueryProcessByIdRequest)(nil), // 4: utss.v1.QueryProcessByIdRequest + (*QueryProcessByIdResponse)(nil), // 5: utss.v1.QueryProcessByIdResponse + (*QueryAllProcessesRequest)(nil), // 6: utss.v1.QueryAllProcessesRequest + (*QueryAllProcessesResponse)(nil), // 7: utss.v1.QueryAllProcessesResponse + (*QueryCurrentKeyRequest)(nil), // 8: utss.v1.QueryCurrentKeyRequest + (*QueryCurrentKeyResponse)(nil), // 9: utss.v1.QueryCurrentKeyResponse + (*QueryKeyByIdRequest)(nil), // 10: utss.v1.QueryKeyByIdRequest + (*QueryKeyByIdResponse)(nil), // 11: utss.v1.QueryKeyByIdResponse + (*QueryAllKeysRequest)(nil), // 12: utss.v1.QueryAllKeysRequest + (*QueryAllKeysResponse)(nil), // 13: utss.v1.QueryAllKeysResponse + (*Params)(nil), // 14: utss.v1.Params + (*TssKeyProcess)(nil), // 15: utss.v1.TssKeyProcess + (*v1beta1.PageRequest)(nil), // 16: cosmos.base.query.v1beta1.PageRequest + (*v1beta1.PageResponse)(nil), // 17: cosmos.base.query.v1beta1.PageResponse + (*TssKey)(nil), // 18: utss.v1.TssKey } var file_utss_v1_query_proto_depIdxs = []int32{ - 2, // 0: utss.v1.QueryParamsResponse.params:type_name -> utss.v1.Params - 0, // 1: utss.v1.Query.Params:input_type -> utss.v1.QueryParamsRequest - 1, // 2: utss.v1.Query.Params:output_type -> utss.v1.QueryParamsResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 14, // 0: utss.v1.QueryParamsResponse.params:type_name -> utss.v1.Params + 15, // 1: utss.v1.QueryCurrentProcessResponse.process:type_name -> utss.v1.TssKeyProcess + 15, // 2: utss.v1.QueryProcessByIdResponse.process:type_name -> utss.v1.TssKeyProcess + 16, // 3: utss.v1.QueryAllProcessesRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 15, // 4: utss.v1.QueryAllProcessesResponse.processes:type_name -> utss.v1.TssKeyProcess + 17, // 5: utss.v1.QueryAllProcessesResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 18, // 6: utss.v1.QueryCurrentKeyResponse.key:type_name -> utss.v1.TssKey + 18, // 7: utss.v1.QueryKeyByIdResponse.key:type_name -> utss.v1.TssKey + 16, // 8: utss.v1.QueryAllKeysRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest + 18, // 9: utss.v1.QueryAllKeysResponse.keys:type_name -> utss.v1.TssKey + 17, // 10: utss.v1.QueryAllKeysResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse + 0, // 11: utss.v1.Query.Params:input_type -> utss.v1.QueryParamsRequest + 2, // 12: utss.v1.Query.CurrentProcess:input_type -> utss.v1.QueryCurrentProcessRequest + 4, // 13: utss.v1.Query.ProcessById:input_type -> utss.v1.QueryProcessByIdRequest + 6, // 14: utss.v1.Query.AllProcesses:input_type -> utss.v1.QueryAllProcessesRequest + 8, // 15: utss.v1.Query.CurrentKey:input_type -> utss.v1.QueryCurrentKeyRequest + 10, // 16: utss.v1.Query.KeyById:input_type -> utss.v1.QueryKeyByIdRequest + 12, // 17: utss.v1.Query.AllKeys:input_type -> utss.v1.QueryAllKeysRequest + 1, // 18: utss.v1.Query.Params:output_type -> utss.v1.QueryParamsResponse + 3, // 19: utss.v1.Query.CurrentProcess:output_type -> utss.v1.QueryCurrentProcessResponse + 5, // 20: utss.v1.Query.ProcessById:output_type -> utss.v1.QueryProcessByIdResponse + 7, // 21: utss.v1.Query.AllProcesses:output_type -> utss.v1.QueryAllProcessesResponse + 9, // 22: utss.v1.Query.CurrentKey:output_type -> utss.v1.QueryCurrentKeyResponse + 11, // 23: utss.v1.Query.KeyById:output_type -> utss.v1.QueryKeyByIdResponse + 13, // 24: utss.v1.Query.AllKeys:output_type -> utss.v1.QueryAllKeysResponse + 18, // [18:25] is the sub-list for method output_type + 11, // [11:18] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_utss_v1_query_proto_init() } @@ -975,6 +6824,150 @@ func file_utss_v1_query_proto_init() { return nil } } + file_utss_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCurrentProcessRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCurrentProcessResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryProcessByIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryProcessByIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllProcessesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllProcessesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCurrentKeyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCurrentKeyResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryKeyByIdRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryKeyByIdResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllKeysRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_utss_v1_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAllKeysResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -982,7 +6975,7 @@ func file_utss_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_utss_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, diff --git a/api/utss/v1/query_grpc.pb.go b/api/utss/v1/query_grpc.pb.go index dcc7d2a0..e7f37f35 100644 --- a/api/utss/v1/query_grpc.pb.go +++ b/api/utss/v1/query_grpc.pb.go @@ -19,15 +19,33 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/utss.v1.Query/Params" + Query_Params_FullMethodName = "/utss.v1.Query/Params" + Query_CurrentProcess_FullMethodName = "/utss.v1.Query/CurrentProcess" + Query_ProcessById_FullMethodName = "/utss.v1.Query/ProcessById" + Query_AllProcesses_FullMethodName = "/utss.v1.Query/AllProcesses" + Query_CurrentKey_FullMethodName = "/utss.v1.Query/CurrentKey" + Query_KeyById_FullMethodName = "/utss.v1.Query/KeyById" + Query_AllKeys_FullMethodName = "/utss.v1.Query/AllKeys" ) // QueryClient is the client API for Query service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type QueryClient interface { - // Params queries all parameters of the module. + // Params queries module parameters. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Current TSS Process + CurrentProcess(ctx context.Context, in *QueryCurrentProcessRequest, opts ...grpc.CallOption) (*QueryCurrentProcessResponse, error) + // Process by ID + ProcessById(ctx context.Context, in *QueryProcessByIdRequest, opts ...grpc.CallOption) (*QueryProcessByIdResponse, error) + // List all processes (paginated) + AllProcesses(ctx context.Context, in *QueryAllProcessesRequest, opts ...grpc.CallOption) (*QueryAllProcessesResponse, error) + // Current TSS Key + CurrentKey(ctx context.Context, in *QueryCurrentKeyRequest, opts ...grpc.CallOption) (*QueryCurrentKeyResponse, error) + // Get finalized TSS key by key_id + KeyById(ctx context.Context, in *QueryKeyByIdRequest, opts ...grpc.CallOption) (*QueryKeyByIdResponse, error) + // List all finalized keys (paginated) + AllKeys(ctx context.Context, in *QueryAllKeysRequest, opts ...grpc.CallOption) (*QueryAllKeysResponse, error) } type queryClient struct { @@ -47,12 +65,78 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) CurrentProcess(ctx context.Context, in *QueryCurrentProcessRequest, opts ...grpc.CallOption) (*QueryCurrentProcessResponse, error) { + out := new(QueryCurrentProcessResponse) + err := c.cc.Invoke(ctx, Query_CurrentProcess_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ProcessById(ctx context.Context, in *QueryProcessByIdRequest, opts ...grpc.CallOption) (*QueryProcessByIdResponse, error) { + out := new(QueryProcessByIdResponse) + err := c.cc.Invoke(ctx, Query_ProcessById_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllProcesses(ctx context.Context, in *QueryAllProcessesRequest, opts ...grpc.CallOption) (*QueryAllProcessesResponse, error) { + out := new(QueryAllProcessesResponse) + err := c.cc.Invoke(ctx, Query_AllProcesses_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CurrentKey(ctx context.Context, in *QueryCurrentKeyRequest, opts ...grpc.CallOption) (*QueryCurrentKeyResponse, error) { + out := new(QueryCurrentKeyResponse) + err := c.cc.Invoke(ctx, Query_CurrentKey_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) KeyById(ctx context.Context, in *QueryKeyByIdRequest, opts ...grpc.CallOption) (*QueryKeyByIdResponse, error) { + out := new(QueryKeyByIdResponse) + err := c.cc.Invoke(ctx, Query_KeyById_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllKeys(ctx context.Context, in *QueryAllKeysRequest, opts ...grpc.CallOption) (*QueryAllKeysResponse, error) { + out := new(QueryAllKeysResponse) + err := c.cc.Invoke(ctx, Query_AllKeys_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { - // Params queries all parameters of the module. + // Params queries module parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Current TSS Process + CurrentProcess(context.Context, *QueryCurrentProcessRequest) (*QueryCurrentProcessResponse, error) + // Process by ID + ProcessById(context.Context, *QueryProcessByIdRequest) (*QueryProcessByIdResponse, error) + // List all processes (paginated) + AllProcesses(context.Context, *QueryAllProcessesRequest) (*QueryAllProcessesResponse, error) + // Current TSS Key + CurrentKey(context.Context, *QueryCurrentKeyRequest) (*QueryCurrentKeyResponse, error) + // Get finalized TSS key by key_id + KeyById(context.Context, *QueryKeyByIdRequest) (*QueryKeyByIdResponse, error) + // List all finalized keys (paginated) + AllKeys(context.Context, *QueryAllKeysRequest) (*QueryAllKeysResponse, error) mustEmbedUnimplementedQueryServer() } @@ -63,6 +147,24 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (UnimplementedQueryServer) CurrentProcess(context.Context, *QueryCurrentProcessRequest) (*QueryCurrentProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CurrentProcess not implemented") +} +func (UnimplementedQueryServer) ProcessById(context.Context, *QueryProcessByIdRequest) (*QueryProcessByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProcessById not implemented") +} +func (UnimplementedQueryServer) AllProcesses(context.Context, *QueryAllProcessesRequest) (*QueryAllProcessesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllProcesses not implemented") +} +func (UnimplementedQueryServer) CurrentKey(context.Context, *QueryCurrentKeyRequest) (*QueryCurrentKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CurrentKey not implemented") +} +func (UnimplementedQueryServer) KeyById(context.Context, *QueryKeyByIdRequest) (*QueryKeyByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method KeyById not implemented") +} +func (UnimplementedQueryServer) AllKeys(context.Context, *QueryAllKeysRequest) (*QueryAllKeysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllKeys not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -94,6 +196,114 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_CurrentProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCurrentProcessRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CurrentProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_CurrentProcess_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CurrentProcess(ctx, req.(*QueryCurrentProcessRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ProcessById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProcessByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ProcessById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_ProcessById_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ProcessById(ctx, req.(*QueryProcessByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllProcesses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllProcessesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllProcesses(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllProcesses_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllProcesses(ctx, req.(*QueryAllProcessesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CurrentKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCurrentKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CurrentKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_CurrentKey_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CurrentKey(ctx, req.(*QueryCurrentKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_KeyById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryKeyByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).KeyById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_KeyById_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).KeyById(ctx, req.(*QueryKeyByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_AllKeys_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllKeys(ctx, req.(*QueryAllKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -105,6 +315,30 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "CurrentProcess", + Handler: _Query_CurrentProcess_Handler, + }, + { + MethodName: "ProcessById", + Handler: _Query_ProcessById_Handler, + }, + { + MethodName: "AllProcesses", + Handler: _Query_AllProcesses_Handler, + }, + { + MethodName: "CurrentKey", + Handler: _Query_CurrentKey_Handler, + }, + { + MethodName: "KeyById", + Handler: _Query_KeyById_Handler, + }, + { + MethodName: "AllKeys", + Handler: _Query_AllKeys_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "utss/v1/query.proto", From d3d8a75013a411ff3e095ea471c1ea6a03ab9f99 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 12:57:14 +0530 Subject: [PATCH 081/105] feat: added query server implementation --- x/utss/keeper/query_server.go | 104 ++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/x/utss/keeper/query_server.go b/x/utss/keeper/query_server.go index 103c83c3..0ef7d6d2 100755 --- a/x/utss/keeper/query_server.go +++ b/x/utss/keeper/query_server.go @@ -4,6 +4,7 @@ import ( "context" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" "github.com/pushchain/push-chain-node/x/utss/types" ) @@ -18,6 +19,7 @@ func NewQuerier(keeper Keeper) Querier { return Querier{Keeper: keeper} } +// ---------------- Params ------------------ func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { ctx := sdk.UnwrapSDKContext(c) @@ -28,3 +30,105 @@ func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*type return &types.QueryParamsResponse{Params: &p}, nil } + +// ---------------- Current TSS Process ------------------ +func (k Querier) CurrentProcess(goCtx context.Context, req *types.QueryCurrentProcessRequest) (*types.QueryCurrentProcessResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + process, err := k.Keeper.CurrentTssProcess.Get(ctx) + if err != nil { + return nil, err + } + + return &types.QueryCurrentProcessResponse{ + Process: &process, + }, nil +} + +// ---------------- Process By ID ------------------------ +func (k Querier) ProcessById(goCtx context.Context, req *types.QueryProcessByIdRequest) (*types.QueryProcessByIdResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + process, err := k.Keeper.ProcessHistory.Get(ctx, req.Id) + if err != nil { + return nil, err + } + + return &types.QueryProcessByIdResponse{ + Process: &process, + }, nil +} + +// ---------------- All Processes (Paginated) ------------- +func (k Querier) AllProcesses(goCtx context.Context, req *types.QueryAllProcessesRequest) (*types.QueryAllProcessesResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + results, pageRes, err := query.CollectionPaginate( + ctx, + k.Keeper.ProcessHistory, + req.Pagination, + func(id uint64, process types.TssKeyProcess) (*types.TssKeyProcess, error) { + p := process + return &p, nil // return transformed object + }, + ) + if err != nil { + return nil, err + } + + return &types.QueryAllProcessesResponse{ + Processes: results, + Pagination: pageRes, + }, nil +} + +// ---------------- Current TSS Key ----------------------- +func (k Querier) CurrentKey(goCtx context.Context, req *types.QueryCurrentKeyRequest) (*types.QueryCurrentKeyResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + key, err := k.Keeper.CurrentTssKey.Get(ctx) + if err != nil { + return nil, err + } + + return &types.QueryCurrentKeyResponse{ + Key: &key, + }, nil +} + +// ---------------- Key By ID ----------------------------- +func (k Querier) KeyById(goCtx context.Context, req *types.QueryKeyByIdRequest) (*types.QueryKeyByIdResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + key, err := k.Keeper.TssKeyHistory.Get(ctx, req.KeyId) + if err != nil { + return nil, err + } + + return &types.QueryKeyByIdResponse{ + Key: &key, + }, nil +} + +// ---------------- All Keys (Paginated) ------------------- +func (k Querier) AllKeys(goCtx context.Context, req *types.QueryAllKeysRequest) (*types.QueryAllKeysResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + results, pageRes, err := query.CollectionPaginate( + ctx, + k.Keeper.TssKeyHistory, + req.Pagination, + func(id string, key types.TssKey) (*types.TssKey, error) { + kcopy := key + return &kcopy, nil + }, + ) + if err != nil { + return nil, err + } + + return &types.QueryAllKeysResponse{ + Keys: results, + Pagination: pageRes, + }, nil +} From 65630ab453305aa602756717dfe0f3fa064b7c71 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 12:57:26 +0530 Subject: [PATCH 082/105] refactor: added generated protobuf --- x/utss/types/query.pb.go | 2701 ++++++++++++++++++++++++++++++++--- x/utss/types/query.pb.gw.go | 498 +++++++ 2 files changed, 3035 insertions(+), 164 deletions(-) diff --git a/x/utss/types/query.pb.go b/x/utss/types/query.pb.go index b785104d..2707ddac 100644 --- a/x/utss/types/query.pb.go +++ b/x/utss/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + query "github.com/cosmos/cosmos-sdk/types/query" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -28,7 +29,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryParamsRequest is the request type for the Query/Params RPC method. +// Messages type QueryParamsRequest struct { } @@ -65,9 +66,7 @@ func (m *QueryParamsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo -// QueryParamsResponse is the response type for the Query/Params RPC method. type QueryParamsResponse struct { - // params defines the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } @@ -111,214 +110,2518 @@ func (m *QueryParamsResponse) GetParams() *Params { return nil } -func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "utss.v1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "utss.v1.QueryParamsResponse") +type QueryCurrentProcessRequest struct { } -func init() { proto.RegisterFile("utss/v1/query.proto", fileDescriptor_2af2863e9a096df1) } +func (m *QueryCurrentProcessRequest) Reset() { *m = QueryCurrentProcessRequest{} } +func (m *QueryCurrentProcessRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCurrentProcessRequest) ProtoMessage() {} +func (*QueryCurrentProcessRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{2} +} +func (m *QueryCurrentProcessRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCurrentProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCurrentProcessRequest.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 *QueryCurrentProcessRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCurrentProcessRequest.Merge(m, src) +} +func (m *QueryCurrentProcessRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCurrentProcessRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCurrentProcessRequest.DiscardUnknown(m) +} -var fileDescriptor_2af2863e9a096df1 = []byte{ - // 264 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2e, 0x2d, 0x29, 0x2e, - 0xd6, 0x2f, 0x33, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, - 0x62, 0x07, 0x09, 0xea, 0x95, 0x19, 0x4a, 0xc9, 0xa4, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, 0xea, 0x27, - 0x16, 0x64, 0xea, 0x27, 0xe6, 0xe5, 0xe5, 0x97, 0x24, 0x96, 0x64, 0xe6, 0xe7, 0x15, 0x43, 0x94, - 0x49, 0x89, 0xc2, 0xf4, 0xa6, 0xa7, 0xe6, 0xa5, 0x16, 0x67, 0xc2, 0x84, 0xe1, 0x46, 0x96, 0x54, - 0x16, 0xa4, 0x42, 0x05, 0x95, 0x44, 0xb8, 0x84, 0x02, 0x41, 0x36, 0x04, 0x24, 0x16, 0x25, 0xe6, - 0x16, 0x07, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x28, 0xd9, 0x71, 0x09, 0xa3, 0x88, 0x16, 0x17, - 0xe4, 0xe7, 0x15, 0xa7, 0x0a, 0xa9, 0x73, 0xb1, 0x15, 0x80, 0x45, 0x24, 0x18, 0x15, 0x18, 0x35, - 0xb8, 0x8d, 0xf8, 0xf5, 0xa0, 0x0e, 0xd2, 0x83, 0x2a, 0x84, 0x4a, 0x1b, 0xa5, 0x72, 0xb1, 0x82, - 0xf5, 0x0b, 0xc5, 0x70, 0xb1, 0x41, 0xa4, 0x84, 0xa4, 0xe1, 0x6a, 0x31, 0xed, 0x93, 0x92, 0xc1, - 0x2e, 0x09, 0xb1, 0x56, 0x49, 0xbc, 0xe9, 0xf2, 0x93, 0xc9, 0x4c, 0x82, 0x42, 0xfc, 0xfa, 0x30, - 0x1f, 0x40, 0xac, 0x71, 0xf2, 0x3e, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, - 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, - 0xc3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0x82, 0xd2, 0xe2, 0x8c, - 0xe4, 0x8c, 0xc4, 0xcc, 0x3c, 0x30, 0x4b, 0x17, 0xcc, 0xd4, 0xcd, 0xcb, 0x4f, 0x49, 0xd5, 0xaf, - 0x80, 0x18, 0x08, 0x0e, 0x8f, 0x24, 0x36, 0x70, 0x80, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, - 0x47, 0x26, 0xb9, 0xda, 0x7a, 0x01, 0x00, 0x00, +var xxx_messageInfo_QueryCurrentProcessRequest proto.InternalMessageInfo + +type QueryCurrentProcessResponse struct { + Process *TssKeyProcess `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` } -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn +func (m *QueryCurrentProcessResponse) Reset() { *m = QueryCurrentProcessResponse{} } +func (m *QueryCurrentProcessResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCurrentProcessResponse) ProtoMessage() {} +func (*QueryCurrentProcessResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{3} +} +func (m *QueryCurrentProcessResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCurrentProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCurrentProcessResponse.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 *QueryCurrentProcessResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCurrentProcessResponse.Merge(m, src) +} +func (m *QueryCurrentProcessResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCurrentProcessResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCurrentProcessResponse.DiscardUnknown(m) +} -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +var xxx_messageInfo_QueryCurrentProcessResponse proto.InternalMessageInfo -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Params queries all parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +func (m *QueryCurrentProcessResponse) GetProcess() *TssKeyProcess { + if m != nil { + return m.Process + } + return nil } -type queryClient struct { - cc grpc1.ClientConn +type QueryProcessByIdRequest struct { + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} +func (m *QueryProcessByIdRequest) Reset() { *m = QueryProcessByIdRequest{} } +func (m *QueryProcessByIdRequest) String() string { return proto.CompactTextString(m) } +func (*QueryProcessByIdRequest) ProtoMessage() {} +func (*QueryProcessByIdRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{4} +} +func (m *QueryProcessByIdRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProcessByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProcessByIdRequest.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 *QueryProcessByIdRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProcessByIdRequest.Merge(m, src) +} +func (m *QueryProcessByIdRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryProcessByIdRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProcessByIdRequest.DiscardUnknown(m) } -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/utss.v1.Query/Params", in, out, opts...) - if err != nil { - return nil, err +var xxx_messageInfo_QueryProcessByIdRequest proto.InternalMessageInfo + +func (m *QueryProcessByIdRequest) GetId() uint64 { + if m != nil { + return m.Id } - return out, nil + return 0 } -// QueryServer is the server API for Query service. -type QueryServer interface { - // Params queries all parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +type QueryProcessByIdResponse struct { + Process *TssKeyProcess `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"` } -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { +func (m *QueryProcessByIdResponse) Reset() { *m = QueryProcessByIdResponse{} } +func (m *QueryProcessByIdResponse) String() string { return proto.CompactTextString(m) } +func (*QueryProcessByIdResponse) ProtoMessage() {} +func (*QueryProcessByIdResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{5} +} +func (m *QueryProcessByIdResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryProcessByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryProcessByIdResponse.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 *QueryProcessByIdResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryProcessByIdResponse.Merge(m, src) +} +func (m *QueryProcessByIdResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryProcessByIdResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryProcessByIdResponse.DiscardUnknown(m) } -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +var xxx_messageInfo_QueryProcessByIdResponse proto.InternalMessageInfo + +func (m *QueryProcessByIdResponse) GetProcess() *TssKeyProcess { + if m != nil { + return m.Process + } + return nil } -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) +type QueryAllProcessesRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err +func (m *QueryAllProcessesRequest) Reset() { *m = QueryAllProcessesRequest{} } +func (m *QueryAllProcessesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllProcessesRequest) ProtoMessage() {} +func (*QueryAllProcessesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{6} +} +func (m *QueryAllProcessesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllProcessesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllProcessesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) +} +func (m *QueryAllProcessesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllProcessesRequest.Merge(m, src) +} +func (m *QueryAllProcessesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllProcessesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllProcessesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllProcessesRequest proto.InternalMessageInfo + +func (m *QueryAllProcessesRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/utss.v1.Query/Params", + return nil +} + +type QueryAllProcessesResponse struct { + Processes []*TssKeyProcess `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllProcessesResponse) Reset() { *m = QueryAllProcessesResponse{} } +func (m *QueryAllProcessesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllProcessesResponse) ProtoMessage() {} +func (*QueryAllProcessesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{7} +} +func (m *QueryAllProcessesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllProcessesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllProcessesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) +} +func (m *QueryAllProcessesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllProcessesResponse.Merge(m, src) +} +func (m *QueryAllProcessesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllProcessesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllProcessesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllProcessesResponse proto.InternalMessageInfo + +func (m *QueryAllProcessesResponse) GetProcesses() []*TssKeyProcess { + if m != nil { + return m.Processes } - return interceptor(ctx, in, info, handler) + return nil } -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "utss.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "utss/v1/query.proto", +func (m *QueryAllProcessesResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil } -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +type QueryCurrentKeyRequest struct { +} + +func (m *QueryCurrentKeyRequest) Reset() { *m = QueryCurrentKeyRequest{} } +func (m *QueryCurrentKeyRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCurrentKeyRequest) ProtoMessage() {} +func (*QueryCurrentKeyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{8} +} +func (m *QueryCurrentKeyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCurrentKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCurrentKeyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return dAtA[:n], nil +} +func (m *QueryCurrentKeyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCurrentKeyRequest.Merge(m, src) +} +func (m *QueryCurrentKeyRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCurrentKeyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCurrentKeyRequest.DiscardUnknown(m) } -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +var xxx_messageInfo_QueryCurrentKeyRequest proto.InternalMessageInfo + +type QueryCurrentKeyResponse struct { + Key *TssKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil +func (m *QueryCurrentKeyResponse) Reset() { *m = QueryCurrentKeyResponse{} } +func (m *QueryCurrentKeyResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCurrentKeyResponse) ProtoMessage() {} +func (*QueryCurrentKeyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{9} +} +func (m *QueryCurrentKeyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCurrentKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCurrentKeyResponse.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 *QueryCurrentKeyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCurrentKeyResponse.Merge(m, src) +} +func (m *QueryCurrentKeyResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCurrentKeyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCurrentKeyResponse.DiscardUnknown(m) } -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +var xxx_messageInfo_QueryCurrentKeyResponse proto.InternalMessageInfo + +func (m *QueryCurrentKeyResponse) GetKey() *TssKey { + if m != nil { + return m.Key } - return dAtA[:n], nil + return nil } -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +type QueryKeyByIdRequest struct { + KeyId string `protobuf:"bytes,1,opt,name=key_id,json=keyId,proto3" json:"key_id,omitempty"` } -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size +func (m *QueryKeyByIdRequest) Reset() { *m = QueryKeyByIdRequest{} } +func (m *QueryKeyByIdRequest) String() string { return proto.CompactTextString(m) } +func (*QueryKeyByIdRequest) ProtoMessage() {} +func (*QueryKeyByIdRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{10} +} +func (m *QueryKeyByIdRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryKeyByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryKeyByIdRequest.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 *QueryKeyByIdRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryKeyByIdRequest.Merge(m, src) +} +func (m *QueryKeyByIdRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryKeyByIdRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryKeyByIdRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryKeyByIdRequest proto.InternalMessageInfo + +func (m *QueryKeyByIdRequest) GetKeyId() string { + if m != nil { + return m.KeyId + } + return "" +} + +type QueryKeyByIdResponse struct { + Key *TssKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` +} + +func (m *QueryKeyByIdResponse) Reset() { *m = QueryKeyByIdResponse{} } +func (m *QueryKeyByIdResponse) String() string { return proto.CompactTextString(m) } +func (*QueryKeyByIdResponse) ProtoMessage() {} +func (*QueryKeyByIdResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{11} +} +func (m *QueryKeyByIdResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryKeyByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryKeyByIdResponse.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 *QueryKeyByIdResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryKeyByIdResponse.Merge(m, src) +} +func (m *QueryKeyByIdResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryKeyByIdResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryKeyByIdResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryKeyByIdResponse proto.InternalMessageInfo + +func (m *QueryKeyByIdResponse) GetKey() *TssKey { + if m != nil { + return m.Key + } + return nil +} + +type QueryAllKeysRequest struct { + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllKeysRequest) Reset() { *m = QueryAllKeysRequest{} } +func (m *QueryAllKeysRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllKeysRequest) ProtoMessage() {} +func (*QueryAllKeysRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{12} +} +func (m *QueryAllKeysRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllKeysRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllKeysRequest.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 *QueryAllKeysRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllKeysRequest.Merge(m, src) +} +func (m *QueryAllKeysRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllKeysRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllKeysRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllKeysRequest proto.InternalMessageInfo + +func (m *QueryAllKeysRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryAllKeysResponse struct { + Keys []*TssKey `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryAllKeysResponse) Reset() { *m = QueryAllKeysResponse{} } +func (m *QueryAllKeysResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllKeysResponse) ProtoMessage() {} +func (*QueryAllKeysResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2af2863e9a096df1, []int{13} +} +func (m *QueryAllKeysResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllKeysResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllKeysResponse.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 *QueryAllKeysResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllKeysResponse.Merge(m, src) +} +func (m *QueryAllKeysResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllKeysResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllKeysResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllKeysResponse proto.InternalMessageInfo + +func (m *QueryAllKeysResponse) GetKeys() []*TssKey { + if m != nil { + return m.Keys + } + return nil +} + +func (m *QueryAllKeysResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +func init() { + proto.RegisterType((*QueryParamsRequest)(nil), "utss.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "utss.v1.QueryParamsResponse") + proto.RegisterType((*QueryCurrentProcessRequest)(nil), "utss.v1.QueryCurrentProcessRequest") + proto.RegisterType((*QueryCurrentProcessResponse)(nil), "utss.v1.QueryCurrentProcessResponse") + proto.RegisterType((*QueryProcessByIdRequest)(nil), "utss.v1.QueryProcessByIdRequest") + proto.RegisterType((*QueryProcessByIdResponse)(nil), "utss.v1.QueryProcessByIdResponse") + proto.RegisterType((*QueryAllProcessesRequest)(nil), "utss.v1.QueryAllProcessesRequest") + proto.RegisterType((*QueryAllProcessesResponse)(nil), "utss.v1.QueryAllProcessesResponse") + proto.RegisterType((*QueryCurrentKeyRequest)(nil), "utss.v1.QueryCurrentKeyRequest") + proto.RegisterType((*QueryCurrentKeyResponse)(nil), "utss.v1.QueryCurrentKeyResponse") + proto.RegisterType((*QueryKeyByIdRequest)(nil), "utss.v1.QueryKeyByIdRequest") + proto.RegisterType((*QueryKeyByIdResponse)(nil), "utss.v1.QueryKeyByIdResponse") + proto.RegisterType((*QueryAllKeysRequest)(nil), "utss.v1.QueryAllKeysRequest") + proto.RegisterType((*QueryAllKeysResponse)(nil), "utss.v1.QueryAllKeysResponse") +} + +func init() { proto.RegisterFile("utss/v1/query.proto", fileDescriptor_2af2863e9a096df1) } + +var fileDescriptor_2af2863e9a096df1 = []byte{ + // 709 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0x51, 0x4f, 0xd3, 0x50, + 0x14, 0xc7, 0xe9, 0x80, 0x2d, 0x1c, 0x08, 0xe8, 0x65, 0xc0, 0x2c, 0x63, 0x8e, 0x62, 0x44, 0x8d, + 0xb4, 0x0e, 0x7d, 0x31, 0x31, 0x26, 0x60, 0xa2, 0x21, 0x33, 0x11, 0x17, 0x9f, 0x0c, 0xc6, 0x74, + 0xdb, 0xc9, 0x68, 0xb6, 0xf5, 0x96, 0xdd, 0x8e, 0xd8, 0x10, 0x5e, 0x8c, 0x1f, 0xc0, 0xc4, 0x37, + 0x3f, 0x91, 0x8f, 0x24, 0xbe, 0xf8, 0x68, 0xc0, 0x8f, 0xe1, 0x83, 0xd9, 0xbd, 0xa7, 0x5b, 0xdb, + 0x8d, 0x69, 0x0c, 0x6f, 0xdb, 0x3d, 0xff, 0x7b, 0x7e, 0xff, 0xf6, 0xdc, 0xff, 0x2d, 0x2c, 0x76, + 0x7d, 0x21, 0xac, 0xe3, 0x92, 0x75, 0xd4, 0xc5, 0x4e, 0x60, 0x7a, 0x1d, 0xee, 0x73, 0x96, 0xe9, + 0x2d, 0x9a, 0xc7, 0x25, 0x3d, 0xdf, 0xe0, 0xbc, 0xd1, 0x42, 0xcb, 0xf6, 0x1c, 0xcb, 0x76, 0x5d, + 0xee, 0xdb, 0xbe, 0xc3, 0x5d, 0xa1, 0x64, 0xfa, 0xbd, 0x1a, 0x17, 0x6d, 0x2e, 0xac, 0xaa, 0x2d, + 0x50, 0xed, 0xb7, 0x8e, 0x4b, 0x55, 0xf4, 0xed, 0x92, 0xe5, 0xd9, 0x0d, 0xc7, 0x95, 0x62, 0xd2, + 0x2e, 0x85, 0x9c, 0x06, 0xba, 0x28, 0x9c, 0xb0, 0x45, 0x1f, 0xef, 0x07, 0x1e, 0xd2, 0xa2, 0x91, + 0x05, 0xf6, 0xba, 0xd7, 0x6d, 0xdf, 0xee, 0xd8, 0x6d, 0x51, 0xc1, 0xa3, 0x2e, 0x0a, 0xdf, 0x78, + 0x0a, 0x8b, 0xb1, 0x55, 0xe1, 0x71, 0x57, 0x20, 0xdb, 0x84, 0xb4, 0x27, 0x57, 0x72, 0x5a, 0x51, + 0xbb, 0x33, 0xbb, 0xbd, 0x60, 0x92, 0x79, 0x93, 0x84, 0x54, 0x36, 0xf2, 0xa0, 0xcb, 0xfd, 0xcf, + 0xba, 0x9d, 0x0e, 0xba, 0xfe, 0x7e, 0x87, 0xd7, 0x50, 0xf4, 0xbb, 0xbf, 0x82, 0xd5, 0x91, 0x55, + 0xa2, 0x3c, 0x80, 0x8c, 0xa7, 0x96, 0x08, 0xb3, 0xdc, 0xc7, 0xbc, 0x11, 0xa2, 0x8c, 0x41, 0xb8, + 0x21, 0x94, 0x19, 0x77, 0x61, 0x45, 0xd9, 0x55, 0xff, 0x77, 0x83, 0xbd, 0x3a, 0xb1, 0xd8, 0x3c, + 0xa4, 0x9c, 0xba, 0xec, 0x33, 0x55, 0x49, 0x39, 0x75, 0xe3, 0x25, 0xe4, 0x86, 0xa5, 0xff, 0x0d, + 0xae, 0x52, 0xb7, 0x9d, 0x56, 0x8b, 0x6a, 0x18, 0x3e, 0x25, 0x7b, 0x0e, 0x30, 0x98, 0x0c, 0x35, + 0xbc, 0x6d, 0xaa, 0x31, 0x9a, 0xbd, 0x31, 0x9a, 0xea, 0x18, 0xd0, 0x18, 0xcd, 0x7d, 0xbb, 0x81, + 0xb4, 0xb7, 0x12, 0xd9, 0x69, 0x7c, 0xd5, 0xe0, 0xc6, 0x08, 0x08, 0x79, 0x7e, 0x04, 0x33, 0x5e, + 0xb8, 0x98, 0xd3, 0x8a, 0x93, 0x63, 0x5c, 0x0f, 0x84, 0xec, 0x45, 0xcc, 0x5b, 0x4a, 0x7a, 0xdb, + 0xfc, 0xab, 0x37, 0x85, 0x8c, 0x99, 0xcb, 0xc1, 0x72, 0x74, 0x94, 0x65, 0x0c, 0xc2, 0x21, 0x3f, + 0xa1, 0x99, 0x44, 0x2b, 0xe4, 0x79, 0x1d, 0x26, 0x9b, 0x18, 0x0c, 0x9d, 0x21, 0xe5, 0xb6, 0xd2, + 0xab, 0x19, 0xf7, 0xe9, 0x00, 0x96, 0x31, 0x88, 0x4e, 0x73, 0x09, 0xd2, 0x4d, 0x0c, 0xde, 0xd3, + 0x44, 0x67, 0x2a, 0xd3, 0x4d, 0x0c, 0xf6, 0xea, 0xc6, 0x63, 0xc8, 0xc6, 0xd5, 0xff, 0x0e, 0x7a, + 0x47, 0xa0, 0x9d, 0x56, 0xab, 0x8c, 0xc1, 0x95, 0x0f, 0xef, 0x93, 0x46, 0xd6, 0xfa, 0xfd, 0xc9, + 0xda, 0x06, 0x4c, 0x35, 0x31, 0x08, 0x47, 0x36, 0xe4, 0x4d, 0x16, 0xaf, 0x6c, 0x4c, 0xdb, 0xbf, + 0xa7, 0x61, 0x5a, 0xda, 0x60, 0x07, 0x90, 0x56, 0x59, 0x65, 0xab, 0x7d, 0xe6, 0xf0, 0x05, 0xa0, + 0xe7, 0x47, 0x17, 0x55, 0x6b, 0x63, 0xe5, 0xe3, 0xf7, 0x5f, 0x5f, 0x52, 0xd7, 0xd9, 0x82, 0x15, + 0x5e, 0x29, 0x2a, 0xf7, 0xec, 0x14, 0xe6, 0xe3, 0xa1, 0x66, 0x1b, 0xf1, 0x46, 0x23, 0x2f, 0x04, + 0xfd, 0xd6, 0x78, 0x11, 0x51, 0x8b, 0x92, 0xaa, 0xb3, 0xdc, 0x80, 0xaa, 0x14, 0x56, 0x4d, 0x6d, + 0x60, 0x47, 0x30, 0x1b, 0xc9, 0x35, 0x2b, 0x26, 0x1e, 0x62, 0xe8, 0x76, 0xd0, 0xd7, 0xc7, 0x28, + 0x88, 0xba, 0x26, 0xa9, 0x2b, 0x6c, 0x69, 0x88, 0x7a, 0xe2, 0xd4, 0x4f, 0x19, 0x87, 0xb9, 0x68, + 0x2e, 0x59, 0xa2, 0xe3, 0x88, 0x8b, 0x41, 0x37, 0xc6, 0x49, 0x88, 0x9a, 0x93, 0x54, 0xc6, 0xae, + 0x25, 0xa9, 0xac, 0x0d, 0x30, 0x88, 0x14, 0xbb, 0x39, 0xf2, 0xcd, 0x0d, 0x62, 0xa8, 0x17, 0x2f, + 0x17, 0x10, 0x2a, 0x2f, 0x51, 0xcb, 0x2c, 0xdb, 0x47, 0x35, 0x31, 0xe8, 0xbf, 0x52, 0x84, 0x0c, + 0xa5, 0x8a, 0x25, 0xce, 0x44, 0x3c, 0x9a, 0xfa, 0xda, 0x25, 0xd5, 0x4b, 0x5f, 0x63, 0x8f, 0x72, + 0xa2, 0xd2, 0x7c, 0xca, 0x0e, 0x20, 0x43, 0x09, 0x49, 0x62, 0xe2, 0xc1, 0x4c, 0x62, 0x12, 0xb1, + 0x32, 0xb2, 0x12, 0x33, 0xcf, 0xe6, 0xa2, 0x98, 0xdd, 0xf2, 0xb7, 0xf3, 0x82, 0x76, 0x76, 0x5e, + 0xd0, 0x7e, 0x9e, 0x17, 0xb4, 0xcf, 0x17, 0x85, 0x89, 0xb3, 0x8b, 0xc2, 0xc4, 0x8f, 0x8b, 0xc2, + 0xc4, 0xdb, 0x52, 0xc3, 0xf1, 0x0f, 0xbb, 0x55, 0xb3, 0xc6, 0xdb, 0x96, 0xd7, 0x15, 0x87, 0xb5, + 0x43, 0xdb, 0x71, 0xe5, 0xaf, 0x2d, 0xf9, 0x73, 0xcb, 0xe5, 0x75, 0xb4, 0x3e, 0xa8, 0x6e, 0xf2, + 0xbb, 0x59, 0x4d, 0xcb, 0x0f, 0xe7, 0xc3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x0e, 0x10, + 0x32, 0xce, 0x07, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // Params queries module parameters. + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Current TSS Process + CurrentProcess(ctx context.Context, in *QueryCurrentProcessRequest, opts ...grpc.CallOption) (*QueryCurrentProcessResponse, error) + // Process by ID + ProcessById(ctx context.Context, in *QueryProcessByIdRequest, opts ...grpc.CallOption) (*QueryProcessByIdResponse, error) + // List all processes (paginated) + AllProcesses(ctx context.Context, in *QueryAllProcessesRequest, opts ...grpc.CallOption) (*QueryAllProcessesResponse, error) + // Current TSS Key + CurrentKey(ctx context.Context, in *QueryCurrentKeyRequest, opts ...grpc.CallOption) (*QueryCurrentKeyResponse, error) + // Get finalized TSS key by key_id + KeyById(ctx context.Context, in *QueryKeyByIdRequest, opts ...grpc.CallOption) (*QueryKeyByIdResponse, error) + // List all finalized keys (paginated) + AllKeys(ctx context.Context, in *QueryAllKeysRequest, opts ...grpc.CallOption) (*QueryAllKeysResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CurrentProcess(ctx context.Context, in *QueryCurrentProcessRequest, opts ...grpc.CallOption) (*QueryCurrentProcessResponse, error) { + out := new(QueryCurrentProcessResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/CurrentProcess", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ProcessById(ctx context.Context, in *QueryProcessByIdRequest, opts ...grpc.CallOption) (*QueryProcessByIdResponse, error) { + out := new(QueryProcessByIdResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/ProcessById", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllProcesses(ctx context.Context, in *QueryAllProcessesRequest, opts ...grpc.CallOption) (*QueryAllProcessesResponse, error) { + out := new(QueryAllProcessesResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/AllProcesses", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) CurrentKey(ctx context.Context, in *QueryCurrentKeyRequest, opts ...grpc.CallOption) (*QueryCurrentKeyResponse, error) { + out := new(QueryCurrentKeyResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/CurrentKey", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) KeyById(ctx context.Context, in *QueryKeyByIdRequest, opts ...grpc.CallOption) (*QueryKeyByIdResponse, error) { + out := new(QueryKeyByIdResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/KeyById", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllKeys(ctx context.Context, in *QueryAllKeysRequest, opts ...grpc.CallOption) (*QueryAllKeysResponse, error) { + out := new(QueryAllKeysResponse) + err := c.cc.Invoke(ctx, "/utss.v1.Query/AllKeys", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // Params queries module parameters. + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Current TSS Process + CurrentProcess(context.Context, *QueryCurrentProcessRequest) (*QueryCurrentProcessResponse, error) + // Process by ID + ProcessById(context.Context, *QueryProcessByIdRequest) (*QueryProcessByIdResponse, error) + // List all processes (paginated) + AllProcesses(context.Context, *QueryAllProcessesRequest) (*QueryAllProcessesResponse, error) + // Current TSS Key + CurrentKey(context.Context, *QueryCurrentKeyRequest) (*QueryCurrentKeyResponse, error) + // Get finalized TSS key by key_id + KeyById(context.Context, *QueryKeyByIdRequest) (*QueryKeyByIdResponse, error) + // List all finalized keys (paginated) + AllKeys(context.Context, *QueryAllKeysRequest) (*QueryAllKeysResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} +func (*UnimplementedQueryServer) CurrentProcess(ctx context.Context, req *QueryCurrentProcessRequest) (*QueryCurrentProcessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CurrentProcess not implemented") +} +func (*UnimplementedQueryServer) ProcessById(ctx context.Context, req *QueryProcessByIdRequest) (*QueryProcessByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProcessById not implemented") +} +func (*UnimplementedQueryServer) AllProcesses(ctx context.Context, req *QueryAllProcessesRequest) (*QueryAllProcessesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllProcesses not implemented") +} +func (*UnimplementedQueryServer) CurrentKey(ctx context.Context, req *QueryCurrentKeyRequest) (*QueryCurrentKeyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CurrentKey not implemented") +} +func (*UnimplementedQueryServer) KeyById(ctx context.Context, req *QueryKeyByIdRequest) (*QueryKeyByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method KeyById not implemented") +} +func (*UnimplementedQueryServer) AllKeys(ctx context.Context, req *QueryAllKeysRequest) (*QueryAllKeysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllKeys not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CurrentProcess_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCurrentProcessRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CurrentProcess(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/CurrentProcess", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CurrentProcess(ctx, req.(*QueryCurrentProcessRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ProcessById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryProcessByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ProcessById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/ProcessById", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ProcessById(ctx, req.(*QueryProcessByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllProcesses_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllProcessesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllProcesses(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/AllProcesses", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllProcesses(ctx, req.(*QueryAllProcessesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_CurrentKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCurrentKeyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CurrentKey(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/CurrentKey", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CurrentKey(ctx, req.(*QueryCurrentKeyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_KeyById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryKeyByIdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).KeyById(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/KeyById", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).KeyById(ctx, req.(*QueryKeyByIdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllKeysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllKeys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/utss.v1.Query/AllKeys", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllKeys(ctx, req.(*QueryAllKeysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "utss.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + { + MethodName: "CurrentProcess", + Handler: _Query_CurrentProcess_Handler, + }, + { + MethodName: "ProcessById", + Handler: _Query_ProcessById_Handler, + }, + { + MethodName: "AllProcesses", + Handler: _Query_AllProcesses_Handler, + }, + { + MethodName: "CurrentKey", + Handler: _Query_CurrentKey_Handler, + }, + { + MethodName: "KeyById", + Handler: _Query_KeyById_Handler, + }, + { + MethodName: "AllKeys", + Handler: _Query_AllKeys_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "utss/v1/query.proto", +} + +func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCurrentProcessRequest) 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 *QueryCurrentProcessRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCurrentProcessRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryCurrentProcessResponse) 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 *QueryCurrentProcessResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCurrentProcessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Process != nil { + { + size, err := m.Process.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryProcessByIdRequest) 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 *QueryProcessByIdRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProcessByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryProcessByIdResponse) 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 *QueryProcessByIdResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryProcessByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Process != nil { + { + size, err := m.Process.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllProcessesRequest) 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 *QueryAllProcessesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllProcessesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllProcessesResponse) 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 *QueryAllProcessesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllProcessesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Processes) > 0 { + for iNdEx := len(m.Processes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Processes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryCurrentKeyRequest) 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 *QueryCurrentKeyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCurrentKeyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryCurrentKeyResponse) 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 *QueryCurrentKeyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCurrentKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Key != nil { + { + size, err := m.Key.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryKeyByIdRequest) 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 *QueryKeyByIdRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryKeyByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.KeyId) > 0 { + i -= len(m.KeyId) + copy(dAtA[i:], m.KeyId) + i = encodeVarintQuery(dAtA, i, uint64(len(m.KeyId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryKeyByIdResponse) 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 *QueryKeyByIdResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryKeyByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Key != nil { + { + size, err := m.Key.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllKeysRequest) 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 *QueryAllKeysRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllKeysRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryAllKeysResponse) 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 *QueryAllKeysResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAllKeysResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size i = encodeVarintQuery(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa + i-- + dAtA[i] = 0x12 + } + if len(m.Keys) > 0 { + for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Keys[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCurrentProcessRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryCurrentProcessResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Process != nil { + l = m.Process.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryProcessByIdRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + return n +} + +func (m *QueryProcessByIdResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Process != nil { + l = m.Process.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllProcessesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllProcessesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Processes) > 0 { + for _, e := range m.Processes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCurrentKeyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryCurrentKeyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Key != nil { + l = m.Key.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryKeyByIdRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.KeyId) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryKeyByIdResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Key != nil { + l = m.Key.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllKeysRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllKeysResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Keys) > 0 { + for _, e := range m.Keys { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryParamsRequest) 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 ErrIntOverflowQuery + } + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) 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 ErrIntOverflowQuery + } + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentProcessRequest) 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 ErrIntOverflowQuery + } + 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: QueryCurrentProcessRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentProcessRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentProcessResponse) 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 ErrIntOverflowQuery + } + 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: QueryCurrentProcessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentProcessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Process", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Process == nil { + m.Process = &TssKeyProcess{} + } + if err := m.Process.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProcessByIdRequest) 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 ErrIntOverflowQuery + } + 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: QueryProcessByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProcessByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryProcessByIdResponse) 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 ErrIntOverflowQuery + } + 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: QueryProcessByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryProcessByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Process", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Process == nil { + m.Process = &TssKeyProcess{} + } + if err := m.Process.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllProcessesRequest) 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 ErrIntOverflowQuery + } + 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: QueryAllProcessesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllProcessesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryAllProcessesResponse) 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 ErrIntOverflowQuery + } + 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: QueryAllProcessesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllProcessesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Processes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Processes = append(m.Processes, &TssKeyProcess{}) + if err := m.Processes[len(m.Processes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentKeyRequest) 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 ErrIntOverflowQuery + } + 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: QueryCurrentKeyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentKeyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCurrentKeyResponse) 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 ErrIntOverflowQuery + } + 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: QueryCurrentKeyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCurrentKeyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Key == nil { + m.Key = &TssKey{} + } + if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - return len(dAtA) - i, nil -} -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ + if iNdEx > l { + return io.ErrUnexpectedEOF } - dAtA[offset] = uint8(v) - return base + return nil } -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 +func (m *QueryKeyByIdRequest) 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 ErrIntOverflowQuery + } + 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: QueryKeyByIdRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryKeyByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - var l int - _ = l - return n -} -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Params != nil { - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n + return nil } +func (m *QueryKeyByIdResponse) 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 ErrIntOverflowQuery + } + 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: QueryKeyByIdResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryKeyByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Key == nil { + m.Key = &TssKey{} + } + if err := m.Key.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllKeysRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -341,12 +2644,48 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllKeysRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllKeysRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -368,7 +2707,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllKeysResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -391,15 +2730,15 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllKeysResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllKeysResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Keys", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -426,10 +2765,44 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Params == nil { - m.Params = &Params{} + m.Keys = append(m.Keys, &TssKey{}) + if err := m.Keys[len(m.Keys)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/utss/types/query.pb.gw.go b/x/utss/types/query.pb.gw.go index d003c7c8..bcf795a0 100644 --- a/x/utss/types/query.pb.gw.go +++ b/x/utss/types/query.pb.gw.go @@ -51,6 +51,222 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +func request_Query_CurrentProcess_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCurrentProcessRequest + var metadata runtime.ServerMetadata + + msg, err := client.CurrentProcess(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CurrentProcess_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCurrentProcessRequest + var metadata runtime.ServerMetadata + + msg, err := server.CurrentProcess(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ProcessById_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProcessByIdRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.ProcessById(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ProcessById_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryProcessByIdRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.ProcessById(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllProcesses_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllProcesses_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllProcessesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllProcesses_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllProcesses(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllProcesses_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllProcessesRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllProcesses_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllProcesses(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_CurrentKey_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCurrentKeyRequest + var metadata runtime.ServerMetadata + + msg, err := client.CurrentKey(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_CurrentKey_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCurrentKeyRequest + var metadata runtime.ServerMetadata + + msg, err := server.CurrentKey(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_KeyById_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryKeyByIdRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["key_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key_id") + } + + protoReq.KeyId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key_id", err) + } + + msg, err := client.KeyById(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_KeyById_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryKeyByIdRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["key_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key_id") + } + + protoReq.KeyId, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key_id", err) + } + + msg, err := server.KeyById(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_AllKeys_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_AllKeys_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllKeysRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllKeys_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AllKeys(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_AllKeys_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllKeysRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_AllKeys_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AllKeys(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -80,6 +296,144 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_CurrentProcess_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CurrentProcess_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CurrentProcess_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ProcessById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ProcessById_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ProcessById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllProcesses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllProcesses_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllProcesses_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CurrentKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CurrentKey_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CurrentKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_KeyById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_KeyById_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_KeyById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_AllKeys_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -141,13 +495,157 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_CurrentProcess_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CurrentProcess_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CurrentProcess_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ProcessById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ProcessById_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ProcessById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllProcesses_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AllProcesses_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllProcesses_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_CurrentKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CurrentKey_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CurrentKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_KeyById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_KeyById_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_KeyById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_AllKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_AllKeys_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_AllKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"utss", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_CurrentProcess_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"utss", "v1", "process", "current"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ProcessById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"utss", "v1", "process", "id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllProcesses_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"utss", "v1", "process"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_CurrentKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"utss", "v1", "key", "current"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_KeyById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"utss", "v1", "key", "key_id"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_AllKeys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"utss", "v1", "key"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_CurrentProcess_0 = runtime.ForwardResponseMessage + + forward_Query_ProcessById_0 = runtime.ForwardResponseMessage + + forward_Query_AllProcesses_0 = runtime.ForwardResponseMessage + + forward_Query_CurrentKey_0 = runtime.ForwardResponseMessage + + forward_Query_KeyById_0 = runtime.ForwardResponseMessage + + forward_Query_AllKeys_0 = runtime.ForwardResponseMessage ) From 49e47708d722fbe93fb0df4717ca550627f8825b Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 13:06:49 +0530 Subject: [PATCH 083/105] refactor: updated admin address of utss to actual prod admin --- x/utss/types/params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/utss/types/params.go b/x/utss/types/params.go index a269f2af..b137d735 100755 --- a/x/utss/types/params.go +++ b/x/utss/types/params.go @@ -7,7 +7,7 @@ import ( // DefaultParams returns default module parameters. func DefaultParams() Params { return Params{ - Admin: "push1gjaw568e35hjc8udhat0xnsxxmkm2snrexxz20", + Admin: "push1negskcfqu09j5zvpk7nhvacnwyy2mafffy7r6a", } } From 308c72e5921eb8b9479b178bf57f2d8c2cd82fcc Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 16:24:53 +0530 Subject: [PATCH 084/105] refactor: reduced the default tss process expiry block to 500 --- x/utss/types/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/utss/types/constants.go b/x/utss/types/constants.go index c258c577..155c5a03 100644 --- a/x/utss/types/constants.go +++ b/x/utss/types/constants.go @@ -6,5 +6,5 @@ const ( VotesThresholdDenominator = 3 // Default number of blocks after which tss process expires - DefaultTssProcessExpiryAfterBlocks = 1000 + DefaultTssProcessExpiryAfterBlocks = 500 ) From 5a8a1729fc65c6b237cede2660af7675280cb5b3 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 16:29:16 +0530 Subject: [PATCH 085/105] refactor: updated the tss process initiation event to emit participants list --- x/utss/keeper/initiate_tss_key_process.go | 2 +- x/utss/types/events.go | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/x/utss/keeper/initiate_tss_key_process.go b/x/utss/keeper/initiate_tss_key_process.go index 4ac36dee..11f630f9 100644 --- a/x/utss/keeper/initiate_tss_key_process.go +++ b/x/utss/keeper/initiate_tss_key_process.go @@ -71,7 +71,7 @@ func (k Keeper) InitiateTssKeyProcess( event, err := types.NewTssProcessInitiatedEvent(types.TssProcessInitiatedEvent{ ProcessID: process.Id, ProcessType: process.ProcessType.String(), - Participants: len(process.Participants), + Participants: process.Participants, ExpiryHeight: process.ExpiryHeight, }) if err != nil { diff --git a/x/utss/types/events.go b/x/utss/types/events.go index 0836debe..628da06a 100644 --- a/x/utss/types/events.go +++ b/x/utss/types/events.go @@ -14,10 +14,10 @@ const ( // TssProcessInitiatedEvent represents the emitted event when a new TSS key process starts. type TssProcessInitiatedEvent struct { - ProcessID uint64 `json:"process_id"` - ProcessType string `json:"process_type"` - Participants int `json:"participants"` - ExpiryHeight int64 `json:"expiry_height"` + ProcessID uint64 `json:"process_id"` + ProcessType string `json:"process_type"` + Participants []string `json:"participants"` + ExpiryHeight int64 `json:"expiry_height"` } // NewTssProcessInitiatedEvent creates and returns a Cosmos SDK event. @@ -27,11 +27,16 @@ func NewTssProcessInitiatedEvent(e TssProcessInitiatedEvent) (sdk.Event, error) return sdk.Event{}, fmt.Errorf("failed to marshal event: %w", err) } + participantsJSON, err := json.Marshal(e.Participants) + if err != nil { + return sdk.Event{}, fmt.Errorf("failed to marshal participants: %w", err) + } + event := sdk.NewEvent( EventTypeTssProcessInitiated, sdk.NewAttribute("process_id", fmt.Sprintf("%d", e.ProcessID)), sdk.NewAttribute("process_type", e.ProcessType), - sdk.NewAttribute("participants", fmt.Sprintf("%d", e.Participants)), + sdk.NewAttribute("participants", string(participantsJSON)), sdk.NewAttribute("expiry_height", fmt.Sprintf("%d", e.ExpiryHeight)), sdk.NewAttribute("data", string(bz)), // full JSON payload for off-chain consumption ) From 1019a2a042ffc242f76f26c023e2c8a764ad6f7c Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 16:39:34 +0530 Subject: [PATCH 086/105] refactor: modified the tss voting ballot to use tss process participants as eligible voters --- x/utss/keeper/voting.go | 24 +++++------------------- x/utss/types/events.go | 2 +- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/x/utss/keeper/voting.go b/x/utss/keeper/voting.go index eac7ba2d..55a1d156 100644 --- a/x/utss/keeper/voting.go +++ b/x/utss/keeper/voting.go @@ -21,11 +21,6 @@ func (k Keeper) VoteOnTssBallot( sdkCtx := sdk.UnwrapSDKContext(ctx) ballotKey := types.GetTssBallotKey(processId, tssPubKey, keyId) - universalValidatorSet, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) - if err != nil { - return false, false, err - } - // Check if a current process exists and is still active (not expired and pending) existing, err := k.CurrentTssProcess.Get(ctx) if err != nil { @@ -45,27 +40,18 @@ func (k Keeper) VoteOnTssBallot( expiryHeight := existing.ExpiryHeight - // number of validators - totalValidators := len(universalValidatorSet) - - // votesNeeded = ceil(2/3 * totalValidators) - // >2/3 quorum similar to tendermint - votesNeeded := (types.VotesThresholdNumerator*totalValidators)/types.VotesThresholdDenominator + 1 - - // Convert []sdk.ValAddress -> []string - universalValidatorSetStrs := make([]string, len(universalValidatorSet)) - for i, v := range universalValidatorSet { - universalValidatorSetStrs[i] = v.IdentifyInfo.CoreValidatorAddress - } + // votesNeeded = number of participants in the tss process + // 100% quorum needed + votesNeeded := len(existing.Participants) - // Step 2: Call VoteOnBallot for this inbound synthetic + // Step 2: Call VoteOnBallot for tss _, isFinalized, isNew, err = k.uvalidatorKeeper.VoteOnBallot( ctx, ballotKey, uvalidatortypes.BallotObservationType_BALLOT_OBSERVATION_TYPE_TSS_KEY, universalValidator.String(), uvalidatortypes.VoteResult_VOTE_RESULT_SUCCESS, - universalValidatorSetStrs, + existing.Participants, int64(votesNeeded), expiryHeight, ) diff --git a/x/utss/types/events.go b/x/utss/types/events.go index 628da06a..c59b515f 100644 --- a/x/utss/types/events.go +++ b/x/utss/types/events.go @@ -47,7 +47,7 @@ func NewTssProcessInitiatedEvent(e TssProcessInitiatedEvent) (sdk.Event, error) // String returns a readable log for CLI. func (e TssProcessInitiatedEvent) String() string { return fmt.Sprintf( - "TSS process initiated | ID: %d | Type: %s | Participants: %d | ExpiryHeight: %d", + "TSS process initiated | ID: %d | Type: %s | Participants: %v | ExpiryHeight: %d", e.ProcessID, e.ProcessType, e.Participants, e.ExpiryHeight, ) } From ed33bcdceccec75d802a5f064d94c36a3379e4ce Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 17 Nov 2025 16:55:08 +0530 Subject: [PATCH 087/105] fix: fixed the expiryAfterBlocks in tss voting --- x/utss/keeper/voting.go | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/x/utss/keeper/voting.go b/x/utss/keeper/voting.go index 55a1d156..5dbdc042 100644 --- a/x/utss/keeper/voting.go +++ b/x/utss/keeper/voting.go @@ -34,15 +34,25 @@ func (k Keeper) VoteOnTssBallot( ) } - if sdkCtx.BlockHeight() >= existing.ExpiryHeight { - return false, false, fmt.Errorf("process expired") + currentHeight := sdkCtx.BlockHeight() + + // ensure process hasn't expired + if currentHeight >= existing.ExpiryHeight { + return false, false, fmt.Errorf("process expired at height %d (current %d)", existing.ExpiryHeight, currentHeight) } - expiryHeight := existing.ExpiryHeight + // compute delta = number of blocks from now until expiry + expiryAfterBlocks := existing.ExpiryHeight - currentHeight + if expiryAfterBlocks <= 0 { + return false, false, fmt.Errorf("invalid expiry delta: %d", expiryAfterBlocks) + } // votesNeeded = number of participants in the tss process // 100% quorum needed - votesNeeded := len(existing.Participants) + votesNeeded := int64(len(existing.Participants)) + if votesNeeded <= 0 { + return false, false, fmt.Errorf("no participants in process %d", processId) + } // Step 2: Call VoteOnBallot for tss _, isFinalized, isNew, err = k.uvalidatorKeeper.VoteOnBallot( @@ -53,7 +63,7 @@ func (k Keeper) VoteOnTssBallot( uvalidatortypes.VoteResult_VOTE_RESULT_SUCCESS, existing.Participants, int64(votesNeeded), - expiryHeight, + expiryAfterBlocks, ) if err != nil { return false, false, err From 59c9d2cf7dc72d5b45531fd7ca8d6a0571f24bd2 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 18 Nov 2025 15:00:40 +0530 Subject: [PATCH 088/105] refactor: added schemaBuilder in uvalidator module --- x/uvalidator/keeper/keeper.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/x/uvalidator/keeper/keeper.go b/x/uvalidator/keeper/keeper.go index ec11daaa..65b80430 100755 --- a/x/uvalidator/keeper/keeper.go +++ b/x/uvalidator/keeper/keeper.go @@ -19,7 +19,8 @@ import ( type Keeper struct { cdc codec.BinaryCodec - logger log.Logger + logger log.Logger + schemaBuilder *collections.SchemaBuilder // state management Params collections.Item[types.Params] @@ -59,8 +60,9 @@ func NewKeeper( } k := Keeper{ - cdc: cdc, - logger: logger, + cdc: cdc, + logger: logger, + schemaBuilder: sb, Params: collections.NewItem(sb, types.ParamsKey, types.ParamsName, codec.CollValue[types.Params](cdc)), @@ -145,3 +147,7 @@ func (k *Keeper) SetHooks(h types.UValidatorHooks) *Keeper { k.hooks = h return k } + +func (k Keeper) SchemaBuilder() *collections.SchemaBuilder { + return k.schemaBuilder +} From 624eed8417ccf8a1f8495f7957561eaa8bb48451 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 18 Nov 2025 15:01:35 +0530 Subject: [PATCH 089/105] feat: created migration script for migrating universal validator set --- x/uvalidator/migrations/v2/migrate.go | 62 +++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 x/uvalidator/migrations/v2/migrate.go diff --git a/x/uvalidator/migrations/v2/migrate.go b/x/uvalidator/migrations/v2/migrate.go new file mode 100644 index 00000000..5b424355 --- /dev/null +++ b/x/uvalidator/migrations/v2/migrate.go @@ -0,0 +1,62 @@ +package v2 + +import ( + "cosmossdk.io/collections" + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/pushchain/push-chain-node/x/uvalidator/keeper" + "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +func MigrateUniversalValidatorSet(ctx sdk.Context, k *keeper.Keeper, cdc codec.BinaryCodec) error { + sb := k.SchemaBuilder() + + // Old KeySet -> only stored validator addresses + oldKeySet := collections.NewKeySet( + sb, + types.CoreValidatorSetKey, + types.CoreValidatorSetName, + sdk.ValAddressKey, // ValAddressKey + ) + + iter, err := oldKeySet.Iterate(ctx, nil) + if err != nil { + return err + } + defer iter.Close() + + for ; iter.Valid(); iter.Next() { + valAddr, err := iter.Key() + if err != nil { + return err + } + + // Build new UniversalValidator struct here with temporary params + newVal := types.UniversalValidator{ + IdentifyInfo: &types.IdentityInfo{ + CoreValidatorAddress: valAddr.String(), + Pubkey: "pubkey-temp", + }, + NetworkInfo: &types.NetworkInfo{ + Ip: "1.1.1.1", + }, + LifecycleInfo: &types.LifecycleInfo{ + CurrentStatus: types.UVStatus_UV_STATUS_PENDING_JOIN, + History: []*types.LifecycleEvent{ + { + Status: types.UVStatus_UV_STATUS_PENDING_JOIN, + BlockHeight: ctx.BlockHeight(), + }, + }, + }, + } + + // Write into new Map + if err := k.UniversalValidatorSet.Set(ctx, valAddr, newVal); err != nil { + return err + } + } + + return nil +} From 60079c0e10c2daea821b5d8f293dbe8f4b198e60 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 18 Nov 2025 15:02:03 +0530 Subject: [PATCH 090/105] refactor: registered migrations for uvalidator module --- x/uvalidator/module.go | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/x/uvalidator/module.go b/x/uvalidator/module.go index 7e47eab5..6baaba9f 100755 --- a/x/uvalidator/module.go +++ b/x/uvalidator/module.go @@ -3,6 +3,7 @@ package module import ( "context" "encoding/json" + "fmt" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" @@ -19,12 +20,13 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" "github.com/pushchain/push-chain-node/x/uvalidator/keeper" + v2 "github.com/pushchain/push-chain-node/x/uvalidator/migrations/v2" "github.com/pushchain/push-chain-node/x/uvalidator/types" ) const ( // ConsensusVersion defines the current x/uvalidator module consensus version. - ConsensusVersion = 1 + ConsensusVersion = 2 ) var ( @@ -148,6 +150,19 @@ func (a AppModule) QuerierRoute() string { func (a AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(a.keeper)) types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(a.keeper)) + + // Register UValidator custom migration for v2 (from version 1 → 2) + if err := cfg.RegisterMigration(types.ModuleName, 1, a.migrateToV2()); err != nil { + panic(fmt.Sprintf("failed to migrate %s from version 1 to 2: %v", types.ModuleName, err)) + } +} + +func (a AppModule) migrateToV2() module.MigrationHandler { + return func(ctx sdk.Context) error { + ctx.Logger().Info("🔧 Running uvalidator module migration: v1 → v2") + + return v2.MigrateUniversalValidatorSet(ctx, &a.keeper, a.AppModuleBasic.cdc) + } } // ConsensusVersion is a sequence number for state-breaking change of the From 2aa72d042f25e60c08e8bfbb85d74b77e25942b1 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 18 Nov 2025 15:02:36 +0530 Subject: [PATCH 091/105] feat: created the upgrade handler for new tss-core upgrade --- app/upgrades.go | 2 ++ app/upgrades/tss-core/upgrades.go | 41 +++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 app/upgrades/tss-core/upgrades.go diff --git a/app/upgrades.go b/app/upgrades.go index b996d569..22cdc8bf 100755 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -12,6 +12,7 @@ import ( "github.com/pushchain/push-chain-node/app/upgrades/noop" pcmintcap "github.com/pushchain/push-chain-node/app/upgrades/pc-mint-cap" solanafix "github.com/pushchain/push-chain-node/app/upgrades/solana-fix" + tsscore "github.com/pushchain/push-chain-node/app/upgrades/tss-core" ) // Upgrades list of chain upgrades @@ -21,6 +22,7 @@ var Upgrades = []upgrades.Upgrade{ ethhashfix.NewUpgrade(), gasoracle.NewUpgrade(), pcmintcap.NewUpgrade(), + tsscore.NewUpgrade(), } // RegisterUpgradeHandlers registers the chain upgrade handlers diff --git a/app/upgrades/tss-core/upgrades.go b/app/upgrades/tss-core/upgrades.go new file mode 100644 index 00000000..4eaf8294 --- /dev/null +++ b/app/upgrades/tss-core/upgrades.go @@ -0,0 +1,41 @@ +package inbound + +import ( + "context" + + upgradetypes "cosmossdk.io/x/upgrade/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + + storetypes "cosmossdk.io/store/types" + "github.com/pushchain/push-chain-node/app/upgrades" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" +) + +const UpgradeName = "tss-core" + +// NewUpgrade constructs the upgrade definition +func NewUpgrade() upgrades.Upgrade { + return upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: storetypes.StoreUpgrades{ + Added: []string{utsstypes.StoreKey}, + Deleted: []string{}, + }, + } +} + +func CreateUpgradeHandler( + mm upgrades.ModuleManager, + configurator module.Configurator, + ak *upgrades.AppKeepers, +) upgradetypes.UpgradeHandler { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + sdkCtx.Logger().Info("🔧 Running upgrade:", "name", UpgradeName) + + // Run module migrations + return mm.RunMigrations(ctx, configurator, fromVM) + } +} From 1e1d593f8ca7043b0b2c35703e2790c49a173780 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 16:18:06 +0530 Subject: [PATCH 092/105] refactor: updated validator proto files for new NetworkInfo changes --- proto/uvalidator/v1/tx.proto | 10 ++-------- proto/uvalidator/v1/validator.proto | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/proto/uvalidator/v1/tx.proto b/proto/uvalidator/v1/tx.proto index b000898a..02804012 100755 --- a/proto/uvalidator/v1/tx.proto +++ b/proto/uvalidator/v1/tx.proto @@ -61,9 +61,6 @@ message MsgAddUniversalValidator { // core_validator_address is the address of the core validator. string core_validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - // pubkey is the consensus public key for this universal validator - string pubkey = 3; - // network metadata for validator node (IP, etc.) NetworkInfo network = 4; } @@ -80,11 +77,8 @@ message MsgUpdateUniversalValidator { // core_validator_address is the address of the core validator. string core_validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - // pubkey is the consensus public key for this universal validator - string pubkey = 3; - - // network metadata for validator node (IP, etc.) - NetworkInfo network = 4; + // network metadata for validator node + NetworkInfo network = 3; } message MsgUpdateUniversalValidatorResponse {} diff --git a/proto/uvalidator/v1/validator.proto b/proto/uvalidator/v1/validator.proto index 66ac59d3..c7f888e3 100644 --- a/proto/uvalidator/v1/validator.proto +++ b/proto/uvalidator/v1/validator.proto @@ -23,7 +23,6 @@ message IdentityInfo { option (gogoproto.equal) = true; string core_validator_address = 1; // Core validator address - string pubkey = 2; // Validator consensus public key } // Validator network metadata @@ -31,7 +30,8 @@ message NetworkInfo { option (amino.name) = "uvalidator/network_info"; option (gogoproto.equal) = true; - string ip = 1; // Node IP address + string peer_id = 1; + repeated string multi_addrs = 2; } // Lifecycle event info From ab6c09391472d55d8ccc954acffee088fb6ba283 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 16:18:22 +0530 Subject: [PATCH 093/105] refactor: added generated protobuf --- api/uvalidator/v1/tx.pulsar.go | 197 ++----------- api/uvalidator/v1/validator.pulsar.go | 395 +++++++++++++++----------- 2 files changed, 252 insertions(+), 340 deletions(-) diff --git a/api/uvalidator/v1/tx.pulsar.go b/api/uvalidator/v1/tx.pulsar.go index 2eeacdb6..0fa2826b 100644 --- a/api/uvalidator/v1/tx.pulsar.go +++ b/api/uvalidator/v1/tx.pulsar.go @@ -875,7 +875,6 @@ var ( md_MsgAddUniversalValidator protoreflect.MessageDescriptor fd_MsgAddUniversalValidator_signer protoreflect.FieldDescriptor fd_MsgAddUniversalValidator_core_validator_address protoreflect.FieldDescriptor - fd_MsgAddUniversalValidator_pubkey protoreflect.FieldDescriptor fd_MsgAddUniversalValidator_network protoreflect.FieldDescriptor ) @@ -884,7 +883,6 @@ func init() { md_MsgAddUniversalValidator = File_uvalidator_v1_tx_proto.Messages().ByName("MsgAddUniversalValidator") fd_MsgAddUniversalValidator_signer = md_MsgAddUniversalValidator.Fields().ByName("signer") fd_MsgAddUniversalValidator_core_validator_address = md_MsgAddUniversalValidator.Fields().ByName("core_validator_address") - fd_MsgAddUniversalValidator_pubkey = md_MsgAddUniversalValidator.Fields().ByName("pubkey") fd_MsgAddUniversalValidator_network = md_MsgAddUniversalValidator.Fields().ByName("network") } @@ -965,12 +963,6 @@ func (x *fastReflection_MsgAddUniversalValidator) Range(f func(protoreflect.Fiel return } } - if x.Pubkey != "" { - value := protoreflect.ValueOfString(x.Pubkey) - if !f(fd_MsgAddUniversalValidator_pubkey, value) { - return - } - } if x.Network != nil { value := protoreflect.ValueOfMessage(x.Network.ProtoReflect()) if !f(fd_MsgAddUniversalValidator_network, value) { @@ -996,8 +988,6 @@ func (x *fastReflection_MsgAddUniversalValidator) Has(fd protoreflect.FieldDescr return x.Signer != "" case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": return x.CoreValidatorAddress != "" - case "uvalidator.v1.MsgAddUniversalValidator.pubkey": - return x.Pubkey != "" case "uvalidator.v1.MsgAddUniversalValidator.network": return x.Network != nil default: @@ -1020,8 +1010,6 @@ func (x *fastReflection_MsgAddUniversalValidator) Clear(fd protoreflect.FieldDes x.Signer = "" case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": x.CoreValidatorAddress = "" - case "uvalidator.v1.MsgAddUniversalValidator.pubkey": - x.Pubkey = "" case "uvalidator.v1.MsgAddUniversalValidator.network": x.Network = nil default: @@ -1046,9 +1034,6 @@ func (x *fastReflection_MsgAddUniversalValidator) Get(descriptor protoreflect.Fi case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": value := x.CoreValidatorAddress return protoreflect.ValueOfString(value) - case "uvalidator.v1.MsgAddUniversalValidator.pubkey": - value := x.Pubkey - return protoreflect.ValueOfString(value) case "uvalidator.v1.MsgAddUniversalValidator.network": value := x.Network return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -1076,8 +1061,6 @@ func (x *fastReflection_MsgAddUniversalValidator) Set(fd protoreflect.FieldDescr x.Signer = value.Interface().(string) case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": x.CoreValidatorAddress = value.Interface().(string) - case "uvalidator.v1.MsgAddUniversalValidator.pubkey": - x.Pubkey = value.Interface().(string) case "uvalidator.v1.MsgAddUniversalValidator.network": x.Network = value.Message().Interface().(*NetworkInfo) default: @@ -1109,8 +1092,6 @@ func (x *fastReflection_MsgAddUniversalValidator) Mutable(fd protoreflect.FieldD panic(fmt.Errorf("field signer of message uvalidator.v1.MsgAddUniversalValidator is not mutable")) case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.MsgAddUniversalValidator is not mutable")) - case "uvalidator.v1.MsgAddUniversalValidator.pubkey": - panic(fmt.Errorf("field pubkey of message uvalidator.v1.MsgAddUniversalValidator is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgAddUniversalValidator")) @@ -1128,8 +1109,6 @@ func (x *fastReflection_MsgAddUniversalValidator) NewField(fd protoreflect.Field return protoreflect.ValueOfString("") case "uvalidator.v1.MsgAddUniversalValidator.core_validator_address": return protoreflect.ValueOfString("") - case "uvalidator.v1.MsgAddUniversalValidator.pubkey": - return protoreflect.ValueOfString("") case "uvalidator.v1.MsgAddUniversalValidator.network": m := new(NetworkInfo) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -1210,10 +1189,6 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Pubkey) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.Network != nil { l = options.Size(x.Network) n += 1 + l + runtime.Sov(uint64(l)) @@ -1261,13 +1236,6 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met i-- dAtA[i] = 0x22 } - if len(x.Pubkey) > 0 { - i -= len(x.Pubkey) - copy(dAtA[i:], x.Pubkey) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pubkey))) - i-- - dAtA[i] = 0x1a - } if len(x.CoreValidatorAddress) > 0 { i -= len(x.CoreValidatorAddress) copy(dAtA[i:], x.CoreValidatorAddress) @@ -1395,38 +1363,6 @@ func (x *fastReflection_MsgAddUniversalValidator) ProtoMethods() *protoiface.Met } x.CoreValidatorAddress = 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 Pubkey", 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.Pubkey = 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 Network", wireType) @@ -1858,7 +1794,6 @@ var ( md_MsgUpdateUniversalValidator protoreflect.MessageDescriptor fd_MsgUpdateUniversalValidator_signer protoreflect.FieldDescriptor fd_MsgUpdateUniversalValidator_core_validator_address protoreflect.FieldDescriptor - fd_MsgUpdateUniversalValidator_pubkey protoreflect.FieldDescriptor fd_MsgUpdateUniversalValidator_network protoreflect.FieldDescriptor ) @@ -1867,7 +1802,6 @@ func init() { md_MsgUpdateUniversalValidator = File_uvalidator_v1_tx_proto.Messages().ByName("MsgUpdateUniversalValidator") fd_MsgUpdateUniversalValidator_signer = md_MsgUpdateUniversalValidator.Fields().ByName("signer") fd_MsgUpdateUniversalValidator_core_validator_address = md_MsgUpdateUniversalValidator.Fields().ByName("core_validator_address") - fd_MsgUpdateUniversalValidator_pubkey = md_MsgUpdateUniversalValidator.Fields().ByName("pubkey") fd_MsgUpdateUniversalValidator_network = md_MsgUpdateUniversalValidator.Fields().ByName("network") } @@ -1948,12 +1882,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) Range(f func(protoreflect.F return } } - if x.Pubkey != "" { - value := protoreflect.ValueOfString(x.Pubkey) - if !f(fd_MsgUpdateUniversalValidator_pubkey, value) { - return - } - } if x.Network != nil { value := protoreflect.ValueOfMessage(x.Network.ProtoReflect()) if !f(fd_MsgUpdateUniversalValidator_network, value) { @@ -1979,8 +1907,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) Has(fd protoreflect.FieldDe return x.Signer != "" case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": return x.CoreValidatorAddress != "" - case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": - return x.Pubkey != "" case "uvalidator.v1.MsgUpdateUniversalValidator.network": return x.Network != nil default: @@ -2003,8 +1929,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) Clear(fd protoreflect.Field x.Signer = "" case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": x.CoreValidatorAddress = "" - case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": - x.Pubkey = "" case "uvalidator.v1.MsgUpdateUniversalValidator.network": x.Network = nil default: @@ -2029,9 +1953,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) Get(descriptor protoreflect case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": value := x.CoreValidatorAddress return protoreflect.ValueOfString(value) - case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": - value := x.Pubkey - return protoreflect.ValueOfString(value) case "uvalidator.v1.MsgUpdateUniversalValidator.network": value := x.Network return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -2059,8 +1980,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) Set(fd protoreflect.FieldDe x.Signer = value.Interface().(string) case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": x.CoreValidatorAddress = value.Interface().(string) - case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": - x.Pubkey = value.Interface().(string) case "uvalidator.v1.MsgUpdateUniversalValidator.network": x.Network = value.Message().Interface().(*NetworkInfo) default: @@ -2092,8 +2011,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) Mutable(fd protoreflect.Fie panic(fmt.Errorf("field signer of message uvalidator.v1.MsgUpdateUniversalValidator is not mutable")) case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.MsgUpdateUniversalValidator is not mutable")) - case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": - panic(fmt.Errorf("field pubkey of message uvalidator.v1.MsgUpdateUniversalValidator is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) @@ -2111,8 +2028,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) NewField(fd protoreflect.Fi return protoreflect.ValueOfString("") case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": return protoreflect.ValueOfString("") - case "uvalidator.v1.MsgUpdateUniversalValidator.pubkey": - return protoreflect.ValueOfString("") case "uvalidator.v1.MsgUpdateUniversalValidator.network": m := new(NetworkInfo) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -2193,10 +2108,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) ProtoMethods() *protoiface. if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Pubkey) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.Network != nil { l = options.Size(x.Network) n += 1 + l + runtime.Sov(uint64(l)) @@ -2242,13 +2153,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) ProtoMethods() *protoiface. copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x22 - } - if len(x.Pubkey) > 0 { - i -= len(x.Pubkey) - copy(dAtA[i:], x.Pubkey) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pubkey))) - i-- dAtA[i] = 0x1a } if len(x.CoreValidatorAddress) > 0 { @@ -2379,38 +2283,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) ProtoMethods() *protoiface. x.CoreValidatorAddress = 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 Pubkey", 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.Pubkey = 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 Network", wireType) } @@ -3779,8 +3651,6 @@ type MsgAddUniversalValidator struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // core_validator_address is the address of the core validator. CoreValidatorAddress string `protobuf:"bytes,2,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` - // pubkey is the consensus public key for this universal validator - Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` // network metadata for validator node (IP, etc.) Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` } @@ -3819,13 +3689,6 @@ func (x *MsgAddUniversalValidator) GetCoreValidatorAddress() string { return "" } -func (x *MsgAddUniversalValidator) GetPubkey() string { - if x != nil { - return x.Pubkey - } - return "" -} - func (x *MsgAddUniversalValidator) GetNetwork() *NetworkInfo { if x != nil { return x.Network @@ -3868,10 +3731,8 @@ type MsgUpdateUniversalValidator struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // core_validator_address is the address of the core validator. CoreValidatorAddress string `protobuf:"bytes,2,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` - // pubkey is the consensus public key for this universal validator - Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - // network metadata for validator node (IP, etc.) - Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` + // network metadata for validator node + Network *NetworkInfo `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` } func (x *MsgUpdateUniversalValidator) Reset() { @@ -3908,13 +3769,6 @@ func (x *MsgUpdateUniversalValidator) GetCoreValidatorAddress() string { return "" } -func (x *MsgUpdateUniversalValidator) GetPubkey() string { - if x != nil { - return x.Pubkey - } - return "" -} - func (x *MsgUpdateUniversalValidator) GetNetwork() *NetworkInfo { if x != nil { return x.Network @@ -4046,7 +3900,7 @@ var file_uvalidator_v1_tx_proto_rawDesc = []byte{ 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, 0x22, 0xa8, 0x02, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x41, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x90, 0x02, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, @@ -4057,30 +3911,27 @@ var file_uvalidator_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x33, 0x82, - 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x23, 0x75, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, - 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xae, 0x02, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, - 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, - 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x07, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, + 0x34, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x33, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x23, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, + 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x96, + 0x02, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, + 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x12, 0x57, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x36, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, diff --git a/api/uvalidator/v1/validator.pulsar.go b/api/uvalidator/v1/validator.pulsar.go index b34f0a2d..dbe58f07 100644 --- a/api/uvalidator/v1/validator.pulsar.go +++ b/api/uvalidator/v1/validator.pulsar.go @@ -17,14 +17,12 @@ import ( var ( md_IdentityInfo protoreflect.MessageDescriptor fd_IdentityInfo_core_validator_address protoreflect.FieldDescriptor - fd_IdentityInfo_pubkey protoreflect.FieldDescriptor ) func init() { file_uvalidator_v1_validator_proto_init() md_IdentityInfo = File_uvalidator_v1_validator_proto.Messages().ByName("IdentityInfo") fd_IdentityInfo_core_validator_address = md_IdentityInfo.Fields().ByName("core_validator_address") - fd_IdentityInfo_pubkey = md_IdentityInfo.Fields().ByName("pubkey") } var _ protoreflect.Message = (*fastReflection_IdentityInfo)(nil) @@ -98,12 +96,6 @@ func (x *fastReflection_IdentityInfo) Range(f func(protoreflect.FieldDescriptor, return } } - if x.Pubkey != "" { - value := protoreflect.ValueOfString(x.Pubkey) - if !f(fd_IdentityInfo_pubkey, value) { - return - } - } } // Has reports whether a field is populated. @@ -121,8 +113,6 @@ func (x *fastReflection_IdentityInfo) Has(fd protoreflect.FieldDescriptor) bool switch fd.FullName() { case "uvalidator.v1.IdentityInfo.core_validator_address": return x.CoreValidatorAddress != "" - case "uvalidator.v1.IdentityInfo.pubkey": - return x.Pubkey != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) @@ -141,8 +131,6 @@ func (x *fastReflection_IdentityInfo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "uvalidator.v1.IdentityInfo.core_validator_address": x.CoreValidatorAddress = "" - case "uvalidator.v1.IdentityInfo.pubkey": - x.Pubkey = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) @@ -162,9 +150,6 @@ func (x *fastReflection_IdentityInfo) Get(descriptor protoreflect.FieldDescripto case "uvalidator.v1.IdentityInfo.core_validator_address": value := x.CoreValidatorAddress return protoreflect.ValueOfString(value) - case "uvalidator.v1.IdentityInfo.pubkey": - value := x.Pubkey - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) @@ -187,8 +172,6 @@ func (x *fastReflection_IdentityInfo) Set(fd protoreflect.FieldDescriptor, value switch fd.FullName() { case "uvalidator.v1.IdentityInfo.core_validator_address": x.CoreValidatorAddress = value.Interface().(string) - case "uvalidator.v1.IdentityInfo.pubkey": - x.Pubkey = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) @@ -211,8 +194,6 @@ func (x *fastReflection_IdentityInfo) Mutable(fd protoreflect.FieldDescriptor) p switch fd.FullName() { case "uvalidator.v1.IdentityInfo.core_validator_address": panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.IdentityInfo is not mutable")) - case "uvalidator.v1.IdentityInfo.pubkey": - panic(fmt.Errorf("field pubkey of message uvalidator.v1.IdentityInfo is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) @@ -228,8 +209,6 @@ func (x *fastReflection_IdentityInfo) NewField(fd protoreflect.FieldDescriptor) switch fd.FullName() { case "uvalidator.v1.IdentityInfo.core_validator_address": return protoreflect.ValueOfString("") - case "uvalidator.v1.IdentityInfo.pubkey": - return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.IdentityInfo")) @@ -303,10 +282,6 @@ func (x *fastReflection_IdentityInfo) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Pubkey) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -336,13 +311,6 @@ func (x *fastReflection_IdentityInfo) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Pubkey) > 0 { - i -= len(x.Pubkey) - copy(dAtA[i:], x.Pubkey) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Pubkey))) - i-- - dAtA[i] = 0x12 - } if len(x.CoreValidatorAddress) > 0 { i -= len(x.CoreValidatorAddress) copy(dAtA[i:], x.CoreValidatorAddress) @@ -431,38 +399,6 @@ func (x *fastReflection_IdentityInfo) ProtoMethods() *protoiface.Methods { } x.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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.Pubkey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -498,15 +434,63 @@ func (x *fastReflection_IdentityInfo) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_NetworkInfo_2_list)(nil) + +type _NetworkInfo_2_list struct { + list *[]string +} + +func (x *_NetworkInfo_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_NetworkInfo_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_NetworkInfo_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_NetworkInfo_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_NetworkInfo_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message NetworkInfo at list field MultiAddrs as it is not of Message kind")) +} + +func (x *_NetworkInfo_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_NetworkInfo_2_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_NetworkInfo_2_list) IsValid() bool { + return x.list != nil +} + var ( - md_NetworkInfo protoreflect.MessageDescriptor - fd_NetworkInfo_ip protoreflect.FieldDescriptor + md_NetworkInfo protoreflect.MessageDescriptor + fd_NetworkInfo_peer_id protoreflect.FieldDescriptor + fd_NetworkInfo_multi_addrs protoreflect.FieldDescriptor ) func init() { file_uvalidator_v1_validator_proto_init() md_NetworkInfo = File_uvalidator_v1_validator_proto.Messages().ByName("NetworkInfo") - fd_NetworkInfo_ip = md_NetworkInfo.Fields().ByName("ip") + fd_NetworkInfo_peer_id = md_NetworkInfo.Fields().ByName("peer_id") + fd_NetworkInfo_multi_addrs = md_NetworkInfo.Fields().ByName("multi_addrs") } var _ protoreflect.Message = (*fastReflection_NetworkInfo)(nil) @@ -574,9 +558,15 @@ func (x *fastReflection_NetworkInfo) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_NetworkInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Ip != "" { - value := protoreflect.ValueOfString(x.Ip) - if !f(fd_NetworkInfo_ip, value) { + if x.PeerId != "" { + value := protoreflect.ValueOfString(x.PeerId) + if !f(fd_NetworkInfo_peer_id, value) { + return + } + } + if len(x.MultiAddrs) != 0 { + value := protoreflect.ValueOfList(&_NetworkInfo_2_list{list: &x.MultiAddrs}) + if !f(fd_NetworkInfo_multi_addrs, value) { return } } @@ -595,8 +585,10 @@ func (x *fastReflection_NetworkInfo) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_NetworkInfo) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "uvalidator.v1.NetworkInfo.ip": - return x.Ip != "" + case "uvalidator.v1.NetworkInfo.peer_id": + return x.PeerId != "" + case "uvalidator.v1.NetworkInfo.multi_addrs": + return len(x.MultiAddrs) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) @@ -613,8 +605,10 @@ func (x *fastReflection_NetworkInfo) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_NetworkInfo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "uvalidator.v1.NetworkInfo.ip": - x.Ip = "" + case "uvalidator.v1.NetworkInfo.peer_id": + x.PeerId = "" + case "uvalidator.v1.NetworkInfo.multi_addrs": + x.MultiAddrs = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) @@ -631,9 +625,15 @@ func (x *fastReflection_NetworkInfo) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_NetworkInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "uvalidator.v1.NetworkInfo.ip": - value := x.Ip + case "uvalidator.v1.NetworkInfo.peer_id": + value := x.PeerId return protoreflect.ValueOfString(value) + case "uvalidator.v1.NetworkInfo.multi_addrs": + if len(x.MultiAddrs) == 0 { + return protoreflect.ValueOfList(&_NetworkInfo_2_list{}) + } + listValue := &_NetworkInfo_2_list{list: &x.MultiAddrs} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) @@ -654,8 +654,12 @@ func (x *fastReflection_NetworkInfo) Get(descriptor protoreflect.FieldDescriptor // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_NetworkInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "uvalidator.v1.NetworkInfo.ip": - x.Ip = value.Interface().(string) + case "uvalidator.v1.NetworkInfo.peer_id": + x.PeerId = value.Interface().(string) + case "uvalidator.v1.NetworkInfo.multi_addrs": + lv := value.List() + clv := lv.(*_NetworkInfo_2_list) + x.MultiAddrs = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) @@ -676,8 +680,14 @@ func (x *fastReflection_NetworkInfo) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_NetworkInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uvalidator.v1.NetworkInfo.ip": - panic(fmt.Errorf("field ip of message uvalidator.v1.NetworkInfo is not mutable")) + case "uvalidator.v1.NetworkInfo.multi_addrs": + if x.MultiAddrs == nil { + x.MultiAddrs = []string{} + } + value := &_NetworkInfo_2_list{list: &x.MultiAddrs} + return protoreflect.ValueOfList(value) + case "uvalidator.v1.NetworkInfo.peer_id": + panic(fmt.Errorf("field peer_id of message uvalidator.v1.NetworkInfo is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) @@ -691,8 +701,11 @@ func (x *fastReflection_NetworkInfo) Mutable(fd protoreflect.FieldDescriptor) pr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_NetworkInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uvalidator.v1.NetworkInfo.ip": + case "uvalidator.v1.NetworkInfo.peer_id": return protoreflect.ValueOfString("") + case "uvalidator.v1.NetworkInfo.multi_addrs": + list := []string{} + return protoreflect.ValueOfList(&_NetworkInfo_2_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.NetworkInfo")) @@ -762,10 +775,16 @@ func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Ip) + l = len(x.PeerId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if len(x.MultiAddrs) > 0 { + for _, s := range x.MultiAddrs { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -795,10 +814,19 @@ func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Ip) > 0 { - i -= len(x.Ip) - copy(dAtA[i:], x.Ip) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Ip))) + if len(x.MultiAddrs) > 0 { + for iNdEx := len(x.MultiAddrs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.MultiAddrs[iNdEx]) + copy(dAtA[i:], x.MultiAddrs[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MultiAddrs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.PeerId) > 0 { + i -= len(x.PeerId) + copy(dAtA[i:], x.PeerId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PeerId))) i-- dAtA[i] = 0xa } @@ -853,7 +881,7 @@ func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -881,7 +909,39 @@ func (x *fastReflection_NetworkInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Ip = string(dAtA[iNdEx:postIndex]) + x.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MultiAddrs", 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.MultiAddrs = append(x.MultiAddrs, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -2581,7 +2641,6 @@ type IdentityInfo struct { unknownFields protoimpl.UnknownFields CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` // Core validator address - Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` // Validator consensus public key } func (x *IdentityInfo) Reset() { @@ -2611,20 +2670,14 @@ func (x *IdentityInfo) GetCoreValidatorAddress() string { return "" } -func (x *IdentityInfo) GetPubkey() string { - if x != nil { - return x.Pubkey - } - return "" -} - // Validator network metadata type NetworkInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` // Node IP address + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + MultiAddrs []string `protobuf:"bytes,2,rep,name=multi_addrs,json=multiAddrs,proto3" json:"multi_addrs,omitempty"` } func (x *NetworkInfo) Reset() { @@ -2647,13 +2700,20 @@ func (*NetworkInfo) Descriptor() ([]byte, []int) { return file_uvalidator_v1_validator_proto_rawDescGZIP(), []int{1} } -func (x *NetworkInfo) GetIp() string { +func (x *NetworkInfo) GetPeerId() string { if x != nil { - return x.Ip + return x.PeerId } return "" } +func (x *NetworkInfo) GetMultiAddrs() []string { + if x != nil { + return x.MultiAddrs + } + return nil +} + // Lifecycle event info type LifecycleEvent struct { state protoimpl.MessageState @@ -2802,77 +2862,78 @@ var file_uvalidator_v1_validator_proto_rawDesc = []byte{ 0x0d, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7f, 0x0a, 0x0c, 0x49, 0x64, 0x65, 0x6e, 0x74, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x67, 0x0a, 0x0c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, - 0x75, 0x62, 0x6b, 0x65, 0x79, 0x3a, 0x21, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, - 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x3f, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x3a, 0x20, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, - 0x2a, 0x17, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x0e, 0x4c, 0x69, - 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x75, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x56, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, - 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x3a, 0x23, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x75, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, - 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0xab, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, - 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3e, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x17, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, - 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, - 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x3a, 0x21, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x75, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x6c, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x22, 0x87, 0x02, 0x0a, 0x12, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x40, 0x0a, 0x0d, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x0c, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, - 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x43, 0x0a, 0x0e, 0x6c, - 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x0d, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x3a, 0x2b, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2a, 0x92, 0x01, - 0x0a, 0x08, 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x56, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, - 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, - 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x56, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x45, 0x41, - 0x56, 0x45, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x1a, 0x04, 0xa8, 0xa4, - 0x1e, 0x01, 0x42, 0xbd, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, - 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x21, 0xe8, + 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x22, 0x69, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x17, 0x0a, 0x07, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x70, 0x65, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x41, 0x64, 0x64, 0x72, 0x73, 0x3a, 0x20, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, + 0xe7, 0xb0, 0x2a, 0x17, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x0e, + 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2f, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, + 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x3a, 0x23, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, + 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x22, 0xab, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x66, 0x65, + 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3e, 0x0a, 0x0e, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x17, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x68, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, + 0x79, 0x63, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x79, 0x3a, 0x21, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x6c, 0x65, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x87, 0x02, 0x0a, 0x12, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x40, 0x0a, 0x0d, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x0c, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, + 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x43, 0x0a, + 0x0e, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x6c, 0x69, 0x66, 0x65, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x3a, 0x2b, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, + 0x1e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2a, + 0x92, 0x01, 0x0a, 0x08, 0x55, 0x56, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x15, + 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x56, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, + 0x16, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, + 0x4e, 0x47, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x55, 0x56, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4c, + 0x45, 0x41, 0x56, 0x45, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x56, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x1a, 0x04, + 0xa8, 0xa4, 0x1e, 0x01, 0x42, 0xbd, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, + 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From e3c607223f5d7636220fcf428ac82c020c7cf30b Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 16:18:51 +0530 Subject: [PATCH 094/105] refactor: added validation in networkInfo validateBasic --- x/uvalidator/types/network_info.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/x/uvalidator/types/network_info.go b/x/uvalidator/types/network_info.go index 739f9fec..f58d4204 100644 --- a/x/uvalidator/types/network_info.go +++ b/x/uvalidator/types/network_info.go @@ -7,12 +7,19 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -// Validate does the sanity check on the params. +// Validate does the sanity check on the network_info params. func (p NetworkInfo) ValidateBasic() error { - // Validate ip is non-empty - ip := strings.TrimSpace(p.Ip) - if ip == "" { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "ip cannot be empty") + peerId := strings.TrimSpace(p.PeerId) + if peerId == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "peerId cannot be empty") + } + + if p.MultiAddrs == nil { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "multi_addrs cannot be nil") + } + + if len(p.MultiAddrs) == 0 { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "multi_addrs must contain at least one value") } return nil From 80ed5b3558a5e8b80041eb25f2d58e6fbdab8ee6 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 16:19:27 +0530 Subject: [PATCH 095/105] refactor: updated identityInfo to remove pubkey --- x/uvalidator/types/identity_info.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/x/uvalidator/types/identity_info.go b/x/uvalidator/types/identity_info.go index c3f1da6e..99197f57 100644 --- a/x/uvalidator/types/identity_info.go +++ b/x/uvalidator/types/identity_info.go @@ -1,11 +1,8 @@ package types import ( - "strings" - "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) // Validate does the sanity check on the IdentityInfo message type. @@ -16,11 +13,5 @@ func (p IdentityInfo) ValidateBasic() error { return errors.Wrap(err, "invalid core validator address") } - // Validate pubkey is non-empty - pubkey := strings.TrimSpace(p.Pubkey) - if pubkey == "" { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "pubkey cannot be empty") - } - return nil } From d9ed98f354b2f79edc8d3b508151cc9670e3a858 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 16:20:17 +0530 Subject: [PATCH 096/105] refactor: removed pubKey from add and update validator endpoints --- x/uvalidator/types/msg_add_universal_validator.go | 10 ---------- x/uvalidator/types/msg_update_universal_validator.go | 11 ----------- 2 files changed, 21 deletions(-) diff --git a/x/uvalidator/types/msg_add_universal_validator.go b/x/uvalidator/types/msg_add_universal_validator.go index e8085a34..db388637 100644 --- a/x/uvalidator/types/msg_add_universal_validator.go +++ b/x/uvalidator/types/msg_add_universal_validator.go @@ -1,11 +1,8 @@ package types import ( - "strings" - "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var ( @@ -22,7 +19,6 @@ func NewMsgAddUniversalValidator( return &MsgAddUniversalValidator{ Signer: sender.String(), CoreValidatorAddress: coreValidatorAddress.String(), - Pubkey: pubKey, Network: &network, } } @@ -56,11 +52,5 @@ func (msg *MsgAddUniversalValidator) ValidateBasic() error { return errors.Wrap(err, "invalid core validator address") } - // Validate pubkey is non-empty - pubkey := strings.TrimSpace(msg.Pubkey) - if pubkey == "" { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "pubkey cannot be empty") - } - return msg.Network.ValidateBasic() } diff --git a/x/uvalidator/types/msg_update_universal_validator.go b/x/uvalidator/types/msg_update_universal_validator.go index 4a1da6a0..90d585ac 100644 --- a/x/uvalidator/types/msg_update_universal_validator.go +++ b/x/uvalidator/types/msg_update_universal_validator.go @@ -1,11 +1,8 @@ package types import ( - "strings" - "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) var ( @@ -16,13 +13,11 @@ var ( func NewMsgUpdateUniversalValidator( sender sdk.Address, coreValidatorAddress sdk.Address, - pubKey string, network NetworkInfo, ) *MsgUpdateUniversalValidator { return &MsgUpdateUniversalValidator{ Signer: sender.String(), CoreValidatorAddress: coreValidatorAddress.String(), - Pubkey: pubKey, Network: &network, } } @@ -56,11 +51,5 @@ func (msg *MsgUpdateUniversalValidator) ValidateBasic() error { return errors.Wrap(err, "invalid core validator address") } - // Validate pubkey is non-empty - pubkey := strings.TrimSpace(msg.Pubkey) - if pubkey == "" { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "pubkey cannot be empty") - } - return msg.Network.ValidateBasic() } From 0267812e700f97caa321f69344d8686fbb36d6bc Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 16:20:37 +0530 Subject: [PATCH 097/105] tests: updated test cases --- .../types/msg_add_universal_validator_test.go | 4 +- .../msg_update_universal_validator_test.go | 38 +++++++++++-------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/x/uvalidator/types/msg_add_universal_validator_test.go b/x/uvalidator/types/msg_add_universal_validator_test.go index 8a177e55..701d1374 100644 --- a/x/uvalidator/types/msg_add_universal_validator_test.go +++ b/x/uvalidator/types/msg_add_universal_validator_test.go @@ -29,9 +29,9 @@ func TestMsgAddUniversalValidator_ValidateBasic(t *testing.T) { msg: types.MsgAddUniversalValidator{ Signer: validAdmin, CoreValidatorAddress: validCoreVal, - Pubkey: "pubkey_temp", Network: &types.NetworkInfo{ - Ip: "ip", + PeerId: "temp peerId", + MultiAddrs: []string{"temp multi_addrs"}, }, }, wantErr: false, diff --git a/x/uvalidator/types/msg_update_universal_validator_test.go b/x/uvalidator/types/msg_update_universal_validator_test.go index 88408f9e..1521047d 100644 --- a/x/uvalidator/types/msg_update_universal_validator_test.go +++ b/x/uvalidator/types/msg_update_universal_validator_test.go @@ -28,9 +28,9 @@ func TestMsgUpdateUniversalValidator_ValidateBasic(t *testing.T) { msg: types.MsgUpdateUniversalValidator{ Signer: validAdmin, CoreValidatorAddress: validCoreVal, - Pubkey: "updated_pubkey_123", Network: &types.NetworkInfo{ - Ip: "127.0.0.1", + PeerId: "temp peerId", + MultiAddrs: []string{"temp multi_addrs"}, }, }, wantErr: false, @@ -40,9 +40,9 @@ func TestMsgUpdateUniversalValidator_ValidateBasic(t *testing.T) { msg: types.MsgUpdateUniversalValidator{ Signer: "invalid_signer", CoreValidatorAddress: validCoreVal, - Pubkey: "pubkey_temp", Network: &types.NetworkInfo{ - Ip: "10.0.0.1", + PeerId: "temp peerId", + MultiAddrs: []string{"temp multi_addrs"}, }, }, wantErr: true, @@ -53,37 +53,43 @@ func TestMsgUpdateUniversalValidator_ValidateBasic(t *testing.T) { msg: types.MsgUpdateUniversalValidator{ Signer: validAdmin, CoreValidatorAddress: "bad_valoper_format", - Pubkey: "pubkey_temp", Network: &types.NetworkInfo{ - Ip: "10.0.0.1", + PeerId: "temp peerId", + MultiAddrs: []string{"temp multi_addrs"}, }, }, wantErr: true, errMsg: "invalid core validator address", }, { - name: "empty pubkey should fail", + name: "empty peerId should fail", msg: types.MsgUpdateUniversalValidator{ Signer: validAdmin, CoreValidatorAddress: validCoreVal, - Pubkey: " ", - Network: &types.NetworkInfo{ - Ip: "10.0.0.1", - }, + Network: &types.NetworkInfo{PeerId: "", MultiAddrs: []string{"temp multi_addrs"}}, + }, + wantErr: true, + errMsg: "peerId cannot be empty", + }, + { + name: "nil multi_addrs in networkInfo should fail", + msg: types.MsgUpdateUniversalValidator{ + Signer: validAdmin, + CoreValidatorAddress: validCoreVal, + Network: &types.NetworkInfo{PeerId: "temp peerId", MultiAddrs: nil}, }, wantErr: true, - errMsg: "pubkey cannot be empty", + errMsg: "multi_addrs cannot be nil", }, { - name: "empty network info should fail", + name: "empty multi_addrs in networkInfo should fail", msg: types.MsgUpdateUniversalValidator{ Signer: validAdmin, CoreValidatorAddress: validCoreVal, - Pubkey: "valid_pubkey", - Network: &types.NetworkInfo{Ip: ""}, + Network: &types.NetworkInfo{PeerId: "temp peerId", MultiAddrs: []string{}}, }, wantErr: true, - errMsg: "ip cannot be empty", + errMsg: "multi_addrs must contain at least one value", }, } From c390d29e08b703e9b813027e87532e314bf10360 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 16:21:16 +0530 Subject: [PATCH 098/105] refactor: modified add, update uv messages to remove pubkey --- x/uvalidator/keeper/msg_add_universal_validator.go | 4 +--- x/uvalidator/keeper/msg_server.go | 4 ++-- x/uvalidator/keeper/msg_update_universal_validator.go | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/x/uvalidator/keeper/msg_add_universal_validator.go b/x/uvalidator/keeper/msg_add_universal_validator.go index 8d32f5b5..307f3016 100644 --- a/x/uvalidator/keeper/msg_add_universal_validator.go +++ b/x/uvalidator/keeper/msg_add_universal_validator.go @@ -16,7 +16,7 @@ import ( // It ensures the core validator exists, is bonded, and handles lifecycle reactivation. func (k Keeper) AddUniversalValidator( ctx context.Context, - coreValidatorAddr, pubkey string, + coreValidatorAddr string, networkInfo types.NetworkInfo, ) error { sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -62,7 +62,6 @@ func (k Keeper) AddUniversalValidator( Status: types.UVStatus_UV_STATUS_PENDING_JOIN, BlockHeight: sdkCtx.BlockHeight(), }) - existingVal.IdentifyInfo.Pubkey = pubkey existingVal.NetworkInfo = &networkInfo if err := k.UniversalValidatorSet.Set(ctx, valAddr, existingVal); err != nil { @@ -89,7 +88,6 @@ func (k Keeper) AddUniversalValidator( uv := types.UniversalValidator{ IdentifyInfo: &types.IdentityInfo{ CoreValidatorAddress: coreValidatorAddr, - Pubkey: pubkey, }, LifecycleInfo: &types.LifecycleInfo{ CurrentStatus: initialStatus, diff --git a/x/uvalidator/keeper/msg_server.go b/x/uvalidator/keeper/msg_server.go index e372749f..396a9a6f 100755 --- a/x/uvalidator/keeper/msg_server.go +++ b/x/uvalidator/keeper/msg_server.go @@ -48,7 +48,7 @@ func (ms msgServer) AddUniversalValidator(ctx context.Context, msg *types.MsgAdd return nil, errors.Wrapf(sdkErrors.ErrUnauthorized, "invalid authority; expected %s, got %s", params.Admin, msg.Signer) } - err = ms.k.AddUniversalValidator(ctx, msg.CoreValidatorAddress, msg.Pubkey, *msg.Network) + err = ms.k.AddUniversalValidator(ctx, msg.CoreValidatorAddress, *msg.Network) if err != nil { return nil, err } @@ -88,7 +88,7 @@ func (ms msgServer) UpdateUniversalValidator(ctx context.Context, msg *types.Msg return nil, errors.Wrapf(sdkErrors.ErrUnauthorized, "invalid authority; expected %s, got %s", params.Admin, msg.Signer) } - err = ms.k.UpdateUniversalValidator(ctx, msg.CoreValidatorAddress, msg.Pubkey, *msg.Network) + err = ms.k.UpdateUniversalValidator(ctx, msg.CoreValidatorAddress, *msg.Network) if err != nil { return nil, err } diff --git a/x/uvalidator/keeper/msg_update_universal_validator.go b/x/uvalidator/keeper/msg_update_universal_validator.go index 0f01414d..7806df21 100644 --- a/x/uvalidator/keeper/msg_update_universal_validator.go +++ b/x/uvalidator/keeper/msg_update_universal_validator.go @@ -11,7 +11,7 @@ import ( // UpdateUniversalValidator updates the metadata of the registered universal validator func (k Keeper) UpdateUniversalValidator( ctx context.Context, - coreValidatorAddr, pubkey string, + coreValidatorAddr string, networkInfo types.NetworkInfo, ) error { sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -44,7 +44,6 @@ func (k Keeper) UpdateUniversalValidator( } // Update only metadata - existingVal.IdentifyInfo.Pubkey = pubkey existingVal.NetworkInfo = &networkInfo // Save updated entry From 20b83471b7a67097b7d57ae2e2f62f0c1424d75a Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 16:21:45 +0530 Subject: [PATCH 099/105] tests: updated integration tests --- .../inbound_synthetic_bridge_payload_test.go | 5 ++-- .../inbound_synthetic_bridge_test.go | 5 ++-- .../uexecutor/vote_gas_price_test.go | 5 ++-- .../utss/initiate_tss_key_process_test.go | 4 +-- .../msg_add_universal_validator_test.go | 22 ++++++++-------- .../msg_update_universal_validator_test.go | 25 ++++++++----------- 6 files changed, 29 insertions(+), 37 deletions(-) diff --git a/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go b/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go index 57fd7886..fbee35a0 100644 --- a/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go +++ b/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go @@ -71,10 +71,9 @@ func setupInboundBridgePayloadTest(t *testing.T, numVals int) (*app.ChainApp, sd fmt.Sprintf("universal-validator-%d", i), )).String() - pubkey := fmt.Sprintf("pubkey-%d", i) - network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.0.%d", i+1)} + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, network) require.NoError(t, err) universalVals[i] = universalValAddr diff --git a/test/integration/uexecutor/inbound_synthetic_bridge_test.go b/test/integration/uexecutor/inbound_synthetic_bridge_test.go index 17aaf2bd..4562f3f0 100644 --- a/test/integration/uexecutor/inbound_synthetic_bridge_test.go +++ b/test/integration/uexecutor/inbound_synthetic_bridge_test.go @@ -77,10 +77,9 @@ func setupInboundBridgeTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Conte fmt.Sprintf("universal-validator-%d", i), )).String() - pubkey := fmt.Sprintf("pubkey-%d", i) - network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.0.%d", i+1)} + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, network) require.NoError(t, err) universalVals[i] = universalValAddr diff --git a/test/integration/uexecutor/vote_gas_price_test.go b/test/integration/uexecutor/vote_gas_price_test.go index fa6b9af0..75c2327e 100644 --- a/test/integration/uexecutor/vote_gas_price_test.go +++ b/test/integration/uexecutor/vote_gas_price_test.go @@ -37,10 +37,9 @@ func setupVoteGasPriceTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Contex // --- Register validators as universal validators --- universalVals := make([]string, len(validators)) for i, val := range validators { - pubkey := fmt.Sprintf("pubkey-%d", i) - network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.0.%d", i+1)} + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} - require.NoError(t, app.UvalidatorKeeper.AddUniversalValidator(ctx, val.OperatorAddress, pubkey, network)) + require.NoError(t, app.UvalidatorKeeper.AddUniversalValidator(ctx, val.OperatorAddress, network)) universalVals[i] = sdk.AccAddress([]byte(fmt.Sprintf("universal-validator-%d", i))).String() } diff --git a/test/integration/utss/initiate_tss_key_process_test.go b/test/integration/utss/initiate_tss_key_process_test.go index 503d1545..d547a60f 100644 --- a/test/integration/utss/initiate_tss_key_process_test.go +++ b/test/integration/utss/initiate_tss_key_process_test.go @@ -26,8 +26,8 @@ func setupTssKeyProcessTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Conte for i, val := range validators { coreValAddr := val.OperatorAddress pubkey := "pubkey-tss-" + coreValAddr - network := uvalidatortypes.NetworkInfo{Ip: "192.168.1." + string(rune(i+1))} - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, network) require.NoError(t, err) // Finalize the auto-initiated TSS process BEFORE next validator is added diff --git a/test/integration/uvalidator/msg_add_universal_validator_test.go b/test/integration/uvalidator/msg_add_universal_validator_test.go index faaf7005..342bc94d 100644 --- a/test/integration/uvalidator/msg_add_universal_validator_test.go +++ b/test/integration/uvalidator/msg_add_universal_validator_test.go @@ -26,10 +26,9 @@ func TestAddUniversalValidator(t *testing.T) { for i, val := range validators { coreValAddr := val.OperatorAddress - pubkey := fmt.Sprintf("pubkey-%d", i) - network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.1.%d", i+1)} + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, network) require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32(coreValAddr) @@ -41,7 +40,7 @@ func TestAddUniversalValidator(t *testing.T) { uv, _ := app.UvalidatorKeeper.UniversalValidatorSet.Get(ctx, valAddr) require.Equal(t, uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN, uv.LifecycleInfo.CurrentStatus) - require.Equal(t, pubkey, uv.IdentifyInfo.Pubkey) + require.Equal(t, network, *uv.NetworkInfo) } }) @@ -53,21 +52,20 @@ func TestAddUniversalValidator(t *testing.T) { // pre-store inactive old := uvalidatortypes.UniversalValidator{ - IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: val.OperatorAddress, Pubkey: "old-pub"}, + IdentifyInfo: &uvalidatortypes.IdentityInfo{CoreValidatorAddress: val.OperatorAddress}, LifecycleInfo: &uvalidatortypes.LifecycleInfo{ CurrentStatus: uvalidatortypes.UVStatus_UV_STATUS_INACTIVE, }, } require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, old)) - pubkey := "new-pub" - network := uvalidatortypes.NetworkInfo{Ip: "10.0.0.1"} - err := k.AddUniversalValidator(ctx, val.OperatorAddress, pubkey, network) + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp"), MultiAddrs: []string{"temp"}} + err := k.AddUniversalValidator(ctx, val.OperatorAddress, network) require.NoError(t, err) uv, _ := k.UniversalValidatorSet.Get(ctx, valAddr) require.Equal(t, uvalidatortypes.UVStatus_UV_STATUS_PENDING_JOIN, uv.LifecycleInfo.CurrentStatus) - require.Equal(t, pubkey, uv.IdentifyInfo.Pubkey) + require.Equal(t, network, *uv.NetworkInfo) }) t.Run("Adding already active validator fails", func(t *testing.T) { @@ -84,7 +82,7 @@ func TestAddUniversalValidator(t *testing.T) { } require.NoError(t, k.UniversalValidatorSet.Set(ctx, valAddr, active)) - err := k.AddUniversalValidator(ctx, val.OperatorAddress, "pub", uvalidatortypes.NetworkInfo{}) + err := k.AddUniversalValidator(ctx, val.OperatorAddress, uvalidatortypes.NetworkInfo{}) require.ErrorContains(t, err, "already registered") }) @@ -98,14 +96,14 @@ func TestAddUniversalValidator(t *testing.T) { valBonded.Status = stakingtypes.Unbonded app.StakingKeeper.SetValidator(ctx, valBonded) - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, valAddr.String(), "pub", uvalidatortypes.NetworkInfo{}) + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, valAddr.String(), uvalidatortypes.NetworkInfo{}) require.ErrorContains(t, err, "not bonded") }) t.Run("Invalid validator address format fails", func(t *testing.T) { app, ctx, _ := setupAddUniversalValidatorTest(t, 1) - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, "invalid_bech32", "pub", uvalidatortypes.NetworkInfo{}) + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, "invalid_bech32", uvalidatortypes.NetworkInfo{}) require.ErrorContains(t, err, "invalid core validator address") }) } diff --git a/test/integration/uvalidator/msg_update_universal_validator_test.go b/test/integration/uvalidator/msg_update_universal_validator_test.go index f51a7367..669851ed 100644 --- a/test/integration/uvalidator/msg_update_universal_validator_test.go +++ b/test/integration/uvalidator/msg_update_universal_validator_test.go @@ -22,10 +22,9 @@ func setupUpdateUniversalValidatorTest(t *testing.T, numVals int) (*app.ChainApp // add one universal validator to update later for i, val := range validators { coreValAddr := val.OperatorAddress - pubkey := fmt.Sprintf("pubkey-%d", i) - network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.1.%d", i+1)} + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, network) require.NoError(t, err) universalVals[i] = coreValAddr @@ -39,10 +38,11 @@ func TestUpdateUniversalValidator(t *testing.T) { app, ctx, vals := setupUpdateUniversalValidatorTest(t, 1) coreVal := vals[0] - newPubkey := "updated-pubkey" - newNetwork := uvalidatortypes.NetworkInfo{Ip: "10.0.0.1"} + // newPubkey := "updated-pubkey" + // newNetwork := uvalidatortypes.NetworkInfo{Ip: "10.0.0.1"} + newNetwork := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("updated-peerId"), MultiAddrs: []string{"updated-multi_addrs"}} - err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, newPubkey, newNetwork) + err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, newNetwork) require.NoError(t, err) valAddr, err := sdk.ValAddressFromBech32(coreVal) @@ -51,18 +51,16 @@ func TestUpdateUniversalValidator(t *testing.T) { updatedVal, err := app.UvalidatorKeeper.UniversalValidatorSet.Get(ctx, valAddr) require.NoError(t, err) - require.Equal(t, newPubkey, updatedVal.IdentifyInfo.Pubkey) - require.Equal(t, newNetwork.Ip, updatedVal.NetworkInfo.Ip) + require.Equal(t, newNetwork, *updatedVal.NetworkInfo) }) t.Run("fails when validator does not exist", func(t *testing.T) { app, ctx, _ := setupUpdateUniversalValidatorTest(t, 1) coreVal := "pushvaloper1invalidaddress00000000000000000000000" - pubkey := "somekey" - network := uvalidatortypes.NetworkInfo{Ip: "10.0.0.2"} + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp peerId"), MultiAddrs: []string{"temp multi_addrs"}} - err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, pubkey, network) + err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, network) require.Error(t, err) require.Contains(t, err.Error(), "invalid core validator address") }) @@ -71,10 +69,9 @@ func TestUpdateUniversalValidator(t *testing.T) { app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, 1) coreVal := validators[0].OperatorAddress - pubkey := "random" - network := uvalidatortypes.NetworkInfo{Ip: "10.0.0.4"} + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp peerId"), MultiAddrs: []string{"temp multi_addrs"}} - err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, pubkey, network) + err := app.UvalidatorKeeper.UpdateUniversalValidator(ctx, coreVal, network) require.Error(t, err) require.Contains(t, err.Error(), "does not exist") }) From e80cb1b652bc966f42cb8fbfeadeaae6f628fc7b Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 16:22:25 +0530 Subject: [PATCH 100/105] refactor: updated migration of UVs to add new changes --- x/uvalidator/migrations/v2/migrate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/uvalidator/migrations/v2/migrate.go b/x/uvalidator/migrations/v2/migrate.go index 5b424355..af13b621 100644 --- a/x/uvalidator/migrations/v2/migrate.go +++ b/x/uvalidator/migrations/v2/migrate.go @@ -36,10 +36,10 @@ func MigrateUniversalValidatorSet(ctx sdk.Context, k *keeper.Keeper, cdc codec.B newVal := types.UniversalValidator{ IdentifyInfo: &types.IdentityInfo{ CoreValidatorAddress: valAddr.String(), - Pubkey: "pubkey-temp", }, NetworkInfo: &types.NetworkInfo{ - Ip: "1.1.1.1", + PeerId: "12D3KooWFNC8BxiPoHyTJtiN1u1ctw3nSexuJHUBv4mMMmqEtQgg", + MultiAddrs: []string{"/ip4/127.0.0.1/tcp/39001/p2p/12D3KooWFNC8BxiPoHyTJtiN1u1ctw3nSexuJHUBv4mMMmqEtQgg"}, }, LifecycleInfo: &types.LifecycleInfo{ CurrentStatus: types.UVStatus_UV_STATUS_PENDING_JOIN, From bee19369788a551a55f10b15c1d81b50e12ed654 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 16:22:40 +0530 Subject: [PATCH 101/105] refactor: added generated protobuf --- x/uvalidator/types/tx.pb.go | 185 ++++++------------------ x/uvalidator/types/validator.pb.go | 219 +++++++++++++++-------------- 2 files changed, 154 insertions(+), 250 deletions(-) diff --git a/x/uvalidator/types/tx.pb.go b/x/uvalidator/types/tx.pb.go index 599d3ee2..b24a51ea 100644 --- a/x/uvalidator/types/tx.pb.go +++ b/x/uvalidator/types/tx.pb.go @@ -135,8 +135,6 @@ type MsgAddUniversalValidator struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // core_validator_address is the address of the core validator. CoreValidatorAddress string `protobuf:"bytes,2,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` - // pubkey is the consensus public key for this universal validator - Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` // network metadata for validator node (IP, etc.) Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` } @@ -188,13 +186,6 @@ func (m *MsgAddUniversalValidator) GetCoreValidatorAddress() string { return "" } -func (m *MsgAddUniversalValidator) GetPubkey() string { - if m != nil { - return m.Pubkey - } - return "" -} - func (m *MsgAddUniversalValidator) GetNetwork() *NetworkInfo { if m != nil { return m.Network @@ -243,10 +234,8 @@ type MsgUpdateUniversalValidator struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` // core_validator_address is the address of the core validator. CoreValidatorAddress string `protobuf:"bytes,2,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` - // pubkey is the consensus public key for this universal validator - Pubkey string `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - // network metadata for validator node (IP, etc.) - Network *NetworkInfo `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` + // network metadata for validator node + Network *NetworkInfo `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` } func (m *MsgUpdateUniversalValidator) Reset() { *m = MsgUpdateUniversalValidator{} } @@ -296,13 +285,6 @@ func (m *MsgUpdateUniversalValidator) GetCoreValidatorAddress() string { return "" } -func (m *MsgUpdateUniversalValidator) GetPubkey() string { - if m != nil { - return m.Pubkey - } - return "" -} - func (m *MsgUpdateUniversalValidator) GetNetwork() *NetworkInfo { if m != nil { return m.Network @@ -450,45 +432,44 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/tx.proto", fileDescriptor_bea4c2a0c904c8a7) } var fileDescriptor_bea4c2a0c904c8a7 = []byte{ - // 600 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x95, 0x3d, 0x6f, 0xd3, 0x40, - 0x1c, 0xc6, 0xe3, 0xa4, 0x04, 0xe5, 0x78, 0x13, 0x56, 0x9a, 0xba, 0xae, 0x6a, 0x82, 0x2b, 0x4a, - 0x15, 0x29, 0x31, 0x4d, 0x50, 0x91, 0xba, 0x35, 0x1b, 0x43, 0x2a, 0x30, 0x6a, 0x91, 0x58, 0x22, - 0x27, 0x3e, 0x2e, 0x56, 0x6b, 0x9f, 0xf1, 0x39, 0xa1, 0x61, 0x42, 0x8c, 0x0c, 0x88, 0x8f, 0xc1, - 0x84, 0x32, 0xf4, 0x43, 0x74, 0xa3, 0xea, 0x02, 0x13, 0x42, 0xc9, 0x90, 0xaf, 0x81, 0x7c, 0x7e, - 0x49, 0x6c, 0x7c, 0x4d, 0x07, 0xb6, 0x2e, 0xd1, 0xd9, 0xcf, 0x93, 0xe7, 0xff, 0xe8, 0x77, 0xb6, - 0x0f, 0x94, 0xfa, 0x03, 0xed, 0xd8, 0xd0, 0x35, 0x17, 0x3b, 0xca, 0x60, 0x5b, 0x71, 0x4f, 0x6a, - 0xb6, 0x83, 0x5d, 0xcc, 0xdf, 0x99, 0xdd, 0xaf, 0x0d, 0xb6, 0xc5, 0xfb, 0x9a, 0x69, 0x58, 0x58, - 0xa1, 0xbf, 0xbe, 0x43, 0x5c, 0xe9, 0x62, 0x62, 0x62, 0xa2, 0x98, 0x04, 0x79, 0xff, 0x34, 0x09, - 0x0a, 0x84, 0xb5, 0x78, 0x24, 0x82, 0x16, 0x24, 0x06, 0x09, 0xc4, 0x22, 0xc2, 0x08, 0xd3, 0xa5, - 0xe2, 0xad, 0x82, 0xbb, 0xab, 0x7e, 0x56, 0xdb, 0x17, 0xfc, 0x8b, 0x50, 0x4a, 0x14, 0x1c, 0xda, - 0x30, 0x94, 0xd6, 0xe3, 0xd2, 0xac, 0x30, 0x95, 0xe5, 0x2f, 0x1c, 0xb8, 0xd7, 0x22, 0xe8, 0xc0, - 0xd6, 0x35, 0x17, 0xbe, 0xd0, 0x1c, 0xcd, 0x24, 0xfc, 0x0e, 0x28, 0x68, 0x7d, 0xb7, 0x87, 0x1d, - 0xc3, 0x1d, 0x0a, 0x5c, 0x99, 0xdb, 0x2a, 0x34, 0x85, 0x8b, 0xd3, 0x6a, 0x31, 0x18, 0xb9, 0xa7, - 0xeb, 0x0e, 0x24, 0xe4, 0x95, 0xeb, 0x18, 0x16, 0x52, 0x67, 0x56, 0xbe, 0x01, 0xf2, 0x36, 0x4d, - 0x10, 0xb2, 0x65, 0x6e, 0xeb, 0x56, 0x7d, 0xb9, 0x16, 0xe3, 0x53, 0xf3, 0xe3, 0x9b, 0x4b, 0x67, - 0xbf, 0x1f, 0x64, 0xd4, 0xc0, 0xba, 0x7b, 0xf7, 0xd3, 0x74, 0x54, 0x99, 0x85, 0xc8, 0xab, 0x60, - 0x25, 0xd1, 0x47, 0x85, 0xc4, 0xc6, 0x16, 0x81, 0xf2, 0xb7, 0x2c, 0x10, 0x5a, 0x04, 0xed, 0xe9, - 0xfa, 0x81, 0x65, 0x0c, 0xa0, 0x43, 0xb4, 0xe3, 0xc3, 0x30, 0x9f, 0x7f, 0x02, 0xf2, 0xc4, 0x40, - 0x16, 0x74, 0x16, 0x36, 0x0e, 0x7c, 0xfc, 0x6b, 0x50, 0xea, 0x62, 0x07, 0xb6, 0xa3, 0x8e, 0x6d, - 0xcd, 0xf7, 0xd1, 0xfa, 0x85, 0xe6, 0xc3, 0x8b, 0xd3, 0xea, 0x7a, 0x90, 0x10, 0xcd, 0x89, 0x47, - 0x15, 0xbd, 0x80, 0xa4, 0xc6, 0x97, 0x40, 0xde, 0xee, 0x77, 0x8e, 0xe0, 0x50, 0xc8, 0x79, 0x41, - 0x6a, 0x70, 0xc5, 0x3f, 0x05, 0x37, 0x2d, 0xe8, 0xbe, 0xc7, 0xce, 0x91, 0xb0, 0x44, 0x01, 0x89, - 0x09, 0x40, 0xfb, 0xbe, 0xfa, 0xdc, 0x7a, 0x8b, 0xd5, 0xd0, 0xba, 0xdb, 0xf0, 0x00, 0x05, 0x9d, - 0x3f, 0x4f, 0x47, 0x95, 0x8d, 0xb9, 0x0d, 0x65, 0xd1, 0x90, 0x65, 0x50, 0x66, 0x69, 0x11, 0xce, - 0xef, 0x59, 0xb0, 0x16, 0xa1, 0xbe, 0x4e, 0x44, 0x77, 0x12, 0x44, 0x37, 0xe3, 0x44, 0x59, 0x40, - 0xe4, 0x47, 0x60, 0xe3, 0x12, 0x39, 0xe2, 0xfa, 0x93, 0xa3, 0x5c, 0x55, 0x68, 0xe2, 0xc1, 0xff, - 0xe1, 0xba, 0xbf, 0x80, 0x2b, 0x3b, 0x21, 0x15, 0xe7, 0x22, 0x00, 0xac, 0xe6, 0x01, 0x00, 0x96, - 0x1c, 0x02, 0xa8, 0xff, 0xc8, 0x81, 0x5c, 0x8b, 0x20, 0xfe, 0x10, 0xdc, 0x8e, 0x7d, 0x57, 0xa4, - 0xc4, 0xe6, 0x24, 0xde, 0x73, 0x71, 0xf3, 0x72, 0x3d, 0xcc, 0xe7, 0xdf, 0x81, 0xe5, 0xf4, 0x6f, - 0xc0, 0xe3, 0x7f, 0x03, 0x52, 0x8d, 0xa2, 0x72, 0x45, 0x63, 0x34, 0xf2, 0x03, 0x10, 0x98, 0xef, - 0x49, 0x85, 0x55, 0x3b, 0x65, 0x70, 0xfd, 0xea, 0xde, 0xf9, 0xd9, 0xcc, 0x67, 0x29, 0x65, 0x36, - 0xcb, 0x9b, 0x36, 0x7b, 0xd1, 0x56, 0x8a, 0x37, 0x3e, 0x4e, 0x47, 0x15, 0xae, 0xf9, 0xf2, 0x6c, - 0x2c, 0x71, 0xe7, 0x63, 0x89, 0xfb, 0x33, 0x96, 0xb8, 0xaf, 0x13, 0x29, 0x73, 0x3e, 0x91, 0x32, - 0xbf, 0x26, 0x52, 0xe6, 0xcd, 0x33, 0x64, 0xb8, 0xbd, 0x7e, 0xa7, 0xd6, 0xc5, 0xa6, 0x62, 0xf7, - 0x49, 0xaf, 0xdb, 0xd3, 0x0c, 0x8b, 0xae, 0xaa, 0x74, 0x59, 0xb5, 0xb0, 0x0e, 0x95, 0x13, 0x65, - 0xee, 0x09, 0xa3, 0xa7, 0x53, 0x27, 0x4f, 0xcf, 0x9f, 0xc6, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xed, 0xa3, 0x26, 0xf8, 0x5c, 0x07, 0x00, 0x00, + // 589 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0x3d, 0x6f, 0xd3, 0x40, + 0x1c, 0xc6, 0xe3, 0xa6, 0x04, 0xe5, 0x78, 0x13, 0x56, 0xda, 0xba, 0xae, 0x6a, 0x82, 0x2b, 0x4a, + 0x15, 0x29, 0x31, 0x4d, 0x50, 0x91, 0xba, 0x35, 0x1b, 0x43, 0x2a, 0x08, 0x6a, 0x91, 0x58, 0x22, + 0x37, 0x3e, 0x2e, 0x16, 0xf5, 0x9d, 0xb9, 0x73, 0x42, 0xcb, 0x84, 0x18, 0x19, 0x50, 0x27, 0x3e, + 0x47, 0x86, 0x7e, 0x88, 0x6e, 0x54, 0x5d, 0x60, 0x42, 0x28, 0x19, 0xf2, 0x35, 0x50, 0xce, 0x2f, + 0x89, 0x8d, 0xaf, 0xc9, 0xc0, 0xc2, 0x12, 0x5d, 0xfc, 0x3c, 0x79, 0xfe, 0x8f, 0x7f, 0xe7, 0x8b, + 0xc1, 0x72, 0xb7, 0x67, 0x1e, 0xdb, 0x96, 0xe9, 0x11, 0x6a, 0xf4, 0xb6, 0x0d, 0xef, 0xa4, 0xe2, + 0x52, 0xe2, 0x11, 0xf9, 0xce, 0xe4, 0x7a, 0xa5, 0xb7, 0xad, 0xde, 0x37, 0x1d, 0x1b, 0x13, 0x83, + 0x7f, 0xfa, 0x0e, 0x75, 0xa5, 0x4d, 0x98, 0x43, 0x98, 0xe1, 0x30, 0x34, 0xfe, 0xa5, 0xc3, 0x50, + 0x20, 0xac, 0xc5, 0x23, 0x11, 0xc4, 0x90, 0xd9, 0x2c, 0x10, 0x0b, 0x88, 0x20, 0xc2, 0x97, 0xc6, + 0x78, 0x15, 0x5c, 0x5d, 0xf5, 0xb3, 0x5a, 0xbe, 0xe0, 0x7f, 0x09, 0xa5, 0x44, 0xc1, 0x53, 0x17, + 0x86, 0xd2, 0x7a, 0x5c, 0x9a, 0x14, 0xe6, 0xb2, 0xfe, 0x55, 0x02, 0xf7, 0x1a, 0x0c, 0x1d, 0xb8, + 0x96, 0xe9, 0xc1, 0x17, 0x26, 0x35, 0x1d, 0x26, 0xef, 0x80, 0xbc, 0xd9, 0xf5, 0x3a, 0x84, 0xda, + 0xde, 0xa9, 0x22, 0x15, 0xa5, 0xad, 0x7c, 0x5d, 0xb9, 0x3a, 0x2f, 0x17, 0x82, 0x91, 0x7b, 0x96, + 0x45, 0x21, 0x63, 0xaf, 0x3c, 0x6a, 0x63, 0xd4, 0x9c, 0x58, 0xe5, 0x1a, 0xc8, 0xb9, 0x3c, 0x41, + 0x59, 0x28, 0x4a, 0x5b, 0xb7, 0xaa, 0x4b, 0x95, 0x18, 0x9f, 0x8a, 0x1f, 0x5f, 0x5f, 0xbc, 0xf8, + 0xf5, 0x20, 0xd3, 0x0c, 0xac, 0xbb, 0x77, 0x3f, 0x8f, 0xfa, 0xa5, 0x49, 0x88, 0xbe, 0x0a, 0x56, + 0x12, 0x7d, 0x9a, 0x90, 0xb9, 0x04, 0x33, 0xa8, 0x9f, 0x2d, 0x00, 0xa5, 0xc1, 0xd0, 0x9e, 0x65, + 0x1d, 0x60, 0xbb, 0x07, 0x29, 0x33, 0x8f, 0x0f, 0xc3, 0x7c, 0xf9, 0x09, 0xc8, 0x31, 0x1b, 0x61, + 0x48, 0x67, 0x36, 0x0e, 0x7c, 0xf2, 0x6b, 0xb0, 0xdc, 0x26, 0x14, 0xb6, 0xa2, 0x8e, 0x2d, 0xd3, + 0xf7, 0xf1, 0xfa, 0xf9, 0xfa, 0xc3, 0xab, 0xf3, 0xf2, 0x7a, 0x90, 0x10, 0xcd, 0x89, 0x47, 0x15, + 0xc6, 0x01, 0x49, 0x4d, 0x7e, 0x0a, 0x6e, 0x62, 0xe8, 0x7d, 0x20, 0xf4, 0x9d, 0xb2, 0xc8, 0x41, + 0xa8, 0x09, 0x10, 0xfb, 0xbe, 0xfa, 0x1c, 0xbf, 0x25, 0xcd, 0xd0, 0xba, 0x5b, 0x1b, 0x83, 0x08, + 0xba, 0x7d, 0x19, 0xf5, 0x4b, 0x1b, 0x53, 0x1b, 0x27, 0xba, 0x6b, 0x5d, 0x07, 0x45, 0x91, 0x16, + 0x61, 0xfb, 0xb6, 0x00, 0xd6, 0x22, 0xa4, 0xff, 0x0d, 0xb9, 0xec, 0xfc, 0xe4, 0x76, 0x12, 0xe4, + 0x36, 0xe3, 0xe4, 0x44, 0x37, 0xae, 0x3f, 0x02, 0x1b, 0xd7, 0xc8, 0x11, 0xbf, 0x1f, 0x12, 0xe7, + 0xd7, 0x84, 0x0e, 0xe9, 0xfd, 0x1b, 0x7e, 0xfb, 0x33, 0xf8, 0x89, 0x13, 0x52, 0xb1, 0xcd, 0x02, + 0x20, 0x6a, 0x1e, 0x00, 0x10, 0xc9, 0x21, 0x80, 0xea, 0xf7, 0x2c, 0xc8, 0x36, 0x18, 0x92, 0x0f, + 0xc1, 0xed, 0xd8, 0xff, 0x84, 0x96, 0xd8, 0x9c, 0xc4, 0xb9, 0x55, 0x37, 0xaf, 0xd7, 0xc3, 0x7c, + 0xf9, 0x3d, 0x58, 0x4a, 0x3f, 0xd3, 0x8f, 0xff, 0x0e, 0x48, 0x35, 0xaa, 0xc6, 0x9c, 0xc6, 0x68, + 0xe4, 0x47, 0xa0, 0x08, 0xcf, 0x43, 0x49, 0x54, 0x3b, 0x65, 0x70, 0x75, 0x7e, 0xef, 0xf4, 0x6c, + 0xe1, 0xb3, 0x94, 0x32, 0x5b, 0xe4, 0x4d, 0x9b, 0x3d, 0x6b, 0x2b, 0xd5, 0x1b, 0x9f, 0x46, 0xfd, + 0x92, 0x54, 0x7f, 0x79, 0x31, 0xd0, 0xa4, 0xcb, 0x81, 0x26, 0xfd, 0x1e, 0x68, 0xd2, 0xd9, 0x50, + 0xcb, 0x5c, 0x0e, 0xb5, 0xcc, 0xcf, 0xa1, 0x96, 0x79, 0xf3, 0x0c, 0xd9, 0x5e, 0xa7, 0x7b, 0x54, + 0x69, 0x13, 0xc7, 0x70, 0xbb, 0xac, 0xd3, 0xee, 0x98, 0x36, 0xe6, 0xab, 0x32, 0x5f, 0x96, 0x31, + 0xb1, 0xa0, 0x71, 0x62, 0x4c, 0x3d, 0x61, 0xfc, 0x6d, 0x73, 0x94, 0xe3, 0xef, 0x93, 0xda, 0x9f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xb2, 0xac, 0x17, 0x3e, 0x2c, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -786,13 +767,6 @@ func (m *MsgAddUniversalValidator) MarshalToSizedBuffer(dAtA []byte) (int, error i-- dAtA[i] = 0x22 } - if len(m.Pubkey) > 0 { - i -= len(m.Pubkey) - copy(dAtA[i:], m.Pubkey) - i = encodeVarintTx(dAtA, i, uint64(len(m.Pubkey))) - i-- - dAtA[i] = 0x1a - } if len(m.CoreValidatorAddress) > 0 { i -= len(m.CoreValidatorAddress) copy(dAtA[i:], m.CoreValidatorAddress) @@ -863,13 +837,6 @@ func (m *MsgUpdateUniversalValidator) MarshalToSizedBuffer(dAtA []byte) (int, er i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - } - if len(m.Pubkey) > 0 { - i -= len(m.Pubkey) - copy(dAtA[i:], m.Pubkey) - i = encodeVarintTx(dAtA, i, uint64(len(m.Pubkey))) - i-- dAtA[i] = 0x1a } if len(m.CoreValidatorAddress) > 0 { @@ -1021,10 +988,6 @@ func (m *MsgAddUniversalValidator) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Pubkey) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } if m.Network != nil { l = m.Network.Size() n += 1 + l + sovTx(uint64(l)) @@ -1055,10 +1018,6 @@ func (m *MsgUpdateUniversalValidator) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Pubkey) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } if m.Network != nil { l = m.Network.Size() n += 1 + l + sovTx(uint64(l)) @@ -1365,38 +1324,6 @@ func (m *MsgAddUniversalValidator) Unmarshal(dAtA []byte) error { } m.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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.Pubkey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) @@ -1598,38 +1525,6 @@ func (m *MsgUpdateUniversalValidator) Unmarshal(dAtA []byte) error { m.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", 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.Pubkey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) } diff --git a/x/uvalidator/types/validator.pb.go b/x/uvalidator/types/validator.pb.go index c65f3b38..2bea904a 100644 --- a/x/uvalidator/types/validator.pb.go +++ b/x/uvalidator/types/validator.pb.go @@ -62,7 +62,6 @@ func (UVStatus) EnumDescriptor() ([]byte, []int) { // Identity info for validator (chain-level) type IdentityInfo struct { CoreValidatorAddress string `protobuf:"bytes,1,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` - Pubkey string `protobuf:"bytes,2,opt,name=pubkey,proto3" json:"pubkey,omitempty"` } func (m *IdentityInfo) Reset() { *m = IdentityInfo{} } @@ -105,16 +104,10 @@ func (m *IdentityInfo) GetCoreValidatorAddress() string { return "" } -func (m *IdentityInfo) GetPubkey() string { - if m != nil { - return m.Pubkey - } - return "" -} - // Validator network metadata type NetworkInfo struct { - Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` + MultiAddrs []string `protobuf:"bytes,2,rep,name=multi_addrs,json=multiAddrs,proto3" json:"multi_addrs,omitempty"` } func (m *NetworkInfo) Reset() { *m = NetworkInfo{} } @@ -150,13 +143,20 @@ func (m *NetworkInfo) XXX_DiscardUnknown() { var xxx_messageInfo_NetworkInfo proto.InternalMessageInfo -func (m *NetworkInfo) GetIp() string { +func (m *NetworkInfo) GetPeerId() string { if m != nil { - return m.Ip + return m.PeerId } return "" } +func (m *NetworkInfo) GetMultiAddrs() []string { + if m != nil { + return m.MultiAddrs + } + return nil +} + // Lifecycle event info type LifecycleEvent struct { Status UVStatus `protobuf:"varint,1,opt,name=status,proto3,enum=uvalidator.v1.UVStatus" json:"status,omitempty"` @@ -335,46 +335,46 @@ func init() { func init() { proto.RegisterFile("uvalidator/v1/validator.proto", fileDescriptor_317d9e276ec46d00) } var fileDescriptor_317d9e276ec46d00 = []byte{ - // 609 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0x8e, 0x93, 0xaa, 0xc0, 0x39, 0x89, 0xc2, 0xa9, 0xa4, 0xc5, 0xa5, 0xee, 0x0f, 0x96, 0xaa, - 0xa8, 0xb1, 0x1a, 0x90, 0x2a, 0x45, 0xe2, 0x47, 0x48, 0x0d, 0x18, 0x55, 0xa6, 0x38, 0x3f, 0x06, - 0x16, 0xcb, 0x71, 0x2e, 0xf1, 0x29, 0xae, 0xcf, 0xb2, 0xcf, 0x81, 0x4c, 0x8c, 0x08, 0x26, 0xc4, - 0xc4, 0xd8, 0x81, 0x01, 0x89, 0x85, 0x3f, 0x83, 0xb1, 0x23, 0x23, 0x4a, 0x06, 0xf8, 0x33, 0x50, - 0xce, 0x76, 0xec, 0x06, 0x90, 0x58, 0xac, 0x7b, 0xef, 0x7b, 0xf7, 0xbd, 0xef, 0x7d, 0xef, 0x0c, - 0x36, 0x82, 0x91, 0x61, 0xe3, 0x9e, 0x41, 0x89, 0x27, 0x8d, 0x0e, 0xa4, 0x79, 0x50, 0x71, 0x3d, - 0x42, 0x09, 0x2c, 0x24, 0x70, 0x65, 0x74, 0x20, 0xac, 0x0c, 0xc8, 0x80, 0x30, 0x44, 0x9a, 0x9d, - 0xc2, 0x22, 0xe1, 0xaa, 0x71, 0x8a, 0x1d, 0x22, 0xb1, 0x6f, 0x98, 0xda, 0x79, 0x0d, 0xf2, 0x4a, - 0x0f, 0x39, 0x14, 0xd3, 0xb1, 0xe2, 0xf4, 0x09, 0xbc, 0x03, 0xca, 0x26, 0xf1, 0x90, 0x3e, 0x67, - 0xd3, 0x8d, 0x5e, 0xcf, 0x43, 0xbe, 0xbf, 0xc6, 0x6d, 0x71, 0xbb, 0x57, 0xb4, 0x95, 0x19, 0xda, - 0x89, 0xc1, 0x7a, 0x88, 0xc1, 0x32, 0x58, 0x76, 0x83, 0xee, 0x10, 0x8d, 0xd7, 0xb2, 0xac, 0x2a, - 0x8a, 0x6a, 0xdb, 0xbf, 0xce, 0x36, 0xb9, 0x77, 0x3f, 0xbf, 0xee, 0xad, 0xa5, 0xd4, 0xe3, 0xa8, - 0x9f, 0x8e, 0x9d, 0x3e, 0xd9, 0xb9, 0x0f, 0x78, 0x15, 0xd1, 0x97, 0xc4, 0x1b, 0xb2, 0xfe, 0x45, - 0x90, 0xc5, 0x6e, 0xd4, 0x2b, 0x8b, 0xdd, 0xda, 0x56, 0xcc, 0xb0, 0x9a, 0x62, 0x70, 0xc2, 0x0b, - 0x21, 0xc1, 0x5b, 0x0e, 0x14, 0x8f, 0x71, 0x1f, 0x99, 0x63, 0xd3, 0x46, 0xf2, 0x08, 0x39, 0x14, - 0x4a, 0x60, 0xd9, 0xa7, 0x06, 0x0d, 0x42, 0xd1, 0xc5, 0xea, 0x6a, 0xe5, 0x82, 0x3b, 0x95, 0x76, - 0xa7, 0xc9, 0x60, 0x2d, 0x2a, 0x83, 0xdb, 0x20, 0xdf, 0xb5, 0x89, 0x39, 0xd4, 0x2d, 0x84, 0x07, - 0x16, 0x65, 0x53, 0xe4, 0x34, 0x9e, 0xe5, 0x9e, 0xb0, 0x54, 0xed, 0x66, 0x2c, 0x44, 0x48, 0x09, - 0xb1, 0xe3, 0xbe, 0x3a, 0x9a, 0x35, 0xde, 0xf9, 0xc2, 0x81, 0xc2, 0x5c, 0x0b, 0x9b, 0xe7, 0x1e, - 0x28, 0x9a, 0x81, 0xe7, 0x21, 0x87, 0xea, 0xff, 0x27, 0xa9, 0x10, 0x95, 0x87, 0x21, 0x3c, 0x04, - 0x97, 0x2c, 0xec, 0x53, 0xe2, 0xcd, 0xac, 0xcd, 0xed, 0xf2, 0xd5, 0x8d, 0x85, 0x8b, 0x17, 0x47, - 0xd7, 0xe2, 0xea, 0xbf, 0x5b, 0x1f, 0xea, 0xb5, 0x51, 0xe8, 0xdc, 0x9b, 0x2c, 0x80, 0x6d, 0x07, - 0x8f, 0x90, 0xe7, 0x1b, 0xf6, 0x7c, 0xa7, 0xf0, 0x01, 0x28, 0x84, 0x2b, 0xea, 0x87, 0x2b, 0x62, - 0x8a, 0xf9, 0xea, 0xfa, 0x42, 0xe3, 0xf4, 0xb3, 0xd1, 0xf2, 0xf1, 0x0d, 0x36, 0xf4, 0x5d, 0x90, - 0x4f, 0xaf, 0x88, 0xd9, 0xc9, 0x57, 0x85, 0x05, 0x82, 0xd4, 0xda, 0x35, 0xde, 0x49, 0xbd, 0x81, - 0x06, 0x28, 0x26, 0xc6, 0x32, 0x82, 0x1c, 0x23, 0xb8, 0xf1, 0xaf, 0xd1, 0x19, 0x45, 0xc1, 0x4e, - 0x87, 0xb5, 0x5b, 0x1f, 0xcf, 0x36, 0x33, 0xb1, 0x07, 0x62, 0xca, 0x83, 0x20, 0x9e, 0x38, 0x79, - 0xe3, 0x7b, 0x1f, 0x38, 0x70, 0x39, 0xde, 0x00, 0xbc, 0x0e, 0xae, 0xb5, 0x3b, 0x7a, 0xb3, 0x55, - 0x6f, 0xb5, 0x9b, 0x7a, 0x5b, 0x6d, 0x9e, 0xc8, 0x0d, 0xe5, 0x91, 0x22, 0x1f, 0x95, 0x32, 0x70, - 0x05, 0x94, 0x12, 0xa8, 0xde, 0x68, 0x29, 0x1d, 0xb9, 0xc4, 0x41, 0x01, 0x94, 0x93, 0xec, 0x89, - 0xac, 0x1e, 0x29, 0xea, 0x63, 0xfd, 0xe9, 0x33, 0x45, 0x2d, 0x65, 0xe1, 0x3a, 0x58, 0xfd, 0x13, - 0x3b, 0x96, 0xeb, 0x1d, 0xb9, 0x94, 0x83, 0x65, 0x00, 0x13, 0x50, 0x51, 0x23, 0xc2, 0x25, 0x61, - 0xe9, 0xf3, 0x27, 0x91, 0x7b, 0xf8, 0xfc, 0xdb, 0x44, 0xe4, 0xce, 0x27, 0x22, 0xf7, 0x63, 0x22, - 0x72, 0xef, 0xa7, 0x62, 0xe6, 0x7c, 0x2a, 0x66, 0xbe, 0x4f, 0xc5, 0xcc, 0x8b, 0xc3, 0x01, 0xa6, - 0x56, 0xd0, 0xad, 0x98, 0xe4, 0x54, 0x72, 0x03, 0xdf, 0x32, 0x2d, 0x03, 0x3b, 0xec, 0xb4, 0xcf, - 0x8e, 0xfb, 0x0e, 0xe9, 0x21, 0xe9, 0x95, 0x94, 0x9a, 0x9a, 0x8e, 0x5d, 0xe4, 0x77, 0x97, 0xd9, - 0x4f, 0x7f, 0xfb, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xa2, 0xcf, 0xf6, 0x4d, 0x04, 0x00, - 0x00, + // 622 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xce, 0x25, 0x55, 0x4b, 0xcf, 0x49, 0x14, 0x4e, 0xa5, 0x09, 0x2e, 0x75, 0xd3, 0xb2, 0x54, + 0x45, 0x8d, 0xd5, 0x80, 0x54, 0x29, 0x12, 0x88, 0xd0, 0x1a, 0x30, 0xaa, 0x4c, 0x71, 0x9a, 0x0c, + 0x2c, 0x96, 0x6b, 0x5f, 0xe2, 0x53, 0x5d, 0x5f, 0x64, 0x9f, 0x03, 0xf9, 0x05, 0x08, 0x26, 0xc4, + 0xc4, 0xd8, 0x81, 0x01, 0x89, 0x85, 0x9f, 0xc1, 0xd8, 0x91, 0x11, 0x25, 0x03, 0xfc, 0x0c, 0x94, + 0x73, 0x1c, 0xbb, 0x01, 0x24, 0x96, 0xe8, 0xde, 0xfb, 0x9e, 0xbf, 0xef, 0xbd, 0xef, 0x3d, 0x05, + 0xae, 0x87, 0x03, 0xd3, 0x25, 0xb6, 0xc9, 0xa8, 0x2f, 0x0f, 0xf6, 0xe4, 0x59, 0x50, 0xeb, 0xfb, + 0x94, 0x51, 0x54, 0x48, 0xe0, 0xda, 0x60, 0x4f, 0x5c, 0xe9, 0xd1, 0x1e, 0xe5, 0x88, 0x3c, 0x79, + 0x45, 0x45, 0xe2, 0x75, 0xf3, 0x9c, 0x78, 0x54, 0xe6, 0xbf, 0x51, 0x6a, 0xab, 0x07, 0xf3, 0xaa, + 0x8d, 0x3d, 0x46, 0xd8, 0x50, 0xf5, 0xba, 0x14, 0xdd, 0x83, 0xab, 0x16, 0xf5, 0xb1, 0x31, 0x63, + 0x33, 0x4c, 0xdb, 0xf6, 0x71, 0x10, 0x54, 0x40, 0x15, 0x6c, 0x2f, 0xeb, 0x2b, 0x13, 0xb4, 0x13, + 0x83, 0xcd, 0x08, 0x6b, 0x6c, 0xfe, 0xba, 0xd8, 0x00, 0xef, 0x7e, 0x7e, 0xdd, 0xa9, 0xa4, 0xba, + 0x24, 0x53, 0x5e, 0x83, 0x78, 0x5d, 0xba, 0x45, 0xa0, 0xa0, 0x61, 0xf6, 0x8a, 0xfa, 0x67, 0x5c, + 0xa7, 0x0c, 0x97, 0xfa, 0x18, 0xfb, 0x06, 0xb1, 0xa7, 0xc4, 0x8b, 0x93, 0x50, 0xb5, 0xd1, 0x06, + 0x14, 0xce, 0x43, 0x97, 0x11, 0xae, 0x1b, 0x54, 0xb2, 0xd5, 0xdc, 0xf6, 0xb2, 0x0e, 0x79, 0x6a, + 0xa2, 0x16, 0x34, 0xaa, 0xb1, 0x56, 0x39, 0xa5, 0xe5, 0x45, 0xd4, 0x91, 0xd4, 0x5b, 0x00, 0x8b, + 0x47, 0xa4, 0x8b, 0xad, 0xa1, 0xe5, 0x62, 0x65, 0x80, 0x3d, 0x86, 0x64, 0xb8, 0x18, 0x30, 0x93, + 0x85, 0xd1, 0x18, 0xc5, 0x7a, 0xb9, 0x76, 0xc5, 0xaf, 0x5a, 0xbb, 0xd3, 0xe2, 0xb0, 0x3e, 0x2d, + 0x43, 0x9b, 0x30, 0x7f, 0xea, 0x52, 0xeb, 0xcc, 0x70, 0x30, 0xe9, 0x39, 0xac, 0x92, 0xad, 0x82, + 0xed, 0x9c, 0x2e, 0xf0, 0xdc, 0x53, 0x9e, 0x6a, 0xdc, 0x8e, 0x1b, 0x11, 0x53, 0x8d, 0xb8, 0xb1, + 0xae, 0x81, 0x27, 0xc2, 0x5b, 0x5f, 0x00, 0x2c, 0xcc, 0x7a, 0xe1, 0x93, 0x3f, 0x80, 0x45, 0x2b, + 0xf4, 0x7d, 0xec, 0x31, 0xe3, 0xff, 0x5a, 0x2a, 0x4c, 0xcb, 0xa3, 0x10, 0xed, 0xc3, 0x25, 0x87, + 0x04, 0x8c, 0xfa, 0x43, 0x6e, 0x8e, 0x50, 0x5f, 0x9f, 0xfb, 0xf0, 0xea, 0xe8, 0x7a, 0x5c, 0xfd, + 0xf7, 0x25, 0x45, 0xfd, 0xba, 0x38, 0x72, 0xee, 0x4d, 0x16, 0xa2, 0xb6, 0x47, 0x06, 0xd8, 0x0f, + 0x4c, 0x77, 0xb6, 0x65, 0xf4, 0x10, 0x16, 0xa2, 0x65, 0x76, 0xa3, 0x65, 0xf2, 0x8e, 0x85, 0xfa, + 0xda, 0x9c, 0x70, 0xfa, 0x90, 0xf4, 0x7c, 0xfc, 0x05, 0x1f, 0xfa, 0x3e, 0xcc, 0xa7, 0x57, 0xc4, + 0xed, 0x14, 0xea, 0xe2, 0x1c, 0x41, 0xea, 0x40, 0x74, 0xc1, 0x4b, 0x5d, 0xcb, 0x01, 0x2c, 0x26, + 0xc6, 0x72, 0x82, 0x1c, 0x27, 0xb8, 0xf5, 0xaf, 0xd1, 0x39, 0x45, 0xc1, 0x4d, 0x87, 0x8d, 0x3b, + 0x1f, 0x2f, 0x36, 0x32, 0xb1, 0x07, 0x52, 0xca, 0x83, 0x30, 0x9e, 0x38, 0xb9, 0xfa, 0x9d, 0x0f, + 0x00, 0x5e, 0x8b, 0x37, 0x80, 0x6e, 0xc2, 0x1b, 0xed, 0x8e, 0xd1, 0x3a, 0x69, 0x9e, 0xb4, 0x5b, + 0x46, 0x5b, 0x6b, 0x1d, 0x2b, 0x07, 0xea, 0x63, 0x55, 0x39, 0x2c, 0x65, 0xd0, 0x0a, 0x2c, 0x25, + 0x50, 0xf3, 0xe0, 0x44, 0xed, 0x28, 0x25, 0x80, 0x44, 0xb8, 0x9a, 0x64, 0x8f, 0x15, 0xed, 0x50, + 0xd5, 0x9e, 0x18, 0xcf, 0x9e, 0xab, 0x5a, 0x29, 0x8b, 0xd6, 0x60, 0xf9, 0x4f, 0xec, 0x48, 0x69, + 0x76, 0x94, 0x52, 0x0e, 0xad, 0x42, 0x94, 0x80, 0xaa, 0x36, 0x25, 0x5c, 0x10, 0x17, 0x3e, 0x7f, + 0x92, 0xc0, 0xa3, 0x17, 0xdf, 0x46, 0x12, 0xb8, 0x1c, 0x49, 0xe0, 0xc7, 0x48, 0x02, 0xef, 0xc7, + 0x52, 0xe6, 0x72, 0x2c, 0x65, 0xbe, 0x8f, 0xa5, 0xcc, 0xcb, 0xfd, 0x1e, 0x61, 0x4e, 0x78, 0x5a, + 0xb3, 0xe8, 0xb9, 0xdc, 0x0f, 0x03, 0xc7, 0x72, 0x4c, 0xe2, 0xf1, 0xd7, 0x2e, 0x7f, 0xee, 0x7a, + 0xd4, 0xc6, 0xf2, 0x6b, 0x39, 0x35, 0x35, 0x1b, 0xf6, 0x71, 0x70, 0xba, 0xc8, 0xff, 0x06, 0xee, + 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xb2, 0x20, 0x70, 0x5f, 0x04, 0x00, 0x00, } func (this *IdentityInfo) Equal(that interface{}) bool { @@ -399,9 +399,6 @@ func (this *IdentityInfo) Equal(that interface{}) bool { if this.CoreValidatorAddress != that1.CoreValidatorAddress { return false } - if this.Pubkey != that1.Pubkey { - return false - } return true } func (this *NetworkInfo) Equal(that interface{}) bool { @@ -423,9 +420,17 @@ func (this *NetworkInfo) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Ip != that1.Ip { + if this.PeerId != that1.PeerId { return false } + if len(this.MultiAddrs) != len(that1.MultiAddrs) { + return false + } + for i := range this.MultiAddrs { + if this.MultiAddrs[i] != that1.MultiAddrs[i] { + return false + } + } return true } func (this *LifecycleEvent) Equal(that interface{}) bool { @@ -537,13 +542,6 @@ func (m *IdentityInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Pubkey) > 0 { - i -= len(m.Pubkey) - copy(dAtA[i:], m.Pubkey) - i = encodeVarintValidator(dAtA, i, uint64(len(m.Pubkey))) - i-- - dAtA[i] = 0x12 - } if len(m.CoreValidatorAddress) > 0 { i -= len(m.CoreValidatorAddress) copy(dAtA[i:], m.CoreValidatorAddress) @@ -574,10 +572,19 @@ func (m *NetworkInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Ip) > 0 { - i -= len(m.Ip) - copy(dAtA[i:], m.Ip) - i = encodeVarintValidator(dAtA, i, uint64(len(m.Ip))) + if len(m.MultiAddrs) > 0 { + for iNdEx := len(m.MultiAddrs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MultiAddrs[iNdEx]) + copy(dAtA[i:], m.MultiAddrs[iNdEx]) + i = encodeVarintValidator(dAtA, i, uint64(len(m.MultiAddrs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.PeerId) > 0 { + i -= len(m.PeerId) + copy(dAtA[i:], m.PeerId) + i = encodeVarintValidator(dAtA, i, uint64(len(m.PeerId))) i-- dAtA[i] = 0xa } @@ -739,10 +746,6 @@ func (m *IdentityInfo) Size() (n int) { if l > 0 { n += 1 + l + sovValidator(uint64(l)) } - l = len(m.Pubkey) - if l > 0 { - n += 1 + l + sovValidator(uint64(l)) - } return n } @@ -752,10 +755,16 @@ func (m *NetworkInfo) Size() (n int) { } var l int _ = l - l = len(m.Ip) + l = len(m.PeerId) if l > 0 { n += 1 + l + sovValidator(uint64(l)) } + if len(m.MultiAddrs) > 0 { + for _, s := range m.MultiAddrs { + l = len(s) + n += 1 + l + sovValidator(uint64(l)) + } + } return n } @@ -880,38 +889,6 @@ func (m *IdentityInfo) Unmarshal(dAtA []byte) error { } m.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pubkey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - 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 ErrInvalidLengthValidator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pubkey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipValidator(dAtA[iNdEx:]) @@ -964,7 +941,39 @@ func (m *NetworkInfo) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowValidator + } + 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 ErrInvalidLengthValidator + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthValidator + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MultiAddrs", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -992,7 +1001,7 @@ func (m *NetworkInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ip = string(dAtA[iNdEx:postIndex]) + m.MultiAddrs = append(m.MultiAddrs, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex From 8a01dc3fd3887e1181f9b5d0e4b2adca404d0fb9 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 17:00:24 +0530 Subject: [PATCH 102/105] feat: updated proto file to remove core_val address from update uv msg --- proto/uvalidator/v1/tx.proto | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/proto/uvalidator/v1/tx.proto b/proto/uvalidator/v1/tx.proto index 02804012..2156e92a 100755 --- a/proto/uvalidator/v1/tx.proto +++ b/proto/uvalidator/v1/tx.proto @@ -74,11 +74,8 @@ message MsgUpdateUniversalValidator { // signer is the address authorized to execute this message string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // core_validator_address is the address of the core validator. - string core_validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - // network metadata for validator node - NetworkInfo network = 3; + NetworkInfo network = 2; } message MsgUpdateUniversalValidatorResponse {} From 79c180debda361a9968ad2c6e811d4b0a243cd22 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 17:00:39 +0530 Subject: [PATCH 103/105] refactor: added generated protobuf --- api/uvalidator/v1/tx.pulsar.go | 221 +++++++++++---------------------- x/uvalidator/types/tx.pb.go | 128 ++++++------------- 2 files changed, 109 insertions(+), 240 deletions(-) diff --git a/api/uvalidator/v1/tx.pulsar.go b/api/uvalidator/v1/tx.pulsar.go index 0fa2826b..1280a312 100644 --- a/api/uvalidator/v1/tx.pulsar.go +++ b/api/uvalidator/v1/tx.pulsar.go @@ -1791,17 +1791,15 @@ func (x *fastReflection_MsgAddUniversalValidatorResponse) ProtoMethods() *protoi } var ( - md_MsgUpdateUniversalValidator protoreflect.MessageDescriptor - fd_MsgUpdateUniversalValidator_signer protoreflect.FieldDescriptor - fd_MsgUpdateUniversalValidator_core_validator_address protoreflect.FieldDescriptor - fd_MsgUpdateUniversalValidator_network protoreflect.FieldDescriptor + md_MsgUpdateUniversalValidator protoreflect.MessageDescriptor + fd_MsgUpdateUniversalValidator_signer protoreflect.FieldDescriptor + fd_MsgUpdateUniversalValidator_network protoreflect.FieldDescriptor ) func init() { file_uvalidator_v1_tx_proto_init() md_MsgUpdateUniversalValidator = File_uvalidator_v1_tx_proto.Messages().ByName("MsgUpdateUniversalValidator") fd_MsgUpdateUniversalValidator_signer = md_MsgUpdateUniversalValidator.Fields().ByName("signer") - fd_MsgUpdateUniversalValidator_core_validator_address = md_MsgUpdateUniversalValidator.Fields().ByName("core_validator_address") fd_MsgUpdateUniversalValidator_network = md_MsgUpdateUniversalValidator.Fields().ByName("network") } @@ -1876,12 +1874,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) Range(f func(protoreflect.F return } } - if x.CoreValidatorAddress != "" { - value := protoreflect.ValueOfString(x.CoreValidatorAddress) - if !f(fd_MsgUpdateUniversalValidator_core_validator_address, value) { - return - } - } if x.Network != nil { value := protoreflect.ValueOfMessage(x.Network.ProtoReflect()) if !f(fd_MsgUpdateUniversalValidator_network, value) { @@ -1905,8 +1897,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) Has(fd protoreflect.FieldDe switch fd.FullName() { case "uvalidator.v1.MsgUpdateUniversalValidator.signer": return x.Signer != "" - case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": - return x.CoreValidatorAddress != "" case "uvalidator.v1.MsgUpdateUniversalValidator.network": return x.Network != nil default: @@ -1927,8 +1917,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) Clear(fd protoreflect.Field switch fd.FullName() { case "uvalidator.v1.MsgUpdateUniversalValidator.signer": x.Signer = "" - case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": - x.CoreValidatorAddress = "" case "uvalidator.v1.MsgUpdateUniversalValidator.network": x.Network = nil default: @@ -1950,9 +1938,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) Get(descriptor protoreflect case "uvalidator.v1.MsgUpdateUniversalValidator.signer": value := x.Signer return protoreflect.ValueOfString(value) - case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": - value := x.CoreValidatorAddress - return protoreflect.ValueOfString(value) case "uvalidator.v1.MsgUpdateUniversalValidator.network": value := x.Network return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -1978,8 +1963,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) Set(fd protoreflect.FieldDe switch fd.FullName() { case "uvalidator.v1.MsgUpdateUniversalValidator.signer": x.Signer = value.Interface().(string) - case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": - x.CoreValidatorAddress = value.Interface().(string) case "uvalidator.v1.MsgUpdateUniversalValidator.network": x.Network = value.Message().Interface().(*NetworkInfo) default: @@ -2009,8 +1992,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) Mutable(fd protoreflect.Fie return protoreflect.ValueOfMessage(x.Network.ProtoReflect()) case "uvalidator.v1.MsgUpdateUniversalValidator.signer": panic(fmt.Errorf("field signer of message uvalidator.v1.MsgUpdateUniversalValidator is not mutable")) - case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": - panic(fmt.Errorf("field core_validator_address of message uvalidator.v1.MsgUpdateUniversalValidator is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uvalidator.v1.MsgUpdateUniversalValidator")) @@ -2026,8 +2007,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) NewField(fd protoreflect.Fi switch fd.FullName() { case "uvalidator.v1.MsgUpdateUniversalValidator.signer": return protoreflect.ValueOfString("") - case "uvalidator.v1.MsgUpdateUniversalValidator.core_validator_address": - return protoreflect.ValueOfString("") case "uvalidator.v1.MsgUpdateUniversalValidator.network": m := new(NetworkInfo) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -2104,10 +2083,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) ProtoMethods() *protoiface. if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.CoreValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.Network != nil { l = options.Size(x.Network) n += 1 + l + runtime.Sov(uint64(l)) @@ -2153,13 +2128,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) ProtoMethods() *protoiface. copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x1a - } - if len(x.CoreValidatorAddress) > 0 { - i -= len(x.CoreValidatorAddress) - copy(dAtA[i:], x.CoreValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoreValidatorAddress))) - i-- dAtA[i] = 0x12 } if len(x.Signer) > 0 { @@ -2251,38 +2219,6 @@ func (x *fastReflection_MsgUpdateUniversalValidator) ProtoMethods() *protoiface. x.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", 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.CoreValidatorAddress = 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 Network", wireType) } @@ -3729,10 +3665,8 @@ type MsgUpdateUniversalValidator struct { // signer is the address authorized to execute this message Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - // core_validator_address is the address of the core validator. - CoreValidatorAddress string `protobuf:"bytes,2,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` // network metadata for validator node - Network *NetworkInfo `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` + Network *NetworkInfo `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` } func (x *MsgUpdateUniversalValidator) Reset() { @@ -3762,13 +3696,6 @@ func (x *MsgUpdateUniversalValidator) GetSigner() string { return "" } -func (x *MsgUpdateUniversalValidator) GetCoreValidatorAddress() string { - if x != nil { - return x.CoreValidatorAddress - } - return "" -} - func (x *MsgUpdateUniversalValidator) GetNetwork() *NetworkInfo { if x != nil { return x.Network @@ -3919,85 +3846,79 @@ var file_uvalidator_v1_tx_proto_rawDesc = []byte{ 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x96, - 0x02, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbd, + 0x01, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x12, 0x57, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, - 0x36, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, - 0x26, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, - 0x01, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, - 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x12, 0x4e, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x3a, 0x36, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, - 0x2a, 0x26, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0xcf, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x71, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x27, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, + 0x12, 0x34, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x3a, 0x36, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x25, + 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x16, 0x63, 0x6f, 0x72, 0x65, 0x5f, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x14, 0x63, 0x6f, 0x72, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x36, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, + 0x25, 0x0a, 0x23, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xcf, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x56, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x27, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x2f, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x1a, 0x2f, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, - 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, - 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, - 0x01, 0x42, 0xb6, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, - 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, - 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, - 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, - 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x18, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x1a, 0x32, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x18, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x2a, 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x32, 0x2e, + 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb6, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, + 0x2e, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, + 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x76, + 0x31, 0x3b, 0x75, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0e, 0x55, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/x/uvalidator/types/tx.pb.go b/x/uvalidator/types/tx.pb.go index b24a51ea..dcfa6e9c 100644 --- a/x/uvalidator/types/tx.pb.go +++ b/x/uvalidator/types/tx.pb.go @@ -232,10 +232,8 @@ var xxx_messageInfo_MsgAddUniversalValidatorResponse proto.InternalMessageInfo type MsgUpdateUniversalValidator struct { // signer is the address authorized to execute this message Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - // core_validator_address is the address of the core validator. - CoreValidatorAddress string `protobuf:"bytes,2,opt,name=core_validator_address,json=coreValidatorAddress,proto3" json:"core_validator_address,omitempty"` // network metadata for validator node - Network *NetworkInfo `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` + Network *NetworkInfo `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` } func (m *MsgUpdateUniversalValidator) Reset() { *m = MsgUpdateUniversalValidator{} } @@ -278,13 +276,6 @@ func (m *MsgUpdateUniversalValidator) GetSigner() string { return "" } -func (m *MsgUpdateUniversalValidator) GetCoreValidatorAddress() string { - if m != nil { - return m.CoreValidatorAddress - } - return "" -} - func (m *MsgUpdateUniversalValidator) GetNetwork() *NetworkInfo { if m != nil { return m.Network @@ -433,43 +424,43 @@ func init() { proto.RegisterFile("uvalidator/v1/tx.proto", fileDescriptor_bea4c2 var fileDescriptor_bea4c2a0c904c8a7 = []byte{ // 589 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0x3d, 0x6f, 0xd3, 0x40, - 0x1c, 0xc6, 0xe3, 0xa6, 0x04, 0xe5, 0x78, 0x13, 0x56, 0xda, 0xba, 0xae, 0x6a, 0x82, 0x2b, 0x4a, - 0x15, 0x29, 0x31, 0x4d, 0x50, 0x91, 0xba, 0x35, 0x1b, 0x43, 0x2a, 0x08, 0x6a, 0x91, 0x58, 0x22, - 0x37, 0x3e, 0x2e, 0x16, 0xf5, 0x9d, 0xb9, 0x73, 0x42, 0xcb, 0x84, 0x18, 0x19, 0x50, 0x27, 0x3e, - 0x47, 0x86, 0x7e, 0x88, 0x6e, 0x54, 0x5d, 0x60, 0x42, 0x28, 0x19, 0xf2, 0x35, 0x50, 0xce, 0x2f, - 0x89, 0x8d, 0xaf, 0xc9, 0xc0, 0xc2, 0x12, 0x5d, 0xfc, 0x3c, 0x79, 0xfe, 0x8f, 0x7f, 0xe7, 0x8b, - 0xc1, 0x72, 0xb7, 0x67, 0x1e, 0xdb, 0x96, 0xe9, 0x11, 0x6a, 0xf4, 0xb6, 0x0d, 0xef, 0xa4, 0xe2, - 0x52, 0xe2, 0x11, 0xf9, 0xce, 0xe4, 0x7a, 0xa5, 0xb7, 0xad, 0xde, 0x37, 0x1d, 0x1b, 0x13, 0x83, - 0x7f, 0xfa, 0x0e, 0x75, 0xa5, 0x4d, 0x98, 0x43, 0x98, 0xe1, 0x30, 0x34, 0xfe, 0xa5, 0xc3, 0x50, - 0x20, 0xac, 0xc5, 0x23, 0x11, 0xc4, 0x90, 0xd9, 0x2c, 0x10, 0x0b, 0x88, 0x20, 0xc2, 0x97, 0xc6, - 0x78, 0x15, 0x5c, 0x5d, 0xf5, 0xb3, 0x5a, 0xbe, 0xe0, 0x7f, 0x09, 0xa5, 0x44, 0xc1, 0x53, 0x17, - 0x86, 0xd2, 0x7a, 0x5c, 0x9a, 0x14, 0xe6, 0xb2, 0xfe, 0x55, 0x02, 0xf7, 0x1a, 0x0c, 0x1d, 0xb8, - 0x96, 0xe9, 0xc1, 0x17, 0x26, 0x35, 0x1d, 0x26, 0xef, 0x80, 0xbc, 0xd9, 0xf5, 0x3a, 0x84, 0xda, - 0xde, 0xa9, 0x22, 0x15, 0xa5, 0xad, 0x7c, 0x5d, 0xb9, 0x3a, 0x2f, 0x17, 0x82, 0x91, 0x7b, 0x96, - 0x45, 0x21, 0x63, 0xaf, 0x3c, 0x6a, 0x63, 0xd4, 0x9c, 0x58, 0xe5, 0x1a, 0xc8, 0xb9, 0x3c, 0x41, - 0x59, 0x28, 0x4a, 0x5b, 0xb7, 0xaa, 0x4b, 0x95, 0x18, 0x9f, 0x8a, 0x1f, 0x5f, 0x5f, 0xbc, 0xf8, - 0xf5, 0x20, 0xd3, 0x0c, 0xac, 0xbb, 0x77, 0x3f, 0x8f, 0xfa, 0xa5, 0x49, 0x88, 0xbe, 0x0a, 0x56, - 0x12, 0x7d, 0x9a, 0x90, 0xb9, 0x04, 0x33, 0xa8, 0x9f, 0x2d, 0x00, 0xa5, 0xc1, 0xd0, 0x9e, 0x65, - 0x1d, 0x60, 0xbb, 0x07, 0x29, 0x33, 0x8f, 0x0f, 0xc3, 0x7c, 0xf9, 0x09, 0xc8, 0x31, 0x1b, 0x61, - 0x48, 0x67, 0x36, 0x0e, 0x7c, 0xf2, 0x6b, 0xb0, 0xdc, 0x26, 0x14, 0xb6, 0xa2, 0x8e, 0x2d, 0xd3, - 0xf7, 0xf1, 0xfa, 0xf9, 0xfa, 0xc3, 0xab, 0xf3, 0xf2, 0x7a, 0x90, 0x10, 0xcd, 0x89, 0x47, 0x15, - 0xc6, 0x01, 0x49, 0x4d, 0x7e, 0x0a, 0x6e, 0x62, 0xe8, 0x7d, 0x20, 0xf4, 0x9d, 0xb2, 0xc8, 0x41, - 0xa8, 0x09, 0x10, 0xfb, 0xbe, 0xfa, 0x1c, 0xbf, 0x25, 0xcd, 0xd0, 0xba, 0x5b, 0x1b, 0x83, 0x08, - 0xba, 0x7d, 0x19, 0xf5, 0x4b, 0x1b, 0x53, 0x1b, 0x27, 0xba, 0x6b, 0x5d, 0x07, 0x45, 0x91, 0x16, - 0x61, 0xfb, 0xb6, 0x00, 0xd6, 0x22, 0xa4, 0xff, 0x0d, 0xb9, 0xec, 0xfc, 0xe4, 0x76, 0x12, 0xe4, - 0x36, 0xe3, 0xe4, 0x44, 0x37, 0xae, 0x3f, 0x02, 0x1b, 0xd7, 0xc8, 0x11, 0xbf, 0x1f, 0x12, 0xe7, - 0xd7, 0x84, 0x0e, 0xe9, 0xfd, 0x1b, 0x7e, 0xfb, 0x33, 0xf8, 0x89, 0x13, 0x52, 0xb1, 0xcd, 0x02, - 0x20, 0x6a, 0x1e, 0x00, 0x10, 0xc9, 0x21, 0x80, 0xea, 0xf7, 0x2c, 0xc8, 0x36, 0x18, 0x92, 0x0f, - 0xc1, 0xed, 0xd8, 0xff, 0x84, 0x96, 0xd8, 0x9c, 0xc4, 0xb9, 0x55, 0x37, 0xaf, 0xd7, 0xc3, 0x7c, - 0xf9, 0x3d, 0x58, 0x4a, 0x3f, 0xd3, 0x8f, 0xff, 0x0e, 0x48, 0x35, 0xaa, 0xc6, 0x9c, 0xc6, 0x68, - 0xe4, 0x47, 0xa0, 0x08, 0xcf, 0x43, 0x49, 0x54, 0x3b, 0x65, 0x70, 0x75, 0x7e, 0xef, 0xf4, 0x6c, - 0xe1, 0xb3, 0x94, 0x32, 0x5b, 0xe4, 0x4d, 0x9b, 0x3d, 0x6b, 0x2b, 0xd5, 0x1b, 0x9f, 0x46, 0xfd, - 0x92, 0x54, 0x7f, 0x79, 0x31, 0xd0, 0xa4, 0xcb, 0x81, 0x26, 0xfd, 0x1e, 0x68, 0xd2, 0xd9, 0x50, - 0xcb, 0x5c, 0x0e, 0xb5, 0xcc, 0xcf, 0xa1, 0x96, 0x79, 0xf3, 0x0c, 0xd9, 0x5e, 0xa7, 0x7b, 0x54, - 0x69, 0x13, 0xc7, 0x70, 0xbb, 0xac, 0xd3, 0xee, 0x98, 0x36, 0xe6, 0xab, 0x32, 0x5f, 0x96, 0x31, - 0xb1, 0xa0, 0x71, 0x62, 0x4c, 0x3d, 0x61, 0xfc, 0x6d, 0x73, 0x94, 0xe3, 0xef, 0x93, 0xda, 0x9f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xb2, 0xac, 0x17, 0x3e, 0x2c, 0x07, 0x00, 0x00, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xbf, 0x6f, 0xd3, 0x40, + 0x18, 0x8d, 0xd3, 0x12, 0x94, 0xe3, 0x97, 0xb0, 0xd2, 0xd6, 0x75, 0x55, 0x13, 0x5c, 0x51, 0xaa, + 0x48, 0x89, 0x69, 0x82, 0x8a, 0xd4, 0xad, 0xd9, 0x18, 0x52, 0x41, 0x50, 0x8b, 0xc4, 0x12, 0xb9, + 0xf1, 0x71, 0xb1, 0xa8, 0xef, 0xcc, 0x9d, 0x13, 0x5a, 0x26, 0xc4, 0xc8, 0x80, 0xfa, 0xa7, 0x64, + 0xe8, 0xca, 0xde, 0x8d, 0xaa, 0x0b, 0x4c, 0x08, 0x25, 0x43, 0xfe, 0x0d, 0x94, 0xf3, 0x8f, 0xc4, + 0xc6, 0xd7, 0x64, 0xe8, 0x12, 0x7d, 0xf1, 0x7b, 0x79, 0xdf, 0xfb, 0xde, 0x7d, 0x17, 0x83, 0xe5, + 0x6e, 0xcf, 0x3c, 0xb6, 0x2d, 0xd3, 0x23, 0xd4, 0xe8, 0x6d, 0x1b, 0xde, 0x49, 0xc5, 0xa5, 0xc4, + 0x23, 0xf2, 0xbd, 0xc9, 0xf3, 0x4a, 0x6f, 0x5b, 0x7d, 0x68, 0x3a, 0x36, 0x26, 0x06, 0xff, 0xf4, + 0x19, 0xea, 0x4a, 0x9b, 0x30, 0x87, 0x30, 0xc3, 0x61, 0x68, 0xfc, 0x4b, 0x87, 0xa1, 0x00, 0x58, + 0x8b, 0x4b, 0x22, 0x88, 0x21, 0xb3, 0x59, 0x00, 0x16, 0x10, 0x41, 0x84, 0x97, 0xc6, 0xb8, 0x0a, + 0x9e, 0xae, 0xfa, 0x5a, 0x2d, 0x1f, 0xf0, 0xbf, 0x84, 0x50, 0xc2, 0xe0, 0xa9, 0x0b, 0x43, 0x68, + 0x3d, 0x0e, 0x4d, 0x0c, 0x73, 0x58, 0xff, 0x2e, 0x81, 0x07, 0x0d, 0x86, 0x0e, 0x5c, 0xcb, 0xf4, + 0xe0, 0x2b, 0x93, 0x9a, 0x0e, 0x93, 0x77, 0x40, 0xde, 0xec, 0x7a, 0x1d, 0x42, 0x6d, 0xef, 0x54, + 0x91, 0x8a, 0xd2, 0x56, 0xbe, 0xae, 0x5c, 0x9d, 0x97, 0x0b, 0x41, 0xcb, 0x3d, 0xcb, 0xa2, 0x90, + 0xb1, 0x37, 0x1e, 0xb5, 0x31, 0x6a, 0x4e, 0xa8, 0x72, 0x0d, 0xe4, 0x5c, 0xae, 0xa0, 0x64, 0x8b, + 0xd2, 0xd6, 0x9d, 0xea, 0x52, 0x25, 0x96, 0x4f, 0xc5, 0x97, 0xaf, 0x2f, 0x5e, 0xfc, 0x79, 0x94, + 0x69, 0x06, 0xd4, 0xdd, 0xfb, 0x5f, 0x47, 0xfd, 0xd2, 0x44, 0x44, 0x5f, 0x05, 0x2b, 0x09, 0x3f, + 0x4d, 0xc8, 0x5c, 0x82, 0x19, 0xd4, 0xcf, 0xb2, 0x40, 0x69, 0x30, 0xb4, 0x67, 0x59, 0x07, 0xd8, + 0xee, 0x41, 0xca, 0xcc, 0xe3, 0xc3, 0x50, 0x5f, 0x7e, 0x06, 0x72, 0xcc, 0x46, 0x18, 0xd2, 0x99, + 0x8e, 0x03, 0x9e, 0xfc, 0x16, 0x2c, 0xb7, 0x09, 0x85, 0xad, 0xc8, 0x63, 0xcb, 0xf4, 0x79, 0xdc, + 0x7e, 0xbe, 0xfe, 0xf8, 0xea, 0xbc, 0xbc, 0x1e, 0x28, 0x44, 0x7d, 0xe2, 0x52, 0x85, 0xb1, 0x40, + 0x12, 0x93, 0x9f, 0x83, 0xdb, 0x18, 0x7a, 0x9f, 0x08, 0xfd, 0xa0, 0x2c, 0xf2, 0x20, 0xd4, 0x44, + 0x10, 0xfb, 0x3e, 0xfa, 0x12, 0xbf, 0x27, 0xcd, 0x90, 0xba, 0x5b, 0x1b, 0x07, 0x11, 0x78, 0xfb, + 0x36, 0xea, 0x97, 0x36, 0xa6, 0x0e, 0x4e, 0x34, 0xb5, 0xae, 0x83, 0xa2, 0x08, 0x8b, 0x62, 0xfb, + 0x21, 0x81, 0xb5, 0x28, 0xd2, 0x1b, 0x49, 0x6e, 0x6a, 0xc0, 0xec, 0xfc, 0x03, 0xee, 0x24, 0x06, + 0xdc, 0x8c, 0x0f, 0x28, 0xf2, 0xa7, 0x3f, 0x01, 0x1b, 0xd7, 0xc0, 0xd1, 0x98, 0xbf, 0xfc, 0x31, + 0x9b, 0xd0, 0x21, 0xbd, 0x9b, 0x19, 0x73, 0x7f, 0xc6, 0x82, 0x88, 0x15, 0x52, 0xf7, 0x62, 0x56, + 0x00, 0x22, 0xe7, 0x41, 0x00, 0x22, 0x38, 0x0c, 0xa0, 0xfa, 0x73, 0x01, 0x2c, 0x34, 0x18, 0x92, + 0x0f, 0xc1, 0xdd, 0xd8, 0x75, 0xd6, 0x12, 0x87, 0x93, 0xb8, 0x5e, 0xea, 0xe6, 0xf5, 0x78, 0xa8, + 0x2f, 0x7f, 0x04, 0x4b, 0xe9, 0x57, 0xef, 0xe9, 0xff, 0x02, 0xa9, 0x44, 0xd5, 0x98, 0x93, 0x18, + 0xb5, 0xfc, 0x0c, 0x14, 0xe1, 0xda, 0x96, 0x44, 0xb6, 0x53, 0x1a, 0x57, 0xe7, 0xe7, 0x4e, 0xf7, + 0x16, 0xee, 0x52, 0x4a, 0x6f, 0x11, 0x37, 0xad, 0xf7, 0xac, 0xa3, 0x54, 0x6f, 0x7d, 0x19, 0xf5, + 0x4b, 0x52, 0xfd, 0xf5, 0xc5, 0x40, 0x93, 0x2e, 0x07, 0x9a, 0xf4, 0x77, 0xa0, 0x49, 0x67, 0x43, + 0x2d, 0x73, 0x39, 0xd4, 0x32, 0xbf, 0x87, 0x5a, 0xe6, 0xdd, 0x0b, 0x64, 0x7b, 0x9d, 0xee, 0x51, + 0xa5, 0x4d, 0x1c, 0xc3, 0xed, 0xb2, 0x4e, 0xbb, 0x63, 0xda, 0x98, 0x57, 0x65, 0x5e, 0x96, 0x31, + 0xb1, 0xa0, 0x71, 0x62, 0x4c, 0x6d, 0x18, 0x7f, 0x29, 0x1c, 0xe5, 0xf8, 0xdf, 0x7e, 0xed, 0x5f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x5f, 0x0e, 0xc7, 0xd3, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -837,13 +828,6 @@ func (m *MsgUpdateUniversalValidator) MarshalToSizedBuffer(dAtA []byte) (int, er i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a - } - if len(m.CoreValidatorAddress) > 0 { - i -= len(m.CoreValidatorAddress) - copy(dAtA[i:], m.CoreValidatorAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.CoreValidatorAddress))) - i-- dAtA[i] = 0x12 } if len(m.Signer) > 0 { @@ -1014,10 +998,6 @@ func (m *MsgUpdateUniversalValidator) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.CoreValidatorAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } if m.Network != nil { l = m.Network.Size() n += 1 + l + sovTx(uint64(l)) @@ -1493,38 +1473,6 @@ func (m *MsgUpdateUniversalValidator) Unmarshal(dAtA []byte) error { m.Signer = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CoreValidatorAddress", 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.CoreValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) } From 2c69764b272382d512650ba4fabff2648973464c Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 17:01:07 +0530 Subject: [PATCH 104/105] feat: updated uv update msg implementation --- x/uvalidator/keeper/msg_server.go | 17 +++++++++++------ .../types/msg_update_universal_validator.go | 11 ++--------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/x/uvalidator/keeper/msg_server.go b/x/uvalidator/keeper/msg_server.go index 396a9a6f..02271cbc 100755 --- a/x/uvalidator/keeper/msg_server.go +++ b/x/uvalidator/keeper/msg_server.go @@ -3,6 +3,7 @@ package keeper import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "cosmossdk.io/errors" @@ -78,17 +79,21 @@ func (ms msgServer) RemoveUniversalValidator(ctx context.Context, msg *types.Msg // UpdateUniversalValidator implements types.MsgServer. func (ms msgServer) UpdateUniversalValidator(ctx context.Context, msg *types.MsgUpdateUniversalValidator) (*types.MsgUpdateUniversalValidatorResponse, error) { - // Retrieve the current Params - params, err := ms.k.Params.Get(ctx) + // Parse signer account + signerAcc, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { - return nil, errors.Wrapf(err, "failed to get params") + return nil, errors.Wrapf(sdkErrors.ErrInvalidAddress, "invalid signer address: %s", msg.Signer) } - if params.Admin != msg.Signer { - return nil, errors.Wrapf(sdkErrors.ErrUnauthorized, "invalid authority; expected %s, got %s", params.Admin, msg.Signer) + // Find validator controlled by this account + valAddr := sdk.ValAddress(signerAcc) + + validator, err := ms.k.stakingKeeper.GetValidator(ctx, valAddr) + if err != nil { + return nil, errors.Wrap(err, "signer is not a validator operator") } - err = ms.k.UpdateUniversalValidator(ctx, msg.CoreValidatorAddress, *msg.Network) + err = ms.k.UpdateUniversalValidator(ctx, validator.OperatorAddress, *msg.Network) if err != nil { return nil, err } diff --git a/x/uvalidator/types/msg_update_universal_validator.go b/x/uvalidator/types/msg_update_universal_validator.go index 90d585ac..0973668e 100644 --- a/x/uvalidator/types/msg_update_universal_validator.go +++ b/x/uvalidator/types/msg_update_universal_validator.go @@ -16,9 +16,8 @@ func NewMsgUpdateUniversalValidator( network NetworkInfo, ) *MsgUpdateUniversalValidator { return &MsgUpdateUniversalValidator{ - Signer: sender.String(), - CoreValidatorAddress: coreValidatorAddress.String(), - Network: &network, + Signer: sender.String(), + Network: &network, } } @@ -45,11 +44,5 @@ func (msg *MsgUpdateUniversalValidator) ValidateBasic() error { return errors.Wrap(err, "invalid signer address") } - // Validate core validator address (must be a valid valoper address) - _, err := sdk.ValAddressFromBech32(msg.CoreValidatorAddress) - if err != nil { - return errors.Wrap(err, "invalid core validator address") - } - return msg.Network.ValidateBasic() } From fb6f260278cd1bcb9459c43728f60cdc3f9c2933 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 17:01:24 +0530 Subject: [PATCH 105/105] tests: updated the update uv msg tests --- .../msg_update_universal_validator_test.go | 37 +++++-------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/x/uvalidator/types/msg_update_universal_validator_test.go b/x/uvalidator/types/msg_update_universal_validator_test.go index 1521047d..089feb13 100644 --- a/x/uvalidator/types/msg_update_universal_validator_test.go +++ b/x/uvalidator/types/msg_update_universal_validator_test.go @@ -14,8 +14,7 @@ func TestMsgUpdateUniversalValidator_ValidateBasic(t *testing.T) { cfg.SetBech32PrefixForAccount(app.Bech32PrefixAccAddr, app.Bech32PrefixAccPub) cfg.SetBech32PrefixForValidator(app.Bech32PrefixValAddr, app.Bech32PrefixValPub) - validAdmin := "push1gjaw568e35hjc8udhat0xnsxxmkm2snrexxz20" - validCoreVal := "pushvaloper1gjaw568e35hjc8udhat0xnsxxmkm2snrjnakhg" + validSigner := "push1gjaw568e35hjc8udhat0xnsxxmkm2snrexxz20" tests := []struct { name string @@ -26,8 +25,7 @@ func TestMsgUpdateUniversalValidator_ValidateBasic(t *testing.T) { { name: "valid message", msg: types.MsgUpdateUniversalValidator{ - Signer: validAdmin, - CoreValidatorAddress: validCoreVal, + Signer: validSigner, Network: &types.NetworkInfo{ PeerId: "temp peerId", MultiAddrs: []string{"temp multi_addrs"}, @@ -38,8 +36,7 @@ func TestMsgUpdateUniversalValidator_ValidateBasic(t *testing.T) { { name: "invalid signer address", msg: types.MsgUpdateUniversalValidator{ - Signer: "invalid_signer", - CoreValidatorAddress: validCoreVal, + Signer: "invalid_signer", Network: &types.NetworkInfo{ PeerId: "temp peerId", MultiAddrs: []string{"temp multi_addrs"}, @@ -48,25 +45,11 @@ func TestMsgUpdateUniversalValidator_ValidateBasic(t *testing.T) { wantErr: true, errMsg: "invalid signer address", }, - { - name: "invalid core validator address format", - msg: types.MsgUpdateUniversalValidator{ - Signer: validAdmin, - CoreValidatorAddress: "bad_valoper_format", - Network: &types.NetworkInfo{ - PeerId: "temp peerId", - MultiAddrs: []string{"temp multi_addrs"}, - }, - }, - wantErr: true, - errMsg: "invalid core validator address", - }, { name: "empty peerId should fail", msg: types.MsgUpdateUniversalValidator{ - Signer: validAdmin, - CoreValidatorAddress: validCoreVal, - Network: &types.NetworkInfo{PeerId: "", MultiAddrs: []string{"temp multi_addrs"}}, + Signer: validSigner, + Network: &types.NetworkInfo{PeerId: "", MultiAddrs: []string{"temp multi_addrs"}}, }, wantErr: true, errMsg: "peerId cannot be empty", @@ -74,9 +57,8 @@ func TestMsgUpdateUniversalValidator_ValidateBasic(t *testing.T) { { name: "nil multi_addrs in networkInfo should fail", msg: types.MsgUpdateUniversalValidator{ - Signer: validAdmin, - CoreValidatorAddress: validCoreVal, - Network: &types.NetworkInfo{PeerId: "temp peerId", MultiAddrs: nil}, + Signer: validSigner, + Network: &types.NetworkInfo{PeerId: "temp peerId", MultiAddrs: nil}, }, wantErr: true, errMsg: "multi_addrs cannot be nil", @@ -84,9 +66,8 @@ func TestMsgUpdateUniversalValidator_ValidateBasic(t *testing.T) { { name: "empty multi_addrs in networkInfo should fail", msg: types.MsgUpdateUniversalValidator{ - Signer: validAdmin, - CoreValidatorAddress: validCoreVal, - Network: &types.NetworkInfo{PeerId: "temp peerId", MultiAddrs: []string{}}, + Signer: validSigner, + Network: &types.NetworkInfo{PeerId: "temp peerId", MultiAddrs: []string{}}, }, wantErr: true, errMsg: "multi_addrs must contain at least one value",