From 003d2ff2a7083629db76f59adcbe33e77cb4303e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 21:32:00 +0000 Subject: [PATCH] refactor: remove comet info from consensus as it will be stored in context for v2 (backport #21120) (#21131) Co-authored-by: Marko --- api/cosmos/consensus/v1/query.pulsar.go | 996 +----------- api/cosmos/consensus/v1/query_grpc.pb.go | 41 +- api/cosmos/consensus/v1/tx.pulsar.go | 1374 +---------------- api/cosmos/consensus/v1/tx_grpc.pb.go | 39 - server/v2/cometbft/abci.go | 19 - server/v2/stf/stf.go | 6 +- x/auth/ante/expected_keepers.go | 1 - .../ante/testutil/expected_keepers_mocks.go | 15 - x/consensus/keeper/keeper.go | 33 - x/consensus/keeper/keeper_test.go | 51 - .../proto/cosmos/consensus/v1/query.proto | 12 - .../proto/cosmos/consensus/v1/tx.proto | 27 - x/consensus/types/query.pb.go | 385 +---- x/consensus/types/tx.pb.go | 639 +------- x/staking/testutil/expected_keepers_mocks.go | 15 - x/staking/types/expected_keepers.go | 1 - 16 files changed, 151 insertions(+), 3503 deletions(-) diff --git a/api/cosmos/consensus/v1/query.pulsar.go b/api/cosmos/consensus/v1/query.pulsar.go index ca4bad5967..734ec7f702 100644 --- a/api/cosmos/consensus/v1/query.pulsar.go +++ b/api/cosmos/consensus/v1/query.pulsar.go @@ -14,797 +14,6 @@ import ( sync "sync" ) -var ( - md_QueryGetCometInfoRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_consensus_v1_query_proto_init() - md_QueryGetCometInfoRequest = File_cosmos_consensus_v1_query_proto.Messages().ByName("QueryGetCometInfoRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetCometInfoRequest)(nil) - -type fastReflection_QueryGetCometInfoRequest QueryGetCometInfoRequest - -func (x *QueryGetCometInfoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetCometInfoRequest)(x) -} - -func (x *QueryGetCometInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetCometInfoRequest_messageType fastReflection_QueryGetCometInfoRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetCometInfoRequest_messageType{} - -type fastReflection_QueryGetCometInfoRequest_messageType struct{} - -func (x fastReflection_QueryGetCometInfoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetCometInfoRequest)(nil) -} -func (x fastReflection_QueryGetCometInfoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetCometInfoRequest) -} -func (x fastReflection_QueryGetCometInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetCometInfoRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetCometInfoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetCometInfoRequest -} - -// 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_QueryGetCometInfoRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGetCometInfoRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetCometInfoRequest) New() protoreflect.Message { - return new(fastReflection_QueryGetCometInfoRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetCometInfoRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGetCometInfoRequest)(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_QueryGetCometInfoRequest) 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_QueryGetCometInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest 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_QueryGetCometInfoRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest 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_QueryGetCometInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest 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_QueryGetCometInfoRequest) 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.consensus.v1.QueryGetCometInfoRequest")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest 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_QueryGetCometInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest 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_QueryGetCometInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest 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_QueryGetCometInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.QueryGetCometInfoRequest", 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_QueryGetCometInfoRequest) 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_QueryGetCometInfoRequest) 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_QueryGetCometInfoRequest) 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_QueryGetCometInfoRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetCometInfoRequest) - 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().(*QueryGetCometInfoRequest) - 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().(*QueryGetCometInfoRequest) - 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: QueryGetCometInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetCometInfoRequest: 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_QueryGetCometInfoResponse protoreflect.MessageDescriptor - fd_QueryGetCometInfoResponse_comet_info protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_consensus_v1_query_proto_init() - md_QueryGetCometInfoResponse = File_cosmos_consensus_v1_query_proto.Messages().ByName("QueryGetCometInfoResponse") - fd_QueryGetCometInfoResponse_comet_info = md_QueryGetCometInfoResponse.Fields().ByName("comet_info") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetCometInfoResponse)(nil) - -type fastReflection_QueryGetCometInfoResponse QueryGetCometInfoResponse - -func (x *QueryGetCometInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetCometInfoResponse)(x) -} - -func (x *QueryGetCometInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetCometInfoResponse_messageType fastReflection_QueryGetCometInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetCometInfoResponse_messageType{} - -type fastReflection_QueryGetCometInfoResponse_messageType struct{} - -func (x fastReflection_QueryGetCometInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetCometInfoResponse)(nil) -} -func (x fastReflection_QueryGetCometInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetCometInfoResponse) -} -func (x fastReflection_QueryGetCometInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetCometInfoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetCometInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetCometInfoResponse -} - -// 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_QueryGetCometInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGetCometInfoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetCometInfoResponse) New() protoreflect.Message { - return new(fastReflection_QueryGetCometInfoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetCometInfoResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGetCometInfoResponse)(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_QueryGetCometInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CometInfo != nil { - value := protoreflect.ValueOfMessage(x.CometInfo.ProtoReflect()) - if !f(fd_QueryGetCometInfoResponse_comet_info, 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_QueryGetCometInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info": - return x.CometInfo != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse 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_QueryGetCometInfoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info": - x.CometInfo = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse 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_QueryGetCometInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info": - value := x.CometInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse 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_QueryGetCometInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info": - x.CometInfo = value.Message().Interface().(*CometInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse 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_QueryGetCometInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info": - if x.CometInfo == nil { - x.CometInfo = new(CometInfo) - } - return protoreflect.ValueOfMessage(x.CometInfo.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse 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_QueryGetCometInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info": - m := new(CometInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse 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_QueryGetCometInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.QueryGetCometInfoResponse", 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_QueryGetCometInfoResponse) 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_QueryGetCometInfoResponse) 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_QueryGetCometInfoResponse) 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_QueryGetCometInfoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetCometInfoResponse) - 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.CometInfo != nil { - l = options.Size(x.CometInfo) - 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().(*QueryGetCometInfoResponse) - 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.CometInfo != nil { - encoded, err := options.Marshal(x.CometInfo) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetCometInfoResponse) - 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: QueryGetCometInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetCometInfoResponse: 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 CometInfo", 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.CometInfo == nil { - x.CometInfo = &CometInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CometInfo); 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_QueryParamsRequest protoreflect.MessageDescriptor ) @@ -823,7 +32,7 @@ func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[2] + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1181,7 +390,7 @@ func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[3] + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1611,70 +820,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// QueryCometInfoRequest defines the request type for querying x/consensus comet info. -type QueryGetCometInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryGetCometInfoRequest) Reset() { - *x = QueryGetCometInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetCometInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetCometInfoRequest) ProtoMessage() {} - -// Deprecated: Use QueryGetCometInfoRequest.ProtoReflect.Descriptor instead. -func (*QueryGetCometInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{0} -} - -// QueryCometInfoResponse defines the response type for querying x/consensus comet info. -type QueryGetCometInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // comet_info is the comet info of the x/consensus module. - CometInfo *CometInfo `protobuf:"bytes,1,opt,name=comet_info,json=cometInfo,proto3" json:"comet_info,omitempty"` -} - -func (x *QueryGetCometInfoResponse) Reset() { - *x = QueryGetCometInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetCometInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetCometInfoResponse) ProtoMessage() {} - -// Deprecated: Use QueryGetCometInfoResponse.ProtoReflect.Descriptor instead. -func (*QueryGetCometInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryGetCometInfoResponse) GetCometInfo() *CometInfo { - if x != nil { - return x.CometInfo - } - return nil -} - // QueryParamsRequest defines the request type for querying x/consensus parameters. type QueryParamsRequest struct { state protoimpl.MessageState @@ -1685,7 +830,7 @@ type QueryParamsRequest struct { func (x *QueryParamsRequest) Reset() { *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[2] + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1699,7 +844,7 @@ func (*QueryParamsRequest) ProtoMessage() {} // Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{2} + return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{0} } // QueryParamsResponse defines the response type for querying x/consensus parameters. @@ -1717,7 +862,7 @@ type QueryParamsResponse struct { func (x *QueryParamsResponse) Reset() { *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[3] + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1731,7 +876,7 @@ func (*QueryParamsResponse) ProtoMessage() {} // Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{3} + return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{1} } func (x *QueryParamsResponse) GetParams() *v1.ConsensusParams { @@ -1753,50 +898,35 @@ var file_cosmos_consensus_v1_query_proto_rawDesc = []byte{ 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1a, 0x0a, 0x18, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0xf9, 0x01, 0x0a, 0x05, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x80, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, - 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x51, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, + 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x32, 0x8a, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x80, 0x01, 0x0a, + 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, - 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, - 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, + 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, + 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, + 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1811,27 +941,21 @@ func file_cosmos_consensus_v1_query_proto_rawDescGZIP() []byte { return file_cosmos_consensus_v1_query_proto_rawDescData } -var file_cosmos_consensus_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cosmos_consensus_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_cosmos_consensus_v1_query_proto_goTypes = []interface{}{ - (*QueryGetCometInfoRequest)(nil), // 0: cosmos.consensus.v1.QueryGetCometInfoRequest - (*QueryGetCometInfoResponse)(nil), // 1: cosmos.consensus.v1.QueryGetCometInfoResponse - (*QueryParamsRequest)(nil), // 2: cosmos.consensus.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 3: cosmos.consensus.v1.QueryParamsResponse - (*CometInfo)(nil), // 4: cosmos.consensus.v1.CometInfo - (*v1.ConsensusParams)(nil), // 5: cometbft.types.v1.ConsensusParams + (*QueryParamsRequest)(nil), // 0: cosmos.consensus.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: cosmos.consensus.v1.QueryParamsResponse + (*v1.ConsensusParams)(nil), // 2: cometbft.types.v1.ConsensusParams } var file_cosmos_consensus_v1_query_proto_depIdxs = []int32{ - 4, // 0: cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info:type_name -> cosmos.consensus.v1.CometInfo - 5, // 1: cosmos.consensus.v1.QueryParamsResponse.params:type_name -> cometbft.types.v1.ConsensusParams - 2, // 2: cosmos.consensus.v1.Query.Params:input_type -> cosmos.consensus.v1.QueryParamsRequest - 0, // 3: cosmos.consensus.v1.Query.GetCometInfo:input_type -> cosmos.consensus.v1.QueryGetCometInfoRequest - 3, // 4: cosmos.consensus.v1.Query.Params:output_type -> cosmos.consensus.v1.QueryParamsResponse - 1, // 5: cosmos.consensus.v1.Query.GetCometInfo:output_type -> cosmos.consensus.v1.QueryGetCometInfoResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] 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 + 2, // 0: cosmos.consensus.v1.QueryParamsResponse.params:type_name -> cometbft.types.v1.ConsensusParams + 0, // 1: cosmos.consensus.v1.Query.Params:input_type -> cosmos.consensus.v1.QueryParamsRequest + 1, // 2: cosmos.consensus.v1.Query.Params:output_type -> cosmos.consensus.v1.QueryParamsResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_cosmos_consensus_v1_query_proto_init() } @@ -1842,30 +966,6 @@ func file_cosmos_consensus_v1_query_proto_init() { file_cosmos_consensus_v1_consensus_proto_init() if !protoimpl.UnsafeEnabled { file_cosmos_consensus_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetCometInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_consensus_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetCometInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_consensus_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { case 0: return &v.state @@ -1877,7 +977,7 @@ func file_cosmos_consensus_v1_query_proto_init() { return nil } } - file_cosmos_consensus_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_consensus_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsResponse); i { case 0: return &v.state @@ -1896,7 +996,7 @@ func file_cosmos_consensus_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_consensus_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 2, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/consensus/v1/query_grpc.pb.go b/api/cosmos/consensus/v1/query_grpc.pb.go index ce898bd952..03694d673f 100644 --- a/api/cosmos/consensus/v1/query_grpc.pb.go +++ b/api/cosmos/consensus/v1/query_grpc.pb.go @@ -21,8 +21,7 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/cosmos.consensus.v1.Query/Params" - Query_GetCometInfo_FullMethodName = "/cosmos.consensus.v1.Query/GetCometInfo" + Query_Params_FullMethodName = "/cosmos.consensus.v1.Query/Params" ) // QueryClient is the client API for Query service. @@ -31,8 +30,6 @@ const ( type QueryClient interface { // Params queries the parameters of x/consensus module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // CometInfo queries the comet info of x/consensus module. - GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) } type queryClient struct { @@ -52,23 +49,12 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) { - out := new(QueryGetCometInfoResponse) - err := c.cc.Invoke(ctx, Query_GetCometInfo_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { // Params queries the parameters of x/consensus module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // CometInfo queries the comet info of x/consensus module. - GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) mustEmbedUnimplementedQueryServer() } @@ -79,9 +65,6 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (UnimplementedQueryServer) GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCometInfo not implemented") -} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -113,24 +96,6 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_GetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetCometInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetCometInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_GetCometInfo_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetCometInfo(ctx, req.(*QueryGetCometInfoRequest)) - } - 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) @@ -142,10 +107,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, - { - MethodName: "GetCometInfo", - Handler: _Query_GetCometInfo_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/consensus/v1/query.proto", diff --git a/api/cosmos/consensus/v1/tx.pulsar.go b/api/cosmos/consensus/v1/tx.pulsar.go index def6529fc1..12e85d0769 100644 --- a/api/cosmos/consensus/v1/tx.pulsar.go +++ b/api/cosmos/consensus/v1/tx.pulsar.go @@ -2,7 +2,7 @@ package consensusv1 import ( - v11 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/abci/v1" + _ "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/abci/v1" v1 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/types/v1" _ "cosmossdk.io/api/amino" _ "cosmossdk.io/api/cosmos/msg/v1" @@ -1267,1131 +1267,6 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } } -var _ protoreflect.List = (*_MsgSetCometInfo_2_list)(nil) - -type _MsgSetCometInfo_2_list struct { - list *[]*v11.Misbehavior -} - -func (x *_MsgSetCometInfo_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgSetCometInfo_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgSetCometInfo_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v11.Misbehavior) - (*x.list)[i] = concreteValue -} - -func (x *_MsgSetCometInfo_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v11.Misbehavior) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgSetCometInfo_2_list) AppendMutable() protoreflect.Value { - v := new(v11.Misbehavior) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSetCometInfo_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgSetCometInfo_2_list) NewElement() protoreflect.Value { - v := new(v11.Misbehavior) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSetCometInfo_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgSetCometInfo protoreflect.MessageDescriptor - fd_MsgSetCometInfo_authority protoreflect.FieldDescriptor - fd_MsgSetCometInfo_evidence protoreflect.FieldDescriptor - fd_MsgSetCometInfo_validators_hash protoreflect.FieldDescriptor - fd_MsgSetCometInfo_proposer_address protoreflect.FieldDescriptor - fd_MsgSetCometInfo_last_commit protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_consensus_v1_tx_proto_init() - md_MsgSetCometInfo = File_cosmos_consensus_v1_tx_proto.Messages().ByName("MsgSetCometInfo") - fd_MsgSetCometInfo_authority = md_MsgSetCometInfo.Fields().ByName("authority") - fd_MsgSetCometInfo_evidence = md_MsgSetCometInfo.Fields().ByName("evidence") - fd_MsgSetCometInfo_validators_hash = md_MsgSetCometInfo.Fields().ByName("validators_hash") - fd_MsgSetCometInfo_proposer_address = md_MsgSetCometInfo.Fields().ByName("proposer_address") - fd_MsgSetCometInfo_last_commit = md_MsgSetCometInfo.Fields().ByName("last_commit") -} - -var _ protoreflect.Message = (*fastReflection_MsgSetCometInfo)(nil) - -type fastReflection_MsgSetCometInfo MsgSetCometInfo - -func (x *MsgSetCometInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSetCometInfo)(x) -} - -func (x *MsgSetCometInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSetCometInfo_messageType fastReflection_MsgSetCometInfo_messageType -var _ protoreflect.MessageType = fastReflection_MsgSetCometInfo_messageType{} - -type fastReflection_MsgSetCometInfo_messageType struct{} - -func (x fastReflection_MsgSetCometInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSetCometInfo)(nil) -} -func (x fastReflection_MsgSetCometInfo_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSetCometInfo) -} -func (x fastReflection_MsgSetCometInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSetCometInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSetCometInfo) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSetCometInfo -} - -// 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_MsgSetCometInfo) Type() protoreflect.MessageType { - return _fastReflection_MsgSetCometInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSetCometInfo) New() protoreflect.Message { - return new(fastReflection_MsgSetCometInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSetCometInfo) Interface() protoreflect.ProtoMessage { - return (*MsgSetCometInfo)(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_MsgSetCometInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgSetCometInfo_authority, value) { - return - } - } - if len(x.Evidence) != 0 { - value := protoreflect.ValueOfList(&_MsgSetCometInfo_2_list{list: &x.Evidence}) - if !f(fd_MsgSetCometInfo_evidence, value) { - return - } - } - if len(x.ValidatorsHash) != 0 { - value := protoreflect.ValueOfBytes(x.ValidatorsHash) - if !f(fd_MsgSetCometInfo_validators_hash, value) { - return - } - } - if len(x.ProposerAddress) != 0 { - value := protoreflect.ValueOfBytes(x.ProposerAddress) - if !f(fd_MsgSetCometInfo_proposer_address, value) { - return - } - } - if x.LastCommit != nil { - value := protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) - if !f(fd_MsgSetCometInfo_last_commit, 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_MsgSetCometInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.consensus.v1.MsgSetCometInfo.authority": - return x.Authority != "" - case "cosmos.consensus.v1.MsgSetCometInfo.evidence": - return len(x.Evidence) != 0 - case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": - return len(x.ValidatorsHash) != 0 - case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": - return len(x.ProposerAddress) != 0 - case "cosmos.consensus.v1.MsgSetCometInfo.last_commit": - return x.LastCommit != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo 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_MsgSetCometInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.consensus.v1.MsgSetCometInfo.authority": - x.Authority = "" - case "cosmos.consensus.v1.MsgSetCometInfo.evidence": - x.Evidence = nil - case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": - x.ValidatorsHash = nil - case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": - x.ProposerAddress = nil - case "cosmos.consensus.v1.MsgSetCometInfo.last_commit": - x.LastCommit = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo 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_MsgSetCometInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.consensus.v1.MsgSetCometInfo.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "cosmos.consensus.v1.MsgSetCometInfo.evidence": - if len(x.Evidence) == 0 { - return protoreflect.ValueOfList(&_MsgSetCometInfo_2_list{}) - } - listValue := &_MsgSetCometInfo_2_list{list: &x.Evidence} - return protoreflect.ValueOfList(listValue) - case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": - value := x.ValidatorsHash - return protoreflect.ValueOfBytes(value) - case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": - value := x.ProposerAddress - return protoreflect.ValueOfBytes(value) - case "cosmos.consensus.v1.MsgSetCometInfo.last_commit": - value := x.LastCommit - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo 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_MsgSetCometInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.consensus.v1.MsgSetCometInfo.authority": - x.Authority = value.Interface().(string) - case "cosmos.consensus.v1.MsgSetCometInfo.evidence": - lv := value.List() - clv := lv.(*_MsgSetCometInfo_2_list) - x.Evidence = *clv.list - case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": - x.ValidatorsHash = value.Bytes() - case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": - x.ProposerAddress = value.Bytes() - case "cosmos.consensus.v1.MsgSetCometInfo.last_commit": - x.LastCommit = value.Message().Interface().(*v11.CommitInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo 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_MsgSetCometInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.consensus.v1.MsgSetCometInfo.evidence": - if x.Evidence == nil { - x.Evidence = []*v11.Misbehavior{} - } - value := &_MsgSetCometInfo_2_list{list: &x.Evidence} - return protoreflect.ValueOfList(value) - case "cosmos.consensus.v1.MsgSetCometInfo.last_commit": - if x.LastCommit == nil { - x.LastCommit = new(v11.CommitInfo) - } - return protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) - case "cosmos.consensus.v1.MsgSetCometInfo.authority": - panic(fmt.Errorf("field authority of message cosmos.consensus.v1.MsgSetCometInfo is not mutable")) - case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": - panic(fmt.Errorf("field validators_hash of message cosmos.consensus.v1.MsgSetCometInfo is not mutable")) - case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": - panic(fmt.Errorf("field proposer_address of message cosmos.consensus.v1.MsgSetCometInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo 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_MsgSetCometInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.consensus.v1.MsgSetCometInfo.authority": - return protoreflect.ValueOfString("") - case "cosmos.consensus.v1.MsgSetCometInfo.evidence": - list := []*v11.Misbehavior{} - return protoreflect.ValueOfList(&_MsgSetCometInfo_2_list{list: &list}) - case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": - return protoreflect.ValueOfBytes(nil) - case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": - return protoreflect.ValueOfBytes(nil) - case "cosmos.consensus.v1.MsgSetCometInfo.last_commit": - m := new(v11.CommitInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo 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_MsgSetCometInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.MsgSetCometInfo", 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_MsgSetCometInfo) 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_MsgSetCometInfo) 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_MsgSetCometInfo) 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_MsgSetCometInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSetCometInfo) - 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 len(x.Evidence) > 0 { - for _, e := range x.Evidence { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.ValidatorsHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ProposerAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.LastCommit != nil { - l = options.Size(x.LastCommit) - 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().(*MsgSetCometInfo) - 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.LastCommit != nil { - encoded, err := options.Marshal(x.LastCommit) - 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] = 0x2a - } - if len(x.ProposerAddress) > 0 { - i -= len(x.ProposerAddress) - copy(dAtA[i:], x.ProposerAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProposerAddress))) - i-- - dAtA[i] = 0x22 - } - if len(x.ValidatorsHash) > 0 { - i -= len(x.ValidatorsHash) - copy(dAtA[i:], x.ValidatorsHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorsHash))) - i-- - dAtA[i] = 0x1a - } - if len(x.Evidence) > 0 { - for iNdEx := len(x.Evidence) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Evidence[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if 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().(*MsgSetCometInfo) - 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: MsgSetCometInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetCometInfo: 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 Evidence", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Evidence = append(x.Evidence, &v11.Misbehavior{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence[len(x.Evidence)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) - } - var byteLen 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++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - 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.ValidatorsHash = append(x.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) - if x.ValidatorsHash == nil { - x.ValidatorsHash = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) - } - var byteLen 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++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - 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.ProposerAddress = append(x.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) - if x.ProposerAddress == nil { - x.ProposerAddress = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastCommit", 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.LastCommit == nil { - x.LastCommit = &v11.CommitInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastCommit); 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_MsgSetCometInfoResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_consensus_v1_tx_proto_init() - md_MsgSetCometInfoResponse = File_cosmos_consensus_v1_tx_proto.Messages().ByName("MsgSetCometInfoResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgSetCometInfoResponse)(nil) - -type fastReflection_MsgSetCometInfoResponse MsgSetCometInfoResponse - -func (x *MsgSetCometInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSetCometInfoResponse)(x) -} - -func (x *MsgSetCometInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSetCometInfoResponse_messageType fastReflection_MsgSetCometInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSetCometInfoResponse_messageType{} - -type fastReflection_MsgSetCometInfoResponse_messageType struct{} - -func (x fastReflection_MsgSetCometInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSetCometInfoResponse)(nil) -} -func (x fastReflection_MsgSetCometInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSetCometInfoResponse) -} -func (x fastReflection_MsgSetCometInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSetCometInfoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSetCometInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSetCometInfoResponse -} - -// 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_MsgSetCometInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSetCometInfoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSetCometInfoResponse) New() protoreflect.Message { - return new(fastReflection_MsgSetCometInfoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSetCometInfoResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSetCometInfoResponse)(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_MsgSetCometInfoResponse) 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_MsgSetCometInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse 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_MsgSetCometInfoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse 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_MsgSetCometInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse 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_MsgSetCometInfoResponse) 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.consensus.v1.MsgSetCometInfoResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse 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_MsgSetCometInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse 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_MsgSetCometInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse 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_MsgSetCometInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.MsgSetCometInfoResponse", 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_MsgSetCometInfoResponse) 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_MsgSetCometInfoResponse) 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_MsgSetCometInfoResponse) 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_MsgSetCometInfoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSetCometInfoResponse) - 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().(*MsgSetCometInfoResponse) - 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().(*MsgSetCometInfoResponse) - 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: MsgSetCometInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetCometInfoResponse: 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, - } -} - // Since: cosmos-sdk 0.47 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -2529,106 +1404,6 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_cosmos_consensus_v1_tx_proto_rawDescGZIP(), []int{1} } -// MsgCometInfo is the Msg/CometInfo request type. -type MsgSetCometInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // evidence is the misbehaviour evidence to submit. - Evidence []*v11.Misbehavior `protobuf:"bytes,2,rep,name=evidence,proto3" json:"evidence,omitempty"` - // validators_hash is the hash of the current validator set. - ValidatorsHash []byte `protobuf:"bytes,3,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` - // proposer_address is the address of the current proposer. - ProposerAddress []byte `protobuf:"bytes,4,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` - // last_commit is the last commit info. - LastCommit *v11.CommitInfo `protobuf:"bytes,5,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` -} - -func (x *MsgSetCometInfo) Reset() { - *x = MsgSetCometInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSetCometInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSetCometInfo) ProtoMessage() {} - -// Deprecated: Use MsgSetCometInfo.ProtoReflect.Descriptor instead. -func (*MsgSetCometInfo) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgSetCometInfo) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgSetCometInfo) GetEvidence() []*v11.Misbehavior { - if x != nil { - return x.Evidence - } - return nil -} - -func (x *MsgSetCometInfo) GetValidatorsHash() []byte { - if x != nil { - return x.ValidatorsHash - } - return nil -} - -func (x *MsgSetCometInfo) GetProposerAddress() []byte { - if x != nil { - return x.ProposerAddress - } - return nil -} - -func (x *MsgSetCometInfo) GetLastCommit() *v11.CommitInfo { - if x != nil { - return x.LastCommit - } - return nil -} - -// MsgCometInfoResponse defines the response -type MsgSetCometInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgSetCometInfoResponse) Reset() { - *x = MsgSetCometInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSetCometInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSetCometInfoResponse) ProtoMessage() {} - -// Deprecated: Use MsgSetCometInfoResponse.ProtoReflect.Descriptor instead. -func (*MsgSetCometInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_tx_proto_rawDescGZIP(), []int{3} -} - var File_cosmos_consensus_v1_tx_proto protoreflect.FileDescriptor var file_cosmos_consensus_v1_tx_proto_rawDesc = []byte{ @@ -2680,57 +1455,28 @@ var file_cosmos_consensus_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xcf, 0x02, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6f, - 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 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, - 0x39, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x61, 0x62, 0x63, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, - 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3d, - 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x61, - 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x3a, 0x36, 0x82, - 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, - 0x2a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x63, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x65, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, - 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x32, 0xe9, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x77, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0xca, 0xb4, - 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, - 0x37, 0x12, 0x62, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, - 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6f, - 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xc2, 0x01, 0x0a, - 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, - 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x73, 0x65, 0x32, 0x85, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x77, 0x0a, 0x0c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x13, 0xca, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, + 0x30, 0x2e, 0x34, 0x37, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xc2, 0x01, 0x0a, 0x17, + 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2745,39 +1491,31 @@ func file_cosmos_consensus_v1_tx_proto_rawDescGZIP() []byte { return file_cosmos_consensus_v1_tx_proto_rawDescData } -var file_cosmos_consensus_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_cosmos_consensus_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_cosmos_consensus_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: cosmos.consensus.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: cosmos.consensus.v1.MsgUpdateParamsResponse - (*MsgSetCometInfo)(nil), // 2: cosmos.consensus.v1.MsgSetCometInfo - (*MsgSetCometInfoResponse)(nil), // 3: cosmos.consensus.v1.MsgSetCometInfoResponse - (*v1.BlockParams)(nil), // 4: cometbft.types.v1.BlockParams - (*v1.EvidenceParams)(nil), // 5: cometbft.types.v1.EvidenceParams - (*v1.ValidatorParams)(nil), // 6: cometbft.types.v1.ValidatorParams - (*v1.ABCIParams)(nil), // 7: cometbft.types.v1.ABCIParams - (*v1.SynchronyParams)(nil), // 8: cometbft.types.v1.SynchronyParams - (*v1.FeatureParams)(nil), // 9: cometbft.types.v1.FeatureParams - (*v11.Misbehavior)(nil), // 10: cometbft.abci.v1.Misbehavior - (*v11.CommitInfo)(nil), // 11: cometbft.abci.v1.CommitInfo + (*v1.BlockParams)(nil), // 2: cometbft.types.v1.BlockParams + (*v1.EvidenceParams)(nil), // 3: cometbft.types.v1.EvidenceParams + (*v1.ValidatorParams)(nil), // 4: cometbft.types.v1.ValidatorParams + (*v1.ABCIParams)(nil), // 5: cometbft.types.v1.ABCIParams + (*v1.SynchronyParams)(nil), // 6: cometbft.types.v1.SynchronyParams + (*v1.FeatureParams)(nil), // 7: cometbft.types.v1.FeatureParams } var file_cosmos_consensus_v1_tx_proto_depIdxs = []int32{ - 4, // 0: cosmos.consensus.v1.MsgUpdateParams.block:type_name -> cometbft.types.v1.BlockParams - 5, // 1: cosmos.consensus.v1.MsgUpdateParams.evidence:type_name -> cometbft.types.v1.EvidenceParams - 6, // 2: cosmos.consensus.v1.MsgUpdateParams.validator:type_name -> cometbft.types.v1.ValidatorParams - 7, // 3: cosmos.consensus.v1.MsgUpdateParams.abci:type_name -> cometbft.types.v1.ABCIParams - 8, // 4: cosmos.consensus.v1.MsgUpdateParams.synchrony:type_name -> cometbft.types.v1.SynchronyParams - 9, // 5: cosmos.consensus.v1.MsgUpdateParams.feature:type_name -> cometbft.types.v1.FeatureParams - 10, // 6: cosmos.consensus.v1.MsgSetCometInfo.evidence:type_name -> cometbft.abci.v1.Misbehavior - 11, // 7: cosmos.consensus.v1.MsgSetCometInfo.last_commit:type_name -> cometbft.abci.v1.CommitInfo - 0, // 8: cosmos.consensus.v1.Msg.UpdateParams:input_type -> cosmos.consensus.v1.MsgUpdateParams - 2, // 9: cosmos.consensus.v1.Msg.SetCometInfo:input_type -> cosmos.consensus.v1.MsgSetCometInfo - 1, // 10: cosmos.consensus.v1.Msg.UpdateParams:output_type -> cosmos.consensus.v1.MsgUpdateParamsResponse - 3, // 11: cosmos.consensus.v1.Msg.SetCometInfo:output_type -> cosmos.consensus.v1.MsgSetCometInfoResponse - 10, // [10:12] is the sub-list for method output_type - 8, // [8:10] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 2, // 0: cosmos.consensus.v1.MsgUpdateParams.block:type_name -> cometbft.types.v1.BlockParams + 3, // 1: cosmos.consensus.v1.MsgUpdateParams.evidence:type_name -> cometbft.types.v1.EvidenceParams + 4, // 2: cosmos.consensus.v1.MsgUpdateParams.validator:type_name -> cometbft.types.v1.ValidatorParams + 5, // 3: cosmos.consensus.v1.MsgUpdateParams.abci:type_name -> cometbft.types.v1.ABCIParams + 6, // 4: cosmos.consensus.v1.MsgUpdateParams.synchrony:type_name -> cometbft.types.v1.SynchronyParams + 7, // 5: cosmos.consensus.v1.MsgUpdateParams.feature:type_name -> cometbft.types.v1.FeatureParams + 0, // 6: cosmos.consensus.v1.Msg.UpdateParams:input_type -> cosmos.consensus.v1.MsgUpdateParams + 1, // 7: cosmos.consensus.v1.Msg.UpdateParams:output_type -> cosmos.consensus.v1.MsgUpdateParamsResponse + 7, // [7:8] is the sub-list for method output_type + 6, // [6:7] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_cosmos_consensus_v1_tx_proto_init() } @@ -2810,30 +1548,6 @@ func file_cosmos_consensus_v1_tx_proto_init() { return nil } } - file_cosmos_consensus_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSetCometInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_consensus_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSetCometInfoResponse); 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{ @@ -2841,7 +1555,7 @@ func file_cosmos_consensus_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_consensus_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 2, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/consensus/v1/tx_grpc.pb.go b/api/cosmos/consensus/v1/tx_grpc.pb.go index 50dfbe9de1..14f2e80d20 100644 --- a/api/cosmos/consensus/v1/tx_grpc.pb.go +++ b/api/cosmos/consensus/v1/tx_grpc.pb.go @@ -22,7 +22,6 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_UpdateParams_FullMethodName = "/cosmos.consensus.v1.Msg/UpdateParams" - Msg_SetCometInfo_FullMethodName = "/cosmos.consensus.v1.Msg/SetCometInfo" ) // MsgClient is the client API for Msg service. @@ -32,8 +31,6 @@ type MsgClient interface { // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // SetCometInfo defines how to set the comet info for the x/consensus module. - SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error) } type msgClient struct { @@ -53,15 +50,6 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error) { - out := new(MsgSetCometInfoResponse) - err := c.cc.Invoke(ctx, Msg_SetCometInfo_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -69,8 +57,6 @@ type MsgServer interface { // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // SetCometInfo defines how to set the comet info for the x/consensus module. - SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) mustEmbedUnimplementedMsgServer() } @@ -81,9 +67,6 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (UnimplementedMsgServer) SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetCometInfo not implemented") -} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -115,24 +98,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_SetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSetCometInfo) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetCometInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_SetCometInfo_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetCometInfo(ctx, req.(*MsgSetCometInfo)) - } - 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) @@ -144,10 +109,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, - { - MethodName: "SetCometInfo", - Handler: _Msg_SetCometInfo_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/consensus/v1/tx.proto", diff --git a/server/v2/cometbft/abci.go b/server/v2/cometbft/abci.go index 65bbbbd15b..cf6a0f5b60 100644 --- a/server/v2/cometbft/abci.go +++ b/server/v2/cometbft/abci.go @@ -400,24 +400,6 @@ func (c *Consensus[T]) FinalizeBlock( return nil, err } - // TODO evaluate this approach vs. service using context. - // cometInfo := &consensustypes.MsgUpdateCometInfo{ - // Authority: c.consensusAuthority, - // CometInfo: &consensustypes.CometInfo{ - // Evidence: req.Misbehavior, - // ValidatorsHash: req.NextValidatorsHash, - // ProposerAddress: req.ProposerAddress, - // LastCommit: req.DecidedLastCommit, - // }, - // } - // - // ctx = context.WithValue(ctx, corecontext.CometInfoKey, &comet.Info{ - // Evidence: sdktypes.ToSDKEvidence(req.Misbehavior), - // ValidatorsHash: req.NextValidatorsHash, - // ProposerAddress: req.ProposerAddress, - // LastCommit: sdktypes.ToSDKCommitInfo(req.DecidedLastCommit), - // }) - // we don't need to deliver the block in the genesis block if req.Height == int64(c.initialHeight) { appHash, err := c.store.Commit(store.NewChangeset()) @@ -450,7 +432,6 @@ func (c *Consensus[T]) FinalizeBlock( AppHash: cid.Hash, ChainId: c.chainID, Txs: decodedTxs, - // ConsensusMessages: []transaction.Msg{cometInfo}, } ciCtx := contextWithCometInfo(ctx, comet.Info{ diff --git a/server/v2/stf/stf.go b/server/v2/stf/stf.go index 633a356c36..d6cf27115d 100644 --- a/server/v2/stf/stf.go +++ b/server/v2/stf/stf.go @@ -149,7 +149,7 @@ func (s STF[T]) DeliverBlock( if err = isCtxCancelled(ctx); err != nil { return nil, nil, err } - txResults[i] = s.deliverTx(ctx, newState, txBytes, transaction.ExecModeFinalize, hi) + txResults[i] = s.deliverTx(exCtx, newState, txBytes, transaction.ExecModeFinalize, hi) } // reset events exCtx.events = make([]event.Event, 0) @@ -564,10 +564,10 @@ func (s STF[T]) makeContext( ) *executionContext { valuedCtx := context.WithValue(ctx, corecontext.ExecModeKey, execMode) return newExecutionContext( + valuedCtx, s.makeGasMeter, s.makeGasMeteredState, s.branchFn, - valuedCtx, sender, store, execMode, @@ -577,10 +577,10 @@ func (s STF[T]) makeContext( } func newExecutionContext( + ctx context.Context, makeGasMeterFn makeGasMeterFn, makeGasMeteredStoreFn makeGasMeteredStateFn, branchFn branchFn, - ctx context.Context, sender transaction.Identity, state store.WriterMap, execMode transaction.ExecMode, diff --git a/x/auth/ante/expected_keepers.go b/x/auth/ante/expected_keepers.go index f0f2db6bcc..82fc9846a3 100644 --- a/x/auth/ante/expected_keepers.go +++ b/x/auth/ante/expected_keepers.go @@ -30,5 +30,4 @@ type FeegrantKeeper interface { type ConsensusKeeper interface { Params(context.Context, *consensustypes.QueryParamsRequest) (*consensustypes.QueryParamsResponse, error) - GetCometInfo(ctx context.Context, request *consensustypes.QueryGetCometInfoRequest) (*consensustypes.QueryGetCometInfoResponse, error) } diff --git a/x/auth/ante/testutil/expected_keepers_mocks.go b/x/auth/ante/testutil/expected_keepers_mocks.go index 35952cd580..e848a52342 100644 --- a/x/auth/ante/testutil/expected_keepers_mocks.go +++ b/x/auth/ante/testutil/expected_keepers_mocks.go @@ -195,21 +195,6 @@ func (m *MockConsensusKeeper) EXPECT() *MockConsensusKeeperMockRecorder { return m.recorder } -// GetCometInfo mocks base method. -func (m *MockConsensusKeeper) GetCometInfo(ctx context.Context, request *types0.QueryGetCometInfoRequest) (*types0.QueryGetCometInfoResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetCometInfo", ctx, request) - ret0, _ := ret[0].(*types0.QueryGetCometInfoResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetCometInfo indicates an expected call of GetCometInfo. -func (mr *MockConsensusKeeperMockRecorder) GetCometInfo(ctx, request interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCometInfo", reflect.TypeOf((*MockConsensusKeeper)(nil).GetCometInfo), ctx, request) -} - // Params mocks base method. func (m *MockConsensusKeeper) Params(arg0 context.Context, arg1 *types0.QueryParamsRequest) (*types0.QueryParamsResponse, error) { m.ctrl.T.Helper() diff --git a/x/consensus/keeper/keeper.go b/x/consensus/keeper/keeper.go index 1bda1861fe..fbf7fcc410 100644 --- a/x/consensus/keeper/keeper.go +++ b/x/consensus/keeper/keeper.go @@ -1,7 +1,6 @@ package keeper import ( - "bytes" "context" "errors" "fmt" @@ -12,7 +11,6 @@ import ( "google.golang.org/grpc/status" "cosmossdk.io/collections" - coreapp "cosmossdk.io/core/app" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/event" "cosmossdk.io/x/consensus/exported" @@ -28,8 +26,6 @@ type Keeper struct { authority string ParamsStore collections.Item[cmtproto.ConsensusParams] - // storage of the last comet info - cometInfo collections.Item[types.CometInfo] } var _ exported.ConsensusParamSetter = Keeper{}.ParamsStore @@ -40,7 +36,6 @@ func NewKeeper(cdc codec.BinaryCodec, env appmodule.Environment, authority strin Environment: env, authority: authority, ParamsStore: collections.NewItem(sb, collections.NewPrefix("Consensus"), "params", codec.CollValue[cmtproto.ConsensusParams](cdc)), - cometInfo: collections.NewItem(sb, collections.NewPrefix("CometInfo"), "comet_info", codec.CollValue[types.CometInfo](cdc)), } } @@ -112,31 +107,3 @@ func (k Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (* return &types.MsgUpdateParamsResponse{}, nil } - -func (k Keeper) SetCometInfo(ctx context.Context, msg *types.MsgSetCometInfo) (*types.MsgSetCometInfoResponse, error) { - if !bytes.Equal(coreapp.ConsensusIdentity, []byte(msg.Authority)) { - return nil, fmt.Errorf("invalid authority; expected %s, got %s", coreapp.ConsensusIdentity, msg.Authority) - } - - cometInfo := types.CometInfo{ - Evidence: msg.Evidence, - ValidatorsHash: msg.ValidatorsHash, - ProposerAddress: msg.ProposerAddress, - LastCommit: msg.LastCommit, - } - - if err := k.cometInfo.Set(ctx, cometInfo); err != nil { - return nil, err - } - - return &types.MsgSetCometInfoResponse{}, nil -} - -func (k Keeper) GetCometInfo(ctx context.Context, _ *types.QueryGetCometInfoRequest) (*types.QueryGetCometInfoResponse, error) { - cometInfo, err := k.cometInfo.Get(ctx) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - return &types.QueryGetCometInfoResponse{CometInfo: &cometInfo}, nil -} diff --git a/x/consensus/keeper/keeper_test.go b/x/consensus/keeper/keeper_test.go index d1961fbfa7..48188411b5 100644 --- a/x/consensus/keeper/keeper_test.go +++ b/x/consensus/keeper/keeper_test.go @@ -4,7 +4,6 @@ import ( "testing" "time" - v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" cmttypes "github.com/cometbft/cometbft/types" gogotypes "github.com/cosmos/gogoproto/types" @@ -604,53 +603,3 @@ func (s *KeeperTestSuite) TestUpdateParams() { }) } } - -func (s *KeeperTestSuite) TestSetCometInfo() { - consensusIdentiy := "consensus" - testCases := []struct { - name string - enabledFeatures bool - input *types.MsgSetCometInfo - expErr bool - expErrMsg string - }{ - { - name: "valid comet info", - input: &types.MsgSetCometInfo{ - Authority: consensusIdentiy, - Evidence: []*v1.Misbehavior{}, - ValidatorsHash: []byte("validatorhash"), - ProposerAddress: []byte("proposeraddress"), - LastCommit: &v1.CommitInfo{}, - }, - expErr: false, - expErrMsg: "", - }, - { - name: "invalid authority", - input: &types.MsgSetCometInfo{ - Authority: "invalid", - Evidence: []*v1.Misbehavior{}, - ValidatorsHash: []byte("validatorhash"), - ProposerAddress: []byte("proposeraddress"), - LastCommit: &v1.CommitInfo{}, - }, - expErr: true, - expErrMsg: "invalid authority", - }, - } - - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - s.SetupTest(tc.enabledFeatures) - _, err := s.consensusParamsKeeper.SetCometInfo(s.ctx, tc.input) - if tc.expErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), tc.expErrMsg) - } else { - s.Require().NoError(err) - } - }) - } -} diff --git a/x/consensus/proto/cosmos/consensus/v1/query.proto b/x/consensus/proto/cosmos/consensus/v1/query.proto index d458c32c55..4841c5aed3 100644 --- a/x/consensus/proto/cosmos/consensus/v1/query.proto +++ b/x/consensus/proto/cosmos/consensus/v1/query.proto @@ -14,18 +14,6 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/cosmos/consensus/v1/params"; } - - // CometInfo queries the comet info of x/consensus module. - rpc GetCometInfo(QueryGetCometInfoRequest) returns (QueryGetCometInfoResponse); -} - -// QueryCometInfoRequest defines the request type for querying x/consensus comet info. -message QueryGetCometInfoRequest {} - -// QueryCometInfoResponse defines the response type for querying x/consensus comet info. -message QueryGetCometInfoResponse { - // comet_info is the comet info of the x/consensus module. - CometInfo comet_info = 1; } // QueryParamsRequest defines the request type for querying x/consensus parameters. diff --git a/x/consensus/proto/cosmos/consensus/v1/tx.proto b/x/consensus/proto/cosmos/consensus/v1/tx.proto index 74480b72a5..d6b21625c4 100644 --- a/x/consensus/proto/cosmos/consensus/v1/tx.proto +++ b/x/consensus/proto/cosmos/consensus/v1/tx.proto @@ -19,9 +19,6 @@ service Msg { rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse) { option (cosmos_proto.method_added_in) = "cosmos-sdk 0.47"; } - - // SetCometInfo defines how to set the comet info for the x/consensus module. - rpc SetCometInfo(MsgSetCometInfo) returns (MsgSetCometInfoResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -50,27 +47,3 @@ message MsgUpdateParams { // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. message MsgUpdateParamsResponse {} - -// MsgCometInfo is the Msg/CometInfo request type. -message MsgSetCometInfo { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/x/consensus/MsgCometInfo"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // evidence is the misbehaviour evidence to submit. - repeated cometbft.abci.v1.Misbehavior evidence = 2; - - // validators_hash is the hash of the current validator set. - bytes validators_hash = 3; - - // proposer_address is the address of the current proposer. - bytes proposer_address = 4; - - // last_commit is the last commit info. - cometbft.abci.v1.CommitInfo last_commit = 5; -} - -// MsgCometInfoResponse defines the response -message MsgSetCometInfoResponse {} diff --git a/x/consensus/types/query.pb.go b/x/consensus/types/query.pb.go index 1ba4d07047..51273849e4 100644 --- a/x/consensus/types/query.pb.go +++ b/x/consensus/types/query.pb.go @@ -29,89 +29,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryCometInfoRequest defines the request type for querying x/consensus comet info. -type QueryGetCometInfoRequest struct { -} - -func (m *QueryGetCometInfoRequest) Reset() { *m = QueryGetCometInfoRequest{} } -func (m *QueryGetCometInfoRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetCometInfoRequest) ProtoMessage() {} -func (*QueryGetCometInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bf54d1e5df04cee9, []int{0} -} -func (m *QueryGetCometInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetCometInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetCometInfoRequest.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 *QueryGetCometInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetCometInfoRequest.Merge(m, src) -} -func (m *QueryGetCometInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetCometInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetCometInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetCometInfoRequest proto.InternalMessageInfo - -// QueryCometInfoResponse defines the response type for querying x/consensus comet info. -type QueryGetCometInfoResponse struct { - // comet_info is the comet info of the x/consensus module. - CometInfo *CometInfo `protobuf:"bytes,1,opt,name=comet_info,json=cometInfo,proto3" json:"comet_info,omitempty"` -} - -func (m *QueryGetCometInfoResponse) Reset() { *m = QueryGetCometInfoResponse{} } -func (m *QueryGetCometInfoResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetCometInfoResponse) ProtoMessage() {} -func (*QueryGetCometInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bf54d1e5df04cee9, []int{1} -} -func (m *QueryGetCometInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetCometInfoResponse.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 *QueryGetCometInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetCometInfoResponse.Merge(m, src) -} -func (m *QueryGetCometInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetCometInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetCometInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetCometInfoResponse proto.InternalMessageInfo - -func (m *QueryGetCometInfoResponse) GetCometInfo() *CometInfo { - if m != nil { - return m.CometInfo - } - return nil -} - // QueryParamsRequest defines the request type for querying x/consensus parameters. type QueryParamsRequest struct { } @@ -120,7 +37,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bf54d1e5df04cee9, []int{2} + return fileDescriptor_bf54d1e5df04cee9, []int{0} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,7 +78,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bf54d1e5df04cee9, []int{3} + return fileDescriptor_bf54d1e5df04cee9, []int{1} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -198,8 +115,6 @@ func (m *QueryParamsResponse) GetParams() *v1.ConsensusParams { } func init() { - proto.RegisterType((*QueryGetCometInfoRequest)(nil), "cosmos.consensus.v1.QueryGetCometInfoRequest") - proto.RegisterType((*QueryGetCometInfoResponse)(nil), "cosmos.consensus.v1.QueryGetCometInfoResponse") proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.consensus.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.consensus.v1.QueryParamsResponse") } @@ -207,29 +122,25 @@ func init() { func init() { proto.RegisterFile("cosmos/consensus/v1/query.proto", fileDescriptor_bf54d1e5df04cee9) } var fileDescriptor_bf54d1e5df04cee9 = []byte{ - // 342 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x4f, 0xc3, 0x30, - 0x10, 0x85, 0x6b, 0x24, 0x2a, 0x61, 0x98, 0x5c, 0x86, 0x12, 0xc0, 0xa0, 0x74, 0xa0, 0x0b, 0xb6, - 0x5a, 0x16, 0x84, 0xc4, 0x02, 0x03, 0x62, 0xa3, 0x8c, 0x5d, 0x50, 0x1a, 0xdc, 0x2a, 0x82, 0xf8, - 0xd2, 0xda, 0xad, 0xe8, 0x86, 0xf8, 0x05, 0x48, 0xfc, 0x29, 0xc6, 0x4a, 0x2c, 0x8c, 0x28, 0xe1, - 0x4f, 0xb0, 0xa1, 0xd8, 0x09, 0x2d, 0xc2, 0x08, 0xb6, 0x28, 0xf7, 0xee, 0xbd, 0xef, 0x5d, 0x82, - 0x77, 0x42, 0x50, 0x31, 0x28, 0x1e, 0x82, 0x54, 0x42, 0xaa, 0xb1, 0xe2, 0x93, 0x16, 0x1f, 0x8e, - 0xc5, 0x68, 0xca, 0x92, 0x11, 0x68, 0x20, 0x35, 0x2b, 0x60, 0x5f, 0x02, 0x36, 0x69, 0x79, 0x5b, - 0x03, 0x80, 0xc1, 0xad, 0xe0, 0x41, 0x12, 0xf1, 0x40, 0x4a, 0xd0, 0x81, 0x8e, 0x40, 0x2a, 0xbb, - 0xe2, 0xd1, 0x10, 0x62, 0xa1, 0x7b, 0x7d, 0xcd, 0xf5, 0x34, 0x11, 0xc6, 0x31, 0x09, 0x46, 0x41, - 0x5c, 0xce, 0x1b, 0xae, 0xcc, 0xb9, 0xbf, 0x11, 0xf9, 0x1e, 0xae, 0x77, 0x72, 0x8c, 0x33, 0xa1, - 0x4f, 0x73, 0xbb, 0x73, 0xd9, 0x87, 0x4b, 0x31, 0x1c, 0x0b, 0xa5, 0xfd, 0x2e, 0xde, 0x70, 0xcc, - 0x54, 0x92, 0x5b, 0x90, 0x63, 0x8c, 0x4d, 0xfe, 0x55, 0x24, 0xfb, 0x50, 0x47, 0xbb, 0xa8, 0xb9, - 0xda, 0xa6, 0xcc, 0xd1, 0x82, 0xcd, 0x77, 0x57, 0xc2, 0xf2, 0xd1, 0x5f, 0xc7, 0xc4, 0x78, 0x5f, - 0x18, 0xe2, 0x32, 0xb1, 0x83, 0x6b, 0xdf, 0xde, 0x16, 0x59, 0x47, 0xb8, 0x6a, 0x9b, 0x15, 0x39, - 0x3e, 0x2b, 0xab, 0x33, 0x53, 0xdd, 0xa6, 0x14, 0x91, 0xc5, 0x6e, 0xb1, 0xd1, 0xfe, 0x40, 0x78, - 0xd9, 0x78, 0x92, 0x7b, 0x84, 0xab, 0x76, 0x48, 0xf6, 0x9c, 0xa0, 0x3f, 0x81, 0xbc, 0xe6, 0xdf, - 0x42, 0xcb, 0xe8, 0x37, 0x1e, 0x5e, 0xde, 0x9f, 0x96, 0xb6, 0xc9, 0x26, 0x77, 0x9d, 0xdd, 0xc2, - 0x90, 0x18, 0xaf, 0x2d, 0x1e, 0x93, 0xec, 0xff, 0x6e, 0xef, 0xf8, 0x20, 0x1e, 0xfb, 0xaf, 0xdc, - 0x32, 0x9d, 0x1c, 0x3e, 0xa7, 0x14, 0xcd, 0x52, 0x8a, 0xde, 0x52, 0x8a, 0x1e, 0x33, 0x5a, 0x99, - 0x65, 0xb4, 0xf2, 0x9a, 0xd1, 0x4a, 0x97, 0x5a, 0x23, 0x75, 0x7d, 0xc3, 0x22, 0xe0, 0x77, 0x0b, - 0xb0, 0xe6, 0xa0, 0xbd, 0xaa, 0xf9, 0x3b, 0x0e, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xd8, - 0xe1, 0x00, 0xb8, 0x02, 0x00, 0x00, + // 278 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce, + 0xcd, 0x2f, 0xd6, 0x4f, 0xce, 0xcf, 0x2b, 0x4e, 0xcd, 0x2b, 0x2e, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, + 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0x28, 0xd0, + 0x83, 0x2b, 0xd0, 0x2b, 0x33, 0x94, 0x92, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c, + 0xc8, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0x86, 0x68, 0x91, + 0x92, 0x4b, 0xce, 0xcf, 0x4d, 0x2d, 0x49, 0x4a, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x05, 0x9b, + 0x58, 0x90, 0x58, 0x94, 0x98, 0x0b, 0x93, 0x57, 0xc6, 0x66, 0x27, 0xc2, 0x7c, 0xb0, 0x22, 0x25, + 0x11, 0x2e, 0xa1, 0x40, 0x90, 0x33, 0x02, 0xc0, 0x3a, 0x83, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, + 0x94, 0x02, 0xb9, 0x84, 0x51, 0x44, 0x8b, 0x0b, 0x40, 0xda, 0x84, 0xac, 0xb8, 0xd8, 0x20, 0x36, + 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x29, 0xe9, 0xc1, 0x9c, 0xa0, 0x07, 0x76, 0x82, 0x5e, + 0x99, 0xa1, 0x9e, 0x33, 0xcc, 0x02, 0xa8, 0x5e, 0xa8, 0x0e, 0xa3, 0x2e, 0x46, 0x2e, 0x56, 0xb0, + 0x99, 0x42, 0x0d, 0x8c, 0x5c, 0x6c, 0x10, 0x49, 0x21, 0x75, 0x3d, 0x2c, 0xde, 0xd6, 0xc3, 0x74, + 0x90, 0x94, 0x06, 0x61, 0x85, 0x10, 0x37, 0x2a, 0x29, 0x37, 0x5d, 0x7e, 0x32, 0x99, 0x49, 0x56, + 0x48, 0x5a, 0x1f, 0x9b, 0xf7, 0x21, 0x8e, 0x71, 0xb2, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, + 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, + 0x63, 0x39, 0x86, 0x28, 0x39, 0x88, 0xae, 0xe2, 0x94, 0x6c, 0xbd, 0xcc, 0x7c, 0xfd, 0x0a, 0x24, + 0xdd, 0x60, 0x1f, 0x26, 0xb1, 0x81, 0x83, 0xcd, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xc3, 0xb9, + 0xf1, 0x10, 0xd1, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -246,8 +157,6 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Params queries the parameters of x/consensus module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // CometInfo queries the comet info of x/consensus module. - GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) } type queryClient struct { @@ -267,21 +176,10 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) { - out := new(QueryGetCometInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Query/GetCometInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // QueryServer is the server API for Query service. type QueryServer interface { // Params queries the parameters of x/consensus module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // CometInfo queries the comet info of x/consensus module. - GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -291,9 +189,6 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (*UnimplementedQueryServer) GetCometInfo(ctx context.Context, req *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetCometInfo not implemented") -} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -317,24 +212,6 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_GetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetCometInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetCometInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.consensus.v1.Query/GetCometInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetCometInfo(ctx, req.(*QueryGetCometInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.consensus.v1.Query", HandlerType: (*QueryServer)(nil), @@ -343,73 +220,11 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, - { - MethodName: "GetCometInfo", - Handler: _Query_GetCometInfo_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/consensus/v1/query.proto", } -func (m *QueryGetCometInfoRequest) 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 *QueryGetCometInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetCometInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryGetCometInfoResponse) 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 *QueryGetCometInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetCometInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CometInfo != nil { - { - size, err := m.CometInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -479,28 +294,6 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryGetCometInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryGetCometInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CometInfo != nil { - l = m.CometInfo.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 @@ -529,142 +322,6 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryGetCometInfoRequest) 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: QueryGetCometInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetCometInfoRequest: 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 *QueryGetCometInfoResponse) 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: QueryGetCometInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CometInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CometInfo == nil { - m.CometInfo = &CometInfo{} - } - if err := m.CometInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/consensus/types/tx.pb.go b/x/consensus/types/tx.pb.go index ecf75a0e78..1ce22a4214 100644 --- a/x/consensus/types/tx.pb.go +++ b/x/consensus/types/tx.pb.go @@ -6,7 +6,7 @@ package types import ( context "context" fmt "fmt" - v11 "github.com/cometbft/cometbft/api/cometbft/abci/v1" + _ "github.com/cometbft/cometbft/api/cometbft/abci/v1" v1 "github.com/cometbft/cometbft/api/cometbft/types/v1" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -171,177 +171,47 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo -// MsgCometInfo is the Msg/CometInfo request type. -type MsgSetCometInfo struct { - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // evidence is the misbehaviour evidence to submit. - Evidence []*v11.Misbehavior `protobuf:"bytes,2,rep,name=evidence,proto3" json:"evidence,omitempty"` - // validators_hash is the hash of the current validator set. - ValidatorsHash []byte `protobuf:"bytes,3,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` - // proposer_address is the address of the current proposer. - ProposerAddress []byte `protobuf:"bytes,4,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` - // last_commit is the last commit info. - LastCommit *v11.CommitInfo `protobuf:"bytes,5,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` -} - -func (m *MsgSetCometInfo) Reset() { *m = MsgSetCometInfo{} } -func (m *MsgSetCometInfo) String() string { return proto.CompactTextString(m) } -func (*MsgSetCometInfo) ProtoMessage() {} -func (*MsgSetCometInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_2135c60575ab504d, []int{2} -} -func (m *MsgSetCometInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSetCometInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSetCometInfo.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 *MsgSetCometInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSetCometInfo.Merge(m, src) -} -func (m *MsgSetCometInfo) XXX_Size() int { - return m.Size() -} -func (m *MsgSetCometInfo) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSetCometInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSetCometInfo proto.InternalMessageInfo - -func (m *MsgSetCometInfo) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgSetCometInfo) GetEvidence() []*v11.Misbehavior { - if m != nil { - return m.Evidence - } - return nil -} - -func (m *MsgSetCometInfo) GetValidatorsHash() []byte { - if m != nil { - return m.ValidatorsHash - } - return nil -} - -func (m *MsgSetCometInfo) GetProposerAddress() []byte { - if m != nil { - return m.ProposerAddress - } - return nil -} - -func (m *MsgSetCometInfo) GetLastCommit() *v11.CommitInfo { - if m != nil { - return m.LastCommit - } - return nil -} - -// MsgCometInfoResponse defines the response -type MsgSetCometInfoResponse struct { -} - -func (m *MsgSetCometInfoResponse) Reset() { *m = MsgSetCometInfoResponse{} } -func (m *MsgSetCometInfoResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSetCometInfoResponse) ProtoMessage() {} -func (*MsgSetCometInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2135c60575ab504d, []int{3} -} -func (m *MsgSetCometInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSetCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSetCometInfoResponse.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 *MsgSetCometInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSetCometInfoResponse.Merge(m, src) -} -func (m *MsgSetCometInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSetCometInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSetCometInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSetCometInfoResponse proto.InternalMessageInfo - func init() { proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.consensus.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.consensus.v1.MsgUpdateParamsResponse") - proto.RegisterType((*MsgSetCometInfo)(nil), "cosmos.consensus.v1.MsgSetCometInfo") - proto.RegisterType((*MsgSetCometInfoResponse)(nil), "cosmos.consensus.v1.MsgSetCometInfoResponse") } func init() { proto.RegisterFile("cosmos/consensus/v1/tx.proto", fileDescriptor_2135c60575ab504d) } var fileDescriptor_2135c60575ab504d = []byte{ - // 649 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4d, 0x4f, 0xd4, 0x40, - 0x18, 0xa6, 0x7c, 0xba, 0xc3, 0xc6, 0xd5, 0x41, 0x43, 0xd9, 0x60, 0xb3, 0xae, 0x46, 0x91, 0x48, - 0xcb, 0x22, 0xa2, 0x90, 0x90, 0xc8, 0x12, 0x0d, 0x1c, 0x88, 0xa6, 0x04, 0x0f, 0x5e, 0x36, 0xd3, - 0x76, 0xd8, 0x36, 0xd0, 0x4e, 0xd3, 0x19, 0x2a, 0x7b, 0x33, 0x1e, 0x3d, 0xf9, 0x47, 0x4c, 0x38, - 0xf0, 0x23, 0x8c, 0x17, 0x89, 0x27, 0xe3, 0xc9, 0xec, 0x1e, 0x36, 0xfe, 0x0b, 0xd3, 0x99, 0x7e, - 0xec, 0x47, 0x37, 0x31, 0x5e, 0x9a, 0x74, 0xde, 0xe7, 0x79, 0xde, 0x77, 0x9e, 0xf7, 0x69, 0xc1, - 0xa2, 0x49, 0xa8, 0x4b, 0xa8, 0x66, 0x12, 0x8f, 0x62, 0x8f, 0x9e, 0x51, 0x2d, 0xac, 0x69, 0xec, - 0x5c, 0xf5, 0x03, 0xc2, 0x08, 0x9c, 0x13, 0x55, 0x35, 0xad, 0xaa, 0x61, 0xad, 0x7c, 0x13, 0xb9, - 0x8e, 0x47, 0x34, 0xfe, 0x14, 0xb8, 0xf2, 0x82, 0xc0, 0x35, 0xf8, 0x9b, 0x16, 0x93, 0x44, 0x69, - 0x3e, 0x6e, 0xe0, 0xd2, 0x66, 0x24, 0xed, 0xd2, 0x66, 0x5c, 0x50, 0x4c, 0xe2, 0x62, 0x66, 0x1c, - 0x33, 0x8d, 0xb5, 0x7c, 0xcc, 0xfb, 0xfa, 0x28, 0x40, 0x6e, 0x42, 0x5c, 0x4c, 0xeb, 0xc8, 0x30, - 0x1d, 0x3e, 0x56, 0x84, 0x13, 0xd5, 0xea, 0x97, 0x49, 0x50, 0x3a, 0xa0, 0xcd, 0x23, 0xdf, 0x42, - 0x0c, 0xbf, 0xe1, 0x3c, 0xb8, 0x01, 0x0a, 0xe8, 0x8c, 0xd9, 0x24, 0x70, 0x58, 0x4b, 0x96, 0x2a, - 0xd2, 0x52, 0xa1, 0x2e, 0xff, 0xb8, 0x5c, 0xb9, 0x15, 0xcf, 0xb3, 0x63, 0x59, 0x01, 0xa6, 0xf4, - 0x90, 0x05, 0x8e, 0xd7, 0xd4, 0x33, 0x28, 0x5c, 0x07, 0x53, 0xc6, 0x29, 0x31, 0x4f, 0xe4, 0xf1, - 0x8a, 0xb4, 0x34, 0xbb, 0xa6, 0xa8, 0x49, 0x67, 0x55, 0x74, 0x0c, 0x6b, 0x6a, 0x3d, 0xaa, 0x8b, - 0x36, 0xba, 0x00, 0xc3, 0x6d, 0x70, 0x0d, 0x87, 0x8e, 0x85, 0x3d, 0x13, 0xcb, 0x13, 0x9c, 0x78, - 0x37, 0x87, 0xf8, 0x32, 0x86, 0xc4, 0xdc, 0x94, 0x02, 0x5f, 0x80, 0x42, 0x88, 0x4e, 0x1d, 0x0b, - 0x31, 0x12, 0xc8, 0x93, 0x9c, 0x5f, 0xcd, 0xe1, 0xbf, 0x4d, 0x30, 0xb1, 0x40, 0x46, 0x82, 0x7b, - 0x60, 0x32, 0x72, 0x46, 0x9e, 0xe2, 0xe4, 0x3b, 0x39, 0xe4, 0x9d, 0xfa, 0xee, 0xbe, 0xe0, 0xd5, - 0x6f, 0xff, 0xba, 0x5c, 0x29, 0x09, 0x23, 0x56, 0xa8, 0x75, 0x52, 0x59, 0x55, 0x9f, 0xae, 0xca, - 0x92, 0xce, 0x15, 0xe0, 0x11, 0x28, 0xd0, 0x96, 0x67, 0xda, 0x01, 0xf1, 0x5a, 0xf2, 0xf4, 0xc8, - 0x59, 0x0e, 0x13, 0x4c, 0xac, 0x39, 0x37, 0xac, 0x59, 0xd3, 0x33, 0x25, 0xf8, 0x1a, 0xcc, 0x1c, - 0x63, 0xc4, 0xce, 0x02, 0x2c, 0xcf, 0x70, 0xd1, 0x4a, 0x8e, 0xe8, 0x2b, 0x81, 0x18, 0x2d, 0xb9, - 0xa6, 0x27, 0x2a, 0x5b, 0x9b, 0x1f, 0xbb, 0x17, 0xcb, 0xd9, 0xe2, 0x3e, 0x75, 0x2f, 0x96, 0x1f, - 0x64, 0x60, 0xed, 0xbc, 0x27, 0xc5, 0x03, 0xd9, 0xa8, 0x2e, 0x80, 0xf9, 0x81, 0x23, 0x1d, 0x53, - 0x3f, 0x82, 0x57, 0xbf, 0x8f, 0xf3, 0x28, 0x1d, 0x62, 0xb6, 0x1b, 0x4d, 0xb7, 0xef, 0x1d, 0x93, - 0xff, 0x8e, 0xd2, 0x66, 0x4f, 0x28, 0xc6, 0x2b, 0x13, 0xfd, 0x7b, 0x89, 0xbc, 0x8e, 0xae, 0x7c, - 0xe0, 0x50, 0x03, 0xdb, 0x28, 0x74, 0x48, 0xd0, 0x13, 0x88, 0x87, 0xa0, 0x94, 0xee, 0x96, 0x36, - 0x6c, 0x44, 0x6d, 0x1e, 0xab, 0xa2, 0x7e, 0x3d, 0x3b, 0xde, 0x43, 0xd4, 0x86, 0x8f, 0xc0, 0x0d, - 0x3f, 0x20, 0x3e, 0xa1, 0x38, 0x68, 0x20, 0x31, 0x08, 0x0f, 0x50, 0x51, 0x2f, 0x25, 0xe7, 0xf1, - 0x7c, 0x70, 0x1b, 0xcc, 0x9e, 0x22, 0xca, 0x1a, 0x26, 0x71, 0x5d, 0x87, 0xc5, 0x49, 0x59, 0x1c, - 0x9e, 0x68, 0x97, 0xd7, 0xa3, 0x9b, 0xeb, 0x20, 0x22, 0x88, 0xf7, 0xad, 0x8d, 0x61, 0xbf, 0xef, - 0x8d, 0xf6, 0x3b, 0x75, 0x2f, 0x36, 0xbb, 0xd7, 0xd0, 0xc4, 0xec, 0xb5, 0x3f, 0x12, 0x98, 0x38, - 0xa0, 0x4d, 0xf8, 0x1e, 0x14, 0xfb, 0xbe, 0xdd, 0xfb, 0x6a, 0xce, 0xaf, 0x46, 0x1d, 0x58, 0x59, - 0xf9, 0xf1, 0xbf, 0xa0, 0xd2, 0xc5, 0xce, 0x7d, 0x1b, 0x0c, 0xd3, 0xfa, 0x33, 0x68, 0x80, 0x62, - 0xdf, 0xa6, 0x47, 0x36, 0xee, 0x45, 0x8d, 0x6e, 0x9c, 0x77, 0xc9, 0xf2, 0xd4, 0x87, 0xee, 0xc5, - 0xb2, 0x54, 0x7f, 0xfe, 0xb5, 0xad, 0x48, 0x57, 0x6d, 0x45, 0xfa, 0xdd, 0x56, 0xa4, 0xcf, 0x1d, - 0x65, 0xec, 0xaa, 0xa3, 0x8c, 0xfd, 0xec, 0x28, 0x63, 0xef, 0x14, 0xa1, 0x46, 0xad, 0x13, 0xd5, - 0x21, 0x7d, 0x3e, 0xf2, 0xef, 0xc2, 0x98, 0xe6, 0x3f, 0xb9, 0x27, 0x7f, 0x03, 0x00, 0x00, 0xff, - 0xff, 0x65, 0xd1, 0xd8, 0x21, 0x9e, 0x05, 0x00, 0x00, + // 507 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x6b, 0x13, 0x41, + 0x18, 0xc6, 0xb3, 0x36, 0x69, 0xcd, 0x28, 0x14, 0x27, 0x4a, 0xa7, 0xa1, 0x0e, 0x31, 0x88, 0x94, + 0x60, 0x66, 0x9b, 0x58, 0xff, 0x82, 0x60, 0x23, 0x8a, 0x1e, 0x8a, 0xb2, 0xa5, 0x1e, 0xbc, 0xc8, + 0x64, 0x77, 0xba, 0x5d, 0xd2, 0xdd, 0x59, 0x76, 0x26, 0x6b, 0x73, 0x13, 0xc1, 0x8b, 0x27, 0xbf, + 0x88, 0x90, 0x43, 0x3f, 0x84, 0x78, 0x2a, 0x9e, 0xc4, 0x93, 0x24, 0x87, 0x7c, 0x0d, 0xd9, 0x99, + 0xdd, 0xac, 0x8d, 0x5b, 0xf0, 0x12, 0xc8, 0x3e, 0xcf, 0xef, 0x79, 0x66, 0xde, 0x7d, 0x17, 0x6c, + 0xd8, 0x5c, 0xf8, 0x5c, 0x98, 0x36, 0x0f, 0x04, 0x0b, 0xc4, 0x50, 0x98, 0x71, 0xc7, 0x94, 0xc7, + 0x24, 0x8c, 0xb8, 0xe4, 0xb0, 0xa6, 0x55, 0x32, 0x57, 0x49, 0xdc, 0xa9, 0x5f, 0xa1, 0xbe, 0x17, + 0x70, 0x53, 0xfd, 0x6a, 0x5f, 0x7d, 0x5d, 0xfb, 0xde, 0xa9, 0x7f, 0x66, 0x0a, 0x69, 0x69, 0x2d, + 0x2d, 0xf0, 0x85, 0x9b, 0x44, 0xfb, 0xc2, 0x4d, 0x05, 0x6c, 0x73, 0x9f, 0xc9, 0xfe, 0x81, 0x34, + 0xe5, 0x28, 0x64, 0xaa, 0x37, 0xa4, 0x11, 0xf5, 0x33, 0x70, 0x63, 0xae, 0xd3, 0xbe, 0xed, 0xa9, + 0x63, 0x25, 0x3e, 0xad, 0x36, 0xbf, 0x96, 0xc1, 0xea, 0xae, 0x70, 0xf7, 0x43, 0x87, 0x4a, 0xf6, + 0x5a, 0x71, 0xf0, 0x1e, 0xa8, 0xd2, 0xa1, 0x3c, 0xe4, 0x91, 0x27, 0x47, 0xc8, 0x68, 0x18, 0x9b, + 0xd5, 0x1e, 0xfa, 0x71, 0xd2, 0xbe, 0x9a, 0x9e, 0x67, 0xc7, 0x71, 0x22, 0x26, 0xc4, 0x9e, 0x8c, + 0xbc, 0xc0, 0xb5, 0x72, 0x2b, 0xdc, 0x06, 0x95, 0xfe, 0x11, 0xb7, 0x07, 0xe8, 0x42, 0xc3, 0xd8, + 0xbc, 0xd4, 0xc5, 0x24, 0x6b, 0x26, 0xba, 0x31, 0xee, 0x90, 0x5e, 0xa2, 0xeb, 0x1a, 0x4b, 0x9b, + 0xe1, 0x63, 0x70, 0x91, 0xc5, 0x9e, 0xc3, 0x02, 0x9b, 0xa1, 0x25, 0x05, 0xde, 0x28, 0x00, 0x9f, + 0xa5, 0x96, 0x94, 0x9d, 0x23, 0xf0, 0x09, 0xa8, 0xc6, 0xf4, 0xc8, 0x73, 0xa8, 0xe4, 0x11, 0x2a, + 0x2b, 0xbe, 0x59, 0xc0, 0xbf, 0xc9, 0x3c, 0x69, 0x40, 0x0e, 0xc1, 0x17, 0xa0, 0x9c, 0x4c, 0x06, + 0x55, 0x14, 0x7c, 0xbd, 0x00, 0xde, 0xe9, 0x3d, 0x7d, 0xa9, 0xb9, 0xde, 0xb5, 0x5f, 0x27, 0xed, + 0x55, 0x3d, 0x88, 0xb6, 0x70, 0x06, 0x8d, 0x2d, 0x72, 0x77, 0x0b, 0x19, 0x96, 0x4a, 0x80, 0xfb, + 0xa0, 0x2a, 0x46, 0x81, 0x7d, 0x18, 0xf1, 0x60, 0x84, 0x96, 0xcf, 0x3d, 0xcb, 0x5e, 0xe6, 0x49, + 0x33, 0x6b, 0xff, 0x66, 0x76, 0xac, 0x3c, 0x09, 0xbe, 0x02, 0x2b, 0x07, 0x8c, 0xca, 0x61, 0xc4, + 0xd0, 0x8a, 0x0a, 0x6d, 0x14, 0x84, 0x3e, 0xd7, 0x8e, 0xf3, 0x23, 0xbb, 0x56, 0x96, 0xf2, 0xe8, + 0xe1, 0xc7, 0xd9, 0xb8, 0x95, 0xbf, 0xb8, 0xcf, 0xb3, 0x71, 0xeb, 0x56, 0x6e, 0x36, 0x8f, 0xff, + 0xda, 0xe2, 0x85, 0xdd, 0x68, 0xae, 0x83, 0xb5, 0x85, 0x47, 0x16, 0x13, 0x61, 0x62, 0xef, 0x7e, + 0x32, 0xc0, 0xd2, 0xae, 0x70, 0xe1, 0x7b, 0x70, 0xf9, 0xcc, 0x3a, 0xdd, 0x24, 0x05, 0xdb, 0x4f, + 0x16, 0x52, 0xea, 0xb7, 0xff, 0xc7, 0x95, 0x75, 0x35, 0x6b, 0xdf, 0x17, 0xef, 0xb7, 0x7d, 0xbf, + 0x5e, 0xf9, 0x30, 0x1b, 0xb7, 0x8c, 0xde, 0x83, 0x6f, 0x13, 0x6c, 0x9c, 0x4e, 0xb0, 0xf1, 0x7b, + 0x82, 0x8d, 0x2f, 0x53, 0x5c, 0x3a, 0x9d, 0xe2, 0xd2, 0xcf, 0x29, 0x2e, 0xbd, 0xc5, 0x9a, 0x10, + 0xce, 0x80, 0x78, 0xfc, 0xcc, 0x35, 0xd5, 0x18, 0xfb, 0xcb, 0xea, 0x9b, 0xb8, 0xf3, 0x27, 0x00, + 0x00, 0xff, 0xff, 0x6c, 0x14, 0x46, 0x20, 0xcd, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -359,8 +229,6 @@ type MsgClient interface { // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // SetCometInfo defines how to set the comet info for the x/consensus module. - SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error) } type msgClient struct { @@ -380,22 +248,11 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error) { - out := new(MsgSetCometInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Msg/SetCometInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. type MsgServer interface { // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // SetCometInfo defines how to set the comet info for the x/consensus module. - SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -405,9 +262,6 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (*UnimplementedMsgServer) SetCometInfo(ctx context.Context, req *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetCometInfo not implemented") -} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -431,24 +285,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_SetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSetCometInfo) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetCometInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.consensus.v1.Msg/SetCometInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetCometInfo(ctx, req.(*MsgSetCometInfo)) - } - return interceptor(ctx, in, info, handler) -} - var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.consensus.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -457,10 +293,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, - { - MethodName: "SetCometInfo", - Handler: _Msg_SetCometInfo_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/consensus/v1/tx.proto", @@ -591,99 +423,6 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgSetCometInfo) 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 *MsgSetCometInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSetCometInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LastCommit != nil { - { - size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.ProposerAddress) > 0 { - i -= len(m.ProposerAddress) - copy(dAtA[i:], m.ProposerAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.ProposerAddress))) - i-- - dAtA[i] = 0x22 - } - if len(m.ValidatorsHash) > 0 { - i -= len(m.ValidatorsHash) - copy(dAtA[i:], m.ValidatorsHash) - i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorsHash))) - i-- - dAtA[i] = 0x1a - } - if len(m.Evidence) > 0 { - for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Evidence[iNdEx].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 *MsgSetCometInfoResponse) 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 *MsgSetCometInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSetCometInfoResponse) 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 @@ -741,46 +480,6 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } -func (m *MsgSetCometInfo) 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)) - } - if len(m.Evidence) > 0 { - for _, e := range m.Evidence { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - l = len(m.ValidatorsHash) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ProposerAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.LastCommit != nil { - l = m.LastCommit.Size() - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgSetCometInfoResponse) 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 } @@ -1135,276 +834,6 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSetCometInfo) 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: MsgSetCometInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetCometInfo: 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 Evidence", 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 - } - m.Evidence = append(m.Evidence, &v11.Misbehavior{}) - if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) - if m.ValidatorsHash == nil { - m.ValidatorsHash = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) - if m.ProposerAddress == nil { - m.ProposerAddress = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastCommit == nil { - m.LastCommit = &v11.CommitInfo{} - } - if err := m.LastCommit.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 *MsgSetCometInfoResponse) 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: MsgSetCometInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetCometInfoResponse: 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 diff --git a/x/staking/testutil/expected_keepers_mocks.go b/x/staking/testutil/expected_keepers_mocks.go index e3004439c7..152d25e217 100644 --- a/x/staking/testutil/expected_keepers_mocks.go +++ b/x/staking/testutil/expected_keepers_mocks.go @@ -765,21 +765,6 @@ func (m *MockConsensusKeeper) EXPECT() *MockConsensusKeeperMockRecorder { return m.recorder } -// GetCometInfo mocks base method. -func (m *MockConsensusKeeper) GetCometInfo(arg0 context.Context, arg1 *types.QueryGetCometInfoRequest) (*types.QueryGetCometInfoResponse, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetCometInfo", arg0, arg1) - ret0, _ := ret[0].(*types.QueryGetCometInfoResponse) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetCometInfo indicates an expected call of GetCometInfo. -func (mr *MockConsensusKeeperMockRecorder) GetCometInfo(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCometInfo", reflect.TypeOf((*MockConsensusKeeper)(nil).GetCometInfo), arg0, arg1) -} - // Params mocks base method. func (m *MockConsensusKeeper) Params(arg0 context.Context, arg1 *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { m.ctrl.T.Helper() diff --git a/x/staking/types/expected_keepers.go b/x/staking/types/expected_keepers.go index e101414526..bd246775a8 100644 --- a/x/staking/types/expected_keepers.go +++ b/x/staking/types/expected_keepers.go @@ -118,5 +118,4 @@ func (StakingHooksWrapper) IsOnePerModuleType() {} type ConsensusKeeper interface { Params(context.Context, *consensustypes.QueryParamsRequest) (*consensustypes.QueryParamsResponse, error) - GetCometInfo(context.Context, *consensustypes.QueryGetCometInfoRequest) (*consensustypes.QueryGetCometInfoResponse, error) }