diff --git a/api/cosmos/streaming/v1/grpc.pulsar.go b/api/cosmos/streaming/v1/grpc.pulsar.go new file mode 100644 index 000000000000..76b76b8c89b3 --- /dev/null +++ b/api/cosmos/streaming/v1/grpc.pulsar.go @@ -0,0 +1,5365 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package streamingv1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_ListenDeliverBlockRequest_2_list)(nil) + +type _ListenDeliverBlockRequest_2_list struct { + list *[][]byte +} + +func (x *_ListenDeliverBlockRequest_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ListenDeliverBlockRequest_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) +} + +func (x *_ListenDeliverBlockRequest_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_ListenDeliverBlockRequest_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_ListenDeliverBlockRequest_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message ListenDeliverBlockRequest at list field Txs as it is not of Message kind")) +} + +func (x *_ListenDeliverBlockRequest_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_ListenDeliverBlockRequest_2_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_ListenDeliverBlockRequest_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_ListenDeliverBlockRequest_3_list)(nil) + +type _ListenDeliverBlockRequest_3_list struct { + list *[]*Event +} + +func (x *_ListenDeliverBlockRequest_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ListenDeliverBlockRequest_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ListenDeliverBlockRequest_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Event) + (*x.list)[i] = concreteValue +} + +func (x *_ListenDeliverBlockRequest_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Event) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ListenDeliverBlockRequest_3_list) AppendMutable() protoreflect.Value { + v := new(Event) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListenDeliverBlockRequest_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ListenDeliverBlockRequest_3_list) NewElement() protoreflect.Value { + v := new(Event) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListenDeliverBlockRequest_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_ListenDeliverBlockRequest_4_list)(nil) + +type _ListenDeliverBlockRequest_4_list struct { + list *[]*ExecTxResult +} + +func (x *_ListenDeliverBlockRequest_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ListenDeliverBlockRequest_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ListenDeliverBlockRequest_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ExecTxResult) + (*x.list)[i] = concreteValue +} + +func (x *_ListenDeliverBlockRequest_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ExecTxResult) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ListenDeliverBlockRequest_4_list) AppendMutable() protoreflect.Value { + v := new(ExecTxResult) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListenDeliverBlockRequest_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ListenDeliverBlockRequest_4_list) NewElement() protoreflect.Value { + v := new(ExecTxResult) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListenDeliverBlockRequest_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ListenDeliverBlockRequest protoreflect.MessageDescriptor + fd_ListenDeliverBlockRequest_block_height protoreflect.FieldDescriptor + fd_ListenDeliverBlockRequest_txs protoreflect.FieldDescriptor + fd_ListenDeliverBlockRequest_events protoreflect.FieldDescriptor + fd_ListenDeliverBlockRequest_tx_results protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_ListenDeliverBlockRequest = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ListenDeliverBlockRequest") + fd_ListenDeliverBlockRequest_block_height = md_ListenDeliverBlockRequest.Fields().ByName("block_height") + fd_ListenDeliverBlockRequest_txs = md_ListenDeliverBlockRequest.Fields().ByName("txs") + fd_ListenDeliverBlockRequest_events = md_ListenDeliverBlockRequest.Fields().ByName("events") + fd_ListenDeliverBlockRequest_tx_results = md_ListenDeliverBlockRequest.Fields().ByName("tx_results") +} + +var _ protoreflect.Message = (*fastReflection_ListenDeliverBlockRequest)(nil) + +type fastReflection_ListenDeliverBlockRequest ListenDeliverBlockRequest + +func (x *ListenDeliverBlockRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_ListenDeliverBlockRequest)(x) +} + +func (x *ListenDeliverBlockRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_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_ListenDeliverBlockRequest_messageType fastReflection_ListenDeliverBlockRequest_messageType +var _ protoreflect.MessageType = fastReflection_ListenDeliverBlockRequest_messageType{} + +type fastReflection_ListenDeliverBlockRequest_messageType struct{} + +func (x fastReflection_ListenDeliverBlockRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_ListenDeliverBlockRequest)(nil) +} +func (x fastReflection_ListenDeliverBlockRequest_messageType) New() protoreflect.Message { + return new(fastReflection_ListenDeliverBlockRequest) +} +func (x fastReflection_ListenDeliverBlockRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ListenDeliverBlockRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ListenDeliverBlockRequest) Descriptor() protoreflect.MessageDescriptor { + return md_ListenDeliverBlockRequest +} + +// 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_ListenDeliverBlockRequest) Type() protoreflect.MessageType { + return _fastReflection_ListenDeliverBlockRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ListenDeliverBlockRequest) New() protoreflect.Message { + return new(fastReflection_ListenDeliverBlockRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ListenDeliverBlockRequest) Interface() protoreflect.ProtoMessage { + return (*ListenDeliverBlockRequest)(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_ListenDeliverBlockRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BlockHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.BlockHeight) + if !f(fd_ListenDeliverBlockRequest_block_height, value) { + return + } + } + if len(x.Txs) != 0 { + value := protoreflect.ValueOfList(&_ListenDeliverBlockRequest_2_list{list: &x.Txs}) + if !f(fd_ListenDeliverBlockRequest_txs, value) { + return + } + } + if len(x.Events) != 0 { + value := protoreflect.ValueOfList(&_ListenDeliverBlockRequest_3_list{list: &x.Events}) + if !f(fd_ListenDeliverBlockRequest_events, value) { + return + } + } + if len(x.TxResults) != 0 { + value := protoreflect.ValueOfList(&_ListenDeliverBlockRequest_4_list{list: &x.TxResults}) + if !f(fd_ListenDeliverBlockRequest_tx_results, 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_ListenDeliverBlockRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": + return x.BlockHeight != int64(0) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": + return len(x.Txs) != 0 + case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": + return len(x.Events) != 0 + case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": + return len(x.TxResults) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest 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_ListenDeliverBlockRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": + x.BlockHeight = int64(0) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": + x.Txs = nil + case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": + x.Events = nil + case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": + x.TxResults = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest 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_ListenDeliverBlockRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": + value := x.BlockHeight + return protoreflect.ValueOfInt64(value) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": + if len(x.Txs) == 0 { + return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_2_list{}) + } + listValue := &_ListenDeliverBlockRequest_2_list{list: &x.Txs} + return protoreflect.ValueOfList(listValue) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": + if len(x.Events) == 0 { + return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_3_list{}) + } + listValue := &_ListenDeliverBlockRequest_3_list{list: &x.Events} + return protoreflect.ValueOfList(listValue) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": + if len(x.TxResults) == 0 { + return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_4_list{}) + } + listValue := &_ListenDeliverBlockRequest_4_list{list: &x.TxResults} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest 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_ListenDeliverBlockRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": + x.BlockHeight = value.Int() + case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": + lv := value.List() + clv := lv.(*_ListenDeliverBlockRequest_2_list) + x.Txs = *clv.list + case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": + lv := value.List() + clv := lv.(*_ListenDeliverBlockRequest_3_list) + x.Events = *clv.list + case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": + lv := value.List() + clv := lv.(*_ListenDeliverBlockRequest_4_list) + x.TxResults = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest 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_ListenDeliverBlockRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": + if x.Txs == nil { + x.Txs = [][]byte{} + } + value := &_ListenDeliverBlockRequest_2_list{list: &x.Txs} + return protoreflect.ValueOfList(value) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": + if x.Events == nil { + x.Events = []*Event{} + } + value := &_ListenDeliverBlockRequest_3_list{list: &x.Events} + return protoreflect.ValueOfList(value) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": + if x.TxResults == nil { + x.TxResults = []*ExecTxResult{} + } + value := &_ListenDeliverBlockRequest_4_list{list: &x.TxResults} + return protoreflect.ValueOfList(value) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": + panic(fmt.Errorf("field block_height of message cosmos.streaming.v1.ListenDeliverBlockRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest 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_ListenDeliverBlockRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": + list := [][]byte{} + return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_2_list{list: &list}) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": + list := []*Event{} + return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_3_list{list: &list}) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": + list := []*ExecTxResult{} + return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest 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_ListenDeliverBlockRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ListenDeliverBlockRequest", 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_ListenDeliverBlockRequest) 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_ListenDeliverBlockRequest) 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_ListenDeliverBlockRequest) 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_ListenDeliverBlockRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ListenDeliverBlockRequest) + 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.BlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.BlockHeight)) + } + if len(x.Txs) > 0 { + for _, b := range x.Txs { + l = len(b) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Events) > 0 { + for _, e := range x.Events { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.TxResults) > 0 { + for _, e := range x.TxResults { + l = options.Size(e) + 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().(*ListenDeliverBlockRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.TxResults) > 0 { + for iNdEx := len(x.TxResults) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.TxResults[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] = 0x22 + } + } + if len(x.Events) > 0 { + for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Events[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] = 0x1a + } + } + if len(x.Txs) > 0 { + for iNdEx := len(x.Txs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Txs[iNdEx]) + copy(dAtA[i:], x.Txs[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Txs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if x.BlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ListenDeliverBlockRequest) + 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: ListenDeliverBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenDeliverBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + x.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Txs", 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.Txs = append(x.Txs, make([]byte, postIndex-iNdEx)) + copy(x.Txs[len(x.Txs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", 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.Events = append(x.Events, &Event{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); 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 TxResults", 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.TxResults = append(x.TxResults, &ExecTxResult{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TxResults[len(x.TxResults)-1]); 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_ListenDeliverBlockResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_ListenDeliverBlockResponse = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ListenDeliverBlockResponse") +} + +var _ protoreflect.Message = (*fastReflection_ListenDeliverBlockResponse)(nil) + +type fastReflection_ListenDeliverBlockResponse ListenDeliverBlockResponse + +func (x *ListenDeliverBlockResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_ListenDeliverBlockResponse)(x) +} + +func (x *ListenDeliverBlockResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_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_ListenDeliverBlockResponse_messageType fastReflection_ListenDeliverBlockResponse_messageType +var _ protoreflect.MessageType = fastReflection_ListenDeliverBlockResponse_messageType{} + +type fastReflection_ListenDeliverBlockResponse_messageType struct{} + +func (x fastReflection_ListenDeliverBlockResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_ListenDeliverBlockResponse)(nil) +} +func (x fastReflection_ListenDeliverBlockResponse_messageType) New() protoreflect.Message { + return new(fastReflection_ListenDeliverBlockResponse) +} +func (x fastReflection_ListenDeliverBlockResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ListenDeliverBlockResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ListenDeliverBlockResponse) Descriptor() protoreflect.MessageDescriptor { + return md_ListenDeliverBlockResponse +} + +// 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_ListenDeliverBlockResponse) Type() protoreflect.MessageType { + return _fastReflection_ListenDeliverBlockResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ListenDeliverBlockResponse) New() protoreflect.Message { + return new(fastReflection_ListenDeliverBlockResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ListenDeliverBlockResponse) Interface() protoreflect.ProtoMessage { + return (*ListenDeliverBlockResponse)(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_ListenDeliverBlockResponse) 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_ListenDeliverBlockResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse 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_ListenDeliverBlockResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse 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_ListenDeliverBlockResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse 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_ListenDeliverBlockResponse) 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.streaming.v1.ListenDeliverBlockResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse 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_ListenDeliverBlockResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse 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_ListenDeliverBlockResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse 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_ListenDeliverBlockResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ListenDeliverBlockResponse", 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_ListenDeliverBlockResponse) 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_ListenDeliverBlockResponse) 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_ListenDeliverBlockResponse) 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_ListenDeliverBlockResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ListenDeliverBlockResponse) + 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().(*ListenDeliverBlockResponse) + 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().(*ListenDeliverBlockResponse) + 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: ListenDeliverBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenDeliverBlockResponse: 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 _ protoreflect.List = (*_ListenStateChangesRequest_2_list)(nil) + +type _ListenStateChangesRequest_2_list struct { + list *[]*StoreKVPair +} + +func (x *_ListenStateChangesRequest_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ListenStateChangesRequest_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ListenStateChangesRequest_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*StoreKVPair) + (*x.list)[i] = concreteValue +} + +func (x *_ListenStateChangesRequest_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*StoreKVPair) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ListenStateChangesRequest_2_list) AppendMutable() protoreflect.Value { + v := new(StoreKVPair) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListenStateChangesRequest_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ListenStateChangesRequest_2_list) NewElement() protoreflect.Value { + v := new(StoreKVPair) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListenStateChangesRequest_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ListenStateChangesRequest protoreflect.MessageDescriptor + fd_ListenStateChangesRequest_block_height protoreflect.FieldDescriptor + fd_ListenStateChangesRequest_change_set protoreflect.FieldDescriptor + fd_ListenStateChangesRequest_app_hash protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_ListenStateChangesRequest = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ListenStateChangesRequest") + fd_ListenStateChangesRequest_block_height = md_ListenStateChangesRequest.Fields().ByName("block_height") + fd_ListenStateChangesRequest_change_set = md_ListenStateChangesRequest.Fields().ByName("change_set") + fd_ListenStateChangesRequest_app_hash = md_ListenStateChangesRequest.Fields().ByName("app_hash") +} + +var _ protoreflect.Message = (*fastReflection_ListenStateChangesRequest)(nil) + +type fastReflection_ListenStateChangesRequest ListenStateChangesRequest + +func (x *ListenStateChangesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_ListenStateChangesRequest)(x) +} + +func (x *ListenStateChangesRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_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_ListenStateChangesRequest_messageType fastReflection_ListenStateChangesRequest_messageType +var _ protoreflect.MessageType = fastReflection_ListenStateChangesRequest_messageType{} + +type fastReflection_ListenStateChangesRequest_messageType struct{} + +func (x fastReflection_ListenStateChangesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_ListenStateChangesRequest)(nil) +} +func (x fastReflection_ListenStateChangesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_ListenStateChangesRequest) +} +func (x fastReflection_ListenStateChangesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ListenStateChangesRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ListenStateChangesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_ListenStateChangesRequest +} + +// 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_ListenStateChangesRequest) Type() protoreflect.MessageType { + return _fastReflection_ListenStateChangesRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ListenStateChangesRequest) New() protoreflect.Message { + return new(fastReflection_ListenStateChangesRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ListenStateChangesRequest) Interface() protoreflect.ProtoMessage { + return (*ListenStateChangesRequest)(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_ListenStateChangesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BlockHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.BlockHeight) + if !f(fd_ListenStateChangesRequest_block_height, value) { + return + } + } + if len(x.ChangeSet) != 0 { + value := protoreflect.ValueOfList(&_ListenStateChangesRequest_2_list{list: &x.ChangeSet}) + if !f(fd_ListenStateChangesRequest_change_set, value) { + return + } + } + if len(x.AppHash) != 0 { + value := protoreflect.ValueOfBytes(x.AppHash) + if !f(fd_ListenStateChangesRequest_app_hash, 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_ListenStateChangesRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": + return x.BlockHeight != int64(0) + case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": + return len(x.ChangeSet) != 0 + case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": + return len(x.AppHash) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest 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_ListenStateChangesRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": + x.BlockHeight = int64(0) + case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": + x.ChangeSet = nil + case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": + x.AppHash = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest 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_ListenStateChangesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": + value := x.BlockHeight + return protoreflect.ValueOfInt64(value) + case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": + if len(x.ChangeSet) == 0 { + return protoreflect.ValueOfList(&_ListenStateChangesRequest_2_list{}) + } + listValue := &_ListenStateChangesRequest_2_list{list: &x.ChangeSet} + return protoreflect.ValueOfList(listValue) + case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": + value := x.AppHash + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest 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_ListenStateChangesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": + x.BlockHeight = value.Int() + case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": + lv := value.List() + clv := lv.(*_ListenStateChangesRequest_2_list) + x.ChangeSet = *clv.list + case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": + x.AppHash = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest 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_ListenStateChangesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": + if x.ChangeSet == nil { + x.ChangeSet = []*StoreKVPair{} + } + value := &_ListenStateChangesRequest_2_list{list: &x.ChangeSet} + return protoreflect.ValueOfList(value) + case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": + panic(fmt.Errorf("field block_height of message cosmos.streaming.v1.ListenStateChangesRequest is not mutable")) + case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": + panic(fmt.Errorf("field app_hash of message cosmos.streaming.v1.ListenStateChangesRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest 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_ListenStateChangesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": + list := []*StoreKVPair{} + return protoreflect.ValueOfList(&_ListenStateChangesRequest_2_list{list: &list}) + case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest 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_ListenStateChangesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ListenStateChangesRequest", 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_ListenStateChangesRequest) 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_ListenStateChangesRequest) 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_ListenStateChangesRequest) 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_ListenStateChangesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ListenStateChangesRequest) + 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.BlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.BlockHeight)) + } + if len(x.ChangeSet) > 0 { + for _, e := range x.ChangeSet { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.AppHash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ListenStateChangesRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.AppHash) > 0 { + i -= len(x.AppHash) + copy(dAtA[i:], x.AppHash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AppHash))) + i-- + dAtA[i] = 0x1a + } + if len(x.ChangeSet) > 0 { + for iNdEx := len(x.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ChangeSet[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if x.BlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ListenStateChangesRequest) + 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: ListenStateChangesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenStateChangesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + x.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", 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.ChangeSet = append(x.ChangeSet, &StoreKVPair{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ChangeSet[len(x.ChangeSet)-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 AppHash", 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.AppHash = append(x.AppHash[:0], dAtA[iNdEx:postIndex]...) + if x.AppHash == nil { + x.AppHash = []byte{} + } + 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_ListenStateChangesResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_ListenStateChangesResponse = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ListenStateChangesResponse") +} + +var _ protoreflect.Message = (*fastReflection_ListenStateChangesResponse)(nil) + +type fastReflection_ListenStateChangesResponse ListenStateChangesResponse + +func (x *ListenStateChangesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_ListenStateChangesResponse)(x) +} + +func (x *ListenStateChangesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_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_ListenStateChangesResponse_messageType fastReflection_ListenStateChangesResponse_messageType +var _ protoreflect.MessageType = fastReflection_ListenStateChangesResponse_messageType{} + +type fastReflection_ListenStateChangesResponse_messageType struct{} + +func (x fastReflection_ListenStateChangesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_ListenStateChangesResponse)(nil) +} +func (x fastReflection_ListenStateChangesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_ListenStateChangesResponse) +} +func (x fastReflection_ListenStateChangesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ListenStateChangesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ListenStateChangesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_ListenStateChangesResponse +} + +// 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_ListenStateChangesResponse) Type() protoreflect.MessageType { + return _fastReflection_ListenStateChangesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ListenStateChangesResponse) New() protoreflect.Message { + return new(fastReflection_ListenStateChangesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ListenStateChangesResponse) Interface() protoreflect.ProtoMessage { + return (*ListenStateChangesResponse)(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_ListenStateChangesResponse) 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_ListenStateChangesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse 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_ListenStateChangesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse 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_ListenStateChangesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse 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_ListenStateChangesResponse) 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.streaming.v1.ListenStateChangesResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse 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_ListenStateChangesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse 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_ListenStateChangesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse 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_ListenStateChangesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ListenStateChangesResponse", 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_ListenStateChangesResponse) 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_ListenStateChangesResponse) 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_ListenStateChangesResponse) 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_ListenStateChangesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ListenStateChangesResponse) + 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().(*ListenStateChangesResponse) + 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().(*ListenStateChangesResponse) + 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: ListenStateChangesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenStateChangesResponse: 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_StoreKVPair protoreflect.MessageDescriptor + fd_StoreKVPair_address protoreflect.FieldDescriptor + fd_StoreKVPair_key protoreflect.FieldDescriptor + fd_StoreKVPair_value protoreflect.FieldDescriptor + fd_StoreKVPair_delete protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_StoreKVPair = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("StoreKVPair") + fd_StoreKVPair_address = md_StoreKVPair.Fields().ByName("address") + fd_StoreKVPair_key = md_StoreKVPair.Fields().ByName("key") + fd_StoreKVPair_value = md_StoreKVPair.Fields().ByName("value") + fd_StoreKVPair_delete = md_StoreKVPair.Fields().ByName("delete") +} + +var _ protoreflect.Message = (*fastReflection_StoreKVPair)(nil) + +type fastReflection_StoreKVPair StoreKVPair + +func (x *StoreKVPair) ProtoReflect() protoreflect.Message { + return (*fastReflection_StoreKVPair)(x) +} + +func (x *StoreKVPair) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_StoreKVPair_messageType fastReflection_StoreKVPair_messageType +var _ protoreflect.MessageType = fastReflection_StoreKVPair_messageType{} + +type fastReflection_StoreKVPair_messageType struct{} + +func (x fastReflection_StoreKVPair_messageType) Zero() protoreflect.Message { + return (*fastReflection_StoreKVPair)(nil) +} +func (x fastReflection_StoreKVPair_messageType) New() protoreflect.Message { + return new(fastReflection_StoreKVPair) +} +func (x fastReflection_StoreKVPair_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_StoreKVPair +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_StoreKVPair) Descriptor() protoreflect.MessageDescriptor { + return md_StoreKVPair +} + +// 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_StoreKVPair) Type() protoreflect.MessageType { + return _fastReflection_StoreKVPair_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_StoreKVPair) New() protoreflect.Message { + return new(fastReflection_StoreKVPair) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_StoreKVPair) Interface() protoreflect.ProtoMessage { + return (*StoreKVPair)(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_StoreKVPair) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Address) != 0 { + value := protoreflect.ValueOfBytes(x.Address) + if !f(fd_StoreKVPair_address, value) { + return + } + } + if len(x.Key) != 0 { + value := protoreflect.ValueOfBytes(x.Key) + if !f(fd_StoreKVPair_key, value) { + return + } + } + if len(x.Value) != 0 { + value := protoreflect.ValueOfBytes(x.Value) + if !f(fd_StoreKVPair_value, value) { + return + } + } + if x.Delete != false { + value := protoreflect.ValueOfBool(x.Delete) + if !f(fd_StoreKVPair_delete, 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_StoreKVPair) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.streaming.v1.StoreKVPair.address": + return len(x.Address) != 0 + case "cosmos.streaming.v1.StoreKVPair.key": + return len(x.Key) != 0 + case "cosmos.streaming.v1.StoreKVPair.value": + return len(x.Value) != 0 + case "cosmos.streaming.v1.StoreKVPair.delete": + return x.Delete != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair 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_StoreKVPair) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.streaming.v1.StoreKVPair.address": + x.Address = nil + case "cosmos.streaming.v1.StoreKVPair.key": + x.Key = nil + case "cosmos.streaming.v1.StoreKVPair.value": + x.Value = nil + case "cosmos.streaming.v1.StoreKVPair.delete": + x.Delete = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair 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_StoreKVPair) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.streaming.v1.StoreKVPair.address": + value := x.Address + return protoreflect.ValueOfBytes(value) + case "cosmos.streaming.v1.StoreKVPair.key": + value := x.Key + return protoreflect.ValueOfBytes(value) + case "cosmos.streaming.v1.StoreKVPair.value": + value := x.Value + return protoreflect.ValueOfBytes(value) + case "cosmos.streaming.v1.StoreKVPair.delete": + value := x.Delete + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair 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_StoreKVPair) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.streaming.v1.StoreKVPair.address": + x.Address = value.Bytes() + case "cosmos.streaming.v1.StoreKVPair.key": + x.Key = value.Bytes() + case "cosmos.streaming.v1.StoreKVPair.value": + x.Value = value.Bytes() + case "cosmos.streaming.v1.StoreKVPair.delete": + x.Delete = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair 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_StoreKVPair) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.StoreKVPair.address": + panic(fmt.Errorf("field address of message cosmos.streaming.v1.StoreKVPair is not mutable")) + case "cosmos.streaming.v1.StoreKVPair.key": + panic(fmt.Errorf("field key of message cosmos.streaming.v1.StoreKVPair is not mutable")) + case "cosmos.streaming.v1.StoreKVPair.value": + panic(fmt.Errorf("field value of message cosmos.streaming.v1.StoreKVPair is not mutable")) + case "cosmos.streaming.v1.StoreKVPair.delete": + panic(fmt.Errorf("field delete of message cosmos.streaming.v1.StoreKVPair is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair 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_StoreKVPair) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.StoreKVPair.address": + return protoreflect.ValueOfBytes(nil) + case "cosmos.streaming.v1.StoreKVPair.key": + return protoreflect.ValueOfBytes(nil) + case "cosmos.streaming.v1.StoreKVPair.value": + return protoreflect.ValueOfBytes(nil) + case "cosmos.streaming.v1.StoreKVPair.delete": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair 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_StoreKVPair) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.StoreKVPair", 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_StoreKVPair) 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_StoreKVPair) 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_StoreKVPair) 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_StoreKVPair) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*StoreKVPair) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Key) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Value) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Delete { + n += 2 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*StoreKVPair) + 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.Delete { + i-- + if x.Delete { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(x.Value) > 0 { + i -= len(x.Value) + copy(dAtA[i:], x.Value) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) + i-- + dAtA[i] = 0x1a + } + if len(x.Key) > 0 { + i -= len(x.Key) + copy(dAtA[i:], x.Key) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) + i-- + dAtA[i] = 0x12 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*StoreKVPair) + 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: StoreKVPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var 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.Address = append(x.Address[:0], dAtA[iNdEx:postIndex]...) + if x.Address == nil { + x.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", 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.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) + if x.Key == nil { + x.Key = []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 Value", 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.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) + if x.Value == nil { + x.Value = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Delete = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_Event_2_list)(nil) + +type _Event_2_list struct { + list *[]*EventAttribute +} + +func (x *_Event_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Event_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Event_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*EventAttribute) + (*x.list)[i] = concreteValue +} + +func (x *_Event_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*EventAttribute) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Event_2_list) AppendMutable() protoreflect.Value { + v := new(EventAttribute) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Event_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Event_2_list) NewElement() protoreflect.Value { + v := new(EventAttribute) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Event_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Event protoreflect.MessageDescriptor + fd_Event_type protoreflect.FieldDescriptor + fd_Event_attributes protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_Event = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("Event") + fd_Event_type = md_Event.Fields().ByName("type") + fd_Event_attributes = md_Event.Fields().ByName("attributes") +} + +var _ protoreflect.Message = (*fastReflection_Event)(nil) + +type fastReflection_Event Event + +func (x *Event) ProtoReflect() protoreflect.Message { + return (*fastReflection_Event)(x) +} + +func (x *Event) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Event_messageType fastReflection_Event_messageType +var _ protoreflect.MessageType = fastReflection_Event_messageType{} + +type fastReflection_Event_messageType struct{} + +func (x fastReflection_Event_messageType) Zero() protoreflect.Message { + return (*fastReflection_Event)(nil) +} +func (x fastReflection_Event_messageType) New() protoreflect.Message { + return new(fastReflection_Event) +} +func (x fastReflection_Event_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Event +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Event) Descriptor() protoreflect.MessageDescriptor { + return md_Event +} + +// 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_Event) Type() protoreflect.MessageType { + return _fastReflection_Event_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Event) New() protoreflect.Message { + return new(fastReflection_Event) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Event) Interface() protoreflect.ProtoMessage { + return (*Event)(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_Event) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Type_ != "" { + value := protoreflect.ValueOfString(x.Type_) + if !f(fd_Event_type, value) { + return + } + } + if len(x.Attributes) != 0 { + value := protoreflect.ValueOfList(&_Event_2_list{list: &x.Attributes}) + if !f(fd_Event_attributes, 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_Event) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.streaming.v1.Event.type": + return x.Type_ != "" + case "cosmos.streaming.v1.Event.attributes": + return len(x.Attributes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.Event 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_Event) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.streaming.v1.Event.type": + x.Type_ = "" + case "cosmos.streaming.v1.Event.attributes": + x.Attributes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.Event 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_Event) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.streaming.v1.Event.type": + value := x.Type_ + return protoreflect.ValueOfString(value) + case "cosmos.streaming.v1.Event.attributes": + if len(x.Attributes) == 0 { + return protoreflect.ValueOfList(&_Event_2_list{}) + } + listValue := &_Event_2_list{list: &x.Attributes} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.Event 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_Event) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.streaming.v1.Event.type": + x.Type_ = value.Interface().(string) + case "cosmos.streaming.v1.Event.attributes": + lv := value.List() + clv := lv.(*_Event_2_list) + x.Attributes = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.Event 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_Event) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.Event.attributes": + if x.Attributes == nil { + x.Attributes = []*EventAttribute{} + } + value := &_Event_2_list{list: &x.Attributes} + return protoreflect.ValueOfList(value) + case "cosmos.streaming.v1.Event.type": + panic(fmt.Errorf("field type of message cosmos.streaming.v1.Event is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.Event 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_Event) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.Event.type": + return protoreflect.ValueOfString("") + case "cosmos.streaming.v1.Event.attributes": + list := []*EventAttribute{} + return protoreflect.ValueOfList(&_Event_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.Event 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_Event) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.Event", 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_Event) 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_Event) 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_Event) 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_Event) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Event) + 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.Type_) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Attributes) > 0 { + for _, e := range x.Attributes { + l = options.Size(e) + 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().(*Event) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Attributes) > 0 { + for iNdEx := len(x.Attributes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Attributes[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.Type_) > 0 { + i -= len(x.Type_) + copy(dAtA[i:], x.Type_) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Type_))) + 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().(*Event) + 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: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Event: 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 Type_", 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.Type_ = 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 Attributes", 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.Attributes = append(x.Attributes, &EventAttribute{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Attributes[len(x.Attributes)-1]); 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_EventAttribute protoreflect.MessageDescriptor + fd_EventAttribute_key protoreflect.FieldDescriptor + fd_EventAttribute_value protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_EventAttribute = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("EventAttribute") + fd_EventAttribute_key = md_EventAttribute.Fields().ByName("key") + fd_EventAttribute_value = md_EventAttribute.Fields().ByName("value") +} + +var _ protoreflect.Message = (*fastReflection_EventAttribute)(nil) + +type fastReflection_EventAttribute EventAttribute + +func (x *EventAttribute) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventAttribute)(x) +} + +func (x *EventAttribute) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventAttribute_messageType fastReflection_EventAttribute_messageType +var _ protoreflect.MessageType = fastReflection_EventAttribute_messageType{} + +type fastReflection_EventAttribute_messageType struct{} + +func (x fastReflection_EventAttribute_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventAttribute)(nil) +} +func (x fastReflection_EventAttribute_messageType) New() protoreflect.Message { + return new(fastReflection_EventAttribute) +} +func (x fastReflection_EventAttribute_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventAttribute +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventAttribute) Descriptor() protoreflect.MessageDescriptor { + return md_EventAttribute +} + +// 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_EventAttribute) Type() protoreflect.MessageType { + return _fastReflection_EventAttribute_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventAttribute) New() protoreflect.Message { + return new(fastReflection_EventAttribute) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventAttribute) Interface() protoreflect.ProtoMessage { + return (*EventAttribute)(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_EventAttribute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Key != "" { + value := protoreflect.ValueOfString(x.Key) + if !f(fd_EventAttribute_key, value) { + return + } + } + if x.Value != "" { + value := protoreflect.ValueOfString(x.Value) + if !f(fd_EventAttribute_value, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EventAttribute) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.streaming.v1.EventAttribute.key": + return x.Key != "" + case "cosmos.streaming.v1.EventAttribute.value": + return x.Value != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute 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_EventAttribute) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.streaming.v1.EventAttribute.key": + x.Key = "" + case "cosmos.streaming.v1.EventAttribute.value": + x.Value = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute 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_EventAttribute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.streaming.v1.EventAttribute.key": + value := x.Key + return protoreflect.ValueOfString(value) + case "cosmos.streaming.v1.EventAttribute.value": + value := x.Value + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute 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_EventAttribute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.streaming.v1.EventAttribute.key": + x.Key = value.Interface().(string) + case "cosmos.streaming.v1.EventAttribute.value": + x.Value = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute 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_EventAttribute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.EventAttribute.key": + panic(fmt.Errorf("field key of message cosmos.streaming.v1.EventAttribute is not mutable")) + case "cosmos.streaming.v1.EventAttribute.value": + panic(fmt.Errorf("field value of message cosmos.streaming.v1.EventAttribute is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute 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_EventAttribute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.EventAttribute.key": + return protoreflect.ValueOfString("") + case "cosmos.streaming.v1.EventAttribute.value": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute 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_EventAttribute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.EventAttribute", 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_EventAttribute) 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_EventAttribute) 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_EventAttribute) 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_EventAttribute) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventAttribute) + 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.Key) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Value) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventAttribute) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Value) > 0 { + i -= len(x.Value) + copy(dAtA[i:], x.Value) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) + i-- + dAtA[i] = 0x12 + } + if len(x.Key) > 0 { + i -= len(x.Key) + copy(dAtA[i:], x.Key) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) + 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().(*EventAttribute) + 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: EventAttribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var 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.Key = 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 Value", 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.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ExecTxResult_7_list)(nil) + +type _ExecTxResult_7_list struct { + list *[]*Event +} + +func (x *_ExecTxResult_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ExecTxResult_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ExecTxResult_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Event) + (*x.list)[i] = concreteValue +} + +func (x *_ExecTxResult_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Event) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ExecTxResult_7_list) AppendMutable() protoreflect.Value { + v := new(Event) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ExecTxResult_7_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ExecTxResult_7_list) NewElement() protoreflect.Value { + v := new(Event) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ExecTxResult_7_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ExecTxResult protoreflect.MessageDescriptor + fd_ExecTxResult_code protoreflect.FieldDescriptor + fd_ExecTxResult_data protoreflect.FieldDescriptor + fd_ExecTxResult_log protoreflect.FieldDescriptor + fd_ExecTxResult_info protoreflect.FieldDescriptor + fd_ExecTxResult_gas_wanted protoreflect.FieldDescriptor + fd_ExecTxResult_gas_used protoreflect.FieldDescriptor + fd_ExecTxResult_events protoreflect.FieldDescriptor + fd_ExecTxResult_codespace protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_ExecTxResult = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ExecTxResult") + fd_ExecTxResult_code = md_ExecTxResult.Fields().ByName("code") + fd_ExecTxResult_data = md_ExecTxResult.Fields().ByName("data") + fd_ExecTxResult_log = md_ExecTxResult.Fields().ByName("log") + fd_ExecTxResult_info = md_ExecTxResult.Fields().ByName("info") + fd_ExecTxResult_gas_wanted = md_ExecTxResult.Fields().ByName("gas_wanted") + fd_ExecTxResult_gas_used = md_ExecTxResult.Fields().ByName("gas_used") + fd_ExecTxResult_events = md_ExecTxResult.Fields().ByName("events") + fd_ExecTxResult_codespace = md_ExecTxResult.Fields().ByName("codespace") +} + +var _ protoreflect.Message = (*fastReflection_ExecTxResult)(nil) + +type fastReflection_ExecTxResult ExecTxResult + +func (x *ExecTxResult) ProtoReflect() protoreflect.Message { + return (*fastReflection_ExecTxResult)(x) +} + +func (x *ExecTxResult) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ExecTxResult_messageType fastReflection_ExecTxResult_messageType +var _ protoreflect.MessageType = fastReflection_ExecTxResult_messageType{} + +type fastReflection_ExecTxResult_messageType struct{} + +func (x fastReflection_ExecTxResult_messageType) Zero() protoreflect.Message { + return (*fastReflection_ExecTxResult)(nil) +} +func (x fastReflection_ExecTxResult_messageType) New() protoreflect.Message { + return new(fastReflection_ExecTxResult) +} +func (x fastReflection_ExecTxResult_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ExecTxResult +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ExecTxResult) Descriptor() protoreflect.MessageDescriptor { + return md_ExecTxResult +} + +// 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_ExecTxResult) Type() protoreflect.MessageType { + return _fastReflection_ExecTxResult_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ExecTxResult) New() protoreflect.Message { + return new(fastReflection_ExecTxResult) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ExecTxResult) Interface() protoreflect.ProtoMessage { + return (*ExecTxResult)(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_ExecTxResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Code != uint32(0) { + value := protoreflect.ValueOfUint32(x.Code) + if !f(fd_ExecTxResult_code, value) { + return + } + } + if len(x.Data) != 0 { + value := protoreflect.ValueOfBytes(x.Data) + if !f(fd_ExecTxResult_data, value) { + return + } + } + if x.Log != "" { + value := protoreflect.ValueOfString(x.Log) + if !f(fd_ExecTxResult_log, value) { + return + } + } + if x.Info != "" { + value := protoreflect.ValueOfString(x.Info) + if !f(fd_ExecTxResult_info, value) { + return + } + } + if x.GasWanted != int64(0) { + value := protoreflect.ValueOfInt64(x.GasWanted) + if !f(fd_ExecTxResult_gas_wanted, value) { + return + } + } + if x.GasUsed != int64(0) { + value := protoreflect.ValueOfInt64(x.GasUsed) + if !f(fd_ExecTxResult_gas_used, value) { + return + } + } + if len(x.Events) != 0 { + value := protoreflect.ValueOfList(&_ExecTxResult_7_list{list: &x.Events}) + if !f(fd_ExecTxResult_events, value) { + return + } + } + if x.Codespace != "" { + value := protoreflect.ValueOfString(x.Codespace) + if !f(fd_ExecTxResult_codespace, 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_ExecTxResult) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.streaming.v1.ExecTxResult.code": + return x.Code != uint32(0) + case "cosmos.streaming.v1.ExecTxResult.data": + return len(x.Data) != 0 + case "cosmos.streaming.v1.ExecTxResult.log": + return x.Log != "" + case "cosmos.streaming.v1.ExecTxResult.info": + return x.Info != "" + case "cosmos.streaming.v1.ExecTxResult.gas_wanted": + return x.GasWanted != int64(0) + case "cosmos.streaming.v1.ExecTxResult.gas_used": + return x.GasUsed != int64(0) + case "cosmos.streaming.v1.ExecTxResult.events": + return len(x.Events) != 0 + case "cosmos.streaming.v1.ExecTxResult.codespace": + return x.Codespace != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult 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_ExecTxResult) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.streaming.v1.ExecTxResult.code": + x.Code = uint32(0) + case "cosmos.streaming.v1.ExecTxResult.data": + x.Data = nil + case "cosmos.streaming.v1.ExecTxResult.log": + x.Log = "" + case "cosmos.streaming.v1.ExecTxResult.info": + x.Info = "" + case "cosmos.streaming.v1.ExecTxResult.gas_wanted": + x.GasWanted = int64(0) + case "cosmos.streaming.v1.ExecTxResult.gas_used": + x.GasUsed = int64(0) + case "cosmos.streaming.v1.ExecTxResult.events": + x.Events = nil + case "cosmos.streaming.v1.ExecTxResult.codespace": + x.Codespace = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult 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_ExecTxResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.streaming.v1.ExecTxResult.code": + value := x.Code + return protoreflect.ValueOfUint32(value) + case "cosmos.streaming.v1.ExecTxResult.data": + value := x.Data + return protoreflect.ValueOfBytes(value) + case "cosmos.streaming.v1.ExecTxResult.log": + value := x.Log + return protoreflect.ValueOfString(value) + case "cosmos.streaming.v1.ExecTxResult.info": + value := x.Info + return protoreflect.ValueOfString(value) + case "cosmos.streaming.v1.ExecTxResult.gas_wanted": + value := x.GasWanted + return protoreflect.ValueOfInt64(value) + case "cosmos.streaming.v1.ExecTxResult.gas_used": + value := x.GasUsed + return protoreflect.ValueOfInt64(value) + case "cosmos.streaming.v1.ExecTxResult.events": + if len(x.Events) == 0 { + return protoreflect.ValueOfList(&_ExecTxResult_7_list{}) + } + listValue := &_ExecTxResult_7_list{list: &x.Events} + return protoreflect.ValueOfList(listValue) + case "cosmos.streaming.v1.ExecTxResult.codespace": + value := x.Codespace + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult 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_ExecTxResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.streaming.v1.ExecTxResult.code": + x.Code = uint32(value.Uint()) + case "cosmos.streaming.v1.ExecTxResult.data": + x.Data = value.Bytes() + case "cosmos.streaming.v1.ExecTxResult.log": + x.Log = value.Interface().(string) + case "cosmos.streaming.v1.ExecTxResult.info": + x.Info = value.Interface().(string) + case "cosmos.streaming.v1.ExecTxResult.gas_wanted": + x.GasWanted = value.Int() + case "cosmos.streaming.v1.ExecTxResult.gas_used": + x.GasUsed = value.Int() + case "cosmos.streaming.v1.ExecTxResult.events": + lv := value.List() + clv := lv.(*_ExecTxResult_7_list) + x.Events = *clv.list + case "cosmos.streaming.v1.ExecTxResult.codespace": + x.Codespace = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult 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_ExecTxResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.ExecTxResult.events": + if x.Events == nil { + x.Events = []*Event{} + } + value := &_ExecTxResult_7_list{list: &x.Events} + return protoreflect.ValueOfList(value) + case "cosmos.streaming.v1.ExecTxResult.code": + panic(fmt.Errorf("field code of message cosmos.streaming.v1.ExecTxResult is not mutable")) + case "cosmos.streaming.v1.ExecTxResult.data": + panic(fmt.Errorf("field data of message cosmos.streaming.v1.ExecTxResult is not mutable")) + case "cosmos.streaming.v1.ExecTxResult.log": + panic(fmt.Errorf("field log of message cosmos.streaming.v1.ExecTxResult is not mutable")) + case "cosmos.streaming.v1.ExecTxResult.info": + panic(fmt.Errorf("field info of message cosmos.streaming.v1.ExecTxResult is not mutable")) + case "cosmos.streaming.v1.ExecTxResult.gas_wanted": + panic(fmt.Errorf("field gas_wanted of message cosmos.streaming.v1.ExecTxResult is not mutable")) + case "cosmos.streaming.v1.ExecTxResult.gas_used": + panic(fmt.Errorf("field gas_used of message cosmos.streaming.v1.ExecTxResult is not mutable")) + case "cosmos.streaming.v1.ExecTxResult.codespace": + panic(fmt.Errorf("field codespace of message cosmos.streaming.v1.ExecTxResult is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult 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_ExecTxResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.ExecTxResult.code": + return protoreflect.ValueOfUint32(uint32(0)) + case "cosmos.streaming.v1.ExecTxResult.data": + return protoreflect.ValueOfBytes(nil) + case "cosmos.streaming.v1.ExecTxResult.log": + return protoreflect.ValueOfString("") + case "cosmos.streaming.v1.ExecTxResult.info": + return protoreflect.ValueOfString("") + case "cosmos.streaming.v1.ExecTxResult.gas_wanted": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.streaming.v1.ExecTxResult.gas_used": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.streaming.v1.ExecTxResult.events": + list := []*Event{} + return protoreflect.ValueOfList(&_ExecTxResult_7_list{list: &list}) + case "cosmos.streaming.v1.ExecTxResult.codespace": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult 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_ExecTxResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ExecTxResult", 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_ExecTxResult) 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_ExecTxResult) 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_ExecTxResult) 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_ExecTxResult) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ExecTxResult) + 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.Code != 0 { + n += 1 + runtime.Sov(uint64(x.Code)) + } + l = len(x.Data) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Log) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Info) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.GasWanted != 0 { + n += 1 + runtime.Sov(uint64(x.GasWanted)) + } + if x.GasUsed != 0 { + n += 1 + runtime.Sov(uint64(x.GasUsed)) + } + if len(x.Events) > 0 { + for _, e := range x.Events { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Codespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ExecTxResult) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Codespace) > 0 { + i -= len(x.Codespace) + copy(dAtA[i:], x.Codespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Codespace))) + i-- + dAtA[i] = 0x42 + } + if len(x.Events) > 0 { + for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Events[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] = 0x3a + } + } + if x.GasUsed != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.GasUsed)) + i-- + dAtA[i] = 0x30 + } + if x.GasWanted != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.GasWanted)) + i-- + dAtA[i] = 0x28 + } + if len(x.Info) > 0 { + i -= len(x.Info) + copy(dAtA[i:], x.Info) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Info))) + i-- + dAtA[i] = 0x22 + } + if len(x.Log) > 0 { + i -= len(x.Log) + copy(dAtA[i:], x.Log) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Log))) + i-- + dAtA[i] = 0x1a + } + if len(x.Data) > 0 { + i -= len(x.Data) + copy(dAtA[i:], x.Data) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) + i-- + dAtA[i] = 0x12 + } + if x.Code != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ExecTxResult) + 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: ExecTxResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExecTxResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + x.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Code |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", 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.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) + if x.Data == nil { + x.Data = []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 Log", 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.Log = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", 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.Info = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) + } + x.GasWanted = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.GasWanted |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + x.GasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.GasUsed |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", 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.Events = append(x.Events, &Event{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Codespace", 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.Codespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/streaming/v1/grpc.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// ListenDeliverBlockRequest is the request type for the ListenDeliverBlock RPC method +type ListenDeliverBlockRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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 (x *ListenDeliverBlockRequest) Reset() { + *x = ListenDeliverBlockRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenDeliverBlockRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenDeliverBlockRequest) ProtoMessage() {} + +// Deprecated: Use ListenDeliverBlockRequest.ProtoReflect.Descriptor instead. +func (*ListenDeliverBlockRequest) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{0} +} + +func (x *ListenDeliverBlockRequest) GetBlockHeight() int64 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +func (x *ListenDeliverBlockRequest) GetTxs() [][]byte { + if x != nil { + return x.Txs + } + return nil +} + +func (x *ListenDeliverBlockRequest) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +func (x *ListenDeliverBlockRequest) GetTxResults() []*ExecTxResult { + if x != nil { + return x.TxResults + } + return nil +} + +// ListenDeliverBlockResponse is the response type for the ListenDeliverBlock RPC method +type ListenDeliverBlockResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListenDeliverBlockResponse) Reset() { + *x = ListenDeliverBlockResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenDeliverBlockResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenDeliverBlockResponse) ProtoMessage() {} + +// Deprecated: Use ListenDeliverBlockResponse.ProtoReflect.Descriptor instead. +func (*ListenDeliverBlockResponse) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{1} +} + +// ListenStateChangesRequest is the request type for the ListenStateChanges RPC method +type ListenStateChangesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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 (x *ListenStateChangesRequest) Reset() { + *x = ListenStateChangesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenStateChangesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenStateChangesRequest) ProtoMessage() {} + +// Deprecated: Use ListenStateChangesRequest.ProtoReflect.Descriptor instead. +func (*ListenStateChangesRequest) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{2} +} + +func (x *ListenStateChangesRequest) GetBlockHeight() int64 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +func (x *ListenStateChangesRequest) GetChangeSet() []*StoreKVPair { + if x != nil { + return x.ChangeSet + } + return nil +} + +func (x *ListenStateChangesRequest) GetAppHash() []byte { + if x != nil { + return x.AppHash + } + return nil +} + +// ListenStateChangesResponse is the response type for the ListenStateChanges RPC method +type ListenStateChangesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListenStateChangesResponse) Reset() { + *x = ListenStateChangesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenStateChangesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenStateChangesResponse) ProtoMessage() {} + +// Deprecated: Use ListenStateChangesResponse.ProtoReflect.Descriptor instead. +func (*ListenStateChangesResponse) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{3} +} + +// StoreKVPair is a single key-value pair, associated with a store. +type StoreKVPair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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"` // true indicates a delete operation, false indicates a set operation +} + +func (x *StoreKVPair) Reset() { + *x = StoreKVPair{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StoreKVPair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StoreKVPair) ProtoMessage() {} + +// Deprecated: Use StoreKVPair.ProtoReflect.Descriptor instead. +func (*StoreKVPair) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{4} +} + +func (x *StoreKVPair) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *StoreKVPair) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +func (x *StoreKVPair) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *StoreKVPair) GetDelete() bool { + if x != nil { + return x.Delete + } + return false +} + +// Event is a single event, associated with a transaction. +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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 (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{5} +} + +func (x *Event) GetType_() string { + if x != nil { + return x.Type_ + } + return "" +} + +func (x *Event) GetAttributes() []*EventAttribute { + if x != nil { + return x.Attributes + } + return nil +} + +// EventAttribute is a single key-value pair, associated with an event. +type EventAttribute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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 (x *EventAttribute) Reset() { + *x = EventAttribute{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventAttribute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventAttribute) ProtoMessage() {} + +// Deprecated: Use EventAttribute.ProtoReflect.Descriptor instead. +func (*EventAttribute) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{6} +} + +func (x *EventAttribute) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *EventAttribute) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// ExecTxResult contains results of executing one individual transaction. +type ExecTxResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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 (x *ExecTxResult) Reset() { + *x = ExecTxResult{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecTxResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecTxResult) ProtoMessage() {} + +// Deprecated: Use ExecTxResult.ProtoReflect.Descriptor instead. +func (*ExecTxResult) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{7} +} + +func (x *ExecTxResult) GetCode() uint32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ExecTxResult) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *ExecTxResult) GetLog() string { + if x != nil { + return x.Log + } + return "" +} + +func (x *ExecTxResult) GetInfo() string { + if x != nil { + return x.Info + } + return "" +} + +func (x *ExecTxResult) GetGasWanted() int64 { + if x != nil { + return x.GasWanted + } + return 0 +} + +func (x *ExecTxResult) GetGasUsed() int64 { + if x != nil { + return x.GasUsed + } + return 0 +} + +func (x *ExecTxResult) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +func (x *ExecTxResult) GetCodespace() string { + if x != nil { + return x.Codespace + } + return "" +} + +var File_cosmos_streaming_v1_grpc_proto protoreflect.FileDescriptor + +var file_cosmos_streaming_v1_grpc_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x22, 0xc6, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0a, + 0x74, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x54, 0x78, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x52, 0x09, 0x74, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x1c, + 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, 0x01, 0x0a, + 0x19, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3f, 0x0a, + 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x56, 0x50, + 0x61, 0x69, 0x72, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x61, 0x70, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, 0x1c, 0x0a, 0x1a, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x4b, 0x56, 0x50, 0x61, 0x69, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x22, 0x60, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, + 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x22, 0x38, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe8, 0x01, 0x0a, + 0x0c, 0x45, 0x78, 0x65, 0x63, 0x54, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x67, + 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x67, 0x61, 0x73, 0x57, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, + 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x61, + 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, + 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x32, 0xff, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x75, 0x0a, 0x12, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x44, 0x65, + 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x44, 0x65, + 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x75, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc4, 0x01, 0x0a, 0x17, 0x63, 0x6f, + 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x47, 0x72, 0x70, 0x63, 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, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 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, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_streaming_v1_grpc_proto_rawDescOnce sync.Once + file_cosmos_streaming_v1_grpc_proto_rawDescData = file_cosmos_streaming_v1_grpc_proto_rawDesc +) + +func file_cosmos_streaming_v1_grpc_proto_rawDescGZIP() []byte { + file_cosmos_streaming_v1_grpc_proto_rawDescOnce.Do(func() { + file_cosmos_streaming_v1_grpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_streaming_v1_grpc_proto_rawDescData) + }) + return file_cosmos_streaming_v1_grpc_proto_rawDescData +} + +var file_cosmos_streaming_v1_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_cosmos_streaming_v1_grpc_proto_goTypes = []interface{}{ + (*ListenDeliverBlockRequest)(nil), // 0: cosmos.streaming.v1.ListenDeliverBlockRequest + (*ListenDeliverBlockResponse)(nil), // 1: cosmos.streaming.v1.ListenDeliverBlockResponse + (*ListenStateChangesRequest)(nil), // 2: cosmos.streaming.v1.ListenStateChangesRequest + (*ListenStateChangesResponse)(nil), // 3: cosmos.streaming.v1.ListenStateChangesResponse + (*StoreKVPair)(nil), // 4: cosmos.streaming.v1.StoreKVPair + (*Event)(nil), // 5: cosmos.streaming.v1.Event + (*EventAttribute)(nil), // 6: cosmos.streaming.v1.EventAttribute + (*ExecTxResult)(nil), // 7: cosmos.streaming.v1.ExecTxResult +} +var file_cosmos_streaming_v1_grpc_proto_depIdxs = []int32{ + 5, // 0: cosmos.streaming.v1.ListenDeliverBlockRequest.events:type_name -> cosmos.streaming.v1.Event + 7, // 1: cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results:type_name -> cosmos.streaming.v1.ExecTxResult + 4, // 2: cosmos.streaming.v1.ListenStateChangesRequest.change_set:type_name -> cosmos.streaming.v1.StoreKVPair + 6, // 3: cosmos.streaming.v1.Event.attributes:type_name -> cosmos.streaming.v1.EventAttribute + 5, // 4: cosmos.streaming.v1.ExecTxResult.events:type_name -> cosmos.streaming.v1.Event + 0, // 5: cosmos.streaming.v1.ListenerService.ListenDeliverBlock:input_type -> cosmos.streaming.v1.ListenDeliverBlockRequest + 2, // 6: cosmos.streaming.v1.ListenerService.ListenStateChanges:input_type -> cosmos.streaming.v1.ListenStateChangesRequest + 1, // 7: cosmos.streaming.v1.ListenerService.ListenDeliverBlock:output_type -> cosmos.streaming.v1.ListenDeliverBlockResponse + 3, // 8: cosmos.streaming.v1.ListenerService.ListenStateChanges:output_type -> cosmos.streaming.v1.ListenStateChangesResponse + 7, // [7:9] is the sub-list for method output_type + 5, // [5:7] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_cosmos_streaming_v1_grpc_proto_init() } +func file_cosmos_streaming_v1_grpc_proto_init() { + if File_cosmos_streaming_v1_grpc_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_streaming_v1_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenDeliverBlockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenDeliverBlockResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenStateChangesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenStateChangesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StoreKVPair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventAttribute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecTxResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_streaming_v1_grpc_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_streaming_v1_grpc_proto_goTypes, + DependencyIndexes: file_cosmos_streaming_v1_grpc_proto_depIdxs, + MessageInfos: file_cosmos_streaming_v1_grpc_proto_msgTypes, + }.Build() + File_cosmos_streaming_v1_grpc_proto = out.File + file_cosmos_streaming_v1_grpc_proto_rawDesc = nil + file_cosmos_streaming_v1_grpc_proto_goTypes = nil + file_cosmos_streaming_v1_grpc_proto_depIdxs = nil +} diff --git a/api/cosmos/streaming/v1/grpc_grpc.pb.go b/api/cosmos/streaming/v1/grpc_grpc.pb.go new file mode 100644 index 000000000000..fad0b3a72eee --- /dev/null +++ b/api/cosmos/streaming/v1/grpc_grpc.pb.go @@ -0,0 +1,150 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: cosmos/streaming/v1/grpc.proto + +package streamingv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ListenerService_ListenDeliverBlock_FullMethodName = "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock" + ListenerService_ListenStateChanges_FullMethodName = "/cosmos.streaming.v1.ListenerService/ListenStateChanges" +) + +// ListenerServiceClient is the client API for ListenerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type 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 grpc.ClientConnInterface +} + +func NewListenerServiceClient(cc grpc.ClientConnInterface) 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, ListenerService_ListenDeliverBlock_FullMethodName, 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, ListenerService_ListenStateChanges_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ListenerServiceServer is the server API for ListenerService service. +// All implementations must embed UnimplementedListenerServiceServer +// for forward compatibility +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) + mustEmbedUnimplementedListenerServiceServer() +} + +// UnimplementedListenerServiceServer must be embedded to have forward compatible implementations. +type UnimplementedListenerServiceServer struct { +} + +func (UnimplementedListenerServiceServer) ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenDeliverBlock not implemented") +} +func (UnimplementedListenerServiceServer) ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenStateChanges not implemented") +} +func (UnimplementedListenerServiceServer) mustEmbedUnimplementedListenerServiceServer() {} + +// UnsafeListenerServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ListenerServiceServer will +// result in compilation errors. +type UnsafeListenerServiceServer interface { + mustEmbedUnimplementedListenerServiceServer() +} + +func RegisterListenerServiceServer(s grpc.ServiceRegistrar, 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: ListenerService_ListenDeliverBlock_FullMethodName, + } + 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: ListenerService_ListenStateChanges_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerServiceServer).ListenStateChanges(ctx, req.(*ListenStateChangesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ListenerService_ServiceDesc is the grpc.ServiceDesc for ListenerService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +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", +} diff --git a/codec/depinject.go b/codec/depinject.go index 2ec3f8b2e9b1..25ce1adb3ebd 100644 --- a/codec/depinject.go +++ b/codec/depinject.go @@ -9,6 +9,7 @@ import ( stakingmodulev1 "cosmossdk.io/api/cosmos/staking/module/v1" "cosmossdk.io/core/address" "cosmossdk.io/core/legacy" + "cosmossdk.io/core/registry" "cosmossdk.io/depinject" "cosmossdk.io/x/tx/signing" @@ -20,7 +21,7 @@ func ProvideInterfaceRegistry( addressCodec address.Codec, validatorAddressCodec address.ValidatorAddressCodec, customGetSigners []signing.CustomGetSigner, -) (types.InterfaceRegistry, error) { +) (types.InterfaceRegistry, registry.InterfaceRegistrar, error) { signingOptions := signing.Options{ AddressCodec: addressCodec, ValidatorAddressCodec: validatorAddressCodec, @@ -34,14 +35,14 @@ func ProvideInterfaceRegistry( SigningOptions: signingOptions, }) if err != nil { - return nil, err + return nil, nil, err } if err := interfaceRegistry.SigningContext().Validate(); err != nil { - return nil, err + return nil, nil, err } - return interfaceRegistry, nil + return interfaceRegistry, interfaceRegistry, nil } func ProvideLegacyAmino() legacy.Amino { diff --git a/contrib/images/simd-env/Dockerfile b/contrib/images/simd-env/Dockerfile index 88a144c10cce..0ed5b9e436af 100644 --- a/contrib/images/simd-env/Dockerfile +++ b/contrib/images/simd-env/Dockerfile @@ -27,6 +27,7 @@ COPY runtime/v2/go.mod runtime/v2/go.sum /work/runtime/v2/ COPY server/v2/appmanager/go.mod server/v2/appmanager/go.sum /work/server/v2/appmanager/ COPY server/v2/core/go.mod server/v2/core/go.sum /work/server/v2/core/ COPY server/v2/stf/go.mod server/v2/stf/go.sum /work/server/v2/stf/ +COPY server/v2/cometbft/go.mod server/v2/cometbft/go.sum /work/server/v2/cometbft/ RUN go mod download diff --git a/core/context/context._test.go b/core/context/context._test.go new file mode 100644 index 000000000000..df7d9dcd93c6 --- /dev/null +++ b/core/context/context._test.go @@ -0,0 +1,11 @@ +package context + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func Test_Sanity(t *testing.T) { + require.NotEqual(t, CometInfoKey, ExecModeKey) +} diff --git a/core/context/context.go b/core/context/context.go index 215620e2a142..b330cb48b22f 100644 --- a/core/context/context.go +++ b/core/context/context.go @@ -2,12 +2,18 @@ package context type contextKey uint8 -const ( - ExecModeKey contextKey = iota - CometInfoKey contextKey = iota +type ( + execModeKey struct{} + cometInfoKey struct{} + environmentKey struct{} ) -// EnvironmentContextKey is the context key for the environment. -// A caller should not assume the environment is available in each context. -// ref: https://github.com/cosmos/cosmos-sdk/issues/19640 -var EnvironmentContextKey = struct{}{} +var ( + ExecModeKey = execModeKey{} + CometInfoKey = cometInfoKey{} + + // EnvironmentContextKey is the context key for the environment. + // A caller should not assume the environment is available in each context. + // ref: https://github.com/cosmos/cosmos-sdk/issues/19640 + EnvironmentContextKey = environmentKey{} +) diff --git a/core/store/store.go b/core/store/store.go index 8e91aa4434c7..029f38dd7823 100644 --- a/core/store/store.go +++ b/core/store/store.go @@ -133,7 +133,7 @@ var _ KVStore = (Writer)(nil) // ReaderMap represents a readonly view over all the accounts state. type ReaderMap interface { - // ReaderMap must return the state for the provided actor. + // GetReader must return the state for the provided actor. // Storage implements might treat this as a prefix store over an actor. // Prefix safety is on the implementer. GetReader(actor []byte) (Reader, error) @@ -142,7 +142,7 @@ type ReaderMap interface { // WriterMap represents a writable actor state. type WriterMap interface { ReaderMap - // WriterMap must the return a WritableState + // GetWriter must the return a WritableState // for the provided actor namespace. GetWriter(actor []byte) (Writer, error) // ApplyStateChanges applies all the state changes diff --git a/go.work.example b/go.work.example index 14dd182955fa..961d4f9a7cd7 100644 --- a/go.work.example +++ b/go.work.example @@ -13,6 +13,7 @@ use ( ./math ./orm ./simapp + ./simapp/v2 ./tests ./server/v2/stf ./server/v2/appmanager @@ -23,6 +24,7 @@ use ( ./tools/confix ./tools/hubl ./x/accounts + ./x/accounts/defaults/lockup ./x/auth ./x/authz ./x/bank @@ -42,5 +44,4 @@ use ( ./x/tx ./x/upgrade ./x/epochs - ./x/accounts/defaults/lockup ) diff --git a/runtime/v2/app.go b/runtime/v2/app.go index f74f0a6168c7..4f06127a9406 100644 --- a/runtime/v2/app.go +++ b/runtime/v2/app.go @@ -124,5 +124,13 @@ func (a *App) GetLogger() log.Logger { } func (a *App) ExecuteGenesisTx(_ []byte) error { - panic("not implemented") + panic("App.ExecuteGenesisTx not supported in runtime/v2") +} + +func (a *App) SetAppVersion(context.Context, uint64) error { + return nil +} + +func (a *App) AppVersion(context.Context) (uint64, error) { + return 0, nil } diff --git a/runtime/v2/manager.go b/runtime/v2/manager.go index c45a98e2f3ad..6f0b8ca2e559 100644 --- a/runtime/v2/manager.go +++ b/runtime/v2/manager.go @@ -148,12 +148,6 @@ func (m *MM) InitGenesisJSON( mod := m.modules[moduleName] - // skip genutil as it's a special module that handles gentxs - // TODO: should this be an empty extension interface on genutil for server v2? - if moduleName == "genutil" { - continue - } - // we might get an adapted module, a native core API module or a legacy module switch module := mod.(type) { case appmodule.HasGenesisAuto: @@ -184,7 +178,7 @@ func (m *MM) InitGenesisJSON( // only one module will update the validator set if len(moduleValUpdates) > 0 { if seenValUpdates { - return errors.New("validator InitGenesis updates already set by a previous module") + return fmt.Errorf("validator InitGenesis updates already set by a previous module: current module %s", moduleName) } else { seenValUpdates = true } @@ -284,7 +278,10 @@ type hasABCIEndBlock interface { } // EndBlock runs the end-block logic of all modules and tx validator updates -func (m *MM) EndBlock() (endBlockFunc func(ctx context.Context) error, valUpdateFunc func(ctx context.Context) ([]appmodulev2.ValidatorUpdate, error)) { +func (m *MM) EndBlock() ( + endBlockFunc func(ctx context.Context) error, + valUpdateFunc func(ctx context.Context) ([]appmodulev2.ValidatorUpdate, error), +) { var validatorUpdates []appmodulev2.ValidatorUpdate endBlockFunc = func(ctx context.Context) error { for _, moduleName := range m.config.EndBlockers { diff --git a/runtime/v2/module.go b/runtime/v2/module.go index a61823d47a6f..042f4cadf7d6 100644 --- a/runtime/v2/module.go +++ b/runtime/v2/module.go @@ -14,6 +14,7 @@ import ( appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1" + "cosmossdk.io/core/app" "cosmossdk.io/core/appmodule" appmodulev2 "cosmossdk.io/core/appmodule/v2" "cosmossdk.io/core/comet" @@ -125,10 +126,6 @@ func ProvideAppBuilder( _, _ = fmt.Fprintln(os.Stderr, err.Error()) } - // TODO register as Invoker from simapp v2; remove if not needed - // std.RegisterInterfaces(interfaceRegistrar) - // std.RegisterLegacyAminoCodec(amino) - msgRouterBuilder := stf.NewMsgRouterBuilder() app := &App{ storeKeys: nil, @@ -246,3 +243,9 @@ func ProvideGenesisTxHandler(appBuilder *AppBuilder) genesis.TxHandler { func ProvideCometService() comet.Service { return &services.ContextAwareCometInfoService{} } + +// ProvideAppVersionModifier returns nil, `app.VersionModifier` is a feature of BaseApp and neither used nor required for runtim/v2. +// nil is acceptable, see: https://github.com/cosmos/cosmos-sdk/blob/0a6ee406a02477ae8ccbfcbe1b51fc3930087f4c/x/upgrade/keeper/keeper.go#L438 +func ProvideAppVersionModifier(app *AppBuilder) app.VersionModifier { + return nil +} diff --git a/runtime/v2/services/comet.go b/runtime/v2/services/comet.go index 3e22b49abc24..028919fcd5a0 100644 --- a/runtime/v2/services/comet.go +++ b/runtime/v2/services/comet.go @@ -13,6 +13,9 @@ type ContextAwareCometInfoService struct{} // CometInfo implements comet.Service. func (c *ContextAwareCometInfoService) CometInfo(ctx context.Context) comet.Info { - ci := ctx.Value(corecontext.CometInfoKey).(comet.Info) + ci, ok := ctx.Value(corecontext.CometInfoKey).(comet.Info) + if !ok { + panic("comet.Info not found in context") + } return ci } diff --git a/store/v2/commitment/store.go b/store/v2/commitment/store.go index e9cf2c0c6375..b67a1149c311 100644 --- a/store/v2/commitment/store.go +++ b/store/v2/commitment/store.go @@ -113,6 +113,19 @@ func (c *CommitStore) GetLatestVersion() (uint64, error) { return version, nil } +// IsEmpty returns true if the CommitStore is empty. +func (c *CommitStore) IsEmpty() (bool, error) { + value, err := c.db.Get([]byte(latestVersionKey)) + if err != nil { + return false, err + } + if value == nil { + return true, nil + } else { + return false, nil + } +} + func (c *CommitStore) LoadVersion(targetVersion uint64) error { // Rollback the metadata to the target version. latestVersion, err := c.GetLatestVersion() @@ -167,16 +180,19 @@ func (c *CommitStore) GetCommitInfo(version uint64) (*proof.CommitInfo, error) { } func (c *CommitStore) flushCommitInfo(version uint64, cInfo *proof.CommitInfo) error { + // do nothing if commit info is nil, as will be the case for an empty, initializing store + if cInfo == nil { + return nil + } + batch := c.db.NewBatch() - if cInfo != nil { - cInfoKey := []byte(fmt.Sprintf(commitInfoKeyFmt, version)) - value, err := cInfo.Marshal() - if err != nil { - return err - } - if err := batch.Set(cInfoKey, value); err != nil { - return err - } + cInfoKey := []byte(fmt.Sprintf(commitInfoKeyFmt, version)) + value, err := cInfo.Marshal() + if err != nil { + return err + } + if err := batch.Set(cInfoKey, value); err != nil { + return err } var buf bytes.Buffer @@ -201,8 +217,11 @@ func (c *CommitStore) Commit(version uint64) (*proof.CommitInfo, error) { // If a commit event execution is interrupted, a new iavl store's version // will be larger than the RMS's metadata, when the block is replayed, we // should avoid committing that iavl store again. - var commitID proof.CommitID - if tree.GetLatestVersion() >= version { + var ( + commitID proof.CommitID + latestVersion = tree.GetLatestVersion() + ) + if latestVersion != 0 && latestVersion >= version { commitID.Version = version commitID.Hash = tree.Hash() } else { diff --git a/store/v2/database.go b/store/v2/database.go index a0466de18dea..ae235cdab4e4 100644 --- a/store/v2/database.go +++ b/store/v2/database.go @@ -57,6 +57,9 @@ type Committer interface { // GetCommitInfo returns the CommitInfo for the given version. GetCommitInfo(version uint64) (*proof.CommitInfo, error) + // IsEmpty returns true if the database is empty. + IsEmpty() (bool, error) + // Close releases associated resources. It should NOT be idempotent. It must // only be called once and any call after may panic. io.Closer diff --git a/store/v2/root/factory.go b/store/v2/root/factory.go index ec81208f0109..327a03309022 100644 --- a/store/v2/root/factory.go +++ b/store/v2/root/factory.go @@ -54,7 +54,7 @@ func CreateRootStore(opts *FactoryOptions) (store.RootStore, error) { sc *commitment.CommitStore err error ensureDir = func(dir string) error { - if err := os.MkdirAll(dir, 0x0755); err != nil { + if err := os.MkdirAll(dir, 0o0755); err != nil { return fmt.Errorf("failed to create directory %s: %w", dir, err) } return nil diff --git a/store/v2/root/store.go b/store/v2/root/store.go index 8c77cd0d7570..e5543a91a2cc 100644 --- a/store/v2/root/store.go +++ b/store/v2/root/store.go @@ -388,8 +388,13 @@ func (s *Store) writeSC(cs *corestore.Changeset) error { return fmt.Errorf("failed to write batch to SC store: %w", err) } + isEmpty, err := s.stateCommitment.IsEmpty() + if err != nil { + return fmt.Errorf("failed to check if SC store is empty: %w", err) + } + var previousHeight, version uint64 - if s.lastCommitInfo.GetVersion() == 0 && s.initialVersion > 1 { + if isEmpty { // This case means that no commit has been made in the store, we // start from initialVersion. version = s.initialVersion diff --git a/x/upgrade/keeper/abci.go b/x/upgrade/keeper/abci.go index ce1a418ea275..e6bed2f5e6ae 100644 --- a/x/upgrade/keeper/abci.go +++ b/x/upgrade/keeper/abci.go @@ -5,12 +5,10 @@ import ( "errors" "fmt" - storetypes "cosmossdk.io/store/types" consensusv1 "cosmossdk.io/x/consensus/types" "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/telemetry" - sdk "github.com/cosmos/cosmos-sdk/types" ) // PreBlocker will check if there is a scheduled plan and if it is ready to be executed. @@ -31,7 +29,6 @@ func (k Keeper) PreBlocker(ctx context.Context) error { } found := err == nil - sdkCtx := sdk.UnwrapSDKContext(ctx) // TODO remove with consensus messages if !k.DowngradeVerified() { k.SetDowngradeVerified(true) // This check will make sure that we are using a valid binary. @@ -97,8 +94,7 @@ func (k Keeper) PreBlocker(ctx context.Context) error { // We have an upgrade handler for this upgrade name, so apply the upgrade k.Logger.Info(fmt.Sprintf("applying upgrade \"%s\" at %s", plan.Name, plan.DueAt())) - sdkCtx = sdkCtx.WithBlockGasMeter(storetypes.NewInfiniteGasMeter()) - if err := k.ApplyUpgrade(sdkCtx, plan); err != nil { + if err := k.ApplyUpgrade(ctx, plan); err != nil { return err } return nil