From 35ed5bbc4f1217961e3d6cea5bb2bede9919f58a Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Mon, 10 Jun 2024 17:42:02 +0200 Subject: [PATCH 01/12] upstream more changes from v2 --- api/cosmos/circuit/v1/tx_grpc.pb.go | 2 +- api/cosmos/consensus/v1/consensus.pulsar.go | 929 ++++++++++++++++-- x/circuit/types/tx.pb.go | 2 +- .../cosmos/consensus/v1/consensus.proto | 11 +- x/consensus/types/consensus.pb.go | 402 +++++++- 5 files changed, 1255 insertions(+), 91 deletions(-) rename {proto => x/consensus/proto}/cosmos/consensus/v1/consensus.proto (69%) diff --git a/api/cosmos/circuit/v1/tx_grpc.pb.go b/api/cosmos/circuit/v1/tx_grpc.pb.go index a3b22335e577..2b4b95d37fe2 100644 --- a/api/cosmos/circuit/v1/tx_grpc.pb.go +++ b/api/cosmos/circuit/v1/tx_grpc.pb.go @@ -83,7 +83,7 @@ type MsgServer interface { // TripCircuitBreaker pauses processing of Msg's in the state machine. TripCircuitBreaker(context.Context, *MsgTripCircuitBreaker) (*MsgTripCircuitBreakerResponse, error) // ResetCircuitBreaker resumes processing of Msg's in the state machine that - // have been been paused using TripCircuitBreaker. + // have been paused using TripCircuitBreaker. ResetCircuitBreaker(context.Context, *MsgResetCircuitBreaker) (*MsgResetCircuitBreakerResponse, error) mustEmbedUnimplementedMsgServer() } diff --git a/api/cosmos/consensus/v1/consensus.pulsar.go b/api/cosmos/consensus/v1/consensus.pulsar.go index d041a019096b..86921baead1f 100644 --- a/api/cosmos/consensus/v1/consensus.pulsar.go +++ b/api/cosmos/consensus/v1/consensus.pulsar.go @@ -2,6 +2,7 @@ package consensusv1 import ( + v11 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/abci/v1" v1 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/types/v1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" @@ -1278,7 +1279,712 @@ func (x *fastReflection_ConsensusMsgParamsResponse) ProtoMethods() *protoiface.M } } -// Since: cosmos-sdk 0.51 +var _ protoreflect.List = (*_CometInfo_1_list)(nil) + +type _CometInfo_1_list struct { + list *[]*v11.Misbehavior +} + +func (x *_CometInfo_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_CometInfo_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_CometInfo_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v11.Misbehavior) + (*x.list)[i] = concreteValue +} + +func (x *_CometInfo_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v11.Misbehavior) + *x.list = append(*x.list, concreteValue) +} + +func (x *_CometInfo_1_list) AppendMutable() protoreflect.Value { + v := new(v11.Misbehavior) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_CometInfo_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_CometInfo_1_list) NewElement() protoreflect.Value { + v := new(v11.Misbehavior) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_CometInfo_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_CometInfo protoreflect.MessageDescriptor + fd_CometInfo_evidence protoreflect.FieldDescriptor + fd_CometInfo_validators_hash protoreflect.FieldDescriptor + fd_CometInfo_proposer_address protoreflect.FieldDescriptor + fd_CometInfo_last_commit protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_consensus_v1_consensus_proto_init() + md_CometInfo = File_cosmos_consensus_v1_consensus_proto.Messages().ByName("CometInfo") + fd_CometInfo_evidence = md_CometInfo.Fields().ByName("evidence") + fd_CometInfo_validators_hash = md_CometInfo.Fields().ByName("validators_hash") + fd_CometInfo_proposer_address = md_CometInfo.Fields().ByName("proposer_address") + fd_CometInfo_last_commit = md_CometInfo.Fields().ByName("last_commit") +} + +var _ protoreflect.Message = (*fastReflection_CometInfo)(nil) + +type fastReflection_CometInfo CometInfo + +func (x *CometInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_CometInfo)(x) +} + +func (x *CometInfo) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_consensus_v1_consensus_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_CometInfo_messageType fastReflection_CometInfo_messageType +var _ protoreflect.MessageType = fastReflection_CometInfo_messageType{} + +type fastReflection_CometInfo_messageType struct{} + +func (x fastReflection_CometInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_CometInfo)(nil) +} +func (x fastReflection_CometInfo_messageType) New() protoreflect.Message { + return new(fastReflection_CometInfo) +} +func (x fastReflection_CometInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_CometInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_CometInfo) Descriptor() protoreflect.MessageDescriptor { + return md_CometInfo +} + +// 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_CometInfo) Type() protoreflect.MessageType { + return _fastReflection_CometInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_CometInfo) New() protoreflect.Message { + return new(fastReflection_CometInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_CometInfo) Interface() protoreflect.ProtoMessage { + return (*CometInfo)(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_CometInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Evidence) != 0 { + value := protoreflect.ValueOfList(&_CometInfo_1_list{list: &x.Evidence}) + if !f(fd_CometInfo_evidence, value) { + return + } + } + if len(x.ValidatorsHash) != 0 { + value := protoreflect.ValueOfBytes(x.ValidatorsHash) + if !f(fd_CometInfo_validators_hash, value) { + return + } + } + if len(x.ProposerAddress) != 0 { + value := protoreflect.ValueOfBytes(x.ProposerAddress) + if !f(fd_CometInfo_proposer_address, value) { + return + } + } + if x.LastCommit != nil { + value := protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) + if !f(fd_CometInfo_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_CometInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.consensus.v1.CometInfo.evidence": + return len(x.Evidence) != 0 + case "cosmos.consensus.v1.CometInfo.validators_hash": + return len(x.ValidatorsHash) != 0 + case "cosmos.consensus.v1.CometInfo.proposer_address": + return len(x.ProposerAddress) != 0 + case "cosmos.consensus.v1.CometInfo.last_commit": + return x.LastCommit != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.CometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.CometInfo 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_CometInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.consensus.v1.CometInfo.evidence": + x.Evidence = nil + case "cosmos.consensus.v1.CometInfo.validators_hash": + x.ValidatorsHash = nil + case "cosmos.consensus.v1.CometInfo.proposer_address": + x.ProposerAddress = nil + case "cosmos.consensus.v1.CometInfo.last_commit": + x.LastCommit = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.CometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.CometInfo 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_CometInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.consensus.v1.CometInfo.evidence": + if len(x.Evidence) == 0 { + return protoreflect.ValueOfList(&_CometInfo_1_list{}) + } + listValue := &_CometInfo_1_list{list: &x.Evidence} + return protoreflect.ValueOfList(listValue) + case "cosmos.consensus.v1.CometInfo.validators_hash": + value := x.ValidatorsHash + return protoreflect.ValueOfBytes(value) + case "cosmos.consensus.v1.CometInfo.proposer_address": + value := x.ProposerAddress + return protoreflect.ValueOfBytes(value) + case "cosmos.consensus.v1.CometInfo.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.CometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.CometInfo 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_CometInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.consensus.v1.CometInfo.evidence": + lv := value.List() + clv := lv.(*_CometInfo_1_list) + x.Evidence = *clv.list + case "cosmos.consensus.v1.CometInfo.validators_hash": + x.ValidatorsHash = value.Bytes() + case "cosmos.consensus.v1.CometInfo.proposer_address": + x.ProposerAddress = value.Bytes() + case "cosmos.consensus.v1.CometInfo.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.CometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.CometInfo 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_CometInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.consensus.v1.CometInfo.evidence": + if x.Evidence == nil { + x.Evidence = []*v11.Misbehavior{} + } + value := &_CometInfo_1_list{list: &x.Evidence} + return protoreflect.ValueOfList(value) + case "cosmos.consensus.v1.CometInfo.last_commit": + if x.LastCommit == nil { + x.LastCommit = new(v11.CommitInfo) + } + return protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) + case "cosmos.consensus.v1.CometInfo.validators_hash": + panic(fmt.Errorf("field validators_hash of message cosmos.consensus.v1.CometInfo is not mutable")) + case "cosmos.consensus.v1.CometInfo.proposer_address": + panic(fmt.Errorf("field proposer_address of message cosmos.consensus.v1.CometInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.CometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.CometInfo 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_CometInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.consensus.v1.CometInfo.evidence": + list := []*v11.Misbehavior{} + return protoreflect.ValueOfList(&_CometInfo_1_list{list: &list}) + case "cosmos.consensus.v1.CometInfo.validators_hash": + return protoreflect.ValueOfBytes(nil) + case "cosmos.consensus.v1.CometInfo.proposer_address": + return protoreflect.ValueOfBytes(nil) + case "cosmos.consensus.v1.CometInfo.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.CometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.CometInfo 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_CometInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.CometInfo", 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_CometInfo) 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_CometInfo) 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_CometInfo) 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_CometInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*CometInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.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().(*CometInfo) + 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] = 0x22 + } + 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] = 0x1a + } + 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] = 0x12 + } + 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] = 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().(*CometInfo) + 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: CometInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CometInfo: 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 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 2: + 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 3: + 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 4: + 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, + } +} + +// Since: cosmos-sdk 0.52 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: @@ -1410,6 +2116,66 @@ func (*ConsensusMsgParamsResponse) Descriptor() ([]byte, []int) { return file_cosmos_consensus_v1_consensus_proto_rawDescGZIP(), []int{1} } +// CometInfo defines the structure of the x/consensus module's comet info. +type CometInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Evidence []*v11.Misbehavior `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"` + ValidatorsHash []byte `protobuf:"bytes,2,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + ProposerAddress []byte `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + LastCommit *v11.CommitInfo `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` +} + +func (x *CometInfo) Reset() { + *x = CometInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CometInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CometInfo) ProtoMessage() {} + +// Deprecated: Use CometInfo.ProtoReflect.Descriptor instead. +func (*CometInfo) Descriptor() ([]byte, []int) { + return file_cosmos_consensus_v1_consensus_proto_rawDescGZIP(), []int{2} +} + +func (x *CometInfo) GetEvidence() []*v11.Misbehavior { + if x != nil { + return x.Evidence + } + return nil +} + +func (x *CometInfo) GetValidatorsHash() []byte { + if x != nil { + return x.ValidatorsHash + } + return nil +} + +func (x *CometInfo) GetProposerAddress() []byte { + if x != nil { + return x.ProposerAddress + } + return nil +} + +func (x *CometInfo) GetLastCommit() *v11.CommitInfo { + if x != nil { + return x.LastCommit + } + return nil +} + var File_cosmos_consensus_v1_consensus_proto protoreflect.FileDescriptor var file_cosmos_consensus_v1_consensus_proto_rawDesc = []byte{ @@ -1418,50 +2184,66 @@ var file_cosmos_consensus_v1_consensus_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x03, 0x0a, 0x12, 0x43, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x3a, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, - 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, + 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x63, 0x6f, 0x6d, 0x65, + 0x74, 0x62, 0x66, 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x03, 0x0a, 0x12, 0x43, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x3a, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x05, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6d, + 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x3d, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, + 0x12, 0x40, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x04, 0x61, 0x62, 0x63, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x42, 0x43, 0x49, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x02, 0x18, 0x01, 0x52, 0x04, 0x61, 0x62, 0x63, 0x69, 0x12, 0x40, 0x0a, 0x09, 0x73, 0x79, 0x6e, + 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x18, 0x06, 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, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x12, 0x3a, 0x0a, 0x07, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x12, 0x3d, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x04, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x04, 0x61, 0x62, 0x63, 0x69, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x42, 0x43, 0x49, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x61, 0x62, 0x63, 0x69, 0x12, 0x40, 0x0a, 0x09, 0x73, - 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x18, 0x06, 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, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x12, 0x3a, 0x0a, - 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc9, 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, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 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, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x39, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x01, 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, 0x02, 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, 0x03, 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, 0x04, 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, 0x42, 0xc9, 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, 0x0e, 0x43, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 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 ( @@ -1476,31 +2258,36 @@ func file_cosmos_consensus_v1_consensus_proto_rawDescGZIP() []byte { return file_cosmos_consensus_v1_consensus_proto_rawDescData } -var file_cosmos_consensus_v1_consensus_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cosmos_consensus_v1_consensus_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_cosmos_consensus_v1_consensus_proto_goTypes = []interface{}{ (*ConsensusMsgParams)(nil), // 0: cosmos.consensus.v1.ConsensusMsgParams (*ConsensusMsgParamsResponse)(nil), // 1: cosmos.consensus.v1.ConsensusMsgParamsResponse - (*v1.VersionParams)(nil), // 2: cometbft.types.v1.VersionParams - (*v1.BlockParams)(nil), // 3: cometbft.types.v1.BlockParams - (*v1.EvidenceParams)(nil), // 4: cometbft.types.v1.EvidenceParams - (*v1.ValidatorParams)(nil), // 5: cometbft.types.v1.ValidatorParams - (*v1.ABCIParams)(nil), // 6: cometbft.types.v1.ABCIParams - (*v1.SynchronyParams)(nil), // 7: cometbft.types.v1.SynchronyParams - (*v1.FeatureParams)(nil), // 8: cometbft.types.v1.FeatureParams + (*CometInfo)(nil), // 2: cosmos.consensus.v1.CometInfo + (*v1.VersionParams)(nil), // 3: cometbft.types.v1.VersionParams + (*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 } var file_cosmos_consensus_v1_consensus_proto_depIdxs = []int32{ - 2, // 0: cosmos.consensus.v1.ConsensusMsgParams.version:type_name -> cometbft.types.v1.VersionParams - 3, // 1: cosmos.consensus.v1.ConsensusMsgParams.block:type_name -> cometbft.types.v1.BlockParams - 4, // 2: cosmos.consensus.v1.ConsensusMsgParams.evidence:type_name -> cometbft.types.v1.EvidenceParams - 5, // 3: cosmos.consensus.v1.ConsensusMsgParams.validator:type_name -> cometbft.types.v1.ValidatorParams - 6, // 4: cosmos.consensus.v1.ConsensusMsgParams.abci:type_name -> cometbft.types.v1.ABCIParams - 7, // 5: cosmos.consensus.v1.ConsensusMsgParams.synchrony:type_name -> cometbft.types.v1.SynchronyParams - 8, // 6: cosmos.consensus.v1.ConsensusMsgParams.feature:type_name -> cometbft.types.v1.FeatureParams - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 3, // 0: cosmos.consensus.v1.ConsensusMsgParams.version:type_name -> cometbft.types.v1.VersionParams + 4, // 1: cosmos.consensus.v1.ConsensusMsgParams.block:type_name -> cometbft.types.v1.BlockParams + 5, // 2: cosmos.consensus.v1.ConsensusMsgParams.evidence:type_name -> cometbft.types.v1.EvidenceParams + 6, // 3: cosmos.consensus.v1.ConsensusMsgParams.validator:type_name -> cometbft.types.v1.ValidatorParams + 7, // 4: cosmos.consensus.v1.ConsensusMsgParams.abci:type_name -> cometbft.types.v1.ABCIParams + 8, // 5: cosmos.consensus.v1.ConsensusMsgParams.synchrony:type_name -> cometbft.types.v1.SynchronyParams + 9, // 6: cosmos.consensus.v1.ConsensusMsgParams.feature:type_name -> cometbft.types.v1.FeatureParams + 10, // 7: cosmos.consensus.v1.CometInfo.evidence:type_name -> cometbft.abci.v1.Misbehavior + 11, // 8: cosmos.consensus.v1.CometInfo.last_commit:type_name -> cometbft.abci.v1.CommitInfo + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_cosmos_consensus_v1_consensus_proto_init() } @@ -1533,6 +2320,18 @@ func file_cosmos_consensus_v1_consensus_proto_init() { return nil } } + file_cosmos_consensus_v1_consensus_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CometInfo); 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{ @@ -1540,7 +2339,7 @@ func file_cosmos_consensus_v1_consensus_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_consensus_v1_consensus_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/x/circuit/types/tx.pb.go b/x/circuit/types/tx.pb.go index 667cce9d9d7a..61b184831ac3 100644 --- a/x/circuit/types/tx.pb.go +++ b/x/circuit/types/tx.pb.go @@ -453,7 +453,7 @@ type MsgServer interface { // TripCircuitBreaker pauses processing of Msg's in the state machine. TripCircuitBreaker(context.Context, *MsgTripCircuitBreaker) (*MsgTripCircuitBreakerResponse, error) // ResetCircuitBreaker resumes processing of Msg's in the state machine that - // have been been paused using TripCircuitBreaker. + // have been paused using TripCircuitBreaker. ResetCircuitBreaker(context.Context, *MsgResetCircuitBreaker) (*MsgResetCircuitBreakerResponse, error) } diff --git a/proto/cosmos/consensus/v1/consensus.proto b/x/consensus/proto/cosmos/consensus/v1/consensus.proto similarity index 69% rename from proto/cosmos/consensus/v1/consensus.proto rename to x/consensus/proto/cosmos/consensus/v1/consensus.proto index 45e2ba69ac74..ab5b84ab87b6 100644 --- a/proto/cosmos/consensus/v1/consensus.proto +++ b/x/consensus/proto/cosmos/consensus/v1/consensus.proto @@ -1,8 +1,9 @@ -// Since: cosmos-sdk 0.51 +// Since: cosmos-sdk 0.52 syntax = "proto3"; package cosmos.consensus.v1; import "cometbft/types/v1/params.proto"; +import "cometbft/abci/v1/types.proto"; option go_package = "cosmossdk.io/x/consensus/types"; @@ -23,3 +24,11 @@ message ConsensusMsgParams { // ConsensusMsgParamsResponse defines the response structure for executing a // ConsensusMsgParams message. message ConsensusMsgParamsResponse {} + +// CometInfo defines the structure of the x/consensus module's comet info. +message CometInfo { + repeated cometbft.abci.v1.Misbehavior evidence = 1; + bytes validators_hash = 2; + bytes proposer_address = 3; + cometbft.abci.v1.CommitInfo last_commit = 4; +} diff --git a/x/consensus/types/consensus.pb.go b/x/consensus/types/consensus.pb.go index e100d31e3bf7..e1922192c805 100644 --- a/x/consensus/types/consensus.pb.go +++ b/x/consensus/types/consensus.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + v11 "github.com/cometbft/cometbft/api/cometbft/abci/v1" v1 "github.com/cometbft/cometbft/api/cometbft/types/v1" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -158,9 +159,79 @@ func (m *ConsensusMsgParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_ConsensusMsgParamsResponse proto.InternalMessageInfo +// CometInfo defines the structure of the x/consensus module's comet info. +type CometInfo struct { + Evidence []*v11.Misbehavior `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"` + ValidatorsHash []byte `protobuf:"bytes,2,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + ProposerAddress []byte `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + LastCommit *v11.CommitInfo `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` +} + +func (m *CometInfo) Reset() { *m = CometInfo{} } +func (m *CometInfo) String() string { return proto.CompactTextString(m) } +func (*CometInfo) ProtoMessage() {} +func (*CometInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_7ed86dd7d42fb61b, []int{2} +} +func (m *CometInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CometInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CometInfo.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 *CometInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CometInfo.Merge(m, src) +} +func (m *CometInfo) XXX_Size() int { + return m.Size() +} +func (m *CometInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CometInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_CometInfo proto.InternalMessageInfo + +func (m *CometInfo) GetEvidence() []*v11.Misbehavior { + if m != nil { + return m.Evidence + } + return nil +} + +func (m *CometInfo) GetValidatorsHash() []byte { + if m != nil { + return m.ValidatorsHash + } + return nil +} + +func (m *CometInfo) GetProposerAddress() []byte { + if m != nil { + return m.ProposerAddress + } + return nil +} + +func (m *CometInfo) GetLastCommit() *v11.CommitInfo { + if m != nil { + return m.LastCommit + } + return nil +} + func init() { proto.RegisterType((*ConsensusMsgParams)(nil), "cosmos.consensus.v1.ConsensusMsgParams") proto.RegisterType((*ConsensusMsgParamsResponse)(nil), "cosmos.consensus.v1.ConsensusMsgParamsResponse") + proto.RegisterType((*CometInfo)(nil), "cosmos.consensus.v1.CometInfo") } func init() { @@ -168,29 +239,36 @@ func init() { } var fileDescriptor_7ed86dd7d42fb61b = []byte{ - // 349 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd2, 0xcb, 0x4e, 0x02, 0x31, - 0x14, 0x06, 0x60, 0x86, 0xab, 0xd6, 0x5d, 0xdd, 0x34, 0x44, 0x1b, 0xc4, 0x8d, 0x1b, 0x3b, 0xc1, - 0xcb, 0xc6, 0xc4, 0x44, 0x87, 0x68, 0x74, 0x61, 0x62, 0x30, 0x71, 0xe1, 0x6e, 0xa6, 0x14, 0x98, - 0x00, 0xd3, 0xc9, 0xb4, 0x4c, 0xe4, 0x2d, 0x7c, 0x20, 0x1f, 0xc0, 0x25, 0x4b, 0x97, 0x06, 0x5e, - 0xc4, 0xf4, 0x06, 0x26, 0x0e, 0x2b, 0x42, 0xfb, 0x7f, 0xe7, 0x34, 0x67, 0x0e, 0x38, 0xa6, 0x5c, - 0x4c, 0xb9, 0xf0, 0x29, 0x4f, 0x04, 0x4b, 0xc4, 0x4c, 0xf8, 0x79, 0x67, 0xf3, 0x87, 0xa4, 0x19, - 0x97, 0x1c, 0xee, 0x9b, 0x10, 0xd9, 0x9c, 0xe7, 0x9d, 0x26, 0xa6, 0x7c, 0xca, 0x64, 0x34, 0x90, - 0xbe, 0x9c, 0xa7, 0x4c, 0xbb, 0x34, 0xcc, 0xc2, 0xa9, 0x45, 0xed, 0xcf, 0x0a, 0x80, 0x5d, 0x07, - 0x9e, 0xc4, 0xf0, 0x59, 0x5f, 0xc2, 0x2b, 0xd0, 0xc8, 0x59, 0x26, 0x62, 0x9e, 0x20, 0xaf, 0xe5, - 0x9d, 0xec, 0x9d, 0xb5, 0x88, 0x2b, 0x44, 0x74, 0x21, 0x92, 0x77, 0xc8, 0xab, 0x49, 0x18, 0xd2, - 0x73, 0x00, 0x5e, 0x80, 0x5a, 0x34, 0xe1, 0x74, 0x8c, 0xca, 0x5a, 0xe2, 0x02, 0x19, 0xa8, 0x7b, - 0xeb, 0x4c, 0x18, 0x5e, 0x83, 0x1d, 0x96, 0xc7, 0x7d, 0x96, 0x50, 0x86, 0x2a, 0x1a, 0x1e, 0x15, - 0xc0, 0x3b, 0x1b, 0xb1, 0x76, 0x4d, 0xe0, 0x0d, 0xd8, 0xcd, 0xc3, 0x49, 0xdc, 0x0f, 0x25, 0xcf, - 0x50, 0x55, 0xfb, 0x76, 0xd1, 0x93, 0x5d, 0xc6, 0x16, 0xd8, 0x20, 0x78, 0x09, 0xaa, 0x61, 0x44, - 0x63, 0x54, 0xd3, 0xf8, 0xb0, 0x00, 0xdf, 0x06, 0xdd, 0x47, 0xe3, 0x82, 0x32, 0xf2, 0x7a, 0x3a, - 0xae, 0x1a, 0x8b, 0x79, 0x42, 0x47, 0x19, 0x4f, 0xe6, 0xa8, 0xbe, 0xb5, 0xf1, 0x8b, 0xcb, 0xb8, - 0xc6, 0x6b, 0xa4, 0x66, 0x3d, 0x60, 0xa1, 0x9c, 0x65, 0x0c, 0x35, 0xb6, 0xce, 0xfa, 0xde, 0x24, - 0xdc, 0xac, 0x2d, 0x68, 0x1f, 0x80, 0xe6, 0xff, 0xaf, 0xd7, 0x63, 0x22, 0x55, 0x87, 0xc1, 0xc3, - 0xd7, 0x12, 0x7b, 0x8b, 0x25, 0xf6, 0x7e, 0x96, 0xd8, 0xfb, 0x58, 0xe1, 0xd2, 0x62, 0x85, 0x4b, - 0xdf, 0x2b, 0x5c, 0x7a, 0x23, 0xc3, 0x58, 0x8e, 0x66, 0x91, 0x6a, 0xe4, 0xaf, 0x77, 0x4b, 0xfd, - 0x9c, 0x8a, 0xfe, 0xd8, 0x7f, 0xff, 0xb3, 0x68, 0xfa, 0x05, 0x51, 0x5d, 0x6f, 0xcb, 0xf9, 0x6f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0x8b, 0x65, 0x41, 0x89, 0x02, 0x00, 0x00, + // 461 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xcd, 0x6e, 0x13, 0x31, + 0x10, 0xc7, 0xb3, 0x4d, 0x3f, 0xa8, 0x5b, 0x51, 0x64, 0x2e, 0xab, 0x28, 0x58, 0x21, 0x1c, 0x80, + 0xcb, 0x46, 0xe1, 0x43, 0x02, 0xa4, 0x4a, 0x34, 0x11, 0x88, 0x1e, 0x2a, 0xa1, 0x45, 0xe2, 0xc0, + 0x25, 0xf2, 0xee, 0x3a, 0xac, 0xd5, 0xec, 0xce, 0xca, 0xe3, 0xae, 0xc8, 0x5b, 0xf0, 0x40, 0x3c, + 0x00, 0xc7, 0x1e, 0xe1, 0x86, 0x92, 0x17, 0x41, 0xb6, 0xd7, 0x49, 0xaa, 0xa6, 0x47, 0xcf, 0xfc, + 0x7f, 0x33, 0x9e, 0xff, 0xd8, 0xe4, 0x49, 0x0a, 0x58, 0x00, 0x0e, 0x52, 0x28, 0x51, 0x94, 0x78, + 0x85, 0x83, 0x7a, 0xb8, 0x3e, 0x44, 0x95, 0x02, 0x0d, 0xf4, 0xa1, 0x13, 0x45, 0xeb, 0x78, 0x3d, + 0xec, 0xb0, 0x14, 0x0a, 0xa1, 0x93, 0xa9, 0x1e, 0xe8, 0x79, 0x25, 0x2c, 0x57, 0x71, 0xc5, 0x8b, + 0x06, 0xea, 0x74, 0x57, 0x79, 0x9e, 0xa4, 0xd2, 0xa4, 0xad, 0xce, 0x65, 0xfb, 0xbf, 0xda, 0x84, + 0x8e, 0x7d, 0xb9, 0x0b, 0xfc, 0xfe, 0xd9, 0xa2, 0xf4, 0x1d, 0x39, 0xa8, 0x85, 0x42, 0x09, 0x65, + 0x18, 0xf4, 0x82, 0x67, 0x47, 0x2f, 0x7a, 0x91, 0x2f, 0x13, 0x39, 0xbc, 0x1e, 0x46, 0x5f, 0x9d, + 0xc2, 0x21, 0xb1, 0x07, 0xe8, 0x2b, 0xb2, 0x97, 0xcc, 0x20, 0xbd, 0x0c, 0x77, 0x2c, 0xc9, 0xb6, + 0x90, 0x23, 0x93, 0x6f, 0x38, 0x27, 0xa6, 0xa7, 0xe4, 0x9e, 0xa8, 0x65, 0x26, 0xca, 0x54, 0x84, + 0x6d, 0x0b, 0x3e, 0xde, 0x02, 0x7e, 0x68, 0x24, 0x0d, 0xbb, 0x42, 0xe8, 0x7b, 0x72, 0x58, 0xf3, + 0x99, 0xcc, 0xb8, 0x06, 0x15, 0xee, 0x5a, 0xbe, 0xbf, 0xed, 0xca, 0x5e, 0xd3, 0x14, 0x58, 0x43, + 0xf4, 0x35, 0xd9, 0x35, 0x06, 0x85, 0x7b, 0x16, 0x7e, 0xb4, 0x05, 0x3e, 0x1b, 0x8d, 0xcf, 0x1d, + 0x37, 0xda, 0x09, 0x83, 0xd8, 0xca, 0x4d, 0x63, 0x9c, 0x97, 0x69, 0xae, 0xa0, 0x9c, 0x87, 0xfb, + 0x77, 0x36, 0xfe, 0xe2, 0x35, 0xbe, 0xf1, 0x0a, 0x32, 0x5e, 0x4f, 0x05, 0xd7, 0x57, 0x4a, 0x84, + 0x07, 0x77, 0x7a, 0xfd, 0xd1, 0x29, 0xbc, 0xd7, 0x0d, 0xd0, 0xef, 0x92, 0xce, 0xed, 0xed, 0xc5, + 0x02, 0x2b, 0x13, 0xec, 0xff, 0x0d, 0xc8, 0xe1, 0xd8, 0x94, 0x3a, 0x2f, 0xa7, 0x40, 0xdf, 0x6e, + 0x38, 0x1c, 0xf4, 0xda, 0x37, 0x87, 0x34, 0xb3, 0x98, 0x3e, 0x17, 0x12, 0x13, 0x91, 0xf3, 0x5a, + 0x82, 0xda, 0x70, 0xf7, 0x29, 0x39, 0x59, 0x19, 0x85, 0x93, 0x9c, 0x63, 0x6e, 0x97, 0x7b, 0x1c, + 0xdf, 0x5f, 0x87, 0x3f, 0x71, 0xcc, 0xe9, 0x73, 0xf2, 0xa0, 0x52, 0x50, 0x01, 0x0a, 0x35, 0xe1, + 0x59, 0xa6, 0x04, 0xa2, 0xdd, 0xe6, 0x71, 0x7c, 0xe2, 0xe3, 0x67, 0x2e, 0x4c, 0x4f, 0xc9, 0xd1, + 0x8c, 0xa3, 0x9e, 0xa4, 0x50, 0x14, 0x52, 0x37, 0x3b, 0xeb, 0xde, 0xbe, 0xd1, 0xd8, 0xe6, 0xcd, + 0x04, 0x31, 0x31, 0x80, 0x3b, 0x8f, 0xde, 0xfc, 0x5e, 0xb0, 0xe0, 0x7a, 0xc1, 0x82, 0x7f, 0x0b, + 0x16, 0xfc, 0x5c, 0xb2, 0xd6, 0xf5, 0x92, 0xb5, 0xfe, 0x2c, 0x59, 0xeb, 0x1b, 0x73, 0xbf, 0x04, + 0xb3, 0xcb, 0x48, 0xc2, 0xe0, 0xc7, 0xc6, 0x97, 0xb2, 0x6e, 0x26, 0xfb, 0xf6, 0xe5, 0xbf, 0xfc, + 0x1f, 0x00, 0x00, 0xff, 0xff, 0x45, 0xf1, 0x6a, 0x2f, 0x73, 0x03, 0x00, 0x00, } func (m *ConsensusMsgParams) Marshal() (dAtA []byte, err error) { @@ -323,6 +401,69 @@ func (m *ConsensusMsgParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *CometInfo) 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 *CometInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CometInfo) 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 = encodeVarintConsensus(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintConsensus(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x1a + } + if len(m.ValidatorsHash) > 0 { + i -= len(m.ValidatorsHash) + copy(dAtA[i:], m.ValidatorsHash) + i = encodeVarintConsensus(dAtA, i, uint64(len(m.ValidatorsHash))) + i-- + dAtA[i] = 0x12 + } + 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 = encodeVarintConsensus(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintConsensus(dAtA []byte, offset int, v uint64) int { offset -= sovConsensus(v) base := offset @@ -380,6 +521,33 @@ func (m *ConsensusMsgParamsResponse) Size() (n int) { return n } +func (m *CometInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Evidence) > 0 { + for _, e := range m.Evidence { + l = e.Size() + n += 1 + l + sovConsensus(uint64(l)) + } + } + l = len(m.ValidatorsHash) + if l > 0 { + n += 1 + l + sovConsensus(uint64(l)) + } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovConsensus(uint64(l)) + } + if m.LastCommit != nil { + l = m.LastCommit.Size() + n += 1 + l + sovConsensus(uint64(l)) + } + return n +} + func sovConsensus(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -738,6 +906,194 @@ func (m *ConsensusMsgParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *CometInfo) 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 ErrIntOverflowConsensus + } + 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: CometInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CometInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthConsensus + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthConsensus + } + 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 2: + 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 ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthConsensus + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthConsensus + } + 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 3: + 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 ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthConsensus + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthConsensus + } + 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 4: + 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 ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthConsensus + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthConsensus + } + 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 := skipConsensus(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthConsensus + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipConsensus(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From 5ac07f7b1ca01657cec68ee5600acb60be3f3a78 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Mon, 10 Jun 2024 18:22:33 +0200 Subject: [PATCH 02/12] more changes --- x/consensus/keeper/keeper.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x/consensus/keeper/keeper.go b/x/consensus/keeper/keeper.go index ebcf2dab53c0..11226feab12f 100644 --- a/x/consensus/keeper/keeper.go +++ b/x/consensus/keeper/keeper.go @@ -25,6 +25,8 @@ 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 @@ -35,6 +37,7 @@ 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)), } } From 430fa042baee442fee101ae6ad9c9a8ff4965f8a Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Mon, 10 Jun 2024 18:26:38 +0200 Subject: [PATCH 03/12] reduce --- api/cosmos/consensus/v1/consensus.pulsar.go | 1196 +---------------- .../proto/cosmos/consensus/v1/consensus.proto | 15 - x/consensus/types/consensus.pb.go | 617 +-------- 3 files changed, 101 insertions(+), 1727 deletions(-) diff --git a/api/cosmos/consensus/v1/consensus.pulsar.go b/api/cosmos/consensus/v1/consensus.pulsar.go index 86921baead1f..d366aeef45d3 100644 --- a/api/cosmos/consensus/v1/consensus.pulsar.go +++ b/api/cosmos/consensus/v1/consensus.pulsar.go @@ -2,8 +2,7 @@ package consensusv1 import ( - v11 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/abci/v1" - v1 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/types/v1" + v1 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/abci/v1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -14,915 +13,6 @@ import ( sync "sync" ) -var ( - md_ConsensusMsgParams protoreflect.MessageDescriptor - fd_ConsensusMsgParams_version protoreflect.FieldDescriptor - fd_ConsensusMsgParams_block protoreflect.FieldDescriptor - fd_ConsensusMsgParams_evidence protoreflect.FieldDescriptor - fd_ConsensusMsgParams_validator protoreflect.FieldDescriptor - fd_ConsensusMsgParams_abci protoreflect.FieldDescriptor - fd_ConsensusMsgParams_synchrony protoreflect.FieldDescriptor - fd_ConsensusMsgParams_feature protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_consensus_v1_consensus_proto_init() - md_ConsensusMsgParams = File_cosmos_consensus_v1_consensus_proto.Messages().ByName("ConsensusMsgParams") - fd_ConsensusMsgParams_version = md_ConsensusMsgParams.Fields().ByName("version") - fd_ConsensusMsgParams_block = md_ConsensusMsgParams.Fields().ByName("block") - fd_ConsensusMsgParams_evidence = md_ConsensusMsgParams.Fields().ByName("evidence") - fd_ConsensusMsgParams_validator = md_ConsensusMsgParams.Fields().ByName("validator") - fd_ConsensusMsgParams_abci = md_ConsensusMsgParams.Fields().ByName("abci") - fd_ConsensusMsgParams_synchrony = md_ConsensusMsgParams.Fields().ByName("synchrony") - fd_ConsensusMsgParams_feature = md_ConsensusMsgParams.Fields().ByName("feature") -} - -var _ protoreflect.Message = (*fastReflection_ConsensusMsgParams)(nil) - -type fastReflection_ConsensusMsgParams ConsensusMsgParams - -func (x *ConsensusMsgParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_ConsensusMsgParams)(x) -} - -func (x *ConsensusMsgParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_consensus_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_ConsensusMsgParams_messageType fastReflection_ConsensusMsgParams_messageType -var _ protoreflect.MessageType = fastReflection_ConsensusMsgParams_messageType{} - -type fastReflection_ConsensusMsgParams_messageType struct{} - -func (x fastReflection_ConsensusMsgParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_ConsensusMsgParams)(nil) -} -func (x fastReflection_ConsensusMsgParams_messageType) New() protoreflect.Message { - return new(fastReflection_ConsensusMsgParams) -} -func (x fastReflection_ConsensusMsgParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusMsgParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ConsensusMsgParams) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusMsgParams -} - -// 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_ConsensusMsgParams) Type() protoreflect.MessageType { - return _fastReflection_ConsensusMsgParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ConsensusMsgParams) New() protoreflect.Message { - return new(fastReflection_ConsensusMsgParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ConsensusMsgParams) Interface() protoreflect.ProtoMessage { - return (*ConsensusMsgParams)(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_ConsensusMsgParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Version != nil { - value := protoreflect.ValueOfMessage(x.Version.ProtoReflect()) - if !f(fd_ConsensusMsgParams_version, value) { - return - } - } - if x.Block != nil { - value := protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - if !f(fd_ConsensusMsgParams_block, value) { - return - } - } - if x.Evidence != nil { - value := protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - if !f(fd_ConsensusMsgParams_evidence, value) { - return - } - } - if x.Validator != nil { - value := protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - if !f(fd_ConsensusMsgParams_validator, value) { - return - } - } - if x.Abci != nil { - value := protoreflect.ValueOfMessage(x.Abci.ProtoReflect()) - if !f(fd_ConsensusMsgParams_abci, value) { - return - } - } - if x.Synchrony != nil { - value := protoreflect.ValueOfMessage(x.Synchrony.ProtoReflect()) - if !f(fd_ConsensusMsgParams_synchrony, value) { - return - } - } - if x.Feature != nil { - value := protoreflect.ValueOfMessage(x.Feature.ProtoReflect()) - if !f(fd_ConsensusMsgParams_feature, 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_ConsensusMsgParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - return x.Version != nil - case "cosmos.consensus.v1.ConsensusMsgParams.block": - return x.Block != nil - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - return x.Evidence != nil - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - return x.Validator != nil - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - return x.Abci != nil - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - return x.Synchrony != nil - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - return x.Feature != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams 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_ConsensusMsgParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - x.Version = nil - case "cosmos.consensus.v1.ConsensusMsgParams.block": - x.Block = nil - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - x.Evidence = nil - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - x.Validator = nil - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - x.Abci = nil - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - x.Synchrony = nil - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - x.Feature = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams 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_ConsensusMsgParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - value := x.Version - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.block": - value := x.Block - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - value := x.Evidence - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - value := x.Validator - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - value := x.Abci - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - value := x.Synchrony - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - value := x.Feature - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams 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_ConsensusMsgParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - x.Version = value.Message().Interface().(*v1.VersionParams) - case "cosmos.consensus.v1.ConsensusMsgParams.block": - x.Block = value.Message().Interface().(*v1.BlockParams) - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - x.Evidence = value.Message().Interface().(*v1.EvidenceParams) - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - x.Validator = value.Message().Interface().(*v1.ValidatorParams) - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - x.Abci = value.Message().Interface().(*v1.ABCIParams) - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - x.Synchrony = value.Message().Interface().(*v1.SynchronyParams) - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - x.Feature = value.Message().Interface().(*v1.FeatureParams) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams 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_ConsensusMsgParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - if x.Version == nil { - x.Version = new(v1.VersionParams) - } - return protoreflect.ValueOfMessage(x.Version.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.block": - if x.Block == nil { - x.Block = new(v1.BlockParams) - } - return protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - if x.Evidence == nil { - x.Evidence = new(v1.EvidenceParams) - } - return protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - if x.Validator == nil { - x.Validator = new(v1.ValidatorParams) - } - return protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - if x.Abci == nil { - x.Abci = new(v1.ABCIParams) - } - return protoreflect.ValueOfMessage(x.Abci.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - if x.Synchrony == nil { - x.Synchrony = new(v1.SynchronyParams) - } - return protoreflect.ValueOfMessage(x.Synchrony.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - if x.Feature == nil { - x.Feature = new(v1.FeatureParams) - } - return protoreflect.ValueOfMessage(x.Feature.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams 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_ConsensusMsgParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - m := new(v1.VersionParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.block": - m := new(v1.BlockParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - m := new(v1.EvidenceParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - m := new(v1.ValidatorParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - m := new(v1.ABCIParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - m := new(v1.SynchronyParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - m := new(v1.FeatureParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams 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_ConsensusMsgParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.ConsensusMsgParams", 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_ConsensusMsgParams) 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_ConsensusMsgParams) 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_ConsensusMsgParams) 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_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ConsensusMsgParams) - 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.Version != nil { - l = options.Size(x.Version) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Block != nil { - l = options.Size(x.Block) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Evidence != nil { - l = options.Size(x.Evidence) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Validator != nil { - l = options.Size(x.Validator) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Abci != nil { - l = options.Size(x.Abci) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Synchrony != nil { - l = options.Size(x.Synchrony) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Feature != nil { - l = options.Size(x.Feature) - 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().(*ConsensusMsgParams) - 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.Feature != nil { - encoded, err := options.Marshal(x.Feature) - 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] = 0x3a - } - if x.Synchrony != nil { - encoded, err := options.Marshal(x.Synchrony) - 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] = 0x32 - } - if x.Abci != nil { - encoded, err := options.Marshal(x.Abci) - 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 x.Validator != nil { - encoded, err := options.Marshal(x.Validator) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Evidence != nil { - encoded, err := options.Marshal(x.Evidence) - 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] = 0x1a - } - if x.Block != nil { - encoded, err := options.Marshal(x.Block) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Version != nil { - encoded, err := options.Marshal(x.Version) - 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().(*ConsensusMsgParams) - 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: ConsensusMsgParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConsensusMsgParams: 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 Version", 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.Version == nil { - x.Version = &v1.VersionParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Version); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Block", 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.Block == nil { - x.Block = &v1.BlockParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Block); 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 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 - } - if x.Evidence == nil { - x.Evidence = &v1.EvidenceParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator == nil { - x.Validator = &v1.ValidatorParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validator); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Abci", 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.Abci == nil { - x.Abci = &v1.ABCIParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Abci); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Synchrony", 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.Synchrony == nil { - x.Synchrony = &v1.SynchronyParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Synchrony); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Feature", 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.Feature == nil { - x.Feature = &v1.FeatureParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Feature); 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_ConsensusMsgParamsResponse protoreflect.MessageDescriptor ) @@ -941,7 +31,7 @@ func (x *ConsensusMsgParamsResponse) ProtoReflect() protoreflect.Message { } func (x *ConsensusMsgParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[1] + mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1282,7 +372,7 @@ func (x *fastReflection_ConsensusMsgParamsResponse) ProtoMethods() *protoiface.M var _ protoreflect.List = (*_CometInfo_1_list)(nil) type _CometInfo_1_list struct { - list *[]*v11.Misbehavior + list *[]*v1.Misbehavior } func (x *_CometInfo_1_list) Len() int { @@ -1298,18 +388,18 @@ func (x *_CometInfo_1_list) Get(i int) protoreflect.Value { func (x *_CometInfo_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v11.Misbehavior) + concreteValue := valueUnwrapped.Interface().(*v1.Misbehavior) (*x.list)[i] = concreteValue } func (x *_CometInfo_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v11.Misbehavior) + concreteValue := valueUnwrapped.Interface().(*v1.Misbehavior) *x.list = append(*x.list, concreteValue) } func (x *_CometInfo_1_list) AppendMutable() protoreflect.Value { - v := new(v11.Misbehavior) + v := new(v1.Misbehavior) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -1322,7 +412,7 @@ func (x *_CometInfo_1_list) Truncate(n int) { } func (x *_CometInfo_1_list) NewElement() protoreflect.Value { - v := new(v11.Misbehavior) + v := new(v1.Misbehavior) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -1356,7 +446,7 @@ func (x *CometInfo) ProtoReflect() protoreflect.Message { } func (x *CometInfo) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[2] + mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1543,7 +633,7 @@ func (x *fastReflection_CometInfo) Set(fd protoreflect.FieldDescriptor, value pr case "cosmos.consensus.v1.CometInfo.proposer_address": x.ProposerAddress = value.Bytes() case "cosmos.consensus.v1.CometInfo.last_commit": - x.LastCommit = value.Message().Interface().(*v11.CommitInfo) + x.LastCommit = value.Message().Interface().(*v1.CommitInfo) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.CometInfo")) @@ -1566,13 +656,13 @@ func (x *fastReflection_CometInfo) Mutable(fd protoreflect.FieldDescriptor) prot switch fd.FullName() { case "cosmos.consensus.v1.CometInfo.evidence": if x.Evidence == nil { - x.Evidence = []*v11.Misbehavior{} + x.Evidence = []*v1.Misbehavior{} } value := &_CometInfo_1_list{list: &x.Evidence} return protoreflect.ValueOfList(value) case "cosmos.consensus.v1.CometInfo.last_commit": if x.LastCommit == nil { - x.LastCommit = new(v11.CommitInfo) + x.LastCommit = new(v1.CommitInfo) } return protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) case "cosmos.consensus.v1.CometInfo.validators_hash": @@ -1593,14 +683,14 @@ func (x *fastReflection_CometInfo) Mutable(fd protoreflect.FieldDescriptor) prot func (x *fastReflection_CometInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "cosmos.consensus.v1.CometInfo.evidence": - list := []*v11.Misbehavior{} + list := []*v1.Misbehavior{} return protoreflect.ValueOfList(&_CometInfo_1_list{list: &list}) case "cosmos.consensus.v1.CometInfo.validators_hash": return protoreflect.ValueOfBytes(nil) case "cosmos.consensus.v1.CometInfo.proposer_address": return protoreflect.ValueOfBytes(nil) case "cosmos.consensus.v1.CometInfo.last_commit": - m := new(v11.CommitInfo) + m := new(v1.CommitInfo) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { @@ -1840,7 +930,7 @@ func (x *fastReflection_CometInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Evidence = append(x.Evidence, &v11.Misbehavior{}) + x.Evidence = append(x.Evidence, &v1.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 } @@ -1943,7 +1033,7 @@ func (x *fastReflection_CometInfo) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.LastCommit == nil { - x.LastCommit = &v11.CommitInfo{} + x.LastCommit = &v1.CommitInfo{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastCommit); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err @@ -1999,95 +1089,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft. -type ConsensusMsgParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines the x/consensus parameters to be passed from comet. - // - // NOTE: All parameters must be supplied. - Version *v1.VersionParams `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Block *v1.BlockParams `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` - Evidence *v1.EvidenceParams `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"` - Validator *v1.ValidatorParams `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` - // Deprecated: Do not use. - Abci *v1.ABCIParams `protobuf:"bytes,5,opt,name=abci,proto3" json:"abci,omitempty"` - Synchrony *v1.SynchronyParams `protobuf:"bytes,6,opt,name=synchrony,proto3" json:"synchrony,omitempty"` - Feature *v1.FeatureParams `protobuf:"bytes,7,opt,name=feature,proto3" json:"feature,omitempty"` -} - -func (x *ConsensusMsgParams) Reset() { - *x = ConsensusMsgParams{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConsensusMsgParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConsensusMsgParams) ProtoMessage() {} - -// Deprecated: Use ConsensusMsgParams.ProtoReflect.Descriptor instead. -func (*ConsensusMsgParams) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_consensus_proto_rawDescGZIP(), []int{0} -} - -func (x *ConsensusMsgParams) GetVersion() *v1.VersionParams { - if x != nil { - return x.Version - } - return nil -} - -func (x *ConsensusMsgParams) GetBlock() *v1.BlockParams { - if x != nil { - return x.Block - } - return nil -} - -func (x *ConsensusMsgParams) GetEvidence() *v1.EvidenceParams { - if x != nil { - return x.Evidence - } - return nil -} - -func (x *ConsensusMsgParams) GetValidator() *v1.ValidatorParams { - if x != nil { - return x.Validator - } - return nil -} - -// Deprecated: Do not use. -func (x *ConsensusMsgParams) GetAbci() *v1.ABCIParams { - if x != nil { - return x.Abci - } - return nil -} - -func (x *ConsensusMsgParams) GetSynchrony() *v1.SynchronyParams { - if x != nil { - return x.Synchrony - } - return nil -} - -func (x *ConsensusMsgParams) GetFeature() *v1.FeatureParams { - if x != nil { - return x.Feature - } - return nil -} - // ConsensusMsgParamsResponse defines the response structure for executing a // ConsensusMsgParams message. type ConsensusMsgParamsResponse struct { @@ -2099,7 +1100,7 @@ type ConsensusMsgParamsResponse struct { func (x *ConsensusMsgParamsResponse) Reset() { *x = ConsensusMsgParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[1] + mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2113,7 +1114,7 @@ func (*ConsensusMsgParamsResponse) ProtoMessage() {} // Deprecated: Use ConsensusMsgParamsResponse.ProtoReflect.Descriptor instead. func (*ConsensusMsgParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_consensus_proto_rawDescGZIP(), []int{1} + return file_cosmos_consensus_v1_consensus_proto_rawDescGZIP(), []int{0} } // CometInfo defines the structure of the x/consensus module's comet info. @@ -2122,16 +1123,16 @@ type CometInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Evidence []*v11.Misbehavior `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"` - ValidatorsHash []byte `protobuf:"bytes,2,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` - ProposerAddress []byte `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` - LastCommit *v11.CommitInfo `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` + Evidence []*v1.Misbehavior `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"` + ValidatorsHash []byte `protobuf:"bytes,2,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + ProposerAddress []byte `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + LastCommit *v1.CommitInfo `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` } func (x *CometInfo) Reset() { *x = CometInfo{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[2] + mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2145,10 +1146,10 @@ func (*CometInfo) ProtoMessage() {} // Deprecated: Use CometInfo.ProtoReflect.Descriptor instead. func (*CometInfo) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_consensus_proto_rawDescGZIP(), []int{2} + return file_cosmos_consensus_v1_consensus_proto_rawDescGZIP(), []int{1} } -func (x *CometInfo) GetEvidence() []*v11.Misbehavior { +func (x *CometInfo) GetEvidence() []*v1.Misbehavior { if x != nil { return x.Evidence } @@ -2169,7 +1170,7 @@ func (x *CometInfo) GetProposerAddress() []byte { return nil } -func (x *CometInfo) GetLastCommit() *v11.CommitInfo { +func (x *CometInfo) GetLastCommit() *v1.CommitInfo { if x != nil { return x.LastCommit } @@ -2182,68 +1183,38 @@ var file_cosmos_consensus_v1_consensus_proto_rawDesc = []byte{ 0x0a, 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, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x63, 0x6f, 0x6d, 0x65, - 0x74, 0x62, 0x66, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x63, 0x6f, 0x6d, 0x65, + 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x03, 0x0a, 0x12, 0x43, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x3a, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x05, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6d, - 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x3d, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, - 0x12, 0x40, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x04, 0x61, 0x62, 0x63, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x42, 0x43, 0x49, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, - 0x02, 0x18, 0x01, 0x52, 0x04, 0x61, 0x62, 0x63, 0x69, 0x12, 0x40, 0x0a, 0x09, 0x73, 0x79, 0x6e, - 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x18, 0x06, 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, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x12, 0x3a, 0x0a, 0x07, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, - 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, 0x73, 0x65, - 0x6e, 0x73, 0x75, 0x73, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x39, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x01, 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, 0x02, 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, 0x03, 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, 0x04, 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, 0x42, 0xc9, 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, 0x0e, 0x43, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 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, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd9, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x65, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x39, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, + 0x18, 0x01, 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, 0x02, 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, 0x03, 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, 0x04, 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, 0x42, 0xc9, 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, 0x0e, + 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 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 ( @@ -2258,36 +1229,21 @@ func file_cosmos_consensus_v1_consensus_proto_rawDescGZIP() []byte { return file_cosmos_consensus_v1_consensus_proto_rawDescData } -var file_cosmos_consensus_v1_consensus_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_cosmos_consensus_v1_consensus_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_cosmos_consensus_v1_consensus_proto_goTypes = []interface{}{ - (*ConsensusMsgParams)(nil), // 0: cosmos.consensus.v1.ConsensusMsgParams - (*ConsensusMsgParamsResponse)(nil), // 1: cosmos.consensus.v1.ConsensusMsgParamsResponse - (*CometInfo)(nil), // 2: cosmos.consensus.v1.CometInfo - (*v1.VersionParams)(nil), // 3: cometbft.types.v1.VersionParams - (*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 + (*ConsensusMsgParamsResponse)(nil), // 0: cosmos.consensus.v1.ConsensusMsgParamsResponse + (*CometInfo)(nil), // 1: cosmos.consensus.v1.CometInfo + (*v1.Misbehavior)(nil), // 2: cometbft.abci.v1.Misbehavior + (*v1.CommitInfo)(nil), // 3: cometbft.abci.v1.CommitInfo } var file_cosmos_consensus_v1_consensus_proto_depIdxs = []int32{ - 3, // 0: cosmos.consensus.v1.ConsensusMsgParams.version:type_name -> cometbft.types.v1.VersionParams - 4, // 1: cosmos.consensus.v1.ConsensusMsgParams.block:type_name -> cometbft.types.v1.BlockParams - 5, // 2: cosmos.consensus.v1.ConsensusMsgParams.evidence:type_name -> cometbft.types.v1.EvidenceParams - 6, // 3: cosmos.consensus.v1.ConsensusMsgParams.validator:type_name -> cometbft.types.v1.ValidatorParams - 7, // 4: cosmos.consensus.v1.ConsensusMsgParams.abci:type_name -> cometbft.types.v1.ABCIParams - 8, // 5: cosmos.consensus.v1.ConsensusMsgParams.synchrony:type_name -> cometbft.types.v1.SynchronyParams - 9, // 6: cosmos.consensus.v1.ConsensusMsgParams.feature:type_name -> cometbft.types.v1.FeatureParams - 10, // 7: cosmos.consensus.v1.CometInfo.evidence:type_name -> cometbft.abci.v1.Misbehavior - 11, // 8: cosmos.consensus.v1.CometInfo.last_commit:type_name -> cometbft.abci.v1.CommitInfo - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 2, // 0: cosmos.consensus.v1.CometInfo.evidence:type_name -> cometbft.abci.v1.Misbehavior + 3, // 1: cosmos.consensus.v1.CometInfo.last_commit:type_name -> cometbft.abci.v1.CommitInfo + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_cosmos_consensus_v1_consensus_proto_init() } @@ -2297,18 +1253,6 @@ func file_cosmos_consensus_v1_consensus_proto_init() { } if !protoimpl.UnsafeEnabled { file_cosmos_consensus_v1_consensus_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConsensusMsgParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_consensus_v1_consensus_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConsensusMsgParamsResponse); i { case 0: return &v.state @@ -2320,7 +1264,7 @@ func file_cosmos_consensus_v1_consensus_proto_init() { return nil } } - file_cosmos_consensus_v1_consensus_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_cosmos_consensus_v1_consensus_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CometInfo); i { case 0: return &v.state @@ -2339,7 +1283,7 @@ func file_cosmos_consensus_v1_consensus_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_consensus_v1_consensus_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/x/consensus/proto/cosmos/consensus/v1/consensus.proto b/x/consensus/proto/cosmos/consensus/v1/consensus.proto index ab5b84ab87b6..600eecf3d849 100644 --- a/x/consensus/proto/cosmos/consensus/v1/consensus.proto +++ b/x/consensus/proto/cosmos/consensus/v1/consensus.proto @@ -2,25 +2,10 @@ syntax = "proto3"; package cosmos.consensus.v1; -import "cometbft/types/v1/params.proto"; import "cometbft/abci/v1/types.proto"; option go_package = "cosmossdk.io/x/consensus/types"; -// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft. -message ConsensusMsgParams { - // params defines the x/consensus parameters to be passed from comet. - // - // NOTE: All parameters must be supplied. - cometbft.types.v1.VersionParams version = 1; - cometbft.types.v1.BlockParams block = 2; - cometbft.types.v1.EvidenceParams evidence = 3; - cometbft.types.v1.ValidatorParams validator = 4; - cometbft.types.v1.ABCIParams abci = 5 [deprecated = true]; - cometbft.types.v1.SynchronyParams synchrony = 6; - cometbft.types.v1.FeatureParams feature = 7; -} - // ConsensusMsgParamsResponse defines the response structure for executing a // ConsensusMsgParams message. message ConsensusMsgParamsResponse {} diff --git a/x/consensus/types/consensus.pb.go b/x/consensus/types/consensus.pb.go index e1922192c805..88655916c0b3 100644 --- a/x/consensus/types/consensus.pb.go +++ b/x/consensus/types/consensus.pb.go @@ -5,8 +5,7 @@ package types import ( fmt "fmt" - v11 "github.com/cometbft/cometbft/api/cometbft/abci/v1" - v1 "github.com/cometbft/cometbft/api/cometbft/types/v1" + v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" proto "github.com/cosmos/gogoproto/proto" io "io" math "math" @@ -24,103 +23,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft. -type ConsensusMsgParams struct { - // params defines the x/consensus parameters to be passed from comet. - // - // NOTE: All parameters must be supplied. - Version *v1.VersionParams `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Block *v1.BlockParams `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` - Evidence *v1.EvidenceParams `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"` - Validator *v1.ValidatorParams `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` - Abci *v1.ABCIParams `protobuf:"bytes,5,opt,name=abci,proto3" json:"abci,omitempty"` // Deprecated: Do not use. - Synchrony *v1.SynchronyParams `protobuf:"bytes,6,opt,name=synchrony,proto3" json:"synchrony,omitempty"` - Feature *v1.FeatureParams `protobuf:"bytes,7,opt,name=feature,proto3" json:"feature,omitempty"` -} - -func (m *ConsensusMsgParams) Reset() { *m = ConsensusMsgParams{} } -func (m *ConsensusMsgParams) String() string { return proto.CompactTextString(m) } -func (*ConsensusMsgParams) ProtoMessage() {} -func (*ConsensusMsgParams) Descriptor() ([]byte, []int) { - return fileDescriptor_7ed86dd7d42fb61b, []int{0} -} -func (m *ConsensusMsgParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsensusMsgParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusMsgParams.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 *ConsensusMsgParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusMsgParams.Merge(m, src) -} -func (m *ConsensusMsgParams) XXX_Size() int { - return m.Size() -} -func (m *ConsensusMsgParams) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusMsgParams.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusMsgParams proto.InternalMessageInfo - -func (m *ConsensusMsgParams) GetVersion() *v1.VersionParams { - if m != nil { - return m.Version - } - return nil -} - -func (m *ConsensusMsgParams) GetBlock() *v1.BlockParams { - if m != nil { - return m.Block - } - return nil -} - -func (m *ConsensusMsgParams) GetEvidence() *v1.EvidenceParams { - if m != nil { - return m.Evidence - } - return nil -} - -func (m *ConsensusMsgParams) GetValidator() *v1.ValidatorParams { - if m != nil { - return m.Validator - } - return nil -} - -// Deprecated: Do not use. -func (m *ConsensusMsgParams) GetAbci() *v1.ABCIParams { - if m != nil { - return m.Abci - } - return nil -} - -func (m *ConsensusMsgParams) GetSynchrony() *v1.SynchronyParams { - if m != nil { - return m.Synchrony - } - return nil -} - -func (m *ConsensusMsgParams) GetFeature() *v1.FeatureParams { - if m != nil { - return m.Feature - } - return nil -} - // ConsensusMsgParamsResponse defines the response structure for executing a // ConsensusMsgParams message. type ConsensusMsgParamsResponse struct { @@ -130,7 +32,7 @@ func (m *ConsensusMsgParamsResponse) Reset() { *m = ConsensusMsgParamsRe func (m *ConsensusMsgParamsResponse) String() string { return proto.CompactTextString(m) } func (*ConsensusMsgParamsResponse) ProtoMessage() {} func (*ConsensusMsgParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ed86dd7d42fb61b, []int{1} + return fileDescriptor_7ed86dd7d42fb61b, []int{0} } func (m *ConsensusMsgParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -161,17 +63,17 @@ var xxx_messageInfo_ConsensusMsgParamsResponse proto.InternalMessageInfo // CometInfo defines the structure of the x/consensus module's comet info. type CometInfo struct { - Evidence []*v11.Misbehavior `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"` - ValidatorsHash []byte `protobuf:"bytes,2,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` - ProposerAddress []byte `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` - LastCommit *v11.CommitInfo `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` + Evidence []*v1.Misbehavior `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"` + ValidatorsHash []byte `protobuf:"bytes,2,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + ProposerAddress []byte `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + LastCommit *v1.CommitInfo `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` } func (m *CometInfo) Reset() { *m = CometInfo{} } func (m *CometInfo) String() string { return proto.CompactTextString(m) } func (*CometInfo) ProtoMessage() {} func (*CometInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_7ed86dd7d42fb61b, []int{2} + return fileDescriptor_7ed86dd7d42fb61b, []int{1} } func (m *CometInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -200,7 +102,7 @@ func (m *CometInfo) XXX_DiscardUnknown() { var xxx_messageInfo_CometInfo proto.InternalMessageInfo -func (m *CometInfo) GetEvidence() []*v11.Misbehavior { +func (m *CometInfo) GetEvidence() []*v1.Misbehavior { if m != nil { return m.Evidence } @@ -221,7 +123,7 @@ func (m *CometInfo) GetProposerAddress() []byte { return nil } -func (m *CometInfo) GetLastCommit() *v11.CommitInfo { +func (m *CometInfo) GetLastCommit() *v1.CommitInfo { if m != nil { return m.LastCommit } @@ -229,7 +131,6 @@ func (m *CometInfo) GetLastCommit() *v11.CommitInfo { } func init() { - proto.RegisterType((*ConsensusMsgParams)(nil), "cosmos.consensus.v1.ConsensusMsgParams") proto.RegisterType((*ConsensusMsgParamsResponse)(nil), "cosmos.consensus.v1.ConsensusMsgParamsResponse") proto.RegisterType((*CometInfo)(nil), "cosmos.consensus.v1.CometInfo") } @@ -239,143 +140,26 @@ func init() { } var fileDescriptor_7ed86dd7d42fb61b = []byte{ - // 461 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xcd, 0x6e, 0x13, 0x31, - 0x10, 0xc7, 0xb3, 0x4d, 0x3f, 0xa8, 0x5b, 0x51, 0x64, 0x2e, 0xab, 0x28, 0x58, 0x21, 0x1c, 0x80, - 0xcb, 0x46, 0xe1, 0x43, 0x02, 0xa4, 0x4a, 0x34, 0x11, 0x88, 0x1e, 0x2a, 0xa1, 0x45, 0xe2, 0xc0, - 0x25, 0xf2, 0xee, 0x3a, 0xac, 0xd5, 0xec, 0xce, 0xca, 0xe3, 0xae, 0xc8, 0x5b, 0xf0, 0x40, 0x3c, - 0x00, 0xc7, 0x1e, 0xe1, 0x86, 0x92, 0x17, 0x41, 0xb6, 0xd7, 0x49, 0xaa, 0xa6, 0x47, 0xcf, 0xfc, - 0x7f, 0x33, 0x9e, 0xff, 0xd8, 0xe4, 0x49, 0x0a, 0x58, 0x00, 0x0e, 0x52, 0x28, 0x51, 0x94, 0x78, - 0x85, 0x83, 0x7a, 0xb8, 0x3e, 0x44, 0x95, 0x02, 0x0d, 0xf4, 0xa1, 0x13, 0x45, 0xeb, 0x78, 0x3d, - 0xec, 0xb0, 0x14, 0x0a, 0xa1, 0x93, 0xa9, 0x1e, 0xe8, 0x79, 0x25, 0x2c, 0x57, 0x71, 0xc5, 0x8b, - 0x06, 0xea, 0x74, 0x57, 0x79, 0x9e, 0xa4, 0xd2, 0xa4, 0xad, 0xce, 0x65, 0xfb, 0xbf, 0xda, 0x84, - 0x8e, 0x7d, 0xb9, 0x0b, 0xfc, 0xfe, 0xd9, 0xa2, 0xf4, 0x1d, 0x39, 0xa8, 0x85, 0x42, 0x09, 0x65, - 0x18, 0xf4, 0x82, 0x67, 0x47, 0x2f, 0x7a, 0x91, 0x2f, 0x13, 0x39, 0xbc, 0x1e, 0x46, 0x5f, 0x9d, - 0xc2, 0x21, 0xb1, 0x07, 0xe8, 0x2b, 0xb2, 0x97, 0xcc, 0x20, 0xbd, 0x0c, 0x77, 0x2c, 0xc9, 0xb6, - 0x90, 0x23, 0x93, 0x6f, 0x38, 0x27, 0xa6, 0xa7, 0xe4, 0x9e, 0xa8, 0x65, 0x26, 0xca, 0x54, 0x84, - 0x6d, 0x0b, 0x3e, 0xde, 0x02, 0x7e, 0x68, 0x24, 0x0d, 0xbb, 0x42, 0xe8, 0x7b, 0x72, 0x58, 0xf3, - 0x99, 0xcc, 0xb8, 0x06, 0x15, 0xee, 0x5a, 0xbe, 0xbf, 0xed, 0xca, 0x5e, 0xd3, 0x14, 0x58, 0x43, - 0xf4, 0x35, 0xd9, 0x35, 0x06, 0x85, 0x7b, 0x16, 0x7e, 0xb4, 0x05, 0x3e, 0x1b, 0x8d, 0xcf, 0x1d, - 0x37, 0xda, 0x09, 0x83, 0xd8, 0xca, 0x4d, 0x63, 0x9c, 0x97, 0x69, 0xae, 0xa0, 0x9c, 0x87, 0xfb, - 0x77, 0x36, 0xfe, 0xe2, 0x35, 0xbe, 0xf1, 0x0a, 0x32, 0x5e, 0x4f, 0x05, 0xd7, 0x57, 0x4a, 0x84, - 0x07, 0x77, 0x7a, 0xfd, 0xd1, 0x29, 0xbc, 0xd7, 0x0d, 0xd0, 0xef, 0x92, 0xce, 0xed, 0xed, 0xc5, - 0x02, 0x2b, 0x13, 0xec, 0xff, 0x0d, 0xc8, 0xe1, 0xd8, 0x94, 0x3a, 0x2f, 0xa7, 0x40, 0xdf, 0x6e, - 0x38, 0x1c, 0xf4, 0xda, 0x37, 0x87, 0x34, 0xb3, 0x98, 0x3e, 0x17, 0x12, 0x13, 0x91, 0xf3, 0x5a, - 0x82, 0xda, 0x70, 0xf7, 0x29, 0x39, 0x59, 0x19, 0x85, 0x93, 0x9c, 0x63, 0x6e, 0x97, 0x7b, 0x1c, - 0xdf, 0x5f, 0x87, 0x3f, 0x71, 0xcc, 0xe9, 0x73, 0xf2, 0xa0, 0x52, 0x50, 0x01, 0x0a, 0x35, 0xe1, - 0x59, 0xa6, 0x04, 0xa2, 0xdd, 0xe6, 0x71, 0x7c, 0xe2, 0xe3, 0x67, 0x2e, 0x4c, 0x4f, 0xc9, 0xd1, - 0x8c, 0xa3, 0x9e, 0xa4, 0x50, 0x14, 0x52, 0x37, 0x3b, 0xeb, 0xde, 0xbe, 0xd1, 0xd8, 0xe6, 0xcd, - 0x04, 0x31, 0x31, 0x80, 0x3b, 0x8f, 0xde, 0xfc, 0x5e, 0xb0, 0xe0, 0x7a, 0xc1, 0x82, 0x7f, 0x0b, - 0x16, 0xfc, 0x5c, 0xb2, 0xd6, 0xf5, 0x92, 0xb5, 0xfe, 0x2c, 0x59, 0xeb, 0x1b, 0x73, 0xbf, 0x04, - 0xb3, 0xcb, 0x48, 0xc2, 0xe0, 0xc7, 0xc6, 0x97, 0xb2, 0x6e, 0x26, 0xfb, 0xf6, 0xe5, 0xbf, 0xfc, - 0x1f, 0x00, 0x00, 0xff, 0xff, 0x45, 0xf1, 0x6a, 0x2f, 0x73, 0x03, 0x00, 0x00, -} - -func (m *ConsensusMsgParams) 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 *ConsensusMsgParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusMsgParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Feature != nil { - { - size, err := m.Feature.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.Synchrony != nil { - { - size, err := m.Synchrony.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Abci != nil { - { - size, err := m.Abci.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Validator != nil { - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Evidence != nil { - { - size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Block != nil { - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Version != nil { - { - size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + // 303 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xb1, 0x4e, 0xc3, 0x30, + 0x10, 0x86, 0x6b, 0x8a, 0x10, 0xb8, 0x88, 0xa2, 0xb0, 0x44, 0x55, 0xb1, 0xaa, 0x32, 0x50, 0x16, + 0x47, 0x2d, 0x0b, 0x0c, 0x0c, 0xd0, 0x05, 0x86, 0x4a, 0x28, 0x23, 0x4b, 0xe5, 0x38, 0x2e, 0xb1, + 0x68, 0x72, 0x91, 0xcf, 0x58, 0xf0, 0x16, 0x3c, 0x16, 0x63, 0x47, 0xd8, 0x50, 0xfb, 0x22, 0xc8, + 0x09, 0xa5, 0x48, 0x8c, 0xf7, 0xf9, 0xff, 0x4f, 0xbe, 0x8f, 0x9e, 0x48, 0xc0, 0x1c, 0x30, 0x92, + 0x50, 0xa0, 0x2a, 0xf0, 0x19, 0x23, 0x37, 0xdc, 0x0c, 0xbc, 0x34, 0x60, 0x21, 0x38, 0xaa, 0x43, + 0x7c, 0xc3, 0xdd, 0xb0, 0xd3, 0x95, 0x90, 0x2b, 0x9b, 0xcc, 0x6c, 0x24, 0x12, 0xa9, 0x7d, 0xcd, + 0xbe, 0x96, 0xea, 0xa7, 0xd2, 0xef, 0xd2, 0xce, 0x78, 0x9d, 0x9e, 0xe0, 0xe3, 0xbd, 0x30, 0x22, + 0xc7, 0x58, 0x61, 0xe9, 0x61, 0xff, 0x93, 0xd0, 0xbd, 0xb1, 0xaf, 0xdf, 0x15, 0x33, 0x08, 0x2e, + 0xe9, 0xae, 0x72, 0x3a, 0x55, 0x85, 0x54, 0x21, 0xe9, 0x35, 0x07, 0xad, 0xd1, 0x31, 0x5f, 0x2f, + 0xe7, 0x7e, 0x39, 0x77, 0x43, 0x3e, 0xd1, 0x98, 0xa8, 0x4c, 0x38, 0x0d, 0x26, 0xfe, 0x8d, 0x07, + 0xa7, 0xb4, 0xed, 0xc4, 0x5c, 0xa7, 0xc2, 0x82, 0xc1, 0x69, 0x26, 0x30, 0x0b, 0xb7, 0x7a, 0x64, + 0xb0, 0x1f, 0x1f, 0x6c, 0xf0, 0xad, 0xc0, 0x2c, 0x38, 0xa3, 0x87, 0xa5, 0x81, 0x12, 0x50, 0x99, + 0xa9, 0x48, 0x53, 0xa3, 0x10, 0xc3, 0x66, 0x95, 0x6c, 0xaf, 0xf9, 0x75, 0x8d, 0x83, 0x2b, 0xda, + 0x9a, 0x0b, 0xb4, 0x53, 0x09, 0x79, 0xae, 0x6d, 0xb8, 0xdd, 0x23, 0x83, 0xd6, 0xa8, 0xfb, 0xff, + 0x47, 0xe3, 0xea, 0xdd, 0x5f, 0x10, 0x53, 0x5f, 0xa8, 0xe7, 0x9b, 0x8b, 0xf7, 0x25, 0x23, 0x8b, + 0x25, 0x23, 0x5f, 0x4b, 0x46, 0xde, 0x56, 0xac, 0xb1, 0x58, 0xb1, 0xc6, 0xc7, 0x8a, 0x35, 0x1e, + 0x58, 0xad, 0x11, 0xd3, 0x27, 0xae, 0x21, 0x7a, 0xf9, 0xe3, 0xbc, 0x32, 0x97, 0xec, 0x54, 0xea, + 0xce, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x41, 0xde, 0xef, 0x8a, 0x94, 0x01, 0x00, 0x00, } func (m *ConsensusMsgParamsResponse) Marshal() (dAtA []byte, err error) { @@ -475,43 +259,6 @@ func encodeVarintConsensus(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *ConsensusMsgParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Version != nil { - l = m.Version.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Evidence != nil { - l = m.Evidence.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Validator != nil { - l = m.Validator.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Abci != nil { - l = m.Abci.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Synchrony != nil { - l = m.Synchrony.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Feature != nil { - l = m.Feature.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - return n -} - func (m *ConsensusMsgParamsResponse) Size() (n int) { if m == nil { return 0 @@ -554,308 +301,6 @@ func sovConsensus(x uint64) (n int) { func sozConsensus(x uint64) (n int) { return sovConsensus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *ConsensusMsgParams) 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 ErrIntOverflowConsensus - } - 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: ConsensusMsgParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusMsgParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Version == nil { - m.Version = &v1.VersionParams{} - } - if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Block == nil { - m.Block = &v1.BlockParams{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - 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 ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Evidence == nil { - m.Evidence = &v1.EvidenceParams{} - } - if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Validator == nil { - m.Validator = &v1.ValidatorParams{} - } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Abci", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Abci == nil { - m.Abci = &v1.ABCIParams{} - } - if err := m.Abci.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Synchrony", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Synchrony == nil { - m.Synchrony = &v1.SynchronyParams{} - } - if err := m.Synchrony.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Feature", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Feature == nil { - m.Feature = &v1.FeatureParams{} - } - if err := m.Feature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ConsensusMsgParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -964,7 +409,7 @@ func (m *CometInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Evidence = append(m.Evidence, &v11.Misbehavior{}) + m.Evidence = append(m.Evidence, &v1.Misbehavior{}) if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1067,7 +512,7 @@ func (m *CometInfo) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.LastCommit == nil { - m.LastCommit = &v11.CommitInfo{} + m.LastCommit = &v1.CommitInfo{} } if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err From f39637b62e8a47936c3dd22a821f50332fc125fd Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Wed, 12 Jun 2024 22:46:55 +0200 Subject: [PATCH 04/12] remove it --- cosmossdk.io/server/v2/streaming/grpc.pb.go | 2414 ----------------- .../store/snapshots/types/snapshot.pb.go | 2008 -------------- cosmossdk.io/store/streaming/abci/grpc.pb.go | 1050 ------- cosmossdk.io/store/types/commit_info.pb.go | 864 ------ cosmossdk.io/store/types/listening.pb.go | 785 ------ 5 files changed, 7121 deletions(-) delete mode 100644 cosmossdk.io/server/v2/streaming/grpc.pb.go delete mode 100644 cosmossdk.io/store/snapshots/types/snapshot.pb.go delete mode 100644 cosmossdk.io/store/streaming/abci/grpc.pb.go delete mode 100644 cosmossdk.io/store/types/commit_info.pb.go delete mode 100644 cosmossdk.io/store/types/listening.pb.go diff --git a/cosmossdk.io/server/v2/streaming/grpc.pb.go b/cosmossdk.io/server/v2/streaming/grpc.pb.go deleted file mode 100644 index 4d2d15149c89..000000000000 --- a/cosmossdk.io/server/v2/streaming/grpc.pb.go +++ /dev/null @@ -1,2414 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/streaming/v1/grpc.proto - -package streaming - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ListenDeliverBlockRequest is the request type for the ListenDeliverBlock RPC method -type ListenDeliverBlockRequest struct { - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` - Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` - TxResults []*ExecTxResult `protobuf:"bytes,4,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` -} - -func (m *ListenDeliverBlockRequest) Reset() { *m = ListenDeliverBlockRequest{} } -func (m *ListenDeliverBlockRequest) String() string { return proto.CompactTextString(m) } -func (*ListenDeliverBlockRequest) ProtoMessage() {} -func (*ListenDeliverBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{0} -} -func (m *ListenDeliverBlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenDeliverBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenDeliverBlockRequest.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 *ListenDeliverBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenDeliverBlockRequest.Merge(m, src) -} -func (m *ListenDeliverBlockRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenDeliverBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenDeliverBlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenDeliverBlockRequest proto.InternalMessageInfo - -func (m *ListenDeliverBlockRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ListenDeliverBlockRequest) GetTxs() [][]byte { - if m != nil { - return m.Txs - } - return nil -} - -func (m *ListenDeliverBlockRequest) GetEvents() []*Event { - if m != nil { - return m.Events - } - return nil -} - -func (m *ListenDeliverBlockRequest) GetTxResults() []*ExecTxResult { - if m != nil { - return m.TxResults - } - return nil -} - -// ListenDeliverBlockResponse is the response type for the ListenDeliverBlock RPC method -type ListenDeliverBlockResponse struct { -} - -func (m *ListenDeliverBlockResponse) Reset() { *m = ListenDeliverBlockResponse{} } -func (m *ListenDeliverBlockResponse) String() string { return proto.CompactTextString(m) } -func (*ListenDeliverBlockResponse) ProtoMessage() {} -func (*ListenDeliverBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{1} -} -func (m *ListenDeliverBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenDeliverBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenDeliverBlockResponse.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 *ListenDeliverBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenDeliverBlockResponse.Merge(m, src) -} -func (m *ListenDeliverBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenDeliverBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenDeliverBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenDeliverBlockResponse proto.InternalMessageInfo - -// ListenStateChangesRequest is the request type for the ListenStateChanges RPC method -type ListenStateChangesRequest struct { - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - ChangeSet []*StoreKVPair `protobuf:"bytes,2,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` - AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` -} - -func (m *ListenStateChangesRequest) Reset() { *m = ListenStateChangesRequest{} } -func (m *ListenStateChangesRequest) String() string { return proto.CompactTextString(m) } -func (*ListenStateChangesRequest) ProtoMessage() {} -func (*ListenStateChangesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{2} -} -func (m *ListenStateChangesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenStateChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenStateChangesRequest.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 *ListenStateChangesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenStateChangesRequest.Merge(m, src) -} -func (m *ListenStateChangesRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenStateChangesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenStateChangesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenStateChangesRequest proto.InternalMessageInfo - -func (m *ListenStateChangesRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ListenStateChangesRequest) GetChangeSet() []*StoreKVPair { - if m != nil { - return m.ChangeSet - } - return nil -} - -func (m *ListenStateChangesRequest) GetAppHash() []byte { - if m != nil { - return m.AppHash - } - return nil -} - -// ListenStateChangesResponse is the response type for the ListenStateChanges RPC method -type ListenStateChangesResponse struct { -} - -func (m *ListenStateChangesResponse) Reset() { *m = ListenStateChangesResponse{} } -func (m *ListenStateChangesResponse) String() string { return proto.CompactTextString(m) } -func (*ListenStateChangesResponse) ProtoMessage() {} -func (*ListenStateChangesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{3} -} -func (m *ListenStateChangesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenStateChangesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenStateChangesResponse.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 *ListenStateChangesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenStateChangesResponse.Merge(m, src) -} -func (m *ListenStateChangesResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenStateChangesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenStateChangesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenStateChangesResponse proto.InternalMessageInfo - -// StoreKVPair is a single key-value pair, associated with a store. -type StoreKVPair struct { - // address defines the address of the account the state changes are coming from. - // In case of modules you can expect a stringified - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // key defines the key of the address that changed. - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // value defines the value that changed, empty in case of removal. - Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - // delete defines if the key was removed. - Delete bool `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"` -} - -func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } -func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } -func (*StoreKVPair) ProtoMessage() {} -func (*StoreKVPair) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{4} -} -func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreKVPair.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 *StoreKVPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreKVPair.Merge(m, src) -} -func (m *StoreKVPair) XXX_Size() int { - return m.Size() -} -func (m *StoreKVPair) XXX_DiscardUnknown() { - xxx_messageInfo_StoreKVPair.DiscardUnknown(m) -} - -var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo - -func (m *StoreKVPair) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *StoreKVPair) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *StoreKVPair) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *StoreKVPair) GetDelete() bool { - if m != nil { - return m.Delete - } - return false -} - -// Event is a single event, associated with a transaction. -type Event struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Attributes []*EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` -} - -func (m *Event) Reset() { *m = Event{} } -func (m *Event) String() string { return proto.CompactTextString(m) } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{5} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Event.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 *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func (m *Event) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *Event) GetAttributes() []*EventAttribute { - if m != nil { - return m.Attributes - } - return nil -} - -// EventAttribute is a single key-value pair, associated with an event. -type EventAttribute struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *EventAttribute) Reset() { *m = EventAttribute{} } -func (m *EventAttribute) String() string { return proto.CompactTextString(m) } -func (*EventAttribute) ProtoMessage() {} -func (*EventAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{6} -} -func (m *EventAttribute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventAttribute.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 *EventAttribute) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventAttribute.Merge(m, src) -} -func (m *EventAttribute) XXX_Size() int { - return m.Size() -} -func (m *EventAttribute) XXX_DiscardUnknown() { - xxx_messageInfo_EventAttribute.DiscardUnknown(m) -} - -var xxx_messageInfo_EventAttribute proto.InternalMessageInfo - -func (m *EventAttribute) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *EventAttribute) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -// ExecTxResult contains results of executing one individual transaction. -type ExecTxResult struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` - Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` -} - -func (m *ExecTxResult) Reset() { *m = ExecTxResult{} } -func (m *ExecTxResult) String() string { return proto.CompactTextString(m) } -func (*ExecTxResult) ProtoMessage() {} -func (*ExecTxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{7} -} -func (m *ExecTxResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExecTxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExecTxResult.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 *ExecTxResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExecTxResult.Merge(m, src) -} -func (m *ExecTxResult) XXX_Size() int { - return m.Size() -} -func (m *ExecTxResult) XXX_DiscardUnknown() { - xxx_messageInfo_ExecTxResult.DiscardUnknown(m) -} - -var xxx_messageInfo_ExecTxResult proto.InternalMessageInfo - -func (m *ExecTxResult) GetCode() uint32 { - if m != nil { - return m.Code - } - return 0 -} - -func (m *ExecTxResult) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *ExecTxResult) GetLog() string { - if m != nil { - return m.Log - } - return "" -} - -func (m *ExecTxResult) GetInfo() string { - if m != nil { - return m.Info - } - return "" -} - -func (m *ExecTxResult) GetGasWanted() int64 { - if m != nil { - return m.GasWanted - } - return 0 -} - -func (m *ExecTxResult) GetGasUsed() int64 { - if m != nil { - return m.GasUsed - } - return 0 -} - -func (m *ExecTxResult) GetEvents() []*Event { - if m != nil { - return m.Events - } - return nil -} - -func (m *ExecTxResult) GetCodespace() string { - if m != nil { - return m.Codespace - } - return "" -} - -func init() { - proto.RegisterType((*ListenDeliverBlockRequest)(nil), "cosmos.streaming.v1.ListenDeliverBlockRequest") - proto.RegisterType((*ListenDeliverBlockResponse)(nil), "cosmos.streaming.v1.ListenDeliverBlockResponse") - proto.RegisterType((*ListenStateChangesRequest)(nil), "cosmos.streaming.v1.ListenStateChangesRequest") - proto.RegisterType((*ListenStateChangesResponse)(nil), "cosmos.streaming.v1.ListenStateChangesResponse") - proto.RegisterType((*StoreKVPair)(nil), "cosmos.streaming.v1.StoreKVPair") - proto.RegisterType((*Event)(nil), "cosmos.streaming.v1.Event") - proto.RegisterType((*EventAttribute)(nil), "cosmos.streaming.v1.EventAttribute") - proto.RegisterType((*ExecTxResult)(nil), "cosmos.streaming.v1.ExecTxResult") -} - -func init() { proto.RegisterFile("cosmos/streaming/v1/grpc.proto", fileDescriptor_3fc151d30622bb2a) } - -var fileDescriptor_3fc151d30622bb2a = []byte{ - // 599 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xae, 0x9b, 0x36, 0xa9, 0x27, 0xe1, 0x47, 0x0b, 0x42, 0x6e, 0x55, 0x2c, 0x37, 0x5c, 0x72, - 0x72, 0xd4, 0x70, 0x41, 0x5c, 0x80, 0x16, 0xa4, 0x4a, 0x70, 0x40, 0x1b, 0x7e, 0x24, 0x2e, 0x61, - 0x6b, 0x0f, 0x8e, 0x55, 0xd7, 0x36, 0x3b, 0x6b, 0x93, 0xbe, 0x05, 0x67, 0x1e, 0x08, 0x71, 0xec, - 0x91, 0x23, 0x6a, 0x2f, 0xbc, 0x05, 0x68, 0xd7, 0x6e, 0x93, 0x0a, 0xb7, 0x2a, 0xb7, 0x6f, 0x7e, - 0xbf, 0x6f, 0x3c, 0xe3, 0x05, 0x37, 0xc8, 0xe8, 0x30, 0xa3, 0x21, 0x29, 0x89, 0xe2, 0x30, 0x4e, - 0xa3, 0x61, 0xb9, 0x3d, 0x8c, 0x64, 0x1e, 0xf8, 0xb9, 0xcc, 0x54, 0xc6, 0xee, 0x54, 0x71, 0xff, - 0x3c, 0xee, 0x97, 0xdb, 0xfd, 0xef, 0x16, 0xac, 0xbf, 0x8a, 0x49, 0x61, 0xfa, 0x1c, 0x93, 0xb8, - 0x44, 0xb9, 0x93, 0x64, 0xc1, 0x01, 0xc7, 0xcf, 0x05, 0x92, 0x62, 0x5b, 0xd0, 0xdb, 0xd7, 0xf6, - 0x64, 0x8a, 0x71, 0x34, 0x55, 0x8e, 0xe5, 0x59, 0x83, 0x16, 0xef, 0x1a, 0xdf, 0x9e, 0x71, 0xb1, - 0xdb, 0xd0, 0x52, 0x33, 0x72, 0x96, 0xbd, 0xd6, 0xa0, 0xc7, 0x35, 0x64, 0x23, 0x68, 0x63, 0x89, - 0xa9, 0x22, 0xa7, 0xe5, 0xb5, 0x06, 0xdd, 0xd1, 0x86, 0xdf, 0x40, 0xec, 0xbf, 0xd0, 0x29, 0xbc, - 0xce, 0x64, 0x4f, 0x01, 0xd4, 0x6c, 0x22, 0x91, 0x8a, 0x44, 0x91, 0xb3, 0x62, 0xea, 0xb6, 0x9a, - 0xeb, 0x66, 0x18, 0xbc, 0x99, 0x71, 0x93, 0xc9, 0x6d, 0x55, 0x23, 0xea, 0x6f, 0xc2, 0x46, 0xd3, - 0x1c, 0x94, 0x67, 0x29, 0x61, 0xff, 0xdb, 0xf9, 0x98, 0x63, 0x25, 0x14, 0xee, 0x4e, 0x45, 0x1a, - 0x21, 0xfd, 0xc7, 0x98, 0x4f, 0x00, 0x02, 0x53, 0x34, 0x21, 0x54, 0x66, 0xda, 0xee, 0xc8, 0x6b, - 0x14, 0x38, 0x56, 0x99, 0xc4, 0x97, 0xef, 0x5e, 0x8b, 0x58, 0x72, 0xbb, 0xaa, 0x19, 0xa3, 0x62, - 0xeb, 0xb0, 0x26, 0xf2, 0x7c, 0x32, 0x15, 0x34, 0x75, 0x5a, 0x9e, 0x35, 0xe8, 0xf1, 0x8e, 0xc8, - 0xf3, 0x3d, 0x41, 0xd3, 0xb9, 0xf4, 0x8b, 0xda, 0x6a, 0xe9, 0x11, 0x74, 0x17, 0x5a, 0x32, 0x07, - 0x3a, 0x22, 0x0c, 0x25, 0x12, 0x19, 0x99, 0xba, 0x4d, 0x65, 0xea, 0x4d, 0x1c, 0xe0, 0x91, 0xb3, - 0x6c, 0xbc, 0x1a, 0xb2, 0xbb, 0xb0, 0x5a, 0x8a, 0xa4, 0xc0, 0x9a, 0xb0, 0x32, 0xd8, 0x3d, 0x68, - 0x87, 0x98, 0xa0, 0x42, 0x67, 0xc5, 0xb3, 0x06, 0x6b, 0xbc, 0xb6, 0xfa, 0x1f, 0x61, 0xd5, 0x2c, - 0x85, 0x31, 0x58, 0x51, 0x47, 0x39, 0x9a, 0xfe, 0x36, 0x37, 0x98, 0xed, 0x02, 0x08, 0xa5, 0x64, - 0xbc, 0x5f, 0x28, 0xa4, 0x7a, 0xfe, 0x07, 0x97, 0x2f, 0xf6, 0xd9, 0x59, 0x2e, 0x5f, 0x28, 0xeb, - 0x3f, 0x82, 0x9b, 0x17, 0xa3, 0x67, 0x9a, 0x2b, 0xa6, 0x8b, 0x9a, 0x97, 0x8d, 0xaf, 0x32, 0xfa, - 0xbf, 0x2d, 0xe8, 0x2d, 0x6e, 0x5e, 0x6b, 0x0c, 0xb2, 0xb0, 0xd2, 0x78, 0x83, 0x1b, 0xac, 0x7d, - 0xa1, 0x50, 0xa2, 0xfe, 0x02, 0x06, 0x6b, 0x82, 0x24, 0x8b, 0xcc, 0x07, 0xb0, 0xb9, 0x86, 0x3a, - 0x2b, 0x4e, 0x3f, 0x65, 0x66, 0x78, 0x9b, 0x1b, 0xcc, 0xee, 0x03, 0x44, 0x82, 0x26, 0x5f, 0x44, - 0xaa, 0x30, 0x74, 0x56, 0xcd, 0xfa, 0xed, 0x48, 0xd0, 0x7b, 0xe3, 0xd0, 0xbb, 0xd3, 0xe1, 0x82, - 0x30, 0x74, 0xda, 0x26, 0xd8, 0x89, 0x04, 0xbd, 0x25, 0x0c, 0x17, 0x8e, 0xbd, 0x73, 0xed, 0x63, - 0xdf, 0x04, 0x5b, 0xeb, 0xa5, 0x5c, 0x04, 0xe8, 0xac, 0x19, 0x19, 0x73, 0xc7, 0xe8, 0x8f, 0x05, - 0xb7, 0xaa, 0x73, 0x40, 0x39, 0x46, 0x59, 0xc6, 0x01, 0xb2, 0x02, 0xd8, 0xbf, 0xc7, 0xcd, 0xfc, - 0x46, 0xae, 0x4b, 0xff, 0xe6, 0x8d, 0xe1, 0xb5, 0xf3, 0xab, 0xd3, 0x9b, 0xd3, 0x2e, 0x1e, 0xe6, - 0x95, 0xb4, 0x0d, 0x7f, 0xd7, 0x95, 0xb4, 0x4d, 0x17, 0xbf, 0xf3, 0xf8, 0xc7, 0x89, 0x6b, 0x1d, - 0x9f, 0xb8, 0xd6, 0xaf, 0x13, 0xd7, 0xfa, 0x7a, 0xea, 0x2e, 0x1d, 0x9f, 0xba, 0x4b, 0x3f, 0x4f, - 0xdd, 0xa5, 0x0f, 0x5e, 0xd5, 0x89, 0xc2, 0x03, 0x3f, 0xce, 0x86, 0x84, 0xb2, 0x44, 0x39, 0x2c, - 0x47, 0xf3, 0x27, 0x6f, 0xbf, 0x6d, 0xde, 0xba, 0x87, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3b, - 0xbd, 0x03, 0xda, 0x0d, 0x05, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ListenerServiceClient is the client API for ListenerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ListenerServiceClient interface { - // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock - ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) - // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges - ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) -} - -type listenerServiceClient struct { - cc grpc1.ClientConn -} - -func NewListenerServiceClient(cc grpc1.ClientConn) ListenerServiceClient { - return &listenerServiceClient{cc} -} - -func (c *listenerServiceClient) ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) { - out := new(ListenDeliverBlockResponse) - err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *listenerServiceClient) ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) { - out := new(ListenStateChangesResponse) - err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenStateChanges", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ListenerServiceServer is the server API for ListenerService service. -type ListenerServiceServer interface { - // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock - ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) - // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges - ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) -} - -// UnimplementedListenerServiceServer can be embedded to have forward compatible implementations. -type UnimplementedListenerServiceServer struct { -} - -func (*UnimplementedListenerServiceServer) ListenDeliverBlock(ctx context.Context, req *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenDeliverBlock not implemented") -} -func (*UnimplementedListenerServiceServer) ListenStateChanges(ctx context.Context, req *ListenStateChangesRequest) (*ListenStateChangesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenStateChanges not implemented") -} - -func RegisterListenerServiceServer(s grpc1.Server, srv ListenerServiceServer) { - s.RegisterService(&_ListenerService_serviceDesc, srv) -} - -func _ListenerService_ListenDeliverBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenDeliverBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, req.(*ListenDeliverBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ListenerService_ListenStateChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenStateChangesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ListenerServiceServer).ListenStateChanges(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.streaming.v1.ListenerService/ListenStateChanges", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ListenerServiceServer).ListenStateChanges(ctx, req.(*ListenStateChangesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ListenerService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.streaming.v1.ListenerService", - HandlerType: (*ListenerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListenDeliverBlock", - Handler: _ListenerService_ListenDeliverBlock_Handler, - }, - { - MethodName: "ListenStateChanges", - Handler: _ListenerService_ListenStateChanges_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/streaming/v1/grpc.proto", -} - -func (m *ListenDeliverBlockRequest) 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 *ListenDeliverBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenDeliverBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TxResults) > 0 { - for iNdEx := len(m.TxResults) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TxResults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Txs) > 0 { - for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Txs[iNdEx]) - copy(dAtA[i:], m.Txs[iNdEx]) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Txs[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.BlockHeight != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListenDeliverBlockResponse) 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 *ListenDeliverBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenDeliverBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ListenStateChangesRequest) 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 *ListenStateChangesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenStateChangesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AppHash) > 0 { - i -= len(m.AppHash) - copy(dAtA[i:], m.AppHash) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.AppHash))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChangeSet) > 0 { - for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.BlockHeight != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListenStateChangesResponse) 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 *ListenStateChangesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenStateChangesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *StoreKVPair) 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 *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Delete { - i-- - if m.Delete { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Event) 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 *Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventAttribute) 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 *EventAttribute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExecTxResult) 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 *ExecTxResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExecTxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Codespace) > 0 { - i -= len(m.Codespace) - copy(dAtA[i:], m.Codespace) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Codespace))) - i-- - dAtA[i] = 0x42 - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.GasUsed != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.GasUsed)) - i-- - dAtA[i] = 0x30 - } - if m.GasWanted != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.GasWanted)) - i-- - dAtA[i] = 0x28 - } - if len(m.Info) > 0 { - i -= len(m.Info) - copy(dAtA[i:], m.Info) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Info))) - i-- - dAtA[i] = 0x22 - } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0x1a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { - offset -= sovGrpc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ListenDeliverBlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovGrpc(uint64(m.BlockHeight)) - } - if len(m.Txs) > 0 { - for _, b := range m.Txs { - l = len(b) - n += 1 + l + sovGrpc(uint64(l)) - } - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - if len(m.TxResults) > 0 { - for _, e := range m.TxResults { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - return n -} - -func (m *ListenDeliverBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ListenStateChangesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovGrpc(uint64(m.BlockHeight)) - } - if len(m.ChangeSet) > 0 { - for _, e := range m.ChangeSet { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - l = len(m.AppHash) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func (m *ListenStateChangesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *StoreKVPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - if m.Delete { - n += 2 - } - return n -} - -func (m *Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - return n -} - -func (m *EventAttribute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func (m *ExecTxResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovGrpc(uint64(m.Code)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Log) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Info) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - if m.GasWanted != 0 { - n += 1 + sovGrpc(uint64(m.GasWanted)) - } - if m.GasUsed != 0 { - n += 1 + sovGrpc(uint64(m.GasUsed)) - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - l = len(m.Codespace) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func sovGrpc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGrpc(x uint64) (n int) { - return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ListenDeliverBlockRequest) 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 ErrIntOverflowGrpc - } - 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: ListenDeliverBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenDeliverBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) - copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxResults", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TxResults = append(m.TxResults, &ExecTxResult{}) - if err := m.TxResults[len(m.TxResults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenDeliverBlockResponse) 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 ErrIntOverflowGrpc - } - 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: ListenDeliverBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenDeliverBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenStateChangesRequest) 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 ErrIntOverflowGrpc - } - 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: ListenStateChangesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenStateChangesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangeSet = append(m.ChangeSet, &StoreKVPair{}) - if err := m.ChangeSet[len(m.ChangeSet)-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 AppHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) - if m.AppHash == nil { - m.AppHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenStateChangesResponse) 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 ErrIntOverflowGrpc - } - 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: ListenStateChangesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenStateChangesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreKVPair) 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 ErrIntOverflowGrpc - } - 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: StoreKVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Delete = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Event) 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 ErrIntOverflowGrpc - } - 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: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, &EventAttribute{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventAttribute) 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 ErrIntOverflowGrpc - } - 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: EventAttribute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExecTxResult) 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 ErrIntOverflowGrpc - } - 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: ExecTxResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExecTxResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) - } - m.GasWanted = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasWanted |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - m.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasUsed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGrpc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGrpc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGrpc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGrpc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/snapshots/types/snapshot.pb.go b/cosmossdk.io/store/snapshots/types/snapshot.pb.go deleted file mode 100644 index e81660c4596e..000000000000 --- a/cosmossdk.io/store/snapshots/types/snapshot.pb.go +++ /dev/null @@ -1,2008 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/snapshots/v1/snapshot.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Snapshot contains Tendermint state sync snapshot info. -type Snapshot struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` - Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"` - Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` - Metadata Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata"` -} - -func (m *Snapshot) Reset() { *m = Snapshot{} } -func (m *Snapshot) String() string { return proto.CompactTextString(m) } -func (*Snapshot) ProtoMessage() {} -func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{0} -} -func (m *Snapshot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Snapshot.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 *Snapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_Snapshot.Merge(m, src) -} -func (m *Snapshot) XXX_Size() int { - return m.Size() -} -func (m *Snapshot) XXX_DiscardUnknown() { - xxx_messageInfo_Snapshot.DiscardUnknown(m) -} - -var xxx_messageInfo_Snapshot proto.InternalMessageInfo - -func (m *Snapshot) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *Snapshot) GetFormat() uint32 { - if m != nil { - return m.Format - } - return 0 -} - -func (m *Snapshot) GetChunks() uint32 { - if m != nil { - return m.Chunks - } - return 0 -} - -func (m *Snapshot) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *Snapshot) GetMetadata() Metadata { - if m != nil { - return m.Metadata - } - return Metadata{} -} - -// Metadata contains SDK-specific snapshot metadata. -type Metadata struct { - ChunkHashes [][]byte `protobuf:"bytes,1,rep,name=chunk_hashes,json=chunkHashes,proto3" json:"chunk_hashes,omitempty"` -} - -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{1} -} -func (m *Metadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metadata.Merge(m, src) -} -func (m *Metadata) XXX_Size() int { - return m.Size() -} -func (m *Metadata) XXX_DiscardUnknown() { - xxx_messageInfo_Metadata.DiscardUnknown(m) -} - -var xxx_messageInfo_Metadata proto.InternalMessageInfo - -func (m *Metadata) GetChunkHashes() [][]byte { - if m != nil { - return m.ChunkHashes - } - return nil -} - -// SnapshotItem is an item contained in a rootmulti.Store snapshot. -type SnapshotItem struct { - // item is the specific type of snapshot item. - // - // Types that are valid to be assigned to Item: - // - // *SnapshotItem_Store - // *SnapshotItem_IAVL - // *SnapshotItem_Extension - // *SnapshotItem_ExtensionPayload - Item isSnapshotItem_Item `protobuf_oneof:"item"` -} - -func (m *SnapshotItem) Reset() { *m = SnapshotItem{} } -func (m *SnapshotItem) String() string { return proto.CompactTextString(m) } -func (*SnapshotItem) ProtoMessage() {} -func (*SnapshotItem) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{2} -} -func (m *SnapshotItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotItem.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 *SnapshotItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotItem.Merge(m, src) -} -func (m *SnapshotItem) XXX_Size() int { - return m.Size() -} -func (m *SnapshotItem) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotItem proto.InternalMessageInfo - -type isSnapshotItem_Item interface { - isSnapshotItem_Item() - MarshalTo([]byte) (int, error) - Size() int -} - -type SnapshotItem_Store struct { - Store *SnapshotStoreItem `protobuf:"bytes,1,opt,name=store,proto3,oneof" json:"store,omitempty"` -} -type SnapshotItem_IAVL struct { - IAVL *SnapshotIAVLItem `protobuf:"bytes,2,opt,name=iavl,proto3,oneof" json:"iavl,omitempty"` -} -type SnapshotItem_Extension struct { - Extension *SnapshotExtensionMeta `protobuf:"bytes,3,opt,name=extension,proto3,oneof" json:"extension,omitempty"` -} -type SnapshotItem_ExtensionPayload struct { - ExtensionPayload *SnapshotExtensionPayload `protobuf:"bytes,4,opt,name=extension_payload,json=extensionPayload,proto3,oneof" json:"extension_payload,omitempty"` -} - -func (*SnapshotItem_Store) isSnapshotItem_Item() {} -func (*SnapshotItem_IAVL) isSnapshotItem_Item() {} -func (*SnapshotItem_Extension) isSnapshotItem_Item() {} -func (*SnapshotItem_ExtensionPayload) isSnapshotItem_Item() {} - -func (m *SnapshotItem) GetItem() isSnapshotItem_Item { - if m != nil { - return m.Item - } - return nil -} - -func (m *SnapshotItem) GetStore() *SnapshotStoreItem { - if x, ok := m.GetItem().(*SnapshotItem_Store); ok { - return x.Store - } - return nil -} - -func (m *SnapshotItem) GetIAVL() *SnapshotIAVLItem { - if x, ok := m.GetItem().(*SnapshotItem_IAVL); ok { - return x.IAVL - } - return nil -} - -func (m *SnapshotItem) GetExtension() *SnapshotExtensionMeta { - if x, ok := m.GetItem().(*SnapshotItem_Extension); ok { - return x.Extension - } - return nil -} - -func (m *SnapshotItem) GetExtensionPayload() *SnapshotExtensionPayload { - if x, ok := m.GetItem().(*SnapshotItem_ExtensionPayload); ok { - return x.ExtensionPayload - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SnapshotItem) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*SnapshotItem_Store)(nil), - (*SnapshotItem_IAVL)(nil), - (*SnapshotItem_Extension)(nil), - (*SnapshotItem_ExtensionPayload)(nil), - } -} - -// SnapshotStoreItem contains metadata about a snapshotted store. -type SnapshotStoreItem struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (m *SnapshotStoreItem) Reset() { *m = SnapshotStoreItem{} } -func (m *SnapshotStoreItem) String() string { return proto.CompactTextString(m) } -func (*SnapshotStoreItem) ProtoMessage() {} -func (*SnapshotStoreItem) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{3} -} -func (m *SnapshotStoreItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotStoreItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotStoreItem.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 *SnapshotStoreItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotStoreItem.Merge(m, src) -} -func (m *SnapshotStoreItem) XXX_Size() int { - return m.Size() -} -func (m *SnapshotStoreItem) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotStoreItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotStoreItem proto.InternalMessageInfo - -func (m *SnapshotStoreItem) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -// SnapshotIAVLItem is an exported IAVL node. -type SnapshotIAVLItem struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // version is block height - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - // height is depth of the tree. - Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *SnapshotIAVLItem) Reset() { *m = SnapshotIAVLItem{} } -func (m *SnapshotIAVLItem) String() string { return proto.CompactTextString(m) } -func (*SnapshotIAVLItem) ProtoMessage() {} -func (*SnapshotIAVLItem) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{4} -} -func (m *SnapshotIAVLItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotIAVLItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotIAVLItem.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 *SnapshotIAVLItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotIAVLItem.Merge(m, src) -} -func (m *SnapshotIAVLItem) XXX_Size() int { - return m.Size() -} -func (m *SnapshotIAVLItem) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotIAVLItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotIAVLItem proto.InternalMessageInfo - -func (m *SnapshotIAVLItem) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *SnapshotIAVLItem) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *SnapshotIAVLItem) GetVersion() int64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *SnapshotIAVLItem) GetHeight() int32 { - if m != nil { - return m.Height - } - return 0 -} - -// SnapshotExtensionMeta contains metadata about an external snapshotter. -type SnapshotExtensionMeta struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` -} - -func (m *SnapshotExtensionMeta) Reset() { *m = SnapshotExtensionMeta{} } -func (m *SnapshotExtensionMeta) String() string { return proto.CompactTextString(m) } -func (*SnapshotExtensionMeta) ProtoMessage() {} -func (*SnapshotExtensionMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{5} -} -func (m *SnapshotExtensionMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotExtensionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotExtensionMeta.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 *SnapshotExtensionMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotExtensionMeta.Merge(m, src) -} -func (m *SnapshotExtensionMeta) XXX_Size() int { - return m.Size() -} -func (m *SnapshotExtensionMeta) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotExtensionMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotExtensionMeta proto.InternalMessageInfo - -func (m *SnapshotExtensionMeta) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *SnapshotExtensionMeta) GetFormat() uint32 { - if m != nil { - return m.Format - } - return 0 -} - -// SnapshotExtensionPayload contains payloads of an external snapshotter. -type SnapshotExtensionPayload struct { - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` -} - -func (m *SnapshotExtensionPayload) Reset() { *m = SnapshotExtensionPayload{} } -func (m *SnapshotExtensionPayload) String() string { return proto.CompactTextString(m) } -func (*SnapshotExtensionPayload) ProtoMessage() {} -func (*SnapshotExtensionPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{6} -} -func (m *SnapshotExtensionPayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotExtensionPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotExtensionPayload.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 *SnapshotExtensionPayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotExtensionPayload.Merge(m, src) -} -func (m *SnapshotExtensionPayload) XXX_Size() int { - return m.Size() -} -func (m *SnapshotExtensionPayload) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotExtensionPayload.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotExtensionPayload proto.InternalMessageInfo - -func (m *SnapshotExtensionPayload) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -func init() { - proto.RegisterType((*Snapshot)(nil), "cosmos.store.snapshots.v1.Snapshot") - proto.RegisterType((*Metadata)(nil), "cosmos.store.snapshots.v1.Metadata") - proto.RegisterType((*SnapshotItem)(nil), "cosmos.store.snapshots.v1.SnapshotItem") - proto.RegisterType((*SnapshotStoreItem)(nil), "cosmos.store.snapshots.v1.SnapshotStoreItem") - proto.RegisterType((*SnapshotIAVLItem)(nil), "cosmos.store.snapshots.v1.SnapshotIAVLItem") - proto.RegisterType((*SnapshotExtensionMeta)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionMeta") - proto.RegisterType((*SnapshotExtensionPayload)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionPayload") -} - -func init() { - proto.RegisterFile("cosmos/store/snapshots/v1/snapshot.proto", fileDescriptor_3d5cca1aa5b69183) -} - -var fileDescriptor_3d5cca1aa5b69183 = []byte{ - // 538 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x6f, 0xd3, 0x3c, - 0x18, 0x8e, 0xd7, 0xb4, 0x5f, 0xf7, 0x26, 0x9f, 0xe8, 0xcc, 0x40, 0x61, 0x87, 0x2c, 0x84, 0x4b, - 0x24, 0x68, 0xba, 0x75, 0x88, 0x03, 0xda, 0x85, 0x8a, 0x49, 0xad, 0x00, 0x69, 0xf2, 0x24, 0x84, - 0xb8, 0x54, 0xde, 0x6a, 0x9a, 0xaa, 0x4d, 0x5d, 0xd5, 0x5e, 0x45, 0x8f, 0xfc, 0x03, 0xfe, 0x08, - 0x37, 0x7e, 0xc4, 0x8e, 0x13, 0x27, 0x4e, 0x13, 0x6a, 0xff, 0x02, 0x3f, 0x00, 0xd9, 0x4e, 0x0a, - 0xda, 0x52, 0x34, 0x6e, 0xef, 0xf3, 0xfa, 0x79, 0x1e, 0xfb, 0x7d, 0xec, 0x04, 0xa2, 0x33, 0x2e, - 0x52, 0x2e, 0x1a, 0x42, 0xf2, 0x29, 0x6b, 0x88, 0x31, 0x9d, 0x88, 0x84, 0x4b, 0xd1, 0x98, 0xed, - 0xaf, 0x40, 0x3c, 0x99, 0x72, 0xc9, 0xf1, 0x03, 0xc3, 0x8c, 0x35, 0x33, 0x5e, 0x31, 0xe3, 0xd9, - 0xfe, 0xce, 0x76, 0x9f, 0xf7, 0xb9, 0x66, 0x35, 0x54, 0x65, 0x04, 0x3b, 0x99, 0xa0, 0x6b, 0x16, - 0x32, 0xb5, 0x06, 0xe1, 0x17, 0x04, 0xd5, 0x93, 0xcc, 0x01, 0xdf, 0x87, 0x4a, 0xc2, 0x06, 0xfd, - 0x44, 0x7a, 0x28, 0x40, 0x91, 0x4d, 0x32, 0xa4, 0xfa, 0x1f, 0xf8, 0x34, 0xa5, 0xd2, 0xdb, 0x08, - 0x50, 0xf4, 0x3f, 0xc9, 0x90, 0xea, 0x9f, 0x25, 0xe7, 0xe3, 0xa1, 0xf0, 0x4a, 0xa6, 0x6f, 0x10, - 0xc6, 0x60, 0x27, 0x54, 0x24, 0x9e, 0x1d, 0xa0, 0xc8, 0x25, 0xba, 0xc6, 0x47, 0x50, 0x4d, 0x99, - 0xa4, 0x3d, 0x2a, 0xa9, 0x57, 0x0e, 0x50, 0xe4, 0x34, 0x1f, 0xc5, 0x6b, 0xe7, 0x88, 0xdf, 0x64, - 0xd4, 0x96, 0x7d, 0x71, 0xb5, 0x6b, 0x91, 0x95, 0x34, 0xac, 0x43, 0x35, 0x5f, 0xc3, 0x0f, 0xc1, - 0xd5, 0x1b, 0x76, 0xd5, 0x06, 0x4c, 0x78, 0x28, 0x28, 0x45, 0x2e, 0x71, 0x74, 0xaf, 0xad, 0x5b, - 0xe1, 0xcf, 0x0d, 0x70, 0xf3, 0xf1, 0x3a, 0x92, 0xa5, 0xf8, 0x25, 0x94, 0xf5, 0x76, 0x7a, 0x42, - 0xa7, 0xf9, 0xe4, 0x2f, 0x67, 0xc8, 0x75, 0x27, 0x6a, 0x49, 0x89, 0xdb, 0x16, 0x31, 0x62, 0xfc, - 0x0a, 0xec, 0x01, 0x9d, 0x8d, 0x74, 0x1c, 0x4e, 0xf3, 0xf1, 0x2d, 0x4c, 0x3a, 0x2f, 0xde, 0xbe, - 0x56, 0x1e, 0xad, 0xea, 0xe2, 0x6a, 0xd7, 0x56, 0xa8, 0x6d, 0x11, 0x6d, 0x82, 0x8f, 0x61, 0x93, - 0x7d, 0x94, 0x6c, 0x2c, 0x06, 0x7c, 0xac, 0x83, 0x74, 0x9a, 0x7b, 0xb7, 0x70, 0x3c, 0xca, 0x35, - 0x2a, 0x8f, 0xb6, 0x45, 0x7e, 0x9b, 0xe0, 0x53, 0xd8, 0x5a, 0x81, 0xee, 0x84, 0xce, 0x47, 0x9c, - 0xf6, 0xf4, 0x65, 0x38, 0xcd, 0x83, 0x7f, 0x71, 0x3e, 0x36, 0xd2, 0xb6, 0x45, 0x6a, 0xec, 0x5a, - 0xef, 0xf9, 0xdd, 0x6f, 0x5f, 0xeb, 0x77, 0x8c, 0x57, 0x5d, 0xf4, 0x86, 0xc1, 0x5e, 0xfc, 0xf4, - 0x59, 0xab, 0x02, 0xf6, 0x40, 0xb2, 0x34, 0x3c, 0x84, 0xad, 0x1b, 0xe9, 0xa9, 0x57, 0x31, 0xa6, - 0xa9, 0x49, 0x7e, 0x93, 0xe8, 0xba, 0xd0, 0x25, 0xfc, 0x84, 0xa0, 0x76, 0x3d, 0x37, 0x5c, 0x83, - 0xd2, 0x90, 0xcd, 0xb5, 0xd8, 0x25, 0xaa, 0xc4, 0xdb, 0x50, 0x9e, 0xd1, 0xd1, 0x39, 0xd3, 0xb7, - 0xe0, 0x12, 0x03, 0xb0, 0x07, 0xff, 0xcd, 0xd8, 0x74, 0x95, 0x65, 0x89, 0xe4, 0xf0, 0x8f, 0xd7, - 0xad, 0xa2, 0x28, 0xe7, 0xaf, 0xbb, 0xf8, 0x0c, 0xef, 0xe0, 0x5e, 0x61, 0xd0, 0x45, 0x53, 0xac, - 0xfb, 0x3e, 0x8a, 0x9d, 0x3b, 0xe0, 0xad, 0x0b, 0x5a, 0x1d, 0x3e, 0xbf, 0x2e, 0x33, 0x68, 0x0e, - 0x8b, 0xe3, 0x3e, 0xbc, 0x58, 0xf8, 0xe8, 0x72, 0xe1, 0xa3, 0x1f, 0x0b, 0x1f, 0x7d, 0x5e, 0xfa, - 0xd6, 0xe5, 0xd2, 0xb7, 0xbe, 0x2f, 0x7d, 0xeb, 0x7d, 0x68, 0xa8, 0xa2, 0x37, 0x8c, 0x07, 0xfc, - 0xc6, 0x2f, 0x45, 0xce, 0x27, 0x4c, 0x9c, 0x56, 0xf4, 0x1f, 0xe0, 0xe0, 0x57, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x57, 0xe2, 0xd5, 0x36, 0x79, 0x04, 0x00, 0x00, -} - -func (m *Snapshot) 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 *Snapshot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x22 - } - if m.Chunks != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Chunks)) - i-- - dAtA[i] = 0x18 - } - if m.Format != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Metadata) 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 *Metadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChunkHashes) > 0 { - for iNdEx := len(m.ChunkHashes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ChunkHashes[iNdEx]) - copy(dAtA[i:], m.ChunkHashes[iNdEx]) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.ChunkHashes[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SnapshotItem) 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 *SnapshotItem) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Item != nil { - { - size := m.Item.Size() - i -= size - if _, err := m.Item.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *SnapshotItem_Store) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_Store) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Store != nil { - { - size, err := m.Store.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *SnapshotItem_IAVL) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_IAVL) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.IAVL != nil { - { - size, err := m.IAVL.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *SnapshotItem_Extension) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_Extension) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Extension != nil { - { - size, err := m.Extension.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *SnapshotItem_ExtensionPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_ExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ExtensionPayload != nil { - { - size, err := m.ExtensionPayload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *SnapshotStoreItem) 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 *SnapshotStoreItem) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotStoreItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotIAVLItem) 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 *SnapshotIAVLItem) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotIAVLItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x20 - } - if m.Version != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x18 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotExtensionMeta) 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 *SnapshotExtensionMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotExtensionMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Format != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotExtensionPayload) 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 *SnapshotExtensionPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintSnapshot(dAtA []byte, offset int, v uint64) int { - offset -= sovSnapshot(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Snapshot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovSnapshot(uint64(m.Height)) - } - if m.Format != 0 { - n += 1 + sovSnapshot(uint64(m.Format)) - } - if m.Chunks != 0 { - n += 1 + sovSnapshot(uint64(m.Chunks)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - l = m.Metadata.Size() - n += 1 + l + sovSnapshot(uint64(l)) - return n -} - -func (m *Metadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ChunkHashes) > 0 { - for _, b := range m.ChunkHashes { - l = len(b) - n += 1 + l + sovSnapshot(uint64(l)) - } - } - return n -} - -func (m *SnapshotItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Item != nil { - n += m.Item.Size() - } - return n -} - -func (m *SnapshotItem_Store) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Store != nil { - l = m.Store.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotItem_IAVL) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IAVL != nil { - l = m.IAVL.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotItem_Extension) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Extension != nil { - l = m.Extension.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotItem_ExtensionPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ExtensionPayload != nil { - l = m.ExtensionPayload.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotStoreItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} - -func (m *SnapshotIAVLItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - if m.Version != 0 { - n += 1 + sovSnapshot(uint64(m.Version)) - } - if m.Height != 0 { - n += 1 + sovSnapshot(uint64(m.Height)) - } - return n -} - -func (m *SnapshotExtensionMeta) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - if m.Format != 0 { - n += 1 + sovSnapshot(uint64(m.Format)) - } - return n -} - -func (m *SnapshotExtensionPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} - -func sovSnapshot(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSnapshot(x uint64) (n int) { - return sovSnapshot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Snapshot) 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 ErrIntOverflowSnapshot - } - 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: Snapshot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType) - } - m.Chunks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Chunks |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Metadata) 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 ErrIntOverflowSnapshot - } - 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: Metadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChunkHashes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChunkHashes = append(m.ChunkHashes, make([]byte, postIndex-iNdEx)) - copy(m.ChunkHashes[len(m.ChunkHashes)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotItem) 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 ErrIntOverflowSnapshot - } - 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: SnapshotItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Store", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotStoreItem{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_Store{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IAVL", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotIAVLItem{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_IAVL{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotExtensionMeta{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_Extension{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtensionPayload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotExtensionPayload{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_ExtensionPayload{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotStoreItem) 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 ErrIntOverflowSnapshot - } - 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: SnapshotStoreItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotStoreItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - 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 ErrInvalidLengthSnapshot - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotIAVLItem) 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 ErrIntOverflowSnapshot - } - 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: SnapshotIAVLItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotIAVLItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotExtensionMeta) 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 ErrIntOverflowSnapshot - } - 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: SnapshotExtensionMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotExtensionMeta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - 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 ErrInvalidLengthSnapshot - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotExtensionPayload) 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 ErrIntOverflowSnapshot - } - 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: SnapshotExtensionPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotExtensionPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSnapshot(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSnapshot - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSnapshot - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSnapshot - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSnapshot = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/streaming/abci/grpc.pb.go b/cosmossdk.io/store/streaming/abci/grpc.pb.go deleted file mode 100644 index b9a8e7622c53..000000000000 --- a/cosmossdk.io/store/streaming/abci/grpc.pb.go +++ /dev/null @@ -1,1050 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/streaming/abci/grpc.proto - -package abci - -import ( - context "context" - types "cosmossdk.io/store/types" - fmt "fmt" - v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ListenEndBlockRequest is the request type for the ListenEndBlock RPC method -type ListenFinalizeBlockRequest struct { - Req *v1.FinalizeBlockRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"` - Res *v1.FinalizeBlockResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` -} - -func (m *ListenFinalizeBlockRequest) Reset() { *m = ListenFinalizeBlockRequest{} } -func (m *ListenFinalizeBlockRequest) String() string { return proto.CompactTextString(m) } -func (*ListenFinalizeBlockRequest) ProtoMessage() {} -func (*ListenFinalizeBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{0} -} -func (m *ListenFinalizeBlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenFinalizeBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenFinalizeBlockRequest.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 *ListenFinalizeBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenFinalizeBlockRequest.Merge(m, src) -} -func (m *ListenFinalizeBlockRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenFinalizeBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenFinalizeBlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenFinalizeBlockRequest proto.InternalMessageInfo - -func (m *ListenFinalizeBlockRequest) GetReq() *v1.FinalizeBlockRequest { - if m != nil { - return m.Req - } - return nil -} - -func (m *ListenFinalizeBlockRequest) GetRes() *v1.FinalizeBlockResponse { - if m != nil { - return m.Res - } - return nil -} - -// ListenEndBlockResponse is the response type for the ListenEndBlock RPC method -type ListenFinalizeBlockResponse struct { -} - -func (m *ListenFinalizeBlockResponse) Reset() { *m = ListenFinalizeBlockResponse{} } -func (m *ListenFinalizeBlockResponse) String() string { return proto.CompactTextString(m) } -func (*ListenFinalizeBlockResponse) ProtoMessage() {} -func (*ListenFinalizeBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{1} -} -func (m *ListenFinalizeBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenFinalizeBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenFinalizeBlockResponse.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 *ListenFinalizeBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenFinalizeBlockResponse.Merge(m, src) -} -func (m *ListenFinalizeBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenFinalizeBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenFinalizeBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenFinalizeBlockResponse proto.InternalMessageInfo - -// ListenCommitRequest is the request type for the ListenCommit RPC method -type ListenCommitRequest struct { - // explicitly pass in block height as ResponseCommit does not contain this - // info - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Res *v1.CommitResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` - ChangeSet []*types.StoreKVPair `protobuf:"bytes,3,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` -} - -func (m *ListenCommitRequest) Reset() { *m = ListenCommitRequest{} } -func (m *ListenCommitRequest) String() string { return proto.CompactTextString(m) } -func (*ListenCommitRequest) ProtoMessage() {} -func (*ListenCommitRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{2} -} -func (m *ListenCommitRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenCommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenCommitRequest.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 *ListenCommitRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenCommitRequest.Merge(m, src) -} -func (m *ListenCommitRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenCommitRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenCommitRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenCommitRequest proto.InternalMessageInfo - -func (m *ListenCommitRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ListenCommitRequest) GetRes() *v1.CommitResponse { - if m != nil { - return m.Res - } - return nil -} - -func (m *ListenCommitRequest) GetChangeSet() []*types.StoreKVPair { - if m != nil { - return m.ChangeSet - } - return nil -} - -// ListenCommitResponse is the response type for the ListenCommit RPC method -type ListenCommitResponse struct { -} - -func (m *ListenCommitResponse) Reset() { *m = ListenCommitResponse{} } -func (m *ListenCommitResponse) String() string { return proto.CompactTextString(m) } -func (*ListenCommitResponse) ProtoMessage() {} -func (*ListenCommitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{3} -} -func (m *ListenCommitResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenCommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenCommitResponse.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 *ListenCommitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenCommitResponse.Merge(m, src) -} -func (m *ListenCommitResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenCommitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenCommitResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenCommitResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ListenFinalizeBlockRequest)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockRequest") - proto.RegisterType((*ListenFinalizeBlockResponse)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockResponse") - proto.RegisterType((*ListenCommitRequest)(nil), "cosmos.store.streaming.abci.ListenCommitRequest") - proto.RegisterType((*ListenCommitResponse)(nil), "cosmos.store.streaming.abci.ListenCommitResponse") -} - -func init() { - proto.RegisterFile("cosmos/store/streaming/abci/grpc.proto", fileDescriptor_7b98083eb9315fb6) -} - -var fileDescriptor_7b98083eb9315fb6 = []byte{ - // 414 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x8f, 0xd2, 0x40, - 0x18, 0xc6, 0x29, 0x4d, 0x4c, 0x1c, 0x38, 0x0d, 0xc6, 0x90, 0xa2, 0x0d, 0x34, 0x06, 0x39, 0x4d, - 0x6d, 0x3d, 0x88, 0xf1, 0xa2, 0x90, 0x18, 0x8d, 0x1e, 0x4c, 0x49, 0x3c, 0x78, 0x21, 0x6d, 0x7d, - 0x2d, 0x13, 0x68, 0xa7, 0xcc, 0x8c, 0x4d, 0xf4, 0x13, 0x78, 0x74, 0x0f, 0xfb, 0x35, 0xf6, 0x73, - 0xec, 0x91, 0xe3, 0x1e, 0x37, 0xf0, 0x45, 0x36, 0x9d, 0x59, 0x08, 0xcd, 0xb2, 0x7f, 0x38, 0xf6, - 0x9d, 0xe7, 0xf7, 0xbc, 0x4f, 0xe7, 0x7d, 0x07, 0xf5, 0x63, 0x26, 0x52, 0x26, 0x5c, 0x21, 0x19, - 0x07, 0x57, 0x48, 0x0e, 0x61, 0x4a, 0xb3, 0xc4, 0x0d, 0xa3, 0x98, 0xba, 0x09, 0xcf, 0x63, 0x92, - 0x73, 0x26, 0x19, 0xee, 0x68, 0x1d, 0x51, 0x3a, 0xb2, 0xd3, 0x91, 0x52, 0x67, 0x3d, 0x8b, 0x59, - 0x0a, 0x32, 0xfa, 0x25, 0x35, 0x56, 0x78, 0xae, 0xfc, 0x93, 0x83, 0xd0, 0xa8, 0xf5, 0xa2, 0xd2, - 0xa2, 0xf0, 0x22, 0x90, 0xa1, 0xe7, 0x2e, 0xa8, 0x90, 0x90, 0x95, 0x16, 0x4a, 0xe5, 0x9c, 0x18, - 0xc8, 0xfa, 0xaa, 0x6a, 0x1f, 0x69, 0x16, 0x2e, 0xe8, 0x5f, 0x18, 0x2d, 0x58, 0x3c, 0x0f, 0x60, - 0xf9, 0x1b, 0x84, 0xc4, 0x43, 0x64, 0x72, 0x58, 0xb6, 0x8d, 0xae, 0x31, 0x68, 0xf8, 0x7d, 0xb2, - 0x6d, 0xa8, 0xfa, 0x93, 0xc2, 0x23, 0x87, 0xa0, 0xa0, 0x44, 0xf0, 0xdb, 0x92, 0x14, 0xed, 0xba, - 0x22, 0x5f, 0xde, 0x4b, 0x8a, 0x9c, 0x65, 0x02, 0x4a, 0x54, 0x38, 0xcf, 0x51, 0xe7, 0x60, 0x24, - 0xad, 0x71, 0xce, 0x0c, 0xd4, 0xd2, 0xe7, 0x63, 0x96, 0xa6, 0x54, 0x6e, 0xb3, 0xf6, 0x50, 0x33, - 0x2a, 0x85, 0xd3, 0x19, 0xd0, 0x64, 0x26, 0x55, 0x68, 0x33, 0x68, 0xa8, 0xda, 0x27, 0x55, 0xc2, - 0xfe, 0x7e, 0xa8, 0xee, 0xcd, 0x50, 0x5b, 0xc3, 0xbd, 0x34, 0xf8, 0x3d, 0x42, 0xf1, 0x2c, 0xcc, - 0x12, 0x98, 0x0a, 0x90, 0x6d, 0xb3, 0x6b, 0x0e, 0x1a, 0x7e, 0x8f, 0x54, 0xe6, 0x72, 0x7d, 0xb9, - 0x64, 0x52, 0x7e, 0x7d, 0xf9, 0xfe, 0x2d, 0xa4, 0x3c, 0x78, 0xac, 0xa1, 0x09, 0x48, 0xe7, 0x29, - 0x7a, 0x52, 0xcd, 0xab, 0xed, 0xfd, 0xd3, 0x3a, 0x6a, 0x7d, 0x18, 0x8d, 0x3f, 0xeb, 0x43, 0xe0, - 0x13, 0xe0, 0x05, 0x8d, 0x01, 0xff, 0xdb, 0xfd, 0x60, 0xe5, 0x02, 0xf0, 0x1b, 0x72, 0xc7, 0x36, - 0x90, 0xdb, 0xa7, 0x68, 0x0d, 0x8f, 0x07, 0x75, 0x44, 0x2c, 0x50, 0x73, 0x3f, 0x3a, 0x7e, 0xf5, - 0x00, 0xa7, 0xca, 0x54, 0x2c, 0xef, 0x08, 0x42, 0x37, 0x1d, 0xbd, 0x3b, 0x5f, 0xdb, 0xc6, 0x6a, - 0x6d, 0x1b, 0x97, 0x6b, 0xdb, 0xf8, 0xbf, 0xb1, 0x6b, 0xab, 0x8d, 0x5d, 0xbb, 0xd8, 0xd8, 0xb5, - 0x1f, 0x3d, 0xed, 0x25, 0x7e, 0xce, 0x09, 0x65, 0x07, 0x1f, 0x4f, 0xf4, 0x48, 0xed, 0xf5, 0xeb, - 0xab, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xf4, 0x63, 0xc3, 0x62, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ABCIListenerServiceClient is the client API for ABCIListenerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ABCIListenerServiceClient interface { - // ListenFinalizeBlock is the corresponding endpoint for - // ABCIListener.ListenEndBlock - ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) - // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit - ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) -} - -type aBCIListenerServiceClient struct { - cc grpc1.ClientConn -} - -func NewABCIListenerServiceClient(cc grpc1.ClientConn) ABCIListenerServiceClient { - return &aBCIListenerServiceClient{cc} -} - -func (c *aBCIListenerServiceClient) ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) { - out := new(ListenFinalizeBlockResponse) - err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIListenerServiceClient) ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) { - out := new(ListenCommitResponse) - err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ABCIListenerServiceServer is the server API for ABCIListenerService service. -type ABCIListenerServiceServer interface { - // ListenFinalizeBlock is the corresponding endpoint for - // ABCIListener.ListenEndBlock - ListenFinalizeBlock(context.Context, *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) - // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit - ListenCommit(context.Context, *ListenCommitRequest) (*ListenCommitResponse, error) -} - -// UnimplementedABCIListenerServiceServer can be embedded to have forward compatible implementations. -type UnimplementedABCIListenerServiceServer struct { -} - -func (*UnimplementedABCIListenerServiceServer) ListenFinalizeBlock(ctx context.Context, req *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenFinalizeBlock not implemented") -} -func (*UnimplementedABCIListenerServiceServer) ListenCommit(ctx context.Context, req *ListenCommitRequest) (*ListenCommitResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenCommit not implemented") -} - -func RegisterABCIListenerServiceServer(s grpc1.Server, srv ABCIListenerServiceServer) { - s.RegisterService(&_ABCIListenerService_serviceDesc, srv) -} - -func _ABCIListenerService_ListenFinalizeBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenFinalizeBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, req.(*ListenFinalizeBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIListenerService_ListenCommit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenCommitRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIListenerServiceServer).ListenCommit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIListenerServiceServer).ListenCommit(ctx, req.(*ListenCommitRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ABCIListenerService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.store.streaming.abci.ABCIListenerService", - HandlerType: (*ABCIListenerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListenFinalizeBlock", - Handler: _ABCIListenerService_ListenFinalizeBlock_Handler, - }, - { - MethodName: "ListenCommit", - Handler: _ABCIListenerService_ListenCommit_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/store/streaming/abci/grpc.proto", -} - -func (m *ListenFinalizeBlockRequest) 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 *ListenFinalizeBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenFinalizeBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Res != nil { - { - size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Req != nil { - { - size, err := m.Req.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListenFinalizeBlockResponse) 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 *ListenFinalizeBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenFinalizeBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ListenCommitRequest) 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 *ListenCommitRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenCommitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChangeSet) > 0 { - for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Res != nil { - { - size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.BlockHeight != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListenCommitResponse) 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 *ListenCommitResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenCommitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { - offset -= sovGrpc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ListenFinalizeBlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Req != nil { - l = m.Req.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - if m.Res != nil { - l = m.Res.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func (m *ListenFinalizeBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ListenCommitRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovGrpc(uint64(m.BlockHeight)) - } - if m.Res != nil { - l = m.Res.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - if len(m.ChangeSet) > 0 { - for _, e := range m.ChangeSet { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - return n -} - -func (m *ListenCommitResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovGrpc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGrpc(x uint64) (n int) { - return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ListenFinalizeBlockRequest) 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 ErrIntOverflowGrpc - } - 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: ListenFinalizeBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenFinalizeBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Req == nil { - m.Req = &v1.FinalizeBlockRequest{} - } - if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Res == nil { - m.Res = &v1.FinalizeBlockResponse{} - } - if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenFinalizeBlockResponse) 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 ErrIntOverflowGrpc - } - 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: ListenFinalizeBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenFinalizeBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenCommitRequest) 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 ErrIntOverflowGrpc - } - 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: ListenCommitRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenCommitRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Res == nil { - m.Res = &v1.CommitResponse{} - } - if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangeSet = append(m.ChangeSet, &types.StoreKVPair{}) - if err := m.ChangeSet[len(m.ChangeSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenCommitResponse) 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 ErrIntOverflowGrpc - } - 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: ListenCommitResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenCommitResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGrpc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGrpc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGrpc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGrpc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/types/commit_info.pb.go b/cosmossdk.io/store/types/commit_info.pb.go deleted file mode 100644 index 81220a79c236..000000000000 --- a/cosmossdk.io/store/types/commit_info.pb.go +++ /dev/null @@ -1,864 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/v1beta1/commit_info.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// CommitInfo defines commit information used by the multi-store when committing -// a version/height. -type CommitInfo struct { - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - StoreInfos []StoreInfo `protobuf:"bytes,2,rep,name=store_infos,json=storeInfos,proto3" json:"store_infos"` - Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` -} - -func (m *CommitInfo) Reset() { *m = CommitInfo{} } -func (m *CommitInfo) String() string { return proto.CompactTextString(m) } -func (*CommitInfo) ProtoMessage() {} -func (*CommitInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_5f8c656cdef8c524, []int{0} -} -func (m *CommitInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitInfo.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 *CommitInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitInfo.Merge(m, src) -} -func (m *CommitInfo) XXX_Size() int { - return m.Size() -} -func (m *CommitInfo) XXX_DiscardUnknown() { - xxx_messageInfo_CommitInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitInfo proto.InternalMessageInfo - -func (m *CommitInfo) GetVersion() int64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *CommitInfo) GetStoreInfos() []StoreInfo { - if m != nil { - return m.StoreInfos - } - return nil -} - -func (m *CommitInfo) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - -// StoreInfo defines store-specific commit information. It contains a reference -// between a store name and the commit ID. -type StoreInfo struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - CommitId CommitID `protobuf:"bytes,2,opt,name=commit_id,json=commitId,proto3" json:"commit_id"` -} - -func (m *StoreInfo) Reset() { *m = StoreInfo{} } -func (m *StoreInfo) String() string { return proto.CompactTextString(m) } -func (*StoreInfo) ProtoMessage() {} -func (*StoreInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_5f8c656cdef8c524, []int{1} -} -func (m *StoreInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreInfo.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 *StoreInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreInfo.Merge(m, src) -} -func (m *StoreInfo) XXX_Size() int { - return m.Size() -} -func (m *StoreInfo) XXX_DiscardUnknown() { - xxx_messageInfo_StoreInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_StoreInfo proto.InternalMessageInfo - -func (m *StoreInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *StoreInfo) GetCommitId() CommitID { - if m != nil { - return m.CommitId - } - return CommitID{} -} - -// CommitID defines the commitment information when a specific store is -// committed. -type CommitID struct { - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (m *CommitID) Reset() { *m = CommitID{} } -func (*CommitID) ProtoMessage() {} -func (*CommitID) Descriptor() ([]byte, []int) { - return fileDescriptor_5f8c656cdef8c524, []int{2} -} -func (m *CommitID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitID.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 *CommitID) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitID.Merge(m, src) -} -func (m *CommitID) XXX_Size() int { - return m.Size() -} -func (m *CommitID) XXX_DiscardUnknown() { - xxx_messageInfo_CommitID.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitID proto.InternalMessageInfo - -func (m *CommitID) GetVersion() int64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *CommitID) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func init() { - proto.RegisterType((*CommitInfo)(nil), "cosmos.store.v1beta1.CommitInfo") - proto.RegisterType((*StoreInfo)(nil), "cosmos.store.v1beta1.StoreInfo") - proto.RegisterType((*CommitID)(nil), "cosmos.store.v1beta1.CommitID") -} - -func init() { - proto.RegisterFile("cosmos/store/v1beta1/commit_info.proto", fileDescriptor_5f8c656cdef8c524) -} - -var fileDescriptor_5f8c656cdef8c524 = []byte{ - // 336 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4e, 0xf2, 0x50, - 0x14, 0xc7, 0x7b, 0xa1, 0xf9, 0x3e, 0x7a, 0x70, 0xba, 0x61, 0x68, 0x18, 0x6e, 0x09, 0x83, 0x61, - 0xba, 0x0d, 0xb8, 0x39, 0x98, 0x58, 0x8d, 0x09, 0x6b, 0x75, 0x72, 0x31, 0x2d, 0x5c, 0x4a, 0xa3, - 0xed, 0x21, 0xdc, 0x2b, 0x89, 0x6f, 0xc1, 0xe8, 0xe8, 0x33, 0xf8, 0x14, 0x8c, 0x8c, 0x4e, 0x6a, - 0xe0, 0x45, 0x4c, 0x4f, 0x5b, 0x5c, 0x88, 0xdb, 0x39, 0xed, 0xef, 0x9c, 0xff, 0xaf, 0xa7, 0x70, - 0x3a, 0x41, 0x9d, 0xa1, 0xf6, 0xb5, 0xc1, 0xa5, 0xf2, 0x57, 0xc3, 0x58, 0x99, 0x68, 0xe8, 0x4f, - 0x30, 0xcb, 0x52, 0xf3, 0x90, 0xe6, 0x33, 0x94, 0x8b, 0x25, 0x1a, 0xe4, 0x9d, 0x92, 0x93, 0xc4, - 0xc9, 0x8a, 0xeb, 0x76, 0x12, 0x4c, 0x90, 0x00, 0xbf, 0xa8, 0x4a, 0xb6, 0xeb, 0x25, 0x88, 0xc9, - 0x93, 0xf2, 0xa9, 0x8b, 0x9f, 0x67, 0xbe, 0x49, 0x33, 0xa5, 0x4d, 0x94, 0x2d, 0x4a, 0xa0, 0xff, - 0xce, 0x00, 0xae, 0x28, 0x62, 0x9c, 0xcf, 0x90, 0xbb, 0xf0, 0x7f, 0xa5, 0x96, 0x3a, 0xc5, 0xdc, - 0x65, 0x3d, 0x36, 0x68, 0x86, 0x75, 0xcb, 0x6f, 0xa0, 0x4d, 0x81, 0x64, 0xa2, 0xdd, 0x46, 0xaf, - 0x39, 0x68, 0x8f, 0x3c, 0x79, 0xcc, 0x45, 0xde, 0x16, 0x5d, 0xb1, 0x2f, 0xb0, 0x37, 0x9f, 0x9e, - 0x15, 0x82, 0xae, 0x1f, 0x68, 0x1e, 0x80, 0x73, 0x70, 0x70, 0x9b, 0x3d, 0x36, 0x68, 0x8f, 0xba, - 0xb2, 0xb4, 0x94, 0xb5, 0xa5, 0xbc, 0xab, 0x89, 0xa0, 0x55, 0x2c, 0x58, 0x7f, 0x79, 0x2c, 0xfc, - 0x1d, 0xeb, 0xc7, 0xe0, 0x1c, 0x22, 0x38, 0x07, 0x3b, 0x8f, 0x32, 0x45, 0xbe, 0x4e, 0x48, 0x35, - 0xbf, 0x04, 0xa7, 0xbe, 0xdb, 0xd4, 0x6d, 0x50, 0x88, 0x38, 0xae, 0x5a, 0x7d, 0xfb, 0x75, 0x65, - 0xda, 0x2a, 0xc7, 0xc6, 0xd3, 0xfe, 0x05, 0xb4, 0xea, 0x77, 0x7f, 0x5c, 0x85, 0x83, 0x3d, 0x8f, - 0xf4, 0x9c, 0x32, 0x4e, 0x42, 0xaa, 0xcf, 0xed, 0xd7, 0x37, 0xcf, 0x0a, 0x46, 0x9b, 0x9d, 0x60, - 0xdb, 0x9d, 0x60, 0xdf, 0x3b, 0xc1, 0xd6, 0x7b, 0x61, 0x6d, 0xf7, 0xc2, 0xfa, 0xd8, 0x0b, 0xeb, - 0xde, 0x2d, 0x45, 0xf4, 0xf4, 0x51, 0xa6, 0x58, 0xfd, 0x6d, 0xf3, 0xb2, 0x50, 0x3a, 0xfe, 0x47, - 0x07, 0x38, 0xfb, 0x09, 0x00, 0x00, 0xff, 0xff, 0x67, 0xb7, 0x0d, 0x59, 0x0a, 0x02, 0x00, 0x00, -} - -func (m *CommitInfo) 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 *CommitInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintCommitInfo(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x1a - if len(m.StoreInfos) > 0 { - for iNdEx := len(m.StoreInfos) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.StoreInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommitInfo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Version != 0 { - i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *StoreInfo) 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 *StoreInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.CommitId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommitInfo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CommitID) 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 *CommitID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x12 - } - if m.Version != 0 { - i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintCommitInfo(dAtA []byte, offset int, v uint64) int { - offset -= sovCommitInfo(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CommitInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Version != 0 { - n += 1 + sovCommitInfo(uint64(m.Version)) - } - if len(m.StoreInfos) > 0 { - for _, e := range m.StoreInfos { - l = e.Size() - n += 1 + l + sovCommitInfo(uint64(l)) - } - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovCommitInfo(uint64(l)) - return n -} - -func (m *StoreInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCommitInfo(uint64(l)) - } - l = m.CommitId.Size() - n += 1 + l + sovCommitInfo(uint64(l)) - return n -} - -func (m *CommitID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Version != 0 { - n += 1 + sovCommitInfo(uint64(m.Version)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovCommitInfo(uint64(l)) - } - return n -} - -func sovCommitInfo(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCommitInfo(x uint64) (n int) { - return sovCommitInfo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CommitInfo) 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 ErrIntOverflowCommitInfo - } - 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: CommitInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StoreInfos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StoreInfos = append(m.StoreInfos, StoreInfo{}) - if err := m.StoreInfos[len(m.StoreInfos)-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 Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitInfo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommitInfo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreInfo) 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 ErrIntOverflowCommitInfo - } - 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: StoreInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - 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 ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommitId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CommitId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitInfo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommitInfo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommitID) 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 ErrIntOverflowCommitInfo - } - 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: CommitID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitInfo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommitInfo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCommitInfo(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCommitInfo - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCommitInfo - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCommitInfo - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCommitInfo = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCommitInfo = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCommitInfo = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/types/listening.pb.go b/cosmossdk.io/store/types/listening.pb.go deleted file mode 100644 index 1821ca474a6f..000000000000 --- a/cosmossdk.io/store/types/listening.pb.go +++ /dev/null @@ -1,785 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/v1beta1/listening.proto - -package types - -import ( - fmt "fmt" - v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" - _ "github.com/cosmos/cosmos-proto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and -// Deletes) It optionally includes the StoreKey for the originating KVStore and -// a Boolean flag to distinguish between Sets and Deletes -type StoreKVPair struct { - StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"` - Delete bool `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"` - Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } -func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } -func (*StoreKVPair) ProtoMessage() {} -func (*StoreKVPair) Descriptor() ([]byte, []int) { - return fileDescriptor_b6caeb9d7b7c7c10, []int{0} -} -func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreKVPair.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 *StoreKVPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreKVPair.Merge(m, src) -} -func (m *StoreKVPair) XXX_Size() int { - return m.Size() -} -func (m *StoreKVPair) XXX_DiscardUnknown() { - xxx_messageInfo_StoreKVPair.DiscardUnknown(m) -} - -var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo - -func (m *StoreKVPair) GetStoreKey() string { - if m != nil { - return m.StoreKey - } - return "" -} - -func (m *StoreKVPair) GetDelete() bool { - if m != nil { - return m.Delete - } - return false -} - -func (m *StoreKVPair) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *StoreKVPair) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -// BlockMetadata contains all the abci event data of a block -// the file streamer dump them into files together with the state changes. -type BlockMetadata struct { - ResponseCommit *v1.CommitResponse `protobuf:"bytes,6,opt,name=response_commit,json=responseCommit,proto3" json:"response_commit,omitempty"` - RequestFinalizeBlock *v1.FinalizeBlockRequest `protobuf:"bytes,7,opt,name=request_finalize_block,json=requestFinalizeBlock,proto3" json:"request_finalize_block,omitempty"` - ResponseFinalizeBlock *v1.FinalizeBlockResponse `protobuf:"bytes,8,opt,name=response_finalize_block,json=responseFinalizeBlock,proto3" json:"response_finalize_block,omitempty"` -} - -func (m *BlockMetadata) Reset() { *m = BlockMetadata{} } -func (m *BlockMetadata) String() string { return proto.CompactTextString(m) } -func (*BlockMetadata) ProtoMessage() {} -func (*BlockMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_b6caeb9d7b7c7c10, []int{1} -} -func (m *BlockMetadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockMetadata.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 *BlockMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockMetadata.Merge(m, src) -} -func (m *BlockMetadata) XXX_Size() int { - return m.Size() -} -func (m *BlockMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_BlockMetadata.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockMetadata proto.InternalMessageInfo - -func (m *BlockMetadata) GetResponseCommit() *v1.CommitResponse { - if m != nil { - return m.ResponseCommit - } - return nil -} - -func (m *BlockMetadata) GetRequestFinalizeBlock() *v1.FinalizeBlockRequest { - if m != nil { - return m.RequestFinalizeBlock - } - return nil -} - -func (m *BlockMetadata) GetResponseFinalizeBlock() *v1.FinalizeBlockResponse { - if m != nil { - return m.ResponseFinalizeBlock - } - return nil -} - -func init() { - proto.RegisterType((*StoreKVPair)(nil), "cosmos.store.v1beta1.StoreKVPair") - proto.RegisterType((*BlockMetadata)(nil), "cosmos.store.v1beta1.BlockMetadata") -} - -func init() { - proto.RegisterFile("cosmos/store/v1beta1/listening.proto", fileDescriptor_b6caeb9d7b7c7c10) -} - -var fileDescriptor_b6caeb9d7b7c7c10 = []byte{ - // 416 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0xc7, 0xeb, 0xd6, 0x2d, 0x9e, 0x07, 0x2c, 0x32, 0x65, 0x84, 0x81, 0xa2, 0x68, 0x42, 0xd0, - 0xcb, 0x1c, 0xba, 0x71, 0xe2, 0x38, 0x24, 0x24, 0x32, 0x21, 0xa1, 0x20, 0x71, 0x40, 0x48, 0x91, - 0x93, 0xbe, 0x21, 0xab, 0x69, 0x5c, 0x62, 0x2f, 0x52, 0xb9, 0xf0, 0x15, 0xf8, 0x30, 0x48, 0x7c, - 0x05, 0x8e, 0x13, 0x27, 0x8e, 0xa8, 0xfd, 0x22, 0x28, 0xb6, 0x8b, 0x34, 0x38, 0xec, 0x96, 0xff, - 0x7b, 0xff, 0xff, 0xcf, 0xcf, 0xf1, 0xa3, 0x8f, 0x4a, 0xa5, 0x17, 0x4a, 0x27, 0xda, 0xa8, 0x06, - 0x92, 0x76, 0x5a, 0x80, 0x11, 0xd3, 0xa4, 0x92, 0xda, 0x40, 0x2d, 0xeb, 0x8f, 0x7c, 0xd9, 0x28, - 0xa3, 0xd8, 0xd8, 0xb9, 0xb8, 0x75, 0x71, 0xef, 0x3a, 0x78, 0x58, 0xaa, 0x05, 0x98, 0xe2, 0xdc, - 0x24, 0xa2, 0x28, 0x65, 0xd2, 0x4e, 0x13, 0xb3, 0x5a, 0x82, 0x76, 0x99, 0x83, 0xfb, 0x2e, 0x93, - 0x5b, 0x95, 0x78, 0x80, 0x15, 0x87, 0x5f, 0xe8, 0xee, 0xdb, 0x8e, 0x74, 0xf6, 0xee, 0x8d, 0x90, - 0x0d, 0x7b, 0x40, 0x77, 0x2c, 0x38, 0x9f, 0xc3, 0x2a, 0x44, 0x31, 0x9a, 0xec, 0x64, 0xc4, 0x16, - 0xce, 0x60, 0xc5, 0xf6, 0xe9, 0x68, 0x06, 0x15, 0x18, 0x08, 0xfb, 0x31, 0x9a, 0x90, 0xcc, 0x2b, - 0x16, 0xd0, 0x41, 0x67, 0x1f, 0xc4, 0x68, 0x72, 0x33, 0xeb, 0x3e, 0xd9, 0x98, 0x0e, 0x5b, 0x51, - 0x5d, 0x40, 0x88, 0x6d, 0xcd, 0x89, 0xe7, 0x77, 0x7e, 0x7e, 0x3b, 0xda, 0x73, 0xa7, 0x1f, 0xe9, - 0xd9, 0x3c, 0x7e, 0xca, 0x9f, 0x9d, 0x1c, 0x7e, 0xef, 0xd3, 0x5b, 0xa7, 0x95, 0x2a, 0xe7, 0xaf, - 0xc1, 0x88, 0x99, 0x30, 0x82, 0xbd, 0xa2, 0x7b, 0x0d, 0xe8, 0xa5, 0xaa, 0x35, 0xe4, 0xa5, 0x5a, - 0x2c, 0xa4, 0x09, 0x47, 0x31, 0x9a, 0xec, 0x1e, 0xc7, 0x7c, 0x7b, 0x4b, 0xde, 0xdd, 0x92, 0xb7, - 0x53, 0xfe, 0xc2, 0xf6, 0x33, 0x6f, 0xcf, 0x6e, 0x6f, 0x83, 0xae, 0xce, 0x3e, 0xd0, 0xfd, 0x06, - 0x3e, 0x5d, 0x80, 0x36, 0xf9, 0xb9, 0xac, 0x45, 0x25, 0x3f, 0x43, 0x5e, 0x74, 0x87, 0x85, 0x37, - 0x2c, 0xf1, 0xf1, 0xff, 0xc4, 0x97, 0xde, 0x67, 0x67, 0xca, 0x5c, 0x38, 0x1b, 0x7b, 0xca, 0x95, - 0x26, 0xcb, 0xe9, 0xbd, 0xbf, 0x83, 0xfe, 0x83, 0x27, 0x16, 0xff, 0xe4, 0x5a, 0xbc, 0x9f, 0xfb, - 0xee, 0x96, 0x73, 0xa5, 0x9d, 0x62, 0x82, 0x82, 0x7e, 0x8a, 0x49, 0x3f, 0x18, 0xa4, 0x98, 0x0c, - 0x02, 0x9c, 0x62, 0x82, 0x83, 0x61, 0x8a, 0xc9, 0x30, 0x18, 0x9d, 0x1e, 0xff, 0x58, 0x47, 0xe8, - 0x72, 0x1d, 0xa1, 0xdf, 0xeb, 0x08, 0x7d, 0xdd, 0x44, 0xbd, 0xcb, 0x4d, 0xd4, 0xfb, 0xb5, 0x89, - 0x7a, 0xef, 0x43, 0xf7, 0x93, 0xf5, 0x6c, 0xce, 0xa5, 0xf2, 0xfb, 0x64, 0xf7, 0xa1, 0x18, 0xd9, - 0x57, 0x3f, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x98, 0x9f, 0x12, 0x13, 0x6c, 0x02, 0x00, 0x00, -} - -func (m *StoreKVPair) 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 *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintListening(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x22 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintListening(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x1a - } - if m.Delete { - i-- - if m.Delete { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.StoreKey) > 0 { - i -= len(m.StoreKey) - copy(dAtA[i:], m.StoreKey) - i = encodeVarintListening(dAtA, i, uint64(len(m.StoreKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockMetadata) 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 *BlockMetadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ResponseFinalizeBlock != nil { - { - size, err := m.ResponseFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintListening(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.RequestFinalizeBlock != nil { - { - size, err := m.RequestFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintListening(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.ResponseCommit != nil { - { - size, err := m.ResponseCommit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintListening(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} - -func encodeVarintListening(dAtA []byte, offset int, v uint64) int { - offset -= sovListening(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *StoreKVPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StoreKey) - if l > 0 { - n += 1 + l + sovListening(uint64(l)) - } - if m.Delete { - n += 2 - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovListening(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovListening(uint64(l)) - } - return n -} - -func (m *BlockMetadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ResponseCommit != nil { - l = m.ResponseCommit.Size() - n += 1 + l + sovListening(uint64(l)) - } - if m.RequestFinalizeBlock != nil { - l = m.RequestFinalizeBlock.Size() - n += 1 + l + sovListening(uint64(l)) - } - if m.ResponseFinalizeBlock != nil { - l = m.ResponseFinalizeBlock.Size() - n += 1 + l + sovListening(uint64(l)) - } - return n -} - -func sovListening(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozListening(x uint64) (n int) { - return sovListening(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *StoreKVPair) 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 ErrIntOverflowListening - } - 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: StoreKVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StoreKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - 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 ErrInvalidLengthListening - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StoreKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Delete = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipListening(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthListening - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockMetadata) 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 ErrIntOverflowListening - } - 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: BlockMetadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockMetadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseCommit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResponseCommit == nil { - m.ResponseCommit = &v1.CommitResponse{} - } - if err := m.ResponseCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestFinalizeBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestFinalizeBlock == nil { - m.RequestFinalizeBlock = &v1.FinalizeBlockRequest{} - } - if err := m.RequestFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseFinalizeBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResponseFinalizeBlock == nil { - m.ResponseFinalizeBlock = &v1.FinalizeBlockResponse{} - } - if err := m.ResponseFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipListening(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthListening - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipListening(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListening - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListening - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListening - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthListening - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupListening - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthListening - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthListening = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowListening = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupListening = fmt.Errorf("proto: unexpected end of group") -) From 51247f716fa0554b2eb24615784e536eecc725c6 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Thu, 13 Jun 2024 10:05:12 +0200 Subject: [PATCH 05/12] ++ --- api/cosmos/consensus/v1/consensus.pulsar.go | 1509 +---------------- api/cosmos/consensus/v1/tx.pulsar.go | 1420 +++++++++++++++- api/cosmos/consensus/v1/tx_grpc.pb.go | 37 + x/consensus/keeper/keeper.go | 20 + .../proto/cosmos/consensus/v1/query.proto | 28 +- .../proto/cosmos/consensus/v1/tx.proto | 27 + x/consensus/types/consensus.pb.go | 716 +------- x/consensus/types/tx.pb.go | 636 ++++++- 8 files changed, 2106 insertions(+), 2287 deletions(-) diff --git a/api/cosmos/consensus/v1/consensus.pulsar.go b/api/cosmos/consensus/v1/consensus.pulsar.go index 41e6d76faa84..7168b5e078a3 100644 --- a/api/cosmos/consensus/v1/consensus.pulsar.go +++ b/api/cosmos/consensus/v1/consensus.pulsar.go @@ -3,7 +3,6 @@ package consensusv1 import ( v1 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/abci/v1" - v11 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/types/v1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -719,1271 +718,6 @@ func (x *fastReflection_CometInfo) ProtoMethods() *protoiface.Methods { } } -var ( - md_ConsensusMsgParams protoreflect.MessageDescriptor - fd_ConsensusMsgParams_version protoreflect.FieldDescriptor - fd_ConsensusMsgParams_block protoreflect.FieldDescriptor - fd_ConsensusMsgParams_evidence protoreflect.FieldDescriptor - fd_ConsensusMsgParams_validator protoreflect.FieldDescriptor - fd_ConsensusMsgParams_abci protoreflect.FieldDescriptor - fd_ConsensusMsgParams_synchrony protoreflect.FieldDescriptor - fd_ConsensusMsgParams_feature protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_consensus_v1_consensus_proto_init() - md_ConsensusMsgParams = File_cosmos_consensus_v1_consensus_proto.Messages().ByName("ConsensusMsgParams") - fd_ConsensusMsgParams_version = md_ConsensusMsgParams.Fields().ByName("version") - fd_ConsensusMsgParams_block = md_ConsensusMsgParams.Fields().ByName("block") - fd_ConsensusMsgParams_evidence = md_ConsensusMsgParams.Fields().ByName("evidence") - fd_ConsensusMsgParams_validator = md_ConsensusMsgParams.Fields().ByName("validator") - fd_ConsensusMsgParams_abci = md_ConsensusMsgParams.Fields().ByName("abci") - fd_ConsensusMsgParams_synchrony = md_ConsensusMsgParams.Fields().ByName("synchrony") - fd_ConsensusMsgParams_feature = md_ConsensusMsgParams.Fields().ByName("feature") -} - -var _ protoreflect.Message = (*fastReflection_ConsensusMsgParams)(nil) - -type fastReflection_ConsensusMsgParams ConsensusMsgParams - -func (x *ConsensusMsgParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_ConsensusMsgParams)(x) -} - -func (x *ConsensusMsgParams) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_consensus_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_ConsensusMsgParams_messageType fastReflection_ConsensusMsgParams_messageType -var _ protoreflect.MessageType = fastReflection_ConsensusMsgParams_messageType{} - -type fastReflection_ConsensusMsgParams_messageType struct{} - -func (x fastReflection_ConsensusMsgParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_ConsensusMsgParams)(nil) -} -func (x fastReflection_ConsensusMsgParams_messageType) New() protoreflect.Message { - return new(fastReflection_ConsensusMsgParams) -} -func (x fastReflection_ConsensusMsgParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusMsgParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ConsensusMsgParams) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusMsgParams -} - -// 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_ConsensusMsgParams) Type() protoreflect.MessageType { - return _fastReflection_ConsensusMsgParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ConsensusMsgParams) New() protoreflect.Message { - return new(fastReflection_ConsensusMsgParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ConsensusMsgParams) Interface() protoreflect.ProtoMessage { - return (*ConsensusMsgParams)(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_ConsensusMsgParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Version != nil { - value := protoreflect.ValueOfMessage(x.Version.ProtoReflect()) - if !f(fd_ConsensusMsgParams_version, value) { - return - } - } - if x.Block != nil { - value := protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - if !f(fd_ConsensusMsgParams_block, value) { - return - } - } - if x.Evidence != nil { - value := protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - if !f(fd_ConsensusMsgParams_evidence, value) { - return - } - } - if x.Validator != nil { - value := protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - if !f(fd_ConsensusMsgParams_validator, value) { - return - } - } - if x.Abci != nil { - value := protoreflect.ValueOfMessage(x.Abci.ProtoReflect()) - if !f(fd_ConsensusMsgParams_abci, value) { - return - } - } - if x.Synchrony != nil { - value := protoreflect.ValueOfMessage(x.Synchrony.ProtoReflect()) - if !f(fd_ConsensusMsgParams_synchrony, value) { - return - } - } - if x.Feature != nil { - value := protoreflect.ValueOfMessage(x.Feature.ProtoReflect()) - if !f(fd_ConsensusMsgParams_feature, 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_ConsensusMsgParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - return x.Version != nil - case "cosmos.consensus.v1.ConsensusMsgParams.block": - return x.Block != nil - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - return x.Evidence != nil - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - return x.Validator != nil - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - return x.Abci != nil - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - return x.Synchrony != nil - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - return x.Feature != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams 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_ConsensusMsgParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - x.Version = nil - case "cosmos.consensus.v1.ConsensusMsgParams.block": - x.Block = nil - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - x.Evidence = nil - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - x.Validator = nil - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - x.Abci = nil - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - x.Synchrony = nil - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - x.Feature = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams 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_ConsensusMsgParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - value := x.Version - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.block": - value := x.Block - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - value := x.Evidence - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - value := x.Validator - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - value := x.Abci - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - value := x.Synchrony - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - value := x.Feature - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams 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_ConsensusMsgParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - x.Version = value.Message().Interface().(*v11.VersionParams) - case "cosmos.consensus.v1.ConsensusMsgParams.block": - x.Block = value.Message().Interface().(*v11.BlockParams) - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - x.Evidence = value.Message().Interface().(*v11.EvidenceParams) - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - x.Validator = value.Message().Interface().(*v11.ValidatorParams) - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - x.Abci = value.Message().Interface().(*v11.ABCIParams) - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - x.Synchrony = value.Message().Interface().(*v11.SynchronyParams) - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - x.Feature = value.Message().Interface().(*v11.FeatureParams) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams 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_ConsensusMsgParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - if x.Version == nil { - x.Version = new(v11.VersionParams) - } - return protoreflect.ValueOfMessage(x.Version.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.block": - if x.Block == nil { - x.Block = new(v11.BlockParams) - } - return protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - if x.Evidence == nil { - x.Evidence = new(v11.EvidenceParams) - } - return protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - if x.Validator == nil { - x.Validator = new(v11.ValidatorParams) - } - return protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - if x.Abci == nil { - x.Abci = new(v11.ABCIParams) - } - return protoreflect.ValueOfMessage(x.Abci.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - if x.Synchrony == nil { - x.Synchrony = new(v11.SynchronyParams) - } - return protoreflect.ValueOfMessage(x.Synchrony.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - if x.Feature == nil { - x.Feature = new(v11.FeatureParams) - } - return protoreflect.ValueOfMessage(x.Feature.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams 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_ConsensusMsgParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - m := new(v11.VersionParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.block": - m := new(v11.BlockParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - m := new(v11.EvidenceParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - m := new(v11.ValidatorParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - m := new(v11.ABCIParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - m := new(v11.SynchronyParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - m := new(v11.FeatureParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams 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_ConsensusMsgParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.ConsensusMsgParams", 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_ConsensusMsgParams) 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_ConsensusMsgParams) 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_ConsensusMsgParams) 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_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ConsensusMsgParams) - 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.Version != nil { - l = options.Size(x.Version) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Block != nil { - l = options.Size(x.Block) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Evidence != nil { - l = options.Size(x.Evidence) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Validator != nil { - l = options.Size(x.Validator) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Abci != nil { - l = options.Size(x.Abci) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Synchrony != nil { - l = options.Size(x.Synchrony) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Feature != nil { - l = options.Size(x.Feature) - 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().(*ConsensusMsgParams) - 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.Feature != nil { - encoded, err := options.Marshal(x.Feature) - 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] = 0x3a - } - if x.Synchrony != nil { - encoded, err := options.Marshal(x.Synchrony) - 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] = 0x32 - } - if x.Abci != nil { - encoded, err := options.Marshal(x.Abci) - 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 x.Validator != nil { - encoded, err := options.Marshal(x.Validator) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.Evidence != nil { - encoded, err := options.Marshal(x.Evidence) - 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] = 0x1a - } - if x.Block != nil { - encoded, err := options.Marshal(x.Block) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Version != nil { - encoded, err := options.Marshal(x.Version) - 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().(*ConsensusMsgParams) - 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: ConsensusMsgParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConsensusMsgParams: 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 Version", 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.Version == nil { - x.Version = &v11.VersionParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Version); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Block", 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.Block == nil { - x.Block = &v11.BlockParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Block); 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 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 - } - if x.Evidence == nil { - x.Evidence = &v11.EvidenceParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", 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.Validator == nil { - x.Validator = &v11.ValidatorParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validator); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Abci", 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.Abci == nil { - x.Abci = &v11.ABCIParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Abci); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Synchrony", 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.Synchrony == nil { - x.Synchrony = &v11.SynchronyParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Synchrony); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Feature", 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.Feature == nil { - x.Feature = &v11.FeatureParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Feature); 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_ConsensusMsgParamsResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_consensus_v1_consensus_proto_init() - md_ConsensusMsgParamsResponse = File_cosmos_consensus_v1_consensus_proto.Messages().ByName("ConsensusMsgParamsResponse") -} - -var _ protoreflect.Message = (*fastReflection_ConsensusMsgParamsResponse)(nil) - -type fastReflection_ConsensusMsgParamsResponse ConsensusMsgParamsResponse - -func (x *ConsensusMsgParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_ConsensusMsgParamsResponse)(x) -} - -func (x *ConsensusMsgParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_consensus_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_ConsensusMsgParamsResponse_messageType fastReflection_ConsensusMsgParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_ConsensusMsgParamsResponse_messageType{} - -type fastReflection_ConsensusMsgParamsResponse_messageType struct{} - -func (x fastReflection_ConsensusMsgParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_ConsensusMsgParamsResponse)(nil) -} -func (x fastReflection_ConsensusMsgParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_ConsensusMsgParamsResponse) -} -func (x fastReflection_ConsensusMsgParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusMsgParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ConsensusMsgParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusMsgParamsResponse -} - -// 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_ConsensusMsgParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_ConsensusMsgParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ConsensusMsgParamsResponse) New() protoreflect.Message { - return new(fastReflection_ConsensusMsgParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ConsensusMsgParamsResponse) Interface() protoreflect.ProtoMessage { - return (*ConsensusMsgParamsResponse)(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_ConsensusMsgParamsResponse) 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_ConsensusMsgParamsResponse) 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.ConsensusMsgParamsResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParamsResponse 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_ConsensusMsgParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParamsResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParamsResponse 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_ConsensusMsgParamsResponse) 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.ConsensusMsgParamsResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParamsResponse 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_ConsensusMsgParamsResponse) 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.ConsensusMsgParamsResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParamsResponse 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_ConsensusMsgParamsResponse) 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.ConsensusMsgParamsResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParamsResponse 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_ConsensusMsgParamsResponse) 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.ConsensusMsgParamsResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParamsResponse 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_ConsensusMsgParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.ConsensusMsgParamsResponse", 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_ConsensusMsgParamsResponse) 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_ConsensusMsgParamsResponse) 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_ConsensusMsgParamsResponse) 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_ConsensusMsgParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ConsensusMsgParamsResponse) - 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().(*ConsensusMsgParamsResponse) - 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().(*ConsensusMsgParamsResponse) - 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: ConsensusMsgParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConsensusMsgParamsResponse: 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.52 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -2059,123 +793,6 @@ func (x *CometInfo) GetLastCommit() *v1.CommitInfo { return nil } -// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft. -type ConsensusMsgParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines the x/consensus parameters to be passed from comet. - // - // NOTE: All parameters must be supplied. - Version *v11.VersionParams `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Block *v11.BlockParams `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` - Evidence *v11.EvidenceParams `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"` - Validator *v11.ValidatorParams `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` - // Deprecated: Do not use. - Abci *v11.ABCIParams `protobuf:"bytes,5,opt,name=abci,proto3" json:"abci,omitempty"` - Synchrony *v11.SynchronyParams `protobuf:"bytes,6,opt,name=synchrony,proto3" json:"synchrony,omitempty"` - Feature *v11.FeatureParams `protobuf:"bytes,7,opt,name=feature,proto3" json:"feature,omitempty"` -} - -func (x *ConsensusMsgParams) Reset() { - *x = ConsensusMsgParams{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConsensusMsgParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConsensusMsgParams) ProtoMessage() {} - -// Deprecated: Use ConsensusMsgParams.ProtoReflect.Descriptor instead. -func (*ConsensusMsgParams) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_consensus_proto_rawDescGZIP(), []int{1} -} - -func (x *ConsensusMsgParams) GetVersion() *v11.VersionParams { - if x != nil { - return x.Version - } - return nil -} - -func (x *ConsensusMsgParams) GetBlock() *v11.BlockParams { - if x != nil { - return x.Block - } - return nil -} - -func (x *ConsensusMsgParams) GetEvidence() *v11.EvidenceParams { - if x != nil { - return x.Evidence - } - return nil -} - -func (x *ConsensusMsgParams) GetValidator() *v11.ValidatorParams { - if x != nil { - return x.Validator - } - return nil -} - -// Deprecated: Do not use. -func (x *ConsensusMsgParams) GetAbci() *v11.ABCIParams { - if x != nil { - return x.Abci - } - return nil -} - -func (x *ConsensusMsgParams) GetSynchrony() *v11.SynchronyParams { - if x != nil { - return x.Synchrony - } - return nil -} - -func (x *ConsensusMsgParams) GetFeature() *v11.FeatureParams { - if x != nil { - return x.Feature - } - return nil -} - -// ConsensusMsgParamsResponse defines the response structure for executing a -// ConsensusMsgParams message. -type ConsensusMsgParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ConsensusMsgParamsResponse) Reset() { - *x = ConsensusMsgParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConsensusMsgParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConsensusMsgParamsResponse) ProtoMessage() {} - -// Deprecated: Use ConsensusMsgParamsResponse.ProtoReflect.Descriptor instead. -func (*ConsensusMsgParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_consensus_proto_rawDescGZIP(), []int{2} -} - var File_cosmos_consensus_v1_consensus_proto protoreflect.FileDescriptor var file_cosmos_consensus_v1_consensus_proto_rawDesc = []byte{ @@ -2184,9 +801,7 @@ var file_cosmos_consensus_v1_consensus_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, - 0x66, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6d, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x39, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 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, @@ -2200,50 +815,20 @@ var file_cosmos_consensus_v1_consensus_proto_rawDesc = []byte{ 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x04, 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, 0x22, 0xbc, 0x03, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, - 0x75, 0x73, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3a, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, - 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, - 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x3d, 0x0a, - 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x21, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x09, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x35, - 0x0a, 0x04, 0x61, 0x62, 0x63, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, - 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x42, 0x43, 0x49, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x04, 0x61, 0x62, 0x63, 0x69, 0x12, 0x40, 0x0a, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, - 0x6e, 0x79, 0x18, 0x06, 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, 0x53, 0x79, 0x6e, - 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x09, 0x73, 0x79, - 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x12, 0x3a, 0x0a, 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, - 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0xc9, 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, 0x0e, 0x43, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 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, + 0x6d, 0x6d, 0x69, 0x74, 0x42, 0xc9, 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, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 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 ( @@ -2258,36 +843,20 @@ func file_cosmos_consensus_v1_consensus_proto_rawDescGZIP() []byte { return file_cosmos_consensus_v1_consensus_proto_rawDescData } -var file_cosmos_consensus_v1_consensus_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_cosmos_consensus_v1_consensus_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_cosmos_consensus_v1_consensus_proto_goTypes = []interface{}{ - (*CometInfo)(nil), // 0: cosmos.consensus.v1.CometInfo - (*ConsensusMsgParams)(nil), // 1: cosmos.consensus.v1.ConsensusMsgParams - (*ConsensusMsgParamsResponse)(nil), // 2: cosmos.consensus.v1.ConsensusMsgParamsResponse - (*v1.Misbehavior)(nil), // 3: cometbft.abci.v1.Misbehavior - (*v1.CommitInfo)(nil), // 4: cometbft.abci.v1.CommitInfo - (*v11.VersionParams)(nil), // 5: cometbft.types.v1.VersionParams - (*v11.BlockParams)(nil), // 6: cometbft.types.v1.BlockParams - (*v11.EvidenceParams)(nil), // 7: cometbft.types.v1.EvidenceParams - (*v11.ValidatorParams)(nil), // 8: cometbft.types.v1.ValidatorParams - (*v11.ABCIParams)(nil), // 9: cometbft.types.v1.ABCIParams - (*v11.SynchronyParams)(nil), // 10: cometbft.types.v1.SynchronyParams - (*v11.FeatureParams)(nil), // 11: cometbft.types.v1.FeatureParams + (*CometInfo)(nil), // 0: cosmos.consensus.v1.CometInfo + (*v1.Misbehavior)(nil), // 1: cometbft.abci.v1.Misbehavior + (*v1.CommitInfo)(nil), // 2: cometbft.abci.v1.CommitInfo } var file_cosmos_consensus_v1_consensus_proto_depIdxs = []int32{ - 3, // 0: cosmos.consensus.v1.CometInfo.evidence:type_name -> cometbft.abci.v1.Misbehavior - 4, // 1: cosmos.consensus.v1.CometInfo.last_commit:type_name -> cometbft.abci.v1.CommitInfo - 5, // 2: cosmos.consensus.v1.ConsensusMsgParams.version:type_name -> cometbft.types.v1.VersionParams - 6, // 3: cosmos.consensus.v1.ConsensusMsgParams.block:type_name -> cometbft.types.v1.BlockParams - 7, // 4: cosmos.consensus.v1.ConsensusMsgParams.evidence:type_name -> cometbft.types.v1.EvidenceParams - 8, // 5: cosmos.consensus.v1.ConsensusMsgParams.validator:type_name -> cometbft.types.v1.ValidatorParams - 9, // 6: cosmos.consensus.v1.ConsensusMsgParams.abci:type_name -> cometbft.types.v1.ABCIParams - 10, // 7: cosmos.consensus.v1.ConsensusMsgParams.synchrony:type_name -> cometbft.types.v1.SynchronyParams - 11, // 8: cosmos.consensus.v1.ConsensusMsgParams.feature:type_name -> cometbft.types.v1.FeatureParams - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 1, // 0: cosmos.consensus.v1.CometInfo.evidence:type_name -> cometbft.abci.v1.Misbehavior + 2, // 1: cosmos.consensus.v1.CometInfo.last_commit:type_name -> cometbft.abci.v1.CommitInfo + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_cosmos_consensus_v1_consensus_proto_init() } @@ -2308,30 +877,6 @@ func file_cosmos_consensus_v1_consensus_proto_init() { return nil } } - file_cosmos_consensus_v1_consensus_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConsensusMsgParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_consensus_v1_consensus_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConsensusMsgParamsResponse); 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{ @@ -2339,7 +884,7 @@ func file_cosmos_consensus_v1_consensus_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_consensus_v1_consensus_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/consensus/v1/tx.pulsar.go b/api/cosmos/consensus/v1/tx.pulsar.go index 72743d913bcd..ebd8c55c8fd6 100644 --- a/api/cosmos/consensus/v1/tx.pulsar.go +++ b/api/cosmos/consensus/v1/tx.pulsar.go @@ -2,6 +2,7 @@ package consensusv1 import ( + v11 "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" @@ -1266,6 +1267,1131 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } } +var _ protoreflect.List = (*_MsgCometInfo_2_list)(nil) + +type _MsgCometInfo_2_list struct { + list *[]*v11.Misbehavior +} + +func (x *_MsgCometInfo_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgCometInfo_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgCometInfo_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v11.Misbehavior) + (*x.list)[i] = concreteValue +} + +func (x *_MsgCometInfo_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v11.Misbehavior) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgCometInfo_2_list) AppendMutable() protoreflect.Value { + v := new(v11.Misbehavior) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCometInfo_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgCometInfo_2_list) NewElement() protoreflect.Value { + v := new(v11.Misbehavior) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgCometInfo_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgCometInfo protoreflect.MessageDescriptor + fd_MsgCometInfo_authority protoreflect.FieldDescriptor + fd_MsgCometInfo_evidence protoreflect.FieldDescriptor + fd_MsgCometInfo_validators_hash protoreflect.FieldDescriptor + fd_MsgCometInfo_proposer_address protoreflect.FieldDescriptor + fd_MsgCometInfo_last_commit protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_consensus_v1_tx_proto_init() + md_MsgCometInfo = File_cosmos_consensus_v1_tx_proto.Messages().ByName("MsgCometInfo") + fd_MsgCometInfo_authority = md_MsgCometInfo.Fields().ByName("authority") + fd_MsgCometInfo_evidence = md_MsgCometInfo.Fields().ByName("evidence") + fd_MsgCometInfo_validators_hash = md_MsgCometInfo.Fields().ByName("validators_hash") + fd_MsgCometInfo_proposer_address = md_MsgCometInfo.Fields().ByName("proposer_address") + fd_MsgCometInfo_last_commit = md_MsgCometInfo.Fields().ByName("last_commit") +} + +var _ protoreflect.Message = (*fastReflection_MsgCometInfo)(nil) + +type fastReflection_MsgCometInfo MsgCometInfo + +func (x *MsgCometInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCometInfo)(x) +} + +func (x *MsgCometInfo) 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_MsgCometInfo_messageType fastReflection_MsgCometInfo_messageType +var _ protoreflect.MessageType = fastReflection_MsgCometInfo_messageType{} + +type fastReflection_MsgCometInfo_messageType struct{} + +func (x fastReflection_MsgCometInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCometInfo)(nil) +} +func (x fastReflection_MsgCometInfo_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCometInfo) +} +func (x fastReflection_MsgCometInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCometInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCometInfo) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCometInfo +} + +// 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_MsgCometInfo) Type() protoreflect.MessageType { + return _fastReflection_MsgCometInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCometInfo) New() protoreflect.Message { + return new(fastReflection_MsgCometInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCometInfo) Interface() protoreflect.ProtoMessage { + return (*MsgCometInfo)(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_MsgCometInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgCometInfo_authority, value) { + return + } + } + if len(x.Evidence) != 0 { + value := protoreflect.ValueOfList(&_MsgCometInfo_2_list{list: &x.Evidence}) + if !f(fd_MsgCometInfo_evidence, value) { + return + } + } + if len(x.ValidatorsHash) != 0 { + value := protoreflect.ValueOfBytes(x.ValidatorsHash) + if !f(fd_MsgCometInfo_validators_hash, value) { + return + } + } + if len(x.ProposerAddress) != 0 { + value := protoreflect.ValueOfBytes(x.ProposerAddress) + if !f(fd_MsgCometInfo_proposer_address, value) { + return + } + } + if x.LastCommit != nil { + value := protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) + if !f(fd_MsgCometInfo_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_MsgCometInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.consensus.v1.MsgCometInfo.authority": + return x.Authority != "" + case "cosmos.consensus.v1.MsgCometInfo.evidence": + return len(x.Evidence) != 0 + case "cosmos.consensus.v1.MsgCometInfo.validators_hash": + return len(x.ValidatorsHash) != 0 + case "cosmos.consensus.v1.MsgCometInfo.proposer_address": + return len(x.ProposerAddress) != 0 + case "cosmos.consensus.v1.MsgCometInfo.last_commit": + return x.LastCommit != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgCometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfo 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_MsgCometInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.consensus.v1.MsgCometInfo.authority": + x.Authority = "" + case "cosmos.consensus.v1.MsgCometInfo.evidence": + x.Evidence = nil + case "cosmos.consensus.v1.MsgCometInfo.validators_hash": + x.ValidatorsHash = nil + case "cosmos.consensus.v1.MsgCometInfo.proposer_address": + x.ProposerAddress = nil + case "cosmos.consensus.v1.MsgCometInfo.last_commit": + x.LastCommit = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgCometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfo 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_MsgCometInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.consensus.v1.MsgCometInfo.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.consensus.v1.MsgCometInfo.evidence": + if len(x.Evidence) == 0 { + return protoreflect.ValueOfList(&_MsgCometInfo_2_list{}) + } + listValue := &_MsgCometInfo_2_list{list: &x.Evidence} + return protoreflect.ValueOfList(listValue) + case "cosmos.consensus.v1.MsgCometInfo.validators_hash": + value := x.ValidatorsHash + return protoreflect.ValueOfBytes(value) + case "cosmos.consensus.v1.MsgCometInfo.proposer_address": + value := x.ProposerAddress + return protoreflect.ValueOfBytes(value) + case "cosmos.consensus.v1.MsgCometInfo.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.MsgCometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfo 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_MsgCometInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.consensus.v1.MsgCometInfo.authority": + x.Authority = value.Interface().(string) + case "cosmos.consensus.v1.MsgCometInfo.evidence": + lv := value.List() + clv := lv.(*_MsgCometInfo_2_list) + x.Evidence = *clv.list + case "cosmos.consensus.v1.MsgCometInfo.validators_hash": + x.ValidatorsHash = value.Bytes() + case "cosmos.consensus.v1.MsgCometInfo.proposer_address": + x.ProposerAddress = value.Bytes() + case "cosmos.consensus.v1.MsgCometInfo.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.MsgCometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfo 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_MsgCometInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.consensus.v1.MsgCometInfo.evidence": + if x.Evidence == nil { + x.Evidence = []*v11.Misbehavior{} + } + value := &_MsgCometInfo_2_list{list: &x.Evidence} + return protoreflect.ValueOfList(value) + case "cosmos.consensus.v1.MsgCometInfo.last_commit": + if x.LastCommit == nil { + x.LastCommit = new(v11.CommitInfo) + } + return protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) + case "cosmos.consensus.v1.MsgCometInfo.authority": + panic(fmt.Errorf("field authority of message cosmos.consensus.v1.MsgCometInfo is not mutable")) + case "cosmos.consensus.v1.MsgCometInfo.validators_hash": + panic(fmt.Errorf("field validators_hash of message cosmos.consensus.v1.MsgCometInfo is not mutable")) + case "cosmos.consensus.v1.MsgCometInfo.proposer_address": + panic(fmt.Errorf("field proposer_address of message cosmos.consensus.v1.MsgCometInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgCometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfo 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_MsgCometInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.consensus.v1.MsgCometInfo.authority": + return protoreflect.ValueOfString("") + case "cosmos.consensus.v1.MsgCometInfo.evidence": + list := []*v11.Misbehavior{} + return protoreflect.ValueOfList(&_MsgCometInfo_2_list{list: &list}) + case "cosmos.consensus.v1.MsgCometInfo.validators_hash": + return protoreflect.ValueOfBytes(nil) + case "cosmos.consensus.v1.MsgCometInfo.proposer_address": + return protoreflect.ValueOfBytes(nil) + case "cosmos.consensus.v1.MsgCometInfo.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.MsgCometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfo 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_MsgCometInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.MsgCometInfo", 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_MsgCometInfo) 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_MsgCometInfo) 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_MsgCometInfo) 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_MsgCometInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCometInfo) + 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().(*MsgCometInfo) + 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().(*MsgCometInfo) + 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: MsgCometInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCometInfo: 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_MsgCometInfoResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_consensus_v1_tx_proto_init() + md_MsgCometInfoResponse = File_cosmos_consensus_v1_tx_proto.Messages().ByName("MsgCometInfoResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgCometInfoResponse)(nil) + +type fastReflection_MsgCometInfoResponse MsgCometInfoResponse + +func (x *MsgCometInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCometInfoResponse)(x) +} + +func (x *MsgCometInfoResponse) 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_MsgCometInfoResponse_messageType fastReflection_MsgCometInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCometInfoResponse_messageType{} + +type fastReflection_MsgCometInfoResponse_messageType struct{} + +func (x fastReflection_MsgCometInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCometInfoResponse)(nil) +} +func (x fastReflection_MsgCometInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCometInfoResponse) +} +func (x fastReflection_MsgCometInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCometInfoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCometInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCometInfoResponse +} + +// 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_MsgCometInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCometInfoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCometInfoResponse) New() protoreflect.Message { + return new(fastReflection_MsgCometInfoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCometInfoResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCometInfoResponse)(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_MsgCometInfoResponse) 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_MsgCometInfoResponse) 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.MsgCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfoResponse 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_MsgCometInfoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfoResponse 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_MsgCometInfoResponse) 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.MsgCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfoResponse 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_MsgCometInfoResponse) 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.MsgCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfoResponse 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_MsgCometInfoResponse) 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.MsgCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfoResponse 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_MsgCometInfoResponse) 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.MsgCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfoResponse 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_MsgCometInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.MsgCometInfoResponse", 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_MsgCometInfoResponse) 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_MsgCometInfoResponse) 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_MsgCometInfoResponse) 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_MsgCometInfoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCometInfoResponse) + 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().(*MsgCometInfoResponse) + 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().(*MsgCometInfoResponse) + 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: MsgCometInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCometInfoResponse: 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. @@ -1403,6 +2529,106 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_cosmos_consensus_v1_tx_proto_rawDescGZIP(), []int{1} } +// MsgCometInfo is the Msg/CometInfo request type. +type MsgCometInfo 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 *MsgCometInfo) Reset() { + *x = MsgCometInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_consensus_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCometInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCometInfo) ProtoMessage() {} + +// Deprecated: Use MsgCometInfo.ProtoReflect.Descriptor instead. +func (*MsgCometInfo) Descriptor() ([]byte, []int) { + return file_cosmos_consensus_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgCometInfo) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgCometInfo) GetEvidence() []*v11.Misbehavior { + if x != nil { + return x.Evidence + } + return nil +} + +func (x *MsgCometInfo) GetValidatorsHash() []byte { + if x != nil { + return x.ValidatorsHash + } + return nil +} + +func (x *MsgCometInfo) GetProposerAddress() []byte { + if x != nil { + return x.ProposerAddress + } + return nil +} + +func (x *MsgCometInfo) GetLastCommit() *v11.CommitInfo { + if x != nil { + return x.LastCommit + } + return nil +} + +// MsgCometInfoResponse defines the response +type MsgCometInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgCometInfoResponse) Reset() { + *x = MsgCometInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_consensus_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCometInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCometInfoResponse) ProtoMessage() {} + +// Deprecated: Use MsgCometInfoResponse.ProtoReflect.Descriptor instead. +func (*MsgCometInfoResponse) 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{ @@ -1415,52 +2641,82 @@ var file_cosmos_consensus_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x04, 0x0a, 0x0f, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, - 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x3d, 0x0a, 0x08, - 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x48, 0x0a, - 0x04, 0x61, 0x62, 0x63, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, - 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x42, 0x43, 0x49, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x15, 0x18, 0x01, 0xda, 0xb4, + 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x63, 0x6f, 0x6d, 0x65, + 0x74, 0x62, 0x66, 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x04, 0x0a, 0x0f, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x3d, 0x0a, 0x08, 0x65, 0x76, + 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, + 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 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, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x48, 0x0a, 0x04, 0x61, + 0x62, 0x63, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6d, 0x65, + 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x42, + 0x43, 0x49, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x15, 0x18, 0x01, 0xda, 0xb4, 0x2d, 0x0f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x35, 0x30, 0x52, + 0x04, 0x61, 0x62, 0x63, 0x69, 0x12, 0x55, 0x0a, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, + 0x6e, 0x79, 0x18, 0x06, 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, 0x53, 0x79, 0x6e, + 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x13, 0xda, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x35, - 0x30, 0x52, 0x04, 0x61, 0x62, 0x63, 0x69, 0x12, 0x55, 0x0a, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, - 0x72, 0x6f, 0x6e, 0x79, 0x18, 0x06, 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, 0x53, - 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x13, - 0xda, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, - 0x2e, 0x35, 0x31, 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x12, 0x4f, - 0x0a, 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x13, 0xda, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x20, 0x30, 0x2e, 0x35, 0x32, 0x52, 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, - 0x39, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, - 0xe7, 0xb0, 0x2a, 0x26, 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, 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, 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, + 0x31, 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x12, 0x4f, 0x0a, 0x07, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x13, 0xda, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, + 0x30, 0x2e, 0x35, 0x32, 0x52, 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x39, 0x82, + 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, + 0x2a, 0x26, 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, 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, 0xcc, 0x02, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 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, 0x16, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe0, 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, 0x59, 0x0a, 0x09, 0x43, + 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x29, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 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, @@ -1488,31 +2744,39 @@ 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, 2) +var file_cosmos_consensus_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_cosmos_consensus_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: cosmos.consensus.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: cosmos.consensus.v1.MsgUpdateParamsResponse - (*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 + (*MsgCometInfo)(nil), // 2: cosmos.consensus.v1.MsgCometInfo + (*MsgCometInfoResponse)(nil), // 3: cosmos.consensus.v1.MsgCometInfoResponse + (*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 } var file_cosmos_consensus_v1_tx_proto_depIdxs = []int32{ - 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 + 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.MsgCometInfo.evidence:type_name -> cometbft.abci.v1.Misbehavior + 11, // 7: cosmos.consensus.v1.MsgCometInfo.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.CometInfo:input_type -> cosmos.consensus.v1.MsgCometInfo + 1, // 10: cosmos.consensus.v1.Msg.UpdateParams:output_type -> cosmos.consensus.v1.MsgUpdateParamsResponse + 3, // 11: cosmos.consensus.v1.Msg.CometInfo:output_type -> cosmos.consensus.v1.MsgCometInfoResponse + 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 } func init() { file_cosmos_consensus_v1_tx_proto_init() } @@ -1545,6 +2809,30 @@ 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.(*MsgCometInfo); 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.(*MsgCometInfoResponse); 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{ @@ -1552,7 +2840,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: 2, + NumMessages: 4, 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 14f2e80d209e..b4231edff8d7 100644 --- a/api/cosmos/consensus/v1/tx_grpc.pb.go +++ b/api/cosmos/consensus/v1/tx_grpc.pb.go @@ -22,6 +22,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_UpdateParams_FullMethodName = "/cosmos.consensus.v1.Msg/UpdateParams" + Msg_CometInfo_FullMethodName = "/cosmos.consensus.v1.Msg/CometInfo" ) // MsgClient is the client API for Msg service. @@ -31,6 +32,7 @@ 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) + CometInfo(ctx context.Context, in *MsgCometInfo, opts ...grpc.CallOption) (*MsgCometInfoResponse, error) } type msgClient struct { @@ -50,6 +52,15 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) CometInfo(ctx context.Context, in *MsgCometInfo, opts ...grpc.CallOption) (*MsgCometInfoResponse, error) { + out := new(MsgCometInfoResponse) + err := c.cc.Invoke(ctx, Msg_CometInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -57,6 +68,7 @@ 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) + CometInfo(context.Context, *MsgCometInfo) (*MsgCometInfoResponse, error) mustEmbedUnimplementedMsgServer() } @@ -67,6 +79,9 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (UnimplementedMsgServer) CometInfo(context.Context, *MsgCometInfo) (*MsgCometInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CometInfo not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -98,6 +113,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_CometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCometInfo) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CometInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CometInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CometInfo(ctx, req.(*MsgCometInfo)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -109,6 +142,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "CometInfo", + Handler: _Msg_CometInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/consensus/v1/tx.proto", diff --git a/x/consensus/keeper/keeper.go b/x/consensus/keeper/keeper.go index 11226feab12f..ec59f1d40a9c 100644 --- a/x/consensus/keeper/keeper.go +++ b/x/consensus/keeper/keeper.go @@ -10,6 +10,7 @@ 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" @@ -102,3 +103,22 @@ func (k Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (* return &types.MsgUpdateParamsResponse{}, nil } + +func (k Keeper) CometInfo(ctx context.Context, msg *types.MsgCometInfo) (*types.MsgCometInfoResponse, error) { + if coreapp.ConsensusIdentity != msg.Authority { + return nil, fmt.Errorf("invalid authority; expected %s, got %s", k.GetAuthority(), 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.MsgCometInfoResponse{}, nil +} diff --git a/x/consensus/proto/cosmos/consensus/v1/query.proto b/x/consensus/proto/cosmos/consensus/v1/query.proto index 9a84c1909766..78576be7f065 100644 --- a/x/consensus/proto/cosmos/consensus/v1/query.proto +++ b/x/consensus/proto/cosmos/consensus/v1/query.proto @@ -13,15 +13,25 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/cosmos/consensus/v1/params"; } + + rpc CometInfo(QueryCometInfoRequest) returns (QueryCometInfoResponse): } -// QueryParamsRequest defines the request type for querying x/consensus parameters. -message QueryParamsRequest {} +// QueryCometInfoRequest defines the request type for querying x/consensus comet info. +message QueryCometInfoRequest {} -// QueryParamsResponse defines the response type for querying x/consensus parameters. -message QueryParamsResponse { - // params are the tendermint consensus params stored in the consensus module. - // Please note that `params.version` is not populated in this response, it is - // tracked separately in the x/upgrade module. - cometbft.types.v1.ConsensusParams params = 1; -} +// QueryCometInfoResponse defines the response type for querying x/consensus comet info. +message QueryCometInfoResponse { + // 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. + message QueryParamsRequest {} + + // QueryParamsResponse defines the response type for querying x/consensus parameters. + message QueryParamsResponse { + // params are the tendermint consensus params stored in the consensus module. + // Please note that `params.version` is not populated in this response, it is + // tracked separately in the x/upgrade module. + cometbft.types.v1.ConsensusParams params = 1; + } diff --git a/x/consensus/proto/cosmos/consensus/v1/tx.proto b/x/consensus/proto/cosmos/consensus/v1/tx.proto index d0d8405ffd89..7e2e85131127 100644 --- a/x/consensus/proto/cosmos/consensus/v1/tx.proto +++ b/x/consensus/proto/cosmos/consensus/v1/tx.proto @@ -6,6 +6,7 @@ import "amino/amino.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; import "cometbft/types/v1/params.proto"; +import "cometbft/abci/v1/types.proto"; option go_package = "cosmossdk.io/x/consensus/types"; @@ -18,6 +19,8 @@ service Msg { rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse) { option (cosmos_proto.method_added_in) = "cosmos-sdk 0.47"; } + + rpc CometInfo(MsgCometInfo) returns (MsgCometInfoResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -46,3 +49,27 @@ message MsgUpdateParams { // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. message MsgUpdateParamsResponse {} + +// MsgCometInfo is the Msg/CometInfo request type. +message MsgCometInfo { + 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 MsgCometInfoResponse {} diff --git a/x/consensus/types/consensus.pb.go b/x/consensus/types/consensus.pb.go index 94482f39f8d9..0029ca982928 100644 --- a/x/consensus/types/consensus.pb.go +++ b/x/consensus/types/consensus.pb.go @@ -6,7 +6,6 @@ package types import ( fmt "fmt" v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" - v11 "github.com/cometbft/cometbft/api/cometbft/types/v1" proto "github.com/cosmos/gogoproto/proto" io "io" math "math" @@ -93,145 +92,8 @@ func (m *CometInfo) GetLastCommit() *v1.CommitInfo { return nil } -// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft. -type ConsensusMsgParams struct { - // params defines the x/consensus parameters to be passed from comet. - // - // NOTE: All parameters must be supplied. - Version *v11.VersionParams `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Block *v11.BlockParams `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` - Evidence *v11.EvidenceParams `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"` - Validator *v11.ValidatorParams `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` - Abci *v11.ABCIParams `protobuf:"bytes,5,opt,name=abci,proto3" json:"abci,omitempty"` // Deprecated: Do not use. - Synchrony *v11.SynchronyParams `protobuf:"bytes,6,opt,name=synchrony,proto3" json:"synchrony,omitempty"` - Feature *v11.FeatureParams `protobuf:"bytes,7,opt,name=feature,proto3" json:"feature,omitempty"` -} - -func (m *ConsensusMsgParams) Reset() { *m = ConsensusMsgParams{} } -func (m *ConsensusMsgParams) String() string { return proto.CompactTextString(m) } -func (*ConsensusMsgParams) ProtoMessage() {} -func (*ConsensusMsgParams) Descriptor() ([]byte, []int) { - return fileDescriptor_7ed86dd7d42fb61b, []int{1} -} -func (m *ConsensusMsgParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsensusMsgParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusMsgParams.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 *ConsensusMsgParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusMsgParams.Merge(m, src) -} -func (m *ConsensusMsgParams) XXX_Size() int { - return m.Size() -} -func (m *ConsensusMsgParams) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusMsgParams.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusMsgParams proto.InternalMessageInfo - -func (m *ConsensusMsgParams) GetVersion() *v11.VersionParams { - if m != nil { - return m.Version - } - return nil -} - -func (m *ConsensusMsgParams) GetBlock() *v11.BlockParams { - if m != nil { - return m.Block - } - return nil -} - -func (m *ConsensusMsgParams) GetEvidence() *v11.EvidenceParams { - if m != nil { - return m.Evidence - } - return nil -} - -func (m *ConsensusMsgParams) GetValidator() *v11.ValidatorParams { - if m != nil { - return m.Validator - } - return nil -} - -// Deprecated: Do not use. -func (m *ConsensusMsgParams) GetAbci() *v11.ABCIParams { - if m != nil { - return m.Abci - } - return nil -} - -func (m *ConsensusMsgParams) GetSynchrony() *v11.SynchronyParams { - if m != nil { - return m.Synchrony - } - return nil -} - -func (m *ConsensusMsgParams) GetFeature() *v11.FeatureParams { - if m != nil { - return m.Feature - } - return nil -} - -// ConsensusMsgParamsResponse defines the response structure for executing a -// ConsensusMsgParams message. -type ConsensusMsgParamsResponse struct { -} - -func (m *ConsensusMsgParamsResponse) Reset() { *m = ConsensusMsgParamsResponse{} } -func (m *ConsensusMsgParamsResponse) String() string { return proto.CompactTextString(m) } -func (*ConsensusMsgParamsResponse) ProtoMessage() {} -func (*ConsensusMsgParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ed86dd7d42fb61b, []int{2} -} -func (m *ConsensusMsgParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsensusMsgParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusMsgParamsResponse.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 *ConsensusMsgParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusMsgParamsResponse.Merge(m, src) -} -func (m *ConsensusMsgParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *ConsensusMsgParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusMsgParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusMsgParamsResponse proto.InternalMessageInfo - func init() { proto.RegisterType((*CometInfo)(nil), "cosmos.consensus.v1.CometInfo") - proto.RegisterType((*ConsensusMsgParams)(nil), "cosmos.consensus.v1.ConsensusMsgParams") - proto.RegisterType((*ConsensusMsgParamsResponse)(nil), "cosmos.consensus.v1.ConsensusMsgParamsResponse") } func init() { @@ -239,37 +101,25 @@ func init() { } var fileDescriptor_7ed86dd7d42fb61b = []byte{ - // 469 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0xcf, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0xb3, 0x4d, 0xff, 0xd0, 0x0d, 0xa2, 0x68, 0xb9, 0xac, 0xa2, 0x74, 0x15, 0xc2, 0x81, - 0x70, 0x71, 0x94, 0x00, 0x12, 0x20, 0x55, 0xa2, 0x89, 0x40, 0xf4, 0x50, 0x09, 0x19, 0x89, 0x03, - 0x97, 0x68, 0x6d, 0x6f, 0xb0, 0xd5, 0xd8, 0x63, 0xed, 0xb8, 0x16, 0x79, 0x0b, 0x1e, 0x88, 0x07, - 0xe0, 0xd8, 0x23, 0xdc, 0x50, 0xf2, 0x22, 0x68, 0x77, 0xed, 0xb8, 0x52, 0xd3, 0xe3, 0x7e, 0xf3, - 0xfd, 0x66, 0x76, 0x3e, 0x7b, 0xe9, 0xb3, 0x10, 0x30, 0x05, 0x1c, 0x85, 0x90, 0xa1, 0xca, 0xf0, - 0x1a, 0x47, 0xe5, 0xb8, 0x39, 0x78, 0xb9, 0x86, 0x02, 0xd8, 0x13, 0x67, 0xf2, 0x1a, 0xbd, 0x1c, - 0x77, 0x7b, 0x21, 0xa4, 0xaa, 0x08, 0x16, 0xc5, 0x48, 0x06, 0x61, 0x62, 0xb0, 0x62, 0x95, 0xab, - 0x0a, 0xe9, 0x8a, 0x6d, 0xd5, 0xaa, 0xa6, 0x9c, 0x4b, 0x2d, 0xd3, 0xaa, 0x3e, 0xf8, 0x4b, 0xe8, - 0xf1, 0xcc, 0x58, 0x2e, 0xb2, 0x05, 0xb0, 0xb7, 0xf4, 0x81, 0x2a, 0x93, 0x48, 0x65, 0xa1, 0xe2, - 0xa4, 0xdf, 0x1e, 0x76, 0x26, 0xa7, 0x5e, 0xdd, 0xc0, 0x33, 0xed, 0xbd, 0x72, 0xec, 0x5d, 0x26, - 0x18, 0xa8, 0x58, 0x96, 0x09, 0x68, 0x7f, 0x6b, 0x67, 0xcf, 0xe9, 0x49, 0x29, 0x97, 0x49, 0x24, - 0x0b, 0xd0, 0x38, 0x8f, 0x25, 0xc6, 0x7c, 0xaf, 0x4f, 0x86, 0x0f, 0xfd, 0x47, 0x8d, 0xfc, 0x49, - 0x62, 0xcc, 0x5e, 0xd0, 0xc7, 0xb9, 0x86, 0x1c, 0x50, 0xe9, 0xb9, 0x8c, 0x22, 0xad, 0x10, 0x79, - 0xdb, 0x3a, 0x4f, 0x6a, 0xfd, 0xdc, 0xc9, 0xec, 0x8c, 0x76, 0x96, 0x12, 0x8b, 0x79, 0x08, 0x69, - 0x9a, 0x14, 0x7c, 0xbf, 0x4f, 0x86, 0x9d, 0x49, 0xef, 0xee, 0x8d, 0x66, 0xb6, 0x6e, 0x36, 0xf0, - 0xa9, 0x01, 0xdc, 0x79, 0xf0, 0xab, 0x4d, 0xd9, 0xac, 0x8e, 0xea, 0x12, 0xbf, 0x7f, 0xb6, 0x8b, - 0xb3, 0x77, 0xf4, 0xa8, 0x54, 0x1a, 0x13, 0xc8, 0x38, 0xb1, 0x1d, 0xfb, 0x4d, 0x47, 0x17, 0x5d, - 0x39, 0xf6, 0xbe, 0x3a, 0x87, 0x43, 0xfc, 0x1a, 0x60, 0xaf, 0xe8, 0x41, 0xb0, 0x84, 0xf0, 0xca, - 0xee, 0xd6, 0x99, 0x88, 0x1d, 0xe4, 0xd4, 0xd4, 0x2b, 0xce, 0x99, 0xd9, 0xd9, 0xad, 0x58, 0xdb, - 0x16, 0x7c, 0xba, 0x03, 0xfc, 0x50, 0x59, 0x2a, 0xb6, 0x89, 0xf6, 0x3d, 0x3d, 0xde, 0x66, 0x58, - 0x85, 0x30, 0xd8, 0x75, 0xe5, 0xda, 0x53, 0x35, 0x68, 0x20, 0xf6, 0x9a, 0xee, 0x9b, 0xac, 0xf8, - 0x81, 0x85, 0x4f, 0x77, 0xc0, 0xe7, 0xd3, 0xd9, 0x85, 0xe3, 0xa6, 0x7b, 0x9c, 0xf8, 0xd6, 0x6e, - 0x06, 0xe3, 0x2a, 0x0b, 0x63, 0x0d, 0xd9, 0x8a, 0x1f, 0xde, 0x3b, 0xf8, 0x4b, 0xed, 0xa9, 0x07, - 0x6f, 0x21, 0x93, 0xf5, 0x42, 0xc9, 0xe2, 0x5a, 0x2b, 0x7e, 0x74, 0x6f, 0xd6, 0x1f, 0x9d, 0xa3, - 0xce, 0xba, 0x02, 0x06, 0x3d, 0xda, 0xbd, 0xfb, 0xf5, 0x7c, 0x85, 0xb9, 0x11, 0xa7, 0x6f, 0x7e, - 0xaf, 0x05, 0xb9, 0x59, 0x0b, 0xf2, 0x6f, 0x2d, 0xc8, 0xcf, 0x8d, 0x68, 0xdd, 0x6c, 0x44, 0xeb, - 0xcf, 0x46, 0xb4, 0xbe, 0x09, 0xf7, 0x4a, 0x30, 0xba, 0xf2, 0x12, 0x18, 0xfd, 0xb8, 0xf5, 0xa4, - 0xec, 0xc4, 0xe0, 0xd0, 0xfe, 0xf9, 0x2f, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xad, 0x23, 0x1b, - 0x68, 0x73, 0x03, 0x00, 0x00, + // 285 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xb1, 0x4e, 0xf3, 0x30, + 0x14, 0x85, 0xeb, 0xbf, 0xbf, 0x10, 0xb8, 0x88, 0xa2, 0xb0, 0x44, 0xa8, 0x58, 0x15, 0x0c, 0x94, + 0xc5, 0x51, 0xca, 0x02, 0x03, 0x03, 0x74, 0x81, 0x81, 0x25, 0x23, 0x4b, 0xe4, 0x38, 0xae, 0x62, + 0xd1, 0xe4, 0x46, 0xbe, 0xc6, 0x82, 0xb7, 0xe0, 0xb1, 0x18, 0x3b, 0xc2, 0x86, 0x92, 0x17, 0x41, + 0x49, 0x28, 0x41, 0x62, 0x3c, 0xc7, 0xe7, 0x93, 0x7c, 0x3f, 0x7a, 0x22, 0x01, 0x73, 0xc0, 0x40, + 0x42, 0x81, 0xaa, 0xc0, 0x27, 0x0c, 0x5c, 0xd8, 0x07, 0x5e, 0x1a, 0xb0, 0xe0, 0x1d, 0x74, 0x23, + 0xde, 0xf7, 0x2e, 0x3c, 0x9c, 0x48, 0xc8, 0x95, 0x4d, 0x96, 0x36, 0x10, 0x89, 0xd4, 0x0d, 0x66, + 0x5f, 0x4a, 0xf5, 0x8d, 0x1c, 0x7f, 0x10, 0xba, 0xb3, 0x68, 0x06, 0x77, 0xc5, 0x12, 0xbc, 0x4b, + 0xba, 0xad, 0x9c, 0x4e, 0x55, 0x21, 0x95, 0x4f, 0xa6, 0xc3, 0xd9, 0x68, 0x7e, 0xc4, 0x37, 0x38, + 0x6f, 0x70, 0xee, 0x42, 0x7e, 0xaf, 0x31, 0x51, 0x99, 0x70, 0x1a, 0x4c, 0xf4, 0x33, 0xf7, 0x4e, + 0xe9, 0xd8, 0x89, 0x95, 0x4e, 0x85, 0x05, 0x83, 0x71, 0x26, 0x30, 0xf3, 0xff, 0x4d, 0xc9, 0x6c, + 0x37, 0xda, 0xeb, 0xeb, 0x5b, 0x81, 0x99, 0x77, 0x46, 0xf7, 0x4b, 0x03, 0x25, 0xa0, 0x32, 0xb1, + 0x48, 0x53, 0xa3, 0x10, 0xfd, 0x61, 0xbb, 0x1c, 0x6f, 0xfa, 0xeb, 0xae, 0xf6, 0xae, 0xe8, 0x68, + 0x25, 0xd0, 0xc6, 0x12, 0xf2, 0x5c, 0x5b, 0xff, 0xff, 0x94, 0xcc, 0x46, 0xf3, 0xc9, 0xdf, 0x1f, + 0x2d, 0xda, 0xf7, 0xe6, 0x82, 0x88, 0x36, 0x40, 0x97, 0x6f, 0x2e, 0xde, 0x2a, 0x46, 0xd6, 0x15, + 0x23, 0x9f, 0x15, 0x23, 0xaf, 0x35, 0x1b, 0xac, 0x6b, 0x36, 0x78, 0xaf, 0xd9, 0xe0, 0x81, 0x75, + 0xa2, 0x30, 0x7d, 0xe4, 0x1a, 0x82, 0xe7, 0x5f, 0x56, 0x5b, 0x37, 0xc9, 0x56, 0x2b, 0xe7, 0xfc, + 0x2b, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x63, 0x02, 0x4f, 0x76, 0x01, 0x00, 0x00, } func (m *CometInfo) Marshal() (dAtA []byte, err error) { @@ -335,136 +185,6 @@ func (m *CometInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ConsensusMsgParams) 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 *ConsensusMsgParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusMsgParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Feature != nil { - { - size, err := m.Feature.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.Synchrony != nil { - { - size, err := m.Synchrony.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Abci != nil { - { - size, err := m.Abci.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Validator != nil { - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Evidence != nil { - { - size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Block != nil { - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Version != nil { - { - size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ConsensusMsgParamsResponse) 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 *ConsensusMsgParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusMsgParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func encodeVarintConsensus(dAtA []byte, offset int, v uint64) int { offset -= sovConsensus(v) base := offset @@ -503,52 +223,6 @@ func (m *CometInfo) Size() (n int) { return n } -func (m *ConsensusMsgParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Version != nil { - l = m.Version.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Evidence != nil { - l = m.Evidence.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Validator != nil { - l = m.Validator.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Abci != nil { - l = m.Abci.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Synchrony != nil { - l = m.Synchrony.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Feature != nil { - l = m.Feature.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - return n -} - -func (m *ConsensusMsgParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func sovConsensus(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -743,358 +417,6 @@ func (m *CometInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *ConsensusMsgParams) 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 ErrIntOverflowConsensus - } - 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: ConsensusMsgParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusMsgParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Version == nil { - m.Version = &v11.VersionParams{} - } - if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Block == nil { - m.Block = &v11.BlockParams{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - 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 ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Evidence == nil { - m.Evidence = &v11.EvidenceParams{} - } - if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Validator == nil { - m.Validator = &v11.ValidatorParams{} - } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Abci", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Abci == nil { - m.Abci = &v11.ABCIParams{} - } - if err := m.Abci.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Synchrony", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Synchrony == nil { - m.Synchrony = &v11.SynchronyParams{} - } - if err := m.Synchrony.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Feature", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Feature == nil { - m.Feature = &v11.FeatureParams{} - } - if err := m.Feature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConsensusMsgParamsResponse) 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 ErrIntOverflowConsensus - } - 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: ConsensusMsgParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusMsgParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipConsensus(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/consensus/types/tx.pb.go b/x/consensus/types/tx.pb.go index 1dab2f45eacc..ca6f9f366f6c 100644 --- a/x/consensus/types/tx.pb.go +++ b/x/consensus/types/tx.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + v11 "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" @@ -170,47 +171,177 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo +// MsgCometInfo is the Msg/CometInfo request type. +type MsgCometInfo 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 *MsgCometInfo) Reset() { *m = MsgCometInfo{} } +func (m *MsgCometInfo) String() string { return proto.CompactTextString(m) } +func (*MsgCometInfo) ProtoMessage() {} +func (*MsgCometInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_2135c60575ab504d, []int{2} +} +func (m *MsgCometInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCometInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCometInfo.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 *MsgCometInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCometInfo.Merge(m, src) +} +func (m *MsgCometInfo) XXX_Size() int { + return m.Size() +} +func (m *MsgCometInfo) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCometInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCometInfo proto.InternalMessageInfo + +func (m *MsgCometInfo) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgCometInfo) GetEvidence() []*v11.Misbehavior { + if m != nil { + return m.Evidence + } + return nil +} + +func (m *MsgCometInfo) GetValidatorsHash() []byte { + if m != nil { + return m.ValidatorsHash + } + return nil +} + +func (m *MsgCometInfo) GetProposerAddress() []byte { + if m != nil { + return m.ProposerAddress + } + return nil +} + +func (m *MsgCometInfo) GetLastCommit() *v11.CommitInfo { + if m != nil { + return m.LastCommit + } + return nil +} + +// MsgCometInfoResponse defines the response +type MsgCometInfoResponse struct { +} + +func (m *MsgCometInfoResponse) Reset() { *m = MsgCometInfoResponse{} } +func (m *MsgCometInfoResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCometInfoResponse) ProtoMessage() {} +func (*MsgCometInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2135c60575ab504d, []int{3} +} +func (m *MsgCometInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCometInfoResponse.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 *MsgCometInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCometInfoResponse.Merge(m, src) +} +func (m *MsgCometInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCometInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCometInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCometInfoResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.consensus.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.consensus.v1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgCometInfo)(nil), "cosmos.consensus.v1.MsgCometInfo") + proto.RegisterType((*MsgCometInfoResponse)(nil), "cosmos.consensus.v1.MsgCometInfoResponse") } func init() { proto.RegisterFile("cosmos/consensus/v1/tx.proto", fileDescriptor_2135c60575ab504d) } var fileDescriptor_2135c60575ab504d = []byte{ - // 498 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x8b, 0xd3, 0x40, - 0x18, 0xc6, 0x1b, 0xb7, 0xdd, 0xb5, 0xa3, 0xb0, 0x98, 0x2a, 0x3b, 0x5b, 0x74, 0xa8, 0x45, 0x64, - 0x29, 0x76, 0xb2, 0xad, 0xeb, 0x5f, 0x10, 0xdc, 0x88, 0xa2, 0x87, 0x45, 0xc9, 0xb2, 0x1e, 0xbc, - 0xc8, 0x34, 0x99, 0xcd, 0x86, 0x6e, 0x32, 0x21, 0x33, 0x8d, 0xdb, 0x9b, 0x08, 0x5e, 0x3c, 0xf9, - 0x45, 0x84, 0x1e, 0xf6, 0x43, 0x88, 0xa7, 0xc5, 0x93, 0x78, 0x92, 0xf6, 0xd0, 0xaf, 0x21, 0x9d, - 0x99, 0x6c, 0xdc, 0x9a, 0xc2, 0x5e, 0x02, 0xc9, 0xf3, 0xfc, 0x9e, 0x27, 0xf3, 0xe6, 0x0d, 0xb8, - 0xee, 0x32, 0x1e, 0x32, 0x6e, 0xb9, 0x2c, 0xe2, 0x34, 0xe2, 0x03, 0x6e, 0xa5, 0x1d, 0x4b, 0x1c, - 0xe1, 0x38, 0x61, 0x82, 0x99, 0x35, 0xa5, 0xe2, 0x53, 0x15, 0xa7, 0x9d, 0xfa, 0x15, 0x12, 0x06, - 0x11, 0xb3, 0xe4, 0x55, 0xf9, 0xea, 0xeb, 0xca, 0xf7, 0x5e, 0xde, 0x59, 0x1a, 0x52, 0xd2, 0x9a, - 0x2e, 0x08, 0xb9, 0x3f, 0x8b, 0x0e, 0xb9, 0xaf, 0x05, 0xe4, 0xb2, 0x90, 0x8a, 0xde, 0xbe, 0xb0, - 0xc4, 0x30, 0xa6, 0xb2, 0x37, 0x26, 0x09, 0x09, 0x35, 0xd8, 0xfc, 0x56, 0x06, 0xab, 0x3b, 0xdc, - 0xdf, 0x8b, 0x3d, 0x22, 0xe8, 0x1b, 0xa9, 0x98, 0xf7, 0x41, 0x95, 0x0c, 0xc4, 0x01, 0x4b, 0x02, - 0x31, 0x84, 0x46, 0xc3, 0xd8, 0xa8, 0xda, 0xf0, 0xe7, 0x71, 0xfb, 0xaa, 0x6e, 0xdc, 0xf6, 0xbc, - 0x84, 0x72, 0xbe, 0x2b, 0x92, 0x20, 0xf2, 0x9d, 0xdc, 0x6a, 0x6e, 0x81, 0x4a, 0xef, 0x90, 0xb9, - 0x7d, 0x78, 0xa1, 0x61, 0x6c, 0x5c, 0xea, 0x22, 0x9c, 0x75, 0x63, 0xd9, 0x8d, 0xd3, 0x0e, 0xb6, - 0x67, 0xba, 0xaa, 0x71, 0x94, 0xd9, 0x7c, 0x02, 0x2e, 0xd2, 0x34, 0xf0, 0x68, 0xe4, 0x52, 0xb8, - 0x24, 0xc1, 0x9b, 0x05, 0xe0, 0x73, 0x6d, 0xd1, 0xec, 0x29, 0x62, 0x3e, 0x05, 0xd5, 0x94, 0x1c, - 0x06, 0x1e, 0x11, 0x2c, 0x81, 0x65, 0xc9, 0x37, 0x0b, 0xf8, 0xb7, 0x99, 0x47, 0x07, 0xe4, 0x90, - 0xf9, 0x12, 0x94, 0x49, 0xcf, 0x0d, 0x60, 0x45, 0xc2, 0x37, 0x0a, 0xe0, 0x6d, 0xfb, 0xd9, 0x2b, - 0xc5, 0xd9, 0xd7, 0x7e, 0x1f, 0xb7, 0x57, 0xd5, 0x20, 0xda, 0xdc, 0xeb, 0x37, 0x36, 0xf1, 0xbd, - 0x4d, 0x68, 0x38, 0x32, 0xc1, 0xdc, 0x03, 0x55, 0x3e, 0x8c, 0xdc, 0x83, 0x84, 0x45, 0x43, 0xb8, - 0xbc, 0xf0, 0x5d, 0x76, 0x33, 0x8f, 0xce, 0xac, 0xfd, 0x9f, 0xd9, 0x71, 0xf2, 0x24, 0xf3, 0x35, - 0x58, 0xd9, 0xa7, 0x44, 0x0c, 0x12, 0x0a, 0x57, 0x64, 0x68, 0xa3, 0x20, 0xf4, 0x85, 0x72, 0x2c, - 0x8e, 0xec, 0x3a, 0x59, 0xca, 0xe3, 0x47, 0x9f, 0xa6, 0xa3, 0x56, 0xfe, 0xe1, 0xbe, 0x4c, 0x47, - 0xad, 0xdb, 0xb9, 0xd9, 0x3a, 0xfa, 0x67, 0x4f, 0xe7, 0x76, 0xa3, 0xb9, 0x0e, 0xd6, 0xe6, 0x1e, - 0x39, 0x94, 0xc7, 0x33, 0x7b, 0xf7, 0xb3, 0x01, 0x96, 0x76, 0xb8, 0x6f, 0x7e, 0x00, 0x97, 0xcf, - 0xac, 0xd3, 0x2d, 0x5c, 0xb0, 0xdf, 0x78, 0x2e, 0xa5, 0x7e, 0xe7, 0x3c, 0xae, 0xac, 0xab, 0x59, - 0xfb, 0x31, 0x7f, 0xbe, 0xad, 0x07, 0xf5, 0xca, 0xc7, 0xe9, 0xa8, 0x65, 0xd8, 0x0f, 0xbf, 0x8f, - 0x91, 0x71, 0x32, 0x46, 0xc6, 0x9f, 0x31, 0x32, 0xbe, 0x4e, 0x50, 0xe9, 0x64, 0x82, 0x4a, 0xbf, - 0x26, 0xa8, 0xf4, 0x0e, 0x29, 0x82, 0x7b, 0x7d, 0x1c, 0xb0, 0x33, 0xc7, 0x94, 0x63, 0xec, 0x2d, - 0xcb, 0x7f, 0xe2, 0xee, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xb2, 0x37, 0x1a, 0xaf, 0x03, - 0x00, 0x00, + // 651 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, 0x01, 0xa5, 0x6c, 0xb0, 0x59, 0x56, 0xa3, 0x40, 0xa4, + 0x65, 0x11, 0x51, 0x48, 0x48, 0x64, 0x89, 0x06, 0x0e, 0x1b, 0x4d, 0x09, 0x26, 0x7a, 0xd9, 0xcc, + 0xb6, 0x43, 0xdb, 0x40, 0x3b, 0x4d, 0x67, 0xa8, 0xec, 0xcd, 0x78, 0xf4, 0xe4, 0x1f, 0x31, 0xe1, + 0xc0, 0x8f, 0x30, 0xc6, 0x03, 0xf1, 0x64, 0x3c, 0x11, 0x38, 0xec, 0xdf, 0x30, 0x9d, 0xe9, 0xc7, + 0x7e, 0x46, 0xe3, 0xa5, 0xc9, 0xcc, 0xfb, 0x3c, 0xcf, 0xfb, 0xf6, 0x79, 0x9f, 0x16, 0xcc, 0x19, + 0x84, 0xba, 0x84, 0x6a, 0x06, 0xf1, 0x28, 0xf6, 0xe8, 0x09, 0xd5, 0xc2, 0x8a, 0xc6, 0x4e, 0x55, + 0x3f, 0x20, 0x8c, 0xc0, 0x29, 0x51, 0x55, 0xd3, 0xaa, 0x1a, 0x56, 0x8a, 0xb7, 0x91, 0xeb, 0x78, + 0x44, 0xe3, 0x4f, 0x81, 0x2b, 0xce, 0x0a, 0x5c, 0x9d, 0x9f, 0xb4, 0x98, 0x24, 0x4a, 0x33, 0x71, + 0x03, 0x97, 0x5a, 0x91, 0xb4, 0x4b, 0xad, 0xb8, 0xa0, 0x18, 0xc4, 0xc5, 0xac, 0x71, 0xc8, 0x34, + 0xd6, 0xf4, 0x31, 0xef, 0xeb, 0xa3, 0x00, 0xb9, 0x09, 0x71, 0x2e, 0xad, 0xa3, 0x86, 0xe1, 0xf0, + 0xb1, 0x22, 0x9c, 0xa8, 0x96, 0xbf, 0x8e, 0x82, 0x42, 0x8d, 0x5a, 0x07, 0xbe, 0x89, 0x18, 0x7e, + 0xc3, 0x79, 0x70, 0x1d, 0xe4, 0xd0, 0x09, 0xb3, 0x49, 0xe0, 0xb0, 0xa6, 0x2c, 0x95, 0xa4, 0x85, + 0x5c, 0x55, 0xfe, 0x79, 0xbe, 0x3c, 0x1d, 0xcf, 0xb3, 0x6d, 0x9a, 0x01, 0xa6, 0x74, 0x9f, 0x05, + 0x8e, 0x67, 0xe9, 0x19, 0x14, 0xae, 0x81, 0xb1, 0xc6, 0x31, 0x31, 0x8e, 0xe4, 0xe1, 0x92, 0xb4, + 0x30, 0xb9, 0xaa, 0xa8, 0x49, 0x67, 0x55, 0x74, 0x0c, 0x2b, 0x6a, 0x35, 0xaa, 0x8b, 0x36, 0xba, + 0x00, 0xc3, 0x2d, 0x70, 0x03, 0x87, 0x8e, 0x89, 0x3d, 0x03, 0xcb, 0x23, 0x9c, 0x38, 0xdf, 0x87, + 0xf8, 0x32, 0x86, 0xc4, 0xdc, 0x94, 0x02, 0x5f, 0x80, 0x5c, 0x88, 0x8e, 0x1d, 0x13, 0x31, 0x12, + 0xc8, 0xa3, 0x9c, 0x5f, 0xee, 0xc3, 0x7f, 0x9b, 0x60, 0x62, 0x81, 0x8c, 0x04, 0x77, 0xc1, 0x68, + 0xe4, 0x8c, 0x3c, 0xc6, 0xc9, 0xf7, 0xfa, 0x90, 0xb7, 0xab, 0x3b, 0x7b, 0x82, 0x57, 0xbd, 0xf3, + 0xfb, 0x7c, 0xb9, 0x20, 0x8c, 0x58, 0xa6, 0xe6, 0x51, 0x69, 0x45, 0x7d, 0xba, 0x22, 0x4b, 0x3a, + 0x57, 0x80, 0x07, 0x20, 0x47, 0x9b, 0x9e, 0x61, 0x07, 0xc4, 0x6b, 0xca, 0xe3, 0x03, 0x67, 0xd9, + 0x4f, 0x30, 0xb1, 0xe6, 0x54, 0xaf, 0x66, 0x45, 0xcf, 0x94, 0xe0, 0x6b, 0x30, 0x71, 0x88, 0x11, + 0x3b, 0x09, 0xb0, 0x3c, 0xc1, 0x45, 0x4b, 0x7d, 0x44, 0x5f, 0x09, 0xc4, 0x60, 0xc9, 0x55, 0x3d, + 0x51, 0xd9, 0xdc, 0xf8, 0xd4, 0x3a, 0x5b, 0xca, 0x16, 0xf7, 0xb9, 0x75, 0xb6, 0xf4, 0x30, 0x03, + 0x6b, 0xa7, 0x6d, 0x29, 0xee, 0xca, 0x46, 0x79, 0x16, 0xcc, 0x74, 0x5d, 0xe9, 0x98, 0xfa, 0x11, + 0xbc, 0xfc, 0x63, 0x18, 0xe4, 0x6b, 0xd4, 0xda, 0x89, 0x46, 0xdb, 0xf3, 0x0e, 0xc9, 0x7f, 0xe7, + 0x68, 0xa3, 0x2d, 0x11, 0xc3, 0xa5, 0x91, 0xce, 0xa5, 0x44, 0x46, 0x47, 0xef, 0x5b, 0x73, 0x68, + 0x03, 0xdb, 0x28, 0x74, 0x48, 0xd0, 0x96, 0x86, 0x47, 0xa0, 0x90, 0x2e, 0x96, 0xd6, 0x6d, 0x44, + 0x6d, 0x9e, 0xa9, 0xbc, 0x7e, 0x33, 0xbb, 0xde, 0x45, 0xd4, 0x86, 0x8b, 0xe0, 0x96, 0x1f, 0x10, + 0x9f, 0x50, 0x1c, 0xd4, 0x91, 0x18, 0x84, 0xa7, 0x27, 0xaf, 0x17, 0x92, 0xfb, 0x78, 0x3e, 0xb8, + 0x05, 0x26, 0x8f, 0x11, 0x65, 0x75, 0x83, 0xb8, 0xae, 0xc3, 0xe2, 0x98, 0xcc, 0xf5, 0x4e, 0xb4, + 0xc3, 0xeb, 0xd1, 0x9b, 0xeb, 0x20, 0x22, 0x88, 0xf3, 0xe6, 0x7a, 0xaf, 0xd9, 0xf7, 0x07, 0x9b, + 0x9d, 0xba, 0x57, 0xbe, 0x0b, 0xa6, 0xdb, 0xcf, 0x89, 0xcd, 0xab, 0x97, 0x12, 0x18, 0xa9, 0x51, + 0x0b, 0x7e, 0x00, 0xf9, 0x8e, 0xaf, 0xf6, 0x81, 0xda, 0xe7, 0x27, 0xa3, 0x76, 0x2d, 0xab, 0xf8, + 0xf8, 0x5f, 0x50, 0xe9, 0x4a, 0xa7, 0xbe, 0x77, 0xc7, 0x68, 0xed, 0x19, 0x7c, 0x07, 0x72, 0xd9, + 0x8e, 0xe7, 0x07, 0xe9, 0xa5, 0x90, 0xe2, 0xe2, 0x5f, 0x21, 0x49, 0xbf, 0xe2, 0xd8, 0xc7, 0xd6, + 0xd9, 0x92, 0x54, 0x7d, 0xfe, 0xed, 0x4a, 0x91, 0x2e, 0xae, 0x14, 0xe9, 0xf2, 0x4a, 0x91, 0xbe, + 0x5c, 0x2b, 0x43, 0x17, 0xd7, 0xca, 0xd0, 0xaf, 0x6b, 0x65, 0xe8, 0xbd, 0x22, 0xa4, 0xa8, 0x79, + 0xa4, 0x3a, 0xa4, 0xc3, 0x3b, 0xfe, 0x21, 0x34, 0xc6, 0xf9, 0x5f, 0xed, 0xc9, 0x9f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x44, 0x70, 0x9a, 0xde, 0x8f, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -228,6 +359,7 @@ 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) + CometInfo(ctx context.Context, in *MsgCometInfo, opts ...grpc.CallOption) (*MsgCometInfoResponse, error) } type msgClient struct { @@ -247,11 +379,21 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) CometInfo(ctx context.Context, in *MsgCometInfo, opts ...grpc.CallOption) (*MsgCometInfoResponse, error) { + out := new(MsgCometInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Msg/CometInfo", 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) + CometInfo(context.Context, *MsgCometInfo) (*MsgCometInfoResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -261,6 +403,9 @@ 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) CometInfo(ctx context.Context, req *MsgCometInfo) (*MsgCometInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CometInfo not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -284,6 +429,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_CometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCometInfo) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CometInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.consensus.v1.Msg/CometInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CometInfo(ctx, req.(*MsgCometInfo)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.consensus.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -292,6 +455,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "CometInfo", + Handler: _Msg_CometInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/consensus/v1/tx.proto", @@ -422,6 +589,99 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *MsgCometInfo) 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 *MsgCometInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCometInfo) 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 *MsgCometInfoResponse) 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 *MsgCometInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCometInfoResponse) 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 @@ -479,6 +739,46 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } +func (m *MsgCometInfo) 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 *MsgCometInfoResponse) 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 } @@ -833,6 +1133,276 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgCometInfo) 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: MsgCometInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCometInfo: 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 *MsgCometInfoResponse) 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: MsgCometInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From f68c482812a1169d68462f2ebb0a9b456365470a Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Thu, 13 Jun 2024 12:52:13 +0200 Subject: [PATCH 06/12] add message --- api/cosmos/consensus/v1/query.pulsar.go | 998 ++++++- api/cosmos/consensus/v1/query_grpc.pb.go | 39 +- api/cosmos/consensus/v1/tx.pulsar.go | 497 ++-- api/cosmos/consensus/v1/tx_grpc.pb.go | 32 +- cosmossdk.io/server/v2/streaming/grpc.pb.go | 2414 +++++++++++++++++ .../store/snapshots/types/snapshot.pb.go | 2008 ++++++++++++++ cosmossdk.io/store/streaming/abci/grpc.pb.go | 1050 +++++++ cosmossdk.io/store/types/commit_info.pb.go | 864 ++++++ cosmossdk.io/store/types/listening.pb.go | 785 ++++++ x/consensus/keeper/keeper.go | 18 +- .../proto/cosmos/consensus/v1/query.proto | 22 +- .../proto/cosmos/consensus/v1/tx.proto | 7 +- x/consensus/types/query.pb.go | 370 ++- x/consensus/types/tx.pb.go | 210 +- 14 files changed, 8867 insertions(+), 447 deletions(-) create mode 100644 cosmossdk.io/server/v2/streaming/grpc.pb.go create mode 100644 cosmossdk.io/store/snapshots/types/snapshot.pb.go create mode 100644 cosmossdk.io/store/streaming/abci/grpc.pb.go create mode 100644 cosmossdk.io/store/types/commit_info.pb.go create mode 100644 cosmossdk.io/store/types/listening.pb.go diff --git a/api/cosmos/consensus/v1/query.pulsar.go b/api/cosmos/consensus/v1/query.pulsar.go index ef4d64ea7464..f8afbaa99607 100644 --- a/api/cosmos/consensus/v1/query.pulsar.go +++ b/api/cosmos/consensus/v1/query.pulsar.go @@ -14,6 +14,797 @@ import ( sync "sync" ) +var ( + md_QueryCometInfoRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_consensus_v1_query_proto_init() + md_QueryCometInfoRequest = File_cosmos_consensus_v1_query_proto.Messages().ByName("QueryCometInfoRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryCometInfoRequest)(nil) + +type fastReflection_QueryCometInfoRequest QueryCometInfoRequest + +func (x *QueryCometInfoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCometInfoRequest)(x) +} + +func (x *QueryCometInfoRequest) 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_QueryCometInfoRequest_messageType fastReflection_QueryCometInfoRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryCometInfoRequest_messageType{} + +type fastReflection_QueryCometInfoRequest_messageType struct{} + +func (x fastReflection_QueryCometInfoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCometInfoRequest)(nil) +} +func (x fastReflection_QueryCometInfoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCometInfoRequest) +} +func (x fastReflection_QueryCometInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCometInfoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCometInfoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCometInfoRequest +} + +// 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_QueryCometInfoRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryCometInfoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCometInfoRequest) New() protoreflect.Message { + return new(fastReflection_QueryCometInfoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCometInfoRequest) Interface() protoreflect.ProtoMessage { + return (*QueryCometInfoRequest)(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_QueryCometInfoRequest) 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_QueryCometInfoRequest) 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.QueryCometInfoRequest")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoRequest 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_QueryCometInfoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryCometInfoRequest")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoRequest 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_QueryCometInfoRequest) 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.QueryCometInfoRequest")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoRequest 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_QueryCometInfoRequest) 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.QueryCometInfoRequest")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoRequest 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_QueryCometInfoRequest) 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.QueryCometInfoRequest")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoRequest 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_QueryCometInfoRequest) 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.QueryCometInfoRequest")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoRequest 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_QueryCometInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.QueryCometInfoRequest", 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_QueryCometInfoRequest) 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_QueryCometInfoRequest) 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_QueryCometInfoRequest) 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_QueryCometInfoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCometInfoRequest) + 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().(*QueryCometInfoRequest) + 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().(*QueryCometInfoRequest) + 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: QueryCometInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCometInfoRequest: 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_QueryCometInfoResponse protoreflect.MessageDescriptor + fd_QueryCometInfoResponse_comet_info protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_consensus_v1_query_proto_init() + md_QueryCometInfoResponse = File_cosmos_consensus_v1_query_proto.Messages().ByName("QueryCometInfoResponse") + fd_QueryCometInfoResponse_comet_info = md_QueryCometInfoResponse.Fields().ByName("comet_info") +} + +var _ protoreflect.Message = (*fastReflection_QueryCometInfoResponse)(nil) + +type fastReflection_QueryCometInfoResponse QueryCometInfoResponse + +func (x *QueryCometInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCometInfoResponse)(x) +} + +func (x *QueryCometInfoResponse) 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_QueryCometInfoResponse_messageType fastReflection_QueryCometInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryCometInfoResponse_messageType{} + +type fastReflection_QueryCometInfoResponse_messageType struct{} + +func (x fastReflection_QueryCometInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCometInfoResponse)(nil) +} +func (x fastReflection_QueryCometInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCometInfoResponse) +} +func (x fastReflection_QueryCometInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCometInfoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCometInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCometInfoResponse +} + +// 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_QueryCometInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryCometInfoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCometInfoResponse) New() protoreflect.Message { + return new(fastReflection_QueryCometInfoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCometInfoResponse) Interface() protoreflect.ProtoMessage { + return (*QueryCometInfoResponse)(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_QueryCometInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CometInfo != nil { + value := protoreflect.ValueOfMessage(x.CometInfo.ProtoReflect()) + if !f(fd_QueryCometInfoResponse_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_QueryCometInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.consensus.v1.QueryCometInfoResponse.comet_info": + return x.CometInfo != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoResponse 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_QueryCometInfoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.consensus.v1.QueryCometInfoResponse.comet_info": + x.CometInfo = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoResponse 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_QueryCometInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.consensus.v1.QueryCometInfoResponse.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.QueryCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoResponse 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_QueryCometInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.consensus.v1.QueryCometInfoResponse.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.QueryCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoResponse 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_QueryCometInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.consensus.v1.QueryCometInfoResponse.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.QueryCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoResponse 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_QueryCometInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.consensus.v1.QueryCometInfoResponse.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.QueryCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoResponse 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_QueryCometInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.QueryCometInfoResponse", 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_QueryCometInfoResponse) 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_QueryCometInfoResponse) 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_QueryCometInfoResponse) 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_QueryCometInfoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCometInfoResponse) + 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().(*QueryCometInfoResponse) + 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().(*QueryCometInfoResponse) + 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: QueryCometInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCometInfoResponse: 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 ) @@ -32,7 +823,7 @@ func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[0] + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -390,7 +1181,7 @@ func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[1] + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -820,6 +1611,70 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// QueryCometInfoRequest defines the request type for querying x/consensus comet info. +type QueryCometInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryCometInfoRequest) Reset() { + *x = QueryCometInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCometInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCometInfoRequest) ProtoMessage() {} + +// Deprecated: Use QueryCometInfoRequest.ProtoReflect.Descriptor instead. +func (*QueryCometInfoRequest) 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 QueryCometInfoResponse 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 *QueryCometInfoResponse) Reset() { + *x = QueryCometInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCometInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCometInfoResponse) ProtoMessage() {} + +// Deprecated: Use QueryCometInfoResponse.ProtoReflect.Descriptor instead. +func (*QueryCometInfoResponse) Descriptor() ([]byte, []int) { + return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryCometInfoResponse) 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 @@ -830,7 +1685,7 @@ type QueryParamsRequest struct { func (x *QueryParamsRequest) Reset() { *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[0] + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -844,7 +1699,7 @@ func (*QueryParamsRequest) ProtoMessage() {} // Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{0} + return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{2} } // QueryParamsResponse defines the response type for querying x/consensus parameters. @@ -862,7 +1717,7 @@ type QueryParamsResponse struct { func (x *QueryParamsResponse) Reset() { *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[1] + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -876,7 +1731,7 @@ func (*QueryParamsResponse) ProtoMessage() {} // Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{1} + return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{3} } func (x *QueryParamsResponse) GetParams() *v1.ConsensusParams { @@ -896,35 +1751,51 @@ var file_cosmos_consensus_v1_query_proto_rawDesc = []byte{ 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 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, + 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, 0x17, 0x0a, 0x15, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x57, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0xf0, 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, 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, + 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, 0x64, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2a, + 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, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 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, 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, } var ( @@ -939,21 +1810,27 @@ 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, 2) +var file_cosmos_consensus_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_cosmos_consensus_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: cosmos.consensus.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: cosmos.consensus.v1.QueryParamsResponse - (*v1.ConsensusParams)(nil), // 2: cometbft.types.v1.ConsensusParams + (*QueryCometInfoRequest)(nil), // 0: cosmos.consensus.v1.QueryCometInfoRequest + (*QueryCometInfoResponse)(nil), // 1: cosmos.consensus.v1.QueryCometInfoResponse + (*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 } var file_cosmos_consensus_v1_query_proto_depIdxs = []int32{ - 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 + 4, // 0: cosmos.consensus.v1.QueryCometInfoResponse.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.CometInfo:input_type -> cosmos.consensus.v1.QueryCometInfoRequest + 3, // 4: cosmos.consensus.v1.Query.Params:output_type -> cosmos.consensus.v1.QueryParamsResponse + 1, // 5: cosmos.consensus.v1.Query.CometInfo:output_type -> cosmos.consensus.v1.QueryCometInfoResponse + 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 } func init() { file_cosmos_consensus_v1_query_proto_init() } @@ -961,9 +1838,10 @@ func file_cosmos_consensus_v1_query_proto_init() { if File_cosmos_consensus_v1_query_proto != nil { return } + 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.(*QueryParamsRequest); i { + switch v := v.(*QueryCometInfoRequest); i { case 0: return &v.state case 1: @@ -975,6 +1853,30 @@ func file_cosmos_consensus_v1_query_proto_init() { } } file_cosmos_consensus_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryCometInfoResponse); 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 + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_consensus_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsResponse); i { case 0: return &v.state @@ -993,7 +1895,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: 2, + NumMessages: 4, 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 03694d673fe9..c88fbf27d0f0 100644 --- a/api/cosmos/consensus/v1/query_grpc.pb.go +++ b/api/cosmos/consensus/v1/query_grpc.pb.go @@ -21,7 +21,8 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/cosmos.consensus.v1.Query/Params" + Query_Params_FullMethodName = "/cosmos.consensus.v1.Query/Params" + Query_CometInfo_FullMethodName = "/cosmos.consensus.v1.Query/CometInfo" ) // QueryClient is the client API for Query service. @@ -30,6 +31,7 @@ const ( type QueryClient interface { // Params queries the parameters of x/consensus module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + CometInfo(ctx context.Context, in *QueryCometInfoRequest, opts ...grpc.CallOption) (*QueryCometInfoResponse, error) } type queryClient struct { @@ -49,12 +51,22 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) CometInfo(ctx context.Context, in *QueryCometInfoRequest, opts ...grpc.CallOption) (*QueryCometInfoResponse, error) { + out := new(QueryCometInfoResponse) + err := c.cc.Invoke(ctx, Query_CometInfo_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(context.Context, *QueryCometInfoRequest) (*QueryCometInfoResponse, error) mustEmbedUnimplementedQueryServer() } @@ -65,6 +77,9 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (UnimplementedQueryServer) CometInfo(context.Context, *QueryCometInfoRequest) (*QueryCometInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CometInfo not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -96,6 +111,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_CometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCometInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CometInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_CometInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CometInfo(ctx, req.(*QueryCometInfoRequest)) + } + 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) @@ -107,6 +140,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "CometInfo", + Handler: _Query_CometInfo_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 ebd8c55c8fd6..def6529fc167 100644 --- a/api/cosmos/consensus/v1/tx.pulsar.go +++ b/api/cosmos/consensus/v1/tx.pulsar.go @@ -1267,85 +1267,85 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } } -var _ protoreflect.List = (*_MsgCometInfo_2_list)(nil) +var _ protoreflect.List = (*_MsgSetCometInfo_2_list)(nil) -type _MsgCometInfo_2_list struct { +type _MsgSetCometInfo_2_list struct { list *[]*v11.Misbehavior } -func (x *_MsgCometInfo_2_list) Len() int { +func (x *_MsgSetCometInfo_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_MsgCometInfo_2_list) Get(i int) protoreflect.Value { +func (x *_MsgSetCometInfo_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_MsgCometInfo_2_list) Set(i int, value protoreflect.Value) { +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 *_MsgCometInfo_2_list) Append(value protoreflect.Value) { +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 *_MsgCometInfo_2_list) AppendMutable() protoreflect.Value { +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 *_MsgCometInfo_2_list) Truncate(n int) { +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 *_MsgCometInfo_2_list) NewElement() protoreflect.Value { +func (x *_MsgSetCometInfo_2_list) NewElement() protoreflect.Value { v := new(v11.Misbehavior) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_MsgCometInfo_2_list) IsValid() bool { +func (x *_MsgSetCometInfo_2_list) IsValid() bool { return x.list != nil } var ( - md_MsgCometInfo protoreflect.MessageDescriptor - fd_MsgCometInfo_authority protoreflect.FieldDescriptor - fd_MsgCometInfo_evidence protoreflect.FieldDescriptor - fd_MsgCometInfo_validators_hash protoreflect.FieldDescriptor - fd_MsgCometInfo_proposer_address protoreflect.FieldDescriptor - fd_MsgCometInfo_last_commit protoreflect.FieldDescriptor + 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_MsgCometInfo = File_cosmos_consensus_v1_tx_proto.Messages().ByName("MsgCometInfo") - fd_MsgCometInfo_authority = md_MsgCometInfo.Fields().ByName("authority") - fd_MsgCometInfo_evidence = md_MsgCometInfo.Fields().ByName("evidence") - fd_MsgCometInfo_validators_hash = md_MsgCometInfo.Fields().ByName("validators_hash") - fd_MsgCometInfo_proposer_address = md_MsgCometInfo.Fields().ByName("proposer_address") - fd_MsgCometInfo_last_commit = md_MsgCometInfo.Fields().ByName("last_commit") + 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_MsgCometInfo)(nil) +var _ protoreflect.Message = (*fastReflection_MsgSetCometInfo)(nil) -type fastReflection_MsgCometInfo MsgCometInfo +type fastReflection_MsgSetCometInfo MsgSetCometInfo -func (x *MsgCometInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCometInfo)(x) +func (x *MsgSetCometInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSetCometInfo)(x) } -func (x *MsgCometInfo) slowProtoReflect() protoreflect.Message { +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)) @@ -1357,43 +1357,43 @@ func (x *MsgCometInfo) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgCometInfo_messageType fastReflection_MsgCometInfo_messageType -var _ protoreflect.MessageType = fastReflection_MsgCometInfo_messageType{} +var _fastReflection_MsgSetCometInfo_messageType fastReflection_MsgSetCometInfo_messageType +var _ protoreflect.MessageType = fastReflection_MsgSetCometInfo_messageType{} -type fastReflection_MsgCometInfo_messageType struct{} +type fastReflection_MsgSetCometInfo_messageType struct{} -func (x fastReflection_MsgCometInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCometInfo)(nil) +func (x fastReflection_MsgSetCometInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSetCometInfo)(nil) } -func (x fastReflection_MsgCometInfo_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCometInfo) +func (x fastReflection_MsgSetCometInfo_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSetCometInfo) } -func (x fastReflection_MsgCometInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCometInfo +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_MsgCometInfo) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCometInfo +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_MsgCometInfo) Type() protoreflect.MessageType { - return _fastReflection_MsgCometInfo_messageType +func (x *fastReflection_MsgSetCometInfo) Type() protoreflect.MessageType { + return _fastReflection_MsgSetCometInfo_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCometInfo) New() protoreflect.Message { - return new(fastReflection_MsgCometInfo) +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_MsgCometInfo) Interface() protoreflect.ProtoMessage { - return (*MsgCometInfo)(x) +func (x *fastReflection_MsgSetCometInfo) Interface() protoreflect.ProtoMessage { + return (*MsgSetCometInfo)(x) } // Range iterates over every populated field in an undefined order, @@ -1401,34 +1401,34 @@ func (x *fastReflection_MsgCometInfo) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgCometInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgSetCometInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgCometInfo_authority, value) { + if !f(fd_MsgSetCometInfo_authority, value) { return } } if len(x.Evidence) != 0 { - value := protoreflect.ValueOfList(&_MsgCometInfo_2_list{list: &x.Evidence}) - if !f(fd_MsgCometInfo_evidence, value) { + 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_MsgCometInfo_validators_hash, value) { + if !f(fd_MsgSetCometInfo_validators_hash, value) { return } } if len(x.ProposerAddress) != 0 { value := protoreflect.ValueOfBytes(x.ProposerAddress) - if !f(fd_MsgCometInfo_proposer_address, value) { + if !f(fd_MsgSetCometInfo_proposer_address, value) { return } } if x.LastCommit != nil { value := protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) - if !f(fd_MsgCometInfo_last_commit, value) { + if !f(fd_MsgSetCometInfo_last_commit, value) { return } } @@ -1445,23 +1445,23 @@ func (x *fastReflection_MsgCometInfo) Range(f func(protoreflect.FieldDescriptor, // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgCometInfo) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgSetCometInfo) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.consensus.v1.MsgCometInfo.authority": + case "cosmos.consensus.v1.MsgSetCometInfo.authority": return x.Authority != "" - case "cosmos.consensus.v1.MsgCometInfo.evidence": + case "cosmos.consensus.v1.MsgSetCometInfo.evidence": return len(x.Evidence) != 0 - case "cosmos.consensus.v1.MsgCometInfo.validators_hash": + case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": return len(x.ValidatorsHash) != 0 - case "cosmos.consensus.v1.MsgCometInfo.proposer_address": + case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": return len(x.ProposerAddress) != 0 - case "cosmos.consensus.v1.MsgCometInfo.last_commit": + 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.MsgCometInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo does not contain field %s", fd.FullName())) } } @@ -1471,23 +1471,23 @@ func (x *fastReflection_MsgCometInfo) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCometInfo) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgSetCometInfo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.consensus.v1.MsgCometInfo.authority": + case "cosmos.consensus.v1.MsgSetCometInfo.authority": x.Authority = "" - case "cosmos.consensus.v1.MsgCometInfo.evidence": + case "cosmos.consensus.v1.MsgSetCometInfo.evidence": x.Evidence = nil - case "cosmos.consensus.v1.MsgCometInfo.validators_hash": + case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": x.ValidatorsHash = nil - case "cosmos.consensus.v1.MsgCometInfo.proposer_address": + case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": x.ProposerAddress = nil - case "cosmos.consensus.v1.MsgCometInfo.last_commit": + 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.MsgCometInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo does not contain field %s", fd.FullName())) } } @@ -1497,31 +1497,31 @@ func (x *fastReflection_MsgCometInfo) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgCometInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgSetCometInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.consensus.v1.MsgCometInfo.authority": + case "cosmos.consensus.v1.MsgSetCometInfo.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "cosmos.consensus.v1.MsgCometInfo.evidence": + case "cosmos.consensus.v1.MsgSetCometInfo.evidence": if len(x.Evidence) == 0 { - return protoreflect.ValueOfList(&_MsgCometInfo_2_list{}) + return protoreflect.ValueOfList(&_MsgSetCometInfo_2_list{}) } - listValue := &_MsgCometInfo_2_list{list: &x.Evidence} + listValue := &_MsgSetCometInfo_2_list{list: &x.Evidence} return protoreflect.ValueOfList(listValue) - case "cosmos.consensus.v1.MsgCometInfo.validators_hash": + case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": value := x.ValidatorsHash return protoreflect.ValueOfBytes(value) - case "cosmos.consensus.v1.MsgCometInfo.proposer_address": + case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": value := x.ProposerAddress return protoreflect.ValueOfBytes(value) - case "cosmos.consensus.v1.MsgCometInfo.last_commit": + 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.MsgCometInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfo does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo does not contain field %s", descriptor.FullName())) } } @@ -1535,25 +1535,25 @@ func (x *fastReflection_MsgCometInfo) Get(descriptor protoreflect.FieldDescripto // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCometInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgSetCometInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.consensus.v1.MsgCometInfo.authority": + case "cosmos.consensus.v1.MsgSetCometInfo.authority": x.Authority = value.Interface().(string) - case "cosmos.consensus.v1.MsgCometInfo.evidence": + case "cosmos.consensus.v1.MsgSetCometInfo.evidence": lv := value.List() - clv := lv.(*_MsgCometInfo_2_list) + clv := lv.(*_MsgSetCometInfo_2_list) x.Evidence = *clv.list - case "cosmos.consensus.v1.MsgCometInfo.validators_hash": + case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": x.ValidatorsHash = value.Bytes() - case "cosmos.consensus.v1.MsgCometInfo.proposer_address": + case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": x.ProposerAddress = value.Bytes() - case "cosmos.consensus.v1.MsgCometInfo.last_commit": + 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.MsgCometInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo does not contain field %s", fd.FullName())) } } @@ -1567,65 +1567,65 @@ func (x *fastReflection_MsgCometInfo) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCometInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgSetCometInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.consensus.v1.MsgCometInfo.evidence": + case "cosmos.consensus.v1.MsgSetCometInfo.evidence": if x.Evidence == nil { x.Evidence = []*v11.Misbehavior{} } - value := &_MsgCometInfo_2_list{list: &x.Evidence} + value := &_MsgSetCometInfo_2_list{list: &x.Evidence} return protoreflect.ValueOfList(value) - case "cosmos.consensus.v1.MsgCometInfo.last_commit": + 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.MsgCometInfo.authority": - panic(fmt.Errorf("field authority of message cosmos.consensus.v1.MsgCometInfo is not mutable")) - case "cosmos.consensus.v1.MsgCometInfo.validators_hash": - panic(fmt.Errorf("field validators_hash of message cosmos.consensus.v1.MsgCometInfo is not mutable")) - case "cosmos.consensus.v1.MsgCometInfo.proposer_address": - panic(fmt.Errorf("field proposer_address of message cosmos.consensus.v1.MsgCometInfo is not mutable")) + 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.MsgCometInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfo does not contain field %s", fd.FullName())) + 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_MsgCometInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgSetCometInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.consensus.v1.MsgCometInfo.authority": + case "cosmos.consensus.v1.MsgSetCometInfo.authority": return protoreflect.ValueOfString("") - case "cosmos.consensus.v1.MsgCometInfo.evidence": + case "cosmos.consensus.v1.MsgSetCometInfo.evidence": list := []*v11.Misbehavior{} - return protoreflect.ValueOfList(&_MsgCometInfo_2_list{list: &list}) - case "cosmos.consensus.v1.MsgCometInfo.validators_hash": + return protoreflect.ValueOfList(&_MsgSetCometInfo_2_list{list: &list}) + case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": return protoreflect.ValueOfBytes(nil) - case "cosmos.consensus.v1.MsgCometInfo.proposer_address": + case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": return protoreflect.ValueOfBytes(nil) - case "cosmos.consensus.v1.MsgCometInfo.last_commit": + 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.MsgCometInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfo does not contain field %s", fd.FullName())) + 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_MsgCometInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +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.MsgCometInfo", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.MsgSetCometInfo", d.FullName())) } panic("unreachable") } @@ -1633,7 +1633,7 @@ func (x *fastReflection_MsgCometInfo) WhichOneof(d protoreflect.OneofDescriptor) // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgCometInfo) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgSetCometInfo) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1644,7 +1644,7 @@ func (x *fastReflection_MsgCometInfo) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCometInfo) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgSetCometInfo) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1656,7 +1656,7 @@ func (x *fastReflection_MsgCometInfo) SetUnknown(fields protoreflect.RawFields) // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgCometInfo) IsValid() bool { +func (x *fastReflection_MsgSetCometInfo) IsValid() bool { return x != nil } @@ -1666,9 +1666,9 @@ func (x *fastReflection_MsgCometInfo) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgCometInfo) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgSetCometInfo) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCometInfo) + x := input.Message.Interface().(*MsgSetCometInfo) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1712,7 +1712,7 @@ func (x *fastReflection_MsgCometInfo) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCometInfo) + x := input.Message.Interface().(*MsgSetCometInfo) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1793,7 +1793,7 @@ func (x *fastReflection_MsgCometInfo) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgCometInfo) + x := input.Message.Interface().(*MsgSetCometInfo) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1825,10 +1825,10 @@ func (x *fastReflection_MsgCometInfo) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCometInfo: wiretype end group for non-group") + 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: MsgCometInfo: illegal tag %d (wire type %d)", fieldNum, wire) + 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: @@ -2037,23 +2037,23 @@ func (x *fastReflection_MsgCometInfo) ProtoMethods() *protoiface.Methods { } var ( - md_MsgCometInfoResponse protoreflect.MessageDescriptor + md_MsgSetCometInfoResponse protoreflect.MessageDescriptor ) func init() { file_cosmos_consensus_v1_tx_proto_init() - md_MsgCometInfoResponse = File_cosmos_consensus_v1_tx_proto.Messages().ByName("MsgCometInfoResponse") + md_MsgSetCometInfoResponse = File_cosmos_consensus_v1_tx_proto.Messages().ByName("MsgSetCometInfoResponse") } -var _ protoreflect.Message = (*fastReflection_MsgCometInfoResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgSetCometInfoResponse)(nil) -type fastReflection_MsgCometInfoResponse MsgCometInfoResponse +type fastReflection_MsgSetCometInfoResponse MsgSetCometInfoResponse -func (x *MsgCometInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCometInfoResponse)(x) +func (x *MsgSetCometInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSetCometInfoResponse)(x) } -func (x *MsgCometInfoResponse) slowProtoReflect() protoreflect.Message { +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)) @@ -2065,43 +2065,43 @@ func (x *MsgCometInfoResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgCometInfoResponse_messageType fastReflection_MsgCometInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCometInfoResponse_messageType{} +var _fastReflection_MsgSetCometInfoResponse_messageType fastReflection_MsgSetCometInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSetCometInfoResponse_messageType{} -type fastReflection_MsgCometInfoResponse_messageType struct{} +type fastReflection_MsgSetCometInfoResponse_messageType struct{} -func (x fastReflection_MsgCometInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCometInfoResponse)(nil) +func (x fastReflection_MsgSetCometInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSetCometInfoResponse)(nil) } -func (x fastReflection_MsgCometInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCometInfoResponse) +func (x fastReflection_MsgSetCometInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSetCometInfoResponse) } -func (x fastReflection_MsgCometInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCometInfoResponse +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_MsgCometInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCometInfoResponse +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_MsgCometInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCometInfoResponse_messageType +func (x *fastReflection_MsgSetCometInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSetCometInfoResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCometInfoResponse) New() protoreflect.Message { - return new(fastReflection_MsgCometInfoResponse) +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_MsgCometInfoResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCometInfoResponse)(x) +func (x *fastReflection_MsgSetCometInfoResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSetCometInfoResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2109,7 +2109,7 @@ func (x *fastReflection_MsgCometInfoResponse) Interface() protoreflect.ProtoMess // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgCometInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgSetCometInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -2123,13 +2123,13 @@ func (x *fastReflection_MsgCometInfoResponse) Range(f func(protoreflect.FieldDes // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgCometInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { +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.MsgCometInfoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfoResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse does not contain field %s", fd.FullName())) } } @@ -2139,13 +2139,13 @@ func (x *fastReflection_MsgCometInfoResponse) Has(fd protoreflect.FieldDescripto // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCometInfoResponse) Clear(fd protoreflect.FieldDescriptor) { +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.MsgCometInfoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfoResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse does not contain field %s", fd.FullName())) } } @@ -2155,13 +2155,13 @@ func (x *fastReflection_MsgCometInfoResponse) Clear(fd protoreflect.FieldDescrip // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgCometInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +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.MsgCometInfoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfoResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse does not contain field %s", descriptor.FullName())) } } @@ -2175,13 +2175,13 @@ func (x *fastReflection_MsgCometInfoResponse) Get(descriptor protoreflect.FieldD // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCometInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +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.MsgCometInfoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfoResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse does not contain field %s", fd.FullName())) } } @@ -2195,36 +2195,36 @@ func (x *fastReflection_MsgCometInfoResponse) Set(fd protoreflect.FieldDescripto // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCometInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +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.MsgCometInfoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfoResponse does not contain field %s", fd.FullName())) + 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_MsgCometInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.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.MsgCometInfoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) } - panic(fmt.Errorf("message cosmos.consensus.v1.MsgCometInfoResponse does not contain field %s", fd.FullName())) + 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_MsgCometInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +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.MsgCometInfoResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.MsgSetCometInfoResponse", d.FullName())) } panic("unreachable") } @@ -2232,7 +2232,7 @@ func (x *fastReflection_MsgCometInfoResponse) WhichOneof(d protoreflect.OneofDes // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgCometInfoResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgSetCometInfoResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2243,7 +2243,7 @@ func (x *fastReflection_MsgCometInfoResponse) GetUnknown() protoreflect.RawField // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCometInfoResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgSetCometInfoResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2255,7 +2255,7 @@ func (x *fastReflection_MsgCometInfoResponse) SetUnknown(fields protoreflect.Raw // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgCometInfoResponse) IsValid() bool { +func (x *fastReflection_MsgSetCometInfoResponse) IsValid() bool { return x != nil } @@ -2265,9 +2265,9 @@ func (x *fastReflection_MsgCometInfoResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgCometInfoResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgSetCometInfoResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCometInfoResponse) + x := input.Message.Interface().(*MsgSetCometInfoResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2289,7 +2289,7 @@ func (x *fastReflection_MsgCometInfoResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCometInfoResponse) + x := input.Message.Interface().(*MsgSetCometInfoResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2319,7 +2319,7 @@ func (x *fastReflection_MsgCometInfoResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgCometInfoResponse) + x := input.Message.Interface().(*MsgSetCometInfoResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2351,10 +2351,10 @@ func (x *fastReflection_MsgCometInfoResponse) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCometInfoResponse: wiretype end group for non-group") + 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: MsgCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2530,7 +2530,7 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { } // MsgCometInfo is the Msg/CometInfo request type. -type MsgCometInfo struct { +type MsgSetCometInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -2547,8 +2547,8 @@ type MsgCometInfo struct { LastCommit *v11.CommitInfo `protobuf:"bytes,5,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` } -func (x *MsgCometInfo) Reset() { - *x = MsgCometInfo{} +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)) @@ -2556,46 +2556,46 @@ func (x *MsgCometInfo) Reset() { } } -func (x *MsgCometInfo) String() string { +func (x *MsgSetCometInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgCometInfo) ProtoMessage() {} +func (*MsgSetCometInfo) ProtoMessage() {} -// Deprecated: Use MsgCometInfo.ProtoReflect.Descriptor instead. -func (*MsgCometInfo) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgSetCometInfo.ProtoReflect.Descriptor instead. +func (*MsgSetCometInfo) Descriptor() ([]byte, []int) { return file_cosmos_consensus_v1_tx_proto_rawDescGZIP(), []int{2} } -func (x *MsgCometInfo) GetAuthority() string { +func (x *MsgSetCometInfo) GetAuthority() string { if x != nil { return x.Authority } return "" } -func (x *MsgCometInfo) GetEvidence() []*v11.Misbehavior { +func (x *MsgSetCometInfo) GetEvidence() []*v11.Misbehavior { if x != nil { return x.Evidence } return nil } -func (x *MsgCometInfo) GetValidatorsHash() []byte { +func (x *MsgSetCometInfo) GetValidatorsHash() []byte { if x != nil { return x.ValidatorsHash } return nil } -func (x *MsgCometInfo) GetProposerAddress() []byte { +func (x *MsgSetCometInfo) GetProposerAddress() []byte { if x != nil { return x.ProposerAddress } return nil } -func (x *MsgCometInfo) GetLastCommit() *v11.CommitInfo { +func (x *MsgSetCometInfo) GetLastCommit() *v11.CommitInfo { if x != nil { return x.LastCommit } @@ -2603,14 +2603,14 @@ func (x *MsgCometInfo) GetLastCommit() *v11.CommitInfo { } // MsgCometInfoResponse defines the response -type MsgCometInfoResponse struct { +type MsgSetCometInfoResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *MsgCometInfoResponse) Reset() { - *x = MsgCometInfoResponse{} +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)) @@ -2618,14 +2618,14 @@ func (x *MsgCometInfoResponse) Reset() { } } -func (x *MsgCometInfoResponse) String() string { +func (x *MsgSetCometInfoResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgCometInfoResponse) ProtoMessage() {} +func (*MsgSetCometInfoResponse) ProtoMessage() {} -// Deprecated: Use MsgCometInfoResponse.ProtoReflect.Descriptor instead. -func (*MsgCometInfoResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgSetCometInfoResponse.ProtoReflect.Descriptor instead. +func (*MsgSetCometInfoResponse) Descriptor() ([]byte, []int) { return file_cosmos_consensus_v1_tx_proto_rawDescGZIP(), []int{3} } @@ -2680,56 +2680,57 @@ 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, 0xcc, 0x02, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 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, 0x16, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe0, 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, 0x59, 0x0a, 0x09, 0x43, - 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 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, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x29, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 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, + 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, } var ( @@ -2748,8 +2749,8 @@ var file_cosmos_consensus_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4 var file_cosmos_consensus_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: cosmos.consensus.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: cosmos.consensus.v1.MsgUpdateParamsResponse - (*MsgCometInfo)(nil), // 2: cosmos.consensus.v1.MsgCometInfo - (*MsgCometInfoResponse)(nil), // 3: cosmos.consensus.v1.MsgCometInfoResponse + (*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 @@ -2766,12 +2767,12 @@ var file_cosmos_consensus_v1_tx_proto_depIdxs = []int32{ 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.MsgCometInfo.evidence:type_name -> cometbft.abci.v1.Misbehavior - 11, // 7: cosmos.consensus.v1.MsgCometInfo.last_commit:type_name -> cometbft.abci.v1.CommitInfo + 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.CometInfo:input_type -> cosmos.consensus.v1.MsgCometInfo + 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.CometInfo:output_type -> cosmos.consensus.v1.MsgCometInfoResponse + 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 @@ -2810,7 +2811,7 @@ func file_cosmos_consensus_v1_tx_proto_init() { } } file_cosmos_consensus_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCometInfo); i { + switch v := v.(*MsgSetCometInfo); i { case 0: return &v.state case 1: @@ -2822,7 +2823,7 @@ func file_cosmos_consensus_v1_tx_proto_init() { } } file_cosmos_consensus_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCometInfoResponse); i { + switch v := v.(*MsgSetCometInfoResponse); i { case 0: return &v.state case 1: diff --git a/api/cosmos/consensus/v1/tx_grpc.pb.go b/api/cosmos/consensus/v1/tx_grpc.pb.go index b4231edff8d7..50dfbe9de169 100644 --- a/api/cosmos/consensus/v1/tx_grpc.pb.go +++ b/api/cosmos/consensus/v1/tx_grpc.pb.go @@ -22,7 +22,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_UpdateParams_FullMethodName = "/cosmos.consensus.v1.Msg/UpdateParams" - Msg_CometInfo_FullMethodName = "/cosmos.consensus.v1.Msg/CometInfo" + Msg_SetCometInfo_FullMethodName = "/cosmos.consensus.v1.Msg/SetCometInfo" ) // MsgClient is the client API for Msg service. @@ -32,7 +32,8 @@ 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) - CometInfo(ctx context.Context, in *MsgCometInfo, opts ...grpc.CallOption) (*MsgCometInfoResponse, 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 { @@ -52,9 +53,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) CometInfo(ctx context.Context, in *MsgCometInfo, opts ...grpc.CallOption) (*MsgCometInfoResponse, error) { - out := new(MsgCometInfoResponse) - err := c.cc.Invoke(ctx, Msg_CometInfo_FullMethodName, in, out, opts...) +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 } @@ -68,7 +69,8 @@ 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) - CometInfo(context.Context, *MsgCometInfo) (*MsgCometInfoResponse, error) + // SetCometInfo defines how to set the comet info for the x/consensus module. + SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) mustEmbedUnimplementedMsgServer() } @@ -79,8 +81,8 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (UnimplementedMsgServer) CometInfo(context.Context, *MsgCometInfo) (*MsgCometInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CometInfo not implemented") +func (UnimplementedMsgServer) SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetCometInfo not implemented") } func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} @@ -113,20 +115,20 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_CometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCometInfo) +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).CometInfo(ctx, in) + return srv.(MsgServer).SetCometInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_CometInfo_FullMethodName, + FullMethod: Msg_SetCometInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CometInfo(ctx, req.(*MsgCometInfo)) + return srv.(MsgServer).SetCometInfo(ctx, req.(*MsgSetCometInfo)) } return interceptor(ctx, in, info, handler) } @@ -143,8 +145,8 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ Handler: _Msg_UpdateParams_Handler, }, { - MethodName: "CometInfo", - Handler: _Msg_CometInfo_Handler, + MethodName: "SetCometInfo", + Handler: _Msg_SetCometInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/cosmossdk.io/server/v2/streaming/grpc.pb.go b/cosmossdk.io/server/v2/streaming/grpc.pb.go new file mode 100644 index 000000000000..4d2d15149c89 --- /dev/null +++ b/cosmossdk.io/server/v2/streaming/grpc.pb.go @@ -0,0 +1,2414 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/streaming/v1/grpc.proto + +package streaming + +import ( + context "context" + fmt "fmt" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ListenDeliverBlockRequest is the request type for the ListenDeliverBlock RPC method +type ListenDeliverBlockRequest struct { + BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` + Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` + TxResults []*ExecTxResult `protobuf:"bytes,4,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` +} + +func (m *ListenDeliverBlockRequest) Reset() { *m = ListenDeliverBlockRequest{} } +func (m *ListenDeliverBlockRequest) String() string { return proto.CompactTextString(m) } +func (*ListenDeliverBlockRequest) ProtoMessage() {} +func (*ListenDeliverBlockRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{0} +} +func (m *ListenDeliverBlockRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenDeliverBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenDeliverBlockRequest.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 *ListenDeliverBlockRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenDeliverBlockRequest.Merge(m, src) +} +func (m *ListenDeliverBlockRequest) XXX_Size() int { + return m.Size() +} +func (m *ListenDeliverBlockRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListenDeliverBlockRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenDeliverBlockRequest proto.InternalMessageInfo + +func (m *ListenDeliverBlockRequest) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *ListenDeliverBlockRequest) GetTxs() [][]byte { + if m != nil { + return m.Txs + } + return nil +} + +func (m *ListenDeliverBlockRequest) GetEvents() []*Event { + if m != nil { + return m.Events + } + return nil +} + +func (m *ListenDeliverBlockRequest) GetTxResults() []*ExecTxResult { + if m != nil { + return m.TxResults + } + return nil +} + +// ListenDeliverBlockResponse is the response type for the ListenDeliverBlock RPC method +type ListenDeliverBlockResponse struct { +} + +func (m *ListenDeliverBlockResponse) Reset() { *m = ListenDeliverBlockResponse{} } +func (m *ListenDeliverBlockResponse) String() string { return proto.CompactTextString(m) } +func (*ListenDeliverBlockResponse) ProtoMessage() {} +func (*ListenDeliverBlockResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{1} +} +func (m *ListenDeliverBlockResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenDeliverBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenDeliverBlockResponse.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 *ListenDeliverBlockResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenDeliverBlockResponse.Merge(m, src) +} +func (m *ListenDeliverBlockResponse) XXX_Size() int { + return m.Size() +} +func (m *ListenDeliverBlockResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListenDeliverBlockResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenDeliverBlockResponse proto.InternalMessageInfo + +// ListenStateChangesRequest is the request type for the ListenStateChanges RPC method +type ListenStateChangesRequest struct { + BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + ChangeSet []*StoreKVPair `protobuf:"bytes,2,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` + AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` +} + +func (m *ListenStateChangesRequest) Reset() { *m = ListenStateChangesRequest{} } +func (m *ListenStateChangesRequest) String() string { return proto.CompactTextString(m) } +func (*ListenStateChangesRequest) ProtoMessage() {} +func (*ListenStateChangesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{2} +} +func (m *ListenStateChangesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenStateChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenStateChangesRequest.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 *ListenStateChangesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenStateChangesRequest.Merge(m, src) +} +func (m *ListenStateChangesRequest) XXX_Size() int { + return m.Size() +} +func (m *ListenStateChangesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListenStateChangesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenStateChangesRequest proto.InternalMessageInfo + +func (m *ListenStateChangesRequest) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *ListenStateChangesRequest) GetChangeSet() []*StoreKVPair { + if m != nil { + return m.ChangeSet + } + return nil +} + +func (m *ListenStateChangesRequest) GetAppHash() []byte { + if m != nil { + return m.AppHash + } + return nil +} + +// ListenStateChangesResponse is the response type for the ListenStateChanges RPC method +type ListenStateChangesResponse struct { +} + +func (m *ListenStateChangesResponse) Reset() { *m = ListenStateChangesResponse{} } +func (m *ListenStateChangesResponse) String() string { return proto.CompactTextString(m) } +func (*ListenStateChangesResponse) ProtoMessage() {} +func (*ListenStateChangesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{3} +} +func (m *ListenStateChangesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenStateChangesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenStateChangesResponse.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 *ListenStateChangesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenStateChangesResponse.Merge(m, src) +} +func (m *ListenStateChangesResponse) XXX_Size() int { + return m.Size() +} +func (m *ListenStateChangesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListenStateChangesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenStateChangesResponse proto.InternalMessageInfo + +// StoreKVPair is a single key-value pair, associated with a store. +type StoreKVPair struct { + // address defines the address of the account the state changes are coming from. + // In case of modules you can expect a stringified + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // key defines the key of the address that changed. + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // value defines the value that changed, empty in case of removal. + Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + // delete defines if the key was removed. + Delete bool `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"` +} + +func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } +func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } +func (*StoreKVPair) ProtoMessage() {} +func (*StoreKVPair) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{4} +} +func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StoreKVPair.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 *StoreKVPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_StoreKVPair.Merge(m, src) +} +func (m *StoreKVPair) XXX_Size() int { + return m.Size() +} +func (m *StoreKVPair) XXX_DiscardUnknown() { + xxx_messageInfo_StoreKVPair.DiscardUnknown(m) +} + +var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo + +func (m *StoreKVPair) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *StoreKVPair) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *StoreKVPair) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *StoreKVPair) GetDelete() bool { + if m != nil { + return m.Delete + } + return false +} + +// Event is a single event, associated with a transaction. +type Event struct { + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Attributes []*EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (m *Event) Reset() { *m = Event{} } +func (m *Event) String() string { return proto.CompactTextString(m) } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{5} +} +func (m *Event) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Event.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 *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(m, src) +} +func (m *Event) XXX_Size() int { + return m.Size() +} +func (m *Event) XXX_DiscardUnknown() { + xxx_messageInfo_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Event proto.InternalMessageInfo + +func (m *Event) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Event) GetAttributes() []*EventAttribute { + if m != nil { + return m.Attributes + } + return nil +} + +// EventAttribute is a single key-value pair, associated with an event. +type EventAttribute struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *EventAttribute) Reset() { *m = EventAttribute{} } +func (m *EventAttribute) String() string { return proto.CompactTextString(m) } +func (*EventAttribute) ProtoMessage() {} +func (*EventAttribute) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{6} +} +func (m *EventAttribute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAttribute.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 *EventAttribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAttribute.Merge(m, src) +} +func (m *EventAttribute) XXX_Size() int { + return m.Size() +} +func (m *EventAttribute) XXX_DiscardUnknown() { + xxx_messageInfo_EventAttribute.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAttribute proto.InternalMessageInfo + +func (m *EventAttribute) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *EventAttribute) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// ExecTxResult contains results of executing one individual transaction. +type ExecTxResult struct { + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` + GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` + GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` + Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` +} + +func (m *ExecTxResult) Reset() { *m = ExecTxResult{} } +func (m *ExecTxResult) String() string { return proto.CompactTextString(m) } +func (*ExecTxResult) ProtoMessage() {} +func (*ExecTxResult) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{7} +} +func (m *ExecTxResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExecTxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExecTxResult.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 *ExecTxResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExecTxResult.Merge(m, src) +} +func (m *ExecTxResult) XXX_Size() int { + return m.Size() +} +func (m *ExecTxResult) XXX_DiscardUnknown() { + xxx_messageInfo_ExecTxResult.DiscardUnknown(m) +} + +var xxx_messageInfo_ExecTxResult proto.InternalMessageInfo + +func (m *ExecTxResult) GetCode() uint32 { + if m != nil { + return m.Code + } + return 0 +} + +func (m *ExecTxResult) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *ExecTxResult) GetLog() string { + if m != nil { + return m.Log + } + return "" +} + +func (m *ExecTxResult) GetInfo() string { + if m != nil { + return m.Info + } + return "" +} + +func (m *ExecTxResult) GetGasWanted() int64 { + if m != nil { + return m.GasWanted + } + return 0 +} + +func (m *ExecTxResult) GetGasUsed() int64 { + if m != nil { + return m.GasUsed + } + return 0 +} + +func (m *ExecTxResult) GetEvents() []*Event { + if m != nil { + return m.Events + } + return nil +} + +func (m *ExecTxResult) GetCodespace() string { + if m != nil { + return m.Codespace + } + return "" +} + +func init() { + proto.RegisterType((*ListenDeliverBlockRequest)(nil), "cosmos.streaming.v1.ListenDeliverBlockRequest") + proto.RegisterType((*ListenDeliverBlockResponse)(nil), "cosmos.streaming.v1.ListenDeliverBlockResponse") + proto.RegisterType((*ListenStateChangesRequest)(nil), "cosmos.streaming.v1.ListenStateChangesRequest") + proto.RegisterType((*ListenStateChangesResponse)(nil), "cosmos.streaming.v1.ListenStateChangesResponse") + proto.RegisterType((*StoreKVPair)(nil), "cosmos.streaming.v1.StoreKVPair") + proto.RegisterType((*Event)(nil), "cosmos.streaming.v1.Event") + proto.RegisterType((*EventAttribute)(nil), "cosmos.streaming.v1.EventAttribute") + proto.RegisterType((*ExecTxResult)(nil), "cosmos.streaming.v1.ExecTxResult") +} + +func init() { proto.RegisterFile("cosmos/streaming/v1/grpc.proto", fileDescriptor_3fc151d30622bb2a) } + +var fileDescriptor_3fc151d30622bb2a = []byte{ + // 599 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xae, 0x9b, 0x36, 0xa9, 0x27, 0xe1, 0x47, 0x0b, 0x42, 0x6e, 0x55, 0x2c, 0x37, 0x5c, 0x72, + 0x72, 0xd4, 0x70, 0x41, 0x5c, 0x80, 0x16, 0xa4, 0x4a, 0x70, 0x40, 0x1b, 0x7e, 0x24, 0x2e, 0x61, + 0x6b, 0x0f, 0x8e, 0x55, 0xd7, 0x36, 0x3b, 0x6b, 0x93, 0xbe, 0x05, 0x67, 0x1e, 0x08, 0x71, 0xec, + 0x91, 0x23, 0x6a, 0x2f, 0xbc, 0x05, 0x68, 0xd7, 0x6e, 0x93, 0x0a, 0xb7, 0x2a, 0xb7, 0x6f, 0x7e, + 0xbf, 0x6f, 0x3c, 0xe3, 0x05, 0x37, 0xc8, 0xe8, 0x30, 0xa3, 0x21, 0x29, 0x89, 0xe2, 0x30, 0x4e, + 0xa3, 0x61, 0xb9, 0x3d, 0x8c, 0x64, 0x1e, 0xf8, 0xb9, 0xcc, 0x54, 0xc6, 0xee, 0x54, 0x71, 0xff, + 0x3c, 0xee, 0x97, 0xdb, 0xfd, 0xef, 0x16, 0xac, 0xbf, 0x8a, 0x49, 0x61, 0xfa, 0x1c, 0x93, 0xb8, + 0x44, 0xb9, 0x93, 0x64, 0xc1, 0x01, 0xc7, 0xcf, 0x05, 0x92, 0x62, 0x5b, 0xd0, 0xdb, 0xd7, 0xf6, + 0x64, 0x8a, 0x71, 0x34, 0x55, 0x8e, 0xe5, 0x59, 0x83, 0x16, 0xef, 0x1a, 0xdf, 0x9e, 0x71, 0xb1, + 0xdb, 0xd0, 0x52, 0x33, 0x72, 0x96, 0xbd, 0xd6, 0xa0, 0xc7, 0x35, 0x64, 0x23, 0x68, 0x63, 0x89, + 0xa9, 0x22, 0xa7, 0xe5, 0xb5, 0x06, 0xdd, 0xd1, 0x86, 0xdf, 0x40, 0xec, 0xbf, 0xd0, 0x29, 0xbc, + 0xce, 0x64, 0x4f, 0x01, 0xd4, 0x6c, 0x22, 0x91, 0x8a, 0x44, 0x91, 0xb3, 0x62, 0xea, 0xb6, 0x9a, + 0xeb, 0x66, 0x18, 0xbc, 0x99, 0x71, 0x93, 0xc9, 0x6d, 0x55, 0x23, 0xea, 0x6f, 0xc2, 0x46, 0xd3, + 0x1c, 0x94, 0x67, 0x29, 0x61, 0xff, 0xdb, 0xf9, 0x98, 0x63, 0x25, 0x14, 0xee, 0x4e, 0x45, 0x1a, + 0x21, 0xfd, 0xc7, 0x98, 0x4f, 0x00, 0x02, 0x53, 0x34, 0x21, 0x54, 0x66, 0xda, 0xee, 0xc8, 0x6b, + 0x14, 0x38, 0x56, 0x99, 0xc4, 0x97, 0xef, 0x5e, 0x8b, 0x58, 0x72, 0xbb, 0xaa, 0x19, 0xa3, 0x62, + 0xeb, 0xb0, 0x26, 0xf2, 0x7c, 0x32, 0x15, 0x34, 0x75, 0x5a, 0x9e, 0x35, 0xe8, 0xf1, 0x8e, 0xc8, + 0xf3, 0x3d, 0x41, 0xd3, 0xb9, 0xf4, 0x8b, 0xda, 0x6a, 0xe9, 0x11, 0x74, 0x17, 0x5a, 0x32, 0x07, + 0x3a, 0x22, 0x0c, 0x25, 0x12, 0x19, 0x99, 0xba, 0x4d, 0x65, 0xea, 0x4d, 0x1c, 0xe0, 0x91, 0xb3, + 0x6c, 0xbc, 0x1a, 0xb2, 0xbb, 0xb0, 0x5a, 0x8a, 0xa4, 0xc0, 0x9a, 0xb0, 0x32, 0xd8, 0x3d, 0x68, + 0x87, 0x98, 0xa0, 0x42, 0x67, 0xc5, 0xb3, 0x06, 0x6b, 0xbc, 0xb6, 0xfa, 0x1f, 0x61, 0xd5, 0x2c, + 0x85, 0x31, 0x58, 0x51, 0x47, 0x39, 0x9a, 0xfe, 0x36, 0x37, 0x98, 0xed, 0x02, 0x08, 0xa5, 0x64, + 0xbc, 0x5f, 0x28, 0xa4, 0x7a, 0xfe, 0x07, 0x97, 0x2f, 0xf6, 0xd9, 0x59, 0x2e, 0x5f, 0x28, 0xeb, + 0x3f, 0x82, 0x9b, 0x17, 0xa3, 0x67, 0x9a, 0x2b, 0xa6, 0x8b, 0x9a, 0x97, 0x8d, 0xaf, 0x32, 0xfa, + 0xbf, 0x2d, 0xe8, 0x2d, 0x6e, 0x5e, 0x6b, 0x0c, 0xb2, 0xb0, 0xd2, 0x78, 0x83, 0x1b, 0xac, 0x7d, + 0xa1, 0x50, 0xa2, 0xfe, 0x02, 0x06, 0x6b, 0x82, 0x24, 0x8b, 0xcc, 0x07, 0xb0, 0xb9, 0x86, 0x3a, + 0x2b, 0x4e, 0x3f, 0x65, 0x66, 0x78, 0x9b, 0x1b, 0xcc, 0xee, 0x03, 0x44, 0x82, 0x26, 0x5f, 0x44, + 0xaa, 0x30, 0x74, 0x56, 0xcd, 0xfa, 0xed, 0x48, 0xd0, 0x7b, 0xe3, 0xd0, 0xbb, 0xd3, 0xe1, 0x82, + 0x30, 0x74, 0xda, 0x26, 0xd8, 0x89, 0x04, 0xbd, 0x25, 0x0c, 0x17, 0x8e, 0xbd, 0x73, 0xed, 0x63, + 0xdf, 0x04, 0x5b, 0xeb, 0xa5, 0x5c, 0x04, 0xe8, 0xac, 0x19, 0x19, 0x73, 0xc7, 0xe8, 0x8f, 0x05, + 0xb7, 0xaa, 0x73, 0x40, 0x39, 0x46, 0x59, 0xc6, 0x01, 0xb2, 0x02, 0xd8, 0xbf, 0xc7, 0xcd, 0xfc, + 0x46, 0xae, 0x4b, 0xff, 0xe6, 0x8d, 0xe1, 0xb5, 0xf3, 0xab, 0xd3, 0x9b, 0xd3, 0x2e, 0x1e, 0xe6, + 0x95, 0xb4, 0x0d, 0x7f, 0xd7, 0x95, 0xb4, 0x4d, 0x17, 0xbf, 0xf3, 0xf8, 0xc7, 0x89, 0x6b, 0x1d, + 0x9f, 0xb8, 0xd6, 0xaf, 0x13, 0xd7, 0xfa, 0x7a, 0xea, 0x2e, 0x1d, 0x9f, 0xba, 0x4b, 0x3f, 0x4f, + 0xdd, 0xa5, 0x0f, 0x5e, 0xd5, 0x89, 0xc2, 0x03, 0x3f, 0xce, 0x86, 0x84, 0xb2, 0x44, 0x39, 0x2c, + 0x47, 0xf3, 0x27, 0x6f, 0xbf, 0x6d, 0xde, 0xba, 0x87, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3b, + 0xbd, 0x03, 0xda, 0x0d, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ListenerServiceClient is the client API for ListenerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ListenerServiceClient interface { + // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock + ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) + // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges + ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) +} + +type listenerServiceClient struct { + cc grpc1.ClientConn +} + +func NewListenerServiceClient(cc grpc1.ClientConn) ListenerServiceClient { + return &listenerServiceClient{cc} +} + +func (c *listenerServiceClient) ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) { + out := new(ListenDeliverBlockResponse) + err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *listenerServiceClient) ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) { + out := new(ListenStateChangesResponse) + err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenStateChanges", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ListenerServiceServer is the server API for ListenerService service. +type ListenerServiceServer interface { + // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock + ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) + // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges + ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) +} + +// UnimplementedListenerServiceServer can be embedded to have forward compatible implementations. +type UnimplementedListenerServiceServer struct { +} + +func (*UnimplementedListenerServiceServer) ListenDeliverBlock(ctx context.Context, req *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenDeliverBlock not implemented") +} +func (*UnimplementedListenerServiceServer) ListenStateChanges(ctx context.Context, req *ListenStateChangesRequest) (*ListenStateChangesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenStateChanges not implemented") +} + +func RegisterListenerServiceServer(s grpc1.Server, srv ListenerServiceServer) { + s.RegisterService(&_ListenerService_serviceDesc, srv) +} + +func _ListenerService_ListenDeliverBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenDeliverBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, req.(*ListenDeliverBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ListenerService_ListenStateChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenStateChangesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerServiceServer).ListenStateChanges(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.streaming.v1.ListenerService/ListenStateChanges", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerServiceServer).ListenStateChanges(ctx, req.(*ListenStateChangesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ListenerService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.streaming.v1.ListenerService", + HandlerType: (*ListenerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListenDeliverBlock", + Handler: _ListenerService_ListenDeliverBlock_Handler, + }, + { + MethodName: "ListenStateChanges", + Handler: _ListenerService_ListenStateChanges_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/streaming/v1/grpc.proto", +} + +func (m *ListenDeliverBlockRequest) 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 *ListenDeliverBlockRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenDeliverBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TxResults) > 0 { + for iNdEx := len(m.TxResults) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TxResults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Txs[iNdEx]) + copy(dAtA[i:], m.Txs[iNdEx]) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Txs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.BlockHeight != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ListenDeliverBlockResponse) 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 *ListenDeliverBlockResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenDeliverBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ListenStateChangesRequest) 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 *ListenStateChangesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenStateChangesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AppHash) > 0 { + i -= len(m.AppHash) + copy(dAtA[i:], m.AppHash) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.AppHash))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChangeSet) > 0 { + for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.BlockHeight != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ListenStateChangesResponse) 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 *ListenStateChangesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenStateChangesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *StoreKVPair) 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 *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Delete { + i-- + if m.Delete { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x1a + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Event) 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 *Event) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventAttribute) 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 *EventAttribute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExecTxResult) 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 *ExecTxResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExecTxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Codespace) > 0 { + i -= len(m.Codespace) + copy(dAtA[i:], m.Codespace) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Codespace))) + i-- + dAtA[i] = 0x42 + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if m.GasUsed != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x30 + } + if m.GasWanted != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.GasWanted)) + i-- + dAtA[i] = 0x28 + } + if len(m.Info) > 0 { + i -= len(m.Info) + copy(dAtA[i:], m.Info) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Info))) + i-- + dAtA[i] = 0x22 + } + if len(m.Log) > 0 { + i -= len(m.Log) + copy(dAtA[i:], m.Log) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Log))) + i-- + dAtA[i] = 0x1a + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { + offset -= sovGrpc(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ListenDeliverBlockRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockHeight != 0 { + n += 1 + sovGrpc(uint64(m.BlockHeight)) + } + if len(m.Txs) > 0 { + for _, b := range m.Txs { + l = len(b) + n += 1 + l + sovGrpc(uint64(l)) + } + } + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + if len(m.TxResults) > 0 { + for _, e := range m.TxResults { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + return n +} + +func (m *ListenDeliverBlockResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ListenStateChangesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockHeight != 0 { + n += 1 + sovGrpc(uint64(m.BlockHeight)) + } + if len(m.ChangeSet) > 0 { + for _, e := range m.ChangeSet { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + l = len(m.AppHash) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + return n +} + +func (m *ListenStateChangesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *StoreKVPair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + if m.Delete { + n += 2 + } + return n +} + +func (m *Event) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + return n +} + +func (m *EventAttribute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + return n +} + +func (m *ExecTxResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovGrpc(uint64(m.Code)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Log) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Info) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + if m.GasWanted != 0 { + n += 1 + sovGrpc(uint64(m.GasWanted)) + } + if m.GasUsed != 0 { + n += 1 + sovGrpc(uint64(m.GasUsed)) + } + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + l = len(m.Codespace) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + return n +} + +func sovGrpc(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGrpc(x uint64) (n int) { + return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ListenDeliverBlockRequest) 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 ErrIntOverflowGrpc + } + 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: ListenDeliverBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenDeliverBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) + copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxResults", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxResults = append(m.TxResults, &ExecTxResult{}) + if err := m.TxResults[len(m.TxResults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenDeliverBlockResponse) 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 ErrIntOverflowGrpc + } + 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: ListenDeliverBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenDeliverBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenStateChangesRequest) 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 ErrIntOverflowGrpc + } + 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: ListenStateChangesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenStateChangesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChangeSet = append(m.ChangeSet, &StoreKVPair{}) + if err := m.ChangeSet[len(m.ChangeSet)-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 AppHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) + if m.AppHash == nil { + m.AppHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenStateChangesResponse) 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 ErrIntOverflowGrpc + } + 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: ListenStateChangesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenStateChangesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreKVPair) 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 ErrIntOverflowGrpc + } + 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: StoreKVPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Delete = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Event) 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 ErrIntOverflowGrpc + } + 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: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + 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 ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &EventAttribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAttribute) 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 ErrIntOverflowGrpc + } + 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: EventAttribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + 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 ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + 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 ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecTxResult) 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 ErrIntOverflowGrpc + } + 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: ExecTxResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecTxResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + 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 ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Log = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + 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 ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Info = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) + } + m.GasWanted = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasWanted |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + m.GasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasUsed |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + 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 ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Codespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGrpc(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGrpc + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGrpc + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGrpc + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/store/snapshots/types/snapshot.pb.go b/cosmossdk.io/store/snapshots/types/snapshot.pb.go new file mode 100644 index 000000000000..e81660c4596e --- /dev/null +++ b/cosmossdk.io/store/snapshots/types/snapshot.pb.go @@ -0,0 +1,2008 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/store/snapshots/v1/snapshot.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Snapshot contains Tendermint state sync snapshot info. +type Snapshot struct { + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` + Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"` + Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` + Metadata Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata"` +} + +func (m *Snapshot) Reset() { *m = Snapshot{} } +func (m *Snapshot) String() string { return proto.CompactTextString(m) } +func (*Snapshot) ProtoMessage() {} +func (*Snapshot) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{0} +} +func (m *Snapshot) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Snapshot.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 *Snapshot) XXX_Merge(src proto.Message) { + xxx_messageInfo_Snapshot.Merge(m, src) +} +func (m *Snapshot) XXX_Size() int { + return m.Size() +} +func (m *Snapshot) XXX_DiscardUnknown() { + xxx_messageInfo_Snapshot.DiscardUnknown(m) +} + +var xxx_messageInfo_Snapshot proto.InternalMessageInfo + +func (m *Snapshot) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *Snapshot) GetFormat() uint32 { + if m != nil { + return m.Format + } + return 0 +} + +func (m *Snapshot) GetChunks() uint32 { + if m != nil { + return m.Chunks + } + return 0 +} + +func (m *Snapshot) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *Snapshot) GetMetadata() Metadata { + if m != nil { + return m.Metadata + } + return Metadata{} +} + +// Metadata contains SDK-specific snapshot metadata. +type Metadata struct { + ChunkHashes [][]byte `protobuf:"bytes,1,rep,name=chunk_hashes,json=chunkHashes,proto3" json:"chunk_hashes,omitempty"` +} + +func (m *Metadata) Reset() { *m = Metadata{} } +func (m *Metadata) String() string { return proto.CompactTextString(m) } +func (*Metadata) ProtoMessage() {} +func (*Metadata) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{1} +} +func (m *Metadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metadata.Merge(m, src) +} +func (m *Metadata) XXX_Size() int { + return m.Size() +} +func (m *Metadata) XXX_DiscardUnknown() { + xxx_messageInfo_Metadata.DiscardUnknown(m) +} + +var xxx_messageInfo_Metadata proto.InternalMessageInfo + +func (m *Metadata) GetChunkHashes() [][]byte { + if m != nil { + return m.ChunkHashes + } + return nil +} + +// SnapshotItem is an item contained in a rootmulti.Store snapshot. +type SnapshotItem struct { + // item is the specific type of snapshot item. + // + // Types that are valid to be assigned to Item: + // + // *SnapshotItem_Store + // *SnapshotItem_IAVL + // *SnapshotItem_Extension + // *SnapshotItem_ExtensionPayload + Item isSnapshotItem_Item `protobuf_oneof:"item"` +} + +func (m *SnapshotItem) Reset() { *m = SnapshotItem{} } +func (m *SnapshotItem) String() string { return proto.CompactTextString(m) } +func (*SnapshotItem) ProtoMessage() {} +func (*SnapshotItem) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{2} +} +func (m *SnapshotItem) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotItem.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 *SnapshotItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotItem.Merge(m, src) +} +func (m *SnapshotItem) XXX_Size() int { + return m.Size() +} +func (m *SnapshotItem) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotItem.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotItem proto.InternalMessageInfo + +type isSnapshotItem_Item interface { + isSnapshotItem_Item() + MarshalTo([]byte) (int, error) + Size() int +} + +type SnapshotItem_Store struct { + Store *SnapshotStoreItem `protobuf:"bytes,1,opt,name=store,proto3,oneof" json:"store,omitempty"` +} +type SnapshotItem_IAVL struct { + IAVL *SnapshotIAVLItem `protobuf:"bytes,2,opt,name=iavl,proto3,oneof" json:"iavl,omitempty"` +} +type SnapshotItem_Extension struct { + Extension *SnapshotExtensionMeta `protobuf:"bytes,3,opt,name=extension,proto3,oneof" json:"extension,omitempty"` +} +type SnapshotItem_ExtensionPayload struct { + ExtensionPayload *SnapshotExtensionPayload `protobuf:"bytes,4,opt,name=extension_payload,json=extensionPayload,proto3,oneof" json:"extension_payload,omitempty"` +} + +func (*SnapshotItem_Store) isSnapshotItem_Item() {} +func (*SnapshotItem_IAVL) isSnapshotItem_Item() {} +func (*SnapshotItem_Extension) isSnapshotItem_Item() {} +func (*SnapshotItem_ExtensionPayload) isSnapshotItem_Item() {} + +func (m *SnapshotItem) GetItem() isSnapshotItem_Item { + if m != nil { + return m.Item + } + return nil +} + +func (m *SnapshotItem) GetStore() *SnapshotStoreItem { + if x, ok := m.GetItem().(*SnapshotItem_Store); ok { + return x.Store + } + return nil +} + +func (m *SnapshotItem) GetIAVL() *SnapshotIAVLItem { + if x, ok := m.GetItem().(*SnapshotItem_IAVL); ok { + return x.IAVL + } + return nil +} + +func (m *SnapshotItem) GetExtension() *SnapshotExtensionMeta { + if x, ok := m.GetItem().(*SnapshotItem_Extension); ok { + return x.Extension + } + return nil +} + +func (m *SnapshotItem) GetExtensionPayload() *SnapshotExtensionPayload { + if x, ok := m.GetItem().(*SnapshotItem_ExtensionPayload); ok { + return x.ExtensionPayload + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*SnapshotItem) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*SnapshotItem_Store)(nil), + (*SnapshotItem_IAVL)(nil), + (*SnapshotItem_Extension)(nil), + (*SnapshotItem_ExtensionPayload)(nil), + } +} + +// SnapshotStoreItem contains metadata about a snapshotted store. +type SnapshotStoreItem struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *SnapshotStoreItem) Reset() { *m = SnapshotStoreItem{} } +func (m *SnapshotStoreItem) String() string { return proto.CompactTextString(m) } +func (*SnapshotStoreItem) ProtoMessage() {} +func (*SnapshotStoreItem) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{3} +} +func (m *SnapshotStoreItem) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotStoreItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotStoreItem.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 *SnapshotStoreItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotStoreItem.Merge(m, src) +} +func (m *SnapshotStoreItem) XXX_Size() int { + return m.Size() +} +func (m *SnapshotStoreItem) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotStoreItem.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotStoreItem proto.InternalMessageInfo + +func (m *SnapshotStoreItem) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// SnapshotIAVLItem is an exported IAVL node. +type SnapshotIAVLItem struct { + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // version is block height + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + // height is depth of the tree. + Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` +} + +func (m *SnapshotIAVLItem) Reset() { *m = SnapshotIAVLItem{} } +func (m *SnapshotIAVLItem) String() string { return proto.CompactTextString(m) } +func (*SnapshotIAVLItem) ProtoMessage() {} +func (*SnapshotIAVLItem) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{4} +} +func (m *SnapshotIAVLItem) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotIAVLItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotIAVLItem.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 *SnapshotIAVLItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotIAVLItem.Merge(m, src) +} +func (m *SnapshotIAVLItem) XXX_Size() int { + return m.Size() +} +func (m *SnapshotIAVLItem) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotIAVLItem.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotIAVLItem proto.InternalMessageInfo + +func (m *SnapshotIAVLItem) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *SnapshotIAVLItem) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *SnapshotIAVLItem) GetVersion() int64 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *SnapshotIAVLItem) GetHeight() int32 { + if m != nil { + return m.Height + } + return 0 +} + +// SnapshotExtensionMeta contains metadata about an external snapshotter. +type SnapshotExtensionMeta struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` +} + +func (m *SnapshotExtensionMeta) Reset() { *m = SnapshotExtensionMeta{} } +func (m *SnapshotExtensionMeta) String() string { return proto.CompactTextString(m) } +func (*SnapshotExtensionMeta) ProtoMessage() {} +func (*SnapshotExtensionMeta) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{5} +} +func (m *SnapshotExtensionMeta) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotExtensionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotExtensionMeta.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 *SnapshotExtensionMeta) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotExtensionMeta.Merge(m, src) +} +func (m *SnapshotExtensionMeta) XXX_Size() int { + return m.Size() +} +func (m *SnapshotExtensionMeta) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotExtensionMeta.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotExtensionMeta proto.InternalMessageInfo + +func (m *SnapshotExtensionMeta) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *SnapshotExtensionMeta) GetFormat() uint32 { + if m != nil { + return m.Format + } + return 0 +} + +// SnapshotExtensionPayload contains payloads of an external snapshotter. +type SnapshotExtensionPayload struct { + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (m *SnapshotExtensionPayload) Reset() { *m = SnapshotExtensionPayload{} } +func (m *SnapshotExtensionPayload) String() string { return proto.CompactTextString(m) } +func (*SnapshotExtensionPayload) ProtoMessage() {} +func (*SnapshotExtensionPayload) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{6} +} +func (m *SnapshotExtensionPayload) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotExtensionPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotExtensionPayload.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 *SnapshotExtensionPayload) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotExtensionPayload.Merge(m, src) +} +func (m *SnapshotExtensionPayload) XXX_Size() int { + return m.Size() +} +func (m *SnapshotExtensionPayload) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotExtensionPayload.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotExtensionPayload proto.InternalMessageInfo + +func (m *SnapshotExtensionPayload) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func init() { + proto.RegisterType((*Snapshot)(nil), "cosmos.store.snapshots.v1.Snapshot") + proto.RegisterType((*Metadata)(nil), "cosmos.store.snapshots.v1.Metadata") + proto.RegisterType((*SnapshotItem)(nil), "cosmos.store.snapshots.v1.SnapshotItem") + proto.RegisterType((*SnapshotStoreItem)(nil), "cosmos.store.snapshots.v1.SnapshotStoreItem") + proto.RegisterType((*SnapshotIAVLItem)(nil), "cosmos.store.snapshots.v1.SnapshotIAVLItem") + proto.RegisterType((*SnapshotExtensionMeta)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionMeta") + proto.RegisterType((*SnapshotExtensionPayload)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionPayload") +} + +func init() { + proto.RegisterFile("cosmos/store/snapshots/v1/snapshot.proto", fileDescriptor_3d5cca1aa5b69183) +} + +var fileDescriptor_3d5cca1aa5b69183 = []byte{ + // 538 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x6f, 0xd3, 0x3c, + 0x18, 0x8e, 0xd7, 0xb4, 0x5f, 0xf7, 0x26, 0x9f, 0xe8, 0xcc, 0x40, 0x61, 0x87, 0x2c, 0x84, 0x4b, + 0x24, 0x68, 0xba, 0x75, 0x88, 0x03, 0xda, 0x85, 0x8a, 0x49, 0xad, 0x00, 0x69, 0xf2, 0x24, 0x84, + 0xb8, 0x54, 0xde, 0x6a, 0x9a, 0xaa, 0x4d, 0x5d, 0xd5, 0x5e, 0x45, 0x8f, 0xfc, 0x03, 0xfe, 0x08, + 0x37, 0x7e, 0xc4, 0x8e, 0x13, 0x27, 0x4e, 0x13, 0x6a, 0xff, 0x02, 0x3f, 0x00, 0xd9, 0x4e, 0x0a, + 0xda, 0x52, 0x34, 0x6e, 0xef, 0xf3, 0xfa, 0x79, 0x1e, 0xfb, 0x7d, 0xec, 0x04, 0xa2, 0x33, 0x2e, + 0x52, 0x2e, 0x1a, 0x42, 0xf2, 0x29, 0x6b, 0x88, 0x31, 0x9d, 0x88, 0x84, 0x4b, 0xd1, 0x98, 0xed, + 0xaf, 0x40, 0x3c, 0x99, 0x72, 0xc9, 0xf1, 0x03, 0xc3, 0x8c, 0x35, 0x33, 0x5e, 0x31, 0xe3, 0xd9, + 0xfe, 0xce, 0x76, 0x9f, 0xf7, 0xb9, 0x66, 0x35, 0x54, 0x65, 0x04, 0x3b, 0x99, 0xa0, 0x6b, 0x16, + 0x32, 0xb5, 0x06, 0xe1, 0x17, 0x04, 0xd5, 0x93, 0xcc, 0x01, 0xdf, 0x87, 0x4a, 0xc2, 0x06, 0xfd, + 0x44, 0x7a, 0x28, 0x40, 0x91, 0x4d, 0x32, 0xa4, 0xfa, 0x1f, 0xf8, 0x34, 0xa5, 0xd2, 0xdb, 0x08, + 0x50, 0xf4, 0x3f, 0xc9, 0x90, 0xea, 0x9f, 0x25, 0xe7, 0xe3, 0xa1, 0xf0, 0x4a, 0xa6, 0x6f, 0x10, + 0xc6, 0x60, 0x27, 0x54, 0x24, 0x9e, 0x1d, 0xa0, 0xc8, 0x25, 0xba, 0xc6, 0x47, 0x50, 0x4d, 0x99, + 0xa4, 0x3d, 0x2a, 0xa9, 0x57, 0x0e, 0x50, 0xe4, 0x34, 0x1f, 0xc5, 0x6b, 0xe7, 0x88, 0xdf, 0x64, + 0xd4, 0x96, 0x7d, 0x71, 0xb5, 0x6b, 0x91, 0x95, 0x34, 0xac, 0x43, 0x35, 0x5f, 0xc3, 0x0f, 0xc1, + 0xd5, 0x1b, 0x76, 0xd5, 0x06, 0x4c, 0x78, 0x28, 0x28, 0x45, 0x2e, 0x71, 0x74, 0xaf, 0xad, 0x5b, + 0xe1, 0xcf, 0x0d, 0x70, 0xf3, 0xf1, 0x3a, 0x92, 0xa5, 0xf8, 0x25, 0x94, 0xf5, 0x76, 0x7a, 0x42, + 0xa7, 0xf9, 0xe4, 0x2f, 0x67, 0xc8, 0x75, 0x27, 0x6a, 0x49, 0x89, 0xdb, 0x16, 0x31, 0x62, 0xfc, + 0x0a, 0xec, 0x01, 0x9d, 0x8d, 0x74, 0x1c, 0x4e, 0xf3, 0xf1, 0x2d, 0x4c, 0x3a, 0x2f, 0xde, 0xbe, + 0x56, 0x1e, 0xad, 0xea, 0xe2, 0x6a, 0xd7, 0x56, 0xa8, 0x6d, 0x11, 0x6d, 0x82, 0x8f, 0x61, 0x93, + 0x7d, 0x94, 0x6c, 0x2c, 0x06, 0x7c, 0xac, 0x83, 0x74, 0x9a, 0x7b, 0xb7, 0x70, 0x3c, 0xca, 0x35, + 0x2a, 0x8f, 0xb6, 0x45, 0x7e, 0x9b, 0xe0, 0x53, 0xd8, 0x5a, 0x81, 0xee, 0x84, 0xce, 0x47, 0x9c, + 0xf6, 0xf4, 0x65, 0x38, 0xcd, 0x83, 0x7f, 0x71, 0x3e, 0x36, 0xd2, 0xb6, 0x45, 0x6a, 0xec, 0x5a, + 0xef, 0xf9, 0xdd, 0x6f, 0x5f, 0xeb, 0x77, 0x8c, 0x57, 0x5d, 0xf4, 0x86, 0xc1, 0x5e, 0xfc, 0xf4, + 0x59, 0xab, 0x02, 0xf6, 0x40, 0xb2, 0x34, 0x3c, 0x84, 0xad, 0x1b, 0xe9, 0xa9, 0x57, 0x31, 0xa6, + 0xa9, 0x49, 0x7e, 0x93, 0xe8, 0xba, 0xd0, 0x25, 0xfc, 0x84, 0xa0, 0x76, 0x3d, 0x37, 0x5c, 0x83, + 0xd2, 0x90, 0xcd, 0xb5, 0xd8, 0x25, 0xaa, 0xc4, 0xdb, 0x50, 0x9e, 0xd1, 0xd1, 0x39, 0xd3, 0xb7, + 0xe0, 0x12, 0x03, 0xb0, 0x07, 0xff, 0xcd, 0xd8, 0x74, 0x95, 0x65, 0x89, 0xe4, 0xf0, 0x8f, 0xd7, + 0xad, 0xa2, 0x28, 0xe7, 0xaf, 0xbb, 0xf8, 0x0c, 0xef, 0xe0, 0x5e, 0x61, 0xd0, 0x45, 0x53, 0xac, + 0xfb, 0x3e, 0x8a, 0x9d, 0x3b, 0xe0, 0xad, 0x0b, 0x5a, 0x1d, 0x3e, 0xbf, 0x2e, 0x33, 0x68, 0x0e, + 0x8b, 0xe3, 0x3e, 0xbc, 0x58, 0xf8, 0xe8, 0x72, 0xe1, 0xa3, 0x1f, 0x0b, 0x1f, 0x7d, 0x5e, 0xfa, + 0xd6, 0xe5, 0xd2, 0xb7, 0xbe, 0x2f, 0x7d, 0xeb, 0x7d, 0x68, 0xa8, 0xa2, 0x37, 0x8c, 0x07, 0xfc, + 0xc6, 0x2f, 0x45, 0xce, 0x27, 0x4c, 0x9c, 0x56, 0xf4, 0x1f, 0xe0, 0xe0, 0x57, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x57, 0xe2, 0xd5, 0x36, 0x79, 0x04, 0x00, 0x00, +} + +func (m *Snapshot) 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 *Snapshot) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x22 + } + if m.Chunks != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Chunks)) + i-- + dAtA[i] = 0x18 + } + if m.Format != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) + i-- + dAtA[i] = 0x10 + } + if m.Height != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Metadata) 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 *Metadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ChunkHashes) > 0 { + for iNdEx := len(m.ChunkHashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ChunkHashes[iNdEx]) + copy(dAtA[i:], m.ChunkHashes[iNdEx]) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.ChunkHashes[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SnapshotItem) 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 *SnapshotItem) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Item != nil { + { + size := m.Item.Size() + i -= size + if _, err := m.Item.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *SnapshotItem_Store) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem_Store) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Store != nil { + { + size, err := m.Store.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *SnapshotItem_IAVL) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem_IAVL) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.IAVL != nil { + { + size, err := m.IAVL.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *SnapshotItem_Extension) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem_Extension) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Extension != nil { + { + size, err := m.Extension.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *SnapshotItem_ExtensionPayload) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem_ExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ExtensionPayload != nil { + { + size, err := m.ExtensionPayload.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *SnapshotStoreItem) 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 *SnapshotStoreItem) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotStoreItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SnapshotIAVLItem) 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 *SnapshotIAVLItem) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotIAVLItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Height != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x20 + } + if m.Version != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x18 + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SnapshotExtensionMeta) 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 *SnapshotExtensionMeta) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotExtensionMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Format != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SnapshotExtensionPayload) 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 *SnapshotExtensionPayload) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintSnapshot(dAtA []byte, offset int, v uint64) int { + offset -= sovSnapshot(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Snapshot) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovSnapshot(uint64(m.Height)) + } + if m.Format != 0 { + n += 1 + sovSnapshot(uint64(m.Format)) + } + if m.Chunks != 0 { + n += 1 + sovSnapshot(uint64(m.Chunks)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + l = m.Metadata.Size() + n += 1 + l + sovSnapshot(uint64(l)) + return n +} + +func (m *Metadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ChunkHashes) > 0 { + for _, b := range m.ChunkHashes { + l = len(b) + n += 1 + l + sovSnapshot(uint64(l)) + } + } + return n +} + +func (m *SnapshotItem) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Item != nil { + n += m.Item.Size() + } + return n +} + +func (m *SnapshotItem_Store) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Store != nil { + l = m.Store.Size() + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} +func (m *SnapshotItem_IAVL) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IAVL != nil { + l = m.IAVL.Size() + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} +func (m *SnapshotItem_Extension) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Extension != nil { + l = m.Extension.Size() + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} +func (m *SnapshotItem_ExtensionPayload) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ExtensionPayload != nil { + l = m.ExtensionPayload.Size() + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} +func (m *SnapshotStoreItem) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} + +func (m *SnapshotIAVLItem) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + if m.Version != 0 { + n += 1 + sovSnapshot(uint64(m.Version)) + } + if m.Height != 0 { + n += 1 + sovSnapshot(uint64(m.Height)) + } + return n +} + +func (m *SnapshotExtensionMeta) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + if m.Format != 0 { + n += 1 + sovSnapshot(uint64(m.Format)) + } + return n +} + +func (m *SnapshotExtensionPayload) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} + +func sovSnapshot(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozSnapshot(x uint64) (n int) { + return sovSnapshot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Snapshot) 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 ErrIntOverflowSnapshot + } + 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: Snapshot: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) + } + m.Format = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Format |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType) + } + m.Chunks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Chunks |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Metadata) 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 ErrIntOverflowSnapshot + } + 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: Metadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChunkHashes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChunkHashes = append(m.ChunkHashes, make([]byte, postIndex-iNdEx)) + copy(m.ChunkHashes[len(m.ChunkHashes)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotItem) 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 ErrIntOverflowSnapshot + } + 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: SnapshotItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Store", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SnapshotStoreItem{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &SnapshotItem_Store{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IAVL", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SnapshotIAVLItem{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &SnapshotItem_IAVL{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SnapshotExtensionMeta{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &SnapshotItem_Extension{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtensionPayload", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SnapshotExtensionPayload{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &SnapshotItem_ExtensionPayload{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotStoreItem) 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 ErrIntOverflowSnapshot + } + 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: SnapshotStoreItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotStoreItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + 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 ErrInvalidLengthSnapshot + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotIAVLItem) 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 ErrIntOverflowSnapshot + } + 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: SnapshotIAVLItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotIAVLItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotExtensionMeta) 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 ErrIntOverflowSnapshot + } + 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: SnapshotExtensionMeta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotExtensionMeta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + 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 ErrInvalidLengthSnapshot + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) + } + m.Format = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Format |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotExtensionPayload) 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 ErrIntOverflowSnapshot + } + 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: SnapshotExtensionPayload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotExtensionPayload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSnapshot(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSnapshot + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSnapshot + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSnapshot + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthSnapshot + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSnapshot + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthSnapshot + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSnapshot = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/store/streaming/abci/grpc.pb.go b/cosmossdk.io/store/streaming/abci/grpc.pb.go new file mode 100644 index 000000000000..b9a8e7622c53 --- /dev/null +++ b/cosmossdk.io/store/streaming/abci/grpc.pb.go @@ -0,0 +1,1050 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/store/streaming/abci/grpc.proto + +package abci + +import ( + context "context" + types "cosmossdk.io/store/types" + fmt "fmt" + v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ListenEndBlockRequest is the request type for the ListenEndBlock RPC method +type ListenFinalizeBlockRequest struct { + Req *v1.FinalizeBlockRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"` + Res *v1.FinalizeBlockResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` +} + +func (m *ListenFinalizeBlockRequest) Reset() { *m = ListenFinalizeBlockRequest{} } +func (m *ListenFinalizeBlockRequest) String() string { return proto.CompactTextString(m) } +func (*ListenFinalizeBlockRequest) ProtoMessage() {} +func (*ListenFinalizeBlockRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7b98083eb9315fb6, []int{0} +} +func (m *ListenFinalizeBlockRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenFinalizeBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenFinalizeBlockRequest.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 *ListenFinalizeBlockRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenFinalizeBlockRequest.Merge(m, src) +} +func (m *ListenFinalizeBlockRequest) XXX_Size() int { + return m.Size() +} +func (m *ListenFinalizeBlockRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListenFinalizeBlockRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenFinalizeBlockRequest proto.InternalMessageInfo + +func (m *ListenFinalizeBlockRequest) GetReq() *v1.FinalizeBlockRequest { + if m != nil { + return m.Req + } + return nil +} + +func (m *ListenFinalizeBlockRequest) GetRes() *v1.FinalizeBlockResponse { + if m != nil { + return m.Res + } + return nil +} + +// ListenEndBlockResponse is the response type for the ListenEndBlock RPC method +type ListenFinalizeBlockResponse struct { +} + +func (m *ListenFinalizeBlockResponse) Reset() { *m = ListenFinalizeBlockResponse{} } +func (m *ListenFinalizeBlockResponse) String() string { return proto.CompactTextString(m) } +func (*ListenFinalizeBlockResponse) ProtoMessage() {} +func (*ListenFinalizeBlockResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7b98083eb9315fb6, []int{1} +} +func (m *ListenFinalizeBlockResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenFinalizeBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenFinalizeBlockResponse.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 *ListenFinalizeBlockResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenFinalizeBlockResponse.Merge(m, src) +} +func (m *ListenFinalizeBlockResponse) XXX_Size() int { + return m.Size() +} +func (m *ListenFinalizeBlockResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListenFinalizeBlockResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenFinalizeBlockResponse proto.InternalMessageInfo + +// ListenCommitRequest is the request type for the ListenCommit RPC method +type ListenCommitRequest struct { + // explicitly pass in block height as ResponseCommit does not contain this + // info + BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + Res *v1.CommitResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` + ChangeSet []*types.StoreKVPair `protobuf:"bytes,3,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` +} + +func (m *ListenCommitRequest) Reset() { *m = ListenCommitRequest{} } +func (m *ListenCommitRequest) String() string { return proto.CompactTextString(m) } +func (*ListenCommitRequest) ProtoMessage() {} +func (*ListenCommitRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7b98083eb9315fb6, []int{2} +} +func (m *ListenCommitRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenCommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenCommitRequest.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 *ListenCommitRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenCommitRequest.Merge(m, src) +} +func (m *ListenCommitRequest) XXX_Size() int { + return m.Size() +} +func (m *ListenCommitRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListenCommitRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenCommitRequest proto.InternalMessageInfo + +func (m *ListenCommitRequest) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *ListenCommitRequest) GetRes() *v1.CommitResponse { + if m != nil { + return m.Res + } + return nil +} + +func (m *ListenCommitRequest) GetChangeSet() []*types.StoreKVPair { + if m != nil { + return m.ChangeSet + } + return nil +} + +// ListenCommitResponse is the response type for the ListenCommit RPC method +type ListenCommitResponse struct { +} + +func (m *ListenCommitResponse) Reset() { *m = ListenCommitResponse{} } +func (m *ListenCommitResponse) String() string { return proto.CompactTextString(m) } +func (*ListenCommitResponse) ProtoMessage() {} +func (*ListenCommitResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7b98083eb9315fb6, []int{3} +} +func (m *ListenCommitResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenCommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenCommitResponse.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 *ListenCommitResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenCommitResponse.Merge(m, src) +} +func (m *ListenCommitResponse) XXX_Size() int { + return m.Size() +} +func (m *ListenCommitResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListenCommitResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenCommitResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ListenFinalizeBlockRequest)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockRequest") + proto.RegisterType((*ListenFinalizeBlockResponse)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockResponse") + proto.RegisterType((*ListenCommitRequest)(nil), "cosmos.store.streaming.abci.ListenCommitRequest") + proto.RegisterType((*ListenCommitResponse)(nil), "cosmos.store.streaming.abci.ListenCommitResponse") +} + +func init() { + proto.RegisterFile("cosmos/store/streaming/abci/grpc.proto", fileDescriptor_7b98083eb9315fb6) +} + +var fileDescriptor_7b98083eb9315fb6 = []byte{ + // 414 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x8f, 0xd2, 0x40, + 0x18, 0xc6, 0x29, 0x4d, 0x4c, 0x1c, 0x38, 0x0d, 0xc6, 0x90, 0xa2, 0x0d, 0x34, 0x06, 0x39, 0x4d, + 0x6d, 0x3d, 0x88, 0xf1, 0xa2, 0x90, 0x18, 0x8d, 0x1e, 0x4c, 0x49, 0x3c, 0x78, 0x21, 0x6d, 0x7d, + 0x2d, 0x13, 0x68, 0xa7, 0xcc, 0x8c, 0x4d, 0xf4, 0x13, 0x78, 0x74, 0x0f, 0xfb, 0x35, 0xf6, 0x73, + 0xec, 0x91, 0xe3, 0x1e, 0x37, 0xf0, 0x45, 0x36, 0x9d, 0x59, 0x08, 0xcd, 0xb2, 0x7f, 0x38, 0xf6, + 0x9d, 0xe7, 0xf7, 0xbc, 0x4f, 0xe7, 0x7d, 0x07, 0xf5, 0x63, 0x26, 0x52, 0x26, 0x5c, 0x21, 0x19, + 0x07, 0x57, 0x48, 0x0e, 0x61, 0x4a, 0xb3, 0xc4, 0x0d, 0xa3, 0x98, 0xba, 0x09, 0xcf, 0x63, 0x92, + 0x73, 0x26, 0x19, 0xee, 0x68, 0x1d, 0x51, 0x3a, 0xb2, 0xd3, 0x91, 0x52, 0x67, 0x3d, 0x8b, 0x59, + 0x0a, 0x32, 0xfa, 0x25, 0x35, 0x56, 0x78, 0xae, 0xfc, 0x93, 0x83, 0xd0, 0xa8, 0xf5, 0xa2, 0xd2, + 0xa2, 0xf0, 0x22, 0x90, 0xa1, 0xe7, 0x2e, 0xa8, 0x90, 0x90, 0x95, 0x16, 0x4a, 0xe5, 0x9c, 0x18, + 0xc8, 0xfa, 0xaa, 0x6a, 0x1f, 0x69, 0x16, 0x2e, 0xe8, 0x5f, 0x18, 0x2d, 0x58, 0x3c, 0x0f, 0x60, + 0xf9, 0x1b, 0x84, 0xc4, 0x43, 0x64, 0x72, 0x58, 0xb6, 0x8d, 0xae, 0x31, 0x68, 0xf8, 0x7d, 0xb2, + 0x6d, 0xa8, 0xfa, 0x93, 0xc2, 0x23, 0x87, 0xa0, 0xa0, 0x44, 0xf0, 0xdb, 0x92, 0x14, 0xed, 0xba, + 0x22, 0x5f, 0xde, 0x4b, 0x8a, 0x9c, 0x65, 0x02, 0x4a, 0x54, 0x38, 0xcf, 0x51, 0xe7, 0x60, 0x24, + 0xad, 0x71, 0xce, 0x0c, 0xd4, 0xd2, 0xe7, 0x63, 0x96, 0xa6, 0x54, 0x6e, 0xb3, 0xf6, 0x50, 0x33, + 0x2a, 0x85, 0xd3, 0x19, 0xd0, 0x64, 0x26, 0x55, 0x68, 0x33, 0x68, 0xa8, 0xda, 0x27, 0x55, 0xc2, + 0xfe, 0x7e, 0xa8, 0xee, 0xcd, 0x50, 0x5b, 0xc3, 0xbd, 0x34, 0xf8, 0x3d, 0x42, 0xf1, 0x2c, 0xcc, + 0x12, 0x98, 0x0a, 0x90, 0x6d, 0xb3, 0x6b, 0x0e, 0x1a, 0x7e, 0x8f, 0x54, 0xe6, 0x72, 0x7d, 0xb9, + 0x64, 0x52, 0x7e, 0x7d, 0xf9, 0xfe, 0x2d, 0xa4, 0x3c, 0x78, 0xac, 0xa1, 0x09, 0x48, 0xe7, 0x29, + 0x7a, 0x52, 0xcd, 0xab, 0xed, 0xfd, 0xd3, 0x3a, 0x6a, 0x7d, 0x18, 0x8d, 0x3f, 0xeb, 0x43, 0xe0, + 0x13, 0xe0, 0x05, 0x8d, 0x01, 0xff, 0xdb, 0xfd, 0x60, 0xe5, 0x02, 0xf0, 0x1b, 0x72, 0xc7, 0x36, + 0x90, 0xdb, 0xa7, 0x68, 0x0d, 0x8f, 0x07, 0x75, 0x44, 0x2c, 0x50, 0x73, 0x3f, 0x3a, 0x7e, 0xf5, + 0x00, 0xa7, 0xca, 0x54, 0x2c, 0xef, 0x08, 0x42, 0x37, 0x1d, 0xbd, 0x3b, 0x5f, 0xdb, 0xc6, 0x6a, + 0x6d, 0x1b, 0x97, 0x6b, 0xdb, 0xf8, 0xbf, 0xb1, 0x6b, 0xab, 0x8d, 0x5d, 0xbb, 0xd8, 0xd8, 0xb5, + 0x1f, 0x3d, 0xed, 0x25, 0x7e, 0xce, 0x09, 0x65, 0x07, 0x1f, 0x4f, 0xf4, 0x48, 0xed, 0xf5, 0xeb, + 0xab, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xf4, 0x63, 0xc3, 0x62, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ABCIListenerServiceClient is the client API for ABCIListenerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ABCIListenerServiceClient interface { + // ListenFinalizeBlock is the corresponding endpoint for + // ABCIListener.ListenEndBlock + ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) + // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit + ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) +} + +type aBCIListenerServiceClient struct { + cc grpc1.ClientConn +} + +func NewABCIListenerServiceClient(cc grpc1.ClientConn) ABCIListenerServiceClient { + return &aBCIListenerServiceClient{cc} +} + +func (c *aBCIListenerServiceClient) ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) { + out := new(ListenFinalizeBlockResponse) + err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aBCIListenerServiceClient) ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) { + out := new(ListenCommitResponse) + err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ABCIListenerServiceServer is the server API for ABCIListenerService service. +type ABCIListenerServiceServer interface { + // ListenFinalizeBlock is the corresponding endpoint for + // ABCIListener.ListenEndBlock + ListenFinalizeBlock(context.Context, *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) + // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit + ListenCommit(context.Context, *ListenCommitRequest) (*ListenCommitResponse, error) +} + +// UnimplementedABCIListenerServiceServer can be embedded to have forward compatible implementations. +type UnimplementedABCIListenerServiceServer struct { +} + +func (*UnimplementedABCIListenerServiceServer) ListenFinalizeBlock(ctx context.Context, req *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenFinalizeBlock not implemented") +} +func (*UnimplementedABCIListenerServiceServer) ListenCommit(ctx context.Context, req *ListenCommitRequest) (*ListenCommitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenCommit not implemented") +} + +func RegisterABCIListenerServiceServer(s grpc1.Server, srv ABCIListenerServiceServer) { + s.RegisterService(&_ABCIListenerService_serviceDesc, srv) +} + +func _ABCIListenerService_ListenFinalizeBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenFinalizeBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, req.(*ListenFinalizeBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ABCIListenerService_ListenCommit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenCommitRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIListenerServiceServer).ListenCommit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIListenerServiceServer).ListenCommit(ctx, req.(*ListenCommitRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ABCIListenerService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.store.streaming.abci.ABCIListenerService", + HandlerType: (*ABCIListenerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListenFinalizeBlock", + Handler: _ABCIListenerService_ListenFinalizeBlock_Handler, + }, + { + MethodName: "ListenCommit", + Handler: _ABCIListenerService_ListenCommit_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/store/streaming/abci/grpc.proto", +} + +func (m *ListenFinalizeBlockRequest) 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 *ListenFinalizeBlockRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenFinalizeBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Res != nil { + { + size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Req != nil { + { + size, err := m.Req.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ListenFinalizeBlockResponse) 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 *ListenFinalizeBlockResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenFinalizeBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ListenCommitRequest) 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 *ListenCommitRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenCommitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ChangeSet) > 0 { + for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Res != nil { + { + size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.BlockHeight != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ListenCommitResponse) 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 *ListenCommitResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenCommitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { + offset -= sovGrpc(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ListenFinalizeBlockRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Req != nil { + l = m.Req.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + if m.Res != nil { + l = m.Res.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + return n +} + +func (m *ListenFinalizeBlockResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ListenCommitRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockHeight != 0 { + n += 1 + sovGrpc(uint64(m.BlockHeight)) + } + if m.Res != nil { + l = m.Res.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + if len(m.ChangeSet) > 0 { + for _, e := range m.ChangeSet { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + return n +} + +func (m *ListenCommitResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovGrpc(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGrpc(x uint64) (n int) { + return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ListenFinalizeBlockRequest) 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 ErrIntOverflowGrpc + } + 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: ListenFinalizeBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenFinalizeBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Req == nil { + m.Req = &v1.FinalizeBlockRequest{} + } + if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Res == nil { + m.Res = &v1.FinalizeBlockResponse{} + } + if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenFinalizeBlockResponse) 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 ErrIntOverflowGrpc + } + 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: ListenFinalizeBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenFinalizeBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenCommitRequest) 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 ErrIntOverflowGrpc + } + 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: ListenCommitRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenCommitRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Res == nil { + m.Res = &v1.CommitResponse{} + } + if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChangeSet = append(m.ChangeSet, &types.StoreKVPair{}) + if err := m.ChangeSet[len(m.ChangeSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenCommitResponse) 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 ErrIntOverflowGrpc + } + 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: ListenCommitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenCommitResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGrpc(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGrpc + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGrpc + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGrpc + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/store/types/commit_info.pb.go b/cosmossdk.io/store/types/commit_info.pb.go new file mode 100644 index 000000000000..81220a79c236 --- /dev/null +++ b/cosmossdk.io/store/types/commit_info.pb.go @@ -0,0 +1,864 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/store/v1beta1/commit_info.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// CommitInfo defines commit information used by the multi-store when committing +// a version/height. +type CommitInfo struct { + Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + StoreInfos []StoreInfo `protobuf:"bytes,2,rep,name=store_infos,json=storeInfos,proto3" json:"store_infos"` + Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` +} + +func (m *CommitInfo) Reset() { *m = CommitInfo{} } +func (m *CommitInfo) String() string { return proto.CompactTextString(m) } +func (*CommitInfo) ProtoMessage() {} +func (*CommitInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_5f8c656cdef8c524, []int{0} +} +func (m *CommitInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommitInfo.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 *CommitInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitInfo.Merge(m, src) +} +func (m *CommitInfo) XXX_Size() int { + return m.Size() +} +func (m *CommitInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CommitInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitInfo proto.InternalMessageInfo + +func (m *CommitInfo) GetVersion() int64 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *CommitInfo) GetStoreInfos() []StoreInfo { + if m != nil { + return m.StoreInfos + } + return nil +} + +func (m *CommitInfo) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +// StoreInfo defines store-specific commit information. It contains a reference +// between a store name and the commit ID. +type StoreInfo struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + CommitId CommitID `protobuf:"bytes,2,opt,name=commit_id,json=commitId,proto3" json:"commit_id"` +} + +func (m *StoreInfo) Reset() { *m = StoreInfo{} } +func (m *StoreInfo) String() string { return proto.CompactTextString(m) } +func (*StoreInfo) ProtoMessage() {} +func (*StoreInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_5f8c656cdef8c524, []int{1} +} +func (m *StoreInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StoreInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StoreInfo.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 *StoreInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_StoreInfo.Merge(m, src) +} +func (m *StoreInfo) XXX_Size() int { + return m.Size() +} +func (m *StoreInfo) XXX_DiscardUnknown() { + xxx_messageInfo_StoreInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_StoreInfo proto.InternalMessageInfo + +func (m *StoreInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *StoreInfo) GetCommitId() CommitID { + if m != nil { + return m.CommitId + } + return CommitID{} +} + +// CommitID defines the commitment information when a specific store is +// committed. +type CommitID struct { + Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` +} + +func (m *CommitID) Reset() { *m = CommitID{} } +func (*CommitID) ProtoMessage() {} +func (*CommitID) Descriptor() ([]byte, []int) { + return fileDescriptor_5f8c656cdef8c524, []int{2} +} +func (m *CommitID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommitID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommitID.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 *CommitID) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitID.Merge(m, src) +} +func (m *CommitID) XXX_Size() int { + return m.Size() +} +func (m *CommitID) XXX_DiscardUnknown() { + xxx_messageInfo_CommitID.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitID proto.InternalMessageInfo + +func (m *CommitID) GetVersion() int64 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *CommitID) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func init() { + proto.RegisterType((*CommitInfo)(nil), "cosmos.store.v1beta1.CommitInfo") + proto.RegisterType((*StoreInfo)(nil), "cosmos.store.v1beta1.StoreInfo") + proto.RegisterType((*CommitID)(nil), "cosmos.store.v1beta1.CommitID") +} + +func init() { + proto.RegisterFile("cosmos/store/v1beta1/commit_info.proto", fileDescriptor_5f8c656cdef8c524) +} + +var fileDescriptor_5f8c656cdef8c524 = []byte{ + // 336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4e, 0xf2, 0x50, + 0x14, 0xc7, 0x7b, 0xa1, 0xf9, 0x3e, 0x7a, 0x70, 0xba, 0x61, 0x68, 0x18, 0x6e, 0x09, 0x83, 0x61, + 0xba, 0x0d, 0xb8, 0x39, 0x98, 0x58, 0x8d, 0x09, 0x6b, 0x75, 0x72, 0x31, 0x2d, 0x5c, 0x4a, 0xa3, + 0xed, 0x21, 0xdc, 0x2b, 0x89, 0x6f, 0xc1, 0xe8, 0xe8, 0x33, 0xf8, 0x14, 0x8c, 0x8c, 0x4e, 0x6a, + 0xe0, 0x45, 0x4c, 0x4f, 0x5b, 0x5c, 0x88, 0xdb, 0x39, 0xed, 0xef, 0x9c, 0xff, 0xaf, 0xa7, 0x70, + 0x3a, 0x41, 0x9d, 0xa1, 0xf6, 0xb5, 0xc1, 0xa5, 0xf2, 0x57, 0xc3, 0x58, 0x99, 0x68, 0xe8, 0x4f, + 0x30, 0xcb, 0x52, 0xf3, 0x90, 0xe6, 0x33, 0x94, 0x8b, 0x25, 0x1a, 0xe4, 0x9d, 0x92, 0x93, 0xc4, + 0xc9, 0x8a, 0xeb, 0x76, 0x12, 0x4c, 0x90, 0x00, 0xbf, 0xa8, 0x4a, 0xb6, 0xeb, 0x25, 0x88, 0xc9, + 0x93, 0xf2, 0xa9, 0x8b, 0x9f, 0x67, 0xbe, 0x49, 0x33, 0xa5, 0x4d, 0x94, 0x2d, 0x4a, 0xa0, 0xff, + 0xce, 0x00, 0xae, 0x28, 0x62, 0x9c, 0xcf, 0x90, 0xbb, 0xf0, 0x7f, 0xa5, 0x96, 0x3a, 0xc5, 0xdc, + 0x65, 0x3d, 0x36, 0x68, 0x86, 0x75, 0xcb, 0x6f, 0xa0, 0x4d, 0x81, 0x64, 0xa2, 0xdd, 0x46, 0xaf, + 0x39, 0x68, 0x8f, 0x3c, 0x79, 0xcc, 0x45, 0xde, 0x16, 0x5d, 0xb1, 0x2f, 0xb0, 0x37, 0x9f, 0x9e, + 0x15, 0x82, 0xae, 0x1f, 0x68, 0x1e, 0x80, 0x73, 0x70, 0x70, 0x9b, 0x3d, 0x36, 0x68, 0x8f, 0xba, + 0xb2, 0xb4, 0x94, 0xb5, 0xa5, 0xbc, 0xab, 0x89, 0xa0, 0x55, 0x2c, 0x58, 0x7f, 0x79, 0x2c, 0xfc, + 0x1d, 0xeb, 0xc7, 0xe0, 0x1c, 0x22, 0x38, 0x07, 0x3b, 0x8f, 0x32, 0x45, 0xbe, 0x4e, 0x48, 0x35, + 0xbf, 0x04, 0xa7, 0xbe, 0xdb, 0xd4, 0x6d, 0x50, 0x88, 0x38, 0xae, 0x5a, 0x7d, 0xfb, 0x75, 0x65, + 0xda, 0x2a, 0xc7, 0xc6, 0xd3, 0xfe, 0x05, 0xb4, 0xea, 0x77, 0x7f, 0x5c, 0x85, 0x83, 0x3d, 0x8f, + 0xf4, 0x9c, 0x32, 0x4e, 0x42, 0xaa, 0xcf, 0xed, 0xd7, 0x37, 0xcf, 0x0a, 0x46, 0x9b, 0x9d, 0x60, + 0xdb, 0x9d, 0x60, 0xdf, 0x3b, 0xc1, 0xd6, 0x7b, 0x61, 0x6d, 0xf7, 0xc2, 0xfa, 0xd8, 0x0b, 0xeb, + 0xde, 0x2d, 0x45, 0xf4, 0xf4, 0x51, 0xa6, 0x58, 0xfd, 0x6d, 0xf3, 0xb2, 0x50, 0x3a, 0xfe, 0x47, + 0x07, 0x38, 0xfb, 0x09, 0x00, 0x00, 0xff, 0xff, 0x67, 0xb7, 0x0d, 0x59, 0x0a, 0x02, 0x00, 0x00, +} + +func (m *CommitInfo) 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 *CommitInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintCommitInfo(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x1a + if len(m.StoreInfos) > 0 { + for iNdEx := len(m.StoreInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.StoreInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommitInfo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Version != 0 { + i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StoreInfo) 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 *StoreInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StoreInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.CommitId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommitInfo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CommitID) 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 *CommitID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } + if m.Version != 0 { + i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintCommitInfo(dAtA []byte, offset int, v uint64) int { + offset -= sovCommitInfo(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CommitInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != 0 { + n += 1 + sovCommitInfo(uint64(m.Version)) + } + if len(m.StoreInfos) > 0 { + for _, e := range m.StoreInfos { + l = e.Size() + n += 1 + l + sovCommitInfo(uint64(l)) + } + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovCommitInfo(uint64(l)) + return n +} + +func (m *StoreInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovCommitInfo(uint64(l)) + } + l = m.CommitId.Size() + n += 1 + l + sovCommitInfo(uint64(l)) + return n +} + +func (m *CommitID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != 0 { + n += 1 + sovCommitInfo(uint64(m.Version)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovCommitInfo(uint64(l)) + } + return n +} + +func sovCommitInfo(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCommitInfo(x uint64) (n int) { + return sovCommitInfo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CommitInfo) 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 ErrIntOverflowCommitInfo + } + 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: CommitInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StoreInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StoreInfos = append(m.StoreInfos, StoreInfo{}) + if err := m.StoreInfos[len(m.StoreInfos)-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 Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommitInfo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommitInfo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreInfo) 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 ErrIntOverflowCommitInfo + } + 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: StoreInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + 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 ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommitId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CommitId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommitInfo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommitInfo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CommitID) 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 ErrIntOverflowCommitInfo + } + 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: CommitID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommitID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommitInfo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommitInfo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCommitInfo(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthCommitInfo + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCommitInfo + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCommitInfo + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCommitInfo = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCommitInfo = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCommitInfo = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/store/types/listening.pb.go b/cosmossdk.io/store/types/listening.pb.go new file mode 100644 index 000000000000..1821ca474a6f --- /dev/null +++ b/cosmossdk.io/store/types/listening.pb.go @@ -0,0 +1,785 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/store/v1beta1/listening.proto + +package types + +import ( + fmt "fmt" + v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" + _ "github.com/cosmos/cosmos-proto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and +// Deletes) It optionally includes the StoreKey for the originating KVStore and +// a Boolean flag to distinguish between Sets and Deletes +type StoreKVPair struct { + StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"` + Delete bool `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"` + Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } +func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } +func (*StoreKVPair) ProtoMessage() {} +func (*StoreKVPair) Descriptor() ([]byte, []int) { + return fileDescriptor_b6caeb9d7b7c7c10, []int{0} +} +func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StoreKVPair.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 *StoreKVPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_StoreKVPair.Merge(m, src) +} +func (m *StoreKVPair) XXX_Size() int { + return m.Size() +} +func (m *StoreKVPair) XXX_DiscardUnknown() { + xxx_messageInfo_StoreKVPair.DiscardUnknown(m) +} + +var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo + +func (m *StoreKVPair) GetStoreKey() string { + if m != nil { + return m.StoreKey + } + return "" +} + +func (m *StoreKVPair) GetDelete() bool { + if m != nil { + return m.Delete + } + return false +} + +func (m *StoreKVPair) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *StoreKVPair) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +// BlockMetadata contains all the abci event data of a block +// the file streamer dump them into files together with the state changes. +type BlockMetadata struct { + ResponseCommit *v1.CommitResponse `protobuf:"bytes,6,opt,name=response_commit,json=responseCommit,proto3" json:"response_commit,omitempty"` + RequestFinalizeBlock *v1.FinalizeBlockRequest `protobuf:"bytes,7,opt,name=request_finalize_block,json=requestFinalizeBlock,proto3" json:"request_finalize_block,omitempty"` + ResponseFinalizeBlock *v1.FinalizeBlockResponse `protobuf:"bytes,8,opt,name=response_finalize_block,json=responseFinalizeBlock,proto3" json:"response_finalize_block,omitempty"` +} + +func (m *BlockMetadata) Reset() { *m = BlockMetadata{} } +func (m *BlockMetadata) String() string { return proto.CompactTextString(m) } +func (*BlockMetadata) ProtoMessage() {} +func (*BlockMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_b6caeb9d7b7c7c10, []int{1} +} +func (m *BlockMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlockMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlockMetadata.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 *BlockMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockMetadata.Merge(m, src) +} +func (m *BlockMetadata) XXX_Size() int { + return m.Size() +} +func (m *BlockMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_BlockMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_BlockMetadata proto.InternalMessageInfo + +func (m *BlockMetadata) GetResponseCommit() *v1.CommitResponse { + if m != nil { + return m.ResponseCommit + } + return nil +} + +func (m *BlockMetadata) GetRequestFinalizeBlock() *v1.FinalizeBlockRequest { + if m != nil { + return m.RequestFinalizeBlock + } + return nil +} + +func (m *BlockMetadata) GetResponseFinalizeBlock() *v1.FinalizeBlockResponse { + if m != nil { + return m.ResponseFinalizeBlock + } + return nil +} + +func init() { + proto.RegisterType((*StoreKVPair)(nil), "cosmos.store.v1beta1.StoreKVPair") + proto.RegisterType((*BlockMetadata)(nil), "cosmos.store.v1beta1.BlockMetadata") +} + +func init() { + proto.RegisterFile("cosmos/store/v1beta1/listening.proto", fileDescriptor_b6caeb9d7b7c7c10) +} + +var fileDescriptor_b6caeb9d7b7c7c10 = []byte{ + // 416 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0xeb, 0xd6, 0x2d, 0x9e, 0x07, 0x2c, 0x32, 0x65, 0x84, 0x81, 0xa2, 0x68, 0x42, 0xd0, + 0xcb, 0x1c, 0xba, 0x71, 0xe2, 0x38, 0x24, 0x24, 0x32, 0x21, 0xa1, 0x20, 0x71, 0x40, 0x48, 0x91, + 0x93, 0xbe, 0x21, 0xab, 0x69, 0x5c, 0x62, 0x2f, 0x52, 0xb9, 0xf0, 0x15, 0xf8, 0x30, 0x48, 0x7c, + 0x05, 0x8e, 0x13, 0x27, 0x8e, 0xa8, 0xfd, 0x22, 0x28, 0xb6, 0x8b, 0x34, 0x38, 0xec, 0x96, 0xff, + 0x7b, 0xff, 0xff, 0xcf, 0xcf, 0xf1, 0xa3, 0x8f, 0x4a, 0xa5, 0x17, 0x4a, 0x27, 0xda, 0xa8, 0x06, + 0x92, 0x76, 0x5a, 0x80, 0x11, 0xd3, 0xa4, 0x92, 0xda, 0x40, 0x2d, 0xeb, 0x8f, 0x7c, 0xd9, 0x28, + 0xa3, 0xd8, 0xd8, 0xb9, 0xb8, 0x75, 0x71, 0xef, 0x3a, 0x78, 0x58, 0xaa, 0x05, 0x98, 0xe2, 0xdc, + 0x24, 0xa2, 0x28, 0x65, 0xd2, 0x4e, 0x13, 0xb3, 0x5a, 0x82, 0x76, 0x99, 0x83, 0xfb, 0x2e, 0x93, + 0x5b, 0x95, 0x78, 0x80, 0x15, 0x87, 0x5f, 0xe8, 0xee, 0xdb, 0x8e, 0x74, 0xf6, 0xee, 0x8d, 0x90, + 0x0d, 0x7b, 0x40, 0x77, 0x2c, 0x38, 0x9f, 0xc3, 0x2a, 0x44, 0x31, 0x9a, 0xec, 0x64, 0xc4, 0x16, + 0xce, 0x60, 0xc5, 0xf6, 0xe9, 0x68, 0x06, 0x15, 0x18, 0x08, 0xfb, 0x31, 0x9a, 0x90, 0xcc, 0x2b, + 0x16, 0xd0, 0x41, 0x67, 0x1f, 0xc4, 0x68, 0x72, 0x33, 0xeb, 0x3e, 0xd9, 0x98, 0x0e, 0x5b, 0x51, + 0x5d, 0x40, 0x88, 0x6d, 0xcd, 0x89, 0xe7, 0x77, 0x7e, 0x7e, 0x3b, 0xda, 0x73, 0xa7, 0x1f, 0xe9, + 0xd9, 0x3c, 0x7e, 0xca, 0x9f, 0x9d, 0x1c, 0x7e, 0xef, 0xd3, 0x5b, 0xa7, 0x95, 0x2a, 0xe7, 0xaf, + 0xc1, 0x88, 0x99, 0x30, 0x82, 0xbd, 0xa2, 0x7b, 0x0d, 0xe8, 0xa5, 0xaa, 0x35, 0xe4, 0xa5, 0x5a, + 0x2c, 0xa4, 0x09, 0x47, 0x31, 0x9a, 0xec, 0x1e, 0xc7, 0x7c, 0x7b, 0x4b, 0xde, 0xdd, 0x92, 0xb7, + 0x53, 0xfe, 0xc2, 0xf6, 0x33, 0x6f, 0xcf, 0x6e, 0x6f, 0x83, 0xae, 0xce, 0x3e, 0xd0, 0xfd, 0x06, + 0x3e, 0x5d, 0x80, 0x36, 0xf9, 0xb9, 0xac, 0x45, 0x25, 0x3f, 0x43, 0x5e, 0x74, 0x87, 0x85, 0x37, + 0x2c, 0xf1, 0xf1, 0xff, 0xc4, 0x97, 0xde, 0x67, 0x67, 0xca, 0x5c, 0x38, 0x1b, 0x7b, 0xca, 0x95, + 0x26, 0xcb, 0xe9, 0xbd, 0xbf, 0x83, 0xfe, 0x83, 0x27, 0x16, 0xff, 0xe4, 0x5a, 0xbc, 0x9f, 0xfb, + 0xee, 0x96, 0x73, 0xa5, 0x9d, 0x62, 0x82, 0x82, 0x7e, 0x8a, 0x49, 0x3f, 0x18, 0xa4, 0x98, 0x0c, + 0x02, 0x9c, 0x62, 0x82, 0x83, 0x61, 0x8a, 0xc9, 0x30, 0x18, 0x9d, 0x1e, 0xff, 0x58, 0x47, 0xe8, + 0x72, 0x1d, 0xa1, 0xdf, 0xeb, 0x08, 0x7d, 0xdd, 0x44, 0xbd, 0xcb, 0x4d, 0xd4, 0xfb, 0xb5, 0x89, + 0x7a, 0xef, 0x43, 0xf7, 0x93, 0xf5, 0x6c, 0xce, 0xa5, 0xf2, 0xfb, 0x64, 0xf7, 0xa1, 0x18, 0xd9, + 0x57, 0x3f, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x98, 0x9f, 0x12, 0x13, 0x6c, 0x02, 0x00, 0x00, +} + +func (m *StoreKVPair) 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 *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintListening(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x22 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintListening(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x1a + } + if m.Delete { + i-- + if m.Delete { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.StoreKey) > 0 { + i -= len(m.StoreKey) + copy(dAtA[i:], m.StoreKey) + i = encodeVarintListening(dAtA, i, uint64(len(m.StoreKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlockMetadata) 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 *BlockMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ResponseFinalizeBlock != nil { + { + size, err := m.ResponseFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintListening(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + if m.RequestFinalizeBlock != nil { + { + size, err := m.RequestFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintListening(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.ResponseCommit != nil { + { + size, err := m.ResponseCommit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintListening(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} + +func encodeVarintListening(dAtA []byte, offset int, v uint64) int { + offset -= sovListening(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *StoreKVPair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StoreKey) + if l > 0 { + n += 1 + l + sovListening(uint64(l)) + } + if m.Delete { + n += 2 + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovListening(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovListening(uint64(l)) + } + return n +} + +func (m *BlockMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ResponseCommit != nil { + l = m.ResponseCommit.Size() + n += 1 + l + sovListening(uint64(l)) + } + if m.RequestFinalizeBlock != nil { + l = m.RequestFinalizeBlock.Size() + n += 1 + l + sovListening(uint64(l)) + } + if m.ResponseFinalizeBlock != nil { + l = m.ResponseFinalizeBlock.Size() + n += 1 + l + sovListening(uint64(l)) + } + return n +} + +func sovListening(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozListening(x uint64) (n int) { + return sovListening(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *StoreKVPair) 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 ErrIntOverflowListening + } + 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: StoreKVPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StoreKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + 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 ErrInvalidLengthListening + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StoreKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Delete = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipListening(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthListening + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockMetadata) 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 ErrIntOverflowListening + } + 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: BlockMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseCommit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseCommit == nil { + m.ResponseCommit = &v1.CommitResponse{} + } + if err := m.ResponseCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestFinalizeBlock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestFinalizeBlock == nil { + m.RequestFinalizeBlock = &v1.FinalizeBlockRequest{} + } + if err := m.RequestFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseFinalizeBlock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseFinalizeBlock == nil { + m.ResponseFinalizeBlock = &v1.FinalizeBlockResponse{} + } + if err := m.ResponseFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipListening(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthListening + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipListening(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowListening + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowListening + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowListening + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthListening + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupListening + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthListening + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthListening = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowListening = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupListening = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/consensus/keeper/keeper.go b/x/consensus/keeper/keeper.go index ec59f1d40a9c..9b46ae153cbd 100644 --- a/x/consensus/keeper/keeper.go +++ b/x/consensus/keeper/keeper.go @@ -1,6 +1,7 @@ package keeper import ( + "bytes" "context" "fmt" @@ -104,9 +105,9 @@ func (k Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (* return &types.MsgUpdateParamsResponse{}, nil } -func (k Keeper) CometInfo(ctx context.Context, msg *types.MsgCometInfo) (*types.MsgCometInfoResponse, error) { - if coreapp.ConsensusIdentity != msg.Authority { - return nil, fmt.Errorf("invalid authority; expected %s, got %s", k.GetAuthority(), msg.Authority) +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{ @@ -120,5 +121,14 @@ func (k Keeper) CometInfo(ctx context.Context, msg *types.MsgCometInfo) (*types. return nil, err } - return &types.MsgCometInfoResponse{}, nil + return &types.MsgSetCometInfoResponse{}, nil +} + +func (k Keeper) CometInfo(ctx context.Context, _ *types.QueryCometInfoRequest) (*types.QueryCometInfoResponse, error) { + cometInfo, err := k.cometInfo.Get(ctx) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryCometInfoResponse{CometInfo: &cometInfo}, nil } diff --git a/x/consensus/proto/cosmos/consensus/v1/query.proto b/x/consensus/proto/cosmos/consensus/v1/query.proto index 78576be7f065..f1e6a40c66dc 100644 --- a/x/consensus/proto/cosmos/consensus/v1/query.proto +++ b/x/consensus/proto/cosmos/consensus/v1/query.proto @@ -4,6 +4,7 @@ package cosmos.consensus.v1; import "google/api/annotations.proto"; import "cometbft/types/v1/params.proto"; +import "cosmos/consensus/v1/consensus.proto"; option go_package = "cosmossdk.io/x/consensus/types"; @@ -14,7 +15,7 @@ service Query { option (google.api.http).get = "/cosmos/consensus/v1/params"; } - rpc CometInfo(QueryCometInfoRequest) returns (QueryCometInfoResponse): + rpc CometInfo(QueryCometInfoRequest) returns (QueryCometInfoResponse); } // QueryCometInfoRequest defines the request type for querying x/consensus comet info. @@ -24,14 +25,15 @@ message QueryCometInfoRequest {} message QueryCometInfoResponse { // 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. - message QueryParamsRequest {} +// QueryParamsRequest defines the request type for querying x/consensus parameters. +message QueryParamsRequest {} - // QueryParamsResponse defines the response type for querying x/consensus parameters. - message QueryParamsResponse { - // params are the tendermint consensus params stored in the consensus module. - // Please note that `params.version` is not populated in this response, it is - // tracked separately in the x/upgrade module. - cometbft.types.v1.ConsensusParams params = 1; - } +// QueryParamsResponse defines the response type for querying x/consensus parameters. +message QueryParamsResponse { + // params are the tendermint consensus params stored in the consensus module. + // Please note that `params.version` is not populated in this response, it is + // tracked separately in the x/upgrade module. + cometbft.types.v1.ConsensusParams params = 1; +} diff --git a/x/consensus/proto/cosmos/consensus/v1/tx.proto b/x/consensus/proto/cosmos/consensus/v1/tx.proto index 7e2e85131127..74480b72a50c 100644 --- a/x/consensus/proto/cosmos/consensus/v1/tx.proto +++ b/x/consensus/proto/cosmos/consensus/v1/tx.proto @@ -20,7 +20,8 @@ service Msg { option (cosmos_proto.method_added_in) = "cosmos-sdk 0.47"; } - rpc CometInfo(MsgCometInfo) returns (MsgCometInfoResponse); + // 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. @@ -51,7 +52,7 @@ message MsgUpdateParams { message MsgUpdateParamsResponse {} // MsgCometInfo is the Msg/CometInfo request type. -message MsgCometInfo { +message MsgSetCometInfo { option (cosmos.msg.v1.signer) = "authority"; option (amino.name) = "cosmos-sdk/x/consensus/MsgCometInfo"; @@ -72,4 +73,4 @@ message MsgCometInfo { } // MsgCometInfoResponse defines the response -message MsgCometInfoResponse {} +message MsgSetCometInfoResponse {} diff --git a/x/consensus/types/query.pb.go b/x/consensus/types/query.pb.go index aafdfb1ef9ee..490cc184eeaa 100644 --- a/x/consensus/types/query.pb.go +++ b/x/consensus/types/query.pb.go @@ -29,6 +29,89 @@ 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 QueryCometInfoRequest struct { +} + +func (m *QueryCometInfoRequest) Reset() { *m = QueryCometInfoRequest{} } +func (m *QueryCometInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCometInfoRequest) ProtoMessage() {} +func (*QueryCometInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_bf54d1e5df04cee9, []int{0} +} +func (m *QueryCometInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCometInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCometInfoRequest.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 *QueryCometInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCometInfoRequest.Merge(m, src) +} +func (m *QueryCometInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCometInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCometInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCometInfoRequest proto.InternalMessageInfo + +// QueryCometInfoResponse defines the response type for querying x/consensus comet info. +type QueryCometInfoResponse 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 *QueryCometInfoResponse) Reset() { *m = QueryCometInfoResponse{} } +func (m *QueryCometInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCometInfoResponse) ProtoMessage() {} +func (*QueryCometInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bf54d1e5df04cee9, []int{1} +} +func (m *QueryCometInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCometInfoResponse.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 *QueryCometInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCometInfoResponse.Merge(m, src) +} +func (m *QueryCometInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCometInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCometInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCometInfoResponse proto.InternalMessageInfo + +func (m *QueryCometInfoResponse) GetCometInfo() *CometInfo { + if m != nil { + return m.CometInfo + } + return nil +} + // QueryParamsRequest defines the request type for querying x/consensus parameters. type QueryParamsRequest struct { } @@ -37,7 +120,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{0} + return fileDescriptor_bf54d1e5df04cee9, []int{2} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +161,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{1} + return fileDescriptor_bf54d1e5df04cee9, []int{3} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -115,6 +198,8 @@ func (m *QueryParamsResponse) GetParams() *v1.ConsensusParams { } func init() { + proto.RegisterType((*QueryCometInfoRequest)(nil), "cosmos.consensus.v1.QueryCometInfoRequest") + proto.RegisterType((*QueryCometInfoResponse)(nil), "cosmos.consensus.v1.QueryCometInfoResponse") proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.consensus.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.consensus.v1.QueryParamsResponse") } @@ -122,24 +207,29 @@ func init() { func init() { proto.RegisterFile("cosmos/consensus/v1/query.proto", fileDescriptor_bf54d1e5df04cee9) } var fileDescriptor_bf54d1e5df04cee9 = []byte{ - // 271 bytes of a gzipped FileDescriptorProto + // 341 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, 0x95, 0x57, 0x12, 0xe1, 0x12, 0x0a, 0x04, 0xd9, 0x10, 0x00, - 0x16, 0x0c, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x51, 0x0a, 0xe4, 0x12, 0x46, 0x11, 0x2d, 0x2e, - 0x00, 0xd9, 0x28, 0x64, 0xc5, 0xc5, 0x06, 0xd1, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4, - 0xa4, 0x07, 0x33, 0x5d, 0x0f, 0x6c, 0xba, 0x5e, 0x99, 0xa1, 0x9e, 0x33, 0xcc, 0x6d, 0x50, 0xbd, - 0x50, 0x1d, 0x46, 0x5d, 0x8c, 0x5c, 0xac, 0x60, 0x33, 0x85, 0x1a, 0x18, 0xb9, 0xd8, 0x20, 0x92, - 0x42, 0xea, 0x7a, 0x58, 0x7c, 0xa4, 0x87, 0xe9, 0x20, 0x29, 0x0d, 0xc2, 0x0a, 0x21, 0x6e, 0x54, - 0x52, 0x6e, 0xba, 0xfc, 0x64, 0x32, 0x93, 0xac, 0x90, 0xb4, 0x3e, 0xb6, 0xd0, 0x84, 0x38, 0xc6, - 0xc9, 0xe2, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, - 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xe4, 0x20, 0xba, 0x8a, - 0x53, 0xb2, 0xf5, 0x32, 0xf3, 0xf5, 0x2b, 0x90, 0x74, 0x83, 0x7d, 0x98, 0xc4, 0x06, 0x0e, 0x36, - 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0xcb, 0xf0, 0x2b, 0xac, 0x01, 0x00, 0x00, + 0x58, 0x90, 0x58, 0x94, 0x98, 0x0b, 0x93, 0x57, 0xc6, 0x66, 0x27, 0xc2, 0x7c, 0xb0, 0x22, 0x25, + 0x71, 0x2e, 0xd1, 0x40, 0x90, 0x33, 0x9c, 0x41, 0x66, 0x79, 0xe6, 0xa5, 0xe5, 0x07, 0xa5, 0x16, + 0x96, 0xa6, 0x16, 0x97, 0x28, 0x85, 0x73, 0x89, 0xa1, 0x4b, 0x14, 0x17, 0x80, 0x34, 0x0b, 0xd9, + 0x72, 0x71, 0x81, 0x6d, 0x8e, 0xcf, 0xcc, 0x4b, 0xcb, 0x97, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, + 0x92, 0xd3, 0xc3, 0xe2, 0x7e, 0x3d, 0x84, 0x5e, 0xce, 0x64, 0x18, 0x53, 0x49, 0x84, 0x4b, 0x08, + 0x6c, 0x70, 0x00, 0xd8, 0xad, 0x30, 0xeb, 0x02, 0xb9, 0x84, 0x51, 0x44, 0xa1, 0x76, 0x59, 0x71, + 0xb1, 0x41, 0xfc, 0x04, 0xb5, 0x47, 0x49, 0x0f, 0xe6, 0x69, 0x3d, 0xb0, 0xa7, 0x21, 0xb6, 0x40, + 0xad, 0x84, 0xea, 0x85, 0xea, 0x30, 0xfa, 0xc0, 0xc8, 0xc5, 0x0a, 0x36, 0x53, 0xa8, 0x81, 0x91, + 0x8b, 0x0d, 0x22, 0x29, 0xa4, 0x8e, 0xd5, 0xa1, 0x98, 0x0e, 0x92, 0xd2, 0x20, 0xac, 0x10, 0xe2, + 0x46, 0x25, 0xe5, 0xa6, 0xcb, 0x4f, 0x26, 0x33, 0xc9, 0x0a, 0x49, 0xeb, 0x63, 0x0b, 0x70, 0x88, + 0x63, 0x84, 0x52, 0xb8, 0x38, 0xe1, 0xa1, 0x21, 0xa4, 0x85, 0xdb, 0x6c, 0xf4, 0x78, 0x90, 0xd2, + 0x26, 0x4a, 0x2d, 0xc4, 0x29, 0x4e, 0x16, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, + 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, + 0x10, 0x25, 0x07, 0x31, 0xa5, 0x38, 0x25, 0x5b, 0x2f, 0x33, 0x5f, 0xbf, 0x02, 0xc9, 0x8d, 0xe0, + 0x70, 0x4c, 0x62, 0x03, 0x27, 0x07, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x7a, 0xcc, + 0x3c, 0xa9, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -156,6 +246,7 @@ 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(ctx context.Context, in *QueryCometInfoRequest, opts ...grpc.CallOption) (*QueryCometInfoResponse, error) } type queryClient struct { @@ -175,10 +266,20 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) CometInfo(ctx context.Context, in *QueryCometInfoRequest, opts ...grpc.CallOption) (*QueryCometInfoResponse, error) { + out := new(QueryCometInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Query/CometInfo", 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(context.Context, *QueryCometInfoRequest) (*QueryCometInfoResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -188,6 +289,9 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (*UnimplementedQueryServer) CometInfo(ctx context.Context, req *QueryCometInfoRequest) (*QueryCometInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CometInfo not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -211,6 +315,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_CometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCometInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CometInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.consensus.v1.Query/CometInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CometInfo(ctx, req.(*QueryCometInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.consensus.v1.Query", HandlerType: (*QueryServer)(nil), @@ -219,11 +341,73 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "CometInfo", + Handler: _Query_CometInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/consensus/v1/query.proto", } +func (m *QueryCometInfoRequest) 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 *QueryCometInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCometInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryCometInfoResponse) 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 *QueryCometInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCometInfoResponse) 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) @@ -293,6 +477,28 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *QueryCometInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryCometInfoResponse) 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 @@ -321,6 +527,142 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *QueryCometInfoRequest) 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: QueryCometInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCometInfoRequest: 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 *QueryCometInfoResponse) 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: QueryCometInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCometInfoResponse: 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 ca6f9f366f6c..ecf75a0e78ea 100644 --- a/x/consensus/types/tx.pb.go +++ b/x/consensus/types/tx.pb.go @@ -172,7 +172,7 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo // MsgCometInfo is the Msg/CometInfo request type. -type MsgCometInfo struct { +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. @@ -185,18 +185,18 @@ type MsgCometInfo struct { LastCommit *v11.CommitInfo `protobuf:"bytes,5,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` } -func (m *MsgCometInfo) Reset() { *m = MsgCometInfo{} } -func (m *MsgCometInfo) String() string { return proto.CompactTextString(m) } -func (*MsgCometInfo) ProtoMessage() {} -func (*MsgCometInfo) Descriptor() ([]byte, []int) { +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 *MsgCometInfo) XXX_Unmarshal(b []byte) error { +func (m *MsgSetCometInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgCometInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSetCometInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgCometInfo.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSetCometInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -206,47 +206,47 @@ func (m *MsgCometInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *MsgCometInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCometInfo.Merge(m, src) +func (m *MsgSetCometInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetCometInfo.Merge(m, src) } -func (m *MsgCometInfo) XXX_Size() int { +func (m *MsgSetCometInfo) XXX_Size() int { return m.Size() } -func (m *MsgCometInfo) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCometInfo.DiscardUnknown(m) +func (m *MsgSetCometInfo) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetCometInfo.DiscardUnknown(m) } -var xxx_messageInfo_MsgCometInfo proto.InternalMessageInfo +var xxx_messageInfo_MsgSetCometInfo proto.InternalMessageInfo -func (m *MsgCometInfo) GetAuthority() string { +func (m *MsgSetCometInfo) GetAuthority() string { if m != nil { return m.Authority } return "" } -func (m *MsgCometInfo) GetEvidence() []*v11.Misbehavior { +func (m *MsgSetCometInfo) GetEvidence() []*v11.Misbehavior { if m != nil { return m.Evidence } return nil } -func (m *MsgCometInfo) GetValidatorsHash() []byte { +func (m *MsgSetCometInfo) GetValidatorsHash() []byte { if m != nil { return m.ValidatorsHash } return nil } -func (m *MsgCometInfo) GetProposerAddress() []byte { +func (m *MsgSetCometInfo) GetProposerAddress() []byte { if m != nil { return m.ProposerAddress } return nil } -func (m *MsgCometInfo) GetLastCommit() *v11.CommitInfo { +func (m *MsgSetCometInfo) GetLastCommit() *v11.CommitInfo { if m != nil { return m.LastCommit } @@ -254,21 +254,21 @@ func (m *MsgCometInfo) GetLastCommit() *v11.CommitInfo { } // MsgCometInfoResponse defines the response -type MsgCometInfoResponse struct { +type MsgSetCometInfoResponse struct { } -func (m *MsgCometInfoResponse) Reset() { *m = MsgCometInfoResponse{} } -func (m *MsgCometInfoResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCometInfoResponse) ProtoMessage() {} -func (*MsgCometInfoResponse) Descriptor() ([]byte, []int) { +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 *MsgCometInfoResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgSetCometInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSetCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgCometInfoResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSetCometInfoResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -278,70 +278,70 @@ func (m *MsgCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *MsgCometInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCometInfoResponse.Merge(m, src) +func (m *MsgSetCometInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetCometInfoResponse.Merge(m, src) } -func (m *MsgCometInfoResponse) XXX_Size() int { +func (m *MsgSetCometInfoResponse) XXX_Size() int { return m.Size() } -func (m *MsgCometInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCometInfoResponse.DiscardUnknown(m) +func (m *MsgSetCometInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetCometInfoResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgCometInfoResponse proto.InternalMessageInfo +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((*MsgCometInfo)(nil), "cosmos.consensus.v1.MsgCometInfo") - proto.RegisterType((*MsgCometInfoResponse)(nil), "cosmos.consensus.v1.MsgCometInfoResponse") + 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{ - // 651 bytes of a gzipped FileDescriptorProto + // 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, 0x01, 0xa5, 0x6c, 0xb0, 0x59, 0x56, 0xa3, 0x40, 0xa4, - 0x65, 0x11, 0x51, 0x48, 0x48, 0x64, 0x89, 0x06, 0x0e, 0x1b, 0x4d, 0x09, 0x26, 0x7a, 0xd9, 0xcc, - 0xb6, 0x43, 0xdb, 0x40, 0x3b, 0x4d, 0x67, 0xa8, 0xec, 0xcd, 0x78, 0xf4, 0xe4, 0x1f, 0x31, 0xe1, - 0xc0, 0x8f, 0x30, 0xc6, 0x03, 0xf1, 0x64, 0x3c, 0x11, 0x38, 0xec, 0xdf, 0x30, 0x9d, 0xe9, 0xc7, - 0x7e, 0x46, 0xe3, 0xa5, 0xc9, 0xcc, 0xfb, 0x3c, 0xcf, 0xfb, 0xf6, 0x79, 0x9f, 0x16, 0xcc, 0x19, - 0x84, 0xba, 0x84, 0x6a, 0x06, 0xf1, 0x28, 0xf6, 0xe8, 0x09, 0xd5, 0xc2, 0x8a, 0xc6, 0x4e, 0x55, - 0x3f, 0x20, 0x8c, 0xc0, 0x29, 0x51, 0x55, 0xd3, 0xaa, 0x1a, 0x56, 0x8a, 0xb7, 0x91, 0xeb, 0x78, - 0x44, 0xe3, 0x4f, 0x81, 0x2b, 0xce, 0x0a, 0x5c, 0x9d, 0x9f, 0xb4, 0x98, 0x24, 0x4a, 0x33, 0x71, - 0x03, 0x97, 0x5a, 0x91, 0xb4, 0x4b, 0xad, 0xb8, 0xa0, 0x18, 0xc4, 0xc5, 0xac, 0x71, 0xc8, 0x34, - 0xd6, 0xf4, 0x31, 0xef, 0xeb, 0xa3, 0x00, 0xb9, 0x09, 0x71, 0x2e, 0xad, 0xa3, 0x86, 0xe1, 0xf0, - 0xb1, 0x22, 0x9c, 0xa8, 0x96, 0xbf, 0x8e, 0x82, 0x42, 0x8d, 0x5a, 0x07, 0xbe, 0x89, 0x18, 0x7e, - 0xc3, 0x79, 0x70, 0x1d, 0xe4, 0xd0, 0x09, 0xb3, 0x49, 0xe0, 0xb0, 0xa6, 0x2c, 0x95, 0xa4, 0x85, - 0x5c, 0x55, 0xfe, 0x79, 0xbe, 0x3c, 0x1d, 0xcf, 0xb3, 0x6d, 0x9a, 0x01, 0xa6, 0x74, 0x9f, 0x05, - 0x8e, 0x67, 0xe9, 0x19, 0x14, 0xae, 0x81, 0xb1, 0xc6, 0x31, 0x31, 0x8e, 0xe4, 0xe1, 0x92, 0xb4, - 0x30, 0xb9, 0xaa, 0xa8, 0x49, 0x67, 0x55, 0x74, 0x0c, 0x2b, 0x6a, 0x35, 0xaa, 0x8b, 0x36, 0xba, - 0x00, 0xc3, 0x2d, 0x70, 0x03, 0x87, 0x8e, 0x89, 0x3d, 0x03, 0xcb, 0x23, 0x9c, 0x38, 0xdf, 0x87, - 0xf8, 0x32, 0x86, 0xc4, 0xdc, 0x94, 0x02, 0x5f, 0x80, 0x5c, 0x88, 0x8e, 0x1d, 0x13, 0x31, 0x12, - 0xc8, 0xa3, 0x9c, 0x5f, 0xee, 0xc3, 0x7f, 0x9b, 0x60, 0x62, 0x81, 0x8c, 0x04, 0x77, 0xc1, 0x68, - 0xe4, 0x8c, 0x3c, 0xc6, 0xc9, 0xf7, 0xfa, 0x90, 0xb7, 0xab, 0x3b, 0x7b, 0x82, 0x57, 0xbd, 0xf3, - 0xfb, 0x7c, 0xb9, 0x20, 0x8c, 0x58, 0xa6, 0xe6, 0x51, 0x69, 0x45, 0x7d, 0xba, 0x22, 0x4b, 0x3a, - 0x57, 0x80, 0x07, 0x20, 0x47, 0x9b, 0x9e, 0x61, 0x07, 0xc4, 0x6b, 0xca, 0xe3, 0x03, 0x67, 0xd9, - 0x4f, 0x30, 0xb1, 0xe6, 0x54, 0xaf, 0x66, 0x45, 0xcf, 0x94, 0xe0, 0x6b, 0x30, 0x71, 0x88, 0x11, - 0x3b, 0x09, 0xb0, 0x3c, 0xc1, 0x45, 0x4b, 0x7d, 0x44, 0x5f, 0x09, 0xc4, 0x60, 0xc9, 0x55, 0x3d, - 0x51, 0xd9, 0xdc, 0xf8, 0xd4, 0x3a, 0x5b, 0xca, 0x16, 0xf7, 0xb9, 0x75, 0xb6, 0xf4, 0x30, 0x03, - 0x6b, 0xa7, 0x6d, 0x29, 0xee, 0xca, 0x46, 0x79, 0x16, 0xcc, 0x74, 0x5d, 0xe9, 0x98, 0xfa, 0x11, - 0xbc, 0xfc, 0x63, 0x18, 0xe4, 0x6b, 0xd4, 0xda, 0x89, 0x46, 0xdb, 0xf3, 0x0e, 0xc9, 0x7f, 0xe7, - 0x68, 0xa3, 0x2d, 0x11, 0xc3, 0xa5, 0x91, 0xce, 0xa5, 0x44, 0x46, 0x47, 0xef, 0x5b, 0x73, 0x68, - 0x03, 0xdb, 0x28, 0x74, 0x48, 0xd0, 0x96, 0x86, 0x47, 0xa0, 0x90, 0x2e, 0x96, 0xd6, 0x6d, 0x44, - 0x6d, 0x9e, 0xa9, 0xbc, 0x7e, 0x33, 0xbb, 0xde, 0x45, 0xd4, 0x86, 0x8b, 0xe0, 0x96, 0x1f, 0x10, - 0x9f, 0x50, 0x1c, 0xd4, 0x91, 0x18, 0x84, 0xa7, 0x27, 0xaf, 0x17, 0x92, 0xfb, 0x78, 0x3e, 0xb8, - 0x05, 0x26, 0x8f, 0x11, 0x65, 0x75, 0x83, 0xb8, 0xae, 0xc3, 0xe2, 0x98, 0xcc, 0xf5, 0x4e, 0xb4, - 0xc3, 0xeb, 0xd1, 0x9b, 0xeb, 0x20, 0x22, 0x88, 0xf3, 0xe6, 0x7a, 0xaf, 0xd9, 0xf7, 0x07, 0x9b, - 0x9d, 0xba, 0x57, 0xbe, 0x0b, 0xa6, 0xdb, 0xcf, 0x89, 0xcd, 0xab, 0x97, 0x12, 0x18, 0xa9, 0x51, - 0x0b, 0x7e, 0x00, 0xf9, 0x8e, 0xaf, 0xf6, 0x81, 0xda, 0xe7, 0x27, 0xa3, 0x76, 0x2d, 0xab, 0xf8, - 0xf8, 0x5f, 0x50, 0xe9, 0x4a, 0xa7, 0xbe, 0x77, 0xc7, 0x68, 0xed, 0x19, 0x7c, 0x07, 0x72, 0xd9, - 0x8e, 0xe7, 0x07, 0xe9, 0xa5, 0x90, 0xe2, 0xe2, 0x5f, 0x21, 0x49, 0xbf, 0xe2, 0xd8, 0xc7, 0xd6, - 0xd9, 0x92, 0x54, 0x7d, 0xfe, 0xed, 0x4a, 0x91, 0x2e, 0xae, 0x14, 0xe9, 0xf2, 0x4a, 0x91, 0xbe, - 0x5c, 0x2b, 0x43, 0x17, 0xd7, 0xca, 0xd0, 0xaf, 0x6b, 0x65, 0xe8, 0xbd, 0x22, 0xa4, 0xa8, 0x79, - 0xa4, 0x3a, 0xa4, 0xc3, 0x3b, 0xfe, 0x21, 0x34, 0xc6, 0xf9, 0x5f, 0xed, 0xc9, 0x9f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x44, 0x70, 0x9a, 0xde, 0x8f, 0x05, 0x00, 0x00, + 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, } // Reference imports to suppress errors if they are not otherwise used. @@ -359,7 +359,8 @@ 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) - CometInfo(ctx context.Context, in *MsgCometInfo, opts ...grpc.CallOption) (*MsgCometInfoResponse, 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 { @@ -379,9 +380,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) CometInfo(ctx context.Context, in *MsgCometInfo, opts ...grpc.CallOption) (*MsgCometInfoResponse, error) { - out := new(MsgCometInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Msg/CometInfo", in, out, opts...) +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 } @@ -393,7 +394,8 @@ 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) - CometInfo(context.Context, *MsgCometInfo) (*MsgCometInfoResponse, 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. @@ -403,8 +405,8 @@ 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) CometInfo(ctx context.Context, req *MsgCometInfo) (*MsgCometInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CometInfo 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) { @@ -429,20 +431,20 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_CometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCometInfo) +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).CometInfo(ctx, in) + return srv.(MsgServer).SetCometInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.consensus.v1.Msg/CometInfo", + FullMethod: "/cosmos.consensus.v1.Msg/SetCometInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CometInfo(ctx, req.(*MsgCometInfo)) + return srv.(MsgServer).SetCometInfo(ctx, req.(*MsgSetCometInfo)) } return interceptor(ctx, in, info, handler) } @@ -456,8 +458,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_UpdateParams_Handler, }, { - MethodName: "CometInfo", - Handler: _Msg_CometInfo_Handler, + MethodName: "SetCometInfo", + Handler: _Msg_SetCometInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -589,7 +591,7 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgCometInfo) Marshal() (dAtA []byte, err error) { +func (m *MsgSetCometInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -599,12 +601,12 @@ func (m *MsgCometInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgCometInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSetCometInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCometInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSetCometInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -659,7 +661,7 @@ func (m *MsgCometInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgCometInfoResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgSetCometInfoResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -669,12 +671,12 @@ func (m *MsgCometInfoResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgCometInfoResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSetCometInfoResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgCometInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSetCometInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -739,7 +741,7 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } -func (m *MsgCometInfo) Size() (n int) { +func (m *MsgSetCometInfo) Size() (n int) { if m == nil { return 0 } @@ -770,7 +772,7 @@ func (m *MsgCometInfo) Size() (n int) { return n } -func (m *MsgCometInfoResponse) Size() (n int) { +func (m *MsgSetCometInfoResponse) Size() (n int) { if m == nil { return 0 } @@ -1133,7 +1135,7 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCometInfo) Unmarshal(dAtA []byte) error { +func (m *MsgSetCometInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1156,10 +1158,10 @@ func (m *MsgCometInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCometInfo: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSetCometInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCometInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSetCometInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1353,7 +1355,7 @@ func (m *MsgCometInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCometInfoResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSetCometInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1376,10 +1378,10 @@ func (m *MsgCometInfoResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCometInfoResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSetCometInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSetCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: From bfa2effbc5981991c0ce8913e34b55456e6f79be Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Thu, 13 Jun 2024 13:00:41 +0200 Subject: [PATCH 07/12] add tests --- x/consensus/keeper/keeper_test.go | 55 +++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/x/consensus/keeper/keeper_test.go b/x/consensus/keeper/keeper_test.go index 204cbac137bb..df0b0b617981 100644 --- a/x/consensus/keeper/keeper_test.go +++ b/x/consensus/keeper/keeper_test.go @@ -4,8 +4,6 @@ import ( "testing" "time" - cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" - cmttypes "github.com/cometbft/cometbft/types" gogotypes "github.com/cosmos/gogoproto/types" "github.com/stretchr/testify/suite" @@ -16,6 +14,9 @@ import ( consensusparamkeeper "cosmossdk.io/x/consensus/keeper" "cosmossdk.io/x/consensus/types" + v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" + cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" + cmttypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/baseapp" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/runtime" @@ -603,3 +604,53 @@ 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) + } + }) + } +} From fb84d7218d3b1ead2c160da8375e6dc4ace6199b Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Thu, 13 Jun 2024 13:02:30 +0200 Subject: [PATCH 08/12] add comments --- x/consensus/keeper/keeper_test.go | 6 +++--- x/consensus/proto/cosmos/consensus/v1/query.proto | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/x/consensus/keeper/keeper_test.go b/x/consensus/keeper/keeper_test.go index df0b0b617981..3d3681ff41c2 100644 --- a/x/consensus/keeper/keeper_test.go +++ b/x/consensus/keeper/keeper_test.go @@ -4,6 +4,9 @@ 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" "github.com/stretchr/testify/suite" @@ -14,9 +17,6 @@ import ( consensusparamkeeper "cosmossdk.io/x/consensus/keeper" "cosmossdk.io/x/consensus/types" - v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" - cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" - cmttypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/baseapp" codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/runtime" diff --git a/x/consensus/proto/cosmos/consensus/v1/query.proto b/x/consensus/proto/cosmos/consensus/v1/query.proto index f1e6a40c66dc..787e2af5d464 100644 --- a/x/consensus/proto/cosmos/consensus/v1/query.proto +++ b/x/consensus/proto/cosmos/consensus/v1/query.proto @@ -15,6 +15,7 @@ service Query { option (google.api.http).get = "/cosmos/consensus/v1/params"; } + // CometInfo queries the comet info of x/consensus module. rpc CometInfo(QueryCometInfoRequest) returns (QueryCometInfoResponse); } From 445c1779d9659436596e58ff9730d6bca536ea39 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Thu, 13 Jun 2024 13:04:17 +0200 Subject: [PATCH 09/12] add changelog --- x/consensus/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x/consensus/CHANGELOG.md b/x/consensus/CHANGELOG.md index 16de809f2717..23c658a931ca 100644 --- a/x/consensus/CHANGELOG.md +++ b/x/consensus/CHANGELOG.md @@ -30,3 +30,5 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog ## [Unreleased] + +* [#20615](https://github.com/cosmos/cosmos-sdk/pull/20615) Add consensus messages to add cometinfo to consensus modules From 6317d6f39a8ac929d68a06151512774b8c954657 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Thu, 13 Jun 2024 14:32:11 +0200 Subject: [PATCH 10/12] remove extra --- cosmossdk.io/server/v2/streaming/grpc.pb.go | 2414 ----------------- .../store/snapshots/types/snapshot.pb.go | 2008 -------------- cosmossdk.io/store/streaming/abci/grpc.pb.go | 1050 ------- cosmossdk.io/store/types/commit_info.pb.go | 864 ------ cosmossdk.io/store/types/listening.pb.go | 785 ------ 5 files changed, 7121 deletions(-) delete mode 100644 cosmossdk.io/server/v2/streaming/grpc.pb.go delete mode 100644 cosmossdk.io/store/snapshots/types/snapshot.pb.go delete mode 100644 cosmossdk.io/store/streaming/abci/grpc.pb.go delete mode 100644 cosmossdk.io/store/types/commit_info.pb.go delete mode 100644 cosmossdk.io/store/types/listening.pb.go diff --git a/cosmossdk.io/server/v2/streaming/grpc.pb.go b/cosmossdk.io/server/v2/streaming/grpc.pb.go deleted file mode 100644 index 4d2d15149c89..000000000000 --- a/cosmossdk.io/server/v2/streaming/grpc.pb.go +++ /dev/null @@ -1,2414 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/streaming/v1/grpc.proto - -package streaming - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ListenDeliverBlockRequest is the request type for the ListenDeliverBlock RPC method -type ListenDeliverBlockRequest struct { - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` - Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` - TxResults []*ExecTxResult `protobuf:"bytes,4,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` -} - -func (m *ListenDeliverBlockRequest) Reset() { *m = ListenDeliverBlockRequest{} } -func (m *ListenDeliverBlockRequest) String() string { return proto.CompactTextString(m) } -func (*ListenDeliverBlockRequest) ProtoMessage() {} -func (*ListenDeliverBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{0} -} -func (m *ListenDeliverBlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenDeliverBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenDeliverBlockRequest.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 *ListenDeliverBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenDeliverBlockRequest.Merge(m, src) -} -func (m *ListenDeliverBlockRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenDeliverBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenDeliverBlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenDeliverBlockRequest proto.InternalMessageInfo - -func (m *ListenDeliverBlockRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ListenDeliverBlockRequest) GetTxs() [][]byte { - if m != nil { - return m.Txs - } - return nil -} - -func (m *ListenDeliverBlockRequest) GetEvents() []*Event { - if m != nil { - return m.Events - } - return nil -} - -func (m *ListenDeliverBlockRequest) GetTxResults() []*ExecTxResult { - if m != nil { - return m.TxResults - } - return nil -} - -// ListenDeliverBlockResponse is the response type for the ListenDeliverBlock RPC method -type ListenDeliverBlockResponse struct { -} - -func (m *ListenDeliverBlockResponse) Reset() { *m = ListenDeliverBlockResponse{} } -func (m *ListenDeliverBlockResponse) String() string { return proto.CompactTextString(m) } -func (*ListenDeliverBlockResponse) ProtoMessage() {} -func (*ListenDeliverBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{1} -} -func (m *ListenDeliverBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenDeliverBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenDeliverBlockResponse.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 *ListenDeliverBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenDeliverBlockResponse.Merge(m, src) -} -func (m *ListenDeliverBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenDeliverBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenDeliverBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenDeliverBlockResponse proto.InternalMessageInfo - -// ListenStateChangesRequest is the request type for the ListenStateChanges RPC method -type ListenStateChangesRequest struct { - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - ChangeSet []*StoreKVPair `protobuf:"bytes,2,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` - AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` -} - -func (m *ListenStateChangesRequest) Reset() { *m = ListenStateChangesRequest{} } -func (m *ListenStateChangesRequest) String() string { return proto.CompactTextString(m) } -func (*ListenStateChangesRequest) ProtoMessage() {} -func (*ListenStateChangesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{2} -} -func (m *ListenStateChangesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenStateChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenStateChangesRequest.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 *ListenStateChangesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenStateChangesRequest.Merge(m, src) -} -func (m *ListenStateChangesRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenStateChangesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenStateChangesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenStateChangesRequest proto.InternalMessageInfo - -func (m *ListenStateChangesRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ListenStateChangesRequest) GetChangeSet() []*StoreKVPair { - if m != nil { - return m.ChangeSet - } - return nil -} - -func (m *ListenStateChangesRequest) GetAppHash() []byte { - if m != nil { - return m.AppHash - } - return nil -} - -// ListenStateChangesResponse is the response type for the ListenStateChanges RPC method -type ListenStateChangesResponse struct { -} - -func (m *ListenStateChangesResponse) Reset() { *m = ListenStateChangesResponse{} } -func (m *ListenStateChangesResponse) String() string { return proto.CompactTextString(m) } -func (*ListenStateChangesResponse) ProtoMessage() {} -func (*ListenStateChangesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{3} -} -func (m *ListenStateChangesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenStateChangesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenStateChangesResponse.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 *ListenStateChangesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenStateChangesResponse.Merge(m, src) -} -func (m *ListenStateChangesResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenStateChangesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenStateChangesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenStateChangesResponse proto.InternalMessageInfo - -// StoreKVPair is a single key-value pair, associated with a store. -type StoreKVPair struct { - // address defines the address of the account the state changes are coming from. - // In case of modules you can expect a stringified - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // key defines the key of the address that changed. - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // value defines the value that changed, empty in case of removal. - Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - // delete defines if the key was removed. - Delete bool `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"` -} - -func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } -func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } -func (*StoreKVPair) ProtoMessage() {} -func (*StoreKVPair) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{4} -} -func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreKVPair.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 *StoreKVPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreKVPair.Merge(m, src) -} -func (m *StoreKVPair) XXX_Size() int { - return m.Size() -} -func (m *StoreKVPair) XXX_DiscardUnknown() { - xxx_messageInfo_StoreKVPair.DiscardUnknown(m) -} - -var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo - -func (m *StoreKVPair) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *StoreKVPair) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *StoreKVPair) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *StoreKVPair) GetDelete() bool { - if m != nil { - return m.Delete - } - return false -} - -// Event is a single event, associated with a transaction. -type Event struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Attributes []*EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` -} - -func (m *Event) Reset() { *m = Event{} } -func (m *Event) String() string { return proto.CompactTextString(m) } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{5} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Event.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 *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func (m *Event) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *Event) GetAttributes() []*EventAttribute { - if m != nil { - return m.Attributes - } - return nil -} - -// EventAttribute is a single key-value pair, associated with an event. -type EventAttribute struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *EventAttribute) Reset() { *m = EventAttribute{} } -func (m *EventAttribute) String() string { return proto.CompactTextString(m) } -func (*EventAttribute) ProtoMessage() {} -func (*EventAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{6} -} -func (m *EventAttribute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventAttribute.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 *EventAttribute) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventAttribute.Merge(m, src) -} -func (m *EventAttribute) XXX_Size() int { - return m.Size() -} -func (m *EventAttribute) XXX_DiscardUnknown() { - xxx_messageInfo_EventAttribute.DiscardUnknown(m) -} - -var xxx_messageInfo_EventAttribute proto.InternalMessageInfo - -func (m *EventAttribute) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *EventAttribute) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -// ExecTxResult contains results of executing one individual transaction. -type ExecTxResult struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` - Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` -} - -func (m *ExecTxResult) Reset() { *m = ExecTxResult{} } -func (m *ExecTxResult) String() string { return proto.CompactTextString(m) } -func (*ExecTxResult) ProtoMessage() {} -func (*ExecTxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{7} -} -func (m *ExecTxResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExecTxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExecTxResult.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 *ExecTxResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExecTxResult.Merge(m, src) -} -func (m *ExecTxResult) XXX_Size() int { - return m.Size() -} -func (m *ExecTxResult) XXX_DiscardUnknown() { - xxx_messageInfo_ExecTxResult.DiscardUnknown(m) -} - -var xxx_messageInfo_ExecTxResult proto.InternalMessageInfo - -func (m *ExecTxResult) GetCode() uint32 { - if m != nil { - return m.Code - } - return 0 -} - -func (m *ExecTxResult) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *ExecTxResult) GetLog() string { - if m != nil { - return m.Log - } - return "" -} - -func (m *ExecTxResult) GetInfo() string { - if m != nil { - return m.Info - } - return "" -} - -func (m *ExecTxResult) GetGasWanted() int64 { - if m != nil { - return m.GasWanted - } - return 0 -} - -func (m *ExecTxResult) GetGasUsed() int64 { - if m != nil { - return m.GasUsed - } - return 0 -} - -func (m *ExecTxResult) GetEvents() []*Event { - if m != nil { - return m.Events - } - return nil -} - -func (m *ExecTxResult) GetCodespace() string { - if m != nil { - return m.Codespace - } - return "" -} - -func init() { - proto.RegisterType((*ListenDeliverBlockRequest)(nil), "cosmos.streaming.v1.ListenDeliverBlockRequest") - proto.RegisterType((*ListenDeliverBlockResponse)(nil), "cosmos.streaming.v1.ListenDeliverBlockResponse") - proto.RegisterType((*ListenStateChangesRequest)(nil), "cosmos.streaming.v1.ListenStateChangesRequest") - proto.RegisterType((*ListenStateChangesResponse)(nil), "cosmos.streaming.v1.ListenStateChangesResponse") - proto.RegisterType((*StoreKVPair)(nil), "cosmos.streaming.v1.StoreKVPair") - proto.RegisterType((*Event)(nil), "cosmos.streaming.v1.Event") - proto.RegisterType((*EventAttribute)(nil), "cosmos.streaming.v1.EventAttribute") - proto.RegisterType((*ExecTxResult)(nil), "cosmos.streaming.v1.ExecTxResult") -} - -func init() { proto.RegisterFile("cosmos/streaming/v1/grpc.proto", fileDescriptor_3fc151d30622bb2a) } - -var fileDescriptor_3fc151d30622bb2a = []byte{ - // 599 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xae, 0x9b, 0x36, 0xa9, 0x27, 0xe1, 0x47, 0x0b, 0x42, 0x6e, 0x55, 0x2c, 0x37, 0x5c, 0x72, - 0x72, 0xd4, 0x70, 0x41, 0x5c, 0x80, 0x16, 0xa4, 0x4a, 0x70, 0x40, 0x1b, 0x7e, 0x24, 0x2e, 0x61, - 0x6b, 0x0f, 0x8e, 0x55, 0xd7, 0x36, 0x3b, 0x6b, 0x93, 0xbe, 0x05, 0x67, 0x1e, 0x08, 0x71, 0xec, - 0x91, 0x23, 0x6a, 0x2f, 0xbc, 0x05, 0x68, 0xd7, 0x6e, 0x93, 0x0a, 0xb7, 0x2a, 0xb7, 0x6f, 0x7e, - 0xbf, 0x6f, 0x3c, 0xe3, 0x05, 0x37, 0xc8, 0xe8, 0x30, 0xa3, 0x21, 0x29, 0x89, 0xe2, 0x30, 0x4e, - 0xa3, 0x61, 0xb9, 0x3d, 0x8c, 0x64, 0x1e, 0xf8, 0xb9, 0xcc, 0x54, 0xc6, 0xee, 0x54, 0x71, 0xff, - 0x3c, 0xee, 0x97, 0xdb, 0xfd, 0xef, 0x16, 0xac, 0xbf, 0x8a, 0x49, 0x61, 0xfa, 0x1c, 0x93, 0xb8, - 0x44, 0xb9, 0x93, 0x64, 0xc1, 0x01, 0xc7, 0xcf, 0x05, 0x92, 0x62, 0x5b, 0xd0, 0xdb, 0xd7, 0xf6, - 0x64, 0x8a, 0x71, 0x34, 0x55, 0x8e, 0xe5, 0x59, 0x83, 0x16, 0xef, 0x1a, 0xdf, 0x9e, 0x71, 0xb1, - 0xdb, 0xd0, 0x52, 0x33, 0x72, 0x96, 0xbd, 0xd6, 0xa0, 0xc7, 0x35, 0x64, 0x23, 0x68, 0x63, 0x89, - 0xa9, 0x22, 0xa7, 0xe5, 0xb5, 0x06, 0xdd, 0xd1, 0x86, 0xdf, 0x40, 0xec, 0xbf, 0xd0, 0x29, 0xbc, - 0xce, 0x64, 0x4f, 0x01, 0xd4, 0x6c, 0x22, 0x91, 0x8a, 0x44, 0x91, 0xb3, 0x62, 0xea, 0xb6, 0x9a, - 0xeb, 0x66, 0x18, 0xbc, 0x99, 0x71, 0x93, 0xc9, 0x6d, 0x55, 0x23, 0xea, 0x6f, 0xc2, 0x46, 0xd3, - 0x1c, 0x94, 0x67, 0x29, 0x61, 0xff, 0xdb, 0xf9, 0x98, 0x63, 0x25, 0x14, 0xee, 0x4e, 0x45, 0x1a, - 0x21, 0xfd, 0xc7, 0x98, 0x4f, 0x00, 0x02, 0x53, 0x34, 0x21, 0x54, 0x66, 0xda, 0xee, 0xc8, 0x6b, - 0x14, 0x38, 0x56, 0x99, 0xc4, 0x97, 0xef, 0x5e, 0x8b, 0x58, 0x72, 0xbb, 0xaa, 0x19, 0xa3, 0x62, - 0xeb, 0xb0, 0x26, 0xf2, 0x7c, 0x32, 0x15, 0x34, 0x75, 0x5a, 0x9e, 0x35, 0xe8, 0xf1, 0x8e, 0xc8, - 0xf3, 0x3d, 0x41, 0xd3, 0xb9, 0xf4, 0x8b, 0xda, 0x6a, 0xe9, 0x11, 0x74, 0x17, 0x5a, 0x32, 0x07, - 0x3a, 0x22, 0x0c, 0x25, 0x12, 0x19, 0x99, 0xba, 0x4d, 0x65, 0xea, 0x4d, 0x1c, 0xe0, 0x91, 0xb3, - 0x6c, 0xbc, 0x1a, 0xb2, 0xbb, 0xb0, 0x5a, 0x8a, 0xa4, 0xc0, 0x9a, 0xb0, 0x32, 0xd8, 0x3d, 0x68, - 0x87, 0x98, 0xa0, 0x42, 0x67, 0xc5, 0xb3, 0x06, 0x6b, 0xbc, 0xb6, 0xfa, 0x1f, 0x61, 0xd5, 0x2c, - 0x85, 0x31, 0x58, 0x51, 0x47, 0x39, 0x9a, 0xfe, 0x36, 0x37, 0x98, 0xed, 0x02, 0x08, 0xa5, 0x64, - 0xbc, 0x5f, 0x28, 0xa4, 0x7a, 0xfe, 0x07, 0x97, 0x2f, 0xf6, 0xd9, 0x59, 0x2e, 0x5f, 0x28, 0xeb, - 0x3f, 0x82, 0x9b, 0x17, 0xa3, 0x67, 0x9a, 0x2b, 0xa6, 0x8b, 0x9a, 0x97, 0x8d, 0xaf, 0x32, 0xfa, - 0xbf, 0x2d, 0xe8, 0x2d, 0x6e, 0x5e, 0x6b, 0x0c, 0xb2, 0xb0, 0xd2, 0x78, 0x83, 0x1b, 0xac, 0x7d, - 0xa1, 0x50, 0xa2, 0xfe, 0x02, 0x06, 0x6b, 0x82, 0x24, 0x8b, 0xcc, 0x07, 0xb0, 0xb9, 0x86, 0x3a, - 0x2b, 0x4e, 0x3f, 0x65, 0x66, 0x78, 0x9b, 0x1b, 0xcc, 0xee, 0x03, 0x44, 0x82, 0x26, 0x5f, 0x44, - 0xaa, 0x30, 0x74, 0x56, 0xcd, 0xfa, 0xed, 0x48, 0xd0, 0x7b, 0xe3, 0xd0, 0xbb, 0xd3, 0xe1, 0x82, - 0x30, 0x74, 0xda, 0x26, 0xd8, 0x89, 0x04, 0xbd, 0x25, 0x0c, 0x17, 0x8e, 0xbd, 0x73, 0xed, 0x63, - 0xdf, 0x04, 0x5b, 0xeb, 0xa5, 0x5c, 0x04, 0xe8, 0xac, 0x19, 0x19, 0x73, 0xc7, 0xe8, 0x8f, 0x05, - 0xb7, 0xaa, 0x73, 0x40, 0x39, 0x46, 0x59, 0xc6, 0x01, 0xb2, 0x02, 0xd8, 0xbf, 0xc7, 0xcd, 0xfc, - 0x46, 0xae, 0x4b, 0xff, 0xe6, 0x8d, 0xe1, 0xb5, 0xf3, 0xab, 0xd3, 0x9b, 0xd3, 0x2e, 0x1e, 0xe6, - 0x95, 0xb4, 0x0d, 0x7f, 0xd7, 0x95, 0xb4, 0x4d, 0x17, 0xbf, 0xf3, 0xf8, 0xc7, 0x89, 0x6b, 0x1d, - 0x9f, 0xb8, 0xd6, 0xaf, 0x13, 0xd7, 0xfa, 0x7a, 0xea, 0x2e, 0x1d, 0x9f, 0xba, 0x4b, 0x3f, 0x4f, - 0xdd, 0xa5, 0x0f, 0x5e, 0xd5, 0x89, 0xc2, 0x03, 0x3f, 0xce, 0x86, 0x84, 0xb2, 0x44, 0x39, 0x2c, - 0x47, 0xf3, 0x27, 0x6f, 0xbf, 0x6d, 0xde, 0xba, 0x87, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3b, - 0xbd, 0x03, 0xda, 0x0d, 0x05, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ListenerServiceClient is the client API for ListenerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ListenerServiceClient interface { - // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock - ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) - // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges - ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) -} - -type listenerServiceClient struct { - cc grpc1.ClientConn -} - -func NewListenerServiceClient(cc grpc1.ClientConn) ListenerServiceClient { - return &listenerServiceClient{cc} -} - -func (c *listenerServiceClient) ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) { - out := new(ListenDeliverBlockResponse) - err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *listenerServiceClient) ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) { - out := new(ListenStateChangesResponse) - err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenStateChanges", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ListenerServiceServer is the server API for ListenerService service. -type ListenerServiceServer interface { - // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock - ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) - // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges - ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) -} - -// UnimplementedListenerServiceServer can be embedded to have forward compatible implementations. -type UnimplementedListenerServiceServer struct { -} - -func (*UnimplementedListenerServiceServer) ListenDeliverBlock(ctx context.Context, req *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenDeliverBlock not implemented") -} -func (*UnimplementedListenerServiceServer) ListenStateChanges(ctx context.Context, req *ListenStateChangesRequest) (*ListenStateChangesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenStateChanges not implemented") -} - -func RegisterListenerServiceServer(s grpc1.Server, srv ListenerServiceServer) { - s.RegisterService(&_ListenerService_serviceDesc, srv) -} - -func _ListenerService_ListenDeliverBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenDeliverBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, req.(*ListenDeliverBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ListenerService_ListenStateChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenStateChangesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ListenerServiceServer).ListenStateChanges(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.streaming.v1.ListenerService/ListenStateChanges", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ListenerServiceServer).ListenStateChanges(ctx, req.(*ListenStateChangesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ListenerService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.streaming.v1.ListenerService", - HandlerType: (*ListenerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListenDeliverBlock", - Handler: _ListenerService_ListenDeliverBlock_Handler, - }, - { - MethodName: "ListenStateChanges", - Handler: _ListenerService_ListenStateChanges_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/streaming/v1/grpc.proto", -} - -func (m *ListenDeliverBlockRequest) 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 *ListenDeliverBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenDeliverBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TxResults) > 0 { - for iNdEx := len(m.TxResults) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TxResults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Txs) > 0 { - for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Txs[iNdEx]) - copy(dAtA[i:], m.Txs[iNdEx]) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Txs[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.BlockHeight != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListenDeliverBlockResponse) 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 *ListenDeliverBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenDeliverBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ListenStateChangesRequest) 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 *ListenStateChangesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenStateChangesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AppHash) > 0 { - i -= len(m.AppHash) - copy(dAtA[i:], m.AppHash) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.AppHash))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChangeSet) > 0 { - for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.BlockHeight != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListenStateChangesResponse) 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 *ListenStateChangesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenStateChangesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *StoreKVPair) 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 *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Delete { - i-- - if m.Delete { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Event) 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 *Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventAttribute) 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 *EventAttribute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExecTxResult) 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 *ExecTxResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExecTxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Codespace) > 0 { - i -= len(m.Codespace) - copy(dAtA[i:], m.Codespace) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Codespace))) - i-- - dAtA[i] = 0x42 - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.GasUsed != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.GasUsed)) - i-- - dAtA[i] = 0x30 - } - if m.GasWanted != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.GasWanted)) - i-- - dAtA[i] = 0x28 - } - if len(m.Info) > 0 { - i -= len(m.Info) - copy(dAtA[i:], m.Info) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Info))) - i-- - dAtA[i] = 0x22 - } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0x1a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { - offset -= sovGrpc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ListenDeliverBlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovGrpc(uint64(m.BlockHeight)) - } - if len(m.Txs) > 0 { - for _, b := range m.Txs { - l = len(b) - n += 1 + l + sovGrpc(uint64(l)) - } - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - if len(m.TxResults) > 0 { - for _, e := range m.TxResults { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - return n -} - -func (m *ListenDeliverBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ListenStateChangesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovGrpc(uint64(m.BlockHeight)) - } - if len(m.ChangeSet) > 0 { - for _, e := range m.ChangeSet { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - l = len(m.AppHash) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func (m *ListenStateChangesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *StoreKVPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - if m.Delete { - n += 2 - } - return n -} - -func (m *Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - return n -} - -func (m *EventAttribute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func (m *ExecTxResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovGrpc(uint64(m.Code)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Log) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Info) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - if m.GasWanted != 0 { - n += 1 + sovGrpc(uint64(m.GasWanted)) - } - if m.GasUsed != 0 { - n += 1 + sovGrpc(uint64(m.GasUsed)) - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - l = len(m.Codespace) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func sovGrpc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGrpc(x uint64) (n int) { - return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ListenDeliverBlockRequest) 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 ErrIntOverflowGrpc - } - 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: ListenDeliverBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenDeliverBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) - copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxResults", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TxResults = append(m.TxResults, &ExecTxResult{}) - if err := m.TxResults[len(m.TxResults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenDeliverBlockResponse) 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 ErrIntOverflowGrpc - } - 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: ListenDeliverBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenDeliverBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenStateChangesRequest) 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 ErrIntOverflowGrpc - } - 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: ListenStateChangesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenStateChangesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangeSet = append(m.ChangeSet, &StoreKVPair{}) - if err := m.ChangeSet[len(m.ChangeSet)-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 AppHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) - if m.AppHash == nil { - m.AppHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenStateChangesResponse) 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 ErrIntOverflowGrpc - } - 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: ListenStateChangesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenStateChangesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreKVPair) 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 ErrIntOverflowGrpc - } - 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: StoreKVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Delete = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Event) 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 ErrIntOverflowGrpc - } - 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: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, &EventAttribute{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventAttribute) 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 ErrIntOverflowGrpc - } - 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: EventAttribute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExecTxResult) 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 ErrIntOverflowGrpc - } - 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: ExecTxResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExecTxResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) - } - m.GasWanted = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasWanted |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - m.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasUsed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGrpc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGrpc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGrpc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGrpc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/snapshots/types/snapshot.pb.go b/cosmossdk.io/store/snapshots/types/snapshot.pb.go deleted file mode 100644 index e81660c4596e..000000000000 --- a/cosmossdk.io/store/snapshots/types/snapshot.pb.go +++ /dev/null @@ -1,2008 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/snapshots/v1/snapshot.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Snapshot contains Tendermint state sync snapshot info. -type Snapshot struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` - Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"` - Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` - Metadata Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata"` -} - -func (m *Snapshot) Reset() { *m = Snapshot{} } -func (m *Snapshot) String() string { return proto.CompactTextString(m) } -func (*Snapshot) ProtoMessage() {} -func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{0} -} -func (m *Snapshot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Snapshot.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 *Snapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_Snapshot.Merge(m, src) -} -func (m *Snapshot) XXX_Size() int { - return m.Size() -} -func (m *Snapshot) XXX_DiscardUnknown() { - xxx_messageInfo_Snapshot.DiscardUnknown(m) -} - -var xxx_messageInfo_Snapshot proto.InternalMessageInfo - -func (m *Snapshot) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *Snapshot) GetFormat() uint32 { - if m != nil { - return m.Format - } - return 0 -} - -func (m *Snapshot) GetChunks() uint32 { - if m != nil { - return m.Chunks - } - return 0 -} - -func (m *Snapshot) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *Snapshot) GetMetadata() Metadata { - if m != nil { - return m.Metadata - } - return Metadata{} -} - -// Metadata contains SDK-specific snapshot metadata. -type Metadata struct { - ChunkHashes [][]byte `protobuf:"bytes,1,rep,name=chunk_hashes,json=chunkHashes,proto3" json:"chunk_hashes,omitempty"` -} - -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{1} -} -func (m *Metadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metadata.Merge(m, src) -} -func (m *Metadata) XXX_Size() int { - return m.Size() -} -func (m *Metadata) XXX_DiscardUnknown() { - xxx_messageInfo_Metadata.DiscardUnknown(m) -} - -var xxx_messageInfo_Metadata proto.InternalMessageInfo - -func (m *Metadata) GetChunkHashes() [][]byte { - if m != nil { - return m.ChunkHashes - } - return nil -} - -// SnapshotItem is an item contained in a rootmulti.Store snapshot. -type SnapshotItem struct { - // item is the specific type of snapshot item. - // - // Types that are valid to be assigned to Item: - // - // *SnapshotItem_Store - // *SnapshotItem_IAVL - // *SnapshotItem_Extension - // *SnapshotItem_ExtensionPayload - Item isSnapshotItem_Item `protobuf_oneof:"item"` -} - -func (m *SnapshotItem) Reset() { *m = SnapshotItem{} } -func (m *SnapshotItem) String() string { return proto.CompactTextString(m) } -func (*SnapshotItem) ProtoMessage() {} -func (*SnapshotItem) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{2} -} -func (m *SnapshotItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotItem.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 *SnapshotItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotItem.Merge(m, src) -} -func (m *SnapshotItem) XXX_Size() int { - return m.Size() -} -func (m *SnapshotItem) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotItem proto.InternalMessageInfo - -type isSnapshotItem_Item interface { - isSnapshotItem_Item() - MarshalTo([]byte) (int, error) - Size() int -} - -type SnapshotItem_Store struct { - Store *SnapshotStoreItem `protobuf:"bytes,1,opt,name=store,proto3,oneof" json:"store,omitempty"` -} -type SnapshotItem_IAVL struct { - IAVL *SnapshotIAVLItem `protobuf:"bytes,2,opt,name=iavl,proto3,oneof" json:"iavl,omitempty"` -} -type SnapshotItem_Extension struct { - Extension *SnapshotExtensionMeta `protobuf:"bytes,3,opt,name=extension,proto3,oneof" json:"extension,omitempty"` -} -type SnapshotItem_ExtensionPayload struct { - ExtensionPayload *SnapshotExtensionPayload `protobuf:"bytes,4,opt,name=extension_payload,json=extensionPayload,proto3,oneof" json:"extension_payload,omitempty"` -} - -func (*SnapshotItem_Store) isSnapshotItem_Item() {} -func (*SnapshotItem_IAVL) isSnapshotItem_Item() {} -func (*SnapshotItem_Extension) isSnapshotItem_Item() {} -func (*SnapshotItem_ExtensionPayload) isSnapshotItem_Item() {} - -func (m *SnapshotItem) GetItem() isSnapshotItem_Item { - if m != nil { - return m.Item - } - return nil -} - -func (m *SnapshotItem) GetStore() *SnapshotStoreItem { - if x, ok := m.GetItem().(*SnapshotItem_Store); ok { - return x.Store - } - return nil -} - -func (m *SnapshotItem) GetIAVL() *SnapshotIAVLItem { - if x, ok := m.GetItem().(*SnapshotItem_IAVL); ok { - return x.IAVL - } - return nil -} - -func (m *SnapshotItem) GetExtension() *SnapshotExtensionMeta { - if x, ok := m.GetItem().(*SnapshotItem_Extension); ok { - return x.Extension - } - return nil -} - -func (m *SnapshotItem) GetExtensionPayload() *SnapshotExtensionPayload { - if x, ok := m.GetItem().(*SnapshotItem_ExtensionPayload); ok { - return x.ExtensionPayload - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SnapshotItem) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*SnapshotItem_Store)(nil), - (*SnapshotItem_IAVL)(nil), - (*SnapshotItem_Extension)(nil), - (*SnapshotItem_ExtensionPayload)(nil), - } -} - -// SnapshotStoreItem contains metadata about a snapshotted store. -type SnapshotStoreItem struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (m *SnapshotStoreItem) Reset() { *m = SnapshotStoreItem{} } -func (m *SnapshotStoreItem) String() string { return proto.CompactTextString(m) } -func (*SnapshotStoreItem) ProtoMessage() {} -func (*SnapshotStoreItem) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{3} -} -func (m *SnapshotStoreItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotStoreItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotStoreItem.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 *SnapshotStoreItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotStoreItem.Merge(m, src) -} -func (m *SnapshotStoreItem) XXX_Size() int { - return m.Size() -} -func (m *SnapshotStoreItem) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotStoreItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotStoreItem proto.InternalMessageInfo - -func (m *SnapshotStoreItem) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -// SnapshotIAVLItem is an exported IAVL node. -type SnapshotIAVLItem struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // version is block height - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - // height is depth of the tree. - Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *SnapshotIAVLItem) Reset() { *m = SnapshotIAVLItem{} } -func (m *SnapshotIAVLItem) String() string { return proto.CompactTextString(m) } -func (*SnapshotIAVLItem) ProtoMessage() {} -func (*SnapshotIAVLItem) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{4} -} -func (m *SnapshotIAVLItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotIAVLItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotIAVLItem.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 *SnapshotIAVLItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotIAVLItem.Merge(m, src) -} -func (m *SnapshotIAVLItem) XXX_Size() int { - return m.Size() -} -func (m *SnapshotIAVLItem) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotIAVLItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotIAVLItem proto.InternalMessageInfo - -func (m *SnapshotIAVLItem) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *SnapshotIAVLItem) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *SnapshotIAVLItem) GetVersion() int64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *SnapshotIAVLItem) GetHeight() int32 { - if m != nil { - return m.Height - } - return 0 -} - -// SnapshotExtensionMeta contains metadata about an external snapshotter. -type SnapshotExtensionMeta struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` -} - -func (m *SnapshotExtensionMeta) Reset() { *m = SnapshotExtensionMeta{} } -func (m *SnapshotExtensionMeta) String() string { return proto.CompactTextString(m) } -func (*SnapshotExtensionMeta) ProtoMessage() {} -func (*SnapshotExtensionMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{5} -} -func (m *SnapshotExtensionMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotExtensionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotExtensionMeta.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 *SnapshotExtensionMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotExtensionMeta.Merge(m, src) -} -func (m *SnapshotExtensionMeta) XXX_Size() int { - return m.Size() -} -func (m *SnapshotExtensionMeta) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotExtensionMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotExtensionMeta proto.InternalMessageInfo - -func (m *SnapshotExtensionMeta) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *SnapshotExtensionMeta) GetFormat() uint32 { - if m != nil { - return m.Format - } - return 0 -} - -// SnapshotExtensionPayload contains payloads of an external snapshotter. -type SnapshotExtensionPayload struct { - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` -} - -func (m *SnapshotExtensionPayload) Reset() { *m = SnapshotExtensionPayload{} } -func (m *SnapshotExtensionPayload) String() string { return proto.CompactTextString(m) } -func (*SnapshotExtensionPayload) ProtoMessage() {} -func (*SnapshotExtensionPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{6} -} -func (m *SnapshotExtensionPayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotExtensionPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotExtensionPayload.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 *SnapshotExtensionPayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotExtensionPayload.Merge(m, src) -} -func (m *SnapshotExtensionPayload) XXX_Size() int { - return m.Size() -} -func (m *SnapshotExtensionPayload) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotExtensionPayload.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotExtensionPayload proto.InternalMessageInfo - -func (m *SnapshotExtensionPayload) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -func init() { - proto.RegisterType((*Snapshot)(nil), "cosmos.store.snapshots.v1.Snapshot") - proto.RegisterType((*Metadata)(nil), "cosmos.store.snapshots.v1.Metadata") - proto.RegisterType((*SnapshotItem)(nil), "cosmos.store.snapshots.v1.SnapshotItem") - proto.RegisterType((*SnapshotStoreItem)(nil), "cosmos.store.snapshots.v1.SnapshotStoreItem") - proto.RegisterType((*SnapshotIAVLItem)(nil), "cosmos.store.snapshots.v1.SnapshotIAVLItem") - proto.RegisterType((*SnapshotExtensionMeta)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionMeta") - proto.RegisterType((*SnapshotExtensionPayload)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionPayload") -} - -func init() { - proto.RegisterFile("cosmos/store/snapshots/v1/snapshot.proto", fileDescriptor_3d5cca1aa5b69183) -} - -var fileDescriptor_3d5cca1aa5b69183 = []byte{ - // 538 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x6f, 0xd3, 0x3c, - 0x18, 0x8e, 0xd7, 0xb4, 0x5f, 0xf7, 0x26, 0x9f, 0xe8, 0xcc, 0x40, 0x61, 0x87, 0x2c, 0x84, 0x4b, - 0x24, 0x68, 0xba, 0x75, 0x88, 0x03, 0xda, 0x85, 0x8a, 0x49, 0xad, 0x00, 0x69, 0xf2, 0x24, 0x84, - 0xb8, 0x54, 0xde, 0x6a, 0x9a, 0xaa, 0x4d, 0x5d, 0xd5, 0x5e, 0x45, 0x8f, 0xfc, 0x03, 0xfe, 0x08, - 0x37, 0x7e, 0xc4, 0x8e, 0x13, 0x27, 0x4e, 0x13, 0x6a, 0xff, 0x02, 0x3f, 0x00, 0xd9, 0x4e, 0x0a, - 0xda, 0x52, 0x34, 0x6e, 0xef, 0xf3, 0xfa, 0x79, 0x1e, 0xfb, 0x7d, 0xec, 0x04, 0xa2, 0x33, 0x2e, - 0x52, 0x2e, 0x1a, 0x42, 0xf2, 0x29, 0x6b, 0x88, 0x31, 0x9d, 0x88, 0x84, 0x4b, 0xd1, 0x98, 0xed, - 0xaf, 0x40, 0x3c, 0x99, 0x72, 0xc9, 0xf1, 0x03, 0xc3, 0x8c, 0x35, 0x33, 0x5e, 0x31, 0xe3, 0xd9, - 0xfe, 0xce, 0x76, 0x9f, 0xf7, 0xb9, 0x66, 0x35, 0x54, 0x65, 0x04, 0x3b, 0x99, 0xa0, 0x6b, 0x16, - 0x32, 0xb5, 0x06, 0xe1, 0x17, 0x04, 0xd5, 0x93, 0xcc, 0x01, 0xdf, 0x87, 0x4a, 0xc2, 0x06, 0xfd, - 0x44, 0x7a, 0x28, 0x40, 0x91, 0x4d, 0x32, 0xa4, 0xfa, 0x1f, 0xf8, 0x34, 0xa5, 0xd2, 0xdb, 0x08, - 0x50, 0xf4, 0x3f, 0xc9, 0x90, 0xea, 0x9f, 0x25, 0xe7, 0xe3, 0xa1, 0xf0, 0x4a, 0xa6, 0x6f, 0x10, - 0xc6, 0x60, 0x27, 0x54, 0x24, 0x9e, 0x1d, 0xa0, 0xc8, 0x25, 0xba, 0xc6, 0x47, 0x50, 0x4d, 0x99, - 0xa4, 0x3d, 0x2a, 0xa9, 0x57, 0x0e, 0x50, 0xe4, 0x34, 0x1f, 0xc5, 0x6b, 0xe7, 0x88, 0xdf, 0x64, - 0xd4, 0x96, 0x7d, 0x71, 0xb5, 0x6b, 0x91, 0x95, 0x34, 0xac, 0x43, 0x35, 0x5f, 0xc3, 0x0f, 0xc1, - 0xd5, 0x1b, 0x76, 0xd5, 0x06, 0x4c, 0x78, 0x28, 0x28, 0x45, 0x2e, 0x71, 0x74, 0xaf, 0xad, 0x5b, - 0xe1, 0xcf, 0x0d, 0x70, 0xf3, 0xf1, 0x3a, 0x92, 0xa5, 0xf8, 0x25, 0x94, 0xf5, 0x76, 0x7a, 0x42, - 0xa7, 0xf9, 0xe4, 0x2f, 0x67, 0xc8, 0x75, 0x27, 0x6a, 0x49, 0x89, 0xdb, 0x16, 0x31, 0x62, 0xfc, - 0x0a, 0xec, 0x01, 0x9d, 0x8d, 0x74, 0x1c, 0x4e, 0xf3, 0xf1, 0x2d, 0x4c, 0x3a, 0x2f, 0xde, 0xbe, - 0x56, 0x1e, 0xad, 0xea, 0xe2, 0x6a, 0xd7, 0x56, 0xa8, 0x6d, 0x11, 0x6d, 0x82, 0x8f, 0x61, 0x93, - 0x7d, 0x94, 0x6c, 0x2c, 0x06, 0x7c, 0xac, 0x83, 0x74, 0x9a, 0x7b, 0xb7, 0x70, 0x3c, 0xca, 0x35, - 0x2a, 0x8f, 0xb6, 0x45, 0x7e, 0x9b, 0xe0, 0x53, 0xd8, 0x5a, 0x81, 0xee, 0x84, 0xce, 0x47, 0x9c, - 0xf6, 0xf4, 0x65, 0x38, 0xcd, 0x83, 0x7f, 0x71, 0x3e, 0x36, 0xd2, 0xb6, 0x45, 0x6a, 0xec, 0x5a, - 0xef, 0xf9, 0xdd, 0x6f, 0x5f, 0xeb, 0x77, 0x8c, 0x57, 0x5d, 0xf4, 0x86, 0xc1, 0x5e, 0xfc, 0xf4, - 0x59, 0xab, 0x02, 0xf6, 0x40, 0xb2, 0x34, 0x3c, 0x84, 0xad, 0x1b, 0xe9, 0xa9, 0x57, 0x31, 0xa6, - 0xa9, 0x49, 0x7e, 0x93, 0xe8, 0xba, 0xd0, 0x25, 0xfc, 0x84, 0xa0, 0x76, 0x3d, 0x37, 0x5c, 0x83, - 0xd2, 0x90, 0xcd, 0xb5, 0xd8, 0x25, 0xaa, 0xc4, 0xdb, 0x50, 0x9e, 0xd1, 0xd1, 0x39, 0xd3, 0xb7, - 0xe0, 0x12, 0x03, 0xb0, 0x07, 0xff, 0xcd, 0xd8, 0x74, 0x95, 0x65, 0x89, 0xe4, 0xf0, 0x8f, 0xd7, - 0xad, 0xa2, 0x28, 0xe7, 0xaf, 0xbb, 0xf8, 0x0c, 0xef, 0xe0, 0x5e, 0x61, 0xd0, 0x45, 0x53, 0xac, - 0xfb, 0x3e, 0x8a, 0x9d, 0x3b, 0xe0, 0xad, 0x0b, 0x5a, 0x1d, 0x3e, 0xbf, 0x2e, 0x33, 0x68, 0x0e, - 0x8b, 0xe3, 0x3e, 0xbc, 0x58, 0xf8, 0xe8, 0x72, 0xe1, 0xa3, 0x1f, 0x0b, 0x1f, 0x7d, 0x5e, 0xfa, - 0xd6, 0xe5, 0xd2, 0xb7, 0xbe, 0x2f, 0x7d, 0xeb, 0x7d, 0x68, 0xa8, 0xa2, 0x37, 0x8c, 0x07, 0xfc, - 0xc6, 0x2f, 0x45, 0xce, 0x27, 0x4c, 0x9c, 0x56, 0xf4, 0x1f, 0xe0, 0xe0, 0x57, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x57, 0xe2, 0xd5, 0x36, 0x79, 0x04, 0x00, 0x00, -} - -func (m *Snapshot) 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 *Snapshot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x22 - } - if m.Chunks != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Chunks)) - i-- - dAtA[i] = 0x18 - } - if m.Format != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Metadata) 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 *Metadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChunkHashes) > 0 { - for iNdEx := len(m.ChunkHashes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ChunkHashes[iNdEx]) - copy(dAtA[i:], m.ChunkHashes[iNdEx]) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.ChunkHashes[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SnapshotItem) 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 *SnapshotItem) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Item != nil { - { - size := m.Item.Size() - i -= size - if _, err := m.Item.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *SnapshotItem_Store) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_Store) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Store != nil { - { - size, err := m.Store.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *SnapshotItem_IAVL) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_IAVL) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.IAVL != nil { - { - size, err := m.IAVL.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *SnapshotItem_Extension) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_Extension) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Extension != nil { - { - size, err := m.Extension.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *SnapshotItem_ExtensionPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_ExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ExtensionPayload != nil { - { - size, err := m.ExtensionPayload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *SnapshotStoreItem) 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 *SnapshotStoreItem) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotStoreItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotIAVLItem) 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 *SnapshotIAVLItem) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotIAVLItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x20 - } - if m.Version != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x18 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotExtensionMeta) 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 *SnapshotExtensionMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotExtensionMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Format != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotExtensionPayload) 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 *SnapshotExtensionPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintSnapshot(dAtA []byte, offset int, v uint64) int { - offset -= sovSnapshot(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Snapshot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovSnapshot(uint64(m.Height)) - } - if m.Format != 0 { - n += 1 + sovSnapshot(uint64(m.Format)) - } - if m.Chunks != 0 { - n += 1 + sovSnapshot(uint64(m.Chunks)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - l = m.Metadata.Size() - n += 1 + l + sovSnapshot(uint64(l)) - return n -} - -func (m *Metadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ChunkHashes) > 0 { - for _, b := range m.ChunkHashes { - l = len(b) - n += 1 + l + sovSnapshot(uint64(l)) - } - } - return n -} - -func (m *SnapshotItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Item != nil { - n += m.Item.Size() - } - return n -} - -func (m *SnapshotItem_Store) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Store != nil { - l = m.Store.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotItem_IAVL) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IAVL != nil { - l = m.IAVL.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotItem_Extension) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Extension != nil { - l = m.Extension.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotItem_ExtensionPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ExtensionPayload != nil { - l = m.ExtensionPayload.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotStoreItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} - -func (m *SnapshotIAVLItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - if m.Version != 0 { - n += 1 + sovSnapshot(uint64(m.Version)) - } - if m.Height != 0 { - n += 1 + sovSnapshot(uint64(m.Height)) - } - return n -} - -func (m *SnapshotExtensionMeta) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - if m.Format != 0 { - n += 1 + sovSnapshot(uint64(m.Format)) - } - return n -} - -func (m *SnapshotExtensionPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} - -func sovSnapshot(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSnapshot(x uint64) (n int) { - return sovSnapshot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Snapshot) 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 ErrIntOverflowSnapshot - } - 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: Snapshot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType) - } - m.Chunks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Chunks |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Metadata) 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 ErrIntOverflowSnapshot - } - 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: Metadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChunkHashes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChunkHashes = append(m.ChunkHashes, make([]byte, postIndex-iNdEx)) - copy(m.ChunkHashes[len(m.ChunkHashes)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotItem) 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 ErrIntOverflowSnapshot - } - 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: SnapshotItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Store", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotStoreItem{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_Store{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IAVL", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotIAVLItem{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_IAVL{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotExtensionMeta{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_Extension{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtensionPayload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotExtensionPayload{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_ExtensionPayload{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotStoreItem) 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 ErrIntOverflowSnapshot - } - 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: SnapshotStoreItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotStoreItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - 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 ErrInvalidLengthSnapshot - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotIAVLItem) 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 ErrIntOverflowSnapshot - } - 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: SnapshotIAVLItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotIAVLItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotExtensionMeta) 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 ErrIntOverflowSnapshot - } - 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: SnapshotExtensionMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotExtensionMeta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - 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 ErrInvalidLengthSnapshot - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotExtensionPayload) 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 ErrIntOverflowSnapshot - } - 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: SnapshotExtensionPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotExtensionPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSnapshot(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSnapshot - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSnapshot - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSnapshot - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSnapshot = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/streaming/abci/grpc.pb.go b/cosmossdk.io/store/streaming/abci/grpc.pb.go deleted file mode 100644 index b9a8e7622c53..000000000000 --- a/cosmossdk.io/store/streaming/abci/grpc.pb.go +++ /dev/null @@ -1,1050 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/streaming/abci/grpc.proto - -package abci - -import ( - context "context" - types "cosmossdk.io/store/types" - fmt "fmt" - v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ListenEndBlockRequest is the request type for the ListenEndBlock RPC method -type ListenFinalizeBlockRequest struct { - Req *v1.FinalizeBlockRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"` - Res *v1.FinalizeBlockResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` -} - -func (m *ListenFinalizeBlockRequest) Reset() { *m = ListenFinalizeBlockRequest{} } -func (m *ListenFinalizeBlockRequest) String() string { return proto.CompactTextString(m) } -func (*ListenFinalizeBlockRequest) ProtoMessage() {} -func (*ListenFinalizeBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{0} -} -func (m *ListenFinalizeBlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenFinalizeBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenFinalizeBlockRequest.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 *ListenFinalizeBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenFinalizeBlockRequest.Merge(m, src) -} -func (m *ListenFinalizeBlockRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenFinalizeBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenFinalizeBlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenFinalizeBlockRequest proto.InternalMessageInfo - -func (m *ListenFinalizeBlockRequest) GetReq() *v1.FinalizeBlockRequest { - if m != nil { - return m.Req - } - return nil -} - -func (m *ListenFinalizeBlockRequest) GetRes() *v1.FinalizeBlockResponse { - if m != nil { - return m.Res - } - return nil -} - -// ListenEndBlockResponse is the response type for the ListenEndBlock RPC method -type ListenFinalizeBlockResponse struct { -} - -func (m *ListenFinalizeBlockResponse) Reset() { *m = ListenFinalizeBlockResponse{} } -func (m *ListenFinalizeBlockResponse) String() string { return proto.CompactTextString(m) } -func (*ListenFinalizeBlockResponse) ProtoMessage() {} -func (*ListenFinalizeBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{1} -} -func (m *ListenFinalizeBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenFinalizeBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenFinalizeBlockResponse.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 *ListenFinalizeBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenFinalizeBlockResponse.Merge(m, src) -} -func (m *ListenFinalizeBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenFinalizeBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenFinalizeBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenFinalizeBlockResponse proto.InternalMessageInfo - -// ListenCommitRequest is the request type for the ListenCommit RPC method -type ListenCommitRequest struct { - // explicitly pass in block height as ResponseCommit does not contain this - // info - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Res *v1.CommitResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` - ChangeSet []*types.StoreKVPair `protobuf:"bytes,3,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` -} - -func (m *ListenCommitRequest) Reset() { *m = ListenCommitRequest{} } -func (m *ListenCommitRequest) String() string { return proto.CompactTextString(m) } -func (*ListenCommitRequest) ProtoMessage() {} -func (*ListenCommitRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{2} -} -func (m *ListenCommitRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenCommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenCommitRequest.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 *ListenCommitRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenCommitRequest.Merge(m, src) -} -func (m *ListenCommitRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenCommitRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenCommitRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenCommitRequest proto.InternalMessageInfo - -func (m *ListenCommitRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ListenCommitRequest) GetRes() *v1.CommitResponse { - if m != nil { - return m.Res - } - return nil -} - -func (m *ListenCommitRequest) GetChangeSet() []*types.StoreKVPair { - if m != nil { - return m.ChangeSet - } - return nil -} - -// ListenCommitResponse is the response type for the ListenCommit RPC method -type ListenCommitResponse struct { -} - -func (m *ListenCommitResponse) Reset() { *m = ListenCommitResponse{} } -func (m *ListenCommitResponse) String() string { return proto.CompactTextString(m) } -func (*ListenCommitResponse) ProtoMessage() {} -func (*ListenCommitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{3} -} -func (m *ListenCommitResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenCommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenCommitResponse.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 *ListenCommitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenCommitResponse.Merge(m, src) -} -func (m *ListenCommitResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenCommitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenCommitResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenCommitResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ListenFinalizeBlockRequest)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockRequest") - proto.RegisterType((*ListenFinalizeBlockResponse)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockResponse") - proto.RegisterType((*ListenCommitRequest)(nil), "cosmos.store.streaming.abci.ListenCommitRequest") - proto.RegisterType((*ListenCommitResponse)(nil), "cosmos.store.streaming.abci.ListenCommitResponse") -} - -func init() { - proto.RegisterFile("cosmos/store/streaming/abci/grpc.proto", fileDescriptor_7b98083eb9315fb6) -} - -var fileDescriptor_7b98083eb9315fb6 = []byte{ - // 414 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x8f, 0xd2, 0x40, - 0x18, 0xc6, 0x29, 0x4d, 0x4c, 0x1c, 0x38, 0x0d, 0xc6, 0x90, 0xa2, 0x0d, 0x34, 0x06, 0x39, 0x4d, - 0x6d, 0x3d, 0x88, 0xf1, 0xa2, 0x90, 0x18, 0x8d, 0x1e, 0x4c, 0x49, 0x3c, 0x78, 0x21, 0x6d, 0x7d, - 0x2d, 0x13, 0x68, 0xa7, 0xcc, 0x8c, 0x4d, 0xf4, 0x13, 0x78, 0x74, 0x0f, 0xfb, 0x35, 0xf6, 0x73, - 0xec, 0x91, 0xe3, 0x1e, 0x37, 0xf0, 0x45, 0x36, 0x9d, 0x59, 0x08, 0xcd, 0xb2, 0x7f, 0x38, 0xf6, - 0x9d, 0xe7, 0xf7, 0xbc, 0x4f, 0xe7, 0x7d, 0x07, 0xf5, 0x63, 0x26, 0x52, 0x26, 0x5c, 0x21, 0x19, - 0x07, 0x57, 0x48, 0x0e, 0x61, 0x4a, 0xb3, 0xc4, 0x0d, 0xa3, 0x98, 0xba, 0x09, 0xcf, 0x63, 0x92, - 0x73, 0x26, 0x19, 0xee, 0x68, 0x1d, 0x51, 0x3a, 0xb2, 0xd3, 0x91, 0x52, 0x67, 0x3d, 0x8b, 0x59, - 0x0a, 0x32, 0xfa, 0x25, 0x35, 0x56, 0x78, 0xae, 0xfc, 0x93, 0x83, 0xd0, 0xa8, 0xf5, 0xa2, 0xd2, - 0xa2, 0xf0, 0x22, 0x90, 0xa1, 0xe7, 0x2e, 0xa8, 0x90, 0x90, 0x95, 0x16, 0x4a, 0xe5, 0x9c, 0x18, - 0xc8, 0xfa, 0xaa, 0x6a, 0x1f, 0x69, 0x16, 0x2e, 0xe8, 0x5f, 0x18, 0x2d, 0x58, 0x3c, 0x0f, 0x60, - 0xf9, 0x1b, 0x84, 0xc4, 0x43, 0x64, 0x72, 0x58, 0xb6, 0x8d, 0xae, 0x31, 0x68, 0xf8, 0x7d, 0xb2, - 0x6d, 0xa8, 0xfa, 0x93, 0xc2, 0x23, 0x87, 0xa0, 0xa0, 0x44, 0xf0, 0xdb, 0x92, 0x14, 0xed, 0xba, - 0x22, 0x5f, 0xde, 0x4b, 0x8a, 0x9c, 0x65, 0x02, 0x4a, 0x54, 0x38, 0xcf, 0x51, 0xe7, 0x60, 0x24, - 0xad, 0x71, 0xce, 0x0c, 0xd4, 0xd2, 0xe7, 0x63, 0x96, 0xa6, 0x54, 0x6e, 0xb3, 0xf6, 0x50, 0x33, - 0x2a, 0x85, 0xd3, 0x19, 0xd0, 0x64, 0x26, 0x55, 0x68, 0x33, 0x68, 0xa8, 0xda, 0x27, 0x55, 0xc2, - 0xfe, 0x7e, 0xa8, 0xee, 0xcd, 0x50, 0x5b, 0xc3, 0xbd, 0x34, 0xf8, 0x3d, 0x42, 0xf1, 0x2c, 0xcc, - 0x12, 0x98, 0x0a, 0x90, 0x6d, 0xb3, 0x6b, 0x0e, 0x1a, 0x7e, 0x8f, 0x54, 0xe6, 0x72, 0x7d, 0xb9, - 0x64, 0x52, 0x7e, 0x7d, 0xf9, 0xfe, 0x2d, 0xa4, 0x3c, 0x78, 0xac, 0xa1, 0x09, 0x48, 0xe7, 0x29, - 0x7a, 0x52, 0xcd, 0xab, 0xed, 0xfd, 0xd3, 0x3a, 0x6a, 0x7d, 0x18, 0x8d, 0x3f, 0xeb, 0x43, 0xe0, - 0x13, 0xe0, 0x05, 0x8d, 0x01, 0xff, 0xdb, 0xfd, 0x60, 0xe5, 0x02, 0xf0, 0x1b, 0x72, 0xc7, 0x36, - 0x90, 0xdb, 0xa7, 0x68, 0x0d, 0x8f, 0x07, 0x75, 0x44, 0x2c, 0x50, 0x73, 0x3f, 0x3a, 0x7e, 0xf5, - 0x00, 0xa7, 0xca, 0x54, 0x2c, 0xef, 0x08, 0x42, 0x37, 0x1d, 0xbd, 0x3b, 0x5f, 0xdb, 0xc6, 0x6a, - 0x6d, 0x1b, 0x97, 0x6b, 0xdb, 0xf8, 0xbf, 0xb1, 0x6b, 0xab, 0x8d, 0x5d, 0xbb, 0xd8, 0xd8, 0xb5, - 0x1f, 0x3d, 0xed, 0x25, 0x7e, 0xce, 0x09, 0x65, 0x07, 0x1f, 0x4f, 0xf4, 0x48, 0xed, 0xf5, 0xeb, - 0xab, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xf4, 0x63, 0xc3, 0x62, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ABCIListenerServiceClient is the client API for ABCIListenerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ABCIListenerServiceClient interface { - // ListenFinalizeBlock is the corresponding endpoint for - // ABCIListener.ListenEndBlock - ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) - // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit - ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) -} - -type aBCIListenerServiceClient struct { - cc grpc1.ClientConn -} - -func NewABCIListenerServiceClient(cc grpc1.ClientConn) ABCIListenerServiceClient { - return &aBCIListenerServiceClient{cc} -} - -func (c *aBCIListenerServiceClient) ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) { - out := new(ListenFinalizeBlockResponse) - err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIListenerServiceClient) ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) { - out := new(ListenCommitResponse) - err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ABCIListenerServiceServer is the server API for ABCIListenerService service. -type ABCIListenerServiceServer interface { - // ListenFinalizeBlock is the corresponding endpoint for - // ABCIListener.ListenEndBlock - ListenFinalizeBlock(context.Context, *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) - // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit - ListenCommit(context.Context, *ListenCommitRequest) (*ListenCommitResponse, error) -} - -// UnimplementedABCIListenerServiceServer can be embedded to have forward compatible implementations. -type UnimplementedABCIListenerServiceServer struct { -} - -func (*UnimplementedABCIListenerServiceServer) ListenFinalizeBlock(ctx context.Context, req *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenFinalizeBlock not implemented") -} -func (*UnimplementedABCIListenerServiceServer) ListenCommit(ctx context.Context, req *ListenCommitRequest) (*ListenCommitResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenCommit not implemented") -} - -func RegisterABCIListenerServiceServer(s grpc1.Server, srv ABCIListenerServiceServer) { - s.RegisterService(&_ABCIListenerService_serviceDesc, srv) -} - -func _ABCIListenerService_ListenFinalizeBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenFinalizeBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, req.(*ListenFinalizeBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIListenerService_ListenCommit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenCommitRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIListenerServiceServer).ListenCommit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIListenerServiceServer).ListenCommit(ctx, req.(*ListenCommitRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ABCIListenerService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.store.streaming.abci.ABCIListenerService", - HandlerType: (*ABCIListenerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListenFinalizeBlock", - Handler: _ABCIListenerService_ListenFinalizeBlock_Handler, - }, - { - MethodName: "ListenCommit", - Handler: _ABCIListenerService_ListenCommit_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/store/streaming/abci/grpc.proto", -} - -func (m *ListenFinalizeBlockRequest) 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 *ListenFinalizeBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenFinalizeBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Res != nil { - { - size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Req != nil { - { - size, err := m.Req.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListenFinalizeBlockResponse) 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 *ListenFinalizeBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenFinalizeBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ListenCommitRequest) 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 *ListenCommitRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenCommitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChangeSet) > 0 { - for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Res != nil { - { - size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.BlockHeight != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListenCommitResponse) 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 *ListenCommitResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenCommitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { - offset -= sovGrpc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ListenFinalizeBlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Req != nil { - l = m.Req.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - if m.Res != nil { - l = m.Res.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func (m *ListenFinalizeBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ListenCommitRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovGrpc(uint64(m.BlockHeight)) - } - if m.Res != nil { - l = m.Res.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - if len(m.ChangeSet) > 0 { - for _, e := range m.ChangeSet { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - return n -} - -func (m *ListenCommitResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovGrpc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGrpc(x uint64) (n int) { - return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ListenFinalizeBlockRequest) 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 ErrIntOverflowGrpc - } - 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: ListenFinalizeBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenFinalizeBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Req == nil { - m.Req = &v1.FinalizeBlockRequest{} - } - if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Res == nil { - m.Res = &v1.FinalizeBlockResponse{} - } - if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenFinalizeBlockResponse) 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 ErrIntOverflowGrpc - } - 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: ListenFinalizeBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenFinalizeBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenCommitRequest) 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 ErrIntOverflowGrpc - } - 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: ListenCommitRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenCommitRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Res == nil { - m.Res = &v1.CommitResponse{} - } - if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangeSet = append(m.ChangeSet, &types.StoreKVPair{}) - if err := m.ChangeSet[len(m.ChangeSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenCommitResponse) 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 ErrIntOverflowGrpc - } - 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: ListenCommitResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenCommitResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGrpc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGrpc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGrpc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGrpc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/types/commit_info.pb.go b/cosmossdk.io/store/types/commit_info.pb.go deleted file mode 100644 index 81220a79c236..000000000000 --- a/cosmossdk.io/store/types/commit_info.pb.go +++ /dev/null @@ -1,864 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/v1beta1/commit_info.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// CommitInfo defines commit information used by the multi-store when committing -// a version/height. -type CommitInfo struct { - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - StoreInfos []StoreInfo `protobuf:"bytes,2,rep,name=store_infos,json=storeInfos,proto3" json:"store_infos"` - Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` -} - -func (m *CommitInfo) Reset() { *m = CommitInfo{} } -func (m *CommitInfo) String() string { return proto.CompactTextString(m) } -func (*CommitInfo) ProtoMessage() {} -func (*CommitInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_5f8c656cdef8c524, []int{0} -} -func (m *CommitInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitInfo.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 *CommitInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitInfo.Merge(m, src) -} -func (m *CommitInfo) XXX_Size() int { - return m.Size() -} -func (m *CommitInfo) XXX_DiscardUnknown() { - xxx_messageInfo_CommitInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitInfo proto.InternalMessageInfo - -func (m *CommitInfo) GetVersion() int64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *CommitInfo) GetStoreInfos() []StoreInfo { - if m != nil { - return m.StoreInfos - } - return nil -} - -func (m *CommitInfo) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - -// StoreInfo defines store-specific commit information. It contains a reference -// between a store name and the commit ID. -type StoreInfo struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - CommitId CommitID `protobuf:"bytes,2,opt,name=commit_id,json=commitId,proto3" json:"commit_id"` -} - -func (m *StoreInfo) Reset() { *m = StoreInfo{} } -func (m *StoreInfo) String() string { return proto.CompactTextString(m) } -func (*StoreInfo) ProtoMessage() {} -func (*StoreInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_5f8c656cdef8c524, []int{1} -} -func (m *StoreInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreInfo.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 *StoreInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreInfo.Merge(m, src) -} -func (m *StoreInfo) XXX_Size() int { - return m.Size() -} -func (m *StoreInfo) XXX_DiscardUnknown() { - xxx_messageInfo_StoreInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_StoreInfo proto.InternalMessageInfo - -func (m *StoreInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *StoreInfo) GetCommitId() CommitID { - if m != nil { - return m.CommitId - } - return CommitID{} -} - -// CommitID defines the commitment information when a specific store is -// committed. -type CommitID struct { - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (m *CommitID) Reset() { *m = CommitID{} } -func (*CommitID) ProtoMessage() {} -func (*CommitID) Descriptor() ([]byte, []int) { - return fileDescriptor_5f8c656cdef8c524, []int{2} -} -func (m *CommitID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitID.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 *CommitID) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitID.Merge(m, src) -} -func (m *CommitID) XXX_Size() int { - return m.Size() -} -func (m *CommitID) XXX_DiscardUnknown() { - xxx_messageInfo_CommitID.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitID proto.InternalMessageInfo - -func (m *CommitID) GetVersion() int64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *CommitID) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func init() { - proto.RegisterType((*CommitInfo)(nil), "cosmos.store.v1beta1.CommitInfo") - proto.RegisterType((*StoreInfo)(nil), "cosmos.store.v1beta1.StoreInfo") - proto.RegisterType((*CommitID)(nil), "cosmos.store.v1beta1.CommitID") -} - -func init() { - proto.RegisterFile("cosmos/store/v1beta1/commit_info.proto", fileDescriptor_5f8c656cdef8c524) -} - -var fileDescriptor_5f8c656cdef8c524 = []byte{ - // 336 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4e, 0xf2, 0x50, - 0x14, 0xc7, 0x7b, 0xa1, 0xf9, 0x3e, 0x7a, 0x70, 0xba, 0x61, 0x68, 0x18, 0x6e, 0x09, 0x83, 0x61, - 0xba, 0x0d, 0xb8, 0x39, 0x98, 0x58, 0x8d, 0x09, 0x6b, 0x75, 0x72, 0x31, 0x2d, 0x5c, 0x4a, 0xa3, - 0xed, 0x21, 0xdc, 0x2b, 0x89, 0x6f, 0xc1, 0xe8, 0xe8, 0x33, 0xf8, 0x14, 0x8c, 0x8c, 0x4e, 0x6a, - 0xe0, 0x45, 0x4c, 0x4f, 0x5b, 0x5c, 0x88, 0xdb, 0x39, 0xed, 0xef, 0x9c, 0xff, 0xaf, 0xa7, 0x70, - 0x3a, 0x41, 0x9d, 0xa1, 0xf6, 0xb5, 0xc1, 0xa5, 0xf2, 0x57, 0xc3, 0x58, 0x99, 0x68, 0xe8, 0x4f, - 0x30, 0xcb, 0x52, 0xf3, 0x90, 0xe6, 0x33, 0x94, 0x8b, 0x25, 0x1a, 0xe4, 0x9d, 0x92, 0x93, 0xc4, - 0xc9, 0x8a, 0xeb, 0x76, 0x12, 0x4c, 0x90, 0x00, 0xbf, 0xa8, 0x4a, 0xb6, 0xeb, 0x25, 0x88, 0xc9, - 0x93, 0xf2, 0xa9, 0x8b, 0x9f, 0x67, 0xbe, 0x49, 0x33, 0xa5, 0x4d, 0x94, 0x2d, 0x4a, 0xa0, 0xff, - 0xce, 0x00, 0xae, 0x28, 0x62, 0x9c, 0xcf, 0x90, 0xbb, 0xf0, 0x7f, 0xa5, 0x96, 0x3a, 0xc5, 0xdc, - 0x65, 0x3d, 0x36, 0x68, 0x86, 0x75, 0xcb, 0x6f, 0xa0, 0x4d, 0x81, 0x64, 0xa2, 0xdd, 0x46, 0xaf, - 0x39, 0x68, 0x8f, 0x3c, 0x79, 0xcc, 0x45, 0xde, 0x16, 0x5d, 0xb1, 0x2f, 0xb0, 0x37, 0x9f, 0x9e, - 0x15, 0x82, 0xae, 0x1f, 0x68, 0x1e, 0x80, 0x73, 0x70, 0x70, 0x9b, 0x3d, 0x36, 0x68, 0x8f, 0xba, - 0xb2, 0xb4, 0x94, 0xb5, 0xa5, 0xbc, 0xab, 0x89, 0xa0, 0x55, 0x2c, 0x58, 0x7f, 0x79, 0x2c, 0xfc, - 0x1d, 0xeb, 0xc7, 0xe0, 0x1c, 0x22, 0x38, 0x07, 0x3b, 0x8f, 0x32, 0x45, 0xbe, 0x4e, 0x48, 0x35, - 0xbf, 0x04, 0xa7, 0xbe, 0xdb, 0xd4, 0x6d, 0x50, 0x88, 0x38, 0xae, 0x5a, 0x7d, 0xfb, 0x75, 0x65, - 0xda, 0x2a, 0xc7, 0xc6, 0xd3, 0xfe, 0x05, 0xb4, 0xea, 0x77, 0x7f, 0x5c, 0x85, 0x83, 0x3d, 0x8f, - 0xf4, 0x9c, 0x32, 0x4e, 0x42, 0xaa, 0xcf, 0xed, 0xd7, 0x37, 0xcf, 0x0a, 0x46, 0x9b, 0x9d, 0x60, - 0xdb, 0x9d, 0x60, 0xdf, 0x3b, 0xc1, 0xd6, 0x7b, 0x61, 0x6d, 0xf7, 0xc2, 0xfa, 0xd8, 0x0b, 0xeb, - 0xde, 0x2d, 0x45, 0xf4, 0xf4, 0x51, 0xa6, 0x58, 0xfd, 0x6d, 0xf3, 0xb2, 0x50, 0x3a, 0xfe, 0x47, - 0x07, 0x38, 0xfb, 0x09, 0x00, 0x00, 0xff, 0xff, 0x67, 0xb7, 0x0d, 0x59, 0x0a, 0x02, 0x00, 0x00, -} - -func (m *CommitInfo) 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 *CommitInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintCommitInfo(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x1a - if len(m.StoreInfos) > 0 { - for iNdEx := len(m.StoreInfos) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.StoreInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommitInfo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Version != 0 { - i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *StoreInfo) 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 *StoreInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.CommitId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommitInfo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CommitID) 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 *CommitID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x12 - } - if m.Version != 0 { - i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintCommitInfo(dAtA []byte, offset int, v uint64) int { - offset -= sovCommitInfo(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CommitInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Version != 0 { - n += 1 + sovCommitInfo(uint64(m.Version)) - } - if len(m.StoreInfos) > 0 { - for _, e := range m.StoreInfos { - l = e.Size() - n += 1 + l + sovCommitInfo(uint64(l)) - } - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovCommitInfo(uint64(l)) - return n -} - -func (m *StoreInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCommitInfo(uint64(l)) - } - l = m.CommitId.Size() - n += 1 + l + sovCommitInfo(uint64(l)) - return n -} - -func (m *CommitID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Version != 0 { - n += 1 + sovCommitInfo(uint64(m.Version)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovCommitInfo(uint64(l)) - } - return n -} - -func sovCommitInfo(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCommitInfo(x uint64) (n int) { - return sovCommitInfo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CommitInfo) 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 ErrIntOverflowCommitInfo - } - 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: CommitInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StoreInfos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StoreInfos = append(m.StoreInfos, StoreInfo{}) - if err := m.StoreInfos[len(m.StoreInfos)-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 Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitInfo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommitInfo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreInfo) 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 ErrIntOverflowCommitInfo - } - 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: StoreInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - 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 ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommitId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CommitId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitInfo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommitInfo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommitID) 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 ErrIntOverflowCommitInfo - } - 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: CommitID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitInfo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommitInfo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCommitInfo(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCommitInfo - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCommitInfo - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCommitInfo - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCommitInfo = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCommitInfo = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCommitInfo = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/types/listening.pb.go b/cosmossdk.io/store/types/listening.pb.go deleted file mode 100644 index 1821ca474a6f..000000000000 --- a/cosmossdk.io/store/types/listening.pb.go +++ /dev/null @@ -1,785 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/v1beta1/listening.proto - -package types - -import ( - fmt "fmt" - v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" - _ "github.com/cosmos/cosmos-proto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and -// Deletes) It optionally includes the StoreKey for the originating KVStore and -// a Boolean flag to distinguish between Sets and Deletes -type StoreKVPair struct { - StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"` - Delete bool `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"` - Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } -func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } -func (*StoreKVPair) ProtoMessage() {} -func (*StoreKVPair) Descriptor() ([]byte, []int) { - return fileDescriptor_b6caeb9d7b7c7c10, []int{0} -} -func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreKVPair.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 *StoreKVPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreKVPair.Merge(m, src) -} -func (m *StoreKVPair) XXX_Size() int { - return m.Size() -} -func (m *StoreKVPair) XXX_DiscardUnknown() { - xxx_messageInfo_StoreKVPair.DiscardUnknown(m) -} - -var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo - -func (m *StoreKVPair) GetStoreKey() string { - if m != nil { - return m.StoreKey - } - return "" -} - -func (m *StoreKVPair) GetDelete() bool { - if m != nil { - return m.Delete - } - return false -} - -func (m *StoreKVPair) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *StoreKVPair) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -// BlockMetadata contains all the abci event data of a block -// the file streamer dump them into files together with the state changes. -type BlockMetadata struct { - ResponseCommit *v1.CommitResponse `protobuf:"bytes,6,opt,name=response_commit,json=responseCommit,proto3" json:"response_commit,omitempty"` - RequestFinalizeBlock *v1.FinalizeBlockRequest `protobuf:"bytes,7,opt,name=request_finalize_block,json=requestFinalizeBlock,proto3" json:"request_finalize_block,omitempty"` - ResponseFinalizeBlock *v1.FinalizeBlockResponse `protobuf:"bytes,8,opt,name=response_finalize_block,json=responseFinalizeBlock,proto3" json:"response_finalize_block,omitempty"` -} - -func (m *BlockMetadata) Reset() { *m = BlockMetadata{} } -func (m *BlockMetadata) String() string { return proto.CompactTextString(m) } -func (*BlockMetadata) ProtoMessage() {} -func (*BlockMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_b6caeb9d7b7c7c10, []int{1} -} -func (m *BlockMetadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockMetadata.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 *BlockMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockMetadata.Merge(m, src) -} -func (m *BlockMetadata) XXX_Size() int { - return m.Size() -} -func (m *BlockMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_BlockMetadata.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockMetadata proto.InternalMessageInfo - -func (m *BlockMetadata) GetResponseCommit() *v1.CommitResponse { - if m != nil { - return m.ResponseCommit - } - return nil -} - -func (m *BlockMetadata) GetRequestFinalizeBlock() *v1.FinalizeBlockRequest { - if m != nil { - return m.RequestFinalizeBlock - } - return nil -} - -func (m *BlockMetadata) GetResponseFinalizeBlock() *v1.FinalizeBlockResponse { - if m != nil { - return m.ResponseFinalizeBlock - } - return nil -} - -func init() { - proto.RegisterType((*StoreKVPair)(nil), "cosmos.store.v1beta1.StoreKVPair") - proto.RegisterType((*BlockMetadata)(nil), "cosmos.store.v1beta1.BlockMetadata") -} - -func init() { - proto.RegisterFile("cosmos/store/v1beta1/listening.proto", fileDescriptor_b6caeb9d7b7c7c10) -} - -var fileDescriptor_b6caeb9d7b7c7c10 = []byte{ - // 416 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0xc7, 0xeb, 0xd6, 0x2d, 0x9e, 0x07, 0x2c, 0x32, 0x65, 0x84, 0x81, 0xa2, 0x68, 0x42, 0xd0, - 0xcb, 0x1c, 0xba, 0x71, 0xe2, 0x38, 0x24, 0x24, 0x32, 0x21, 0xa1, 0x20, 0x71, 0x40, 0x48, 0x91, - 0x93, 0xbe, 0x21, 0xab, 0x69, 0x5c, 0x62, 0x2f, 0x52, 0xb9, 0xf0, 0x15, 0xf8, 0x30, 0x48, 0x7c, - 0x05, 0x8e, 0x13, 0x27, 0x8e, 0xa8, 0xfd, 0x22, 0x28, 0xb6, 0x8b, 0x34, 0x38, 0xec, 0x96, 0xff, - 0x7b, 0xff, 0xff, 0xcf, 0xcf, 0xf1, 0xa3, 0x8f, 0x4a, 0xa5, 0x17, 0x4a, 0x27, 0xda, 0xa8, 0x06, - 0x92, 0x76, 0x5a, 0x80, 0x11, 0xd3, 0xa4, 0x92, 0xda, 0x40, 0x2d, 0xeb, 0x8f, 0x7c, 0xd9, 0x28, - 0xa3, 0xd8, 0xd8, 0xb9, 0xb8, 0x75, 0x71, 0xef, 0x3a, 0x78, 0x58, 0xaa, 0x05, 0x98, 0xe2, 0xdc, - 0x24, 0xa2, 0x28, 0x65, 0xd2, 0x4e, 0x13, 0xb3, 0x5a, 0x82, 0x76, 0x99, 0x83, 0xfb, 0x2e, 0x93, - 0x5b, 0x95, 0x78, 0x80, 0x15, 0x87, 0x5f, 0xe8, 0xee, 0xdb, 0x8e, 0x74, 0xf6, 0xee, 0x8d, 0x90, - 0x0d, 0x7b, 0x40, 0x77, 0x2c, 0x38, 0x9f, 0xc3, 0x2a, 0x44, 0x31, 0x9a, 0xec, 0x64, 0xc4, 0x16, - 0xce, 0x60, 0xc5, 0xf6, 0xe9, 0x68, 0x06, 0x15, 0x18, 0x08, 0xfb, 0x31, 0x9a, 0x90, 0xcc, 0x2b, - 0x16, 0xd0, 0x41, 0x67, 0x1f, 0xc4, 0x68, 0x72, 0x33, 0xeb, 0x3e, 0xd9, 0x98, 0x0e, 0x5b, 0x51, - 0x5d, 0x40, 0x88, 0x6d, 0xcd, 0x89, 0xe7, 0x77, 0x7e, 0x7e, 0x3b, 0xda, 0x73, 0xa7, 0x1f, 0xe9, - 0xd9, 0x3c, 0x7e, 0xca, 0x9f, 0x9d, 0x1c, 0x7e, 0xef, 0xd3, 0x5b, 0xa7, 0x95, 0x2a, 0xe7, 0xaf, - 0xc1, 0x88, 0x99, 0x30, 0x82, 0xbd, 0xa2, 0x7b, 0x0d, 0xe8, 0xa5, 0xaa, 0x35, 0xe4, 0xa5, 0x5a, - 0x2c, 0xa4, 0x09, 0x47, 0x31, 0x9a, 0xec, 0x1e, 0xc7, 0x7c, 0x7b, 0x4b, 0xde, 0xdd, 0x92, 0xb7, - 0x53, 0xfe, 0xc2, 0xf6, 0x33, 0x6f, 0xcf, 0x6e, 0x6f, 0x83, 0xae, 0xce, 0x3e, 0xd0, 0xfd, 0x06, - 0x3e, 0x5d, 0x80, 0x36, 0xf9, 0xb9, 0xac, 0x45, 0x25, 0x3f, 0x43, 0x5e, 0x74, 0x87, 0x85, 0x37, - 0x2c, 0xf1, 0xf1, 0xff, 0xc4, 0x97, 0xde, 0x67, 0x67, 0xca, 0x5c, 0x38, 0x1b, 0x7b, 0xca, 0x95, - 0x26, 0xcb, 0xe9, 0xbd, 0xbf, 0x83, 0xfe, 0x83, 0x27, 0x16, 0xff, 0xe4, 0x5a, 0xbc, 0x9f, 0xfb, - 0xee, 0x96, 0x73, 0xa5, 0x9d, 0x62, 0x82, 0x82, 0x7e, 0x8a, 0x49, 0x3f, 0x18, 0xa4, 0x98, 0x0c, - 0x02, 0x9c, 0x62, 0x82, 0x83, 0x61, 0x8a, 0xc9, 0x30, 0x18, 0x9d, 0x1e, 0xff, 0x58, 0x47, 0xe8, - 0x72, 0x1d, 0xa1, 0xdf, 0xeb, 0x08, 0x7d, 0xdd, 0x44, 0xbd, 0xcb, 0x4d, 0xd4, 0xfb, 0xb5, 0x89, - 0x7a, 0xef, 0x43, 0xf7, 0x93, 0xf5, 0x6c, 0xce, 0xa5, 0xf2, 0xfb, 0x64, 0xf7, 0xa1, 0x18, 0xd9, - 0x57, 0x3f, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x98, 0x9f, 0x12, 0x13, 0x6c, 0x02, 0x00, 0x00, -} - -func (m *StoreKVPair) 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 *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintListening(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x22 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintListening(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x1a - } - if m.Delete { - i-- - if m.Delete { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.StoreKey) > 0 { - i -= len(m.StoreKey) - copy(dAtA[i:], m.StoreKey) - i = encodeVarintListening(dAtA, i, uint64(len(m.StoreKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockMetadata) 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 *BlockMetadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ResponseFinalizeBlock != nil { - { - size, err := m.ResponseFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintListening(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.RequestFinalizeBlock != nil { - { - size, err := m.RequestFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintListening(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.ResponseCommit != nil { - { - size, err := m.ResponseCommit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintListening(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} - -func encodeVarintListening(dAtA []byte, offset int, v uint64) int { - offset -= sovListening(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *StoreKVPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StoreKey) - if l > 0 { - n += 1 + l + sovListening(uint64(l)) - } - if m.Delete { - n += 2 - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovListening(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovListening(uint64(l)) - } - return n -} - -func (m *BlockMetadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ResponseCommit != nil { - l = m.ResponseCommit.Size() - n += 1 + l + sovListening(uint64(l)) - } - if m.RequestFinalizeBlock != nil { - l = m.RequestFinalizeBlock.Size() - n += 1 + l + sovListening(uint64(l)) - } - if m.ResponseFinalizeBlock != nil { - l = m.ResponseFinalizeBlock.Size() - n += 1 + l + sovListening(uint64(l)) - } - return n -} - -func sovListening(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozListening(x uint64) (n int) { - return sovListening(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *StoreKVPair) 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 ErrIntOverflowListening - } - 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: StoreKVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StoreKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - 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 ErrInvalidLengthListening - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StoreKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Delete = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipListening(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthListening - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockMetadata) 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 ErrIntOverflowListening - } - 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: BlockMetadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockMetadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseCommit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResponseCommit == nil { - m.ResponseCommit = &v1.CommitResponse{} - } - if err := m.ResponseCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestFinalizeBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestFinalizeBlock == nil { - m.RequestFinalizeBlock = &v1.FinalizeBlockRequest{} - } - if err := m.RequestFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseFinalizeBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResponseFinalizeBlock == nil { - m.ResponseFinalizeBlock = &v1.FinalizeBlockResponse{} - } - if err := m.ResponseFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipListening(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthListening - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipListening(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListening - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListening - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListening - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthListening - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupListening - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthListening - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthListening = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowListening = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupListening = fmt.Errorf("proto: unexpected end of group") -) From 7d4e4b20beeb40178b039b549f6187cf5ef1a987 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Thu, 13 Jun 2024 16:37:26 +0200 Subject: [PATCH 11/12] rename to get --- api/cosmos/consensus/v1/query.pulsar.go | 373 +-- api/cosmos/consensus/v1/query_grpc.pb.go | 34 +- cosmossdk.io/server/v2/streaming/grpc.pb.go | 2414 +++++++++++++++++ .../store/snapshots/types/snapshot.pb.go | 2008 ++++++++++++++ cosmossdk.io/store/streaming/abci/grpc.pb.go | 1050 +++++++ cosmossdk.io/store/types/commit_info.pb.go | 864 ++++++ cosmossdk.io/store/types/listening.pb.go | 785 ++++++ x/consensus/keeper/keeper.go | 4 +- .../proto/cosmos/consensus/v1/query.proto | 6 +- x/consensus/types/query.pb.go | 166 +- 10 files changed, 7415 insertions(+), 289 deletions(-) create mode 100644 cosmossdk.io/server/v2/streaming/grpc.pb.go create mode 100644 cosmossdk.io/store/snapshots/types/snapshot.pb.go create mode 100644 cosmossdk.io/store/streaming/abci/grpc.pb.go create mode 100644 cosmossdk.io/store/types/commit_info.pb.go create mode 100644 cosmossdk.io/store/types/listening.pb.go diff --git a/api/cosmos/consensus/v1/query.pulsar.go b/api/cosmos/consensus/v1/query.pulsar.go index f8afbaa99607..ca4bad59679e 100644 --- a/api/cosmos/consensus/v1/query.pulsar.go +++ b/api/cosmos/consensus/v1/query.pulsar.go @@ -15,23 +15,23 @@ import ( ) var ( - md_QueryCometInfoRequest protoreflect.MessageDescriptor + md_QueryGetCometInfoRequest protoreflect.MessageDescriptor ) func init() { file_cosmos_consensus_v1_query_proto_init() - md_QueryCometInfoRequest = File_cosmos_consensus_v1_query_proto.Messages().ByName("QueryCometInfoRequest") + md_QueryGetCometInfoRequest = File_cosmos_consensus_v1_query_proto.Messages().ByName("QueryGetCometInfoRequest") } -var _ protoreflect.Message = (*fastReflection_QueryCometInfoRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryGetCometInfoRequest)(nil) -type fastReflection_QueryCometInfoRequest QueryCometInfoRequest +type fastReflection_QueryGetCometInfoRequest QueryGetCometInfoRequest -func (x *QueryCometInfoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryCometInfoRequest)(x) +func (x *QueryGetCometInfoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetCometInfoRequest)(x) } -func (x *QueryCometInfoRequest) slowProtoReflect() protoreflect.Message { +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)) @@ -43,43 +43,43 @@ func (x *QueryCometInfoRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryCometInfoRequest_messageType fastReflection_QueryCometInfoRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryCometInfoRequest_messageType{} +var _fastReflection_QueryGetCometInfoRequest_messageType fastReflection_QueryGetCometInfoRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetCometInfoRequest_messageType{} -type fastReflection_QueryCometInfoRequest_messageType struct{} +type fastReflection_QueryGetCometInfoRequest_messageType struct{} -func (x fastReflection_QueryCometInfoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryCometInfoRequest)(nil) +func (x fastReflection_QueryGetCometInfoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetCometInfoRequest)(nil) } -func (x fastReflection_QueryCometInfoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryCometInfoRequest) +func (x fastReflection_QueryGetCometInfoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetCometInfoRequest) } -func (x fastReflection_QueryCometInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCometInfoRequest +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_QueryCometInfoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCometInfoRequest +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_QueryCometInfoRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryCometInfoRequest_messageType +func (x *fastReflection_QueryGetCometInfoRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryGetCometInfoRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryCometInfoRequest) New() protoreflect.Message { - return new(fastReflection_QueryCometInfoRequest) +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_QueryCometInfoRequest) Interface() protoreflect.ProtoMessage { - return (*QueryCometInfoRequest)(x) +func (x *fastReflection_QueryGetCometInfoRequest) Interface() protoreflect.ProtoMessage { + return (*QueryGetCometInfoRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -87,7 +87,7 @@ func (x *fastReflection_QueryCometInfoRequest) Interface() protoreflect.ProtoMes // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryCometInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryGetCometInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -101,13 +101,13 @@ func (x *fastReflection_QueryCometInfoRequest) Range(f func(protoreflect.FieldDe // 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_QueryCometInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { +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.QueryCometInfoRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest does not contain field %s", fd.FullName())) } } @@ -117,13 +117,13 @@ func (x *fastReflection_QueryCometInfoRequest) Has(fd protoreflect.FieldDescript // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCometInfoRequest) Clear(fd protoreflect.FieldDescriptor) { +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.QueryCometInfoRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest does not contain field %s", fd.FullName())) } } @@ -133,13 +133,13 @@ func (x *fastReflection_QueryCometInfoRequest) Clear(fd protoreflect.FieldDescri // 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_QueryCometInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +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.QueryCometInfoRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest does not contain field %s", descriptor.FullName())) } } @@ -153,13 +153,13 @@ func (x *fastReflection_QueryCometInfoRequest) Get(descriptor protoreflect.Field // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCometInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +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.QueryCometInfoRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest does not contain field %s", fd.FullName())) } } @@ -173,36 +173,36 @@ func (x *fastReflection_QueryCometInfoRequest) Set(fd protoreflect.FieldDescript // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCometInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +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.QueryCometInfoRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoRequest does not contain field %s", fd.FullName())) + 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_QueryCometInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.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.QueryCometInfoRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoRequest does not contain field %s", fd.FullName())) + 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_QueryCometInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +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.QueryCometInfoRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.QueryGetCometInfoRequest", d.FullName())) } panic("unreachable") } @@ -210,7 +210,7 @@ func (x *fastReflection_QueryCometInfoRequest) WhichOneof(d protoreflect.OneofDe // 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_QueryCometInfoRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryGetCometInfoRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -221,7 +221,7 @@ func (x *fastReflection_QueryCometInfoRequest) GetUnknown() protoreflect.RawFiel // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCometInfoRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryGetCometInfoRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -233,7 +233,7 @@ func (x *fastReflection_QueryCometInfoRequest) SetUnknown(fields protoreflect.Ra // 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_QueryCometInfoRequest) IsValid() bool { +func (x *fastReflection_QueryGetCometInfoRequest) IsValid() bool { return x != nil } @@ -243,9 +243,9 @@ func (x *fastReflection_QueryCometInfoRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryCometInfoRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryGetCometInfoRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryCometInfoRequest) + x := input.Message.Interface().(*QueryGetCometInfoRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -267,7 +267,7 @@ func (x *fastReflection_QueryCometInfoRequest) ProtoMethods() *protoiface.Method } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryCometInfoRequest) + x := input.Message.Interface().(*QueryGetCometInfoRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -297,7 +297,7 @@ func (x *fastReflection_QueryCometInfoRequest) ProtoMethods() *protoiface.Method }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryCometInfoRequest) + x := input.Message.Interface().(*QueryGetCometInfoRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -329,10 +329,10 @@ func (x *fastReflection_QueryCometInfoRequest) ProtoMethods() *protoiface.Method fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCometInfoRequest: wiretype end group for non-group") + 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: QueryCometInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetCometInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -371,25 +371,25 @@ func (x *fastReflection_QueryCometInfoRequest) ProtoMethods() *protoiface.Method } var ( - md_QueryCometInfoResponse protoreflect.MessageDescriptor - fd_QueryCometInfoResponse_comet_info protoreflect.FieldDescriptor + md_QueryGetCometInfoResponse protoreflect.MessageDescriptor + fd_QueryGetCometInfoResponse_comet_info protoreflect.FieldDescriptor ) func init() { file_cosmos_consensus_v1_query_proto_init() - md_QueryCometInfoResponse = File_cosmos_consensus_v1_query_proto.Messages().ByName("QueryCometInfoResponse") - fd_QueryCometInfoResponse_comet_info = md_QueryCometInfoResponse.Fields().ByName("comet_info") + 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_QueryCometInfoResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryGetCometInfoResponse)(nil) -type fastReflection_QueryCometInfoResponse QueryCometInfoResponse +type fastReflection_QueryGetCometInfoResponse QueryGetCometInfoResponse -func (x *QueryCometInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryCometInfoResponse)(x) +func (x *QueryGetCometInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetCometInfoResponse)(x) } -func (x *QueryCometInfoResponse) slowProtoReflect() protoreflect.Message { +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)) @@ -401,43 +401,43 @@ func (x *QueryCometInfoResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryCometInfoResponse_messageType fastReflection_QueryCometInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryCometInfoResponse_messageType{} +var _fastReflection_QueryGetCometInfoResponse_messageType fastReflection_QueryGetCometInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetCometInfoResponse_messageType{} -type fastReflection_QueryCometInfoResponse_messageType struct{} +type fastReflection_QueryGetCometInfoResponse_messageType struct{} -func (x fastReflection_QueryCometInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryCometInfoResponse)(nil) +func (x fastReflection_QueryGetCometInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetCometInfoResponse)(nil) } -func (x fastReflection_QueryCometInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryCometInfoResponse) +func (x fastReflection_QueryGetCometInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetCometInfoResponse) } -func (x fastReflection_QueryCometInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCometInfoResponse +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_QueryCometInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCometInfoResponse +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_QueryCometInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryCometInfoResponse_messageType +func (x *fastReflection_QueryGetCometInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryGetCometInfoResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryCometInfoResponse) New() protoreflect.Message { - return new(fastReflection_QueryCometInfoResponse) +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_QueryCometInfoResponse) Interface() protoreflect.ProtoMessage { - return (*QueryCometInfoResponse)(x) +func (x *fastReflection_QueryGetCometInfoResponse) Interface() protoreflect.ProtoMessage { + return (*QueryGetCometInfoResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -445,10 +445,10 @@ func (x *fastReflection_QueryCometInfoResponse) Interface() protoreflect.ProtoMe // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryCometInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +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_QueryCometInfoResponse_comet_info, value) { + if !f(fd_QueryGetCometInfoResponse_comet_info, value) { return } } @@ -465,15 +465,15 @@ func (x *fastReflection_QueryCometInfoResponse) Range(f func(protoreflect.FieldD // 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_QueryCometInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryGetCometInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.consensus.v1.QueryCometInfoResponse.comet_info": + 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.QueryCometInfoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse does not contain field %s", fd.FullName())) } } @@ -483,15 +483,15 @@ func (x *fastReflection_QueryCometInfoResponse) Has(fd protoreflect.FieldDescrip // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCometInfoResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryGetCometInfoResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.consensus.v1.QueryCometInfoResponse.comet_info": + 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.QueryCometInfoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse does not contain field %s", fd.FullName())) } } @@ -501,16 +501,16 @@ func (x *fastReflection_QueryCometInfoResponse) Clear(fd protoreflect.FieldDescr // 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_QueryCometInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryGetCometInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.consensus.v1.QueryCometInfoResponse.comet_info": + 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.QueryCometInfoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse does not contain field %s", descriptor.FullName())) } } @@ -524,15 +524,15 @@ func (x *fastReflection_QueryCometInfoResponse) Get(descriptor protoreflect.Fiel // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCometInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryGetCometInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.consensus.v1.QueryCometInfoResponse.comet_info": + 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.QueryCometInfoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse does not contain field %s", fd.FullName())) } } @@ -546,44 +546,44 @@ func (x *fastReflection_QueryCometInfoResponse) Set(fd protoreflect.FieldDescrip // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCometInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryGetCometInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.consensus.v1.QueryCometInfoResponse.comet_info": + 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.QueryCometInfoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoResponse does not contain field %s", fd.FullName())) + 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_QueryCometInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryGetCometInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.consensus.v1.QueryCometInfoResponse.comet_info": + 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.QueryCometInfoResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) } - panic(fmt.Errorf("message cosmos.consensus.v1.QueryCometInfoResponse does not contain field %s", fd.FullName())) + 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_QueryCometInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +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.QueryCometInfoResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.QueryGetCometInfoResponse", d.FullName())) } panic("unreachable") } @@ -591,7 +591,7 @@ func (x *fastReflection_QueryCometInfoResponse) WhichOneof(d protoreflect.OneofD // 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_QueryCometInfoResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryGetCometInfoResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -602,7 +602,7 @@ func (x *fastReflection_QueryCometInfoResponse) GetUnknown() protoreflect.RawFie // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCometInfoResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryGetCometInfoResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -614,7 +614,7 @@ func (x *fastReflection_QueryCometInfoResponse) SetUnknown(fields protoreflect.R // 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_QueryCometInfoResponse) IsValid() bool { +func (x *fastReflection_QueryGetCometInfoResponse) IsValid() bool { return x != nil } @@ -624,9 +624,9 @@ func (x *fastReflection_QueryCometInfoResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryCometInfoResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryGetCometInfoResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryCometInfoResponse) + x := input.Message.Interface().(*QueryGetCometInfoResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -652,7 +652,7 @@ func (x *fastReflection_QueryCometInfoResponse) ProtoMethods() *protoiface.Metho } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryCometInfoResponse) + x := input.Message.Interface().(*QueryGetCometInfoResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -696,7 +696,7 @@ func (x *fastReflection_QueryCometInfoResponse) ProtoMethods() *protoiface.Metho }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryCometInfoResponse) + x := input.Message.Interface().(*QueryGetCometInfoResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -728,10 +728,10 @@ func (x *fastReflection_QueryCometInfoResponse) ProtoMethods() *protoiface.Metho fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCometInfoResponse: wiretype end group for non-group") + 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: QueryCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + 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: @@ -1612,14 +1612,14 @@ const ( ) // QueryCometInfoRequest defines the request type for querying x/consensus comet info. -type QueryCometInfoRequest struct { +type QueryGetCometInfoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *QueryCometInfoRequest) Reset() { - *x = QueryCometInfoRequest{} +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)) @@ -1627,19 +1627,19 @@ func (x *QueryCometInfoRequest) Reset() { } } -func (x *QueryCometInfoRequest) String() string { +func (x *QueryGetCometInfoRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryCometInfoRequest) ProtoMessage() {} +func (*QueryGetCometInfoRequest) ProtoMessage() {} -// Deprecated: Use QueryCometInfoRequest.ProtoReflect.Descriptor instead. -func (*QueryCometInfoRequest) Descriptor() ([]byte, []int) { +// 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 QueryCometInfoResponse struct { +type QueryGetCometInfoResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1648,8 +1648,8 @@ type QueryCometInfoResponse struct { CometInfo *CometInfo `protobuf:"bytes,1,opt,name=comet_info,json=cometInfo,proto3" json:"comet_info,omitempty"` } -func (x *QueryCometInfoResponse) Reset() { - *x = QueryCometInfoResponse{} +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)) @@ -1657,18 +1657,18 @@ func (x *QueryCometInfoResponse) Reset() { } } -func (x *QueryCometInfoResponse) String() string { +func (x *QueryGetCometInfoResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryCometInfoResponse) ProtoMessage() {} +func (*QueryGetCometInfoResponse) ProtoMessage() {} -// Deprecated: Use QueryCometInfoResponse.ProtoReflect.Descriptor instead. -func (*QueryCometInfoResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryGetCometInfoResponse.ProtoReflect.Descriptor instead. +func (*QueryGetCometInfoResponse) Descriptor() ([]byte, []int) { return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{1} } -func (x *QueryCometInfoResponse) GetCometInfo() *CometInfo { +func (x *QueryGetCometInfoResponse) GetCometInfo() *CometInfo { if x != nil { return x.CometInfo } @@ -1753,49 +1753,50 @@ 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, 0x17, 0x0a, 0x15, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x57, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0xf0, 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, 0x64, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2a, - 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, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 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, 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, + 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, + 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, } var ( @@ -1812,20 +1813,20 @@ func file_cosmos_consensus_v1_query_proto_rawDescGZIP() []byte { var file_cosmos_consensus_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_cosmos_consensus_v1_query_proto_goTypes = []interface{}{ - (*QueryCometInfoRequest)(nil), // 0: cosmos.consensus.v1.QueryCometInfoRequest - (*QueryCometInfoResponse)(nil), // 1: cosmos.consensus.v1.QueryCometInfoResponse - (*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 + (*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 } var file_cosmos_consensus_v1_query_proto_depIdxs = []int32{ - 4, // 0: cosmos.consensus.v1.QueryCometInfoResponse.comet_info:type_name -> cosmos.consensus.v1.CometInfo + 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.CometInfo:input_type -> cosmos.consensus.v1.QueryCometInfoRequest + 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.CometInfo:output_type -> cosmos.consensus.v1.QueryCometInfoResponse + 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 @@ -1841,7 +1842,7 @@ 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.(*QueryCometInfoRequest); i { + switch v := v.(*QueryGetCometInfoRequest); i { case 0: return &v.state case 1: @@ -1853,7 +1854,7 @@ func file_cosmos_consensus_v1_query_proto_init() { } } file_cosmos_consensus_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryCometInfoResponse); i { + switch v := v.(*QueryGetCometInfoResponse); i { case 0: return &v.state case 1: diff --git a/api/cosmos/consensus/v1/query_grpc.pb.go b/api/cosmos/consensus/v1/query_grpc.pb.go index c88fbf27d0f0..ce898bd95251 100644 --- a/api/cosmos/consensus/v1/query_grpc.pb.go +++ b/api/cosmos/consensus/v1/query_grpc.pb.go @@ -21,8 +21,8 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/cosmos.consensus.v1.Query/Params" - Query_CometInfo_FullMethodName = "/cosmos.consensus.v1.Query/CometInfo" + Query_Params_FullMethodName = "/cosmos.consensus.v1.Query/Params" + Query_GetCometInfo_FullMethodName = "/cosmos.consensus.v1.Query/GetCometInfo" ) // QueryClient is the client API for Query service. @@ -31,7 +31,8 @@ const ( type QueryClient interface { // Params queries the parameters of x/consensus module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - CometInfo(ctx context.Context, in *QueryCometInfoRequest, opts ...grpc.CallOption) (*QueryCometInfoResponse, error) + // CometInfo queries the comet info of x/consensus module. + GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) } type queryClient struct { @@ -51,9 +52,9 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) CometInfo(ctx context.Context, in *QueryCometInfoRequest, opts ...grpc.CallOption) (*QueryCometInfoResponse, error) { - out := new(QueryCometInfoResponse) - err := c.cc.Invoke(ctx, Query_CometInfo_FullMethodName, in, out, opts...) +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 } @@ -66,7 +67,8 @@ func (c *queryClient) CometInfo(ctx context.Context, in *QueryCometInfoRequest, type QueryServer interface { // Params queries the parameters of x/consensus module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - CometInfo(context.Context, *QueryCometInfoRequest) (*QueryCometInfoResponse, error) + // CometInfo queries the comet info of x/consensus module. + GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) mustEmbedUnimplementedQueryServer() } @@ -77,8 +79,8 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (UnimplementedQueryServer) CometInfo(context.Context, *QueryCometInfoRequest) (*QueryCometInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CometInfo not implemented") +func (UnimplementedQueryServer) GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCometInfo not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} @@ -111,20 +113,20 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_CometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCometInfoRequest) +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).CometInfo(ctx, in) + return srv.(QueryServer).GetCometInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Query_CometInfo_FullMethodName, + FullMethod: Query_GetCometInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CometInfo(ctx, req.(*QueryCometInfoRequest)) + return srv.(QueryServer).GetCometInfo(ctx, req.(*QueryGetCometInfoRequest)) } return interceptor(ctx, in, info, handler) } @@ -141,8 +143,8 @@ var Query_ServiceDesc = grpc.ServiceDesc{ Handler: _Query_Params_Handler, }, { - MethodName: "CometInfo", - Handler: _Query_CometInfo_Handler, + MethodName: "GetCometInfo", + Handler: _Query_GetCometInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/cosmossdk.io/server/v2/streaming/grpc.pb.go b/cosmossdk.io/server/v2/streaming/grpc.pb.go new file mode 100644 index 000000000000..4d2d15149c89 --- /dev/null +++ b/cosmossdk.io/server/v2/streaming/grpc.pb.go @@ -0,0 +1,2414 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/streaming/v1/grpc.proto + +package streaming + +import ( + context "context" + fmt "fmt" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ListenDeliverBlockRequest is the request type for the ListenDeliverBlock RPC method +type ListenDeliverBlockRequest struct { + BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` + Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` + TxResults []*ExecTxResult `protobuf:"bytes,4,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` +} + +func (m *ListenDeliverBlockRequest) Reset() { *m = ListenDeliverBlockRequest{} } +func (m *ListenDeliverBlockRequest) String() string { return proto.CompactTextString(m) } +func (*ListenDeliverBlockRequest) ProtoMessage() {} +func (*ListenDeliverBlockRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{0} +} +func (m *ListenDeliverBlockRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenDeliverBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenDeliverBlockRequest.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 *ListenDeliverBlockRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenDeliverBlockRequest.Merge(m, src) +} +func (m *ListenDeliverBlockRequest) XXX_Size() int { + return m.Size() +} +func (m *ListenDeliverBlockRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListenDeliverBlockRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenDeliverBlockRequest proto.InternalMessageInfo + +func (m *ListenDeliverBlockRequest) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *ListenDeliverBlockRequest) GetTxs() [][]byte { + if m != nil { + return m.Txs + } + return nil +} + +func (m *ListenDeliverBlockRequest) GetEvents() []*Event { + if m != nil { + return m.Events + } + return nil +} + +func (m *ListenDeliverBlockRequest) GetTxResults() []*ExecTxResult { + if m != nil { + return m.TxResults + } + return nil +} + +// ListenDeliverBlockResponse is the response type for the ListenDeliverBlock RPC method +type ListenDeliverBlockResponse struct { +} + +func (m *ListenDeliverBlockResponse) Reset() { *m = ListenDeliverBlockResponse{} } +func (m *ListenDeliverBlockResponse) String() string { return proto.CompactTextString(m) } +func (*ListenDeliverBlockResponse) ProtoMessage() {} +func (*ListenDeliverBlockResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{1} +} +func (m *ListenDeliverBlockResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenDeliverBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenDeliverBlockResponse.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 *ListenDeliverBlockResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenDeliverBlockResponse.Merge(m, src) +} +func (m *ListenDeliverBlockResponse) XXX_Size() int { + return m.Size() +} +func (m *ListenDeliverBlockResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListenDeliverBlockResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenDeliverBlockResponse proto.InternalMessageInfo + +// ListenStateChangesRequest is the request type for the ListenStateChanges RPC method +type ListenStateChangesRequest struct { + BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + ChangeSet []*StoreKVPair `protobuf:"bytes,2,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` + AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` +} + +func (m *ListenStateChangesRequest) Reset() { *m = ListenStateChangesRequest{} } +func (m *ListenStateChangesRequest) String() string { return proto.CompactTextString(m) } +func (*ListenStateChangesRequest) ProtoMessage() {} +func (*ListenStateChangesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{2} +} +func (m *ListenStateChangesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenStateChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenStateChangesRequest.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 *ListenStateChangesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenStateChangesRequest.Merge(m, src) +} +func (m *ListenStateChangesRequest) XXX_Size() int { + return m.Size() +} +func (m *ListenStateChangesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListenStateChangesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenStateChangesRequest proto.InternalMessageInfo + +func (m *ListenStateChangesRequest) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *ListenStateChangesRequest) GetChangeSet() []*StoreKVPair { + if m != nil { + return m.ChangeSet + } + return nil +} + +func (m *ListenStateChangesRequest) GetAppHash() []byte { + if m != nil { + return m.AppHash + } + return nil +} + +// ListenStateChangesResponse is the response type for the ListenStateChanges RPC method +type ListenStateChangesResponse struct { +} + +func (m *ListenStateChangesResponse) Reset() { *m = ListenStateChangesResponse{} } +func (m *ListenStateChangesResponse) String() string { return proto.CompactTextString(m) } +func (*ListenStateChangesResponse) ProtoMessage() {} +func (*ListenStateChangesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{3} +} +func (m *ListenStateChangesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenStateChangesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenStateChangesResponse.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 *ListenStateChangesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenStateChangesResponse.Merge(m, src) +} +func (m *ListenStateChangesResponse) XXX_Size() int { + return m.Size() +} +func (m *ListenStateChangesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListenStateChangesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenStateChangesResponse proto.InternalMessageInfo + +// StoreKVPair is a single key-value pair, associated with a store. +type StoreKVPair struct { + // address defines the address of the account the state changes are coming from. + // In case of modules you can expect a stringified + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // key defines the key of the address that changed. + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // value defines the value that changed, empty in case of removal. + Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + // delete defines if the key was removed. + Delete bool `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"` +} + +func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } +func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } +func (*StoreKVPair) ProtoMessage() {} +func (*StoreKVPair) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{4} +} +func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StoreKVPair.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 *StoreKVPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_StoreKVPair.Merge(m, src) +} +func (m *StoreKVPair) XXX_Size() int { + return m.Size() +} +func (m *StoreKVPair) XXX_DiscardUnknown() { + xxx_messageInfo_StoreKVPair.DiscardUnknown(m) +} + +var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo + +func (m *StoreKVPair) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *StoreKVPair) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *StoreKVPair) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *StoreKVPair) GetDelete() bool { + if m != nil { + return m.Delete + } + return false +} + +// Event is a single event, associated with a transaction. +type Event struct { + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Attributes []*EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (m *Event) Reset() { *m = Event{} } +func (m *Event) String() string { return proto.CompactTextString(m) } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{5} +} +func (m *Event) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Event.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 *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(m, src) +} +func (m *Event) XXX_Size() int { + return m.Size() +} +func (m *Event) XXX_DiscardUnknown() { + xxx_messageInfo_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Event proto.InternalMessageInfo + +func (m *Event) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Event) GetAttributes() []*EventAttribute { + if m != nil { + return m.Attributes + } + return nil +} + +// EventAttribute is a single key-value pair, associated with an event. +type EventAttribute struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *EventAttribute) Reset() { *m = EventAttribute{} } +func (m *EventAttribute) String() string { return proto.CompactTextString(m) } +func (*EventAttribute) ProtoMessage() {} +func (*EventAttribute) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{6} +} +func (m *EventAttribute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAttribute.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 *EventAttribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAttribute.Merge(m, src) +} +func (m *EventAttribute) XXX_Size() int { + return m.Size() +} +func (m *EventAttribute) XXX_DiscardUnknown() { + xxx_messageInfo_EventAttribute.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAttribute proto.InternalMessageInfo + +func (m *EventAttribute) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *EventAttribute) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// ExecTxResult contains results of executing one individual transaction. +type ExecTxResult struct { + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` + GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` + GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` + Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` +} + +func (m *ExecTxResult) Reset() { *m = ExecTxResult{} } +func (m *ExecTxResult) String() string { return proto.CompactTextString(m) } +func (*ExecTxResult) ProtoMessage() {} +func (*ExecTxResult) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{7} +} +func (m *ExecTxResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExecTxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExecTxResult.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 *ExecTxResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExecTxResult.Merge(m, src) +} +func (m *ExecTxResult) XXX_Size() int { + return m.Size() +} +func (m *ExecTxResult) XXX_DiscardUnknown() { + xxx_messageInfo_ExecTxResult.DiscardUnknown(m) +} + +var xxx_messageInfo_ExecTxResult proto.InternalMessageInfo + +func (m *ExecTxResult) GetCode() uint32 { + if m != nil { + return m.Code + } + return 0 +} + +func (m *ExecTxResult) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *ExecTxResult) GetLog() string { + if m != nil { + return m.Log + } + return "" +} + +func (m *ExecTxResult) GetInfo() string { + if m != nil { + return m.Info + } + return "" +} + +func (m *ExecTxResult) GetGasWanted() int64 { + if m != nil { + return m.GasWanted + } + return 0 +} + +func (m *ExecTxResult) GetGasUsed() int64 { + if m != nil { + return m.GasUsed + } + return 0 +} + +func (m *ExecTxResult) GetEvents() []*Event { + if m != nil { + return m.Events + } + return nil +} + +func (m *ExecTxResult) GetCodespace() string { + if m != nil { + return m.Codespace + } + return "" +} + +func init() { + proto.RegisterType((*ListenDeliverBlockRequest)(nil), "cosmos.streaming.v1.ListenDeliverBlockRequest") + proto.RegisterType((*ListenDeliverBlockResponse)(nil), "cosmos.streaming.v1.ListenDeliverBlockResponse") + proto.RegisterType((*ListenStateChangesRequest)(nil), "cosmos.streaming.v1.ListenStateChangesRequest") + proto.RegisterType((*ListenStateChangesResponse)(nil), "cosmos.streaming.v1.ListenStateChangesResponse") + proto.RegisterType((*StoreKVPair)(nil), "cosmos.streaming.v1.StoreKVPair") + proto.RegisterType((*Event)(nil), "cosmos.streaming.v1.Event") + proto.RegisterType((*EventAttribute)(nil), "cosmos.streaming.v1.EventAttribute") + proto.RegisterType((*ExecTxResult)(nil), "cosmos.streaming.v1.ExecTxResult") +} + +func init() { proto.RegisterFile("cosmos/streaming/v1/grpc.proto", fileDescriptor_3fc151d30622bb2a) } + +var fileDescriptor_3fc151d30622bb2a = []byte{ + // 599 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xae, 0x9b, 0x36, 0xa9, 0x27, 0xe1, 0x47, 0x0b, 0x42, 0x6e, 0x55, 0x2c, 0x37, 0x5c, 0x72, + 0x72, 0xd4, 0x70, 0x41, 0x5c, 0x80, 0x16, 0xa4, 0x4a, 0x70, 0x40, 0x1b, 0x7e, 0x24, 0x2e, 0x61, + 0x6b, 0x0f, 0x8e, 0x55, 0xd7, 0x36, 0x3b, 0x6b, 0x93, 0xbe, 0x05, 0x67, 0x1e, 0x08, 0x71, 0xec, + 0x91, 0x23, 0x6a, 0x2f, 0xbc, 0x05, 0x68, 0xd7, 0x6e, 0x93, 0x0a, 0xb7, 0x2a, 0xb7, 0x6f, 0x7e, + 0xbf, 0x6f, 0x3c, 0xe3, 0x05, 0x37, 0xc8, 0xe8, 0x30, 0xa3, 0x21, 0x29, 0x89, 0xe2, 0x30, 0x4e, + 0xa3, 0x61, 0xb9, 0x3d, 0x8c, 0x64, 0x1e, 0xf8, 0xb9, 0xcc, 0x54, 0xc6, 0xee, 0x54, 0x71, 0xff, + 0x3c, 0xee, 0x97, 0xdb, 0xfd, 0xef, 0x16, 0xac, 0xbf, 0x8a, 0x49, 0x61, 0xfa, 0x1c, 0x93, 0xb8, + 0x44, 0xb9, 0x93, 0x64, 0xc1, 0x01, 0xc7, 0xcf, 0x05, 0x92, 0x62, 0x5b, 0xd0, 0xdb, 0xd7, 0xf6, + 0x64, 0x8a, 0x71, 0x34, 0x55, 0x8e, 0xe5, 0x59, 0x83, 0x16, 0xef, 0x1a, 0xdf, 0x9e, 0x71, 0xb1, + 0xdb, 0xd0, 0x52, 0x33, 0x72, 0x96, 0xbd, 0xd6, 0xa0, 0xc7, 0x35, 0x64, 0x23, 0x68, 0x63, 0x89, + 0xa9, 0x22, 0xa7, 0xe5, 0xb5, 0x06, 0xdd, 0xd1, 0x86, 0xdf, 0x40, 0xec, 0xbf, 0xd0, 0x29, 0xbc, + 0xce, 0x64, 0x4f, 0x01, 0xd4, 0x6c, 0x22, 0x91, 0x8a, 0x44, 0x91, 0xb3, 0x62, 0xea, 0xb6, 0x9a, + 0xeb, 0x66, 0x18, 0xbc, 0x99, 0x71, 0x93, 0xc9, 0x6d, 0x55, 0x23, 0xea, 0x6f, 0xc2, 0x46, 0xd3, + 0x1c, 0x94, 0x67, 0x29, 0x61, 0xff, 0xdb, 0xf9, 0x98, 0x63, 0x25, 0x14, 0xee, 0x4e, 0x45, 0x1a, + 0x21, 0xfd, 0xc7, 0x98, 0x4f, 0x00, 0x02, 0x53, 0x34, 0x21, 0x54, 0x66, 0xda, 0xee, 0xc8, 0x6b, + 0x14, 0x38, 0x56, 0x99, 0xc4, 0x97, 0xef, 0x5e, 0x8b, 0x58, 0x72, 0xbb, 0xaa, 0x19, 0xa3, 0x62, + 0xeb, 0xb0, 0x26, 0xf2, 0x7c, 0x32, 0x15, 0x34, 0x75, 0x5a, 0x9e, 0x35, 0xe8, 0xf1, 0x8e, 0xc8, + 0xf3, 0x3d, 0x41, 0xd3, 0xb9, 0xf4, 0x8b, 0xda, 0x6a, 0xe9, 0x11, 0x74, 0x17, 0x5a, 0x32, 0x07, + 0x3a, 0x22, 0x0c, 0x25, 0x12, 0x19, 0x99, 0xba, 0x4d, 0x65, 0xea, 0x4d, 0x1c, 0xe0, 0x91, 0xb3, + 0x6c, 0xbc, 0x1a, 0xb2, 0xbb, 0xb0, 0x5a, 0x8a, 0xa4, 0xc0, 0x9a, 0xb0, 0x32, 0xd8, 0x3d, 0x68, + 0x87, 0x98, 0xa0, 0x42, 0x67, 0xc5, 0xb3, 0x06, 0x6b, 0xbc, 0xb6, 0xfa, 0x1f, 0x61, 0xd5, 0x2c, + 0x85, 0x31, 0x58, 0x51, 0x47, 0x39, 0x9a, 0xfe, 0x36, 0x37, 0x98, 0xed, 0x02, 0x08, 0xa5, 0x64, + 0xbc, 0x5f, 0x28, 0xa4, 0x7a, 0xfe, 0x07, 0x97, 0x2f, 0xf6, 0xd9, 0x59, 0x2e, 0x5f, 0x28, 0xeb, + 0x3f, 0x82, 0x9b, 0x17, 0xa3, 0x67, 0x9a, 0x2b, 0xa6, 0x8b, 0x9a, 0x97, 0x8d, 0xaf, 0x32, 0xfa, + 0xbf, 0x2d, 0xe8, 0x2d, 0x6e, 0x5e, 0x6b, 0x0c, 0xb2, 0xb0, 0xd2, 0x78, 0x83, 0x1b, 0xac, 0x7d, + 0xa1, 0x50, 0xa2, 0xfe, 0x02, 0x06, 0x6b, 0x82, 0x24, 0x8b, 0xcc, 0x07, 0xb0, 0xb9, 0x86, 0x3a, + 0x2b, 0x4e, 0x3f, 0x65, 0x66, 0x78, 0x9b, 0x1b, 0xcc, 0xee, 0x03, 0x44, 0x82, 0x26, 0x5f, 0x44, + 0xaa, 0x30, 0x74, 0x56, 0xcd, 0xfa, 0xed, 0x48, 0xd0, 0x7b, 0xe3, 0xd0, 0xbb, 0xd3, 0xe1, 0x82, + 0x30, 0x74, 0xda, 0x26, 0xd8, 0x89, 0x04, 0xbd, 0x25, 0x0c, 0x17, 0x8e, 0xbd, 0x73, 0xed, 0x63, + 0xdf, 0x04, 0x5b, 0xeb, 0xa5, 0x5c, 0x04, 0xe8, 0xac, 0x19, 0x19, 0x73, 0xc7, 0xe8, 0x8f, 0x05, + 0xb7, 0xaa, 0x73, 0x40, 0x39, 0x46, 0x59, 0xc6, 0x01, 0xb2, 0x02, 0xd8, 0xbf, 0xc7, 0xcd, 0xfc, + 0x46, 0xae, 0x4b, 0xff, 0xe6, 0x8d, 0xe1, 0xb5, 0xf3, 0xab, 0xd3, 0x9b, 0xd3, 0x2e, 0x1e, 0xe6, + 0x95, 0xb4, 0x0d, 0x7f, 0xd7, 0x95, 0xb4, 0x4d, 0x17, 0xbf, 0xf3, 0xf8, 0xc7, 0x89, 0x6b, 0x1d, + 0x9f, 0xb8, 0xd6, 0xaf, 0x13, 0xd7, 0xfa, 0x7a, 0xea, 0x2e, 0x1d, 0x9f, 0xba, 0x4b, 0x3f, 0x4f, + 0xdd, 0xa5, 0x0f, 0x5e, 0xd5, 0x89, 0xc2, 0x03, 0x3f, 0xce, 0x86, 0x84, 0xb2, 0x44, 0x39, 0x2c, + 0x47, 0xf3, 0x27, 0x6f, 0xbf, 0x6d, 0xde, 0xba, 0x87, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3b, + 0xbd, 0x03, 0xda, 0x0d, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ListenerServiceClient is the client API for ListenerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ListenerServiceClient interface { + // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock + ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) + // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges + ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) +} + +type listenerServiceClient struct { + cc grpc1.ClientConn +} + +func NewListenerServiceClient(cc grpc1.ClientConn) ListenerServiceClient { + return &listenerServiceClient{cc} +} + +func (c *listenerServiceClient) ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) { + out := new(ListenDeliverBlockResponse) + err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *listenerServiceClient) ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) { + out := new(ListenStateChangesResponse) + err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenStateChanges", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ListenerServiceServer is the server API for ListenerService service. +type ListenerServiceServer interface { + // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock + ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) + // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges + ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) +} + +// UnimplementedListenerServiceServer can be embedded to have forward compatible implementations. +type UnimplementedListenerServiceServer struct { +} + +func (*UnimplementedListenerServiceServer) ListenDeliverBlock(ctx context.Context, req *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenDeliverBlock not implemented") +} +func (*UnimplementedListenerServiceServer) ListenStateChanges(ctx context.Context, req *ListenStateChangesRequest) (*ListenStateChangesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenStateChanges not implemented") +} + +func RegisterListenerServiceServer(s grpc1.Server, srv ListenerServiceServer) { + s.RegisterService(&_ListenerService_serviceDesc, srv) +} + +func _ListenerService_ListenDeliverBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenDeliverBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, req.(*ListenDeliverBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ListenerService_ListenStateChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenStateChangesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerServiceServer).ListenStateChanges(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.streaming.v1.ListenerService/ListenStateChanges", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerServiceServer).ListenStateChanges(ctx, req.(*ListenStateChangesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ListenerService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.streaming.v1.ListenerService", + HandlerType: (*ListenerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListenDeliverBlock", + Handler: _ListenerService_ListenDeliverBlock_Handler, + }, + { + MethodName: "ListenStateChanges", + Handler: _ListenerService_ListenStateChanges_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/streaming/v1/grpc.proto", +} + +func (m *ListenDeliverBlockRequest) 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 *ListenDeliverBlockRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenDeliverBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TxResults) > 0 { + for iNdEx := len(m.TxResults) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TxResults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Txs[iNdEx]) + copy(dAtA[i:], m.Txs[iNdEx]) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Txs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.BlockHeight != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ListenDeliverBlockResponse) 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 *ListenDeliverBlockResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenDeliverBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ListenStateChangesRequest) 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 *ListenStateChangesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenStateChangesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AppHash) > 0 { + i -= len(m.AppHash) + copy(dAtA[i:], m.AppHash) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.AppHash))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChangeSet) > 0 { + for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.BlockHeight != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ListenStateChangesResponse) 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 *ListenStateChangesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenStateChangesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *StoreKVPair) 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 *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Delete { + i-- + if m.Delete { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x1a + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Event) 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 *Event) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventAttribute) 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 *EventAttribute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExecTxResult) 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 *ExecTxResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExecTxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Codespace) > 0 { + i -= len(m.Codespace) + copy(dAtA[i:], m.Codespace) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Codespace))) + i-- + dAtA[i] = 0x42 + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if m.GasUsed != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x30 + } + if m.GasWanted != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.GasWanted)) + i-- + dAtA[i] = 0x28 + } + if len(m.Info) > 0 { + i -= len(m.Info) + copy(dAtA[i:], m.Info) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Info))) + i-- + dAtA[i] = 0x22 + } + if len(m.Log) > 0 { + i -= len(m.Log) + copy(dAtA[i:], m.Log) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Log))) + i-- + dAtA[i] = 0x1a + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { + offset -= sovGrpc(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ListenDeliverBlockRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockHeight != 0 { + n += 1 + sovGrpc(uint64(m.BlockHeight)) + } + if len(m.Txs) > 0 { + for _, b := range m.Txs { + l = len(b) + n += 1 + l + sovGrpc(uint64(l)) + } + } + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + if len(m.TxResults) > 0 { + for _, e := range m.TxResults { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + return n +} + +func (m *ListenDeliverBlockResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ListenStateChangesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockHeight != 0 { + n += 1 + sovGrpc(uint64(m.BlockHeight)) + } + if len(m.ChangeSet) > 0 { + for _, e := range m.ChangeSet { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + l = len(m.AppHash) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + return n +} + +func (m *ListenStateChangesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *StoreKVPair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + if m.Delete { + n += 2 + } + return n +} + +func (m *Event) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + return n +} + +func (m *EventAttribute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + return n +} + +func (m *ExecTxResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovGrpc(uint64(m.Code)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Log) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Info) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + if m.GasWanted != 0 { + n += 1 + sovGrpc(uint64(m.GasWanted)) + } + if m.GasUsed != 0 { + n += 1 + sovGrpc(uint64(m.GasUsed)) + } + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + l = len(m.Codespace) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + return n +} + +func sovGrpc(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGrpc(x uint64) (n int) { + return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ListenDeliverBlockRequest) 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 ErrIntOverflowGrpc + } + 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: ListenDeliverBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenDeliverBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) + copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxResults", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxResults = append(m.TxResults, &ExecTxResult{}) + if err := m.TxResults[len(m.TxResults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenDeliverBlockResponse) 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 ErrIntOverflowGrpc + } + 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: ListenDeliverBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenDeliverBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenStateChangesRequest) 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 ErrIntOverflowGrpc + } + 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: ListenStateChangesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenStateChangesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChangeSet = append(m.ChangeSet, &StoreKVPair{}) + if err := m.ChangeSet[len(m.ChangeSet)-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 AppHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) + if m.AppHash == nil { + m.AppHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenStateChangesResponse) 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 ErrIntOverflowGrpc + } + 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: ListenStateChangesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenStateChangesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreKVPair) 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 ErrIntOverflowGrpc + } + 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: StoreKVPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Delete = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Event) 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 ErrIntOverflowGrpc + } + 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: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + 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 ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &EventAttribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAttribute) 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 ErrIntOverflowGrpc + } + 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: EventAttribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + 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 ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + 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 ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecTxResult) 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 ErrIntOverflowGrpc + } + 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: ExecTxResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecTxResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + 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 ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Log = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + 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 ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Info = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) + } + m.GasWanted = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasWanted |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + m.GasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasUsed |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + 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 ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Codespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGrpc(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGrpc + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGrpc + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGrpc + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/store/snapshots/types/snapshot.pb.go b/cosmossdk.io/store/snapshots/types/snapshot.pb.go new file mode 100644 index 000000000000..e81660c4596e --- /dev/null +++ b/cosmossdk.io/store/snapshots/types/snapshot.pb.go @@ -0,0 +1,2008 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/store/snapshots/v1/snapshot.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Snapshot contains Tendermint state sync snapshot info. +type Snapshot struct { + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` + Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"` + Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` + Metadata Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata"` +} + +func (m *Snapshot) Reset() { *m = Snapshot{} } +func (m *Snapshot) String() string { return proto.CompactTextString(m) } +func (*Snapshot) ProtoMessage() {} +func (*Snapshot) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{0} +} +func (m *Snapshot) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Snapshot.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 *Snapshot) XXX_Merge(src proto.Message) { + xxx_messageInfo_Snapshot.Merge(m, src) +} +func (m *Snapshot) XXX_Size() int { + return m.Size() +} +func (m *Snapshot) XXX_DiscardUnknown() { + xxx_messageInfo_Snapshot.DiscardUnknown(m) +} + +var xxx_messageInfo_Snapshot proto.InternalMessageInfo + +func (m *Snapshot) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *Snapshot) GetFormat() uint32 { + if m != nil { + return m.Format + } + return 0 +} + +func (m *Snapshot) GetChunks() uint32 { + if m != nil { + return m.Chunks + } + return 0 +} + +func (m *Snapshot) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *Snapshot) GetMetadata() Metadata { + if m != nil { + return m.Metadata + } + return Metadata{} +} + +// Metadata contains SDK-specific snapshot metadata. +type Metadata struct { + ChunkHashes [][]byte `protobuf:"bytes,1,rep,name=chunk_hashes,json=chunkHashes,proto3" json:"chunk_hashes,omitempty"` +} + +func (m *Metadata) Reset() { *m = Metadata{} } +func (m *Metadata) String() string { return proto.CompactTextString(m) } +func (*Metadata) ProtoMessage() {} +func (*Metadata) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{1} +} +func (m *Metadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metadata.Merge(m, src) +} +func (m *Metadata) XXX_Size() int { + return m.Size() +} +func (m *Metadata) XXX_DiscardUnknown() { + xxx_messageInfo_Metadata.DiscardUnknown(m) +} + +var xxx_messageInfo_Metadata proto.InternalMessageInfo + +func (m *Metadata) GetChunkHashes() [][]byte { + if m != nil { + return m.ChunkHashes + } + return nil +} + +// SnapshotItem is an item contained in a rootmulti.Store snapshot. +type SnapshotItem struct { + // item is the specific type of snapshot item. + // + // Types that are valid to be assigned to Item: + // + // *SnapshotItem_Store + // *SnapshotItem_IAVL + // *SnapshotItem_Extension + // *SnapshotItem_ExtensionPayload + Item isSnapshotItem_Item `protobuf_oneof:"item"` +} + +func (m *SnapshotItem) Reset() { *m = SnapshotItem{} } +func (m *SnapshotItem) String() string { return proto.CompactTextString(m) } +func (*SnapshotItem) ProtoMessage() {} +func (*SnapshotItem) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{2} +} +func (m *SnapshotItem) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotItem.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 *SnapshotItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotItem.Merge(m, src) +} +func (m *SnapshotItem) XXX_Size() int { + return m.Size() +} +func (m *SnapshotItem) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotItem.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotItem proto.InternalMessageInfo + +type isSnapshotItem_Item interface { + isSnapshotItem_Item() + MarshalTo([]byte) (int, error) + Size() int +} + +type SnapshotItem_Store struct { + Store *SnapshotStoreItem `protobuf:"bytes,1,opt,name=store,proto3,oneof" json:"store,omitempty"` +} +type SnapshotItem_IAVL struct { + IAVL *SnapshotIAVLItem `protobuf:"bytes,2,opt,name=iavl,proto3,oneof" json:"iavl,omitempty"` +} +type SnapshotItem_Extension struct { + Extension *SnapshotExtensionMeta `protobuf:"bytes,3,opt,name=extension,proto3,oneof" json:"extension,omitempty"` +} +type SnapshotItem_ExtensionPayload struct { + ExtensionPayload *SnapshotExtensionPayload `protobuf:"bytes,4,opt,name=extension_payload,json=extensionPayload,proto3,oneof" json:"extension_payload,omitempty"` +} + +func (*SnapshotItem_Store) isSnapshotItem_Item() {} +func (*SnapshotItem_IAVL) isSnapshotItem_Item() {} +func (*SnapshotItem_Extension) isSnapshotItem_Item() {} +func (*SnapshotItem_ExtensionPayload) isSnapshotItem_Item() {} + +func (m *SnapshotItem) GetItem() isSnapshotItem_Item { + if m != nil { + return m.Item + } + return nil +} + +func (m *SnapshotItem) GetStore() *SnapshotStoreItem { + if x, ok := m.GetItem().(*SnapshotItem_Store); ok { + return x.Store + } + return nil +} + +func (m *SnapshotItem) GetIAVL() *SnapshotIAVLItem { + if x, ok := m.GetItem().(*SnapshotItem_IAVL); ok { + return x.IAVL + } + return nil +} + +func (m *SnapshotItem) GetExtension() *SnapshotExtensionMeta { + if x, ok := m.GetItem().(*SnapshotItem_Extension); ok { + return x.Extension + } + return nil +} + +func (m *SnapshotItem) GetExtensionPayload() *SnapshotExtensionPayload { + if x, ok := m.GetItem().(*SnapshotItem_ExtensionPayload); ok { + return x.ExtensionPayload + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*SnapshotItem) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*SnapshotItem_Store)(nil), + (*SnapshotItem_IAVL)(nil), + (*SnapshotItem_Extension)(nil), + (*SnapshotItem_ExtensionPayload)(nil), + } +} + +// SnapshotStoreItem contains metadata about a snapshotted store. +type SnapshotStoreItem struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *SnapshotStoreItem) Reset() { *m = SnapshotStoreItem{} } +func (m *SnapshotStoreItem) String() string { return proto.CompactTextString(m) } +func (*SnapshotStoreItem) ProtoMessage() {} +func (*SnapshotStoreItem) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{3} +} +func (m *SnapshotStoreItem) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotStoreItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotStoreItem.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 *SnapshotStoreItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotStoreItem.Merge(m, src) +} +func (m *SnapshotStoreItem) XXX_Size() int { + return m.Size() +} +func (m *SnapshotStoreItem) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotStoreItem.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotStoreItem proto.InternalMessageInfo + +func (m *SnapshotStoreItem) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// SnapshotIAVLItem is an exported IAVL node. +type SnapshotIAVLItem struct { + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // version is block height + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + // height is depth of the tree. + Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` +} + +func (m *SnapshotIAVLItem) Reset() { *m = SnapshotIAVLItem{} } +func (m *SnapshotIAVLItem) String() string { return proto.CompactTextString(m) } +func (*SnapshotIAVLItem) ProtoMessage() {} +func (*SnapshotIAVLItem) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{4} +} +func (m *SnapshotIAVLItem) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotIAVLItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotIAVLItem.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 *SnapshotIAVLItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotIAVLItem.Merge(m, src) +} +func (m *SnapshotIAVLItem) XXX_Size() int { + return m.Size() +} +func (m *SnapshotIAVLItem) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotIAVLItem.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotIAVLItem proto.InternalMessageInfo + +func (m *SnapshotIAVLItem) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *SnapshotIAVLItem) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *SnapshotIAVLItem) GetVersion() int64 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *SnapshotIAVLItem) GetHeight() int32 { + if m != nil { + return m.Height + } + return 0 +} + +// SnapshotExtensionMeta contains metadata about an external snapshotter. +type SnapshotExtensionMeta struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` +} + +func (m *SnapshotExtensionMeta) Reset() { *m = SnapshotExtensionMeta{} } +func (m *SnapshotExtensionMeta) String() string { return proto.CompactTextString(m) } +func (*SnapshotExtensionMeta) ProtoMessage() {} +func (*SnapshotExtensionMeta) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{5} +} +func (m *SnapshotExtensionMeta) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotExtensionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotExtensionMeta.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 *SnapshotExtensionMeta) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotExtensionMeta.Merge(m, src) +} +func (m *SnapshotExtensionMeta) XXX_Size() int { + return m.Size() +} +func (m *SnapshotExtensionMeta) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotExtensionMeta.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotExtensionMeta proto.InternalMessageInfo + +func (m *SnapshotExtensionMeta) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *SnapshotExtensionMeta) GetFormat() uint32 { + if m != nil { + return m.Format + } + return 0 +} + +// SnapshotExtensionPayload contains payloads of an external snapshotter. +type SnapshotExtensionPayload struct { + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (m *SnapshotExtensionPayload) Reset() { *m = SnapshotExtensionPayload{} } +func (m *SnapshotExtensionPayload) String() string { return proto.CompactTextString(m) } +func (*SnapshotExtensionPayload) ProtoMessage() {} +func (*SnapshotExtensionPayload) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{6} +} +func (m *SnapshotExtensionPayload) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotExtensionPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotExtensionPayload.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 *SnapshotExtensionPayload) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotExtensionPayload.Merge(m, src) +} +func (m *SnapshotExtensionPayload) XXX_Size() int { + return m.Size() +} +func (m *SnapshotExtensionPayload) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotExtensionPayload.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotExtensionPayload proto.InternalMessageInfo + +func (m *SnapshotExtensionPayload) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func init() { + proto.RegisterType((*Snapshot)(nil), "cosmos.store.snapshots.v1.Snapshot") + proto.RegisterType((*Metadata)(nil), "cosmos.store.snapshots.v1.Metadata") + proto.RegisterType((*SnapshotItem)(nil), "cosmos.store.snapshots.v1.SnapshotItem") + proto.RegisterType((*SnapshotStoreItem)(nil), "cosmos.store.snapshots.v1.SnapshotStoreItem") + proto.RegisterType((*SnapshotIAVLItem)(nil), "cosmos.store.snapshots.v1.SnapshotIAVLItem") + proto.RegisterType((*SnapshotExtensionMeta)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionMeta") + proto.RegisterType((*SnapshotExtensionPayload)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionPayload") +} + +func init() { + proto.RegisterFile("cosmos/store/snapshots/v1/snapshot.proto", fileDescriptor_3d5cca1aa5b69183) +} + +var fileDescriptor_3d5cca1aa5b69183 = []byte{ + // 538 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x6f, 0xd3, 0x3c, + 0x18, 0x8e, 0xd7, 0xb4, 0x5f, 0xf7, 0x26, 0x9f, 0xe8, 0xcc, 0x40, 0x61, 0x87, 0x2c, 0x84, 0x4b, + 0x24, 0x68, 0xba, 0x75, 0x88, 0x03, 0xda, 0x85, 0x8a, 0x49, 0xad, 0x00, 0x69, 0xf2, 0x24, 0x84, + 0xb8, 0x54, 0xde, 0x6a, 0x9a, 0xaa, 0x4d, 0x5d, 0xd5, 0x5e, 0x45, 0x8f, 0xfc, 0x03, 0xfe, 0x08, + 0x37, 0x7e, 0xc4, 0x8e, 0x13, 0x27, 0x4e, 0x13, 0x6a, 0xff, 0x02, 0x3f, 0x00, 0xd9, 0x4e, 0x0a, + 0xda, 0x52, 0x34, 0x6e, 0xef, 0xf3, 0xfa, 0x79, 0x1e, 0xfb, 0x7d, 0xec, 0x04, 0xa2, 0x33, 0x2e, + 0x52, 0x2e, 0x1a, 0x42, 0xf2, 0x29, 0x6b, 0x88, 0x31, 0x9d, 0x88, 0x84, 0x4b, 0xd1, 0x98, 0xed, + 0xaf, 0x40, 0x3c, 0x99, 0x72, 0xc9, 0xf1, 0x03, 0xc3, 0x8c, 0x35, 0x33, 0x5e, 0x31, 0xe3, 0xd9, + 0xfe, 0xce, 0x76, 0x9f, 0xf7, 0xb9, 0x66, 0x35, 0x54, 0x65, 0x04, 0x3b, 0x99, 0xa0, 0x6b, 0x16, + 0x32, 0xb5, 0x06, 0xe1, 0x17, 0x04, 0xd5, 0x93, 0xcc, 0x01, 0xdf, 0x87, 0x4a, 0xc2, 0x06, 0xfd, + 0x44, 0x7a, 0x28, 0x40, 0x91, 0x4d, 0x32, 0xa4, 0xfa, 0x1f, 0xf8, 0x34, 0xa5, 0xd2, 0xdb, 0x08, + 0x50, 0xf4, 0x3f, 0xc9, 0x90, 0xea, 0x9f, 0x25, 0xe7, 0xe3, 0xa1, 0xf0, 0x4a, 0xa6, 0x6f, 0x10, + 0xc6, 0x60, 0x27, 0x54, 0x24, 0x9e, 0x1d, 0xa0, 0xc8, 0x25, 0xba, 0xc6, 0x47, 0x50, 0x4d, 0x99, + 0xa4, 0x3d, 0x2a, 0xa9, 0x57, 0x0e, 0x50, 0xe4, 0x34, 0x1f, 0xc5, 0x6b, 0xe7, 0x88, 0xdf, 0x64, + 0xd4, 0x96, 0x7d, 0x71, 0xb5, 0x6b, 0x91, 0x95, 0x34, 0xac, 0x43, 0x35, 0x5f, 0xc3, 0x0f, 0xc1, + 0xd5, 0x1b, 0x76, 0xd5, 0x06, 0x4c, 0x78, 0x28, 0x28, 0x45, 0x2e, 0x71, 0x74, 0xaf, 0xad, 0x5b, + 0xe1, 0xcf, 0x0d, 0x70, 0xf3, 0xf1, 0x3a, 0x92, 0xa5, 0xf8, 0x25, 0x94, 0xf5, 0x76, 0x7a, 0x42, + 0xa7, 0xf9, 0xe4, 0x2f, 0x67, 0xc8, 0x75, 0x27, 0x6a, 0x49, 0x89, 0xdb, 0x16, 0x31, 0x62, 0xfc, + 0x0a, 0xec, 0x01, 0x9d, 0x8d, 0x74, 0x1c, 0x4e, 0xf3, 0xf1, 0x2d, 0x4c, 0x3a, 0x2f, 0xde, 0xbe, + 0x56, 0x1e, 0xad, 0xea, 0xe2, 0x6a, 0xd7, 0x56, 0xa8, 0x6d, 0x11, 0x6d, 0x82, 0x8f, 0x61, 0x93, + 0x7d, 0x94, 0x6c, 0x2c, 0x06, 0x7c, 0xac, 0x83, 0x74, 0x9a, 0x7b, 0xb7, 0x70, 0x3c, 0xca, 0x35, + 0x2a, 0x8f, 0xb6, 0x45, 0x7e, 0x9b, 0xe0, 0x53, 0xd8, 0x5a, 0x81, 0xee, 0x84, 0xce, 0x47, 0x9c, + 0xf6, 0xf4, 0x65, 0x38, 0xcd, 0x83, 0x7f, 0x71, 0x3e, 0x36, 0xd2, 0xb6, 0x45, 0x6a, 0xec, 0x5a, + 0xef, 0xf9, 0xdd, 0x6f, 0x5f, 0xeb, 0x77, 0x8c, 0x57, 0x5d, 0xf4, 0x86, 0xc1, 0x5e, 0xfc, 0xf4, + 0x59, 0xab, 0x02, 0xf6, 0x40, 0xb2, 0x34, 0x3c, 0x84, 0xad, 0x1b, 0xe9, 0xa9, 0x57, 0x31, 0xa6, + 0xa9, 0x49, 0x7e, 0x93, 0xe8, 0xba, 0xd0, 0x25, 0xfc, 0x84, 0xa0, 0x76, 0x3d, 0x37, 0x5c, 0x83, + 0xd2, 0x90, 0xcd, 0xb5, 0xd8, 0x25, 0xaa, 0xc4, 0xdb, 0x50, 0x9e, 0xd1, 0xd1, 0x39, 0xd3, 0xb7, + 0xe0, 0x12, 0x03, 0xb0, 0x07, 0xff, 0xcd, 0xd8, 0x74, 0x95, 0x65, 0x89, 0xe4, 0xf0, 0x8f, 0xd7, + 0xad, 0xa2, 0x28, 0xe7, 0xaf, 0xbb, 0xf8, 0x0c, 0xef, 0xe0, 0x5e, 0x61, 0xd0, 0x45, 0x53, 0xac, + 0xfb, 0x3e, 0x8a, 0x9d, 0x3b, 0xe0, 0xad, 0x0b, 0x5a, 0x1d, 0x3e, 0xbf, 0x2e, 0x33, 0x68, 0x0e, + 0x8b, 0xe3, 0x3e, 0xbc, 0x58, 0xf8, 0xe8, 0x72, 0xe1, 0xa3, 0x1f, 0x0b, 0x1f, 0x7d, 0x5e, 0xfa, + 0xd6, 0xe5, 0xd2, 0xb7, 0xbe, 0x2f, 0x7d, 0xeb, 0x7d, 0x68, 0xa8, 0xa2, 0x37, 0x8c, 0x07, 0xfc, + 0xc6, 0x2f, 0x45, 0xce, 0x27, 0x4c, 0x9c, 0x56, 0xf4, 0x1f, 0xe0, 0xe0, 0x57, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x57, 0xe2, 0xd5, 0x36, 0x79, 0x04, 0x00, 0x00, +} + +func (m *Snapshot) 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 *Snapshot) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x22 + } + if m.Chunks != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Chunks)) + i-- + dAtA[i] = 0x18 + } + if m.Format != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) + i-- + dAtA[i] = 0x10 + } + if m.Height != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Metadata) 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 *Metadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ChunkHashes) > 0 { + for iNdEx := len(m.ChunkHashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ChunkHashes[iNdEx]) + copy(dAtA[i:], m.ChunkHashes[iNdEx]) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.ChunkHashes[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SnapshotItem) 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 *SnapshotItem) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Item != nil { + { + size := m.Item.Size() + i -= size + if _, err := m.Item.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *SnapshotItem_Store) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem_Store) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Store != nil { + { + size, err := m.Store.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *SnapshotItem_IAVL) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem_IAVL) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.IAVL != nil { + { + size, err := m.IAVL.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *SnapshotItem_Extension) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem_Extension) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Extension != nil { + { + size, err := m.Extension.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *SnapshotItem_ExtensionPayload) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem_ExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ExtensionPayload != nil { + { + size, err := m.ExtensionPayload.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *SnapshotStoreItem) 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 *SnapshotStoreItem) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotStoreItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SnapshotIAVLItem) 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 *SnapshotIAVLItem) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotIAVLItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Height != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x20 + } + if m.Version != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x18 + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SnapshotExtensionMeta) 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 *SnapshotExtensionMeta) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotExtensionMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Format != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SnapshotExtensionPayload) 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 *SnapshotExtensionPayload) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintSnapshot(dAtA []byte, offset int, v uint64) int { + offset -= sovSnapshot(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Snapshot) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovSnapshot(uint64(m.Height)) + } + if m.Format != 0 { + n += 1 + sovSnapshot(uint64(m.Format)) + } + if m.Chunks != 0 { + n += 1 + sovSnapshot(uint64(m.Chunks)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + l = m.Metadata.Size() + n += 1 + l + sovSnapshot(uint64(l)) + return n +} + +func (m *Metadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ChunkHashes) > 0 { + for _, b := range m.ChunkHashes { + l = len(b) + n += 1 + l + sovSnapshot(uint64(l)) + } + } + return n +} + +func (m *SnapshotItem) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Item != nil { + n += m.Item.Size() + } + return n +} + +func (m *SnapshotItem_Store) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Store != nil { + l = m.Store.Size() + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} +func (m *SnapshotItem_IAVL) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IAVL != nil { + l = m.IAVL.Size() + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} +func (m *SnapshotItem_Extension) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Extension != nil { + l = m.Extension.Size() + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} +func (m *SnapshotItem_ExtensionPayload) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ExtensionPayload != nil { + l = m.ExtensionPayload.Size() + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} +func (m *SnapshotStoreItem) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} + +func (m *SnapshotIAVLItem) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + if m.Version != 0 { + n += 1 + sovSnapshot(uint64(m.Version)) + } + if m.Height != 0 { + n += 1 + sovSnapshot(uint64(m.Height)) + } + return n +} + +func (m *SnapshotExtensionMeta) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + if m.Format != 0 { + n += 1 + sovSnapshot(uint64(m.Format)) + } + return n +} + +func (m *SnapshotExtensionPayload) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} + +func sovSnapshot(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozSnapshot(x uint64) (n int) { + return sovSnapshot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Snapshot) 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 ErrIntOverflowSnapshot + } + 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: Snapshot: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) + } + m.Format = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Format |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType) + } + m.Chunks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Chunks |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Metadata) 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 ErrIntOverflowSnapshot + } + 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: Metadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChunkHashes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChunkHashes = append(m.ChunkHashes, make([]byte, postIndex-iNdEx)) + copy(m.ChunkHashes[len(m.ChunkHashes)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotItem) 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 ErrIntOverflowSnapshot + } + 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: SnapshotItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Store", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SnapshotStoreItem{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &SnapshotItem_Store{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IAVL", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SnapshotIAVLItem{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &SnapshotItem_IAVL{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SnapshotExtensionMeta{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &SnapshotItem_Extension{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtensionPayload", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SnapshotExtensionPayload{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &SnapshotItem_ExtensionPayload{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotStoreItem) 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 ErrIntOverflowSnapshot + } + 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: SnapshotStoreItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotStoreItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + 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 ErrInvalidLengthSnapshot + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotIAVLItem) 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 ErrIntOverflowSnapshot + } + 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: SnapshotIAVLItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotIAVLItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotExtensionMeta) 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 ErrIntOverflowSnapshot + } + 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: SnapshotExtensionMeta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotExtensionMeta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + 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 ErrInvalidLengthSnapshot + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) + } + m.Format = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Format |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotExtensionPayload) 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 ErrIntOverflowSnapshot + } + 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: SnapshotExtensionPayload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotExtensionPayload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSnapshot(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSnapshot + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSnapshot + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSnapshot + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthSnapshot + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSnapshot + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthSnapshot + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSnapshot = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/store/streaming/abci/grpc.pb.go b/cosmossdk.io/store/streaming/abci/grpc.pb.go new file mode 100644 index 000000000000..b9a8e7622c53 --- /dev/null +++ b/cosmossdk.io/store/streaming/abci/grpc.pb.go @@ -0,0 +1,1050 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/store/streaming/abci/grpc.proto + +package abci + +import ( + context "context" + types "cosmossdk.io/store/types" + fmt "fmt" + v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ListenEndBlockRequest is the request type for the ListenEndBlock RPC method +type ListenFinalizeBlockRequest struct { + Req *v1.FinalizeBlockRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"` + Res *v1.FinalizeBlockResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` +} + +func (m *ListenFinalizeBlockRequest) Reset() { *m = ListenFinalizeBlockRequest{} } +func (m *ListenFinalizeBlockRequest) String() string { return proto.CompactTextString(m) } +func (*ListenFinalizeBlockRequest) ProtoMessage() {} +func (*ListenFinalizeBlockRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7b98083eb9315fb6, []int{0} +} +func (m *ListenFinalizeBlockRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenFinalizeBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenFinalizeBlockRequest.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 *ListenFinalizeBlockRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenFinalizeBlockRequest.Merge(m, src) +} +func (m *ListenFinalizeBlockRequest) XXX_Size() int { + return m.Size() +} +func (m *ListenFinalizeBlockRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListenFinalizeBlockRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenFinalizeBlockRequest proto.InternalMessageInfo + +func (m *ListenFinalizeBlockRequest) GetReq() *v1.FinalizeBlockRequest { + if m != nil { + return m.Req + } + return nil +} + +func (m *ListenFinalizeBlockRequest) GetRes() *v1.FinalizeBlockResponse { + if m != nil { + return m.Res + } + return nil +} + +// ListenEndBlockResponse is the response type for the ListenEndBlock RPC method +type ListenFinalizeBlockResponse struct { +} + +func (m *ListenFinalizeBlockResponse) Reset() { *m = ListenFinalizeBlockResponse{} } +func (m *ListenFinalizeBlockResponse) String() string { return proto.CompactTextString(m) } +func (*ListenFinalizeBlockResponse) ProtoMessage() {} +func (*ListenFinalizeBlockResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7b98083eb9315fb6, []int{1} +} +func (m *ListenFinalizeBlockResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenFinalizeBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenFinalizeBlockResponse.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 *ListenFinalizeBlockResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenFinalizeBlockResponse.Merge(m, src) +} +func (m *ListenFinalizeBlockResponse) XXX_Size() int { + return m.Size() +} +func (m *ListenFinalizeBlockResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListenFinalizeBlockResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenFinalizeBlockResponse proto.InternalMessageInfo + +// ListenCommitRequest is the request type for the ListenCommit RPC method +type ListenCommitRequest struct { + // explicitly pass in block height as ResponseCommit does not contain this + // info + BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + Res *v1.CommitResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` + ChangeSet []*types.StoreKVPair `protobuf:"bytes,3,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` +} + +func (m *ListenCommitRequest) Reset() { *m = ListenCommitRequest{} } +func (m *ListenCommitRequest) String() string { return proto.CompactTextString(m) } +func (*ListenCommitRequest) ProtoMessage() {} +func (*ListenCommitRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7b98083eb9315fb6, []int{2} +} +func (m *ListenCommitRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenCommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenCommitRequest.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 *ListenCommitRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenCommitRequest.Merge(m, src) +} +func (m *ListenCommitRequest) XXX_Size() int { + return m.Size() +} +func (m *ListenCommitRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListenCommitRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenCommitRequest proto.InternalMessageInfo + +func (m *ListenCommitRequest) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *ListenCommitRequest) GetRes() *v1.CommitResponse { + if m != nil { + return m.Res + } + return nil +} + +func (m *ListenCommitRequest) GetChangeSet() []*types.StoreKVPair { + if m != nil { + return m.ChangeSet + } + return nil +} + +// ListenCommitResponse is the response type for the ListenCommit RPC method +type ListenCommitResponse struct { +} + +func (m *ListenCommitResponse) Reset() { *m = ListenCommitResponse{} } +func (m *ListenCommitResponse) String() string { return proto.CompactTextString(m) } +func (*ListenCommitResponse) ProtoMessage() {} +func (*ListenCommitResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7b98083eb9315fb6, []int{3} +} +func (m *ListenCommitResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenCommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenCommitResponse.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 *ListenCommitResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenCommitResponse.Merge(m, src) +} +func (m *ListenCommitResponse) XXX_Size() int { + return m.Size() +} +func (m *ListenCommitResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListenCommitResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenCommitResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ListenFinalizeBlockRequest)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockRequest") + proto.RegisterType((*ListenFinalizeBlockResponse)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockResponse") + proto.RegisterType((*ListenCommitRequest)(nil), "cosmos.store.streaming.abci.ListenCommitRequest") + proto.RegisterType((*ListenCommitResponse)(nil), "cosmos.store.streaming.abci.ListenCommitResponse") +} + +func init() { + proto.RegisterFile("cosmos/store/streaming/abci/grpc.proto", fileDescriptor_7b98083eb9315fb6) +} + +var fileDescriptor_7b98083eb9315fb6 = []byte{ + // 414 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x8f, 0xd2, 0x40, + 0x18, 0xc6, 0x29, 0x4d, 0x4c, 0x1c, 0x38, 0x0d, 0xc6, 0x90, 0xa2, 0x0d, 0x34, 0x06, 0x39, 0x4d, + 0x6d, 0x3d, 0x88, 0xf1, 0xa2, 0x90, 0x18, 0x8d, 0x1e, 0x4c, 0x49, 0x3c, 0x78, 0x21, 0x6d, 0x7d, + 0x2d, 0x13, 0x68, 0xa7, 0xcc, 0x8c, 0x4d, 0xf4, 0x13, 0x78, 0x74, 0x0f, 0xfb, 0x35, 0xf6, 0x73, + 0xec, 0x91, 0xe3, 0x1e, 0x37, 0xf0, 0x45, 0x36, 0x9d, 0x59, 0x08, 0xcd, 0xb2, 0x7f, 0x38, 0xf6, + 0x9d, 0xe7, 0xf7, 0xbc, 0x4f, 0xe7, 0x7d, 0x07, 0xf5, 0x63, 0x26, 0x52, 0x26, 0x5c, 0x21, 0x19, + 0x07, 0x57, 0x48, 0x0e, 0x61, 0x4a, 0xb3, 0xc4, 0x0d, 0xa3, 0x98, 0xba, 0x09, 0xcf, 0x63, 0x92, + 0x73, 0x26, 0x19, 0xee, 0x68, 0x1d, 0x51, 0x3a, 0xb2, 0xd3, 0x91, 0x52, 0x67, 0x3d, 0x8b, 0x59, + 0x0a, 0x32, 0xfa, 0x25, 0x35, 0x56, 0x78, 0xae, 0xfc, 0x93, 0x83, 0xd0, 0xa8, 0xf5, 0xa2, 0xd2, + 0xa2, 0xf0, 0x22, 0x90, 0xa1, 0xe7, 0x2e, 0xa8, 0x90, 0x90, 0x95, 0x16, 0x4a, 0xe5, 0x9c, 0x18, + 0xc8, 0xfa, 0xaa, 0x6a, 0x1f, 0x69, 0x16, 0x2e, 0xe8, 0x5f, 0x18, 0x2d, 0x58, 0x3c, 0x0f, 0x60, + 0xf9, 0x1b, 0x84, 0xc4, 0x43, 0x64, 0x72, 0x58, 0xb6, 0x8d, 0xae, 0x31, 0x68, 0xf8, 0x7d, 0xb2, + 0x6d, 0xa8, 0xfa, 0x93, 0xc2, 0x23, 0x87, 0xa0, 0xa0, 0x44, 0xf0, 0xdb, 0x92, 0x14, 0xed, 0xba, + 0x22, 0x5f, 0xde, 0x4b, 0x8a, 0x9c, 0x65, 0x02, 0x4a, 0x54, 0x38, 0xcf, 0x51, 0xe7, 0x60, 0x24, + 0xad, 0x71, 0xce, 0x0c, 0xd4, 0xd2, 0xe7, 0x63, 0x96, 0xa6, 0x54, 0x6e, 0xb3, 0xf6, 0x50, 0x33, + 0x2a, 0x85, 0xd3, 0x19, 0xd0, 0x64, 0x26, 0x55, 0x68, 0x33, 0x68, 0xa8, 0xda, 0x27, 0x55, 0xc2, + 0xfe, 0x7e, 0xa8, 0xee, 0xcd, 0x50, 0x5b, 0xc3, 0xbd, 0x34, 0xf8, 0x3d, 0x42, 0xf1, 0x2c, 0xcc, + 0x12, 0x98, 0x0a, 0x90, 0x6d, 0xb3, 0x6b, 0x0e, 0x1a, 0x7e, 0x8f, 0x54, 0xe6, 0x72, 0x7d, 0xb9, + 0x64, 0x52, 0x7e, 0x7d, 0xf9, 0xfe, 0x2d, 0xa4, 0x3c, 0x78, 0xac, 0xa1, 0x09, 0x48, 0xe7, 0x29, + 0x7a, 0x52, 0xcd, 0xab, 0xed, 0xfd, 0xd3, 0x3a, 0x6a, 0x7d, 0x18, 0x8d, 0x3f, 0xeb, 0x43, 0xe0, + 0x13, 0xe0, 0x05, 0x8d, 0x01, 0xff, 0xdb, 0xfd, 0x60, 0xe5, 0x02, 0xf0, 0x1b, 0x72, 0xc7, 0x36, + 0x90, 0xdb, 0xa7, 0x68, 0x0d, 0x8f, 0x07, 0x75, 0x44, 0x2c, 0x50, 0x73, 0x3f, 0x3a, 0x7e, 0xf5, + 0x00, 0xa7, 0xca, 0x54, 0x2c, 0xef, 0x08, 0x42, 0x37, 0x1d, 0xbd, 0x3b, 0x5f, 0xdb, 0xc6, 0x6a, + 0x6d, 0x1b, 0x97, 0x6b, 0xdb, 0xf8, 0xbf, 0xb1, 0x6b, 0xab, 0x8d, 0x5d, 0xbb, 0xd8, 0xd8, 0xb5, + 0x1f, 0x3d, 0xed, 0x25, 0x7e, 0xce, 0x09, 0x65, 0x07, 0x1f, 0x4f, 0xf4, 0x48, 0xed, 0xf5, 0xeb, + 0xab, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xf4, 0x63, 0xc3, 0x62, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ABCIListenerServiceClient is the client API for ABCIListenerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ABCIListenerServiceClient interface { + // ListenFinalizeBlock is the corresponding endpoint for + // ABCIListener.ListenEndBlock + ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) + // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit + ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) +} + +type aBCIListenerServiceClient struct { + cc grpc1.ClientConn +} + +func NewABCIListenerServiceClient(cc grpc1.ClientConn) ABCIListenerServiceClient { + return &aBCIListenerServiceClient{cc} +} + +func (c *aBCIListenerServiceClient) ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) { + out := new(ListenFinalizeBlockResponse) + err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aBCIListenerServiceClient) ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) { + out := new(ListenCommitResponse) + err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ABCIListenerServiceServer is the server API for ABCIListenerService service. +type ABCIListenerServiceServer interface { + // ListenFinalizeBlock is the corresponding endpoint for + // ABCIListener.ListenEndBlock + ListenFinalizeBlock(context.Context, *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) + // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit + ListenCommit(context.Context, *ListenCommitRequest) (*ListenCommitResponse, error) +} + +// UnimplementedABCIListenerServiceServer can be embedded to have forward compatible implementations. +type UnimplementedABCIListenerServiceServer struct { +} + +func (*UnimplementedABCIListenerServiceServer) ListenFinalizeBlock(ctx context.Context, req *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenFinalizeBlock not implemented") +} +func (*UnimplementedABCIListenerServiceServer) ListenCommit(ctx context.Context, req *ListenCommitRequest) (*ListenCommitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenCommit not implemented") +} + +func RegisterABCIListenerServiceServer(s grpc1.Server, srv ABCIListenerServiceServer) { + s.RegisterService(&_ABCIListenerService_serviceDesc, srv) +} + +func _ABCIListenerService_ListenFinalizeBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenFinalizeBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, req.(*ListenFinalizeBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ABCIListenerService_ListenCommit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenCommitRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIListenerServiceServer).ListenCommit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIListenerServiceServer).ListenCommit(ctx, req.(*ListenCommitRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ABCIListenerService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.store.streaming.abci.ABCIListenerService", + HandlerType: (*ABCIListenerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListenFinalizeBlock", + Handler: _ABCIListenerService_ListenFinalizeBlock_Handler, + }, + { + MethodName: "ListenCommit", + Handler: _ABCIListenerService_ListenCommit_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/store/streaming/abci/grpc.proto", +} + +func (m *ListenFinalizeBlockRequest) 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 *ListenFinalizeBlockRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenFinalizeBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Res != nil { + { + size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Req != nil { + { + size, err := m.Req.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ListenFinalizeBlockResponse) 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 *ListenFinalizeBlockResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenFinalizeBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ListenCommitRequest) 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 *ListenCommitRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenCommitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ChangeSet) > 0 { + for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Res != nil { + { + size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.BlockHeight != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ListenCommitResponse) 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 *ListenCommitResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenCommitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { + offset -= sovGrpc(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ListenFinalizeBlockRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Req != nil { + l = m.Req.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + if m.Res != nil { + l = m.Res.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + return n +} + +func (m *ListenFinalizeBlockResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ListenCommitRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockHeight != 0 { + n += 1 + sovGrpc(uint64(m.BlockHeight)) + } + if m.Res != nil { + l = m.Res.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + if len(m.ChangeSet) > 0 { + for _, e := range m.ChangeSet { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + return n +} + +func (m *ListenCommitResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovGrpc(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGrpc(x uint64) (n int) { + return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ListenFinalizeBlockRequest) 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 ErrIntOverflowGrpc + } + 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: ListenFinalizeBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenFinalizeBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Req == nil { + m.Req = &v1.FinalizeBlockRequest{} + } + if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Res == nil { + m.Res = &v1.FinalizeBlockResponse{} + } + if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenFinalizeBlockResponse) 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 ErrIntOverflowGrpc + } + 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: ListenFinalizeBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenFinalizeBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenCommitRequest) 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 ErrIntOverflowGrpc + } + 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: ListenCommitRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenCommitRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Res == nil { + m.Res = &v1.CommitResponse{} + } + if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChangeSet = append(m.ChangeSet, &types.StoreKVPair{}) + if err := m.ChangeSet[len(m.ChangeSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenCommitResponse) 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 ErrIntOverflowGrpc + } + 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: ListenCommitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenCommitResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGrpc(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGrpc + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGrpc + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGrpc + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/store/types/commit_info.pb.go b/cosmossdk.io/store/types/commit_info.pb.go new file mode 100644 index 000000000000..81220a79c236 --- /dev/null +++ b/cosmossdk.io/store/types/commit_info.pb.go @@ -0,0 +1,864 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/store/v1beta1/commit_info.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// CommitInfo defines commit information used by the multi-store when committing +// a version/height. +type CommitInfo struct { + Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + StoreInfos []StoreInfo `protobuf:"bytes,2,rep,name=store_infos,json=storeInfos,proto3" json:"store_infos"` + Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` +} + +func (m *CommitInfo) Reset() { *m = CommitInfo{} } +func (m *CommitInfo) String() string { return proto.CompactTextString(m) } +func (*CommitInfo) ProtoMessage() {} +func (*CommitInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_5f8c656cdef8c524, []int{0} +} +func (m *CommitInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommitInfo.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 *CommitInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitInfo.Merge(m, src) +} +func (m *CommitInfo) XXX_Size() int { + return m.Size() +} +func (m *CommitInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CommitInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitInfo proto.InternalMessageInfo + +func (m *CommitInfo) GetVersion() int64 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *CommitInfo) GetStoreInfos() []StoreInfo { + if m != nil { + return m.StoreInfos + } + return nil +} + +func (m *CommitInfo) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +// StoreInfo defines store-specific commit information. It contains a reference +// between a store name and the commit ID. +type StoreInfo struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + CommitId CommitID `protobuf:"bytes,2,opt,name=commit_id,json=commitId,proto3" json:"commit_id"` +} + +func (m *StoreInfo) Reset() { *m = StoreInfo{} } +func (m *StoreInfo) String() string { return proto.CompactTextString(m) } +func (*StoreInfo) ProtoMessage() {} +func (*StoreInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_5f8c656cdef8c524, []int{1} +} +func (m *StoreInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StoreInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StoreInfo.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 *StoreInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_StoreInfo.Merge(m, src) +} +func (m *StoreInfo) XXX_Size() int { + return m.Size() +} +func (m *StoreInfo) XXX_DiscardUnknown() { + xxx_messageInfo_StoreInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_StoreInfo proto.InternalMessageInfo + +func (m *StoreInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *StoreInfo) GetCommitId() CommitID { + if m != nil { + return m.CommitId + } + return CommitID{} +} + +// CommitID defines the commitment information when a specific store is +// committed. +type CommitID struct { + Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` +} + +func (m *CommitID) Reset() { *m = CommitID{} } +func (*CommitID) ProtoMessage() {} +func (*CommitID) Descriptor() ([]byte, []int) { + return fileDescriptor_5f8c656cdef8c524, []int{2} +} +func (m *CommitID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommitID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommitID.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 *CommitID) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitID.Merge(m, src) +} +func (m *CommitID) XXX_Size() int { + return m.Size() +} +func (m *CommitID) XXX_DiscardUnknown() { + xxx_messageInfo_CommitID.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitID proto.InternalMessageInfo + +func (m *CommitID) GetVersion() int64 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *CommitID) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func init() { + proto.RegisterType((*CommitInfo)(nil), "cosmos.store.v1beta1.CommitInfo") + proto.RegisterType((*StoreInfo)(nil), "cosmos.store.v1beta1.StoreInfo") + proto.RegisterType((*CommitID)(nil), "cosmos.store.v1beta1.CommitID") +} + +func init() { + proto.RegisterFile("cosmos/store/v1beta1/commit_info.proto", fileDescriptor_5f8c656cdef8c524) +} + +var fileDescriptor_5f8c656cdef8c524 = []byte{ + // 336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4e, 0xf2, 0x50, + 0x14, 0xc7, 0x7b, 0xa1, 0xf9, 0x3e, 0x7a, 0x70, 0xba, 0x61, 0x68, 0x18, 0x6e, 0x09, 0x83, 0x61, + 0xba, 0x0d, 0xb8, 0x39, 0x98, 0x58, 0x8d, 0x09, 0x6b, 0x75, 0x72, 0x31, 0x2d, 0x5c, 0x4a, 0xa3, + 0xed, 0x21, 0xdc, 0x2b, 0x89, 0x6f, 0xc1, 0xe8, 0xe8, 0x33, 0xf8, 0x14, 0x8c, 0x8c, 0x4e, 0x6a, + 0xe0, 0x45, 0x4c, 0x4f, 0x5b, 0x5c, 0x88, 0xdb, 0x39, 0xed, 0xef, 0x9c, 0xff, 0xaf, 0xa7, 0x70, + 0x3a, 0x41, 0x9d, 0xa1, 0xf6, 0xb5, 0xc1, 0xa5, 0xf2, 0x57, 0xc3, 0x58, 0x99, 0x68, 0xe8, 0x4f, + 0x30, 0xcb, 0x52, 0xf3, 0x90, 0xe6, 0x33, 0x94, 0x8b, 0x25, 0x1a, 0xe4, 0x9d, 0x92, 0x93, 0xc4, + 0xc9, 0x8a, 0xeb, 0x76, 0x12, 0x4c, 0x90, 0x00, 0xbf, 0xa8, 0x4a, 0xb6, 0xeb, 0x25, 0x88, 0xc9, + 0x93, 0xf2, 0xa9, 0x8b, 0x9f, 0x67, 0xbe, 0x49, 0x33, 0xa5, 0x4d, 0x94, 0x2d, 0x4a, 0xa0, 0xff, + 0xce, 0x00, 0xae, 0x28, 0x62, 0x9c, 0xcf, 0x90, 0xbb, 0xf0, 0x7f, 0xa5, 0x96, 0x3a, 0xc5, 0xdc, + 0x65, 0x3d, 0x36, 0x68, 0x86, 0x75, 0xcb, 0x6f, 0xa0, 0x4d, 0x81, 0x64, 0xa2, 0xdd, 0x46, 0xaf, + 0x39, 0x68, 0x8f, 0x3c, 0x79, 0xcc, 0x45, 0xde, 0x16, 0x5d, 0xb1, 0x2f, 0xb0, 0x37, 0x9f, 0x9e, + 0x15, 0x82, 0xae, 0x1f, 0x68, 0x1e, 0x80, 0x73, 0x70, 0x70, 0x9b, 0x3d, 0x36, 0x68, 0x8f, 0xba, + 0xb2, 0xb4, 0x94, 0xb5, 0xa5, 0xbc, 0xab, 0x89, 0xa0, 0x55, 0x2c, 0x58, 0x7f, 0x79, 0x2c, 0xfc, + 0x1d, 0xeb, 0xc7, 0xe0, 0x1c, 0x22, 0x38, 0x07, 0x3b, 0x8f, 0x32, 0x45, 0xbe, 0x4e, 0x48, 0x35, + 0xbf, 0x04, 0xa7, 0xbe, 0xdb, 0xd4, 0x6d, 0x50, 0x88, 0x38, 0xae, 0x5a, 0x7d, 0xfb, 0x75, 0x65, + 0xda, 0x2a, 0xc7, 0xc6, 0xd3, 0xfe, 0x05, 0xb4, 0xea, 0x77, 0x7f, 0x5c, 0x85, 0x83, 0x3d, 0x8f, + 0xf4, 0x9c, 0x32, 0x4e, 0x42, 0xaa, 0xcf, 0xed, 0xd7, 0x37, 0xcf, 0x0a, 0x46, 0x9b, 0x9d, 0x60, + 0xdb, 0x9d, 0x60, 0xdf, 0x3b, 0xc1, 0xd6, 0x7b, 0x61, 0x6d, 0xf7, 0xc2, 0xfa, 0xd8, 0x0b, 0xeb, + 0xde, 0x2d, 0x45, 0xf4, 0xf4, 0x51, 0xa6, 0x58, 0xfd, 0x6d, 0xf3, 0xb2, 0x50, 0x3a, 0xfe, 0x47, + 0x07, 0x38, 0xfb, 0x09, 0x00, 0x00, 0xff, 0xff, 0x67, 0xb7, 0x0d, 0x59, 0x0a, 0x02, 0x00, 0x00, +} + +func (m *CommitInfo) 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 *CommitInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintCommitInfo(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x1a + if len(m.StoreInfos) > 0 { + for iNdEx := len(m.StoreInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.StoreInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommitInfo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Version != 0 { + i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StoreInfo) 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 *StoreInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StoreInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.CommitId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommitInfo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CommitID) 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 *CommitID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } + if m.Version != 0 { + i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintCommitInfo(dAtA []byte, offset int, v uint64) int { + offset -= sovCommitInfo(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CommitInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != 0 { + n += 1 + sovCommitInfo(uint64(m.Version)) + } + if len(m.StoreInfos) > 0 { + for _, e := range m.StoreInfos { + l = e.Size() + n += 1 + l + sovCommitInfo(uint64(l)) + } + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovCommitInfo(uint64(l)) + return n +} + +func (m *StoreInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovCommitInfo(uint64(l)) + } + l = m.CommitId.Size() + n += 1 + l + sovCommitInfo(uint64(l)) + return n +} + +func (m *CommitID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != 0 { + n += 1 + sovCommitInfo(uint64(m.Version)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovCommitInfo(uint64(l)) + } + return n +} + +func sovCommitInfo(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCommitInfo(x uint64) (n int) { + return sovCommitInfo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CommitInfo) 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 ErrIntOverflowCommitInfo + } + 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: CommitInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StoreInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StoreInfos = append(m.StoreInfos, StoreInfo{}) + if err := m.StoreInfos[len(m.StoreInfos)-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 Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommitInfo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommitInfo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreInfo) 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 ErrIntOverflowCommitInfo + } + 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: StoreInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + 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 ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommitId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CommitId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommitInfo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommitInfo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CommitID) 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 ErrIntOverflowCommitInfo + } + 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: CommitID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommitID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommitInfo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommitInfo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCommitInfo(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthCommitInfo + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCommitInfo + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCommitInfo + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCommitInfo = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCommitInfo = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCommitInfo = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/store/types/listening.pb.go b/cosmossdk.io/store/types/listening.pb.go new file mode 100644 index 000000000000..1821ca474a6f --- /dev/null +++ b/cosmossdk.io/store/types/listening.pb.go @@ -0,0 +1,785 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/store/v1beta1/listening.proto + +package types + +import ( + fmt "fmt" + v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" + _ "github.com/cosmos/cosmos-proto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and +// Deletes) It optionally includes the StoreKey for the originating KVStore and +// a Boolean flag to distinguish between Sets and Deletes +type StoreKVPair struct { + StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"` + Delete bool `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"` + Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } +func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } +func (*StoreKVPair) ProtoMessage() {} +func (*StoreKVPair) Descriptor() ([]byte, []int) { + return fileDescriptor_b6caeb9d7b7c7c10, []int{0} +} +func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StoreKVPair.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 *StoreKVPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_StoreKVPair.Merge(m, src) +} +func (m *StoreKVPair) XXX_Size() int { + return m.Size() +} +func (m *StoreKVPair) XXX_DiscardUnknown() { + xxx_messageInfo_StoreKVPair.DiscardUnknown(m) +} + +var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo + +func (m *StoreKVPair) GetStoreKey() string { + if m != nil { + return m.StoreKey + } + return "" +} + +func (m *StoreKVPair) GetDelete() bool { + if m != nil { + return m.Delete + } + return false +} + +func (m *StoreKVPair) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *StoreKVPair) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +// BlockMetadata contains all the abci event data of a block +// the file streamer dump them into files together with the state changes. +type BlockMetadata struct { + ResponseCommit *v1.CommitResponse `protobuf:"bytes,6,opt,name=response_commit,json=responseCommit,proto3" json:"response_commit,omitempty"` + RequestFinalizeBlock *v1.FinalizeBlockRequest `protobuf:"bytes,7,opt,name=request_finalize_block,json=requestFinalizeBlock,proto3" json:"request_finalize_block,omitempty"` + ResponseFinalizeBlock *v1.FinalizeBlockResponse `protobuf:"bytes,8,opt,name=response_finalize_block,json=responseFinalizeBlock,proto3" json:"response_finalize_block,omitempty"` +} + +func (m *BlockMetadata) Reset() { *m = BlockMetadata{} } +func (m *BlockMetadata) String() string { return proto.CompactTextString(m) } +func (*BlockMetadata) ProtoMessage() {} +func (*BlockMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_b6caeb9d7b7c7c10, []int{1} +} +func (m *BlockMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlockMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlockMetadata.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 *BlockMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockMetadata.Merge(m, src) +} +func (m *BlockMetadata) XXX_Size() int { + return m.Size() +} +func (m *BlockMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_BlockMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_BlockMetadata proto.InternalMessageInfo + +func (m *BlockMetadata) GetResponseCommit() *v1.CommitResponse { + if m != nil { + return m.ResponseCommit + } + return nil +} + +func (m *BlockMetadata) GetRequestFinalizeBlock() *v1.FinalizeBlockRequest { + if m != nil { + return m.RequestFinalizeBlock + } + return nil +} + +func (m *BlockMetadata) GetResponseFinalizeBlock() *v1.FinalizeBlockResponse { + if m != nil { + return m.ResponseFinalizeBlock + } + return nil +} + +func init() { + proto.RegisterType((*StoreKVPair)(nil), "cosmos.store.v1beta1.StoreKVPair") + proto.RegisterType((*BlockMetadata)(nil), "cosmos.store.v1beta1.BlockMetadata") +} + +func init() { + proto.RegisterFile("cosmos/store/v1beta1/listening.proto", fileDescriptor_b6caeb9d7b7c7c10) +} + +var fileDescriptor_b6caeb9d7b7c7c10 = []byte{ + // 416 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0xeb, 0xd6, 0x2d, 0x9e, 0x07, 0x2c, 0x32, 0x65, 0x84, 0x81, 0xa2, 0x68, 0x42, 0xd0, + 0xcb, 0x1c, 0xba, 0x71, 0xe2, 0x38, 0x24, 0x24, 0x32, 0x21, 0xa1, 0x20, 0x71, 0x40, 0x48, 0x91, + 0x93, 0xbe, 0x21, 0xab, 0x69, 0x5c, 0x62, 0x2f, 0x52, 0xb9, 0xf0, 0x15, 0xf8, 0x30, 0x48, 0x7c, + 0x05, 0x8e, 0x13, 0x27, 0x8e, 0xa8, 0xfd, 0x22, 0x28, 0xb6, 0x8b, 0x34, 0x38, 0xec, 0x96, 0xff, + 0x7b, 0xff, 0xff, 0xcf, 0xcf, 0xf1, 0xa3, 0x8f, 0x4a, 0xa5, 0x17, 0x4a, 0x27, 0xda, 0xa8, 0x06, + 0x92, 0x76, 0x5a, 0x80, 0x11, 0xd3, 0xa4, 0x92, 0xda, 0x40, 0x2d, 0xeb, 0x8f, 0x7c, 0xd9, 0x28, + 0xa3, 0xd8, 0xd8, 0xb9, 0xb8, 0x75, 0x71, 0xef, 0x3a, 0x78, 0x58, 0xaa, 0x05, 0x98, 0xe2, 0xdc, + 0x24, 0xa2, 0x28, 0x65, 0xd2, 0x4e, 0x13, 0xb3, 0x5a, 0x82, 0x76, 0x99, 0x83, 0xfb, 0x2e, 0x93, + 0x5b, 0x95, 0x78, 0x80, 0x15, 0x87, 0x5f, 0xe8, 0xee, 0xdb, 0x8e, 0x74, 0xf6, 0xee, 0x8d, 0x90, + 0x0d, 0x7b, 0x40, 0x77, 0x2c, 0x38, 0x9f, 0xc3, 0x2a, 0x44, 0x31, 0x9a, 0xec, 0x64, 0xc4, 0x16, + 0xce, 0x60, 0xc5, 0xf6, 0xe9, 0x68, 0x06, 0x15, 0x18, 0x08, 0xfb, 0x31, 0x9a, 0x90, 0xcc, 0x2b, + 0x16, 0xd0, 0x41, 0x67, 0x1f, 0xc4, 0x68, 0x72, 0x33, 0xeb, 0x3e, 0xd9, 0x98, 0x0e, 0x5b, 0x51, + 0x5d, 0x40, 0x88, 0x6d, 0xcd, 0x89, 0xe7, 0x77, 0x7e, 0x7e, 0x3b, 0xda, 0x73, 0xa7, 0x1f, 0xe9, + 0xd9, 0x3c, 0x7e, 0xca, 0x9f, 0x9d, 0x1c, 0x7e, 0xef, 0xd3, 0x5b, 0xa7, 0x95, 0x2a, 0xe7, 0xaf, + 0xc1, 0x88, 0x99, 0x30, 0x82, 0xbd, 0xa2, 0x7b, 0x0d, 0xe8, 0xa5, 0xaa, 0x35, 0xe4, 0xa5, 0x5a, + 0x2c, 0xa4, 0x09, 0x47, 0x31, 0x9a, 0xec, 0x1e, 0xc7, 0x7c, 0x7b, 0x4b, 0xde, 0xdd, 0x92, 0xb7, + 0x53, 0xfe, 0xc2, 0xf6, 0x33, 0x6f, 0xcf, 0x6e, 0x6f, 0x83, 0xae, 0xce, 0x3e, 0xd0, 0xfd, 0x06, + 0x3e, 0x5d, 0x80, 0x36, 0xf9, 0xb9, 0xac, 0x45, 0x25, 0x3f, 0x43, 0x5e, 0x74, 0x87, 0x85, 0x37, + 0x2c, 0xf1, 0xf1, 0xff, 0xc4, 0x97, 0xde, 0x67, 0x67, 0xca, 0x5c, 0x38, 0x1b, 0x7b, 0xca, 0x95, + 0x26, 0xcb, 0xe9, 0xbd, 0xbf, 0x83, 0xfe, 0x83, 0x27, 0x16, 0xff, 0xe4, 0x5a, 0xbc, 0x9f, 0xfb, + 0xee, 0x96, 0x73, 0xa5, 0x9d, 0x62, 0x82, 0x82, 0x7e, 0x8a, 0x49, 0x3f, 0x18, 0xa4, 0x98, 0x0c, + 0x02, 0x9c, 0x62, 0x82, 0x83, 0x61, 0x8a, 0xc9, 0x30, 0x18, 0x9d, 0x1e, 0xff, 0x58, 0x47, 0xe8, + 0x72, 0x1d, 0xa1, 0xdf, 0xeb, 0x08, 0x7d, 0xdd, 0x44, 0xbd, 0xcb, 0x4d, 0xd4, 0xfb, 0xb5, 0x89, + 0x7a, 0xef, 0x43, 0xf7, 0x93, 0xf5, 0x6c, 0xce, 0xa5, 0xf2, 0xfb, 0x64, 0xf7, 0xa1, 0x18, 0xd9, + 0x57, 0x3f, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x98, 0x9f, 0x12, 0x13, 0x6c, 0x02, 0x00, 0x00, +} + +func (m *StoreKVPair) 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 *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintListening(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x22 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintListening(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x1a + } + if m.Delete { + i-- + if m.Delete { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.StoreKey) > 0 { + i -= len(m.StoreKey) + copy(dAtA[i:], m.StoreKey) + i = encodeVarintListening(dAtA, i, uint64(len(m.StoreKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlockMetadata) 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 *BlockMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ResponseFinalizeBlock != nil { + { + size, err := m.ResponseFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintListening(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + if m.RequestFinalizeBlock != nil { + { + size, err := m.RequestFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintListening(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.ResponseCommit != nil { + { + size, err := m.ResponseCommit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintListening(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} + +func encodeVarintListening(dAtA []byte, offset int, v uint64) int { + offset -= sovListening(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *StoreKVPair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StoreKey) + if l > 0 { + n += 1 + l + sovListening(uint64(l)) + } + if m.Delete { + n += 2 + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovListening(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovListening(uint64(l)) + } + return n +} + +func (m *BlockMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ResponseCommit != nil { + l = m.ResponseCommit.Size() + n += 1 + l + sovListening(uint64(l)) + } + if m.RequestFinalizeBlock != nil { + l = m.RequestFinalizeBlock.Size() + n += 1 + l + sovListening(uint64(l)) + } + if m.ResponseFinalizeBlock != nil { + l = m.ResponseFinalizeBlock.Size() + n += 1 + l + sovListening(uint64(l)) + } + return n +} + +func sovListening(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozListening(x uint64) (n int) { + return sovListening(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *StoreKVPair) 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 ErrIntOverflowListening + } + 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: StoreKVPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StoreKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + 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 ErrInvalidLengthListening + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StoreKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Delete = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipListening(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthListening + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockMetadata) 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 ErrIntOverflowListening + } + 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: BlockMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseCommit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseCommit == nil { + m.ResponseCommit = &v1.CommitResponse{} + } + if err := m.ResponseCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestFinalizeBlock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestFinalizeBlock == nil { + m.RequestFinalizeBlock = &v1.FinalizeBlockRequest{} + } + if err := m.RequestFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseFinalizeBlock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseFinalizeBlock == nil { + m.ResponseFinalizeBlock = &v1.FinalizeBlockResponse{} + } + if err := m.ResponseFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipListening(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthListening + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipListening(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowListening + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowListening + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowListening + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthListening + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupListening + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthListening + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthListening = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowListening = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupListening = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/consensus/keeper/keeper.go b/x/consensus/keeper/keeper.go index 9b46ae153cbd..df6b6a4abdfa 100644 --- a/x/consensus/keeper/keeper.go +++ b/x/consensus/keeper/keeper.go @@ -124,11 +124,11 @@ func (k Keeper) SetCometInfo(ctx context.Context, msg *types.MsgSetCometInfo) (* return &types.MsgSetCometInfoResponse{}, nil } -func (k Keeper) CometInfo(ctx context.Context, _ *types.QueryCometInfoRequest) (*types.QueryCometInfoResponse, error) { +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.QueryCometInfoResponse{CometInfo: &cometInfo}, nil + return &types.QueryGetCometInfoResponse{CometInfo: &cometInfo}, nil } diff --git a/x/consensus/proto/cosmos/consensus/v1/query.proto b/x/consensus/proto/cosmos/consensus/v1/query.proto index 787e2af5d464..d458c32c55d2 100644 --- a/x/consensus/proto/cosmos/consensus/v1/query.proto +++ b/x/consensus/proto/cosmos/consensus/v1/query.proto @@ -16,14 +16,14 @@ service Query { } // CometInfo queries the comet info of x/consensus module. - rpc CometInfo(QueryCometInfoRequest) returns (QueryCometInfoResponse); + rpc GetCometInfo(QueryGetCometInfoRequest) returns (QueryGetCometInfoResponse); } // QueryCometInfoRequest defines the request type for querying x/consensus comet info. -message QueryCometInfoRequest {} +message QueryGetCometInfoRequest {} // QueryCometInfoResponse defines the response type for querying x/consensus comet info. -message QueryCometInfoResponse { +message QueryGetCometInfoResponse { // comet_info is the comet info of the x/consensus module. CometInfo comet_info = 1; } diff --git a/x/consensus/types/query.pb.go b/x/consensus/types/query.pb.go index 490cc184eeaa..1ba4d07047af 100644 --- a/x/consensus/types/query.pb.go +++ b/x/consensus/types/query.pb.go @@ -30,21 +30,21 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // QueryCometInfoRequest defines the request type for querying x/consensus comet info. -type QueryCometInfoRequest struct { +type QueryGetCometInfoRequest struct { } -func (m *QueryCometInfoRequest) Reset() { *m = QueryCometInfoRequest{} } -func (m *QueryCometInfoRequest) String() string { return proto.CompactTextString(m) } -func (*QueryCometInfoRequest) ProtoMessage() {} -func (*QueryCometInfoRequest) Descriptor() ([]byte, []int) { +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 *QueryCometInfoRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryGetCometInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryCometInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGetCometInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryCometInfoRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGetCometInfoRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -54,36 +54,36 @@ func (m *QueryCometInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *QueryCometInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCometInfoRequest.Merge(m, src) +func (m *QueryGetCometInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetCometInfoRequest.Merge(m, src) } -func (m *QueryCometInfoRequest) XXX_Size() int { +func (m *QueryGetCometInfoRequest) XXX_Size() int { return m.Size() } -func (m *QueryCometInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCometInfoRequest.DiscardUnknown(m) +func (m *QueryGetCometInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetCometInfoRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryCometInfoRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryGetCometInfoRequest proto.InternalMessageInfo // QueryCometInfoResponse defines the response type for querying x/consensus comet info. -type QueryCometInfoResponse struct { +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 *QueryCometInfoResponse) Reset() { *m = QueryCometInfoResponse{} } -func (m *QueryCometInfoResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCometInfoResponse) ProtoMessage() {} -func (*QueryCometInfoResponse) Descriptor() ([]byte, []int) { +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 *QueryCometInfoResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryGetCometInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGetCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryCometInfoResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGetCometInfoResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -93,19 +93,19 @@ func (m *QueryCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *QueryCometInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCometInfoResponse.Merge(m, src) +func (m *QueryGetCometInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetCometInfoResponse.Merge(m, src) } -func (m *QueryCometInfoResponse) XXX_Size() int { +func (m *QueryGetCometInfoResponse) XXX_Size() int { return m.Size() } -func (m *QueryCometInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCometInfoResponse.DiscardUnknown(m) +func (m *QueryGetCometInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetCometInfoResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryCometInfoResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryGetCometInfoResponse proto.InternalMessageInfo -func (m *QueryCometInfoResponse) GetCometInfo() *CometInfo { +func (m *QueryGetCometInfoResponse) GetCometInfo() *CometInfo { if m != nil { return m.CometInfo } @@ -198,8 +198,8 @@ func (m *QueryParamsResponse) GetParams() *v1.ConsensusParams { } func init() { - proto.RegisterType((*QueryCometInfoRequest)(nil), "cosmos.consensus.v1.QueryCometInfoRequest") - proto.RegisterType((*QueryCometInfoResponse)(nil), "cosmos.consensus.v1.QueryCometInfoResponse") + 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 +207,29 @@ func init() { func init() { proto.RegisterFile("cosmos/consensus/v1/query.proto", fileDescriptor_bf54d1e5df04cee9) } var fileDescriptor_bf54d1e5df04cee9 = []byte{ - // 341 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, - 0x71, 0x2e, 0xd1, 0x40, 0x90, 0x33, 0x9c, 0x41, 0x66, 0x79, 0xe6, 0xa5, 0xe5, 0x07, 0xa5, 0x16, - 0x96, 0xa6, 0x16, 0x97, 0x28, 0x85, 0x73, 0x89, 0xa1, 0x4b, 0x14, 0x17, 0x80, 0x34, 0x0b, 0xd9, - 0x72, 0x71, 0x81, 0x6d, 0x8e, 0xcf, 0xcc, 0x4b, 0xcb, 0x97, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, - 0x92, 0xd3, 0xc3, 0xe2, 0x7e, 0x3d, 0x84, 0x5e, 0xce, 0x64, 0x18, 0x53, 0x49, 0x84, 0x4b, 0x08, - 0x6c, 0x70, 0x00, 0xd8, 0xad, 0x30, 0xeb, 0x02, 0xb9, 0x84, 0x51, 0x44, 0xa1, 0x76, 0x59, 0x71, - 0xb1, 0x41, 0xfc, 0x04, 0xb5, 0x47, 0x49, 0x0f, 0xe6, 0x69, 0x3d, 0xb0, 0xa7, 0x21, 0xb6, 0x40, - 0xad, 0x84, 0xea, 0x85, 0xea, 0x30, 0xfa, 0xc0, 0xc8, 0xc5, 0x0a, 0x36, 0x53, 0xa8, 0x81, 0x91, - 0x8b, 0x0d, 0x22, 0x29, 0xa4, 0x8e, 0xd5, 0xa1, 0x98, 0x0e, 0x92, 0xd2, 0x20, 0xac, 0x10, 0xe2, - 0x46, 0x25, 0xe5, 0xa6, 0xcb, 0x4f, 0x26, 0x33, 0xc9, 0x0a, 0x49, 0xeb, 0x63, 0x0b, 0x70, 0x88, - 0x63, 0x84, 0x52, 0xb8, 0x38, 0xe1, 0xa1, 0x21, 0xa4, 0x85, 0xdb, 0x6c, 0xf4, 0x78, 0x90, 0xd2, - 0x26, 0x4a, 0x2d, 0xc4, 0x29, 0x4e, 0x16, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, - 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, - 0x10, 0x25, 0x07, 0x31, 0xa5, 0x38, 0x25, 0x5b, 0x2f, 0x33, 0x5f, 0xbf, 0x02, 0xc9, 0x8d, 0xe0, - 0x70, 0x4c, 0x62, 0x03, 0x27, 0x07, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x7a, 0xcc, - 0x3c, 0xa9, 0x02, 0x00, 0x00, + // 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, } // Reference imports to suppress errors if they are not otherwise used. @@ -246,7 +246,8 @@ 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(ctx context.Context, in *QueryCometInfoRequest, opts ...grpc.CallOption) (*QueryCometInfoResponse, error) + // CometInfo queries the comet info of x/consensus module. + GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) } type queryClient struct { @@ -266,9 +267,9 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) CometInfo(ctx context.Context, in *QueryCometInfoRequest, opts ...grpc.CallOption) (*QueryCometInfoResponse, error) { - out := new(QueryCometInfoResponse) - err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Query/CometInfo", in, out, opts...) +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 } @@ -279,7 +280,8 @@ func (c *queryClient) CometInfo(ctx context.Context, in *QueryCometInfoRequest, type QueryServer interface { // Params queries the parameters of x/consensus module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - CometInfo(context.Context, *QueryCometInfoRequest) (*QueryCometInfoResponse, 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. @@ -289,8 +291,8 @@ 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) CometInfo(ctx context.Context, req *QueryCometInfoRequest) (*QueryCometInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CometInfo 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) { @@ -315,20 +317,20 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_CometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCometInfoRequest) +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).CometInfo(ctx, in) + return srv.(QueryServer).GetCometInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/cosmos.consensus.v1.Query/CometInfo", + FullMethod: "/cosmos.consensus.v1.Query/GetCometInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CometInfo(ctx, req.(*QueryCometInfoRequest)) + return srv.(QueryServer).GetCometInfo(ctx, req.(*QueryGetCometInfoRequest)) } return interceptor(ctx, in, info, handler) } @@ -342,15 +344,15 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_Params_Handler, }, { - MethodName: "CometInfo", - Handler: _Query_CometInfo_Handler, + MethodName: "GetCometInfo", + Handler: _Query_GetCometInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/consensus/v1/query.proto", } -func (m *QueryCometInfoRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGetCometInfoRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -360,12 +362,12 @@ func (m *QueryCometInfoRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryCometInfoRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetCometInfoRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCometInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetCometInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -373,7 +375,7 @@ func (m *QueryCometInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryCometInfoResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGetCometInfoResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -383,12 +385,12 @@ func (m *QueryCometInfoResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryCometInfoResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetCometInfoResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCometInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetCometInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -477,7 +479,7 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryCometInfoRequest) Size() (n int) { +func (m *QueryGetCometInfoRequest) Size() (n int) { if m == nil { return 0 } @@ -486,7 +488,7 @@ func (m *QueryCometInfoRequest) Size() (n int) { return n } -func (m *QueryCometInfoResponse) Size() (n int) { +func (m *QueryGetCometInfoResponse) Size() (n int) { if m == nil { return 0 } @@ -527,7 +529,7 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryCometInfoRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetCometInfoRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -550,10 +552,10 @@ func (m *QueryCometInfoRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCometInfoRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetCometInfoRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCometInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetCometInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -577,7 +579,7 @@ func (m *QueryCometInfoRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCometInfoResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetCometInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -600,10 +602,10 @@ func (m *QueryCometInfoResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCometInfoResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetCometInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: From 314c3a457b3de0948cfbc54456efe84b8b9e5d21 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Thu, 13 Jun 2024 16:37:42 +0200 Subject: [PATCH 12/12] remove unneeded --- cosmossdk.io/server/v2/streaming/grpc.pb.go | 2414 ----------------- .../store/snapshots/types/snapshot.pb.go | 2008 -------------- cosmossdk.io/store/streaming/abci/grpc.pb.go | 1050 ------- cosmossdk.io/store/types/commit_info.pb.go | 864 ------ cosmossdk.io/store/types/listening.pb.go | 785 ------ 5 files changed, 7121 deletions(-) delete mode 100644 cosmossdk.io/server/v2/streaming/grpc.pb.go delete mode 100644 cosmossdk.io/store/snapshots/types/snapshot.pb.go delete mode 100644 cosmossdk.io/store/streaming/abci/grpc.pb.go delete mode 100644 cosmossdk.io/store/types/commit_info.pb.go delete mode 100644 cosmossdk.io/store/types/listening.pb.go diff --git a/cosmossdk.io/server/v2/streaming/grpc.pb.go b/cosmossdk.io/server/v2/streaming/grpc.pb.go deleted file mode 100644 index 4d2d15149c89..000000000000 --- a/cosmossdk.io/server/v2/streaming/grpc.pb.go +++ /dev/null @@ -1,2414 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/streaming/v1/grpc.proto - -package streaming - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ListenDeliverBlockRequest is the request type for the ListenDeliverBlock RPC method -type ListenDeliverBlockRequest struct { - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` - Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` - TxResults []*ExecTxResult `protobuf:"bytes,4,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` -} - -func (m *ListenDeliverBlockRequest) Reset() { *m = ListenDeliverBlockRequest{} } -func (m *ListenDeliverBlockRequest) String() string { return proto.CompactTextString(m) } -func (*ListenDeliverBlockRequest) ProtoMessage() {} -func (*ListenDeliverBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{0} -} -func (m *ListenDeliverBlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenDeliverBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenDeliverBlockRequest.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 *ListenDeliverBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenDeliverBlockRequest.Merge(m, src) -} -func (m *ListenDeliverBlockRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenDeliverBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenDeliverBlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenDeliverBlockRequest proto.InternalMessageInfo - -func (m *ListenDeliverBlockRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ListenDeliverBlockRequest) GetTxs() [][]byte { - if m != nil { - return m.Txs - } - return nil -} - -func (m *ListenDeliverBlockRequest) GetEvents() []*Event { - if m != nil { - return m.Events - } - return nil -} - -func (m *ListenDeliverBlockRequest) GetTxResults() []*ExecTxResult { - if m != nil { - return m.TxResults - } - return nil -} - -// ListenDeliverBlockResponse is the response type for the ListenDeliverBlock RPC method -type ListenDeliverBlockResponse struct { -} - -func (m *ListenDeliverBlockResponse) Reset() { *m = ListenDeliverBlockResponse{} } -func (m *ListenDeliverBlockResponse) String() string { return proto.CompactTextString(m) } -func (*ListenDeliverBlockResponse) ProtoMessage() {} -func (*ListenDeliverBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{1} -} -func (m *ListenDeliverBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenDeliverBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenDeliverBlockResponse.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 *ListenDeliverBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenDeliverBlockResponse.Merge(m, src) -} -func (m *ListenDeliverBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenDeliverBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenDeliverBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenDeliverBlockResponse proto.InternalMessageInfo - -// ListenStateChangesRequest is the request type for the ListenStateChanges RPC method -type ListenStateChangesRequest struct { - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - ChangeSet []*StoreKVPair `protobuf:"bytes,2,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` - AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` -} - -func (m *ListenStateChangesRequest) Reset() { *m = ListenStateChangesRequest{} } -func (m *ListenStateChangesRequest) String() string { return proto.CompactTextString(m) } -func (*ListenStateChangesRequest) ProtoMessage() {} -func (*ListenStateChangesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{2} -} -func (m *ListenStateChangesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenStateChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenStateChangesRequest.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 *ListenStateChangesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenStateChangesRequest.Merge(m, src) -} -func (m *ListenStateChangesRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenStateChangesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenStateChangesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenStateChangesRequest proto.InternalMessageInfo - -func (m *ListenStateChangesRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ListenStateChangesRequest) GetChangeSet() []*StoreKVPair { - if m != nil { - return m.ChangeSet - } - return nil -} - -func (m *ListenStateChangesRequest) GetAppHash() []byte { - if m != nil { - return m.AppHash - } - return nil -} - -// ListenStateChangesResponse is the response type for the ListenStateChanges RPC method -type ListenStateChangesResponse struct { -} - -func (m *ListenStateChangesResponse) Reset() { *m = ListenStateChangesResponse{} } -func (m *ListenStateChangesResponse) String() string { return proto.CompactTextString(m) } -func (*ListenStateChangesResponse) ProtoMessage() {} -func (*ListenStateChangesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{3} -} -func (m *ListenStateChangesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenStateChangesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenStateChangesResponse.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 *ListenStateChangesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenStateChangesResponse.Merge(m, src) -} -func (m *ListenStateChangesResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenStateChangesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenStateChangesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenStateChangesResponse proto.InternalMessageInfo - -// StoreKVPair is a single key-value pair, associated with a store. -type StoreKVPair struct { - // address defines the address of the account the state changes are coming from. - // In case of modules you can expect a stringified - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // key defines the key of the address that changed. - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // value defines the value that changed, empty in case of removal. - Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - // delete defines if the key was removed. - Delete bool `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"` -} - -func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } -func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } -func (*StoreKVPair) ProtoMessage() {} -func (*StoreKVPair) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{4} -} -func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreKVPair.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 *StoreKVPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreKVPair.Merge(m, src) -} -func (m *StoreKVPair) XXX_Size() int { - return m.Size() -} -func (m *StoreKVPair) XXX_DiscardUnknown() { - xxx_messageInfo_StoreKVPair.DiscardUnknown(m) -} - -var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo - -func (m *StoreKVPair) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *StoreKVPair) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *StoreKVPair) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *StoreKVPair) GetDelete() bool { - if m != nil { - return m.Delete - } - return false -} - -// Event is a single event, associated with a transaction. -type Event struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Attributes []*EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` -} - -func (m *Event) Reset() { *m = Event{} } -func (m *Event) String() string { return proto.CompactTextString(m) } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{5} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Event.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 *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func (m *Event) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *Event) GetAttributes() []*EventAttribute { - if m != nil { - return m.Attributes - } - return nil -} - -// EventAttribute is a single key-value pair, associated with an event. -type EventAttribute struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *EventAttribute) Reset() { *m = EventAttribute{} } -func (m *EventAttribute) String() string { return proto.CompactTextString(m) } -func (*EventAttribute) ProtoMessage() {} -func (*EventAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{6} -} -func (m *EventAttribute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventAttribute.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 *EventAttribute) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventAttribute.Merge(m, src) -} -func (m *EventAttribute) XXX_Size() int { - return m.Size() -} -func (m *EventAttribute) XXX_DiscardUnknown() { - xxx_messageInfo_EventAttribute.DiscardUnknown(m) -} - -var xxx_messageInfo_EventAttribute proto.InternalMessageInfo - -func (m *EventAttribute) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *EventAttribute) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -// ExecTxResult contains results of executing one individual transaction. -type ExecTxResult struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` - Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` -} - -func (m *ExecTxResult) Reset() { *m = ExecTxResult{} } -func (m *ExecTxResult) String() string { return proto.CompactTextString(m) } -func (*ExecTxResult) ProtoMessage() {} -func (*ExecTxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{7} -} -func (m *ExecTxResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExecTxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExecTxResult.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 *ExecTxResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExecTxResult.Merge(m, src) -} -func (m *ExecTxResult) XXX_Size() int { - return m.Size() -} -func (m *ExecTxResult) XXX_DiscardUnknown() { - xxx_messageInfo_ExecTxResult.DiscardUnknown(m) -} - -var xxx_messageInfo_ExecTxResult proto.InternalMessageInfo - -func (m *ExecTxResult) GetCode() uint32 { - if m != nil { - return m.Code - } - return 0 -} - -func (m *ExecTxResult) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *ExecTxResult) GetLog() string { - if m != nil { - return m.Log - } - return "" -} - -func (m *ExecTxResult) GetInfo() string { - if m != nil { - return m.Info - } - return "" -} - -func (m *ExecTxResult) GetGasWanted() int64 { - if m != nil { - return m.GasWanted - } - return 0 -} - -func (m *ExecTxResult) GetGasUsed() int64 { - if m != nil { - return m.GasUsed - } - return 0 -} - -func (m *ExecTxResult) GetEvents() []*Event { - if m != nil { - return m.Events - } - return nil -} - -func (m *ExecTxResult) GetCodespace() string { - if m != nil { - return m.Codespace - } - return "" -} - -func init() { - proto.RegisterType((*ListenDeliverBlockRequest)(nil), "cosmos.streaming.v1.ListenDeliverBlockRequest") - proto.RegisterType((*ListenDeliverBlockResponse)(nil), "cosmos.streaming.v1.ListenDeliverBlockResponse") - proto.RegisterType((*ListenStateChangesRequest)(nil), "cosmos.streaming.v1.ListenStateChangesRequest") - proto.RegisterType((*ListenStateChangesResponse)(nil), "cosmos.streaming.v1.ListenStateChangesResponse") - proto.RegisterType((*StoreKVPair)(nil), "cosmos.streaming.v1.StoreKVPair") - proto.RegisterType((*Event)(nil), "cosmos.streaming.v1.Event") - proto.RegisterType((*EventAttribute)(nil), "cosmos.streaming.v1.EventAttribute") - proto.RegisterType((*ExecTxResult)(nil), "cosmos.streaming.v1.ExecTxResult") -} - -func init() { proto.RegisterFile("cosmos/streaming/v1/grpc.proto", fileDescriptor_3fc151d30622bb2a) } - -var fileDescriptor_3fc151d30622bb2a = []byte{ - // 599 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xae, 0x9b, 0x36, 0xa9, 0x27, 0xe1, 0x47, 0x0b, 0x42, 0x6e, 0x55, 0x2c, 0x37, 0x5c, 0x72, - 0x72, 0xd4, 0x70, 0x41, 0x5c, 0x80, 0x16, 0xa4, 0x4a, 0x70, 0x40, 0x1b, 0x7e, 0x24, 0x2e, 0x61, - 0x6b, 0x0f, 0x8e, 0x55, 0xd7, 0x36, 0x3b, 0x6b, 0x93, 0xbe, 0x05, 0x67, 0x1e, 0x08, 0x71, 0xec, - 0x91, 0x23, 0x6a, 0x2f, 0xbc, 0x05, 0x68, 0xd7, 0x6e, 0x93, 0x0a, 0xb7, 0x2a, 0xb7, 0x6f, 0x7e, - 0xbf, 0x6f, 0x3c, 0xe3, 0x05, 0x37, 0xc8, 0xe8, 0x30, 0xa3, 0x21, 0x29, 0x89, 0xe2, 0x30, 0x4e, - 0xa3, 0x61, 0xb9, 0x3d, 0x8c, 0x64, 0x1e, 0xf8, 0xb9, 0xcc, 0x54, 0xc6, 0xee, 0x54, 0x71, 0xff, - 0x3c, 0xee, 0x97, 0xdb, 0xfd, 0xef, 0x16, 0xac, 0xbf, 0x8a, 0x49, 0x61, 0xfa, 0x1c, 0x93, 0xb8, - 0x44, 0xb9, 0x93, 0x64, 0xc1, 0x01, 0xc7, 0xcf, 0x05, 0x92, 0x62, 0x5b, 0xd0, 0xdb, 0xd7, 0xf6, - 0x64, 0x8a, 0x71, 0x34, 0x55, 0x8e, 0xe5, 0x59, 0x83, 0x16, 0xef, 0x1a, 0xdf, 0x9e, 0x71, 0xb1, - 0xdb, 0xd0, 0x52, 0x33, 0x72, 0x96, 0xbd, 0xd6, 0xa0, 0xc7, 0x35, 0x64, 0x23, 0x68, 0x63, 0x89, - 0xa9, 0x22, 0xa7, 0xe5, 0xb5, 0x06, 0xdd, 0xd1, 0x86, 0xdf, 0x40, 0xec, 0xbf, 0xd0, 0x29, 0xbc, - 0xce, 0x64, 0x4f, 0x01, 0xd4, 0x6c, 0x22, 0x91, 0x8a, 0x44, 0x91, 0xb3, 0x62, 0xea, 0xb6, 0x9a, - 0xeb, 0x66, 0x18, 0xbc, 0x99, 0x71, 0x93, 0xc9, 0x6d, 0x55, 0x23, 0xea, 0x6f, 0xc2, 0x46, 0xd3, - 0x1c, 0x94, 0x67, 0x29, 0x61, 0xff, 0xdb, 0xf9, 0x98, 0x63, 0x25, 0x14, 0xee, 0x4e, 0x45, 0x1a, - 0x21, 0xfd, 0xc7, 0x98, 0x4f, 0x00, 0x02, 0x53, 0x34, 0x21, 0x54, 0x66, 0xda, 0xee, 0xc8, 0x6b, - 0x14, 0x38, 0x56, 0x99, 0xc4, 0x97, 0xef, 0x5e, 0x8b, 0x58, 0x72, 0xbb, 0xaa, 0x19, 0xa3, 0x62, - 0xeb, 0xb0, 0x26, 0xf2, 0x7c, 0x32, 0x15, 0x34, 0x75, 0x5a, 0x9e, 0x35, 0xe8, 0xf1, 0x8e, 0xc8, - 0xf3, 0x3d, 0x41, 0xd3, 0xb9, 0xf4, 0x8b, 0xda, 0x6a, 0xe9, 0x11, 0x74, 0x17, 0x5a, 0x32, 0x07, - 0x3a, 0x22, 0x0c, 0x25, 0x12, 0x19, 0x99, 0xba, 0x4d, 0x65, 0xea, 0x4d, 0x1c, 0xe0, 0x91, 0xb3, - 0x6c, 0xbc, 0x1a, 0xb2, 0xbb, 0xb0, 0x5a, 0x8a, 0xa4, 0xc0, 0x9a, 0xb0, 0x32, 0xd8, 0x3d, 0x68, - 0x87, 0x98, 0xa0, 0x42, 0x67, 0xc5, 0xb3, 0x06, 0x6b, 0xbc, 0xb6, 0xfa, 0x1f, 0x61, 0xd5, 0x2c, - 0x85, 0x31, 0x58, 0x51, 0x47, 0x39, 0x9a, 0xfe, 0x36, 0x37, 0x98, 0xed, 0x02, 0x08, 0xa5, 0x64, - 0xbc, 0x5f, 0x28, 0xa4, 0x7a, 0xfe, 0x07, 0x97, 0x2f, 0xf6, 0xd9, 0x59, 0x2e, 0x5f, 0x28, 0xeb, - 0x3f, 0x82, 0x9b, 0x17, 0xa3, 0x67, 0x9a, 0x2b, 0xa6, 0x8b, 0x9a, 0x97, 0x8d, 0xaf, 0x32, 0xfa, - 0xbf, 0x2d, 0xe8, 0x2d, 0x6e, 0x5e, 0x6b, 0x0c, 0xb2, 0xb0, 0xd2, 0x78, 0x83, 0x1b, 0xac, 0x7d, - 0xa1, 0x50, 0xa2, 0xfe, 0x02, 0x06, 0x6b, 0x82, 0x24, 0x8b, 0xcc, 0x07, 0xb0, 0xb9, 0x86, 0x3a, - 0x2b, 0x4e, 0x3f, 0x65, 0x66, 0x78, 0x9b, 0x1b, 0xcc, 0xee, 0x03, 0x44, 0x82, 0x26, 0x5f, 0x44, - 0xaa, 0x30, 0x74, 0x56, 0xcd, 0xfa, 0xed, 0x48, 0xd0, 0x7b, 0xe3, 0xd0, 0xbb, 0xd3, 0xe1, 0x82, - 0x30, 0x74, 0xda, 0x26, 0xd8, 0x89, 0x04, 0xbd, 0x25, 0x0c, 0x17, 0x8e, 0xbd, 0x73, 0xed, 0x63, - 0xdf, 0x04, 0x5b, 0xeb, 0xa5, 0x5c, 0x04, 0xe8, 0xac, 0x19, 0x19, 0x73, 0xc7, 0xe8, 0x8f, 0x05, - 0xb7, 0xaa, 0x73, 0x40, 0x39, 0x46, 0x59, 0xc6, 0x01, 0xb2, 0x02, 0xd8, 0xbf, 0xc7, 0xcd, 0xfc, - 0x46, 0xae, 0x4b, 0xff, 0xe6, 0x8d, 0xe1, 0xb5, 0xf3, 0xab, 0xd3, 0x9b, 0xd3, 0x2e, 0x1e, 0xe6, - 0x95, 0xb4, 0x0d, 0x7f, 0xd7, 0x95, 0xb4, 0x4d, 0x17, 0xbf, 0xf3, 0xf8, 0xc7, 0x89, 0x6b, 0x1d, - 0x9f, 0xb8, 0xd6, 0xaf, 0x13, 0xd7, 0xfa, 0x7a, 0xea, 0x2e, 0x1d, 0x9f, 0xba, 0x4b, 0x3f, 0x4f, - 0xdd, 0xa5, 0x0f, 0x5e, 0xd5, 0x89, 0xc2, 0x03, 0x3f, 0xce, 0x86, 0x84, 0xb2, 0x44, 0x39, 0x2c, - 0x47, 0xf3, 0x27, 0x6f, 0xbf, 0x6d, 0xde, 0xba, 0x87, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3b, - 0xbd, 0x03, 0xda, 0x0d, 0x05, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ListenerServiceClient is the client API for ListenerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ListenerServiceClient interface { - // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock - ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) - // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges - ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) -} - -type listenerServiceClient struct { - cc grpc1.ClientConn -} - -func NewListenerServiceClient(cc grpc1.ClientConn) ListenerServiceClient { - return &listenerServiceClient{cc} -} - -func (c *listenerServiceClient) ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) { - out := new(ListenDeliverBlockResponse) - err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *listenerServiceClient) ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) { - out := new(ListenStateChangesResponse) - err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenStateChanges", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ListenerServiceServer is the server API for ListenerService service. -type ListenerServiceServer interface { - // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock - ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) - // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges - ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) -} - -// UnimplementedListenerServiceServer can be embedded to have forward compatible implementations. -type UnimplementedListenerServiceServer struct { -} - -func (*UnimplementedListenerServiceServer) ListenDeliverBlock(ctx context.Context, req *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenDeliverBlock not implemented") -} -func (*UnimplementedListenerServiceServer) ListenStateChanges(ctx context.Context, req *ListenStateChangesRequest) (*ListenStateChangesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenStateChanges not implemented") -} - -func RegisterListenerServiceServer(s grpc1.Server, srv ListenerServiceServer) { - s.RegisterService(&_ListenerService_serviceDesc, srv) -} - -func _ListenerService_ListenDeliverBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenDeliverBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, req.(*ListenDeliverBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ListenerService_ListenStateChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenStateChangesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ListenerServiceServer).ListenStateChanges(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.streaming.v1.ListenerService/ListenStateChanges", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ListenerServiceServer).ListenStateChanges(ctx, req.(*ListenStateChangesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ListenerService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.streaming.v1.ListenerService", - HandlerType: (*ListenerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListenDeliverBlock", - Handler: _ListenerService_ListenDeliverBlock_Handler, - }, - { - MethodName: "ListenStateChanges", - Handler: _ListenerService_ListenStateChanges_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/streaming/v1/grpc.proto", -} - -func (m *ListenDeliverBlockRequest) 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 *ListenDeliverBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenDeliverBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TxResults) > 0 { - for iNdEx := len(m.TxResults) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TxResults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Txs) > 0 { - for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Txs[iNdEx]) - copy(dAtA[i:], m.Txs[iNdEx]) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Txs[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.BlockHeight != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListenDeliverBlockResponse) 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 *ListenDeliverBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenDeliverBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ListenStateChangesRequest) 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 *ListenStateChangesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenStateChangesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AppHash) > 0 { - i -= len(m.AppHash) - copy(dAtA[i:], m.AppHash) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.AppHash))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChangeSet) > 0 { - for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.BlockHeight != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListenStateChangesResponse) 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 *ListenStateChangesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenStateChangesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *StoreKVPair) 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 *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Delete { - i-- - if m.Delete { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Event) 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 *Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventAttribute) 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 *EventAttribute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExecTxResult) 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 *ExecTxResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExecTxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Codespace) > 0 { - i -= len(m.Codespace) - copy(dAtA[i:], m.Codespace) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Codespace))) - i-- - dAtA[i] = 0x42 - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.GasUsed != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.GasUsed)) - i-- - dAtA[i] = 0x30 - } - if m.GasWanted != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.GasWanted)) - i-- - dAtA[i] = 0x28 - } - if len(m.Info) > 0 { - i -= len(m.Info) - copy(dAtA[i:], m.Info) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Info))) - i-- - dAtA[i] = 0x22 - } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0x1a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { - offset -= sovGrpc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ListenDeliverBlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovGrpc(uint64(m.BlockHeight)) - } - if len(m.Txs) > 0 { - for _, b := range m.Txs { - l = len(b) - n += 1 + l + sovGrpc(uint64(l)) - } - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - if len(m.TxResults) > 0 { - for _, e := range m.TxResults { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - return n -} - -func (m *ListenDeliverBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ListenStateChangesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovGrpc(uint64(m.BlockHeight)) - } - if len(m.ChangeSet) > 0 { - for _, e := range m.ChangeSet { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - l = len(m.AppHash) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func (m *ListenStateChangesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *StoreKVPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - if m.Delete { - n += 2 - } - return n -} - -func (m *Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - return n -} - -func (m *EventAttribute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func (m *ExecTxResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovGrpc(uint64(m.Code)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Log) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Info) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - if m.GasWanted != 0 { - n += 1 + sovGrpc(uint64(m.GasWanted)) - } - if m.GasUsed != 0 { - n += 1 + sovGrpc(uint64(m.GasUsed)) - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - l = len(m.Codespace) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func sovGrpc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGrpc(x uint64) (n int) { - return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ListenDeliverBlockRequest) 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 ErrIntOverflowGrpc - } - 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: ListenDeliverBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenDeliverBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) - copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxResults", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TxResults = append(m.TxResults, &ExecTxResult{}) - if err := m.TxResults[len(m.TxResults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenDeliverBlockResponse) 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 ErrIntOverflowGrpc - } - 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: ListenDeliverBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenDeliverBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenStateChangesRequest) 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 ErrIntOverflowGrpc - } - 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: ListenStateChangesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenStateChangesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangeSet = append(m.ChangeSet, &StoreKVPair{}) - if err := m.ChangeSet[len(m.ChangeSet)-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 AppHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) - if m.AppHash == nil { - m.AppHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenStateChangesResponse) 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 ErrIntOverflowGrpc - } - 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: ListenStateChangesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenStateChangesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreKVPair) 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 ErrIntOverflowGrpc - } - 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: StoreKVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Delete = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Event) 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 ErrIntOverflowGrpc - } - 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: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, &EventAttribute{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventAttribute) 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 ErrIntOverflowGrpc - } - 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: EventAttribute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExecTxResult) 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 ErrIntOverflowGrpc - } - 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: ExecTxResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExecTxResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) - } - m.GasWanted = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasWanted |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - m.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasUsed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - 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 ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGrpc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGrpc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGrpc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGrpc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/snapshots/types/snapshot.pb.go b/cosmossdk.io/store/snapshots/types/snapshot.pb.go deleted file mode 100644 index e81660c4596e..000000000000 --- a/cosmossdk.io/store/snapshots/types/snapshot.pb.go +++ /dev/null @@ -1,2008 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/snapshots/v1/snapshot.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Snapshot contains Tendermint state sync snapshot info. -type Snapshot struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` - Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"` - Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` - Metadata Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata"` -} - -func (m *Snapshot) Reset() { *m = Snapshot{} } -func (m *Snapshot) String() string { return proto.CompactTextString(m) } -func (*Snapshot) ProtoMessage() {} -func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{0} -} -func (m *Snapshot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Snapshot.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 *Snapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_Snapshot.Merge(m, src) -} -func (m *Snapshot) XXX_Size() int { - return m.Size() -} -func (m *Snapshot) XXX_DiscardUnknown() { - xxx_messageInfo_Snapshot.DiscardUnknown(m) -} - -var xxx_messageInfo_Snapshot proto.InternalMessageInfo - -func (m *Snapshot) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *Snapshot) GetFormat() uint32 { - if m != nil { - return m.Format - } - return 0 -} - -func (m *Snapshot) GetChunks() uint32 { - if m != nil { - return m.Chunks - } - return 0 -} - -func (m *Snapshot) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *Snapshot) GetMetadata() Metadata { - if m != nil { - return m.Metadata - } - return Metadata{} -} - -// Metadata contains SDK-specific snapshot metadata. -type Metadata struct { - ChunkHashes [][]byte `protobuf:"bytes,1,rep,name=chunk_hashes,json=chunkHashes,proto3" json:"chunk_hashes,omitempty"` -} - -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{1} -} -func (m *Metadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Metadata.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 *Metadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metadata.Merge(m, src) -} -func (m *Metadata) XXX_Size() int { - return m.Size() -} -func (m *Metadata) XXX_DiscardUnknown() { - xxx_messageInfo_Metadata.DiscardUnknown(m) -} - -var xxx_messageInfo_Metadata proto.InternalMessageInfo - -func (m *Metadata) GetChunkHashes() [][]byte { - if m != nil { - return m.ChunkHashes - } - return nil -} - -// SnapshotItem is an item contained in a rootmulti.Store snapshot. -type SnapshotItem struct { - // item is the specific type of snapshot item. - // - // Types that are valid to be assigned to Item: - // - // *SnapshotItem_Store - // *SnapshotItem_IAVL - // *SnapshotItem_Extension - // *SnapshotItem_ExtensionPayload - Item isSnapshotItem_Item `protobuf_oneof:"item"` -} - -func (m *SnapshotItem) Reset() { *m = SnapshotItem{} } -func (m *SnapshotItem) String() string { return proto.CompactTextString(m) } -func (*SnapshotItem) ProtoMessage() {} -func (*SnapshotItem) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{2} -} -func (m *SnapshotItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotItem.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 *SnapshotItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotItem.Merge(m, src) -} -func (m *SnapshotItem) XXX_Size() int { - return m.Size() -} -func (m *SnapshotItem) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotItem proto.InternalMessageInfo - -type isSnapshotItem_Item interface { - isSnapshotItem_Item() - MarshalTo([]byte) (int, error) - Size() int -} - -type SnapshotItem_Store struct { - Store *SnapshotStoreItem `protobuf:"bytes,1,opt,name=store,proto3,oneof" json:"store,omitempty"` -} -type SnapshotItem_IAVL struct { - IAVL *SnapshotIAVLItem `protobuf:"bytes,2,opt,name=iavl,proto3,oneof" json:"iavl,omitempty"` -} -type SnapshotItem_Extension struct { - Extension *SnapshotExtensionMeta `protobuf:"bytes,3,opt,name=extension,proto3,oneof" json:"extension,omitempty"` -} -type SnapshotItem_ExtensionPayload struct { - ExtensionPayload *SnapshotExtensionPayload `protobuf:"bytes,4,opt,name=extension_payload,json=extensionPayload,proto3,oneof" json:"extension_payload,omitempty"` -} - -func (*SnapshotItem_Store) isSnapshotItem_Item() {} -func (*SnapshotItem_IAVL) isSnapshotItem_Item() {} -func (*SnapshotItem_Extension) isSnapshotItem_Item() {} -func (*SnapshotItem_ExtensionPayload) isSnapshotItem_Item() {} - -func (m *SnapshotItem) GetItem() isSnapshotItem_Item { - if m != nil { - return m.Item - } - return nil -} - -func (m *SnapshotItem) GetStore() *SnapshotStoreItem { - if x, ok := m.GetItem().(*SnapshotItem_Store); ok { - return x.Store - } - return nil -} - -func (m *SnapshotItem) GetIAVL() *SnapshotIAVLItem { - if x, ok := m.GetItem().(*SnapshotItem_IAVL); ok { - return x.IAVL - } - return nil -} - -func (m *SnapshotItem) GetExtension() *SnapshotExtensionMeta { - if x, ok := m.GetItem().(*SnapshotItem_Extension); ok { - return x.Extension - } - return nil -} - -func (m *SnapshotItem) GetExtensionPayload() *SnapshotExtensionPayload { - if x, ok := m.GetItem().(*SnapshotItem_ExtensionPayload); ok { - return x.ExtensionPayload - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SnapshotItem) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*SnapshotItem_Store)(nil), - (*SnapshotItem_IAVL)(nil), - (*SnapshotItem_Extension)(nil), - (*SnapshotItem_ExtensionPayload)(nil), - } -} - -// SnapshotStoreItem contains metadata about a snapshotted store. -type SnapshotStoreItem struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (m *SnapshotStoreItem) Reset() { *m = SnapshotStoreItem{} } -func (m *SnapshotStoreItem) String() string { return proto.CompactTextString(m) } -func (*SnapshotStoreItem) ProtoMessage() {} -func (*SnapshotStoreItem) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{3} -} -func (m *SnapshotStoreItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotStoreItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotStoreItem.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 *SnapshotStoreItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotStoreItem.Merge(m, src) -} -func (m *SnapshotStoreItem) XXX_Size() int { - return m.Size() -} -func (m *SnapshotStoreItem) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotStoreItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotStoreItem proto.InternalMessageInfo - -func (m *SnapshotStoreItem) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -// SnapshotIAVLItem is an exported IAVL node. -type SnapshotIAVLItem struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // version is block height - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - // height is depth of the tree. - Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *SnapshotIAVLItem) Reset() { *m = SnapshotIAVLItem{} } -func (m *SnapshotIAVLItem) String() string { return proto.CompactTextString(m) } -func (*SnapshotIAVLItem) ProtoMessage() {} -func (*SnapshotIAVLItem) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{4} -} -func (m *SnapshotIAVLItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotIAVLItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotIAVLItem.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 *SnapshotIAVLItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotIAVLItem.Merge(m, src) -} -func (m *SnapshotIAVLItem) XXX_Size() int { - return m.Size() -} -func (m *SnapshotIAVLItem) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotIAVLItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotIAVLItem proto.InternalMessageInfo - -func (m *SnapshotIAVLItem) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *SnapshotIAVLItem) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *SnapshotIAVLItem) GetVersion() int64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *SnapshotIAVLItem) GetHeight() int32 { - if m != nil { - return m.Height - } - return 0 -} - -// SnapshotExtensionMeta contains metadata about an external snapshotter. -type SnapshotExtensionMeta struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` -} - -func (m *SnapshotExtensionMeta) Reset() { *m = SnapshotExtensionMeta{} } -func (m *SnapshotExtensionMeta) String() string { return proto.CompactTextString(m) } -func (*SnapshotExtensionMeta) ProtoMessage() {} -func (*SnapshotExtensionMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{5} -} -func (m *SnapshotExtensionMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotExtensionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotExtensionMeta.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 *SnapshotExtensionMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotExtensionMeta.Merge(m, src) -} -func (m *SnapshotExtensionMeta) XXX_Size() int { - return m.Size() -} -func (m *SnapshotExtensionMeta) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotExtensionMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotExtensionMeta proto.InternalMessageInfo - -func (m *SnapshotExtensionMeta) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *SnapshotExtensionMeta) GetFormat() uint32 { - if m != nil { - return m.Format - } - return 0 -} - -// SnapshotExtensionPayload contains payloads of an external snapshotter. -type SnapshotExtensionPayload struct { - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` -} - -func (m *SnapshotExtensionPayload) Reset() { *m = SnapshotExtensionPayload{} } -func (m *SnapshotExtensionPayload) String() string { return proto.CompactTextString(m) } -func (*SnapshotExtensionPayload) ProtoMessage() {} -func (*SnapshotExtensionPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{6} -} -func (m *SnapshotExtensionPayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotExtensionPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotExtensionPayload.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 *SnapshotExtensionPayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotExtensionPayload.Merge(m, src) -} -func (m *SnapshotExtensionPayload) XXX_Size() int { - return m.Size() -} -func (m *SnapshotExtensionPayload) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotExtensionPayload.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotExtensionPayload proto.InternalMessageInfo - -func (m *SnapshotExtensionPayload) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -func init() { - proto.RegisterType((*Snapshot)(nil), "cosmos.store.snapshots.v1.Snapshot") - proto.RegisterType((*Metadata)(nil), "cosmos.store.snapshots.v1.Metadata") - proto.RegisterType((*SnapshotItem)(nil), "cosmos.store.snapshots.v1.SnapshotItem") - proto.RegisterType((*SnapshotStoreItem)(nil), "cosmos.store.snapshots.v1.SnapshotStoreItem") - proto.RegisterType((*SnapshotIAVLItem)(nil), "cosmos.store.snapshots.v1.SnapshotIAVLItem") - proto.RegisterType((*SnapshotExtensionMeta)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionMeta") - proto.RegisterType((*SnapshotExtensionPayload)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionPayload") -} - -func init() { - proto.RegisterFile("cosmos/store/snapshots/v1/snapshot.proto", fileDescriptor_3d5cca1aa5b69183) -} - -var fileDescriptor_3d5cca1aa5b69183 = []byte{ - // 538 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x6f, 0xd3, 0x3c, - 0x18, 0x8e, 0xd7, 0xb4, 0x5f, 0xf7, 0x26, 0x9f, 0xe8, 0xcc, 0x40, 0x61, 0x87, 0x2c, 0x84, 0x4b, - 0x24, 0x68, 0xba, 0x75, 0x88, 0x03, 0xda, 0x85, 0x8a, 0x49, 0xad, 0x00, 0x69, 0xf2, 0x24, 0x84, - 0xb8, 0x54, 0xde, 0x6a, 0x9a, 0xaa, 0x4d, 0x5d, 0xd5, 0x5e, 0x45, 0x8f, 0xfc, 0x03, 0xfe, 0x08, - 0x37, 0x7e, 0xc4, 0x8e, 0x13, 0x27, 0x4e, 0x13, 0x6a, 0xff, 0x02, 0x3f, 0x00, 0xd9, 0x4e, 0x0a, - 0xda, 0x52, 0x34, 0x6e, 0xef, 0xf3, 0xfa, 0x79, 0x1e, 0xfb, 0x7d, 0xec, 0x04, 0xa2, 0x33, 0x2e, - 0x52, 0x2e, 0x1a, 0x42, 0xf2, 0x29, 0x6b, 0x88, 0x31, 0x9d, 0x88, 0x84, 0x4b, 0xd1, 0x98, 0xed, - 0xaf, 0x40, 0x3c, 0x99, 0x72, 0xc9, 0xf1, 0x03, 0xc3, 0x8c, 0x35, 0x33, 0x5e, 0x31, 0xe3, 0xd9, - 0xfe, 0xce, 0x76, 0x9f, 0xf7, 0xb9, 0x66, 0x35, 0x54, 0x65, 0x04, 0x3b, 0x99, 0xa0, 0x6b, 0x16, - 0x32, 0xb5, 0x06, 0xe1, 0x17, 0x04, 0xd5, 0x93, 0xcc, 0x01, 0xdf, 0x87, 0x4a, 0xc2, 0x06, 0xfd, - 0x44, 0x7a, 0x28, 0x40, 0x91, 0x4d, 0x32, 0xa4, 0xfa, 0x1f, 0xf8, 0x34, 0xa5, 0xd2, 0xdb, 0x08, - 0x50, 0xf4, 0x3f, 0xc9, 0x90, 0xea, 0x9f, 0x25, 0xe7, 0xe3, 0xa1, 0xf0, 0x4a, 0xa6, 0x6f, 0x10, - 0xc6, 0x60, 0x27, 0x54, 0x24, 0x9e, 0x1d, 0xa0, 0xc8, 0x25, 0xba, 0xc6, 0x47, 0x50, 0x4d, 0x99, - 0xa4, 0x3d, 0x2a, 0xa9, 0x57, 0x0e, 0x50, 0xe4, 0x34, 0x1f, 0xc5, 0x6b, 0xe7, 0x88, 0xdf, 0x64, - 0xd4, 0x96, 0x7d, 0x71, 0xb5, 0x6b, 0x91, 0x95, 0x34, 0xac, 0x43, 0x35, 0x5f, 0xc3, 0x0f, 0xc1, - 0xd5, 0x1b, 0x76, 0xd5, 0x06, 0x4c, 0x78, 0x28, 0x28, 0x45, 0x2e, 0x71, 0x74, 0xaf, 0xad, 0x5b, - 0xe1, 0xcf, 0x0d, 0x70, 0xf3, 0xf1, 0x3a, 0x92, 0xa5, 0xf8, 0x25, 0x94, 0xf5, 0x76, 0x7a, 0x42, - 0xa7, 0xf9, 0xe4, 0x2f, 0x67, 0xc8, 0x75, 0x27, 0x6a, 0x49, 0x89, 0xdb, 0x16, 0x31, 0x62, 0xfc, - 0x0a, 0xec, 0x01, 0x9d, 0x8d, 0x74, 0x1c, 0x4e, 0xf3, 0xf1, 0x2d, 0x4c, 0x3a, 0x2f, 0xde, 0xbe, - 0x56, 0x1e, 0xad, 0xea, 0xe2, 0x6a, 0xd7, 0x56, 0xa8, 0x6d, 0x11, 0x6d, 0x82, 0x8f, 0x61, 0x93, - 0x7d, 0x94, 0x6c, 0x2c, 0x06, 0x7c, 0xac, 0x83, 0x74, 0x9a, 0x7b, 0xb7, 0x70, 0x3c, 0xca, 0x35, - 0x2a, 0x8f, 0xb6, 0x45, 0x7e, 0x9b, 0xe0, 0x53, 0xd8, 0x5a, 0x81, 0xee, 0x84, 0xce, 0x47, 0x9c, - 0xf6, 0xf4, 0x65, 0x38, 0xcd, 0x83, 0x7f, 0x71, 0x3e, 0x36, 0xd2, 0xb6, 0x45, 0x6a, 0xec, 0x5a, - 0xef, 0xf9, 0xdd, 0x6f, 0x5f, 0xeb, 0x77, 0x8c, 0x57, 0x5d, 0xf4, 0x86, 0xc1, 0x5e, 0xfc, 0xf4, - 0x59, 0xab, 0x02, 0xf6, 0x40, 0xb2, 0x34, 0x3c, 0x84, 0xad, 0x1b, 0xe9, 0xa9, 0x57, 0x31, 0xa6, - 0xa9, 0x49, 0x7e, 0x93, 0xe8, 0xba, 0xd0, 0x25, 0xfc, 0x84, 0xa0, 0x76, 0x3d, 0x37, 0x5c, 0x83, - 0xd2, 0x90, 0xcd, 0xb5, 0xd8, 0x25, 0xaa, 0xc4, 0xdb, 0x50, 0x9e, 0xd1, 0xd1, 0x39, 0xd3, 0xb7, - 0xe0, 0x12, 0x03, 0xb0, 0x07, 0xff, 0xcd, 0xd8, 0x74, 0x95, 0x65, 0x89, 0xe4, 0xf0, 0x8f, 0xd7, - 0xad, 0xa2, 0x28, 0xe7, 0xaf, 0xbb, 0xf8, 0x0c, 0xef, 0xe0, 0x5e, 0x61, 0xd0, 0x45, 0x53, 0xac, - 0xfb, 0x3e, 0x8a, 0x9d, 0x3b, 0xe0, 0xad, 0x0b, 0x5a, 0x1d, 0x3e, 0xbf, 0x2e, 0x33, 0x68, 0x0e, - 0x8b, 0xe3, 0x3e, 0xbc, 0x58, 0xf8, 0xe8, 0x72, 0xe1, 0xa3, 0x1f, 0x0b, 0x1f, 0x7d, 0x5e, 0xfa, - 0xd6, 0xe5, 0xd2, 0xb7, 0xbe, 0x2f, 0x7d, 0xeb, 0x7d, 0x68, 0xa8, 0xa2, 0x37, 0x8c, 0x07, 0xfc, - 0xc6, 0x2f, 0x45, 0xce, 0x27, 0x4c, 0x9c, 0x56, 0xf4, 0x1f, 0xe0, 0xe0, 0x57, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x57, 0xe2, 0xd5, 0x36, 0x79, 0x04, 0x00, 0x00, -} - -func (m *Snapshot) 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 *Snapshot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x22 - } - if m.Chunks != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Chunks)) - i-- - dAtA[i] = 0x18 - } - if m.Format != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Metadata) 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 *Metadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChunkHashes) > 0 { - for iNdEx := len(m.ChunkHashes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ChunkHashes[iNdEx]) - copy(dAtA[i:], m.ChunkHashes[iNdEx]) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.ChunkHashes[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SnapshotItem) 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 *SnapshotItem) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Item != nil { - { - size := m.Item.Size() - i -= size - if _, err := m.Item.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *SnapshotItem_Store) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_Store) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Store != nil { - { - size, err := m.Store.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *SnapshotItem_IAVL) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_IAVL) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.IAVL != nil { - { - size, err := m.IAVL.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *SnapshotItem_Extension) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_Extension) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Extension != nil { - { - size, err := m.Extension.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *SnapshotItem_ExtensionPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_ExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ExtensionPayload != nil { - { - size, err := m.ExtensionPayload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *SnapshotStoreItem) 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 *SnapshotStoreItem) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotStoreItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotIAVLItem) 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 *SnapshotIAVLItem) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotIAVLItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x20 - } - if m.Version != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x18 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotExtensionMeta) 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 *SnapshotExtensionMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotExtensionMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Format != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotExtensionPayload) 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 *SnapshotExtensionPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintSnapshot(dAtA []byte, offset int, v uint64) int { - offset -= sovSnapshot(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Snapshot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovSnapshot(uint64(m.Height)) - } - if m.Format != 0 { - n += 1 + sovSnapshot(uint64(m.Format)) - } - if m.Chunks != 0 { - n += 1 + sovSnapshot(uint64(m.Chunks)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - l = m.Metadata.Size() - n += 1 + l + sovSnapshot(uint64(l)) - return n -} - -func (m *Metadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ChunkHashes) > 0 { - for _, b := range m.ChunkHashes { - l = len(b) - n += 1 + l + sovSnapshot(uint64(l)) - } - } - return n -} - -func (m *SnapshotItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Item != nil { - n += m.Item.Size() - } - return n -} - -func (m *SnapshotItem_Store) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Store != nil { - l = m.Store.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotItem_IAVL) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IAVL != nil { - l = m.IAVL.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotItem_Extension) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Extension != nil { - l = m.Extension.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotItem_ExtensionPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ExtensionPayload != nil { - l = m.ExtensionPayload.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotStoreItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} - -func (m *SnapshotIAVLItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - if m.Version != 0 { - n += 1 + sovSnapshot(uint64(m.Version)) - } - if m.Height != 0 { - n += 1 + sovSnapshot(uint64(m.Height)) - } - return n -} - -func (m *SnapshotExtensionMeta) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - if m.Format != 0 { - n += 1 + sovSnapshot(uint64(m.Format)) - } - return n -} - -func (m *SnapshotExtensionPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} - -func sovSnapshot(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSnapshot(x uint64) (n int) { - return sovSnapshot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Snapshot) 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 ErrIntOverflowSnapshot - } - 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: Snapshot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType) - } - m.Chunks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Chunks |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Metadata) 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 ErrIntOverflowSnapshot - } - 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: Metadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChunkHashes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChunkHashes = append(m.ChunkHashes, make([]byte, postIndex-iNdEx)) - copy(m.ChunkHashes[len(m.ChunkHashes)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotItem) 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 ErrIntOverflowSnapshot - } - 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: SnapshotItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Store", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotStoreItem{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_Store{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IAVL", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotIAVLItem{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_IAVL{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotExtensionMeta{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_Extension{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtensionPayload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotExtensionPayload{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_ExtensionPayload{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotStoreItem) 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 ErrIntOverflowSnapshot - } - 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: SnapshotStoreItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotStoreItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - 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 ErrInvalidLengthSnapshot - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotIAVLItem) 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 ErrIntOverflowSnapshot - } - 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: SnapshotIAVLItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotIAVLItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotExtensionMeta) 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 ErrIntOverflowSnapshot - } - 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: SnapshotExtensionMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotExtensionMeta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - 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 ErrInvalidLengthSnapshot - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotExtensionPayload) 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 ErrIntOverflowSnapshot - } - 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: SnapshotExtensionPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotExtensionPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSnapshot(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSnapshot - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSnapshot - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSnapshot - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSnapshot = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/streaming/abci/grpc.pb.go b/cosmossdk.io/store/streaming/abci/grpc.pb.go deleted file mode 100644 index b9a8e7622c53..000000000000 --- a/cosmossdk.io/store/streaming/abci/grpc.pb.go +++ /dev/null @@ -1,1050 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/streaming/abci/grpc.proto - -package abci - -import ( - context "context" - types "cosmossdk.io/store/types" - fmt "fmt" - v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ListenEndBlockRequest is the request type for the ListenEndBlock RPC method -type ListenFinalizeBlockRequest struct { - Req *v1.FinalizeBlockRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"` - Res *v1.FinalizeBlockResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` -} - -func (m *ListenFinalizeBlockRequest) Reset() { *m = ListenFinalizeBlockRequest{} } -func (m *ListenFinalizeBlockRequest) String() string { return proto.CompactTextString(m) } -func (*ListenFinalizeBlockRequest) ProtoMessage() {} -func (*ListenFinalizeBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{0} -} -func (m *ListenFinalizeBlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenFinalizeBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenFinalizeBlockRequest.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 *ListenFinalizeBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenFinalizeBlockRequest.Merge(m, src) -} -func (m *ListenFinalizeBlockRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenFinalizeBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenFinalizeBlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenFinalizeBlockRequest proto.InternalMessageInfo - -func (m *ListenFinalizeBlockRequest) GetReq() *v1.FinalizeBlockRequest { - if m != nil { - return m.Req - } - return nil -} - -func (m *ListenFinalizeBlockRequest) GetRes() *v1.FinalizeBlockResponse { - if m != nil { - return m.Res - } - return nil -} - -// ListenEndBlockResponse is the response type for the ListenEndBlock RPC method -type ListenFinalizeBlockResponse struct { -} - -func (m *ListenFinalizeBlockResponse) Reset() { *m = ListenFinalizeBlockResponse{} } -func (m *ListenFinalizeBlockResponse) String() string { return proto.CompactTextString(m) } -func (*ListenFinalizeBlockResponse) ProtoMessage() {} -func (*ListenFinalizeBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{1} -} -func (m *ListenFinalizeBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenFinalizeBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenFinalizeBlockResponse.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 *ListenFinalizeBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenFinalizeBlockResponse.Merge(m, src) -} -func (m *ListenFinalizeBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenFinalizeBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenFinalizeBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenFinalizeBlockResponse proto.InternalMessageInfo - -// ListenCommitRequest is the request type for the ListenCommit RPC method -type ListenCommitRequest struct { - // explicitly pass in block height as ResponseCommit does not contain this - // info - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Res *v1.CommitResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` - ChangeSet []*types.StoreKVPair `protobuf:"bytes,3,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` -} - -func (m *ListenCommitRequest) Reset() { *m = ListenCommitRequest{} } -func (m *ListenCommitRequest) String() string { return proto.CompactTextString(m) } -func (*ListenCommitRequest) ProtoMessage() {} -func (*ListenCommitRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{2} -} -func (m *ListenCommitRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenCommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenCommitRequest.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 *ListenCommitRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenCommitRequest.Merge(m, src) -} -func (m *ListenCommitRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenCommitRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenCommitRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenCommitRequest proto.InternalMessageInfo - -func (m *ListenCommitRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ListenCommitRequest) GetRes() *v1.CommitResponse { - if m != nil { - return m.Res - } - return nil -} - -func (m *ListenCommitRequest) GetChangeSet() []*types.StoreKVPair { - if m != nil { - return m.ChangeSet - } - return nil -} - -// ListenCommitResponse is the response type for the ListenCommit RPC method -type ListenCommitResponse struct { -} - -func (m *ListenCommitResponse) Reset() { *m = ListenCommitResponse{} } -func (m *ListenCommitResponse) String() string { return proto.CompactTextString(m) } -func (*ListenCommitResponse) ProtoMessage() {} -func (*ListenCommitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{3} -} -func (m *ListenCommitResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenCommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenCommitResponse.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 *ListenCommitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenCommitResponse.Merge(m, src) -} -func (m *ListenCommitResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenCommitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenCommitResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenCommitResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ListenFinalizeBlockRequest)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockRequest") - proto.RegisterType((*ListenFinalizeBlockResponse)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockResponse") - proto.RegisterType((*ListenCommitRequest)(nil), "cosmos.store.streaming.abci.ListenCommitRequest") - proto.RegisterType((*ListenCommitResponse)(nil), "cosmos.store.streaming.abci.ListenCommitResponse") -} - -func init() { - proto.RegisterFile("cosmos/store/streaming/abci/grpc.proto", fileDescriptor_7b98083eb9315fb6) -} - -var fileDescriptor_7b98083eb9315fb6 = []byte{ - // 414 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x8f, 0xd2, 0x40, - 0x18, 0xc6, 0x29, 0x4d, 0x4c, 0x1c, 0x38, 0x0d, 0xc6, 0x90, 0xa2, 0x0d, 0x34, 0x06, 0x39, 0x4d, - 0x6d, 0x3d, 0x88, 0xf1, 0xa2, 0x90, 0x18, 0x8d, 0x1e, 0x4c, 0x49, 0x3c, 0x78, 0x21, 0x6d, 0x7d, - 0x2d, 0x13, 0x68, 0xa7, 0xcc, 0x8c, 0x4d, 0xf4, 0x13, 0x78, 0x74, 0x0f, 0xfb, 0x35, 0xf6, 0x73, - 0xec, 0x91, 0xe3, 0x1e, 0x37, 0xf0, 0x45, 0x36, 0x9d, 0x59, 0x08, 0xcd, 0xb2, 0x7f, 0x38, 0xf6, - 0x9d, 0xe7, 0xf7, 0xbc, 0x4f, 0xe7, 0x7d, 0x07, 0xf5, 0x63, 0x26, 0x52, 0x26, 0x5c, 0x21, 0x19, - 0x07, 0x57, 0x48, 0x0e, 0x61, 0x4a, 0xb3, 0xc4, 0x0d, 0xa3, 0x98, 0xba, 0x09, 0xcf, 0x63, 0x92, - 0x73, 0x26, 0x19, 0xee, 0x68, 0x1d, 0x51, 0x3a, 0xb2, 0xd3, 0x91, 0x52, 0x67, 0x3d, 0x8b, 0x59, - 0x0a, 0x32, 0xfa, 0x25, 0x35, 0x56, 0x78, 0xae, 0xfc, 0x93, 0x83, 0xd0, 0xa8, 0xf5, 0xa2, 0xd2, - 0xa2, 0xf0, 0x22, 0x90, 0xa1, 0xe7, 0x2e, 0xa8, 0x90, 0x90, 0x95, 0x16, 0x4a, 0xe5, 0x9c, 0x18, - 0xc8, 0xfa, 0xaa, 0x6a, 0x1f, 0x69, 0x16, 0x2e, 0xe8, 0x5f, 0x18, 0x2d, 0x58, 0x3c, 0x0f, 0x60, - 0xf9, 0x1b, 0x84, 0xc4, 0x43, 0x64, 0x72, 0x58, 0xb6, 0x8d, 0xae, 0x31, 0x68, 0xf8, 0x7d, 0xb2, - 0x6d, 0xa8, 0xfa, 0x93, 0xc2, 0x23, 0x87, 0xa0, 0xa0, 0x44, 0xf0, 0xdb, 0x92, 0x14, 0xed, 0xba, - 0x22, 0x5f, 0xde, 0x4b, 0x8a, 0x9c, 0x65, 0x02, 0x4a, 0x54, 0x38, 0xcf, 0x51, 0xe7, 0x60, 0x24, - 0xad, 0x71, 0xce, 0x0c, 0xd4, 0xd2, 0xe7, 0x63, 0x96, 0xa6, 0x54, 0x6e, 0xb3, 0xf6, 0x50, 0x33, - 0x2a, 0x85, 0xd3, 0x19, 0xd0, 0x64, 0x26, 0x55, 0x68, 0x33, 0x68, 0xa8, 0xda, 0x27, 0x55, 0xc2, - 0xfe, 0x7e, 0xa8, 0xee, 0xcd, 0x50, 0x5b, 0xc3, 0xbd, 0x34, 0xf8, 0x3d, 0x42, 0xf1, 0x2c, 0xcc, - 0x12, 0x98, 0x0a, 0x90, 0x6d, 0xb3, 0x6b, 0x0e, 0x1a, 0x7e, 0x8f, 0x54, 0xe6, 0x72, 0x7d, 0xb9, - 0x64, 0x52, 0x7e, 0x7d, 0xf9, 0xfe, 0x2d, 0xa4, 0x3c, 0x78, 0xac, 0xa1, 0x09, 0x48, 0xe7, 0x29, - 0x7a, 0x52, 0xcd, 0xab, 0xed, 0xfd, 0xd3, 0x3a, 0x6a, 0x7d, 0x18, 0x8d, 0x3f, 0xeb, 0x43, 0xe0, - 0x13, 0xe0, 0x05, 0x8d, 0x01, 0xff, 0xdb, 0xfd, 0x60, 0xe5, 0x02, 0xf0, 0x1b, 0x72, 0xc7, 0x36, - 0x90, 0xdb, 0xa7, 0x68, 0x0d, 0x8f, 0x07, 0x75, 0x44, 0x2c, 0x50, 0x73, 0x3f, 0x3a, 0x7e, 0xf5, - 0x00, 0xa7, 0xca, 0x54, 0x2c, 0xef, 0x08, 0x42, 0x37, 0x1d, 0xbd, 0x3b, 0x5f, 0xdb, 0xc6, 0x6a, - 0x6d, 0x1b, 0x97, 0x6b, 0xdb, 0xf8, 0xbf, 0xb1, 0x6b, 0xab, 0x8d, 0x5d, 0xbb, 0xd8, 0xd8, 0xb5, - 0x1f, 0x3d, 0xed, 0x25, 0x7e, 0xce, 0x09, 0x65, 0x07, 0x1f, 0x4f, 0xf4, 0x48, 0xed, 0xf5, 0xeb, - 0xab, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xf4, 0x63, 0xc3, 0x62, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ABCIListenerServiceClient is the client API for ABCIListenerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ABCIListenerServiceClient interface { - // ListenFinalizeBlock is the corresponding endpoint for - // ABCIListener.ListenEndBlock - ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) - // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit - ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) -} - -type aBCIListenerServiceClient struct { - cc grpc1.ClientConn -} - -func NewABCIListenerServiceClient(cc grpc1.ClientConn) ABCIListenerServiceClient { - return &aBCIListenerServiceClient{cc} -} - -func (c *aBCIListenerServiceClient) ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) { - out := new(ListenFinalizeBlockResponse) - err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIListenerServiceClient) ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) { - out := new(ListenCommitResponse) - err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ABCIListenerServiceServer is the server API for ABCIListenerService service. -type ABCIListenerServiceServer interface { - // ListenFinalizeBlock is the corresponding endpoint for - // ABCIListener.ListenEndBlock - ListenFinalizeBlock(context.Context, *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) - // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit - ListenCommit(context.Context, *ListenCommitRequest) (*ListenCommitResponse, error) -} - -// UnimplementedABCIListenerServiceServer can be embedded to have forward compatible implementations. -type UnimplementedABCIListenerServiceServer struct { -} - -func (*UnimplementedABCIListenerServiceServer) ListenFinalizeBlock(ctx context.Context, req *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenFinalizeBlock not implemented") -} -func (*UnimplementedABCIListenerServiceServer) ListenCommit(ctx context.Context, req *ListenCommitRequest) (*ListenCommitResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenCommit not implemented") -} - -func RegisterABCIListenerServiceServer(s grpc1.Server, srv ABCIListenerServiceServer) { - s.RegisterService(&_ABCIListenerService_serviceDesc, srv) -} - -func _ABCIListenerService_ListenFinalizeBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenFinalizeBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, req.(*ListenFinalizeBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIListenerService_ListenCommit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenCommitRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIListenerServiceServer).ListenCommit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIListenerServiceServer).ListenCommit(ctx, req.(*ListenCommitRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ABCIListenerService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.store.streaming.abci.ABCIListenerService", - HandlerType: (*ABCIListenerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListenFinalizeBlock", - Handler: _ABCIListenerService_ListenFinalizeBlock_Handler, - }, - { - MethodName: "ListenCommit", - Handler: _ABCIListenerService_ListenCommit_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/store/streaming/abci/grpc.proto", -} - -func (m *ListenFinalizeBlockRequest) 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 *ListenFinalizeBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenFinalizeBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Res != nil { - { - size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Req != nil { - { - size, err := m.Req.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListenFinalizeBlockResponse) 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 *ListenFinalizeBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenFinalizeBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ListenCommitRequest) 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 *ListenCommitRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenCommitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChangeSet) > 0 { - for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Res != nil { - { - size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.BlockHeight != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListenCommitResponse) 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 *ListenCommitResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenCommitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { - offset -= sovGrpc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ListenFinalizeBlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Req != nil { - l = m.Req.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - if m.Res != nil { - l = m.Res.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func (m *ListenFinalizeBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ListenCommitRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovGrpc(uint64(m.BlockHeight)) - } - if m.Res != nil { - l = m.Res.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - if len(m.ChangeSet) > 0 { - for _, e := range m.ChangeSet { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - return n -} - -func (m *ListenCommitResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovGrpc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGrpc(x uint64) (n int) { - return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ListenFinalizeBlockRequest) 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 ErrIntOverflowGrpc - } - 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: ListenFinalizeBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenFinalizeBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Req == nil { - m.Req = &v1.FinalizeBlockRequest{} - } - if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Res == nil { - m.Res = &v1.FinalizeBlockResponse{} - } - if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenFinalizeBlockResponse) 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 ErrIntOverflowGrpc - } - 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: ListenFinalizeBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenFinalizeBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenCommitRequest) 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 ErrIntOverflowGrpc - } - 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: ListenCommitRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenCommitRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Res == nil { - m.Res = &v1.CommitResponse{} - } - if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangeSet = append(m.ChangeSet, &types.StoreKVPair{}) - if err := m.ChangeSet[len(m.ChangeSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenCommitResponse) 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 ErrIntOverflowGrpc - } - 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: ListenCommitResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenCommitResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGrpc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGrpc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGrpc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGrpc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/types/commit_info.pb.go b/cosmossdk.io/store/types/commit_info.pb.go deleted file mode 100644 index 81220a79c236..000000000000 --- a/cosmossdk.io/store/types/commit_info.pb.go +++ /dev/null @@ -1,864 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/v1beta1/commit_info.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// CommitInfo defines commit information used by the multi-store when committing -// a version/height. -type CommitInfo struct { - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - StoreInfos []StoreInfo `protobuf:"bytes,2,rep,name=store_infos,json=storeInfos,proto3" json:"store_infos"` - Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` -} - -func (m *CommitInfo) Reset() { *m = CommitInfo{} } -func (m *CommitInfo) String() string { return proto.CompactTextString(m) } -func (*CommitInfo) ProtoMessage() {} -func (*CommitInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_5f8c656cdef8c524, []int{0} -} -func (m *CommitInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitInfo.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 *CommitInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitInfo.Merge(m, src) -} -func (m *CommitInfo) XXX_Size() int { - return m.Size() -} -func (m *CommitInfo) XXX_DiscardUnknown() { - xxx_messageInfo_CommitInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitInfo proto.InternalMessageInfo - -func (m *CommitInfo) GetVersion() int64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *CommitInfo) GetStoreInfos() []StoreInfo { - if m != nil { - return m.StoreInfos - } - return nil -} - -func (m *CommitInfo) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - -// StoreInfo defines store-specific commit information. It contains a reference -// between a store name and the commit ID. -type StoreInfo struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - CommitId CommitID `protobuf:"bytes,2,opt,name=commit_id,json=commitId,proto3" json:"commit_id"` -} - -func (m *StoreInfo) Reset() { *m = StoreInfo{} } -func (m *StoreInfo) String() string { return proto.CompactTextString(m) } -func (*StoreInfo) ProtoMessage() {} -func (*StoreInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_5f8c656cdef8c524, []int{1} -} -func (m *StoreInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreInfo.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 *StoreInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreInfo.Merge(m, src) -} -func (m *StoreInfo) XXX_Size() int { - return m.Size() -} -func (m *StoreInfo) XXX_DiscardUnknown() { - xxx_messageInfo_StoreInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_StoreInfo proto.InternalMessageInfo - -func (m *StoreInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *StoreInfo) GetCommitId() CommitID { - if m != nil { - return m.CommitId - } - return CommitID{} -} - -// CommitID defines the commitment information when a specific store is -// committed. -type CommitID struct { - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (m *CommitID) Reset() { *m = CommitID{} } -func (*CommitID) ProtoMessage() {} -func (*CommitID) Descriptor() ([]byte, []int) { - return fileDescriptor_5f8c656cdef8c524, []int{2} -} -func (m *CommitID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitID.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 *CommitID) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitID.Merge(m, src) -} -func (m *CommitID) XXX_Size() int { - return m.Size() -} -func (m *CommitID) XXX_DiscardUnknown() { - xxx_messageInfo_CommitID.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitID proto.InternalMessageInfo - -func (m *CommitID) GetVersion() int64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *CommitID) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func init() { - proto.RegisterType((*CommitInfo)(nil), "cosmos.store.v1beta1.CommitInfo") - proto.RegisterType((*StoreInfo)(nil), "cosmos.store.v1beta1.StoreInfo") - proto.RegisterType((*CommitID)(nil), "cosmos.store.v1beta1.CommitID") -} - -func init() { - proto.RegisterFile("cosmos/store/v1beta1/commit_info.proto", fileDescriptor_5f8c656cdef8c524) -} - -var fileDescriptor_5f8c656cdef8c524 = []byte{ - // 336 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4e, 0xf2, 0x50, - 0x14, 0xc7, 0x7b, 0xa1, 0xf9, 0x3e, 0x7a, 0x70, 0xba, 0x61, 0x68, 0x18, 0x6e, 0x09, 0x83, 0x61, - 0xba, 0x0d, 0xb8, 0x39, 0x98, 0x58, 0x8d, 0x09, 0x6b, 0x75, 0x72, 0x31, 0x2d, 0x5c, 0x4a, 0xa3, - 0xed, 0x21, 0xdc, 0x2b, 0x89, 0x6f, 0xc1, 0xe8, 0xe8, 0x33, 0xf8, 0x14, 0x8c, 0x8c, 0x4e, 0x6a, - 0xe0, 0x45, 0x4c, 0x4f, 0x5b, 0x5c, 0x88, 0xdb, 0x39, 0xed, 0xef, 0x9c, 0xff, 0xaf, 0xa7, 0x70, - 0x3a, 0x41, 0x9d, 0xa1, 0xf6, 0xb5, 0xc1, 0xa5, 0xf2, 0x57, 0xc3, 0x58, 0x99, 0x68, 0xe8, 0x4f, - 0x30, 0xcb, 0x52, 0xf3, 0x90, 0xe6, 0x33, 0x94, 0x8b, 0x25, 0x1a, 0xe4, 0x9d, 0x92, 0x93, 0xc4, - 0xc9, 0x8a, 0xeb, 0x76, 0x12, 0x4c, 0x90, 0x00, 0xbf, 0xa8, 0x4a, 0xb6, 0xeb, 0x25, 0x88, 0xc9, - 0x93, 0xf2, 0xa9, 0x8b, 0x9f, 0x67, 0xbe, 0x49, 0x33, 0xa5, 0x4d, 0x94, 0x2d, 0x4a, 0xa0, 0xff, - 0xce, 0x00, 0xae, 0x28, 0x62, 0x9c, 0xcf, 0x90, 0xbb, 0xf0, 0x7f, 0xa5, 0x96, 0x3a, 0xc5, 0xdc, - 0x65, 0x3d, 0x36, 0x68, 0x86, 0x75, 0xcb, 0x6f, 0xa0, 0x4d, 0x81, 0x64, 0xa2, 0xdd, 0x46, 0xaf, - 0x39, 0x68, 0x8f, 0x3c, 0x79, 0xcc, 0x45, 0xde, 0x16, 0x5d, 0xb1, 0x2f, 0xb0, 0x37, 0x9f, 0x9e, - 0x15, 0x82, 0xae, 0x1f, 0x68, 0x1e, 0x80, 0x73, 0x70, 0x70, 0x9b, 0x3d, 0x36, 0x68, 0x8f, 0xba, - 0xb2, 0xb4, 0x94, 0xb5, 0xa5, 0xbc, 0xab, 0x89, 0xa0, 0x55, 0x2c, 0x58, 0x7f, 0x79, 0x2c, 0xfc, - 0x1d, 0xeb, 0xc7, 0xe0, 0x1c, 0x22, 0x38, 0x07, 0x3b, 0x8f, 0x32, 0x45, 0xbe, 0x4e, 0x48, 0x35, - 0xbf, 0x04, 0xa7, 0xbe, 0xdb, 0xd4, 0x6d, 0x50, 0x88, 0x38, 0xae, 0x5a, 0x7d, 0xfb, 0x75, 0x65, - 0xda, 0x2a, 0xc7, 0xc6, 0xd3, 0xfe, 0x05, 0xb4, 0xea, 0x77, 0x7f, 0x5c, 0x85, 0x83, 0x3d, 0x8f, - 0xf4, 0x9c, 0x32, 0x4e, 0x42, 0xaa, 0xcf, 0xed, 0xd7, 0x37, 0xcf, 0x0a, 0x46, 0x9b, 0x9d, 0x60, - 0xdb, 0x9d, 0x60, 0xdf, 0x3b, 0xc1, 0xd6, 0x7b, 0x61, 0x6d, 0xf7, 0xc2, 0xfa, 0xd8, 0x0b, 0xeb, - 0xde, 0x2d, 0x45, 0xf4, 0xf4, 0x51, 0xa6, 0x58, 0xfd, 0x6d, 0xf3, 0xb2, 0x50, 0x3a, 0xfe, 0x47, - 0x07, 0x38, 0xfb, 0x09, 0x00, 0x00, 0xff, 0xff, 0x67, 0xb7, 0x0d, 0x59, 0x0a, 0x02, 0x00, 0x00, -} - -func (m *CommitInfo) 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 *CommitInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintCommitInfo(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x1a - if len(m.StoreInfos) > 0 { - for iNdEx := len(m.StoreInfos) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.StoreInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommitInfo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Version != 0 { - i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *StoreInfo) 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 *StoreInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.CommitId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommitInfo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CommitID) 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 *CommitID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x12 - } - if m.Version != 0 { - i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintCommitInfo(dAtA []byte, offset int, v uint64) int { - offset -= sovCommitInfo(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CommitInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Version != 0 { - n += 1 + sovCommitInfo(uint64(m.Version)) - } - if len(m.StoreInfos) > 0 { - for _, e := range m.StoreInfos { - l = e.Size() - n += 1 + l + sovCommitInfo(uint64(l)) - } - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovCommitInfo(uint64(l)) - return n -} - -func (m *StoreInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCommitInfo(uint64(l)) - } - l = m.CommitId.Size() - n += 1 + l + sovCommitInfo(uint64(l)) - return n -} - -func (m *CommitID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Version != 0 { - n += 1 + sovCommitInfo(uint64(m.Version)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovCommitInfo(uint64(l)) - } - return n -} - -func sovCommitInfo(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCommitInfo(x uint64) (n int) { - return sovCommitInfo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CommitInfo) 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 ErrIntOverflowCommitInfo - } - 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: CommitInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StoreInfos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StoreInfos = append(m.StoreInfos, StoreInfo{}) - if err := m.StoreInfos[len(m.StoreInfos)-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 Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitInfo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommitInfo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreInfo) 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 ErrIntOverflowCommitInfo - } - 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: StoreInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - 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 ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommitId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CommitId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitInfo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommitInfo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommitID) 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 ErrIntOverflowCommitInfo - } - 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: CommitID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitInfo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommitInfo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCommitInfo(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCommitInfo - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCommitInfo - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCommitInfo - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCommitInfo = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCommitInfo = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCommitInfo = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/types/listening.pb.go b/cosmossdk.io/store/types/listening.pb.go deleted file mode 100644 index 1821ca474a6f..000000000000 --- a/cosmossdk.io/store/types/listening.pb.go +++ /dev/null @@ -1,785 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/v1beta1/listening.proto - -package types - -import ( - fmt "fmt" - v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" - _ "github.com/cosmos/cosmos-proto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and -// Deletes) It optionally includes the StoreKey for the originating KVStore and -// a Boolean flag to distinguish between Sets and Deletes -type StoreKVPair struct { - StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"` - Delete bool `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"` - Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } -func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } -func (*StoreKVPair) ProtoMessage() {} -func (*StoreKVPair) Descriptor() ([]byte, []int) { - return fileDescriptor_b6caeb9d7b7c7c10, []int{0} -} -func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreKVPair.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 *StoreKVPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreKVPair.Merge(m, src) -} -func (m *StoreKVPair) XXX_Size() int { - return m.Size() -} -func (m *StoreKVPair) XXX_DiscardUnknown() { - xxx_messageInfo_StoreKVPair.DiscardUnknown(m) -} - -var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo - -func (m *StoreKVPair) GetStoreKey() string { - if m != nil { - return m.StoreKey - } - return "" -} - -func (m *StoreKVPair) GetDelete() bool { - if m != nil { - return m.Delete - } - return false -} - -func (m *StoreKVPair) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *StoreKVPair) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -// BlockMetadata contains all the abci event data of a block -// the file streamer dump them into files together with the state changes. -type BlockMetadata struct { - ResponseCommit *v1.CommitResponse `protobuf:"bytes,6,opt,name=response_commit,json=responseCommit,proto3" json:"response_commit,omitempty"` - RequestFinalizeBlock *v1.FinalizeBlockRequest `protobuf:"bytes,7,opt,name=request_finalize_block,json=requestFinalizeBlock,proto3" json:"request_finalize_block,omitempty"` - ResponseFinalizeBlock *v1.FinalizeBlockResponse `protobuf:"bytes,8,opt,name=response_finalize_block,json=responseFinalizeBlock,proto3" json:"response_finalize_block,omitempty"` -} - -func (m *BlockMetadata) Reset() { *m = BlockMetadata{} } -func (m *BlockMetadata) String() string { return proto.CompactTextString(m) } -func (*BlockMetadata) ProtoMessage() {} -func (*BlockMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_b6caeb9d7b7c7c10, []int{1} -} -func (m *BlockMetadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockMetadata.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 *BlockMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockMetadata.Merge(m, src) -} -func (m *BlockMetadata) XXX_Size() int { - return m.Size() -} -func (m *BlockMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_BlockMetadata.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockMetadata proto.InternalMessageInfo - -func (m *BlockMetadata) GetResponseCommit() *v1.CommitResponse { - if m != nil { - return m.ResponseCommit - } - return nil -} - -func (m *BlockMetadata) GetRequestFinalizeBlock() *v1.FinalizeBlockRequest { - if m != nil { - return m.RequestFinalizeBlock - } - return nil -} - -func (m *BlockMetadata) GetResponseFinalizeBlock() *v1.FinalizeBlockResponse { - if m != nil { - return m.ResponseFinalizeBlock - } - return nil -} - -func init() { - proto.RegisterType((*StoreKVPair)(nil), "cosmos.store.v1beta1.StoreKVPair") - proto.RegisterType((*BlockMetadata)(nil), "cosmos.store.v1beta1.BlockMetadata") -} - -func init() { - proto.RegisterFile("cosmos/store/v1beta1/listening.proto", fileDescriptor_b6caeb9d7b7c7c10) -} - -var fileDescriptor_b6caeb9d7b7c7c10 = []byte{ - // 416 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0xc7, 0xeb, 0xd6, 0x2d, 0x9e, 0x07, 0x2c, 0x32, 0x65, 0x84, 0x81, 0xa2, 0x68, 0x42, 0xd0, - 0xcb, 0x1c, 0xba, 0x71, 0xe2, 0x38, 0x24, 0x24, 0x32, 0x21, 0xa1, 0x20, 0x71, 0x40, 0x48, 0x91, - 0x93, 0xbe, 0x21, 0xab, 0x69, 0x5c, 0x62, 0x2f, 0x52, 0xb9, 0xf0, 0x15, 0xf8, 0x30, 0x48, 0x7c, - 0x05, 0x8e, 0x13, 0x27, 0x8e, 0xa8, 0xfd, 0x22, 0x28, 0xb6, 0x8b, 0x34, 0x38, 0xec, 0x96, 0xff, - 0x7b, 0xff, 0xff, 0xcf, 0xcf, 0xf1, 0xa3, 0x8f, 0x4a, 0xa5, 0x17, 0x4a, 0x27, 0xda, 0xa8, 0x06, - 0x92, 0x76, 0x5a, 0x80, 0x11, 0xd3, 0xa4, 0x92, 0xda, 0x40, 0x2d, 0xeb, 0x8f, 0x7c, 0xd9, 0x28, - 0xa3, 0xd8, 0xd8, 0xb9, 0xb8, 0x75, 0x71, 0xef, 0x3a, 0x78, 0x58, 0xaa, 0x05, 0x98, 0xe2, 0xdc, - 0x24, 0xa2, 0x28, 0x65, 0xd2, 0x4e, 0x13, 0xb3, 0x5a, 0x82, 0x76, 0x99, 0x83, 0xfb, 0x2e, 0x93, - 0x5b, 0x95, 0x78, 0x80, 0x15, 0x87, 0x5f, 0xe8, 0xee, 0xdb, 0x8e, 0x74, 0xf6, 0xee, 0x8d, 0x90, - 0x0d, 0x7b, 0x40, 0x77, 0x2c, 0x38, 0x9f, 0xc3, 0x2a, 0x44, 0x31, 0x9a, 0xec, 0x64, 0xc4, 0x16, - 0xce, 0x60, 0xc5, 0xf6, 0xe9, 0x68, 0x06, 0x15, 0x18, 0x08, 0xfb, 0x31, 0x9a, 0x90, 0xcc, 0x2b, - 0x16, 0xd0, 0x41, 0x67, 0x1f, 0xc4, 0x68, 0x72, 0x33, 0xeb, 0x3e, 0xd9, 0x98, 0x0e, 0x5b, 0x51, - 0x5d, 0x40, 0x88, 0x6d, 0xcd, 0x89, 0xe7, 0x77, 0x7e, 0x7e, 0x3b, 0xda, 0x73, 0xa7, 0x1f, 0xe9, - 0xd9, 0x3c, 0x7e, 0xca, 0x9f, 0x9d, 0x1c, 0x7e, 0xef, 0xd3, 0x5b, 0xa7, 0x95, 0x2a, 0xe7, 0xaf, - 0xc1, 0x88, 0x99, 0x30, 0x82, 0xbd, 0xa2, 0x7b, 0x0d, 0xe8, 0xa5, 0xaa, 0x35, 0xe4, 0xa5, 0x5a, - 0x2c, 0xa4, 0x09, 0x47, 0x31, 0x9a, 0xec, 0x1e, 0xc7, 0x7c, 0x7b, 0x4b, 0xde, 0xdd, 0x92, 0xb7, - 0x53, 0xfe, 0xc2, 0xf6, 0x33, 0x6f, 0xcf, 0x6e, 0x6f, 0x83, 0xae, 0xce, 0x3e, 0xd0, 0xfd, 0x06, - 0x3e, 0x5d, 0x80, 0x36, 0xf9, 0xb9, 0xac, 0x45, 0x25, 0x3f, 0x43, 0x5e, 0x74, 0x87, 0x85, 0x37, - 0x2c, 0xf1, 0xf1, 0xff, 0xc4, 0x97, 0xde, 0x67, 0x67, 0xca, 0x5c, 0x38, 0x1b, 0x7b, 0xca, 0x95, - 0x26, 0xcb, 0xe9, 0xbd, 0xbf, 0x83, 0xfe, 0x83, 0x27, 0x16, 0xff, 0xe4, 0x5a, 0xbc, 0x9f, 0xfb, - 0xee, 0x96, 0x73, 0xa5, 0x9d, 0x62, 0x82, 0x82, 0x7e, 0x8a, 0x49, 0x3f, 0x18, 0xa4, 0x98, 0x0c, - 0x02, 0x9c, 0x62, 0x82, 0x83, 0x61, 0x8a, 0xc9, 0x30, 0x18, 0x9d, 0x1e, 0xff, 0x58, 0x47, 0xe8, - 0x72, 0x1d, 0xa1, 0xdf, 0xeb, 0x08, 0x7d, 0xdd, 0x44, 0xbd, 0xcb, 0x4d, 0xd4, 0xfb, 0xb5, 0x89, - 0x7a, 0xef, 0x43, 0xf7, 0x93, 0xf5, 0x6c, 0xce, 0xa5, 0xf2, 0xfb, 0x64, 0xf7, 0xa1, 0x18, 0xd9, - 0x57, 0x3f, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x98, 0x9f, 0x12, 0x13, 0x6c, 0x02, 0x00, 0x00, -} - -func (m *StoreKVPair) 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 *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintListening(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x22 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintListening(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x1a - } - if m.Delete { - i-- - if m.Delete { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.StoreKey) > 0 { - i -= len(m.StoreKey) - copy(dAtA[i:], m.StoreKey) - i = encodeVarintListening(dAtA, i, uint64(len(m.StoreKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockMetadata) 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 *BlockMetadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ResponseFinalizeBlock != nil { - { - size, err := m.ResponseFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintListening(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.RequestFinalizeBlock != nil { - { - size, err := m.RequestFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintListening(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.ResponseCommit != nil { - { - size, err := m.ResponseCommit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintListening(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} - -func encodeVarintListening(dAtA []byte, offset int, v uint64) int { - offset -= sovListening(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *StoreKVPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StoreKey) - if l > 0 { - n += 1 + l + sovListening(uint64(l)) - } - if m.Delete { - n += 2 - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovListening(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovListening(uint64(l)) - } - return n -} - -func (m *BlockMetadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ResponseCommit != nil { - l = m.ResponseCommit.Size() - n += 1 + l + sovListening(uint64(l)) - } - if m.RequestFinalizeBlock != nil { - l = m.RequestFinalizeBlock.Size() - n += 1 + l + sovListening(uint64(l)) - } - if m.ResponseFinalizeBlock != nil { - l = m.ResponseFinalizeBlock.Size() - n += 1 + l + sovListening(uint64(l)) - } - return n -} - -func sovListening(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozListening(x uint64) (n int) { - return sovListening(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *StoreKVPair) 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 ErrIntOverflowListening - } - 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: StoreKVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StoreKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - 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 ErrInvalidLengthListening - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StoreKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Delete = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipListening(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthListening - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockMetadata) 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 ErrIntOverflowListening - } - 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: BlockMetadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockMetadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseCommit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResponseCommit == nil { - m.ResponseCommit = &v1.CommitResponse{} - } - if err := m.ResponseCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestFinalizeBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestFinalizeBlock == nil { - m.RequestFinalizeBlock = &v1.FinalizeBlockRequest{} - } - if err := m.RequestFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseFinalizeBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResponseFinalizeBlock == nil { - m.ResponseFinalizeBlock = &v1.FinalizeBlockResponse{} - } - if err := m.ResponseFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipListening(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthListening - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipListening(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListening - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListening - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListening - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthListening - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupListening - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthListening - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthListening = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowListening = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupListening = fmt.Errorf("proto: unexpected end of group") -)