diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fff8b5b7f..347636f371 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Features +* (x/upgrade) [\#11116](https://github.com/cosmos/cosmos-sdk/pull/11116) `MsgSoftwareUpgrade` and has been added to support v1beta2 msgs-based gov proposals. * [\#11308](https://github.com/cosmos/cosmos-sdk/pull/11308) Added a mandatory metadata field to Vote in x/gov v1beta2. * [\#10977](https://github.com/cosmos/cosmos-sdk/pull/10977) Now every cosmos message protobuf definition must be extended with a ``cosmos.msg.v1.signer`` option to signal the signer fields in a language agnostic way. * [\#10710](https://github.com/cosmos/cosmos-sdk/pull/10710) Chain-id shouldn't be required for creating a transaction with both --generate-only and --offline flags. @@ -151,6 +152,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#9780](https://github.com/cosmos/cosmos-sdk/pull/9780) Use sigs.k8s.io for yaml, which might lead to minor YAML output changes * [\#10625](https://github.com/cosmos/cosmos-sdk/pull/10625) Rename `--fee-account` CLI flag to `--fee-granter` * [\#10684](https://github.com/cosmos/cosmos-sdk/pull/10684) Rename `edit-validator` command's `--moniker` flag to `--new-moniker` +* [\#11116](https://github.com/cosmos/cosmos-sdk/pull/11116) `software-upgrade` and `cancel-software-upgrade` gov proposal commands have changed to `legacy-software-upgrade` and `legacy-cancel-software-upgrade`. ### Improvements diff --git a/api/cosmos/upgrade/v1beta1/query.pulsar.go b/api/cosmos/upgrade/v1beta1/query.pulsar.go index 0ad9240ddd..0d7e0badc6 100644 --- a/api/cosmos/upgrade/v1beta1/query.pulsar.go +++ b/api/cosmos/upgrade/v1beta1/query.pulsar.go @@ -3368,6 +3368,782 @@ func (x *fastReflection_QueryModuleVersionsResponse) ProtoMethods() *protoiface. } } +var ( + md_QueryAuthorityRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_upgrade_v1beta1_query_proto_init() + md_QueryAuthorityRequest = File_cosmos_upgrade_v1beta1_query_proto.Messages().ByName("QueryAuthorityRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryAuthorityRequest)(nil) + +type fastReflection_QueryAuthorityRequest QueryAuthorityRequest + +func (x *QueryAuthorityRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAuthorityRequest)(x) +} + +func (x *QueryAuthorityRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_upgrade_v1beta1_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_QueryAuthorityRequest_messageType fastReflection_QueryAuthorityRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAuthorityRequest_messageType{} + +type fastReflection_QueryAuthorityRequest_messageType struct{} + +func (x fastReflection_QueryAuthorityRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAuthorityRequest)(nil) +} +func (x fastReflection_QueryAuthorityRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAuthorityRequest) +} +func (x fastReflection_QueryAuthorityRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAuthorityRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAuthorityRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAuthorityRequest +} + +// 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_QueryAuthorityRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAuthorityRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAuthorityRequest) New() protoreflect.Message { + return new(fastReflection_QueryAuthorityRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAuthorityRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAuthorityRequest)(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_QueryAuthorityRequest) 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_QueryAuthorityRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityRequest")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityRequest 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_QueryAuthorityRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityRequest")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityRequest 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_QueryAuthorityRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityRequest")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityRequest 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_QueryAuthorityRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityRequest")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityRequest 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_QueryAuthorityRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityRequest")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityRequest 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_QueryAuthorityRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityRequest")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityRequest 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_QueryAuthorityRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.QueryAuthorityRequest", 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_QueryAuthorityRequest) 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_QueryAuthorityRequest) 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_QueryAuthorityRequest) 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_QueryAuthorityRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAuthorityRequest) + 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().(*QueryAuthorityRequest) + 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().(*QueryAuthorityRequest) + 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: QueryAuthorityRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAuthorityRequest: 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_QueryAuthorityResponse protoreflect.MessageDescriptor + fd_QueryAuthorityResponse_address protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_upgrade_v1beta1_query_proto_init() + md_QueryAuthorityResponse = File_cosmos_upgrade_v1beta1_query_proto.Messages().ByName("QueryAuthorityResponse") + fd_QueryAuthorityResponse_address = md_QueryAuthorityResponse.Fields().ByName("address") +} + +var _ protoreflect.Message = (*fastReflection_QueryAuthorityResponse)(nil) + +type fastReflection_QueryAuthorityResponse QueryAuthorityResponse + +func (x *QueryAuthorityResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAuthorityResponse)(x) +} + +func (x *QueryAuthorityResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_upgrade_v1beta1_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_QueryAuthorityResponse_messageType fastReflection_QueryAuthorityResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAuthorityResponse_messageType{} + +type fastReflection_QueryAuthorityResponse_messageType struct{} + +func (x fastReflection_QueryAuthorityResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAuthorityResponse)(nil) +} +func (x fastReflection_QueryAuthorityResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAuthorityResponse) +} +func (x fastReflection_QueryAuthorityResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAuthorityResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryAuthorityResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAuthorityResponse +} + +// 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_QueryAuthorityResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAuthorityResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryAuthorityResponse) New() protoreflect.Message { + return new(fastReflection_QueryAuthorityResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryAuthorityResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAuthorityResponse)(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_QueryAuthorityResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_QueryAuthorityResponse_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_QueryAuthorityResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.QueryAuthorityResponse.address": + return x.Address != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityResponse 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_QueryAuthorityResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.QueryAuthorityResponse.address": + x.Address = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityResponse 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_QueryAuthorityResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.upgrade.v1beta1.QueryAuthorityResponse.address": + value := x.Address + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityResponse 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_QueryAuthorityResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.QueryAuthorityResponse.address": + x.Address = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityResponse 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_QueryAuthorityResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.QueryAuthorityResponse.address": + panic(fmt.Errorf("field address of message cosmos.upgrade.v1beta1.QueryAuthorityResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityResponse 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_QueryAuthorityResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.QueryAuthorityResponse.address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.QueryAuthorityResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.QueryAuthorityResponse 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_QueryAuthorityResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.QueryAuthorityResponse", 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_QueryAuthorityResponse) 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_QueryAuthorityResponse) 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_QueryAuthorityResponse) 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_QueryAuthorityResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryAuthorityResponse) + 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.Address) + 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().(*QueryAuthorityResponse) + 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.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + 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().(*QueryAuthorityResponse) + 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: QueryAuthorityResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAuthorityResponse: 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 Address", 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.Address = 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 @@ -3686,6 +4462,69 @@ func (x *QueryModuleVersionsResponse) GetModuleVersions() []*ModuleVersion { return nil } +// QueryAuthorityRequest is the request type for Query/Authority +type QueryAuthorityRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryAuthorityRequest) Reset() { + *x = QueryAuthorityRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAuthorityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAuthorityRequest) ProtoMessage() {} + +// Deprecated: Use QueryAuthorityRequest.ProtoReflect.Descriptor instead. +func (*QueryAuthorityRequest) Descriptor() ([]byte, []int) { + return file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP(), []int{8} +} + +// QueryAuthorityResponse is the response type for Query/Authority +type QueryAuthorityResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *QueryAuthorityResponse) Reset() { + *x = QueryAuthorityResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_upgrade_v1beta1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryAuthorityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryAuthorityResponse) ProtoMessage() {} + +// Deprecated: Use QueryAuthorityResponse.ProtoReflect.Descriptor instead. +func (*QueryAuthorityResponse) Descriptor() ([]byte, []int) { + return file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *QueryAuthorityResponse) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + var File_cosmos_upgrade_v1beta1_query_proto protoreflect.FileDescriptor var file_cosmos_upgrade_v1beta1_query_proto_rawDesc = []byte{ @@ -3732,68 +4571,82 @@ var file_cosmos_upgrade_v1beta1_query_proto_rawDesc = []byte{ 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x32, 0xdc, 0x05, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x9e, 0x01, 0x0a, 0x0b, 0x43, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x12, 0xa5, 0x01, 0x0a, 0x0b, - 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x2f, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, - 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, - 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x12, 0xdc, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, - 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3a, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, - 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0x88, 0x02, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x75, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x2f, 0x7b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x7d, 0x12, 0xaa, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x22, 0x17, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x32, 0x0a, 0x16, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0xf4, 0x06, + 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x9e, 0x01, 0x0a, 0x0b, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x6c, 0x61, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x6c, + 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x12, 0xa5, 0x01, 0x0a, 0x0b, 0x41, 0x70, 0x70, + 0x6c, 0x69, 0x65, 0x64, 0x50, 0x6c, 0x61, 0x6e, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x50, 0x6c, + 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, - 0xea, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x55, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x55, 0x70, 0x67, 0x72, - 0x61, 0x64, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x50, + 0x6c, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, + 0x12, 0xdc, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3a, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x6f, + 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0x88, 0x02, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, + 0x3e, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x2f, 0x7b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x7d, 0x12, + 0xaa, 0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x95, 0x01, 0x0a, + 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x23, 0x12, 0x21, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x42, 0xea, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x75, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x55, 0x58, 0xaa, + 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3808,7 +4661,7 @@ func file_cosmos_upgrade_v1beta1_query_proto_rawDescGZIP() []byte { return file_cosmos_upgrade_v1beta1_query_proto_rawDescData } -var file_cosmos_upgrade_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_cosmos_upgrade_v1beta1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_cosmos_upgrade_v1beta1_query_proto_goTypes = []interface{}{ (*QueryCurrentPlanRequest)(nil), // 0: cosmos.upgrade.v1beta1.QueryCurrentPlanRequest (*QueryCurrentPlanResponse)(nil), // 1: cosmos.upgrade.v1beta1.QueryCurrentPlanResponse @@ -3818,25 +4671,29 @@ var file_cosmos_upgrade_v1beta1_query_proto_goTypes = []interface{}{ (*QueryUpgradedConsensusStateResponse)(nil), // 5: cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse (*QueryModuleVersionsRequest)(nil), // 6: cosmos.upgrade.v1beta1.QueryModuleVersionsRequest (*QueryModuleVersionsResponse)(nil), // 7: cosmos.upgrade.v1beta1.QueryModuleVersionsResponse - (*Plan)(nil), // 8: cosmos.upgrade.v1beta1.Plan - (*ModuleVersion)(nil), // 9: cosmos.upgrade.v1beta1.ModuleVersion + (*QueryAuthorityRequest)(nil), // 8: cosmos.upgrade.v1beta1.QueryAuthorityRequest + (*QueryAuthorityResponse)(nil), // 9: cosmos.upgrade.v1beta1.QueryAuthorityResponse + (*Plan)(nil), // 10: cosmos.upgrade.v1beta1.Plan + (*ModuleVersion)(nil), // 11: cosmos.upgrade.v1beta1.ModuleVersion } var file_cosmos_upgrade_v1beta1_query_proto_depIdxs = []int32{ - 8, // 0: cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.plan:type_name -> cosmos.upgrade.v1beta1.Plan - 9, // 1: cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.module_versions:type_name -> cosmos.upgrade.v1beta1.ModuleVersion - 0, // 2: cosmos.upgrade.v1beta1.Query.CurrentPlan:input_type -> cosmos.upgrade.v1beta1.QueryCurrentPlanRequest - 2, // 3: cosmos.upgrade.v1beta1.Query.AppliedPlan:input_type -> cosmos.upgrade.v1beta1.QueryAppliedPlanRequest - 4, // 4: cosmos.upgrade.v1beta1.Query.UpgradedConsensusState:input_type -> cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest - 6, // 5: cosmos.upgrade.v1beta1.Query.ModuleVersions:input_type -> cosmos.upgrade.v1beta1.QueryModuleVersionsRequest - 1, // 6: cosmos.upgrade.v1beta1.Query.CurrentPlan:output_type -> cosmos.upgrade.v1beta1.QueryCurrentPlanResponse - 3, // 7: cosmos.upgrade.v1beta1.Query.AppliedPlan:output_type -> cosmos.upgrade.v1beta1.QueryAppliedPlanResponse - 5, // 8: cosmos.upgrade.v1beta1.Query.UpgradedConsensusState:output_type -> cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse - 7, // 9: cosmos.upgrade.v1beta1.Query.ModuleVersions:output_type -> cosmos.upgrade.v1beta1.QueryModuleVersionsResponse - 6, // [6:10] is the sub-list for method output_type - 2, // [2:6] 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 + 10, // 0: cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.plan:type_name -> cosmos.upgrade.v1beta1.Plan + 11, // 1: cosmos.upgrade.v1beta1.QueryModuleVersionsResponse.module_versions:type_name -> cosmos.upgrade.v1beta1.ModuleVersion + 0, // 2: cosmos.upgrade.v1beta1.Query.CurrentPlan:input_type -> cosmos.upgrade.v1beta1.QueryCurrentPlanRequest + 2, // 3: cosmos.upgrade.v1beta1.Query.AppliedPlan:input_type -> cosmos.upgrade.v1beta1.QueryAppliedPlanRequest + 4, // 4: cosmos.upgrade.v1beta1.Query.UpgradedConsensusState:input_type -> cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest + 6, // 5: cosmos.upgrade.v1beta1.Query.ModuleVersions:input_type -> cosmos.upgrade.v1beta1.QueryModuleVersionsRequest + 8, // 6: cosmos.upgrade.v1beta1.Query.Authority:input_type -> cosmos.upgrade.v1beta1.QueryAuthorityRequest + 1, // 7: cosmos.upgrade.v1beta1.Query.CurrentPlan:output_type -> cosmos.upgrade.v1beta1.QueryCurrentPlanResponse + 3, // 8: cosmos.upgrade.v1beta1.Query.AppliedPlan:output_type -> cosmos.upgrade.v1beta1.QueryAppliedPlanResponse + 5, // 9: cosmos.upgrade.v1beta1.Query.UpgradedConsensusState:output_type -> cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse + 7, // 10: cosmos.upgrade.v1beta1.Query.ModuleVersions:output_type -> cosmos.upgrade.v1beta1.QueryModuleVersionsResponse + 9, // 11: cosmos.upgrade.v1beta1.Query.Authority:output_type -> cosmos.upgrade.v1beta1.QueryAuthorityResponse + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] 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_cosmos_upgrade_v1beta1_query_proto_init() } @@ -3942,6 +4799,30 @@ func file_cosmos_upgrade_v1beta1_query_proto_init() { return nil } } + file_cosmos_upgrade_v1beta1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAuthorityRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_upgrade_v1beta1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryAuthorityResponse); 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{ @@ -3949,7 +4830,7 @@ func file_cosmos_upgrade_v1beta1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_upgrade_v1beta1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/upgrade/v1beta1/query_grpc.pb.go b/api/cosmos/upgrade/v1beta1/query_grpc.pb.go index b812c237e4..69626cd2fb 100644 --- a/api/cosmos/upgrade/v1beta1/query_grpc.pb.go +++ b/api/cosmos/upgrade/v1beta1/query_grpc.pb.go @@ -38,6 +38,8 @@ type QueryClient interface { // // Since: cosmos-sdk 0.43 ModuleVersions(ctx context.Context, in *QueryModuleVersionsRequest, opts ...grpc.CallOption) (*QueryModuleVersionsResponse, error) + // Returns the account with authority to conduct upgrades + Authority(ctx context.Context, in *QueryAuthorityRequest, opts ...grpc.CallOption) (*QueryAuthorityResponse, error) } type queryClient struct { @@ -85,6 +87,15 @@ func (c *queryClient) ModuleVersions(ctx context.Context, in *QueryModuleVersion return out, nil } +func (c *queryClient) Authority(ctx context.Context, in *QueryAuthorityRequest, opts ...grpc.CallOption) (*QueryAuthorityResponse, error) { + out := new(QueryAuthorityResponse) + err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Query/Authority", 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 @@ -105,6 +116,8 @@ type QueryServer interface { // // Since: cosmos-sdk 0.43 ModuleVersions(context.Context, *QueryModuleVersionsRequest) (*QueryModuleVersionsResponse, error) + // Returns the account with authority to conduct upgrades + Authority(context.Context, *QueryAuthorityRequest) (*QueryAuthorityResponse, error) mustEmbedUnimplementedQueryServer() } @@ -124,6 +137,9 @@ func (UnimplementedQueryServer) UpgradedConsensusState(context.Context, *QueryUp func (UnimplementedQueryServer) ModuleVersions(context.Context, *QueryModuleVersionsRequest) (*QueryModuleVersionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ModuleVersions not implemented") } +func (UnimplementedQueryServer) Authority(context.Context, *QueryAuthorityRequest) (*QueryAuthorityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Authority not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -209,6 +225,24 @@ func _Query_ModuleVersions_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Query_Authority_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAuthorityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Authority(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.upgrade.v1beta1.Query/Authority", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Authority(ctx, req.(*QueryAuthorityRequest)) + } + 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) @@ -232,6 +266,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "ModuleVersions", Handler: _Query_ModuleVersions_Handler, }, + { + MethodName: "Authority", + Handler: _Query_Authority_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/upgrade/v1beta1/query.proto", diff --git a/api/cosmos/upgrade/v1beta1/tx.pulsar.go b/api/cosmos/upgrade/v1beta1/tx.pulsar.go new file mode 100644 index 0000000000..a042d5c257 --- /dev/null +++ b/api/cosmos/upgrade/v1beta1/tx.pulsar.go @@ -0,0 +1,1978 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package upgradev1beta1 + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/cosmos-sdk/api/cosmos/msg/v1" + _ "github.com/gogo/protobuf/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_MsgSoftwareUpgrade protoreflect.MessageDescriptor + fd_MsgSoftwareUpgrade_authority protoreflect.FieldDescriptor + fd_MsgSoftwareUpgrade_plan protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_upgrade_v1beta1_tx_proto_init() + md_MsgSoftwareUpgrade = File_cosmos_upgrade_v1beta1_tx_proto.Messages().ByName("MsgSoftwareUpgrade") + fd_MsgSoftwareUpgrade_authority = md_MsgSoftwareUpgrade.Fields().ByName("authority") + fd_MsgSoftwareUpgrade_plan = md_MsgSoftwareUpgrade.Fields().ByName("plan") +} + +var _ protoreflect.Message = (*fastReflection_MsgSoftwareUpgrade)(nil) + +type fastReflection_MsgSoftwareUpgrade MsgSoftwareUpgrade + +func (x *MsgSoftwareUpgrade) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSoftwareUpgrade)(x) +} + +func (x *MsgSoftwareUpgrade) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_upgrade_v1beta1_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_MsgSoftwareUpgrade_messageType fastReflection_MsgSoftwareUpgrade_messageType +var _ protoreflect.MessageType = fastReflection_MsgSoftwareUpgrade_messageType{} + +type fastReflection_MsgSoftwareUpgrade_messageType struct{} + +func (x fastReflection_MsgSoftwareUpgrade_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSoftwareUpgrade)(nil) +} +func (x fastReflection_MsgSoftwareUpgrade_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSoftwareUpgrade) +} +func (x fastReflection_MsgSoftwareUpgrade_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSoftwareUpgrade +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSoftwareUpgrade) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSoftwareUpgrade +} + +// 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_MsgSoftwareUpgrade) Type() protoreflect.MessageType { + return _fastReflection_MsgSoftwareUpgrade_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSoftwareUpgrade) New() protoreflect.Message { + return new(fastReflection_MsgSoftwareUpgrade) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSoftwareUpgrade) Interface() protoreflect.ProtoMessage { + return (*MsgSoftwareUpgrade)(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_MsgSoftwareUpgrade) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgSoftwareUpgrade_authority, value) { + return + } + } + if x.Plan != nil { + value := protoreflect.ValueOfMessage(x.Plan.ProtoReflect()) + if !f(fd_MsgSoftwareUpgrade_plan, 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_MsgSoftwareUpgrade) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.authority": + return x.Authority != "" + case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan": + return x.Plan != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade 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_MsgSoftwareUpgrade) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.authority": + x.Authority = "" + case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan": + x.Plan = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade 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_MsgSoftwareUpgrade) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan": + value := x.Plan + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade 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_MsgSoftwareUpgrade) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.authority": + x.Authority = value.Interface().(string) + case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan": + x.Plan = value.Message().Interface().(*Plan) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade 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_MsgSoftwareUpgrade) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan": + if x.Plan == nil { + x.Plan = new(Plan) + } + return protoreflect.ValueOfMessage(x.Plan.ProtoReflect()) + case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.authority": + panic(fmt.Errorf("field authority of message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade 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_MsgSoftwareUpgrade) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.authority": + return protoreflect.ValueOfString("") + case "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan": + m := new(Plan) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgrade 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_MsgSoftwareUpgrade) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", 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_MsgSoftwareUpgrade) 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_MsgSoftwareUpgrade) 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_MsgSoftwareUpgrade) 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_MsgSoftwareUpgrade) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSoftwareUpgrade) + 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.Plan != nil { + l = options.Size(x.Plan) + 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().(*MsgSoftwareUpgrade) + 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.Plan != nil { + encoded, err := options.Marshal(x.Plan) + 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().(*MsgSoftwareUpgrade) + 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: MsgSoftwareUpgrade: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSoftwareUpgrade: 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 Plan", 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.Plan == nil { + x.Plan = &Plan{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Plan); 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_MsgSoftwareUpgradeResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_upgrade_v1beta1_tx_proto_init() + md_MsgSoftwareUpgradeResponse = File_cosmos_upgrade_v1beta1_tx_proto.Messages().ByName("MsgSoftwareUpgradeResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgSoftwareUpgradeResponse)(nil) + +type fastReflection_MsgSoftwareUpgradeResponse MsgSoftwareUpgradeResponse + +func (x *MsgSoftwareUpgradeResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSoftwareUpgradeResponse)(x) +} + +func (x *MsgSoftwareUpgradeResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_upgrade_v1beta1_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_MsgSoftwareUpgradeResponse_messageType fastReflection_MsgSoftwareUpgradeResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSoftwareUpgradeResponse_messageType{} + +type fastReflection_MsgSoftwareUpgradeResponse_messageType struct{} + +func (x fastReflection_MsgSoftwareUpgradeResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSoftwareUpgradeResponse)(nil) +} +func (x fastReflection_MsgSoftwareUpgradeResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSoftwareUpgradeResponse) +} +func (x fastReflection_MsgSoftwareUpgradeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSoftwareUpgradeResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSoftwareUpgradeResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSoftwareUpgradeResponse +} + +// 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_MsgSoftwareUpgradeResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSoftwareUpgradeResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSoftwareUpgradeResponse) New() protoreflect.Message { + return new(fastReflection_MsgSoftwareUpgradeResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSoftwareUpgradeResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSoftwareUpgradeResponse)(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_MsgSoftwareUpgradeResponse) 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_MsgSoftwareUpgradeResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse 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_MsgSoftwareUpgradeResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse 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_MsgSoftwareUpgradeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse 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_MsgSoftwareUpgradeResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse 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_MsgSoftwareUpgradeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse 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_MsgSoftwareUpgradeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse 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_MsgSoftwareUpgradeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse", 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_MsgSoftwareUpgradeResponse) 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_MsgSoftwareUpgradeResponse) 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_MsgSoftwareUpgradeResponse) 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_MsgSoftwareUpgradeResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSoftwareUpgradeResponse) + 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().(*MsgSoftwareUpgradeResponse) + 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().(*MsgSoftwareUpgradeResponse) + 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: MsgSoftwareUpgradeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSoftwareUpgradeResponse: 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_MsgCancelUpgrade protoreflect.MessageDescriptor + fd_MsgCancelUpgrade_authority protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_upgrade_v1beta1_tx_proto_init() + md_MsgCancelUpgrade = File_cosmos_upgrade_v1beta1_tx_proto.Messages().ByName("MsgCancelUpgrade") + fd_MsgCancelUpgrade_authority = md_MsgCancelUpgrade.Fields().ByName("authority") +} + +var _ protoreflect.Message = (*fastReflection_MsgCancelUpgrade)(nil) + +type fastReflection_MsgCancelUpgrade MsgCancelUpgrade + +func (x *MsgCancelUpgrade) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCancelUpgrade)(x) +} + +func (x *MsgCancelUpgrade) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_upgrade_v1beta1_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_MsgCancelUpgrade_messageType fastReflection_MsgCancelUpgrade_messageType +var _ protoreflect.MessageType = fastReflection_MsgCancelUpgrade_messageType{} + +type fastReflection_MsgCancelUpgrade_messageType struct{} + +func (x fastReflection_MsgCancelUpgrade_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCancelUpgrade)(nil) +} +func (x fastReflection_MsgCancelUpgrade_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCancelUpgrade) +} +func (x fastReflection_MsgCancelUpgrade_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelUpgrade +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCancelUpgrade) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelUpgrade +} + +// 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_MsgCancelUpgrade) Type() protoreflect.MessageType { + return _fastReflection_MsgCancelUpgrade_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCancelUpgrade) New() protoreflect.Message { + return new(fastReflection_MsgCancelUpgrade) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCancelUpgrade) Interface() protoreflect.ProtoMessage { + return (*MsgCancelUpgrade)(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_MsgCancelUpgrade) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgCancelUpgrade_authority, 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_MsgCancelUpgrade) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.MsgCancelUpgrade.authority": + return x.Authority != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgrade")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgrade 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_MsgCancelUpgrade) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.MsgCancelUpgrade.authority": + x.Authority = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgrade")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgrade 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_MsgCancelUpgrade) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.upgrade.v1beta1.MsgCancelUpgrade.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgrade")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgrade 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_MsgCancelUpgrade) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.MsgCancelUpgrade.authority": + x.Authority = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgrade")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgrade 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_MsgCancelUpgrade) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.MsgCancelUpgrade.authority": + panic(fmt.Errorf("field authority of message cosmos.upgrade.v1beta1.MsgCancelUpgrade is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgrade")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgrade 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_MsgCancelUpgrade) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.upgrade.v1beta1.MsgCancelUpgrade.authority": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgrade")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgrade 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_MsgCancelUpgrade) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.MsgCancelUpgrade", 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_MsgCancelUpgrade) 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_MsgCancelUpgrade) 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_MsgCancelUpgrade) 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_MsgCancelUpgrade) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCancelUpgrade) + 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.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().(*MsgCancelUpgrade) + 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.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().(*MsgCancelUpgrade) + 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: MsgCancelUpgrade: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelUpgrade: 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 + 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_MsgCancelUpgradeResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_upgrade_v1beta1_tx_proto_init() + md_MsgCancelUpgradeResponse = File_cosmos_upgrade_v1beta1_tx_proto.Messages().ByName("MsgCancelUpgradeResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgCancelUpgradeResponse)(nil) + +type fastReflection_MsgCancelUpgradeResponse MsgCancelUpgradeResponse + +func (x *MsgCancelUpgradeResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCancelUpgradeResponse)(x) +} + +func (x *MsgCancelUpgradeResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_upgrade_v1beta1_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_MsgCancelUpgradeResponse_messageType fastReflection_MsgCancelUpgradeResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCancelUpgradeResponse_messageType{} + +type fastReflection_MsgCancelUpgradeResponse_messageType struct{} + +func (x fastReflection_MsgCancelUpgradeResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCancelUpgradeResponse)(nil) +} +func (x fastReflection_MsgCancelUpgradeResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCancelUpgradeResponse) +} +func (x fastReflection_MsgCancelUpgradeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelUpgradeResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCancelUpgradeResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCancelUpgradeResponse +} + +// 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_MsgCancelUpgradeResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCancelUpgradeResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCancelUpgradeResponse) New() protoreflect.Message { + return new(fastReflection_MsgCancelUpgradeResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCancelUpgradeResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCancelUpgradeResponse)(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_MsgCancelUpgradeResponse) 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_MsgCancelUpgradeResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse 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_MsgCancelUpgradeResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse 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_MsgCancelUpgradeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse 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_MsgCancelUpgradeResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse 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_MsgCancelUpgradeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse 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_MsgCancelUpgradeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")) + } + panic(fmt.Errorf("message cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse 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_MsgCancelUpgradeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse", 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_MsgCancelUpgradeResponse) 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_MsgCancelUpgradeResponse) 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_MsgCancelUpgradeResponse) 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_MsgCancelUpgradeResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCancelUpgradeResponse) + 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().(*MsgCancelUpgradeResponse) + 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().(*MsgCancelUpgradeResponse) + 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: MsgCancelUpgradeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCancelUpgradeResponse: 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: cosmos/upgrade/v1beta1/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) +) + +// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. +// +// Since: cosmos-sdk 0.46 +type MsgSoftwareUpgrade 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"` + // plan is the upgrade plan. + Plan *Plan `protobuf:"bytes,2,opt,name=plan,proto3" json:"plan,omitempty"` +} + +func (x *MsgSoftwareUpgrade) Reset() { + *x = MsgSoftwareUpgrade{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSoftwareUpgrade) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSoftwareUpgrade) ProtoMessage() {} + +// Deprecated: Use MsgSoftwareUpgrade.ProtoReflect.Descriptor instead. +func (*MsgSoftwareUpgrade) Descriptor() ([]byte, []int) { + return file_cosmos_upgrade_v1beta1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgSoftwareUpgrade) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgSoftwareUpgrade) GetPlan() *Plan { + if x != nil { + return x.Plan + } + return nil +} + +// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. +// +// Since: cosmos-sdk 0.46 +type MsgSoftwareUpgradeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgSoftwareUpgradeResponse) Reset() { + *x = MsgSoftwareUpgradeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSoftwareUpgradeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSoftwareUpgradeResponse) ProtoMessage() {} + +// Deprecated: Use MsgSoftwareUpgradeResponse.ProtoReflect.Descriptor instead. +func (*MsgSoftwareUpgradeResponse) Descriptor() ([]byte, []int) { + return file_cosmos_upgrade_v1beta1_tx_proto_rawDescGZIP(), []int{1} +} + +// MsgCancelUpgrade is the Msg/CancelUpgrade request type. +// +// Since: cosmos-sdk 0.46 +type MsgCancelUpgrade 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"` +} + +func (x *MsgCancelUpgrade) Reset() { + *x = MsgCancelUpgrade{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCancelUpgrade) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCancelUpgrade) ProtoMessage() {} + +// Deprecated: Use MsgCancelUpgrade.ProtoReflect.Descriptor instead. +func (*MsgCancelUpgrade) Descriptor() ([]byte, []int) { + return file_cosmos_upgrade_v1beta1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgCancelUpgrade) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. +// +// Since: cosmos-sdk 0.46 +type MsgCancelUpgradeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCancelUpgradeResponse) Reset() { + *x = MsgCancelUpgradeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCancelUpgradeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCancelUpgradeResponse) ProtoMessage() {} + +// Deprecated: Use MsgCancelUpgradeResponse.ProtoReflect.Descriptor instead. +func (*MsgCancelUpgradeResponse) Descriptor() ([]byte, []int) { + return file_cosmos_upgrade_v1beta1_tx_proto_rawDescGZIP(), []int{3} +} + +var File_cosmos_upgrade_v1beta1_tx_proto protoreflect.FileDescriptor + +var file_cosmos_upgrade_v1beta1_tx_proto_rawDesc = []byte{ + 0x0a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x12, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 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, 0x24, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 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, 0x22, 0x94, 0x01, 0x0a, 0x12, 0x4d, 0x73, + 0x67, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 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, 0x36, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x50, 0x6c, 0x61, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, + 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, + 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 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, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, + 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe5, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x71, + 0x0a, 0x0f, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x12, 0x2a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x6f, + 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x1a, 0x32, 0x2e, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, + 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x6b, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x12, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, + 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x1a, 0x30, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xe7, + 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, + 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x54, + 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x3b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0xa2, 0x02, 0x03, 0x43, 0x55, 0x58, 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, + 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_upgrade_v1beta1_tx_proto_rawDescOnce sync.Once + file_cosmos_upgrade_v1beta1_tx_proto_rawDescData = file_cosmos_upgrade_v1beta1_tx_proto_rawDesc +) + +func file_cosmos_upgrade_v1beta1_tx_proto_rawDescGZIP() []byte { + file_cosmos_upgrade_v1beta1_tx_proto_rawDescOnce.Do(func() { + file_cosmos_upgrade_v1beta1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_upgrade_v1beta1_tx_proto_rawDescData) + }) + return file_cosmos_upgrade_v1beta1_tx_proto_rawDescData +} + +var file_cosmos_upgrade_v1beta1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cosmos_upgrade_v1beta1_tx_proto_goTypes = []interface{}{ + (*MsgSoftwareUpgrade)(nil), // 0: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade + (*MsgSoftwareUpgradeResponse)(nil), // 1: cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse + (*MsgCancelUpgrade)(nil), // 2: cosmos.upgrade.v1beta1.MsgCancelUpgrade + (*MsgCancelUpgradeResponse)(nil), // 3: cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse + (*Plan)(nil), // 4: cosmos.upgrade.v1beta1.Plan +} +var file_cosmos_upgrade_v1beta1_tx_proto_depIdxs = []int32{ + 4, // 0: cosmos.upgrade.v1beta1.MsgSoftwareUpgrade.plan:type_name -> cosmos.upgrade.v1beta1.Plan + 0, // 1: cosmos.upgrade.v1beta1.Msg.SoftwareUpgrade:input_type -> cosmos.upgrade.v1beta1.MsgSoftwareUpgrade + 2, // 2: cosmos.upgrade.v1beta1.Msg.CancelUpgrade:input_type -> cosmos.upgrade.v1beta1.MsgCancelUpgrade + 1, // 3: cosmos.upgrade.v1beta1.Msg.SoftwareUpgrade:output_type -> cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse + 3, // 4: cosmos.upgrade.v1beta1.Msg.CancelUpgrade:output_type -> cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] 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_cosmos_upgrade_v1beta1_tx_proto_init() } +func file_cosmos_upgrade_v1beta1_tx_proto_init() { + if File_cosmos_upgrade_v1beta1_tx_proto != nil { + return + } + file_cosmos_upgrade_v1beta1_upgrade_proto_init() + if !protoimpl.UnsafeEnabled { + file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSoftwareUpgrade); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSoftwareUpgradeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCancelUpgrade); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_upgrade_v1beta1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCancelUpgradeResponse); 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_cosmos_upgrade_v1beta1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_upgrade_v1beta1_tx_proto_goTypes, + DependencyIndexes: file_cosmos_upgrade_v1beta1_tx_proto_depIdxs, + MessageInfos: file_cosmos_upgrade_v1beta1_tx_proto_msgTypes, + }.Build() + File_cosmos_upgrade_v1beta1_tx_proto = out.File + file_cosmos_upgrade_v1beta1_tx_proto_rawDesc = nil + file_cosmos_upgrade_v1beta1_tx_proto_goTypes = nil + file_cosmos_upgrade_v1beta1_tx_proto_depIdxs = nil +} diff --git a/api/cosmos/upgrade/v1beta1/tx_grpc.pb.go b/api/cosmos/upgrade/v1beta1/tx_grpc.pb.go new file mode 100644 index 0000000000..4fb877813e --- /dev/null +++ b/api/cosmos/upgrade/v1beta1/tx_grpc.pb.go @@ -0,0 +1,155 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: cosmos/upgrade/v1beta1/tx.proto + +package upgradev1beta1 + +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 + +// 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 { + // SoftwareUpgrade is a governance operation for initiating a software upgrade. + // + // Since: cosmos-sdk 0.46 + SoftwareUpgrade(ctx context.Context, in *MsgSoftwareUpgrade, opts ...grpc.CallOption) (*MsgSoftwareUpgradeResponse, error) + // CancelUpgrade is a governance operation for cancelling a previously + // approvid software upgrade. + // + // Since: cosmos-sdk 0.46 + CancelUpgrade(ctx context.Context, in *MsgCancelUpgrade, opts ...grpc.CallOption) (*MsgCancelUpgradeResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) SoftwareUpgrade(ctx context.Context, in *MsgSoftwareUpgrade, opts ...grpc.CallOption) (*MsgSoftwareUpgradeResponse, error) { + out := new(MsgSoftwareUpgradeResponse) + err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CancelUpgrade(ctx context.Context, in *MsgCancelUpgrade, opts ...grpc.CallOption) (*MsgCancelUpgradeResponse, error) { + out := new(MsgCancelUpgradeResponse) + err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade", 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 { + // SoftwareUpgrade is a governance operation for initiating a software upgrade. + // + // Since: cosmos-sdk 0.46 + SoftwareUpgrade(context.Context, *MsgSoftwareUpgrade) (*MsgSoftwareUpgradeResponse, error) + // CancelUpgrade is a governance operation for cancelling a previously + // approvid software upgrade. + // + // Since: cosmos-sdk 0.46 + CancelUpgrade(context.Context, *MsgCancelUpgrade) (*MsgCancelUpgradeResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (UnimplementedMsgServer) SoftwareUpgrade(context.Context, *MsgSoftwareUpgrade) (*MsgSoftwareUpgradeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SoftwareUpgrade not implemented") +} +func (UnimplementedMsgServer) CancelUpgrade(context.Context, *MsgCancelUpgrade) (*MsgCancelUpgradeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelUpgrade 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_SoftwareUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSoftwareUpgrade) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SoftwareUpgrade(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SoftwareUpgrade(ctx, req.(*MsgSoftwareUpgrade)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CancelUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelUpgrade) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelUpgrade(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelUpgrade(ctx, req.(*MsgCancelUpgrade)) + } + 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: "cosmos.upgrade.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SoftwareUpgrade", + Handler: _Msg_SoftwareUpgrade_Handler, + }, + { + MethodName: "CancelUpgrade", + Handler: _Msg_CancelUpgrade_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/upgrade/v1beta1/tx.proto", +} diff --git a/api/cosmos/upgrade/v1beta1/upgrade.pulsar.go b/api/cosmos/upgrade/v1beta1/upgrade.pulsar.go index 7ce4fada42..16d231f834 100644 --- a/api/cosmos/upgrade/v1beta1/upgrade.pulsar.go +++ b/api/cosmos/upgrade/v1beta1/upgrade.pulsar.go @@ -2326,6 +2326,10 @@ func (x *Plan) GetUpgradedClientState() *anypb.Any { // SoftwareUpgradeProposal is a gov Content type for initiating a software // upgrade. +// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov +// proposals, see MsgSoftwareUpgrade. +// +// Deprecated: Do not use. type SoftwareUpgradeProposal struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2379,6 +2383,10 @@ func (x *SoftwareUpgradeProposal) GetPlan() *Plan { // CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software // upgrade. +// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov +// proposals, see MsgCancelUpgrade. +// +// Deprecated: Do not use. type CancelSoftwareUpgradeProposal struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2495,7 +2503,7 @@ var file_cosmos_upgrade_v1beta1_upgrade_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x13, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x93, 0x01, + 0x61, 0x74, 0x65, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x95, 0x01, 0x0a, 0x17, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, @@ -2504,34 +2512,34 @@ var file_cosmos_upgrade_v1beta1_upgrade_proto_rawDesc = []byte{ 0x6e, 0x12, 0x36, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x61, 0x6e, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x01, 0x22, 0x61, 0x0a, 0x1d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, 0x6f, 0x66, - 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x98, 0xa0, - 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x47, 0x0a, 0x0d, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x01, 0xe8, 0xa0, 0x1f, 0x01, 0x42, - 0xf0, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x75, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0c, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x55, 0x58, 0xaa, 0x02, 0x16, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x55, - 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, - 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x55, 0x70, - 0x67, 0x72, 0x61, 0x64, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xc8, 0xe1, - 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0xde, 0x1f, 0x00, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x3a, 0x0a, 0x18, 0x01, 0x98, 0xa0, 0x1f, + 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x63, 0x0a, 0x1d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x53, + 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0a, + 0x18, 0x01, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x22, 0x47, 0x0a, 0x0d, 0x4d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3a, 0x08, 0x98, 0xa0, 0x1f, 0x01, 0xe8, + 0xa0, 0x1f, 0x01, 0x42, 0xf0, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x42, 0x0c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x75, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x75, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x55, 0x58, + 0xaa, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x16, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xe2, 0x02, 0x22, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x55, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x3a, 0x3a, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0xc8, 0xe1, 0x1e, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/orm/internal/testpb/bank.proto b/orm/internal/testpb/bank.proto index da9709d52b..919ae5f163 100644 --- a/orm/internal/testpb/bank.proto +++ b/orm/internal/testpb/bank.proto @@ -9,21 +9,30 @@ import "cosmos/orm/v1alpha1/orm.proto"; message Balance { option (cosmos.orm.v1alpha1.table) = { id: 1; - primary_key:{fields: "address,denom"} - index: {id: 1 fields: "denom"} - }; +primary_key: { +fields: + "address,denom" +} +index: { +id: + 1 fields: "denom" +} +}; - string address = 1; - string denom = 2; - uint64 amount = 3; +string address = 1; +string denom = 2; +uint64 amount = 3; } message Supply { option (cosmos.orm.v1alpha1.table) = { id: 2; - primary_key:{fields: "denom"} - }; - - string denom = 1; - uint64 amount = 2; +primary_key: { +fields: + "denom" +} +}; + +string denom = 1; +uint64 amount = 2; } diff --git a/orm/internal/testpb/test_schema.proto b/orm/internal/testpb/test_schema.proto index 875343feae..0fb83250ad 100644 --- a/orm/internal/testpb/test_schema.proto +++ b/orm/internal/testpb/test_schema.proto @@ -9,86 +9,86 @@ import "cosmos/orm/v1alpha1/orm.proto"; message ExampleTable { option (cosmos.orm.v1alpha1.table) = { id: 1; - primary_key: { - fields: "u32,i64,str" - } - index:{ - id: 1; - fields:"u64,str" - unique: true - } - index:{ - id: 2; - fields:"str,u32" - } - index:{ - id: 3; - fields:"bz,str" - } - }; +primary_key: { +fields: + "u32,i64,str" +} +index: { +id: + 1; +fields: + "u64,str" unique: true +} +index: { +id: + 2; +fields: + "str,u32" +} +index: { +id: + 3; +fields: + "bz,str" +} +}; - // Valid key fields: - uint32 u32 = 1; - uint64 u64 = 2; - string str = 3; - bytes bz = 4; - google.protobuf.Timestamp ts = 5; - google.protobuf.Duration dur = 6; - int32 i32 = 7; - sint32 s32 = 8; - sfixed32 sf32 = 9; - int64 i64 = 10; - sint64 s64 = 11; - sfixed64 sf64 = 12; - fixed32 f32 = 13; - fixed64 f64 = 14; - bool b = 15; - Enum e = 16; +// Valid key fields: +uint32 u32 = 1; +uint64 u64 = 2; +string str = 3; +bytes bz = 4; +google.protobuf.Timestamp ts = 5; +google.protobuf.Duration dur = 6; +int32 i32 = 7; +sint32 s32 = 8; +sfixed32 sf32 = 9; +int64 i64 = 10; +sint64 s64 = 11; +sfixed64 sf64 = 12; +fixed32 f32 = 13; +fixed64 f64 = 14; +bool b = 15; +Enum e = 16; - // Invalid key fields: - repeated uint32 repeated = 17; - map map = 18; - ExampleMessage msg = 19; - oneof sum { - uint32 oneof = 20; - } +// Invalid key fields: +repeated uint32 repeated = 17; +map map = 18; +ExampleMessage msg = 19; +oneof sum { + uint32 oneof = 20; +} - message ExampleMessage { - string foo = 1; - int32 bar = 2; - } +message ExampleMessage { + string foo = 1; + int32 bar = 2; +} } enum Enum { ENUM_UNSPECIFIED = 0; - ENUM_ONE = 1; - ENUM_TWO = 2; - ENUM_FIVE = 5; - ENUM_NEG_THREE = -3; + ENUM_ONE = 1; + ENUM_TWO = 2; + ENUM_FIVE = 5; + ENUM_NEG_THREE = -3; } - message ExampleAutoIncrementTable { option (cosmos.orm.v1alpha1.table) = { id: 3 - primary_key:{ - fields:"id" - auto_increment: true - } - index:{ - id: 1 - fields:"x" - unique: true - } + primary_key: {fields: "id" auto_increment: true} + index: {id: 1 fields: "x" unique: true} }; uint64 id = 1; - string x = 2; - int32 y = 3; + string x = 2; + int32 y = 3; } message ExampleSingleton { - option (cosmos.orm.v1alpha1.singleton) = {id: 2}; + option (cosmos.orm.v1alpha1.singleton) = { + id: 2 + }; string foo = 1; - int32 bar = 2; + int32 bar = 2; } diff --git a/proto/cosmos/app/module/v1alpha1/module.proto b/proto/cosmos/app/module/v1alpha1/module.proto index 6c9c55a5de..487e195c32 100644 --- a/proto/cosmos/app/module/v1alpha1/module.proto +++ b/proto/cosmos/app/module/v1alpha1/module.proto @@ -8,8 +8,6 @@ import "cosmos/app/v1alpha1/module.proto"; message Module { option (cosmos.app.v1alpha1.module) = { go_import: "github.com/cosmos/cosmos-sdk/app" - use_package: { - name: "cosmos.app.v1alpha1" - } + use_package: {name: "cosmos.app.v1alpha1"} }; } diff --git a/proto/cosmos/authz/v1beta1/query.proto b/proto/cosmos/authz/v1beta1/query.proto index 72e14c74ab..62154ac19a 100644 --- a/proto/cosmos/authz/v1beta1/query.proto +++ b/proto/cosmos/authz/v1beta1/query.proto @@ -24,7 +24,7 @@ service Query { } // GranteeGrants returns a list of `GrantAuthorization` by grantee. - // + // // Since: cosmos-sdk 0.46 rpc GranteeGrants(QueryGranteeGrantsRequest) returns (QueryGranteeGrantsResponse) { option (google.api.http).get = "/cosmos/authz/v1beta1/grants/grantee/{grantee}"; diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto index 38d10d960c..f1487fe4b5 100644 --- a/proto/cosmos/gov/v1beta1/gov.proto +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -69,9 +69,9 @@ message Deposit { message Proposal { option (gogoproto.equal) = true; - uint64 proposal_id = 1; - google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"]; - ProposalStatus status = 3; + uint64 proposal_id = 1; + google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"]; + ProposalStatus status = 3; // final_tally_result is the final tally result of the proposal. When // querying a proposal via gRPC, this field is not populated until the // proposal's voting period has ended. @@ -171,11 +171,7 @@ message DepositParams { message VotingParams { // Length of the voting period. google.protobuf.Duration voting_period = 1 - [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "voting_period,omitempty" - ]; + [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.jsontag) = "voting_period,omitempty"]; } // TallyParams defines the params for tallying votes on governance proposals. diff --git a/proto/cosmos/gov/v1beta2/gov.proto b/proto/cosmos/gov/v1beta2/gov.proto index babf43bc87..552e6f02f4 100644 --- a/proto/cosmos/gov/v1beta2/gov.proto +++ b/proto/cosmos/gov/v1beta2/gov.proto @@ -41,15 +41,15 @@ message Deposit { // Proposal defines the core field members of a governance proposal. message Proposal { - uint64 id = 1; - repeated google.protobuf.Any messages = 2; - ProposalStatus status = 3; + uint64 id = 1; + repeated google.protobuf.Any messages = 2; + ProposalStatus status = 3; // final_tally_result is the final tally result of the proposal. When // querying a proposal via gRPC, this field is not populated until the // proposal's voting period has ended. - TallyResult final_tally_result = 4; - google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true]; - google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true]; + TallyResult final_tally_result = 4; + google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true]; + google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true]; repeated cosmos.base.v1beta1.Coin total_deposit = 7 [(gogoproto.nullable) = false]; google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true]; google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true]; @@ -102,11 +102,13 @@ message Vote { // DepositParams defines the params for deposits on governance proposals. message DepositParams { // Minimum deposit for a proposal to enter voting period. - repeated cosmos.base.v1beta1.Coin min_deposit = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "min_deposit,omitempty"]; + repeated cosmos.base.v1beta1.Coin min_deposit = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "min_deposit,omitempty"]; // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 // months. - google.protobuf.Duration max_deposit_period = 2 [(gogoproto.stdduration) = true, (gogoproto.jsontag) = "max_deposit_period,omitempty"]; + google.protobuf.Duration max_deposit_period = 2 + [(gogoproto.stdduration) = true, (gogoproto.jsontag) = "max_deposit_period,omitempty"]; } // VotingParams defines the params for voting on governance proposals. diff --git a/proto/cosmos/msg/v1/msg.proto b/proto/cosmos/msg/v1/msg.proto index 8c2e29f747..89bdf3129f 100644 --- a/proto/cosmos/msg/v1/msg.proto +++ b/proto/cosmos/msg/v1/msg.proto @@ -1,4 +1,4 @@ -syntax="proto3"; +syntax = "proto3"; package cosmos.msg.v1; diff --git a/proto/cosmos/nft/v1beta1/query.proto b/proto/cosmos/nft/v1beta1/query.proto index d343ca6f66..c1d8070f4d 100644 --- a/proto/cosmos/nft/v1beta1/query.proto +++ b/proto/cosmos/nft/v1beta1/query.proto @@ -24,7 +24,8 @@ service Query { option (google.api.http).get = "/cosmos/nft/v1beta1/supply/{class_id}"; } - // NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in ERC721Enumerable + // NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in + // ERC721Enumerable rpc NFTs(QueryNFTsRequest) returns (QueryNFTsResponse) { option (google.api.http).get = "/cosmos/nft/v1beta1/nfts"; } diff --git a/proto/cosmos/staking/v1beta1/staking.proto b/proto/cosmos/staking/v1beta1/staking.proto index aa57db0520..dcf2645fa2 100644 --- a/proto/cosmos/staking/v1beta1/staking.proto +++ b/proto/cosmos/staking/v1beta1/staking.proto @@ -214,7 +214,7 @@ message UnbondingDelegation { // validator_address is the bech32-encoded address of the validator. string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // entries are the unbonding delegation entries. - repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries + repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries } // UnbondingDelegationEntry defines an unbonding object with relevant metadata. @@ -277,7 +277,7 @@ message Redelegation { // validator_dst_address is the validator redelegation destination operator address. string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // entries are the redelegation entries. - repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries + repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries } // Params defines the parameters for the staking module. diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto index e5a227bc0d..e8c4baa0d6 100644 --- a/proto/cosmos/upgrade/v1beta1/query.proto +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -35,6 +35,11 @@ service Query { rpc ModuleVersions(QueryModuleVersionsRequest) returns (QueryModuleVersionsResponse) { option (google.api.http).get = "/cosmos/upgrade/v1beta1/module_versions"; } + + // Returns the account with authority to conduct upgrades + rpc Authority(QueryAuthorityRequest) returns (QueryAuthorityResponse) { + option (google.api.http).get = "/cosmos/upgrade/v1beta1/authority"; + } } // QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC @@ -101,3 +106,15 @@ message QueryModuleVersionsResponse { // module_versions is a list of module names with their consensus versions. repeated ModuleVersion module_versions = 1; } + +// QueryAuthorityRequest is the request type for Query/Authority +// +// Since: cosmos-sdk 0.46 +message QueryAuthorityRequest {} + +// QueryAuthorityResponse is the response type for Query/Authority +// +// Since: cosmos-sdk 0.46 +message QueryAuthorityResponse { + string address = 1; +} \ No newline at end of file diff --git a/proto/cosmos/upgrade/v1beta1/tx.proto b/proto/cosmos/upgrade/v1beta1/tx.proto new file mode 100644 index 0000000000..9b04bf44be --- /dev/null +++ b/proto/cosmos/upgrade/v1beta1/tx.proto @@ -0,0 +1,55 @@ +syntax = "proto3"; +package cosmos.upgrade.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/upgrade/v1beta1/upgrade.proto"; +import "cosmos/msg/v1/msg.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; + +// Msg defines the upgrade Msg service. +service Msg { + // SoftwareUpgrade is a governance operation for initiating a software upgrade. + // + // Since: cosmos-sdk 0.46 + rpc SoftwareUpgrade(MsgSoftwareUpgrade) returns (MsgSoftwareUpgradeResponse); + // CancelUpgrade is a governance operation for cancelling a previously + // approvid software upgrade. + // + // Since: cosmos-sdk 0.46 + rpc CancelUpgrade(MsgCancelUpgrade) returns (MsgCancelUpgradeResponse); +} + +// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. +// +// Since: cosmos-sdk 0.46 +message MsgSoftwareUpgrade { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // plan is the upgrade plan. + Plan plan = 2 [(gogoproto.nullable) = false]; +} + +// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. +// +// Since: cosmos-sdk 0.46 +message MsgSoftwareUpgradeResponse {} + +// MsgCancelUpgrade is the Msg/CancelUpgrade request type. +// +// Since: cosmos-sdk 0.46 +message MsgCancelUpgrade { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. +// +// Since: cosmos-sdk 0.46 +message MsgCancelUpgradeResponse {} \ No newline at end of file diff --git a/proto/cosmos/upgrade/v1beta1/upgrade.proto b/proto/cosmos/upgrade/v1beta1/upgrade.proto index e2a155bca5..4de7d01fc3 100644 --- a/proto/cosmos/upgrade/v1beta1/upgrade.proto +++ b/proto/cosmos/upgrade/v1beta1/upgrade.proto @@ -43,7 +43,10 @@ message Plan { // SoftwareUpgradeProposal is a gov Content type for initiating a software // upgrade. +// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov +// proposals, see MsgSoftwareUpgrade. message SoftwareUpgradeProposal { + option deprecated = true; option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; @@ -54,7 +57,10 @@ message SoftwareUpgradeProposal { // CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software // upgrade. +// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov +// proposals, see MsgCancelUpgrade. message CancelSoftwareUpgradeProposal { + option deprecated = true; option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; diff --git a/proto/cosmos/vesting/v1beta1/tx.proto b/proto/cosmos/vesting/v1beta1/tx.proto index 4ba712be57..211bad09e0 100644 --- a/proto/cosmos/vesting/v1beta1/tx.proto +++ b/proto/cosmos/vesting/v1beta1/tx.proto @@ -42,7 +42,6 @@ message MsgCreateVestingAccount { // MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. message MsgCreateVestingAccountResponse {} - // MsgCreatePermanentLockedAccount defines a message that enables creating a permanent // locked account. message MsgCreatePermanentLockedAccount { @@ -51,7 +50,7 @@ message MsgCreatePermanentLockedAccount { string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; } // MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 2cbcabb29b..d41a522689 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -58,13 +58,12 @@ message RequestSetOption { } message RequestInitChain { - google.protobuf.Timestamp time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 2; - ConsensusParams consensus_params = 3; - repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; - bytes app_state_bytes = 5; - int64 initial_height = 6; + google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + string chain_id = 2; + ConsensusParams consensus_params = 3; + repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; + bytes app_state_bytes = 5; + int64 initial_height = 6; } message RequestQuery { @@ -102,13 +101,12 @@ message RequestEndBlock { message RequestCommit {} // lists available snapshots -message RequestListSnapshots { -} +message RequestListSnapshots {} // offers a snapshot to the application message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height + Snapshot snapshot = 1; // snapshot offered by peers + bytes app_hash = 2; // light client-verified app hash for snapshot height } // loads a snapshot chunk @@ -187,8 +185,8 @@ message ResponseInitChain { message ResponseQuery { uint32 code = 1; // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 index = 5; bytes key = 6; bytes value = 7; @@ -198,40 +196,35 @@ message ResponseQuery { } message ResponseBeginBlock { - repeated Event events = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + repeated Event events = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; } message ResponseCheckTx { uint32 code = 1; bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; + repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + string codespace = 8; } message ResponseDeliverTx { uint32 code = 1; bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; + repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + string codespace = 8; } message ResponseEndBlock { - repeated ValidatorUpdate validator_updates = 1 - [(gogoproto.nullable) = false]; - ConsensusParams consensus_param_updates = 2; - repeated Event events = 3 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false]; + ConsensusParams consensus_param_updates = 2; + repeated Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; } message ResponseCommit { @@ -248,12 +241,12 @@ message ResponseOfferSnapshot { Result result = 1; enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Snapshot accepted, apply chunks - ABORT = 2; // Abort all snapshot restoration - REJECT = 3; // Reject this specific snapshot, try others - REJECT_FORMAT = 4; // Reject all snapshots of this format, try others - REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Snapshot accepted, apply chunks + ABORT = 2; // Abort all snapshot restoration + REJECT = 3; // Reject this specific snapshot, try others + REJECT_FORMAT = 4; // Reject all snapshots of this format, try others + REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others } } @@ -263,16 +256,16 @@ message ResponseLoadSnapshotChunk { message ResponseApplySnapshotChunk { Result result = 1; - repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply - repeated string reject_senders = 3; // Chunk senders to reject and ban + repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply + repeated string reject_senders = 3; // Chunk senders to reject and ban enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Chunk successfully accepted - ABORT = 2; // Abort all snapshot restoration - RETRY = 3; // Retry chunk (combine with refetch and reject) - RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) - REJECT_SNAPSHOT = 5; // Reject this snapshot, try others + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Chunk successfully accepted + ABORT = 2; // Abort all snapshot restoration + RETRY = 3; // Retry chunk (combine with refetch and reject) + RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) + REJECT_SNAPSHOT = 5; // Reject this snapshot, try others } } @@ -306,17 +299,14 @@ message LastCommitInfo { // Later, transactions may be queried using these events. message Event { string type = 1; - repeated EventAttribute attributes = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "attributes,omitempty" - ]; + repeated EventAttribute attributes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"]; } // EventAttribute is a single key-value pair, associated with an event. message EventAttribute { bytes key = 1; bytes value = 2; - bool index = 3; // nondeterministic + bool index = 3; // nondeterministic } // TxResult contains results of executing the transaction. @@ -334,9 +324,9 @@ message TxResult { // Validator message Validator { - bytes address = 1; // The first 20 bytes of SHA256(public key) + bytes address = 1; // The first 20 bytes of SHA256(public key) // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; // The voting power + int64 power = 3; // The voting power } // ValidatorUpdate @@ -364,10 +354,7 @@ message Evidence { // The height when the offense occurred int64 height = 3; // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // Total voting power of the validator set in case the ABCI application does // not store historical validators. // https://github.com/tendermint/tendermint/issues/4581 @@ -378,11 +365,11 @@ message Evidence { // State Sync Types message Snapshot { - uint64 height = 1; // The height at which the snapshot was taken - uint32 format = 2; // The application-specific snapshot format - uint32 chunks = 3; // Number of chunks in the snapshot - bytes hash = 4; // Arbitrary snapshot hash, equal only if identical - bytes metadata = 5; // Arbitrary application metadata + uint64 height = 1; // The height at which the snapshot was taken + uint32 format = 2; // The application-specific snapshot format + uint32 chunks = 3; // Number of chunks in the snapshot + bytes hash = 4; // Arbitrary snapshot hash, equal only if identical + bytes metadata = 5; // Arbitrary application metadata } //---------------------------------------- diff --git a/proto/tendermint/types/evidence.proto b/proto/tendermint/types/evidence.proto index 3b234571ba..d9548a4302 100644 --- a/proto/tendermint/types/evidence.proto +++ b/proto/tendermint/types/evidence.proto @@ -17,19 +17,19 @@ message Evidence { // DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + tendermint.types.Vote vote_a = 1; + tendermint.types.Vote vote_b = 2; + int64 total_voting_power = 3; + int64 validator_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; + tendermint.types.LightBlock conflicting_block = 1; + int64 common_height = 2; repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; + int64 total_voting_power = 4; google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } diff --git a/proto/tendermint/types/params.proto b/proto/tendermint/types/params.proto index 0de7d846fb..70789222a5 100644 --- a/proto/tendermint/types/params.proto +++ b/proto/tendermint/types/params.proto @@ -45,8 +45,7 @@ message EvidenceParams { // It should correspond with an app's "unbonding period" or other similar // mechanism for handling [Nothing-At-Stake // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - google.protobuf.Duration max_age_duration = 2 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; + google.protobuf.Duration max_age_duration = 2 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; // This sets the maximum size of total evidence in bytes that can be committed in a single block. // and should fall comfortably under the max block bytes. diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 7f7ea74cac..57efc33c5b 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -66,19 +66,19 @@ message Header { BlockID last_block_id = 5 [(gogoproto.nullable) = false]; // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions + bytes last_commit_hash = 6; // commit from validators from the last block + bytes data_hash = 7; // transactions // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block + bytes validators_hash = 8; // validators for the current block + bytes next_validators_hash = 9; // validators for the next block + bytes consensus_hash = 10; // consensus params for current block + bytes app_hash = 11; // state after txs from the previous block + bytes last_results_hash = 12; // root hash of all results from the txs from the previous block // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block + bytes evidence_hash = 13; // evidence included in the block + bytes proposer_address = 14; // original proposer of the block } // Data contains the set of transactions included in the block @@ -95,30 +95,27 @@ message Vote { SignedMsgType type = 1; int64 height = 2; int32 round = 3; - BlockID block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. - google.protobuf.Timestamp timestamp = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes validator_address = 6; - int32 validator_index = 7; - bytes signature = 8; + BlockID block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes validator_address = 6; + int32 validator_index = 7; + bytes signature = 8; } // Commit contains the evidence that a block was committed by a set of validators. message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; + int64 height = 1; + int32 round = 2; + BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; + repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; } // CommitSig is a part of the Vote included in a Commit. message CommitSig { BlockIDFlag block_id_flag = 1; bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 4; } message Proposal { @@ -127,9 +124,8 @@ message Proposal { int32 round = 3; int32 pol_round = 4; BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 6 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 7; + google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 7; } message SignedHeader { diff --git a/simapp/app.go b/simapp/app.go index 452bfd7a8f..c619251b4f 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -65,6 +65,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/cosmos/cosmos-sdk/x/gov" + govclient "github.com/cosmos/cosmos-sdk/x/gov/client" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" @@ -116,7 +117,7 @@ var ( mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( - paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler, + []govclient.ProposalHandler{paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler}, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, @@ -285,7 +286,7 @@ func NewSimApp( ) app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper) - app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp) + // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks @@ -323,6 +324,8 @@ func NewSimApp( // register the governance hooks ), ) + // set the governance module account as the authority for conducting upgrades + app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath, app.BaseApp, authtypes.NewModuleAddress(govtypes.ModuleName).String()) app.NFTKeeper = nftkeeper.NewKeeper(keys[nftkeeper.StoreKey], appCodec, app.AccountKeeper, app.BankKeeper) // create evidence keeper with router diff --git a/x/gov/client/cli/tx.go b/x/gov/client/cli/tx.go index 167784bb15..757045092f 100644 --- a/x/gov/client/cli/tx.go +++ b/x/gov/client/cli/tx.go @@ -26,7 +26,6 @@ const ( FlagDescription = "description" // Deprecated: only used for v1beta1 legacy proposals. FlagProposalType = "type" - // Deprecated: only used for v1beta1 legacy proposals. FlagDeposit = "deposit" flagVoter = "voter" flagDepositor = "depositor" @@ -51,7 +50,7 @@ var ProposalFlags = []string{ // it contains a slice of "proposal" child commands. These commands are respective // to proposal type handlers that are implemented in other modules but are mounted // under the governance CLI (eg. parameter change proposals). -func NewTxCmd(propCmds []*cobra.Command) *cobra.Command { +func NewTxCmd(legacyPropCmds []*cobra.Command) *cobra.Command { govTxCmd := &cobra.Command{ Use: types.ModuleName, Short: "Governance transactions subcommands", @@ -61,7 +60,7 @@ func NewTxCmd(propCmds []*cobra.Command) *cobra.Command { } cmdSubmitLegacyProp := NewCmdSubmitLegacyProposal() - for _, propCmd := range propCmds { + for _, propCmd := range legacyPropCmds { flags.AddTxFlagsToCmd(propCmd) cmdSubmitLegacyProp.AddCommand(propCmd) } @@ -71,6 +70,8 @@ func NewTxCmd(propCmds []*cobra.Command) *cobra.Command { NewCmdVote(), NewCmdWeightedVote(), NewCmdSubmitProposal(), + + // Deprecated cmdSubmitLegacyProp, ) diff --git a/x/gov/module.go b/x/gov/module.go index 3eee0679e1..1c7e14cbf3 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -36,14 +36,14 @@ var ( // AppModuleBasic defines the basic application module used by the gov module. type AppModuleBasic struct { - cdc codec.Codec - proposalHandlers []govclient.ProposalHandler // proposal handlers which live in governance cli and rest + cdc codec.Codec + legacyProposalHandlers []govclient.ProposalHandler // legacy proposal handlers which live in governance cli and rest } // NewAppModuleBasic creates a new AppModuleBasic object -func NewAppModuleBasic(proposalHandlers ...govclient.ProposalHandler) AppModuleBasic { +func NewAppModuleBasic(legacyProposalHandlers []govclient.ProposalHandler) AppModuleBasic { return AppModuleBasic{ - proposalHandlers: proposalHandlers, + legacyProposalHandlers: legacyProposalHandlers, } } @@ -91,12 +91,17 @@ func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux // GetTxCmd returns the root tx command for the gov module. func (a AppModuleBasic) GetTxCmd() *cobra.Command { - proposalCLIHandlers := make([]*cobra.Command, 0, len(a.proposalHandlers)) - for _, proposalHandler := range a.proposalHandlers { + legacyProposalCLIHandlers := getProposalCLIHandlers(a.legacyProposalHandlers) + + return cli.NewTxCmd(legacyProposalCLIHandlers) +} + +func getProposalCLIHandlers(handlers []govclient.ProposalHandler) []*cobra.Command { + proposalCLIHandlers := make([]*cobra.Command, 0, len(handlers)) + for _, proposalHandler := range handlers { proposalCLIHandlers = append(proposalCLIHandlers, proposalHandler.CLIHandler()) } - - return cli.NewTxCmd(proposalCLIHandlers) + return proposalCLIHandlers } // GetQueryCmd returns the root query command for the gov module. diff --git a/x/upgrade/client/cli/parse.go b/x/upgrade/client/cli/parse.go new file mode 100644 index 0000000000..2844e73dcd --- /dev/null +++ b/x/upgrade/client/cli/parse.go @@ -0,0 +1,34 @@ +package cli + +import ( + "github.com/cosmos/cosmos-sdk/x/gov/client/cli" + gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + "github.com/cosmos/cosmos-sdk/x/upgrade/types" + "github.com/spf13/cobra" +) + +func parseArgsToContent(cmd *cobra.Command, name string) (gov.Content, error) { + title, err := cmd.Flags().GetString(cli.FlagTitle) + if err != nil { + return nil, err + } + + description, err := cmd.Flags().GetString(cli.FlagDescription) + if err != nil { + return nil, err + } + + height, err := cmd.Flags().GetInt64(FlagUpgradeHeight) + if err != nil { + return nil, err + } + + info, err := cmd.Flags().GetString(FlagUpgradeInfo) + if err != nil { + return nil, err + } + + plan := types.Plan{Name: name, Height: height, Info: info} + content := types.NewSoftwareUpgradeProposal(title, description, plan) + return content, nil +} diff --git a/x/upgrade/client/cli/tx.go b/x/upgrade/client/cli/tx.go index aaafe83b82..b4ad5e3668 100644 --- a/x/upgrade/client/cli/tx.go +++ b/x/upgrade/client/cli/tx.go @@ -10,16 +10,18 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/gov/client/cli" - gov "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/cosmos/cosmos-sdk/x/upgrade/plan" "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) const ( + // Deprecated: only used for v1beta1 legacy proposals. FlagUpgradeHeight = "upgrade-height" - FlagUpgradeInfo = "upgrade-info" - FlagNoValidate = "no-validate" - FlagDaemonName = "daemon-name" + // Deprecated: only used for v1beta1 legacy proposals. + FlagUpgradeInfo = "upgrade-info" + FlagNoValidate = "no-validate" + FlagDaemonName = "daemon-name" ) // GetTxCmd returns the transaction commands for this module @@ -32,10 +34,11 @@ func GetTxCmd() *cobra.Command { return cmd } -// NewCmdSubmitUpgradeProposal implements a command handler for submitting a software upgrade proposal transaction. -func NewCmdSubmitUpgradeProposal() *cobra.Command { +// NewCmdSubmitLegacyUpgradeProposal implements a command handler for submitting a software upgrade proposal transaction. +// Deprecated: please use NewCmdSubmitUpgradeProposal instead. +func NewCmdSubmitLegacyUpgradeProposal() *cobra.Command { cmd := &cobra.Command{ - Use: "software-upgrade [name] (--upgrade-height [height]) (--upgrade-info [info]) [flags]", + Use: "legacy-software-upgrade [name] (--upgrade-height [height]) (--upgrade-info [info]) [flags]", Args: cobra.ExactArgs(1), Short: "Submit a software upgrade proposal", Long: "Submit a software upgrade along with an initial deposit.\n" + @@ -81,7 +84,7 @@ func NewCmdSubmitUpgradeProposal() *cobra.Command { return err } - msg, err := gov.NewMsgSubmitProposal(content, deposit, from) + msg, err := v1beta1.NewMsgSubmitProposal(content, deposit, from) if err != nil { return err } @@ -101,10 +104,11 @@ func NewCmdSubmitUpgradeProposal() *cobra.Command { return cmd } -// NewCmdSubmitCancelUpgradeProposal implements a command handler for submitting a software upgrade cancel proposal transaction. -func NewCmdSubmitCancelUpgradeProposal() *cobra.Command { +// NewCmdSubmitLegacyCancelUpgradeProposal implements a command handler for submitting a software upgrade cancel proposal transaction. +// Deprecated: please use NewCmdSubmitCancelUpgradeProposal instead. +func NewCmdSubmitLegacyCancelUpgradeProposal() *cobra.Command { cmd := &cobra.Command{ - Use: "cancel-software-upgrade [flags]", + Use: "legacy-cancel-software-upgrade [flags]", Args: cobra.ExactArgs(0), Short: "Cancel the current software upgrade proposal", Long: "Cancel a software upgrade along with an initial deposit.", @@ -137,7 +141,7 @@ func NewCmdSubmitCancelUpgradeProposal() *cobra.Command { content := types.NewCancelSoftwareUpgradeProposal(title, description) - msg, err := gov.NewMsgSubmitProposal(content, deposit, from) + msg, err := v1beta1.NewMsgSubmitProposal(content, deposit, from) if err != nil { return err } @@ -155,32 +159,6 @@ func NewCmdSubmitCancelUpgradeProposal() *cobra.Command { return cmd } -func parseArgsToContent(cmd *cobra.Command, name string) (gov.Content, error) { - title, err := cmd.Flags().GetString(cli.FlagTitle) - if err != nil { - return nil, err - } - - description, err := cmd.Flags().GetString(cli.FlagDescription) - if err != nil { - return nil, err - } - - height, err := cmd.Flags().GetInt64(FlagUpgradeHeight) - if err != nil { - return nil, err - } - - info, err := cmd.Flags().GetString(FlagUpgradeInfo) - if err != nil { - return nil, err - } - - plan := types.Plan{Name: name, Height: height, Info: info} - content := types.NewSoftwareUpgradeProposal(title, description, plan) - return content, nil -} - // getDefaultDaemonName gets the default name to use for the daemon. // If a DAEMON_NAME env var is set, that is used. // Otherwise, the last part of the currently running executable is used. diff --git a/x/upgrade/client/proposal_handler.go b/x/upgrade/client/proposal_handler.go index 048d75295c..0829247874 100644 --- a/x/upgrade/client/proposal_handler.go +++ b/x/upgrade/client/proposal_handler.go @@ -5,5 +5,5 @@ import ( "github.com/cosmos/cosmos-sdk/x/upgrade/client/cli" ) -var ProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitUpgradeProposal) -var CancelProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitCancelUpgradeProposal) +var LegacyProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitLegacyUpgradeProposal) +var LegacyCancelProposalHandler = govclient.NewProposalHandler(cli.NewCmdSubmitLegacyCancelUpgradeProposal) diff --git a/x/upgrade/client/testutil/cli_test.go b/x/upgrade/client/testutil/cli_test.go index 3c083e6947..5b3ef61c5a 100644 --- a/x/upgrade/client/testutil/cli_test.go +++ b/x/upgrade/client/testutil/cli_test.go @@ -1,3 +1,4 @@ +//go:build norace // +build norace package testutil diff --git a/x/upgrade/keeper/grpc_query.go b/x/upgrade/keeper/grpc_query.go index fe6ec3b512..5757a05f99 100644 --- a/x/upgrade/keeper/grpc_query.go +++ b/x/upgrade/keeper/grpc_query.go @@ -70,3 +70,8 @@ func (k Keeper) ModuleVersions(c context.Context, req *types.QueryModuleVersions ModuleVersions: mv, }, nil } + +// Authority implementsthe the Query/Authority gRPC method, returning the account capable of performing upgrades +func (k Keeper) Authority(c context.Context, req *types.QueryAuthorityRequest) (*types.QueryAuthorityResponse, error) { + return &types.QueryAuthorityResponse{Address: k.authority}, nil +} diff --git a/x/upgrade/keeper/grpc_query_test.go b/x/upgrade/keeper/grpc_query_test.go index 506ea0a074..da54ae7fe4 100644 --- a/x/upgrade/keeper/grpc_query_test.go +++ b/x/upgrade/keeper/grpc_query_test.go @@ -12,6 +12,8 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) @@ -203,6 +205,12 @@ func (suite *UpgradeTestSuite) TestModuleVersions() { } } +func (suite *UpgradeTestSuite) TestAuthority() { + res, err := suite.queryClient.Authority(gocontext.Background(), &types.QueryAuthorityRequest{}) + suite.Require().NoError(err) + suite.Require().Equal(authtypes.NewModuleAddress(govtypes.ModuleName).String(), res.Address) +} + func TestUpgradeTestSuite(t *testing.T) { suite.Run(t, new(UpgradeTestSuite)) } diff --git a/x/upgrade/keeper/keeper.go b/x/upgrade/keeper/keeper.go index 8ec103491b..52b47755b9 100644 --- a/x/upgrade/keeper/keeper.go +++ b/x/upgrade/keeper/keeper.go @@ -36,6 +36,7 @@ type Keeper struct { upgradeHandlers map[string]types.UpgradeHandler // map of plan name to upgrade handler versionSetter xp.ProtocolVersionSetter // implements setting the protocol version field on BaseApp downgradeVerified bool // tells if we've already sanity checked that this binary version isn't being used against an old state. + authority string // the address capable of executing and cancelling an upgrade. Usually the gov module account } // NewKeeper constructs an upgrade Keeper which requires the following arguments: @@ -44,7 +45,7 @@ type Keeper struct { // cdc - the app-wide binary codec // homePath - root directory of the application's config // vs - the interface implemented by baseapp which allows setting baseapp's protocol version field -func NewKeeper(skipUpgradeHeights map[int64]bool, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, homePath string, vs xp.ProtocolVersionSetter) Keeper { +func NewKeeper(skipUpgradeHeights map[int64]bool, storeKey storetypes.StoreKey, cdc codec.BinaryCodec, homePath string, vs xp.ProtocolVersionSetter, authority string) Keeper { return Keeper{ homePath: homePath, skipUpgradeHeights: skipUpgradeHeights, @@ -52,6 +53,7 @@ func NewKeeper(skipUpgradeHeights map[int64]bool, storeKey storetypes.StoreKey, cdc: cdc, upgradeHandlers: map[string]types.UpgradeHandler{}, versionSetter: vs, + authority: authority, } } diff --git a/x/upgrade/keeper/keeper_test.go b/x/upgrade/keeper/keeper_test.go index b572a89ac1..a91b0b748d 100644 --- a/x/upgrade/keeper/keeper_test.go +++ b/x/upgrade/keeper/keeper_test.go @@ -11,6 +11,8 @@ import ( "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" "github.com/cosmos/cosmos-sdk/x/upgrade/types" ) @@ -21,6 +23,8 @@ type KeeperTestSuite struct { homeDir string app *simapp.SimApp ctx sdk.Context + msgSrvr types.MsgServer + addrs []sdk.AccAddress } func (s *KeeperTestSuite) SetupTest() { @@ -28,6 +32,7 @@ func (s *KeeperTestSuite) SetupTest() { homeDir := filepath.Join(s.T().TempDir(), "x_upgrade_keeper_test") app.UpgradeKeeper = keeper.NewKeeper( // recreate keeper in order to use a custom home path make(map[int64]bool), app.GetKey(types.StoreKey), app.AppCodec(), homeDir, app.BaseApp, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) s.T().Log("home dir:", homeDir) s.homeDir = homeDir @@ -36,6 +41,8 @@ func (s *KeeperTestSuite) SetupTest() { Time: time.Now(), Height: 10, }) + s.msgSrvr = keeper.NewMsgServerImpl(s.app.UpgradeKeeper) + s.addrs = simapp.AddTestAddrsIncremental(app, s.ctx, 1, sdk.NewInt(30000000)) } func (s *KeeperTestSuite) TestReadUpgradeInfoFromDisk() { diff --git a/x/upgrade/keeper/msg_server.go b/x/upgrade/keeper/msg_server.go new file mode 100644 index 0000000000..1e1249f5e8 --- /dev/null +++ b/x/upgrade/keeper/msg_server.go @@ -0,0 +1,51 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/errors" + gov "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/cosmos/cosmos-sdk/x/upgrade/types" +) + +type msgServer struct { + Keeper +} + +// NewMsgServerImpl returns an implementation of the upgrade MsgServer interface +// for the provided Keeper. +func NewMsgServerImpl(k Keeper) types.MsgServer { + return &msgServer{ + Keeper: k, + } +} + +var _ types.MsgServer = msgServer{} + +// SoftwareUpgrade implements the Msg/SoftwareUpgrade Msg service. +func (k msgServer) SoftwareUpgrade(goCtx context.Context, req *types.MsgSoftwareUpgrade) (*types.MsgSoftwareUpgradeResponse, error) { + if k.authority != req.Authority { + return nil, errors.Wrapf(gov.ErrInvalidSigner, "expected %s got %s", k.authority, req.Authority) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + err := k.ScheduleUpgrade(ctx, req.Plan) + if err != nil { + return nil, err + } + + return &types.MsgSoftwareUpgradeResponse{}, nil +} + +// CancelUpgrade implements the Msg/CancelUpgrade Msg service. +func (k msgServer) CancelUpgrade(goCtx context.Context, req *types.MsgCancelUpgrade) (*types.MsgCancelUpgradeResponse, error) { + if k.authority != req.Authority { + return nil, errors.Wrapf(gov.ErrInvalidSigner, "expected %s got %s", k.authority, req.Authority) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + k.ClearUpgradePlan(ctx) + + return &types.MsgCancelUpgradeResponse{}, nil +} diff --git a/x/upgrade/keeper/msg_server_test.go b/x/upgrade/keeper/msg_server_test.go new file mode 100644 index 0000000000..00af9e0656 --- /dev/null +++ b/x/upgrade/keeper/msg_server_test.go @@ -0,0 +1,63 @@ +package keeper_test + +import ( + "github.com/cosmos/cosmos-sdk/x/upgrade/types" +) + +func (s *KeeperTestSuite) TestSoftwareUpgrade() { + govAccAddr := s.app.GovKeeper.GetGovernanceAccount(s.ctx).GetAddress().String() + + testCases := []struct { + name string + req *types.MsgSoftwareUpgrade + expectErr bool + errMsg string + }{ + { + "unauthorized authority address", + &types.MsgSoftwareUpgrade{ + Authority: s.addrs[0].String(), + Plan: types.Plan{ + Name: "all-good", + Info: "some text here", + Height: 123450000, + }, + }, + true, + "expected gov account as only signer for proposal message", + }, + { + "invalid plan", + &types.MsgSoftwareUpgrade{ + Authority: govAccAddr, + Plan: types.Plan{ + Height: 123450000, + }, + }, + true, + "name cannot be empty: invalid request", + }, + { + "successful upgrade scheduled", + &types.MsgSoftwareUpgrade{ + Authority: govAccAddr, + Plan: types.Plan{ + Name: "all-good", + Info: "some text here", + Height: 123450000, + }, + }, + false, + "", + }, + } + for _, tc := range testCases { + s.Run(tc.name, func() { + _, err := s.msgSrvr.SoftwareUpgrade(s.ctx, tc.req) + if tc.expectErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.errMsg) + } + }) + } +} diff --git a/x/upgrade/module.go b/x/upgrade/module.go index ed4b6e0ed9..045d233705 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -97,9 +97,9 @@ func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sd return keeper.NewQuerier(am.keeper, legacyQuerierCdc) } -// RegisterServices registers a GRPC query service to respond to the -// module-specific GRPC queries. +// RegisterServices registers module services. func (am AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) types.RegisterQueryServer(cfg.QueryServer(), am.keeper) } diff --git a/x/upgrade/spec/01_concepts.md b/x/upgrade/spec/01_concepts.md index fbf6138f74..826290a118 100644 --- a/x/upgrade/spec/01_concepts.md +++ b/x/upgrade/spec/01_concepts.md @@ -76,23 +76,19 @@ will ensure these `StoreUpgrades` takes place only in planned upgrade handler. ## Proposal -Typically, a `Plan` is proposed and submitted through governance via a `SoftwareUpgradeProposal`. +Typically, a `Plan` is proposed and submitted through governance via a proposal +containing a `MsgSoftwareUpgrade` message. This proposal prescribes to the standard governance process. If the proposal passes, the `Plan`, which targets a specific `Handler`, is persisted and scheduled. The upgrade can be delayed or hastened by updating the `Plan.Height` in a new proposal. -```go -type SoftwareUpgradeProposal struct { - Title string - Description string - Plan Plan -} -``` ++++ https://github.com/cosmos/cosmos-sdk/blob/08ddb217c176abe31c96af9d5f6c4c6fc645c4d4/proto/cosmos/upgrade/v1beta1/tx.proto#L19-L28 ### Cancelling Upgrade Proposals -Upgrade proposals can be cancelled. There exists a `CancelSoftwareUpgrade` proposal -type, which can be voted on and passed and will remove the scheduled upgrade `Plan`. +Upgrade proposals can be cancelled. There exists a gov-enabled `MsgCancelUpgrade` +message type, which can be embedded in a proposal, voted on and, if passed, will +remove the scheduled upgrade `Plan`. Of course this requires that the upgrade was known to be a bad idea well before the upgrade itself, to allow time for a vote. @@ -101,6 +97,6 @@ If such a possibility is desired, the upgrade height is to be upgrade proposal. The `SafetyDelta` is the time available from the success of an upgrade proposal and the realization it was a bad idea (due to external social consensus). -A `CancelSoftwareUpgrade` proposal can also be made while the original -`SoftwareUpgradeProposal` is still being voted upon, as long as the `VotingPeriod` -ends after the `SoftwareUpgradeProposal`. +A `MsgCancelUpgrade` proposal can also be made while the original +`MsgSoftwareUpgrade` proposal is still being voted upon, as long as the `VotingPeriod` +ends after the `MsgSoftwareUpgrade` proposal. diff --git a/x/upgrade/types/codec.go b/x/upgrade/types/codec.go index 5ef751d16f..1d288926fc 100644 --- a/x/upgrade/types/codec.go +++ b/x/upgrade/types/codec.go @@ -2,15 +2,24 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) +func init() { + RegisterLegacyAminoCodec(legacy.Cdc) +} + // RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(Plan{}, "cosmos-sdk/Plan", nil) cdc.RegisterConcrete(&SoftwareUpgradeProposal{}, "cosmos-sdk/SoftwareUpgradeProposal", nil) cdc.RegisterConcrete(&CancelSoftwareUpgradeProposal{}, "cosmos-sdk/CancelSoftwareUpgradeProposal", nil) + cdc.RegisterConcrete(&MsgSoftwareUpgrade{}, "cosmos-sdk/MsgSoftwareUpgrade", nil) + cdc.RegisterConcrete(&MsgCancelUpgrade{}, "cosmos-sdk/MsgCancelUpgrade", nil) } func RegisterInterfaces(registry types.InterfaceRegistry) { @@ -19,4 +28,11 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &SoftwareUpgradeProposal{}, &CancelSoftwareUpgradeProposal{}, ) + + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgSoftwareUpgrade{}, + &MsgCancelUpgrade{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/upgrade/types/msgs.go b/x/upgrade/types/msgs.go new file mode 100644 index 0000000000..5ecc2830f5 --- /dev/null +++ b/x/upgrade/types/msgs.go @@ -0,0 +1,69 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec/legacy" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" +) + +var ( + _, _ sdk.Msg = &MsgSoftwareUpgrade{}, &MsgCancelUpgrade{} + _, _ legacytx.LegacyMsg = &MsgSoftwareUpgrade{}, &MsgCancelUpgrade{} +) + +// Route implements the LegacyMsg interface. +func (m MsgSoftwareUpgrade) Route() string { return sdk.MsgTypeURL(&m) } + +// Type implements the LegacyMsg interface. +func (m MsgSoftwareUpgrade) Type() string { return sdk.MsgTypeURL(&m) } + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgSoftwareUpgrade) GetSignBytes() []byte { + return sdk.MustSortJSON(legacy.Cdc.MustMarshalJSON(&m)) +} + +// ValidateBasic does a sanity check on the provided data. +func (m *MsgSoftwareUpgrade) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.Wrap(err, "authority") + } + + if err := m.Plan.ValidateBasic(); err != nil { + return sdkerrors.Wrap(err, "plan") + } + + return nil +} + +// GetSigners returns the expected signers for MsgSoftwareUpgrade. +func (m *MsgSoftwareUpgrade) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(m.Authority) + return []sdk.AccAddress{addr} +} + +// Route implements the LegacyMsg interface. +func (m MsgCancelUpgrade) Route() string { return sdk.MsgTypeURL(&m) } + +// Type implements the LegacyMsg interface. +func (m MsgCancelUpgrade) Type() string { return sdk.MsgTypeURL(&m) } + +// GetSignBytes implements the LegacyMsg interface. +func (m MsgCancelUpgrade) GetSignBytes() []byte { + return sdk.MustSortJSON(legacy.Cdc.MustMarshalJSON(&m)) +} + +// ValidateBasic does a sanity check on the provided data. +func (m *MsgCancelUpgrade) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(m.Authority); err != nil { + return sdkerrors.Wrap(err, "authority") + } + + return nil +} + +// GetSigners returns the expected signers for MsgSoftwareUpgrade. +func (m *MsgCancelUpgrade) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(m.Authority) + return []sdk.AccAddress{addr} +} diff --git a/x/upgrade/types/msgs_test.go b/x/upgrade/types/msgs_test.go new file mode 100644 index 0000000000..feb648be97 --- /dev/null +++ b/x/upgrade/types/msgs_test.go @@ -0,0 +1,109 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/upgrade/types" +) + +var authority = sdk.AccAddress("authority") + +func TestMsgSoftwareUpgrade(t *testing.T) { + testCases := []struct { + name string + msg *types.MsgSoftwareUpgrade + expErr bool + errMsg string + }{ + { + "invalid authority address", + &types.MsgSoftwareUpgrade{ + Authority: "authority", + Plan: types.Plan{ + Name: "all-good", + Height: 123450000, + }, + }, + true, + "authority: decoding bech32 failed", + }, + { + "invalid plan", + &types.MsgSoftwareUpgrade{ + Authority: authority.String(), + Plan: types.Plan{ + Height: 123450000, + }, + }, + true, + "plan", + }, + { + "all good", + &types.MsgSoftwareUpgrade{ + Authority: authority.String(), + Plan: types.Plan{ + Name: "all-good", + Height: 123450000, + }, + }, + false, + "", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := tc.msg.ValidateBasic() + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.errMsg) + } else { + require.NoError(t, err) + require.Equal(t, tc.msg.Type(), sdk.MsgTypeURL(&types.MsgSoftwareUpgrade{})) + } + }) + } +} + +func TestMsgCancelUpgrade(t *testing.T) { + testCases := []struct { + name string + msg *types.MsgCancelUpgrade + expErr bool + errMsg string + }{ + { + "invalid authority address", + &types.MsgCancelUpgrade{ + Authority: "authority", + }, + true, + "authority: decoding bech32 failed", + }, + { + "all good", + &types.MsgCancelUpgrade{ + Authority: authority.String(), + }, + false, + "", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := tc.msg.ValidateBasic() + if tc.expErr { + require.Error(t, err) + require.Contains(t, err.Error(), tc.errMsg) + } else { + require.NoError(t, err) + require.Equal(t, tc.msg.Type(), sdk.MsgTypeURL(&types.MsgCancelUpgrade{})) + } + }) + } +} diff --git a/x/upgrade/types/query.pb.go b/x/upgrade/types/query.pb.go index d79e402c09..9e4f501d88 100644 --- a/x/upgrade/types/query.pb.go +++ b/x/upgrade/types/query.pb.go @@ -406,6 +406,88 @@ func (m *QueryModuleVersionsResponse) GetModuleVersions() []*ModuleVersion { return nil } +// QueryAuthorityRequest is the request type for Query/Authority +type QueryAuthorityRequest struct { +} + +func (m *QueryAuthorityRequest) Reset() { *m = QueryAuthorityRequest{} } +func (m *QueryAuthorityRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAuthorityRequest) ProtoMessage() {} +func (*QueryAuthorityRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4a334d07ad8374f0, []int{8} +} +func (m *QueryAuthorityRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAuthorityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAuthorityRequest.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 *QueryAuthorityRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAuthorityRequest.Merge(m, src) +} +func (m *QueryAuthorityRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAuthorityRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAuthorityRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAuthorityRequest proto.InternalMessageInfo + +// QueryAuthorityResponse is the response type for Query/Authority +type QueryAuthorityResponse struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryAuthorityResponse) Reset() { *m = QueryAuthorityResponse{} } +func (m *QueryAuthorityResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAuthorityResponse) ProtoMessage() {} +func (*QueryAuthorityResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4a334d07ad8374f0, []int{9} +} +func (m *QueryAuthorityResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAuthorityResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAuthorityResponse.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 *QueryAuthorityResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAuthorityResponse.Merge(m, src) +} +func (m *QueryAuthorityResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAuthorityResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAuthorityResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAuthorityResponse proto.InternalMessageInfo + +func (m *QueryAuthorityResponse) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + func init() { proto.RegisterType((*QueryCurrentPlanRequest)(nil), "cosmos.upgrade.v1beta1.QueryCurrentPlanRequest") proto.RegisterType((*QueryCurrentPlanResponse)(nil), "cosmos.upgrade.v1beta1.QueryCurrentPlanResponse") @@ -415,6 +497,8 @@ func init() { proto.RegisterType((*QueryUpgradedConsensusStateResponse)(nil), "cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse") proto.RegisterType((*QueryModuleVersionsRequest)(nil), "cosmos.upgrade.v1beta1.QueryModuleVersionsRequest") proto.RegisterType((*QueryModuleVersionsResponse)(nil), "cosmos.upgrade.v1beta1.QueryModuleVersionsResponse") + proto.RegisterType((*QueryAuthorityRequest)(nil), "cosmos.upgrade.v1beta1.QueryAuthorityRequest") + proto.RegisterType((*QueryAuthorityResponse)(nil), "cosmos.upgrade.v1beta1.QueryAuthorityResponse") } func init() { @@ -422,43 +506,48 @@ func init() { } var fileDescriptor_4a334d07ad8374f0 = []byte{ - // 576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcf, 0x6e, 0xd3, 0x30, - 0x1c, 0xae, 0xbb, 0x6e, 0x02, 0x17, 0x0d, 0xe4, 0x43, 0x09, 0x61, 0x0a, 0x95, 0x19, 0x50, 0xc4, - 0x1a, 0x6f, 0xed, 0x05, 0x0d, 0x81, 0x80, 0x49, 0x88, 0x21, 0x98, 0xa0, 0x08, 0x0e, 0x5c, 0x2a, - 0xb7, 0xb1, 0xda, 0x88, 0x24, 0xce, 0x62, 0x67, 0x62, 0x9a, 0x76, 0xe1, 0xc4, 0x11, 0x89, 0x3b, - 0x37, 0x2e, 0x3c, 0x09, 0xc7, 0x49, 0x5c, 0x38, 0xec, 0x80, 0x5a, 0x1e, 0x04, 0xc5, 0x71, 0x51, - 0x4a, 0x93, 0x0e, 0x76, 0x6a, 0x63, 0x7f, 0xff, 0x7e, 0xf1, 0xe7, 0x40, 0xdc, 0xe7, 0xc2, 0xe7, - 0x82, 0xc4, 0xe1, 0x20, 0xa2, 0x0e, 0x23, 0x7b, 0x1b, 0x3d, 0x26, 0xe9, 0x06, 0xd9, 0x8d, 0x59, - 0xb4, 0x6f, 0x87, 0x11, 0x97, 0x1c, 0xd5, 0x52, 0x8c, 0xad, 0x31, 0xb6, 0xc6, 0x98, 0x2b, 0x03, - 0xce, 0x07, 0x1e, 0x23, 0x34, 0x74, 0x09, 0x0d, 0x02, 0x2e, 0xa9, 0x74, 0x79, 0x20, 0x52, 0x96, - 0xb9, 0x5a, 0xa0, 0x3c, 0x51, 0x51, 0x28, 0x7c, 0x09, 0x5e, 0x7c, 0x91, 0x58, 0x6d, 0xc5, 0x51, - 0xc4, 0x02, 0xf9, 0xdc, 0xa3, 0x41, 0x87, 0xed, 0xc6, 0x4c, 0x48, 0xfc, 0x14, 0x1a, 0xb3, 0x5b, - 0x22, 0xe4, 0x81, 0x60, 0x68, 0x1d, 0x56, 0x42, 0x8f, 0x06, 0x06, 0xa8, 0x83, 0x46, 0xb5, 0xb5, - 0x62, 0xe7, 0x27, 0xb4, 0x15, 0x47, 0x21, 0x71, 0x53, 0x1b, 0x3d, 0x08, 0x43, 0xcf, 0x65, 0x4e, - 0xc6, 0x08, 0x21, 0x58, 0x09, 0xa8, 0xcf, 0x94, 0xd8, 0xd9, 0x8e, 0xfa, 0x8f, 0x5b, 0xda, 0x7c, - 0x0a, 0xae, 0xcd, 0x6b, 0x70, 0x69, 0xc8, 0xdc, 0xc1, 0x50, 0x2a, 0xc6, 0x42, 0x47, 0x3f, 0xe1, - 0x6d, 0x88, 0x15, 0xe7, 0x55, 0x9a, 0xc2, 0xd9, 0x4a, 0xd0, 0x81, 0x88, 0xc5, 0x4b, 0x49, 0x25, - 0x9b, 0xb8, 0x5d, 0x81, 0x55, 0x8f, 0x0a, 0xd9, 0x9d, 0x92, 0x80, 0xc9, 0xd2, 0x63, 0xb5, 0xb2, - 0x59, 0x36, 0x00, 0x76, 0xe1, 0xd5, 0xb9, 0x52, 0x3a, 0xc9, 0x6d, 0x68, 0xe8, 0x91, 0x9d, 0x6e, - 0x7f, 0x02, 0xe9, 0x8a, 0x04, 0x63, 0x94, 0xeb, 0xa0, 0x71, 0xae, 0x53, 0x8b, 0x73, 0x15, 0x12, - 0x93, 0x27, 0x95, 0x33, 0xe0, 0x42, 0x19, 0xdf, 0x85, 0xa6, 0xb2, 0x7a, 0xc6, 0x9d, 0xd8, 0x63, - 0xaf, 0x59, 0x24, 0x92, 0x43, 0xcc, 0xa4, 0xf5, 0xd5, 0x46, 0x37, 0xf3, 0x8a, 0x60, 0xba, 0xb4, - 0x93, 0xbc, 0x28, 0x1f, 0x5e, 0xce, 0xa5, 0xeb, 0x84, 0x3b, 0xf0, 0xbc, 0xe6, 0xef, 0xe9, 0x2d, - 0x03, 0xd4, 0x17, 0x1a, 0xd5, 0xd6, 0xb5, 0xa2, 0x33, 0x9b, 0x12, 0xea, 0x2c, 0xfb, 0x53, 0xba, - 0xad, 0xe3, 0x45, 0xb8, 0xa8, 0xfc, 0xd0, 0x67, 0x00, 0xab, 0x99, 0x6a, 0x20, 0x52, 0x24, 0x58, - 0xd0, 0x2f, 0x73, 0xfd, 0xdf, 0x09, 0xe9, 0x30, 0x78, 0xed, 0xfd, 0xf7, 0x5f, 0x9f, 0xca, 0xd7, - 0xd1, 0x2a, 0x29, 0xe8, 0x76, 0x3f, 0x25, 0x75, 0x93, 0xc6, 0xa1, 0x2f, 0x00, 0x56, 0x33, 0xf5, - 0x39, 0x21, 0xe0, 0x6c, 0x2f, 0x4f, 0x08, 0x98, 0xd3, 0x4c, 0xdc, 0x56, 0x01, 0x9b, 0xe8, 0x56, - 0x51, 0x40, 0x9a, 0x92, 0x54, 0x40, 0x72, 0x90, 0x1c, 0xe9, 0x21, 0x3a, 0x06, 0xb0, 0x96, 0xdf, - 0x33, 0xb4, 0x39, 0x37, 0xc1, 0xdc, 0x9e, 0x9b, 0x77, 0x4e, 0xc5, 0xd5, 0x83, 0x6c, 0xab, 0x41, - 0xee, 0xa3, 0x7b, 0x64, 0xfe, 0x57, 0x64, 0xa6, 0xf6, 0xe4, 0x20, 0x73, 0xb9, 0x0e, 0x3f, 0x94, - 0x01, 0xfa, 0x0a, 0xe0, 0xf2, 0x74, 0x39, 0x51, 0x6b, 0x6e, 0xb4, 0xdc, 0x8b, 0x60, 0xb6, 0xff, - 0x8b, 0xa3, 0xc7, 0x20, 0x6a, 0x8c, 0x9b, 0xe8, 0x46, 0xd1, 0x18, 0x7f, 0xdd, 0x8d, 0x87, 0x8f, - 0xbe, 0x8d, 0x2c, 0x70, 0x34, 0xb2, 0xc0, 0xcf, 0x91, 0x05, 0x3e, 0x8e, 0xad, 0xd2, 0xd1, 0xd8, - 0x2a, 0xfd, 0x18, 0x5b, 0xa5, 0x37, 0x6b, 0x03, 0x57, 0x0e, 0xe3, 0x9e, 0xdd, 0xe7, 0xfe, 0x44, - 0x2c, 0xfd, 0x69, 0x0a, 0xe7, 0x2d, 0x79, 0xf7, 0x47, 0x59, 0xee, 0x87, 0x4c, 0xf4, 0x96, 0xd4, - 0xd7, 0xb5, 0xfd, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xc6, 0x89, 0xe8, 0xba, 0xdf, 0x05, 0x00, 0x00, + // 644 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xc1, 0x4f, 0x13, 0x4f, + 0x14, 0x66, 0x0a, 0x3f, 0x7e, 0xf2, 0x6a, 0xd0, 0x4c, 0x62, 0x59, 0x57, 0x52, 0x71, 0x40, 0x85, + 0x48, 0x77, 0xa0, 0x5c, 0x0c, 0x46, 0xa3, 0x92, 0x18, 0x31, 0x4a, 0xb4, 0x46, 0x0f, 0x5e, 0x9a, + 0xa1, 0x3b, 0x69, 0x37, 0xb6, 0x3b, 0xcb, 0xce, 0x2c, 0x91, 0x10, 0x2e, 0x9e, 0x3c, 0x9a, 0x18, + 0xaf, 0xde, 0xbc, 0xf8, 0x97, 0x78, 0x24, 0xf1, 0xe2, 0xc1, 0x83, 0x01, 0xff, 0x04, 0xff, 0x00, + 0xb3, 0xb3, 0xb3, 0xa4, 0xa5, 0xbb, 0x0b, 0x7a, 0x6a, 0x77, 0xde, 0xf7, 0x7d, 0xef, 0x7b, 0x3b, + 0xdf, 0x6b, 0x81, 0xb4, 0x84, 0xec, 0x09, 0x49, 0xa3, 0xa0, 0x1d, 0x32, 0x97, 0xd3, 0xed, 0xe5, + 0x4d, 0xae, 0xd8, 0x32, 0xdd, 0x8a, 0x78, 0xb8, 0xe3, 0x04, 0xa1, 0x50, 0x02, 0x57, 0x12, 0x8c, + 0x63, 0x30, 0x8e, 0xc1, 0xd8, 0xd3, 0x6d, 0x21, 0xda, 0x5d, 0x4e, 0x59, 0xe0, 0x51, 0xe6, 0xfb, + 0x42, 0x31, 0xe5, 0x09, 0x5f, 0x26, 0x2c, 0x7b, 0x2e, 0x47, 0x39, 0x55, 0xd1, 0x28, 0x72, 0x11, + 0xa6, 0x9e, 0xc5, 0xad, 0xd6, 0xa2, 0x30, 0xe4, 0xbe, 0x7a, 0xda, 0x65, 0x7e, 0x83, 0x6f, 0x45, + 0x5c, 0x2a, 0xf2, 0x18, 0xac, 0xe1, 0x92, 0x0c, 0x84, 0x2f, 0x39, 0x5e, 0x82, 0xb1, 0xa0, 0xcb, + 0x7c, 0x0b, 0xcd, 0xa0, 0xf9, 0x72, 0x7d, 0xda, 0xc9, 0x76, 0xe8, 0x68, 0x8e, 0x46, 0x92, 0x9a, + 0x69, 0x74, 0x2f, 0x08, 0xba, 0x1e, 0x77, 0xfb, 0x1a, 0x61, 0x0c, 0x63, 0x3e, 0xeb, 0x71, 0x2d, + 0x36, 0xd1, 0xd0, 0xdf, 0x49, 0xdd, 0x34, 0x1f, 0x80, 0x9b, 0xe6, 0x15, 0x18, 0xef, 0x70, 0xaf, + 0xdd, 0x51, 0x9a, 0x31, 0xda, 0x30, 0x4f, 0x64, 0x1d, 0x88, 0xe6, 0xbc, 0x48, 0x5c, 0xb8, 0x6b, + 0x31, 0xda, 0x97, 0x91, 0x7c, 0xae, 0x98, 0xe2, 0x69, 0xb7, 0xcb, 0x50, 0xee, 0x32, 0xa9, 0x9a, + 0x03, 0x12, 0x10, 0x1f, 0x3d, 0xd4, 0x27, 0xab, 0x25, 0x0b, 0x11, 0x0f, 0x66, 0x0b, 0xa5, 0x8c, + 0x93, 0x9b, 0x60, 0x99, 0x91, 0xdd, 0x66, 0x2b, 0x85, 0x34, 0x65, 0x8c, 0xb1, 0x4a, 0x33, 0x68, + 0xfe, 0x6c, 0xa3, 0x12, 0x65, 0x2a, 0xc4, 0x4d, 0x1e, 0x8d, 0x9d, 0x41, 0xe7, 0x4b, 0xe4, 0x36, + 0xd8, 0xba, 0xd5, 0x13, 0xe1, 0x46, 0x5d, 0xfe, 0x92, 0x87, 0x32, 0xbe, 0xc4, 0x3e, 0xb7, 0x3d, + 0x5d, 0x68, 0xf6, 0xbd, 0x22, 0x48, 0x8e, 0x36, 0xe2, 0x17, 0xd5, 0x83, 0x4b, 0x99, 0x74, 0xe3, + 0x70, 0x03, 0xce, 0x19, 0xfe, 0xb6, 0x29, 0x59, 0x68, 0x66, 0x74, 0xbe, 0x5c, 0xbf, 0x9a, 0x77, + 0x67, 0x03, 0x42, 0x8d, 0xc9, 0xde, 0x80, 0x2e, 0x99, 0x82, 0x0b, 0xc9, 0xbd, 0x44, 0xaa, 0x23, + 0x42, 0x4f, 0xed, 0xa4, 0x69, 0xa9, 0x43, 0xe5, 0x78, 0xc1, 0x58, 0xb0, 0xe0, 0x7f, 0xe6, 0xba, + 0x21, 0x97, 0xd2, 0xd8, 0x4f, 0x1f, 0xeb, 0xbf, 0xc7, 0xe1, 0x3f, 0x4d, 0xc2, 0x9f, 0x10, 0x94, + 0xfb, 0x72, 0x86, 0x69, 0x9e, 0xbb, 0x9c, 0xb0, 0xda, 0x4b, 0xa7, 0x27, 0x24, 0xb6, 0xc8, 0xe2, + 0xdb, 0x6f, 0xbf, 0x3e, 0x94, 0xae, 0xe1, 0x39, 0x9a, 0xb3, 0x28, 0xad, 0x84, 0xd4, 0x8c, 0xe3, + 0x8b, 0x3f, 0x23, 0x28, 0xf7, 0x65, 0xf1, 0x04, 0x83, 0xc3, 0x21, 0x3f, 0xc1, 0x60, 0x46, 0xcc, + 0xc9, 0x8a, 0x36, 0x58, 0xc3, 0x37, 0xf2, 0x0c, 0xb2, 0x84, 0xa4, 0x0d, 0xd2, 0xdd, 0x38, 0x1f, + 0x7b, 0xf8, 0x07, 0x82, 0x4a, 0x76, 0x68, 0xf1, 0x6a, 0xa1, 0x83, 0xc2, 0xa5, 0xb1, 0x6f, 0xfd, + 0x13, 0xd7, 0x0c, 0xb2, 0xae, 0x07, 0xb9, 0x8b, 0xef, 0xd0, 0xe2, 0x9f, 0xa4, 0xa1, 0x1d, 0xa2, + 0xbb, 0x7d, 0x9b, 0xba, 0xf7, 0xae, 0x84, 0xf0, 0x17, 0x04, 0x93, 0x83, 0x49, 0xc7, 0xf5, 0x42, + 0x6b, 0x99, 0x5b, 0x65, 0xaf, 0xfc, 0x15, 0xc7, 0x8c, 0x41, 0xf5, 0x18, 0x0b, 0xf8, 0x7a, 0xde, + 0x18, 0xc7, 0x16, 0x0d, 0x7f, 0x44, 0x30, 0x71, 0xb4, 0x0e, 0xb8, 0x56, 0x1c, 0x80, 0x63, 0xfb, + 0x64, 0x3b, 0xa7, 0x85, 0x1b, 0x77, 0x0b, 0xda, 0xdd, 0x2c, 0xbe, 0x92, 0x9b, 0x96, 0x94, 0x72, + 0xff, 0xc1, 0xd7, 0x83, 0x2a, 0xda, 0x3f, 0xa8, 0xa2, 0x9f, 0x07, 0x55, 0xf4, 0xfe, 0xb0, 0x3a, + 0xb2, 0x7f, 0x58, 0x1d, 0xf9, 0x7e, 0x58, 0x1d, 0x79, 0xb5, 0xd8, 0xf6, 0x54, 0x27, 0xda, 0x74, + 0x5a, 0xa2, 0x97, 0xca, 0x24, 0x1f, 0x35, 0xe9, 0xbe, 0xa6, 0x6f, 0x8e, 0x34, 0xd5, 0x4e, 0xc0, + 0xe5, 0xe6, 0xb8, 0xfe, 0x0b, 0x59, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x18, 0x7f, 0x99, 0xff, + 0xc4, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -488,6 +577,8 @@ type QueryClient interface { // // Since: cosmos-sdk 0.43 ModuleVersions(ctx context.Context, in *QueryModuleVersionsRequest, opts ...grpc.CallOption) (*QueryModuleVersionsResponse, error) + // Returns the account with authority to conduct upgrades + Authority(ctx context.Context, in *QueryAuthorityRequest, opts ...grpc.CallOption) (*QueryAuthorityResponse, error) } type queryClient struct { @@ -535,6 +626,15 @@ func (c *queryClient) ModuleVersions(ctx context.Context, in *QueryModuleVersion return out, nil } +func (c *queryClient) Authority(ctx context.Context, in *QueryAuthorityRequest, opts ...grpc.CallOption) (*QueryAuthorityResponse, error) { + out := new(QueryAuthorityResponse) + err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Query/Authority", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // CurrentPlan queries the current upgrade plan. @@ -552,6 +652,8 @@ type QueryServer interface { // // Since: cosmos-sdk 0.43 ModuleVersions(context.Context, *QueryModuleVersionsRequest) (*QueryModuleVersionsResponse, error) + // Returns the account with authority to conduct upgrades + Authority(context.Context, *QueryAuthorityRequest) (*QueryAuthorityResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -570,6 +672,9 @@ func (*UnimplementedQueryServer) UpgradedConsensusState(ctx context.Context, req func (*UnimplementedQueryServer) ModuleVersions(ctx context.Context, req *QueryModuleVersionsRequest) (*QueryModuleVersionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ModuleVersions not implemented") } +func (*UnimplementedQueryServer) Authority(ctx context.Context, req *QueryAuthorityRequest) (*QueryAuthorityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Authority not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -647,6 +752,24 @@ func _Query_ModuleVersions_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Query_Authority_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAuthorityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Authority(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.upgrade.v1beta1.Query/Authority", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Authority(ctx, req.(*QueryAuthorityRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.upgrade.v1beta1.Query", HandlerType: (*QueryServer)(nil), @@ -667,6 +790,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ModuleVersions", Handler: _Query_ModuleVersions_Handler, }, + { + MethodName: "Authority", + Handler: _Query_Authority_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/upgrade/v1beta1/query.proto", @@ -913,6 +1040,59 @@ func (m *QueryModuleVersionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } +func (m *QueryAuthorityRequest) 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 *QueryAuthorityRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAuthorityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryAuthorityResponse) 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 *QueryAuthorityResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryAuthorityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1024,6 +1204,28 @@ func (m *QueryModuleVersionsResponse) Size() (n int) { return n } +func (m *QueryAuthorityRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryAuthorityResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1636,6 +1838,138 @@ func (m *QueryModuleVersionsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryAuthorityRequest) 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: QueryAuthorityRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAuthorityRequest: 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 *QueryAuthorityResponse) 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: QueryAuthorityResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAuthorityResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = 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 skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/upgrade/types/query.pb.gw.go b/x/upgrade/types/query.pb.gw.go index ab64b67348..4b6bdc06f0 100644 --- a/x/upgrade/types/query.pb.gw.go +++ b/x/upgrade/types/query.pb.gw.go @@ -193,6 +193,24 @@ func local_request_Query_ModuleVersions_0(ctx context.Context, marshaler runtime } +func request_Query_Authority_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAuthorityRequest + var metadata runtime.ServerMetadata + + msg, err := client.Authority(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Authority_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAuthorityRequest + var metadata runtime.ServerMetadata + + msg, err := server.Authority(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. @@ -279,6 +297,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_Authority_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.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Authority_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Authority_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -400,6 +438,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_Authority_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_Authority_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_Authority_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -411,6 +469,8 @@ var ( pattern_Query_UpgradedConsensusState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmos", "upgrade", "v1beta1", "upgraded_consensus_state", "last_height"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ModuleVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "upgrade", "v1beta1", "module_versions"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Authority_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmos", "upgrade", "v1beta1", "authority"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -421,4 +481,6 @@ var ( forward_Query_UpgradedConsensusState_0 = runtime.ForwardResponseMessage forward_Query_ModuleVersions_0 = runtime.ForwardResponseMessage + + forward_Query_Authority_0 = runtime.ForwardResponseMessage ) diff --git a/x/upgrade/types/tx.pb.go b/x/upgrade/types/tx.pb.go new file mode 100644 index 0000000000..47d9edbfd7 --- /dev/null +++ b/x/upgrade/types/tx.pb.go @@ -0,0 +1,941 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/upgrade/v1beta1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/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 + +// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. +// +// Since: cosmos-sdk 0.46 +type MsgSoftwareUpgrade struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // plan is the upgrade plan. + Plan Plan `protobuf:"bytes,2,opt,name=plan,proto3" json:"plan"` +} + +func (m *MsgSoftwareUpgrade) Reset() { *m = MsgSoftwareUpgrade{} } +func (m *MsgSoftwareUpgrade) String() string { return proto.CompactTextString(m) } +func (*MsgSoftwareUpgrade) ProtoMessage() {} +func (*MsgSoftwareUpgrade) Descriptor() ([]byte, []int) { + return fileDescriptor_2852c16e3ab79fef, []int{0} +} +func (m *MsgSoftwareUpgrade) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSoftwareUpgrade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSoftwareUpgrade.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 *MsgSoftwareUpgrade) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSoftwareUpgrade.Merge(m, src) +} +func (m *MsgSoftwareUpgrade) XXX_Size() int { + return m.Size() +} +func (m *MsgSoftwareUpgrade) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSoftwareUpgrade.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSoftwareUpgrade proto.InternalMessageInfo + +func (m *MsgSoftwareUpgrade) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgSoftwareUpgrade) GetPlan() Plan { + if m != nil { + return m.Plan + } + return Plan{} +} + +// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. +// +// Since: cosmos-sdk 0.46 +type MsgSoftwareUpgradeResponse struct { +} + +func (m *MsgSoftwareUpgradeResponse) Reset() { *m = MsgSoftwareUpgradeResponse{} } +func (m *MsgSoftwareUpgradeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSoftwareUpgradeResponse) ProtoMessage() {} +func (*MsgSoftwareUpgradeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2852c16e3ab79fef, []int{1} +} +func (m *MsgSoftwareUpgradeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSoftwareUpgradeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSoftwareUpgradeResponse.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 *MsgSoftwareUpgradeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSoftwareUpgradeResponse.Merge(m, src) +} +func (m *MsgSoftwareUpgradeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSoftwareUpgradeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSoftwareUpgradeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSoftwareUpgradeResponse proto.InternalMessageInfo + +// MsgCancelUpgrade is the Msg/CancelUpgrade request type. +// +// Since: cosmos-sdk 0.46 +type MsgCancelUpgrade struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (m *MsgCancelUpgrade) Reset() { *m = MsgCancelUpgrade{} } +func (m *MsgCancelUpgrade) String() string { return proto.CompactTextString(m) } +func (*MsgCancelUpgrade) ProtoMessage() {} +func (*MsgCancelUpgrade) Descriptor() ([]byte, []int) { + return fileDescriptor_2852c16e3ab79fef, []int{2} +} +func (m *MsgCancelUpgrade) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelUpgrade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelUpgrade.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 *MsgCancelUpgrade) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelUpgrade.Merge(m, src) +} +func (m *MsgCancelUpgrade) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelUpgrade) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelUpgrade.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelUpgrade proto.InternalMessageInfo + +func (m *MsgCancelUpgrade) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. +// +// Since: cosmos-sdk 0.46 +type MsgCancelUpgradeResponse struct { +} + +func (m *MsgCancelUpgradeResponse) Reset() { *m = MsgCancelUpgradeResponse{} } +func (m *MsgCancelUpgradeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCancelUpgradeResponse) ProtoMessage() {} +func (*MsgCancelUpgradeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2852c16e3ab79fef, []int{3} +} +func (m *MsgCancelUpgradeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCancelUpgradeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCancelUpgradeResponse.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 *MsgCancelUpgradeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCancelUpgradeResponse.Merge(m, src) +} +func (m *MsgCancelUpgradeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCancelUpgradeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCancelUpgradeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCancelUpgradeResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgSoftwareUpgrade)(nil), "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade") + proto.RegisterType((*MsgSoftwareUpgradeResponse)(nil), "cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse") + proto.RegisterType((*MsgCancelUpgrade)(nil), "cosmos.upgrade.v1beta1.MsgCancelUpgrade") + proto.RegisterType((*MsgCancelUpgradeResponse)(nil), "cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse") +} + +func init() { proto.RegisterFile("cosmos/upgrade/v1beta1/tx.proto", fileDescriptor_2852c16e3ab79fef) } + +var fileDescriptor_2852c16e3ab79fef = []byte{ + // 363 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce, + 0xcd, 0x2f, 0xd6, 0x2f, 0x2d, 0x48, 0x2f, 0x4a, 0x4c, 0x49, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, + 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x83, 0x28, 0xd0, + 0x83, 0x2a, 0xd0, 0x83, 0x2a, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd1, 0x07, 0xb1, + 0x20, 0xaa, 0xa5, 0x24, 0x21, 0xaa, 0xe3, 0x21, 0x12, 0x50, 0xad, 0x10, 0x29, 0x15, 0x1c, 0x36, + 0xc1, 0x0c, 0x86, 0xa8, 0x12, 0x87, 0xaa, 0xca, 0x2d, 0x4e, 0xd7, 0x2f, 0x33, 0x04, 0x51, 0x10, + 0x09, 0xa5, 0x29, 0x8c, 0x5c, 0x42, 0xbe, 0xc5, 0xe9, 0xc1, 0xf9, 0x69, 0x25, 0xe5, 0x89, 0x45, + 0xa9, 0xa1, 0x10, 0x5d, 0x42, 0x66, 0x5c, 0x9c, 0x89, 0xa5, 0x25, 0x19, 0xf9, 0x45, 0x99, 0x25, + 0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x4e, 0x12, 0x97, 0xb6, 0xe8, 0x8a, 0x40, 0xad, 0x76, + 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x0e, 0x2e, 0x29, 0xca, 0xcc, 0x4b, 0x0f, 0x42, 0x28, 0x15, + 0x32, 0xe3, 0x62, 0x29, 0xc8, 0x49, 0xcc, 0x93, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd1, + 0xc3, 0xee, 0x4b, 0xbd, 0x80, 0x9c, 0xc4, 0x3c, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xc0, + 0xea, 0xad, 0xf8, 0x9a, 0x9e, 0x6f, 0xd0, 0x42, 0x98, 0xa3, 0x24, 0xc3, 0x25, 0x85, 0xe9, 0xaa, + 0xa0, 0xd4, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0xa5, 0x28, 0x2e, 0x01, 0xdf, 0xe2, 0x74, 0xe7, + 0xc4, 0xbc, 0xe4, 0xd4, 0x1c, 0x0a, 0x5d, 0x8c, 0x61, 0xb3, 0x14, 0x97, 0x04, 0xba, 0xd9, 0x30, + 0x7b, 0x8d, 0x9e, 0x32, 0x72, 0x31, 0xfb, 0x16, 0xa7, 0x0b, 0x15, 0x72, 0xf1, 0xa3, 0x07, 0x98, + 0x16, 0x2e, 0xaf, 0x62, 0x7a, 0x43, 0xca, 0x88, 0x78, 0xb5, 0x30, 0xab, 0x85, 0xb2, 0xb9, 0x78, + 0x51, 0xfd, 0xab, 0x81, 0xc7, 0x10, 0x14, 0x95, 0x52, 0x06, 0xc4, 0xaa, 0x84, 0x59, 0xe6, 0xe4, + 0x76, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, + 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x3a, 0xe9, 0x99, 0x25, 0x19, + 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xd0, 0x64, 0x08, 0xa5, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x2b, + 0xe0, 0xa9, 0xb0, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x9c, 0xc6, 0x8c, 0x01, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x11, 0x7e, 0xae, 0x0d, 0x0e, 0x03, 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 { + // SoftwareUpgrade is a governance operation for initiating a software upgrade. + // + // Since: cosmos-sdk 0.46 + SoftwareUpgrade(ctx context.Context, in *MsgSoftwareUpgrade, opts ...grpc.CallOption) (*MsgSoftwareUpgradeResponse, error) + // CancelUpgrade is a governance operation for cancelling a previously + // approvid software upgrade. + // + // Since: cosmos-sdk 0.46 + CancelUpgrade(ctx context.Context, in *MsgCancelUpgrade, opts ...grpc.CallOption) (*MsgCancelUpgradeResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) SoftwareUpgrade(ctx context.Context, in *MsgSoftwareUpgrade, opts ...grpc.CallOption) (*MsgSoftwareUpgradeResponse, error) { + out := new(MsgSoftwareUpgradeResponse) + err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) CancelUpgrade(ctx context.Context, in *MsgCancelUpgrade, opts ...grpc.CallOption) (*MsgCancelUpgradeResponse, error) { + out := new(MsgCancelUpgradeResponse) + err := c.cc.Invoke(ctx, "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // SoftwareUpgrade is a governance operation for initiating a software upgrade. + // + // Since: cosmos-sdk 0.46 + SoftwareUpgrade(context.Context, *MsgSoftwareUpgrade) (*MsgSoftwareUpgradeResponse, error) + // CancelUpgrade is a governance operation for cancelling a previously + // approvid software upgrade. + // + // Since: cosmos-sdk 0.46 + CancelUpgrade(context.Context, *MsgCancelUpgrade) (*MsgCancelUpgradeResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) SoftwareUpgrade(ctx context.Context, req *MsgSoftwareUpgrade) (*MsgSoftwareUpgradeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SoftwareUpgrade not implemented") +} +func (*UnimplementedMsgServer) CancelUpgrade(ctx context.Context, req *MsgCancelUpgrade) (*MsgCancelUpgradeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CancelUpgrade not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_SoftwareUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSoftwareUpgrade) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SoftwareUpgrade(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SoftwareUpgrade(ctx, req.(*MsgSoftwareUpgrade)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_CancelUpgrade_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCancelUpgrade) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CancelUpgrade(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.upgrade.v1beta1.Msg/CancelUpgrade", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CancelUpgrade(ctx, req.(*MsgCancelUpgrade)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.upgrade.v1beta1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SoftwareUpgrade", + Handler: _Msg_SoftwareUpgrade_Handler, + }, + { + MethodName: "CancelUpgrade", + Handler: _Msg_CancelUpgrade_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/upgrade/v1beta1/tx.proto", +} + +func (m *MsgSoftwareUpgrade) 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 *MsgSoftwareUpgrade) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSoftwareUpgrade) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Plan.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 *MsgSoftwareUpgradeResponse) 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 *MsgSoftwareUpgradeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSoftwareUpgradeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgCancelUpgrade) 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 *MsgCancelUpgrade) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelUpgrade) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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 *MsgCancelUpgradeResponse) 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 *MsgCancelUpgradeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCancelUpgradeResponse) 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 *MsgSoftwareUpgrade) 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.Plan.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgSoftwareUpgradeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgCancelUpgrade) 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)) + } + return n +} + +func (m *MsgCancelUpgradeResponse) 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 *MsgSoftwareUpgrade) 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: MsgSoftwareUpgrade: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSoftwareUpgrade: 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 Plan", 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.Plan.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 *MsgSoftwareUpgradeResponse) 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: MsgSoftwareUpgradeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSoftwareUpgradeResponse: 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 *MsgCancelUpgrade) 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: MsgCancelUpgrade: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelUpgrade: 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 + 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 *MsgCancelUpgradeResponse) 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: MsgCancelUpgradeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCancelUpgradeResponse: 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/upgrade/types/upgrade.pb.go b/x/upgrade/types/upgrade.pb.go index 20fb4b2350..8a35a87290 100644 --- a/x/upgrade/types/upgrade.pb.go +++ b/x/upgrade/types/upgrade.pb.go @@ -88,6 +88,10 @@ var xxx_messageInfo_Plan proto.InternalMessageInfo // SoftwareUpgradeProposal is a gov Content type for initiating a software // upgrade. +// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov +// proposals, see MsgSoftwareUpgrade. +// +// Deprecated: Do not use. type SoftwareUpgradeProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` @@ -128,6 +132,10 @@ var xxx_messageInfo_SoftwareUpgradeProposal proto.InternalMessageInfo // CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software // upgrade. +// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov +// proposals, see MsgCancelUpgrade. +// +// Deprecated: Do not use. type CancelSoftwareUpgradeProposal struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` @@ -220,36 +228,36 @@ func init() { } var fileDescriptor_ccf2a7d4d7b48dca = []byte{ - // 450 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0x3f, 0x6f, 0xd4, 0x30, - 0x14, 0x8f, 0xdb, 0xb4, 0x50, 0x9f, 0x58, 0xcc, 0x51, 0xcc, 0x09, 0x92, 0x53, 0xc5, 0x70, 0x03, - 0x38, 0x6a, 0x91, 0x18, 0xba, 0x71, 0x1d, 0x90, 0x10, 0x48, 0x55, 0x0a, 0x0c, 0x2c, 0x95, 0x2f, - 0xf1, 0xe5, 0x2c, 0x1c, 0x3b, 0x8a, 0x9d, 0xc2, 0x7d, 0x8b, 0x4a, 0x2c, 0x8c, 0xfd, 0x38, 0x37, - 0x76, 0x44, 0x0c, 0xfc, 0xb9, 0x5b, 0xf8, 0x18, 0xc8, 0x76, 0x82, 0x4e, 0x70, 0x23, 0x53, 0xde, - 0x7b, 0xf9, 0xfd, 0x79, 0xcf, 0xef, 0xc1, 0x87, 0x99, 0xd2, 0xa5, 0xd2, 0x49, 0x53, 0x15, 0x35, - 0xcd, 0x59, 0x72, 0x71, 0x38, 0x61, 0x86, 0x1e, 0x76, 0x39, 0xa9, 0x6a, 0x65, 0x14, 0xda, 0xf7, - 0x28, 0xd2, 0x55, 0x5b, 0xd4, 0xe0, 0x5e, 0xa1, 0x54, 0x21, 0x58, 0xe2, 0x50, 0x93, 0x66, 0x9a, - 0x50, 0x39, 0xf7, 0x94, 0x41, 0xbf, 0x50, 0x85, 0x72, 0x61, 0x62, 0xa3, 0xb6, 0x1a, 0xff, 0x4d, - 0x30, 0xbc, 0x64, 0xda, 0xd0, 0xb2, 0xf2, 0x80, 0x83, 0xaf, 0x00, 0x86, 0xa7, 0x82, 0x4a, 0x84, - 0x60, 0x28, 0x69, 0xc9, 0x30, 0x18, 0x82, 0xd1, 0x5e, 0xea, 0x62, 0x74, 0x0c, 0x43, 0x8b, 0xc7, - 0x5b, 0x43, 0x30, 0xea, 0x1d, 0x0d, 0x88, 0x17, 0x23, 0x9d, 0x18, 0x79, 0xdd, 0x89, 0x8d, 0xe1, - 0xe2, 0x5b, 0x1c, 0x5c, 0x7e, 0x8f, 0x01, 0x06, 0xa9, 0xe3, 0xa0, 0x7d, 0xb8, 0x3b, 0x63, 0xbc, - 0x98, 0x19, 0xbc, 0x3d, 0x04, 0xa3, 0xed, 0xb4, 0xcd, 0xac, 0x0f, 0x97, 0x53, 0x85, 0x43, 0xef, - 0x63, 0x63, 0xf4, 0x12, 0xde, 0x69, 0x27, 0xcd, 0xcf, 0x33, 0xc1, 0x99, 0x34, 0xe7, 0xda, 0x50, - 0xc3, 0xf0, 0x8e, 0x33, 0xee, 0xff, 0x63, 0xfc, 0x4c, 0xce, 0xc7, 0x5b, 0x18, 0xa4, 0xb7, 0x3b, - 0xda, 0x89, 0x63, 0x9d, 0x59, 0xd2, 0xf1, 0xcd, 0xcf, 0x57, 0x71, 0xf0, 0xeb, 0x2a, 0x06, 0x07, - 0x9f, 0x00, 0xbc, 0x7b, 0xa6, 0xa6, 0xe6, 0x03, 0xad, 0xd9, 0x1b, 0x8f, 0x3c, 0xad, 0x55, 0xa5, - 0x34, 0x15, 0xa8, 0x0f, 0x77, 0x0c, 0x37, 0xa2, 0x1b, 0xd8, 0x27, 0x68, 0x08, 0x7b, 0x39, 0xd3, - 0x59, 0xcd, 0x2b, 0xc3, 0x95, 0x74, 0x83, 0xef, 0xa5, 0xeb, 0x25, 0xf4, 0x14, 0x86, 0x95, 0xa0, - 0xd2, 0x4d, 0xd5, 0x3b, 0xba, 0x4f, 0x36, 0x6f, 0x8a, 0xd8, 0x37, 0x1d, 0x87, 0xf6, 0x55, 0x52, - 0x87, 0x5f, 0xeb, 0x8a, 0xc2, 0x07, 0x27, 0x54, 0x66, 0x4c, 0xfc, 0xe7, 0xd6, 0xd6, 0x2c, 0x9e, - 0xc3, 0x5b, 0xaf, 0x54, 0xde, 0x08, 0xf6, 0x96, 0xd5, 0xda, 0x76, 0xbd, 0x69, 0xbb, 0x18, 0xde, - 0xb8, 0xf0, 0xbf, 0x9d, 0x58, 0x98, 0x76, 0xa9, 0x13, 0x02, 0x56, 0x68, 0xfc, 0x62, 0xf1, 0x33, - 0x0a, 0x16, 0xcb, 0x08, 0x5c, 0x2f, 0x23, 0xf0, 0x63, 0x19, 0x81, 0xcb, 0x55, 0x14, 0x5c, 0xaf, - 0xa2, 0xe0, 0xcb, 0x2a, 0x0a, 0xde, 0x3d, 0x2a, 0xb8, 0x99, 0x35, 0x13, 0x92, 0xa9, 0x32, 0x69, - 0xef, 0xda, 0x7f, 0x1e, 0xeb, 0xfc, 0x7d, 0xf2, 0xf1, 0xcf, 0x91, 0x9b, 0x79, 0xc5, 0xf4, 0x64, - 0xd7, 0xad, 0xef, 0xc9, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6d, 0x2b, 0xd1, 0x8c, 0x03, 0x03, - 0x00, 0x00, + // 453 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xbb, 0x6f, 0xd4, 0x30, + 0x18, 0x8f, 0xdb, 0xb4, 0x50, 0x9f, 0x58, 0xcc, 0x51, 0xcc, 0x09, 0x92, 0xd3, 0x89, 0xe1, 0x06, + 0x48, 0xd4, 0x22, 0x31, 0xdc, 0xc6, 0x75, 0x40, 0x42, 0x20, 0x55, 0x29, 0x30, 0xb0, 0x54, 0xbe, + 0xc4, 0x97, 0xb3, 0x70, 0xec, 0x28, 0x76, 0x0a, 0xf7, 0x5f, 0x74, 0x41, 0x62, 0xec, 0x9f, 0x73, + 0x63, 0x47, 0xc4, 0xc0, 0xe3, 0x6e, 0xe1, 0xcf, 0x40, 0xb6, 0x63, 0xc4, 0xa3, 0x23, 0x53, 0xbe, + 0xef, 0xcb, 0xef, 0xf1, 0x3d, 0x0c, 0xef, 0xe7, 0x52, 0x55, 0x52, 0xa5, 0x6d, 0x5d, 0x36, 0xa4, + 0xa0, 0xe9, 0xd9, 0xc1, 0x8c, 0x6a, 0x72, 0xe0, 0xf3, 0xa4, 0x6e, 0xa4, 0x96, 0x68, 0xdf, 0xa1, + 0x12, 0x5f, 0xed, 0x50, 0x83, 0x3b, 0xa5, 0x94, 0x25, 0xa7, 0xa9, 0x45, 0xcd, 0xda, 0x79, 0x4a, + 0xc4, 0xd2, 0x51, 0x06, 0xfd, 0x52, 0x96, 0xd2, 0x86, 0xa9, 0x89, 0xba, 0x6a, 0xfc, 0x37, 0x41, + 0xb3, 0x8a, 0x2a, 0x4d, 0xaa, 0xda, 0x01, 0x46, 0x9f, 0x01, 0x0c, 0x8f, 0x39, 0x11, 0x08, 0xc1, + 0x50, 0x90, 0x8a, 0x62, 0x30, 0x04, 0xe3, 0xbd, 0xcc, 0xc6, 0x68, 0x02, 0x43, 0x83, 0xc7, 0x5b, + 0x43, 0x30, 0xee, 0x1d, 0x0e, 0x12, 0x27, 0x96, 0x78, 0xb1, 0xe4, 0xa5, 0x17, 0x9b, 0xc2, 0xd5, + 0x97, 0x38, 0x38, 0xff, 0x1a, 0x03, 0x0c, 0x32, 0xcb, 0x41, 0xfb, 0x70, 0x77, 0x41, 0x59, 0xb9, + 0xd0, 0x78, 0x7b, 0x08, 0xc6, 0xdb, 0x59, 0x97, 0x19, 0x1f, 0x26, 0xe6, 0x12, 0x87, 0xce, 0xc7, + 0xc4, 0xe8, 0x39, 0xbc, 0xd5, 0x4d, 0x5a, 0x9c, 0xe6, 0x9c, 0x51, 0xa1, 0x4f, 0x95, 0x26, 0x9a, + 0xe2, 0x1d, 0x6b, 0xdc, 0xff, 0xc7, 0xf8, 0x89, 0x58, 0x4e, 0xb7, 0x30, 0xc8, 0x6e, 0x7a, 0xda, + 0x91, 0x65, 0x9d, 0x18, 0xd2, 0xe4, 0xfa, 0xc7, 0x8b, 0x38, 0xf8, 0x71, 0x11, 0x83, 0xd1, 0x07, + 0x00, 0x6f, 0x9f, 0xc8, 0xb9, 0x7e, 0x47, 0x1a, 0xfa, 0xca, 0x21, 0x8f, 0x1b, 0x59, 0x4b, 0x45, + 0x38, 0xea, 0xc3, 0x1d, 0xcd, 0x34, 0xf7, 0x03, 0xbb, 0x04, 0x0d, 0x61, 0xaf, 0xa0, 0x2a, 0x6f, + 0x58, 0xad, 0x99, 0x14, 0x76, 0xf0, 0xbd, 0xec, 0xf7, 0x12, 0x7a, 0x0c, 0xc3, 0x9a, 0x13, 0x61, + 0xa7, 0xea, 0x1d, 0xde, 0x4d, 0xae, 0xbe, 0x54, 0x62, 0x76, 0x3a, 0x0d, 0xcd, 0x56, 0x32, 0x8b, + 0x9f, 0x40, 0xdf, 0x15, 0x06, 0xa3, 0x1c, 0xde, 0x3b, 0x22, 0x22, 0xa7, 0xfc, 0x3f, 0x37, 0xf7, + 0x87, 0xc9, 0x53, 0x78, 0xe3, 0x85, 0x2c, 0x5a, 0x4e, 0x5f, 0xd3, 0x46, 0x99, 0xce, 0xaf, 0xba, + 0x30, 0x86, 0xd7, 0xce, 0xdc, 0x6f, 0x2b, 0x17, 0x66, 0x3e, 0xb5, 0x5b, 0x04, 0x46, 0x6a, 0xfa, + 0x6c, 0xf5, 0x3d, 0x0a, 0x56, 0xeb, 0x08, 0x5c, 0xae, 0x23, 0xf0, 0x6d, 0x1d, 0x81, 0xf3, 0x4d, + 0x14, 0x5c, 0x6e, 0xa2, 0xe0, 0xd3, 0x26, 0x0a, 0xde, 0x3c, 0x28, 0x99, 0x5e, 0xb4, 0xb3, 0x24, + 0x97, 0x55, 0xda, 0xbd, 0x6d, 0xf7, 0x79, 0xa8, 0x8a, 0xb7, 0xe9, 0xfb, 0x5f, 0x0f, 0x5d, 0x2f, + 0x6b, 0xaa, 0x66, 0xbb, 0xf6, 0x84, 0x8f, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x55, 0x74, 0xf2, + 0xb7, 0x07, 0x03, 0x00, 0x00, } func (this *Plan) Equal(that interface{}) bool {