diff --git a/api/warden/async/v1beta1/ve.pulsar.go b/api/warden/async/v1beta1/ve.pulsar.go new file mode 100644 index 000000000..a99b5f19a --- /dev/null +++ b/api/warden/async/v1beta1/ve.pulsar.go @@ -0,0 +1,2410 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package asyncv1beta1 + +import ( + abci "cosmossdk.io/api/tendermint/abci" + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_AsyncInjectedTx_1_list)(nil) + +type _AsyncInjectedTx_1_list struct { + list *[]*abci.ExtendedVoteInfo +} + +func (x *_AsyncInjectedTx_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_AsyncInjectedTx_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_AsyncInjectedTx_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*abci.ExtendedVoteInfo) + (*x.list)[i] = concreteValue +} + +func (x *_AsyncInjectedTx_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*abci.ExtendedVoteInfo) + *x.list = append(*x.list, concreteValue) +} + +func (x *_AsyncInjectedTx_1_list) AppendMutable() protoreflect.Value { + v := new(abci.ExtendedVoteInfo) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_AsyncInjectedTx_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_AsyncInjectedTx_1_list) NewElement() protoreflect.Value { + v := new(abci.ExtendedVoteInfo) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_AsyncInjectedTx_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_AsyncInjectedTx protoreflect.MessageDescriptor + fd_AsyncInjectedTx_extended_votes_info protoreflect.FieldDescriptor +) + +func init() { + file_warden_async_v1beta1_ve_proto_init() + md_AsyncInjectedTx = File_warden_async_v1beta1_ve_proto.Messages().ByName("AsyncInjectedTx") + fd_AsyncInjectedTx_extended_votes_info = md_AsyncInjectedTx.Fields().ByName("extended_votes_info") +} + +var _ protoreflect.Message = (*fastReflection_AsyncInjectedTx)(nil) + +type fastReflection_AsyncInjectedTx AsyncInjectedTx + +func (x *AsyncInjectedTx) ProtoReflect() protoreflect.Message { + return (*fastReflection_AsyncInjectedTx)(x) +} + +func (x *AsyncInjectedTx) slowProtoReflect() protoreflect.Message { + mi := &file_warden_async_v1beta1_ve_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_AsyncInjectedTx_messageType fastReflection_AsyncInjectedTx_messageType +var _ protoreflect.MessageType = fastReflection_AsyncInjectedTx_messageType{} + +type fastReflection_AsyncInjectedTx_messageType struct{} + +func (x fastReflection_AsyncInjectedTx_messageType) Zero() protoreflect.Message { + return (*fastReflection_AsyncInjectedTx)(nil) +} +func (x fastReflection_AsyncInjectedTx_messageType) New() protoreflect.Message { + return new(fastReflection_AsyncInjectedTx) +} +func (x fastReflection_AsyncInjectedTx_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AsyncInjectedTx +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AsyncInjectedTx) Descriptor() protoreflect.MessageDescriptor { + return md_AsyncInjectedTx +} + +// 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_AsyncInjectedTx) Type() protoreflect.MessageType { + return _fastReflection_AsyncInjectedTx_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AsyncInjectedTx) New() protoreflect.Message { + return new(fastReflection_AsyncInjectedTx) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AsyncInjectedTx) Interface() protoreflect.ProtoMessage { + return (*AsyncInjectedTx)(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_AsyncInjectedTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.ExtendedVotesInfo) != 0 { + value := protoreflect.ValueOfList(&_AsyncInjectedTx_1_list{list: &x.ExtendedVotesInfo}) + if !f(fd_AsyncInjectedTx_extended_votes_info, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_AsyncInjectedTx) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "warden.async.v1beta1.AsyncInjectedTx.extended_votes_info": + return len(x.ExtendedVotesInfo) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.AsyncInjectedTx")) + } + panic(fmt.Errorf("message warden.async.v1beta1.AsyncInjectedTx 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_AsyncInjectedTx) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "warden.async.v1beta1.AsyncInjectedTx.extended_votes_info": + x.ExtendedVotesInfo = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.AsyncInjectedTx")) + } + panic(fmt.Errorf("message warden.async.v1beta1.AsyncInjectedTx 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_AsyncInjectedTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "warden.async.v1beta1.AsyncInjectedTx.extended_votes_info": + if len(x.ExtendedVotesInfo) == 0 { + return protoreflect.ValueOfList(&_AsyncInjectedTx_1_list{}) + } + listValue := &_AsyncInjectedTx_1_list{list: &x.ExtendedVotesInfo} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.AsyncInjectedTx")) + } + panic(fmt.Errorf("message warden.async.v1beta1.AsyncInjectedTx 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_AsyncInjectedTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "warden.async.v1beta1.AsyncInjectedTx.extended_votes_info": + lv := value.List() + clv := lv.(*_AsyncInjectedTx_1_list) + x.ExtendedVotesInfo = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.AsyncInjectedTx")) + } + panic(fmt.Errorf("message warden.async.v1beta1.AsyncInjectedTx 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_AsyncInjectedTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "warden.async.v1beta1.AsyncInjectedTx.extended_votes_info": + if x.ExtendedVotesInfo == nil { + x.ExtendedVotesInfo = []*abci.ExtendedVoteInfo{} + } + value := &_AsyncInjectedTx_1_list{list: &x.ExtendedVotesInfo} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.AsyncInjectedTx")) + } + panic(fmt.Errorf("message warden.async.v1beta1.AsyncInjectedTx 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_AsyncInjectedTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "warden.async.v1beta1.AsyncInjectedTx.extended_votes_info": + list := []*abci.ExtendedVoteInfo{} + return protoreflect.ValueOfList(&_AsyncInjectedTx_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.AsyncInjectedTx")) + } + panic(fmt.Errorf("message warden.async.v1beta1.AsyncInjectedTx 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_AsyncInjectedTx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in warden.async.v1beta1.AsyncInjectedTx", 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_AsyncInjectedTx) 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_AsyncInjectedTx) 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_AsyncInjectedTx) 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_AsyncInjectedTx) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AsyncInjectedTx) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.ExtendedVotesInfo) > 0 { + for _, e := range x.ExtendedVotesInfo { + 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().(*AsyncInjectedTx) + 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.ExtendedVotesInfo) > 0 { + for iNdEx := len(x.ExtendedVotesInfo) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ExtendedVotesInfo[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*AsyncInjectedTx) + 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: AsyncInjectedTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AsyncInjectedTx: 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 ExtendedVotesInfo", 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.ExtendedVotesInfo = append(x.ExtendedVotesInfo, &abci.ExtendedVoteInfo{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExtendedVotesInfo[len(x.ExtendedVotesInfo)-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 _ protoreflect.List = (*_AsyncVoteExtension_1_list)(nil) + +type _AsyncVoteExtension_1_list struct { + list *[]*VEResultItem +} + +func (x *_AsyncVoteExtension_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_AsyncVoteExtension_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_AsyncVoteExtension_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*VEResultItem) + (*x.list)[i] = concreteValue +} + +func (x *_AsyncVoteExtension_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*VEResultItem) + *x.list = append(*x.list, concreteValue) +} + +func (x *_AsyncVoteExtension_1_list) AppendMutable() protoreflect.Value { + v := new(VEResultItem) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_AsyncVoteExtension_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_AsyncVoteExtension_1_list) NewElement() protoreflect.Value { + v := new(VEResultItem) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_AsyncVoteExtension_1_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_AsyncVoteExtension_2_list)(nil) + +type _AsyncVoteExtension_2_list struct { + list *[]*VEVoteItem +} + +func (x *_AsyncVoteExtension_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_AsyncVoteExtension_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_AsyncVoteExtension_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*VEVoteItem) + (*x.list)[i] = concreteValue +} + +func (x *_AsyncVoteExtension_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*VEVoteItem) + *x.list = append(*x.list, concreteValue) +} + +func (x *_AsyncVoteExtension_2_list) AppendMutable() protoreflect.Value { + v := new(VEVoteItem) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_AsyncVoteExtension_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_AsyncVoteExtension_2_list) NewElement() protoreflect.Value { + v := new(VEVoteItem) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_AsyncVoteExtension_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_AsyncVoteExtension protoreflect.MessageDescriptor + fd_AsyncVoteExtension_results protoreflect.FieldDescriptor + fd_AsyncVoteExtension_votes protoreflect.FieldDescriptor +) + +func init() { + file_warden_async_v1beta1_ve_proto_init() + md_AsyncVoteExtension = File_warden_async_v1beta1_ve_proto.Messages().ByName("AsyncVoteExtension") + fd_AsyncVoteExtension_results = md_AsyncVoteExtension.Fields().ByName("results") + fd_AsyncVoteExtension_votes = md_AsyncVoteExtension.Fields().ByName("votes") +} + +var _ protoreflect.Message = (*fastReflection_AsyncVoteExtension)(nil) + +type fastReflection_AsyncVoteExtension AsyncVoteExtension + +func (x *AsyncVoteExtension) ProtoReflect() protoreflect.Message { + return (*fastReflection_AsyncVoteExtension)(x) +} + +func (x *AsyncVoteExtension) slowProtoReflect() protoreflect.Message { + mi := &file_warden_async_v1beta1_ve_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_AsyncVoteExtension_messageType fastReflection_AsyncVoteExtension_messageType +var _ protoreflect.MessageType = fastReflection_AsyncVoteExtension_messageType{} + +type fastReflection_AsyncVoteExtension_messageType struct{} + +func (x fastReflection_AsyncVoteExtension_messageType) Zero() protoreflect.Message { + return (*fastReflection_AsyncVoteExtension)(nil) +} +func (x fastReflection_AsyncVoteExtension_messageType) New() protoreflect.Message { + return new(fastReflection_AsyncVoteExtension) +} +func (x fastReflection_AsyncVoteExtension_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AsyncVoteExtension +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AsyncVoteExtension) Descriptor() protoreflect.MessageDescriptor { + return md_AsyncVoteExtension +} + +// 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_AsyncVoteExtension) Type() protoreflect.MessageType { + return _fastReflection_AsyncVoteExtension_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AsyncVoteExtension) New() protoreflect.Message { + return new(fastReflection_AsyncVoteExtension) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AsyncVoteExtension) Interface() protoreflect.ProtoMessage { + return (*AsyncVoteExtension)(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_AsyncVoteExtension) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Results) != 0 { + value := protoreflect.ValueOfList(&_AsyncVoteExtension_1_list{list: &x.Results}) + if !f(fd_AsyncVoteExtension_results, value) { + return + } + } + if len(x.Votes) != 0 { + value := protoreflect.ValueOfList(&_AsyncVoteExtension_2_list{list: &x.Votes}) + if !f(fd_AsyncVoteExtension_votes, 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_AsyncVoteExtension) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "warden.async.v1beta1.AsyncVoteExtension.results": + return len(x.Results) != 0 + case "warden.async.v1beta1.AsyncVoteExtension.votes": + return len(x.Votes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.AsyncVoteExtension")) + } + panic(fmt.Errorf("message warden.async.v1beta1.AsyncVoteExtension 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_AsyncVoteExtension) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "warden.async.v1beta1.AsyncVoteExtension.results": + x.Results = nil + case "warden.async.v1beta1.AsyncVoteExtension.votes": + x.Votes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.AsyncVoteExtension")) + } + panic(fmt.Errorf("message warden.async.v1beta1.AsyncVoteExtension 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_AsyncVoteExtension) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "warden.async.v1beta1.AsyncVoteExtension.results": + if len(x.Results) == 0 { + return protoreflect.ValueOfList(&_AsyncVoteExtension_1_list{}) + } + listValue := &_AsyncVoteExtension_1_list{list: &x.Results} + return protoreflect.ValueOfList(listValue) + case "warden.async.v1beta1.AsyncVoteExtension.votes": + if len(x.Votes) == 0 { + return protoreflect.ValueOfList(&_AsyncVoteExtension_2_list{}) + } + listValue := &_AsyncVoteExtension_2_list{list: &x.Votes} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.AsyncVoteExtension")) + } + panic(fmt.Errorf("message warden.async.v1beta1.AsyncVoteExtension 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_AsyncVoteExtension) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "warden.async.v1beta1.AsyncVoteExtension.results": + lv := value.List() + clv := lv.(*_AsyncVoteExtension_1_list) + x.Results = *clv.list + case "warden.async.v1beta1.AsyncVoteExtension.votes": + lv := value.List() + clv := lv.(*_AsyncVoteExtension_2_list) + x.Votes = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.AsyncVoteExtension")) + } + panic(fmt.Errorf("message warden.async.v1beta1.AsyncVoteExtension 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_AsyncVoteExtension) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "warden.async.v1beta1.AsyncVoteExtension.results": + if x.Results == nil { + x.Results = []*VEResultItem{} + } + value := &_AsyncVoteExtension_1_list{list: &x.Results} + return protoreflect.ValueOfList(value) + case "warden.async.v1beta1.AsyncVoteExtension.votes": + if x.Votes == nil { + x.Votes = []*VEVoteItem{} + } + value := &_AsyncVoteExtension_2_list{list: &x.Votes} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.AsyncVoteExtension")) + } + panic(fmt.Errorf("message warden.async.v1beta1.AsyncVoteExtension 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_AsyncVoteExtension) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "warden.async.v1beta1.AsyncVoteExtension.results": + list := []*VEResultItem{} + return protoreflect.ValueOfList(&_AsyncVoteExtension_1_list{list: &list}) + case "warden.async.v1beta1.AsyncVoteExtension.votes": + list := []*VEVoteItem{} + return protoreflect.ValueOfList(&_AsyncVoteExtension_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.AsyncVoteExtension")) + } + panic(fmt.Errorf("message warden.async.v1beta1.AsyncVoteExtension 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_AsyncVoteExtension) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in warden.async.v1beta1.AsyncVoteExtension", 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_AsyncVoteExtension) 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_AsyncVoteExtension) 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_AsyncVoteExtension) 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_AsyncVoteExtension) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AsyncVoteExtension) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Results) > 0 { + for _, e := range x.Results { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Votes) > 0 { + for _, e := range x.Votes { + 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().(*AsyncVoteExtension) + 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.Votes) > 0 { + for iNdEx := len(x.Votes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Votes[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.Results) > 0 { + for iNdEx := len(x.Results) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Results[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*AsyncVoteExtension) + 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: AsyncVoteExtension: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AsyncVoteExtension: 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 Results", 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.Results = append(x.Results, &VEResultItem{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Results[len(x.Results)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Votes", 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.Votes = append(x.Votes, &VEVoteItem{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Votes[len(x.Votes)-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_VEResultItem protoreflect.MessageDescriptor + fd_VEResultItem_future_id protoreflect.FieldDescriptor + fd_VEResultItem_output protoreflect.FieldDescriptor +) + +func init() { + file_warden_async_v1beta1_ve_proto_init() + md_VEResultItem = File_warden_async_v1beta1_ve_proto.Messages().ByName("VEResultItem") + fd_VEResultItem_future_id = md_VEResultItem.Fields().ByName("future_id") + fd_VEResultItem_output = md_VEResultItem.Fields().ByName("output") +} + +var _ protoreflect.Message = (*fastReflection_VEResultItem)(nil) + +type fastReflection_VEResultItem VEResultItem + +func (x *VEResultItem) ProtoReflect() protoreflect.Message { + return (*fastReflection_VEResultItem)(x) +} + +func (x *VEResultItem) slowProtoReflect() protoreflect.Message { + mi := &file_warden_async_v1beta1_ve_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_VEResultItem_messageType fastReflection_VEResultItem_messageType +var _ protoreflect.MessageType = fastReflection_VEResultItem_messageType{} + +type fastReflection_VEResultItem_messageType struct{} + +func (x fastReflection_VEResultItem_messageType) Zero() protoreflect.Message { + return (*fastReflection_VEResultItem)(nil) +} +func (x fastReflection_VEResultItem_messageType) New() protoreflect.Message { + return new(fastReflection_VEResultItem) +} +func (x fastReflection_VEResultItem_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_VEResultItem +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_VEResultItem) Descriptor() protoreflect.MessageDescriptor { + return md_VEResultItem +} + +// 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_VEResultItem) Type() protoreflect.MessageType { + return _fastReflection_VEResultItem_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_VEResultItem) New() protoreflect.Message { + return new(fastReflection_VEResultItem) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_VEResultItem) Interface() protoreflect.ProtoMessage { + return (*VEResultItem)(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_VEResultItem) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.FutureId != uint64(0) { + value := protoreflect.ValueOfUint64(x.FutureId) + if !f(fd_VEResultItem_future_id, value) { + return + } + } + if len(x.Output) != 0 { + value := protoreflect.ValueOfBytes(x.Output) + if !f(fd_VEResultItem_output, 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_VEResultItem) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "warden.async.v1beta1.VEResultItem.future_id": + return x.FutureId != uint64(0) + case "warden.async.v1beta1.VEResultItem.output": + return len(x.Output) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.VEResultItem")) + } + panic(fmt.Errorf("message warden.async.v1beta1.VEResultItem 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_VEResultItem) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "warden.async.v1beta1.VEResultItem.future_id": + x.FutureId = uint64(0) + case "warden.async.v1beta1.VEResultItem.output": + x.Output = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.VEResultItem")) + } + panic(fmt.Errorf("message warden.async.v1beta1.VEResultItem 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_VEResultItem) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "warden.async.v1beta1.VEResultItem.future_id": + value := x.FutureId + return protoreflect.ValueOfUint64(value) + case "warden.async.v1beta1.VEResultItem.output": + value := x.Output + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.VEResultItem")) + } + panic(fmt.Errorf("message warden.async.v1beta1.VEResultItem 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_VEResultItem) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "warden.async.v1beta1.VEResultItem.future_id": + x.FutureId = value.Uint() + case "warden.async.v1beta1.VEResultItem.output": + x.Output = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.VEResultItem")) + } + panic(fmt.Errorf("message warden.async.v1beta1.VEResultItem 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_VEResultItem) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "warden.async.v1beta1.VEResultItem.future_id": + panic(fmt.Errorf("field future_id of message warden.async.v1beta1.VEResultItem is not mutable")) + case "warden.async.v1beta1.VEResultItem.output": + panic(fmt.Errorf("field output of message warden.async.v1beta1.VEResultItem is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.VEResultItem")) + } + panic(fmt.Errorf("message warden.async.v1beta1.VEResultItem 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_VEResultItem) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "warden.async.v1beta1.VEResultItem.future_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "warden.async.v1beta1.VEResultItem.output": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.VEResultItem")) + } + panic(fmt.Errorf("message warden.async.v1beta1.VEResultItem 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_VEResultItem) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in warden.async.v1beta1.VEResultItem", 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_VEResultItem) 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_VEResultItem) 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_VEResultItem) 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_VEResultItem) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*VEResultItem) + 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.FutureId != 0 { + n += 1 + runtime.Sov(uint64(x.FutureId)) + } + l = len(x.Output) + 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().(*VEResultItem) + 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.Output) > 0 { + i -= len(x.Output) + copy(dAtA[i:], x.Output) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Output))) + i-- + dAtA[i] = 0x12 + } + if x.FutureId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.FutureId)) + 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().(*VEResultItem) + 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: VEResultItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VEResultItem: 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 FutureId", wireType) + } + x.FutureId = 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.FutureId |= uint64(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 Output", 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.Output = append(x.Output[:0], dAtA[iNdEx:postIndex]...) + if x.Output == nil { + x.Output = []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_VEVoteItem protoreflect.MessageDescriptor + fd_VEVoteItem_future_id protoreflect.FieldDescriptor + fd_VEVoteItem_vote protoreflect.FieldDescriptor +) + +func init() { + file_warden_async_v1beta1_ve_proto_init() + md_VEVoteItem = File_warden_async_v1beta1_ve_proto.Messages().ByName("VEVoteItem") + fd_VEVoteItem_future_id = md_VEVoteItem.Fields().ByName("future_id") + fd_VEVoteItem_vote = md_VEVoteItem.Fields().ByName("vote") +} + +var _ protoreflect.Message = (*fastReflection_VEVoteItem)(nil) + +type fastReflection_VEVoteItem VEVoteItem + +func (x *VEVoteItem) ProtoReflect() protoreflect.Message { + return (*fastReflection_VEVoteItem)(x) +} + +func (x *VEVoteItem) slowProtoReflect() protoreflect.Message { + mi := &file_warden_async_v1beta1_ve_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_VEVoteItem_messageType fastReflection_VEVoteItem_messageType +var _ protoreflect.MessageType = fastReflection_VEVoteItem_messageType{} + +type fastReflection_VEVoteItem_messageType struct{} + +func (x fastReflection_VEVoteItem_messageType) Zero() protoreflect.Message { + return (*fastReflection_VEVoteItem)(nil) +} +func (x fastReflection_VEVoteItem_messageType) New() protoreflect.Message { + return new(fastReflection_VEVoteItem) +} +func (x fastReflection_VEVoteItem_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_VEVoteItem +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_VEVoteItem) Descriptor() protoreflect.MessageDescriptor { + return md_VEVoteItem +} + +// 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_VEVoteItem) Type() protoreflect.MessageType { + return _fastReflection_VEVoteItem_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_VEVoteItem) New() protoreflect.Message { + return new(fastReflection_VEVoteItem) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_VEVoteItem) Interface() protoreflect.ProtoMessage { + return (*VEVoteItem)(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_VEVoteItem) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.FutureId != uint64(0) { + value := protoreflect.ValueOfUint64(x.FutureId) + if !f(fd_VEVoteItem_future_id, value) { + return + } + } + if x.Vote != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Vote)) + if !f(fd_VEVoteItem_vote, 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_VEVoteItem) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "warden.async.v1beta1.VEVoteItem.future_id": + return x.FutureId != uint64(0) + case "warden.async.v1beta1.VEVoteItem.vote": + return x.Vote != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.VEVoteItem")) + } + panic(fmt.Errorf("message warden.async.v1beta1.VEVoteItem 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_VEVoteItem) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "warden.async.v1beta1.VEVoteItem.future_id": + x.FutureId = uint64(0) + case "warden.async.v1beta1.VEVoteItem.vote": + x.Vote = 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.VEVoteItem")) + } + panic(fmt.Errorf("message warden.async.v1beta1.VEVoteItem 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_VEVoteItem) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "warden.async.v1beta1.VEVoteItem.future_id": + value := x.FutureId + return protoreflect.ValueOfUint64(value) + case "warden.async.v1beta1.VEVoteItem.vote": + value := x.Vote + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.VEVoteItem")) + } + panic(fmt.Errorf("message warden.async.v1beta1.VEVoteItem 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_VEVoteItem) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "warden.async.v1beta1.VEVoteItem.future_id": + x.FutureId = value.Uint() + case "warden.async.v1beta1.VEVoteItem.vote": + x.Vote = (FutureVoteType)(value.Enum()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.VEVoteItem")) + } + panic(fmt.Errorf("message warden.async.v1beta1.VEVoteItem 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_VEVoteItem) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "warden.async.v1beta1.VEVoteItem.future_id": + panic(fmt.Errorf("field future_id of message warden.async.v1beta1.VEVoteItem is not mutable")) + case "warden.async.v1beta1.VEVoteItem.vote": + panic(fmt.Errorf("field vote of message warden.async.v1beta1.VEVoteItem is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.VEVoteItem")) + } + panic(fmt.Errorf("message warden.async.v1beta1.VEVoteItem 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_VEVoteItem) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "warden.async.v1beta1.VEVoteItem.future_id": + return protoreflect.ValueOfUint64(uint64(0)) + case "warden.async.v1beta1.VEVoteItem.vote": + return protoreflect.ValueOfEnum(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: warden.async.v1beta1.VEVoteItem")) + } + panic(fmt.Errorf("message warden.async.v1beta1.VEVoteItem 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_VEVoteItem) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in warden.async.v1beta1.VEVoteItem", 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_VEVoteItem) 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_VEVoteItem) 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_VEVoteItem) 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_VEVoteItem) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*VEVoteItem) + 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.FutureId != 0 { + n += 1 + runtime.Sov(uint64(x.FutureId)) + } + if x.Vote != 0 { + n += 1 + runtime.Sov(uint64(x.Vote)) + } + 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().(*VEVoteItem) + 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.Vote != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Vote)) + i-- + dAtA[i] = 0x10 + } + if x.FutureId != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.FutureId)) + 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().(*VEVoteItem) + 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: VEVoteItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: VEVoteItem: 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 FutureId", wireType) + } + x.FutureId = 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.FutureId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) + } + x.Vote = 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.Vote |= FutureVoteType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: warden/async/v1beta1/ve.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AsyncInjectedTx struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // All the vote extensions gathered for this block. + // + // FIXME: slinky also does that, so technically we're duplicating information + // and wasting block space. + ExtendedVotesInfo []*abci.ExtendedVoteInfo `protobuf:"bytes,1,rep,name=extended_votes_info,json=extendedVotesInfo,proto3" json:"extended_votes_info,omitempty"` +} + +func (x *AsyncInjectedTx) Reset() { + *x = AsyncInjectedTx{} + if protoimpl.UnsafeEnabled { + mi := &file_warden_async_v1beta1_ve_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AsyncInjectedTx) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AsyncInjectedTx) ProtoMessage() {} + +// Deprecated: Use AsyncInjectedTx.ProtoReflect.Descriptor instead. +func (*AsyncInjectedTx) Descriptor() ([]byte, []int) { + return file_warden_async_v1beta1_ve_proto_rawDescGZIP(), []int{0} +} + +func (x *AsyncInjectedTx) GetExtendedVotesInfo() []*abci.ExtendedVoteInfo { + if x != nil { + return x.ExtendedVotesInfo + } + return nil +} + +// A vote extension coming from a validator. It contains results and votes for +// some futures. +type AsyncVoteExtension struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Results []*VEResultItem `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + Votes []*VEVoteItem `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"` +} + +func (x *AsyncVoteExtension) Reset() { + *x = AsyncVoteExtension{} + if protoimpl.UnsafeEnabled { + mi := &file_warden_async_v1beta1_ve_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AsyncVoteExtension) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AsyncVoteExtension) ProtoMessage() {} + +// Deprecated: Use AsyncVoteExtension.ProtoReflect.Descriptor instead. +func (*AsyncVoteExtension) Descriptor() ([]byte, []int) { + return file_warden_async_v1beta1_ve_proto_rawDescGZIP(), []int{1} +} + +func (x *AsyncVoteExtension) GetResults() []*VEResultItem { + if x != nil { + return x.Results + } + return nil +} + +func (x *AsyncVoteExtension) GetVotes() []*VEVoteItem { + if x != nil { + return x.Votes + } + return nil +} + +type VEResultItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FutureId uint64 `protobuf:"varint,1,opt,name=future_id,json=futureId,proto3" json:"future_id,omitempty"` + Output []byte `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` +} + +func (x *VEResultItem) Reset() { + *x = VEResultItem{} + if protoimpl.UnsafeEnabled { + mi := &file_warden_async_v1beta1_ve_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VEResultItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VEResultItem) ProtoMessage() {} + +// Deprecated: Use VEResultItem.ProtoReflect.Descriptor instead. +func (*VEResultItem) Descriptor() ([]byte, []int) { + return file_warden_async_v1beta1_ve_proto_rawDescGZIP(), []int{2} +} + +func (x *VEResultItem) GetFutureId() uint64 { + if x != nil { + return x.FutureId + } + return 0 +} + +func (x *VEResultItem) GetOutput() []byte { + if x != nil { + return x.Output + } + return nil +} + +type VEVoteItem struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FutureId uint64 `protobuf:"varint,1,opt,name=future_id,json=futureId,proto3" json:"future_id,omitempty"` + Vote FutureVoteType `protobuf:"varint,2,opt,name=vote,proto3,enum=warden.async.v1beta1.FutureVoteType" json:"vote,omitempty"` +} + +func (x *VEVoteItem) Reset() { + *x = VEVoteItem{} + if protoimpl.UnsafeEnabled { + mi := &file_warden_async_v1beta1_ve_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VEVoteItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VEVoteItem) ProtoMessage() {} + +// Deprecated: Use VEVoteItem.ProtoReflect.Descriptor instead. +func (*VEVoteItem) Descriptor() ([]byte, []int) { + return file_warden_async_v1beta1_ve_proto_rawDescGZIP(), []int{3} +} + +func (x *VEVoteItem) GetFutureId() uint64 { + if x != nil { + return x.FutureId + } + return 0 +} + +func (x *VEVoteItem) GetVote() FutureVoteType { + if x != nil { + return x.Vote + } + return FutureVoteType_VOTE_TYPE_UNSPECIFIED +} + +var File_warden_async_v1beta1_ve_proto protoreflect.FileDescriptor + +var file_warden_async_v1beta1_ve_proto_rawDesc = []byte{ + 0x0a, 0x1d, 0x77, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x14, 0x77, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x2e, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x77, 0x61, 0x72, 0x64, 0x65, 0x6e, + 0x2f, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x66, + 0x75, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a, 0x0a, 0x0f, 0x41, + 0x73, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x54, 0x78, 0x12, 0x57, + 0x0a, 0x13, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x76, 0x6f, 0x74, 0x65, 0x73, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x11, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x56, 0x6f, + 0x74, 0x65, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x8a, 0x01, 0x0a, 0x12, 0x41, 0x73, 0x79, 0x6e, + 0x63, 0x56, 0x6f, 0x74, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3c, + 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x77, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x2e, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x56, 0x45, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x49, + 0x74, 0x65, 0x6d, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x05, + 0x76, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x77, 0x61, + 0x72, 0x64, 0x65, 0x6e, 0x2e, 0x61, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x56, 0x45, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x76, + 0x6f, 0x74, 0x65, 0x73, 0x22, 0x43, 0x0a, 0x0c, 0x56, 0x45, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x49, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x63, 0x0a, 0x0a, 0x56, 0x45, 0x56, + 0x6f, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x74, 0x75, 0x72, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x66, 0x75, 0x74, 0x75, + 0x72, 0x65, 0x49, 0x64, 0x12, 0x38, 0x0a, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x77, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x2e, 0x61, 0x73, 0x79, 0x6e, + 0x63, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, + 0x56, 0x6f, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x76, 0x6f, 0x74, 0x65, 0x42, 0xe6, + 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x77, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x2e, 0x61, 0x73, + 0x79, 0x6e, 0x63, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x07, 0x56, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x77, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x77, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x77, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x2f, 0x61, 0x73, 0x79, + 0x6e, 0x63, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x61, 0x73, 0x79, 0x6e, 0x63, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x57, 0x41, 0x58, 0xaa, 0x02, 0x14, + 0x57, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x2e, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x2e, 0x56, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x14, 0x57, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x5c, 0x41, 0x73, + 0x79, 0x6e, 0x63, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x20, 0x57, 0x61, + 0x72, 0x64, 0x65, 0x6e, 0x5c, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x16, 0x57, 0x61, 0x72, 0x64, 0x65, 0x6e, 0x3a, 0x3a, 0x41, 0x73, 0x79, 0x6e, 0x63, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_warden_async_v1beta1_ve_proto_rawDescOnce sync.Once + file_warden_async_v1beta1_ve_proto_rawDescData = file_warden_async_v1beta1_ve_proto_rawDesc +) + +func file_warden_async_v1beta1_ve_proto_rawDescGZIP() []byte { + file_warden_async_v1beta1_ve_proto_rawDescOnce.Do(func() { + file_warden_async_v1beta1_ve_proto_rawDescData = protoimpl.X.CompressGZIP(file_warden_async_v1beta1_ve_proto_rawDescData) + }) + return file_warden_async_v1beta1_ve_proto_rawDescData +} + +var file_warden_async_v1beta1_ve_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_warden_async_v1beta1_ve_proto_goTypes = []interface{}{ + (*AsyncInjectedTx)(nil), // 0: warden.async.v1beta1.AsyncInjectedTx + (*AsyncVoteExtension)(nil), // 1: warden.async.v1beta1.AsyncVoteExtension + (*VEResultItem)(nil), // 2: warden.async.v1beta1.VEResultItem + (*VEVoteItem)(nil), // 3: warden.async.v1beta1.VEVoteItem + (*abci.ExtendedVoteInfo)(nil), // 4: tendermint.abci.ExtendedVoteInfo + (FutureVoteType)(0), // 5: warden.async.v1beta1.FutureVoteType +} +var file_warden_async_v1beta1_ve_proto_depIdxs = []int32{ + 4, // 0: warden.async.v1beta1.AsyncInjectedTx.extended_votes_info:type_name -> tendermint.abci.ExtendedVoteInfo + 2, // 1: warden.async.v1beta1.AsyncVoteExtension.results:type_name -> warden.async.v1beta1.VEResultItem + 3, // 2: warden.async.v1beta1.AsyncVoteExtension.votes:type_name -> warden.async.v1beta1.VEVoteItem + 5, // 3: warden.async.v1beta1.VEVoteItem.vote:type_name -> warden.async.v1beta1.FutureVoteType + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_warden_async_v1beta1_ve_proto_init() } +func file_warden_async_v1beta1_ve_proto_init() { + if File_warden_async_v1beta1_ve_proto != nil { + return + } + file_warden_async_v1beta1_future_proto_init() + if !protoimpl.UnsafeEnabled { + file_warden_async_v1beta1_ve_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AsyncInjectedTx); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_warden_async_v1beta1_ve_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AsyncVoteExtension); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_warden_async_v1beta1_ve_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VEResultItem); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_warden_async_v1beta1_ve_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VEVoteItem); 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_warden_async_v1beta1_ve_proto_rawDesc, + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_warden_async_v1beta1_ve_proto_goTypes, + DependencyIndexes: file_warden_async_v1beta1_ve_proto_depIdxs, + MessageInfos: file_warden_async_v1beta1_ve_proto_msgTypes, + }.Build() + File_warden_async_v1beta1_ve_proto = out.File + file_warden_async_v1beta1_ve_proto_rawDesc = nil + file_warden_async_v1beta1_ve_proto_goTypes = nil + file_warden_async_v1beta1_ve_proto_depIdxs = nil +} diff --git a/proto/warden/async/v1beta1/ve.proto b/proto/warden/async/v1beta1/ve.proto new file mode 100644 index 000000000..7cd03052c --- /dev/null +++ b/proto/warden/async/v1beta1/ve.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package warden.async.v1beta1; + +import "gogoproto/gogo.proto"; +import "tendermint/abci/types.proto"; +import "warden/async/v1beta1/future.proto"; + +option go_package = "github.com/warden-protocol/wardenprotocol/warden/x/async/types/v1beta1"; + +message AsyncInjectedTx { + // All the vote extensions gathered for this block. + // + // FIXME: slinky also does that, so technically we're duplicating information + // and wasting block space. + repeated tendermint.abci.ExtendedVoteInfo extended_votes_info = 1 [(gogoproto.nullable) = false]; +} + +// A vote extension coming from a validator. It contains results and votes for +// some futures. +message AsyncVoteExtension { + repeated VEResultItem results = 1; + repeated VEVoteItem votes = 2; +} + +message VEResultItem { + uint64 future_id = 1; + bytes output = 2; +} + +message VEVoteItem { + uint64 future_id = 1; + FutureVoteType vote = 2; +} + diff --git a/warden/x/async/keeper/abci.go b/warden/x/async/keeper/abci.go index cdae04bd9..80fad708e 100644 --- a/warden/x/async/keeper/abci.go +++ b/warden/x/async/keeper/abci.go @@ -6,6 +6,7 @@ import ( cometabci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/warden-protocol/wardenprotocol/prophet" + types "github.com/warden-protocol/wardenprotocol/warden/x/async/types/v1beta1" ) func (k Keeper) BeginBlocker(ctx context.Context) error { @@ -36,14 +37,42 @@ func (k Keeper) EndBlocker(ctx context.Context) error { func (k Keeper) ExtendVoteHandler() sdk.ExtendVoteHandler { return func(ctx sdk.Context, req *cometabci.RequestExtendVote) (*cometabci.ResponseExtendVote, error) { + pResults, done := k.p.Results() + defer done() + + results := make([]*types.VEResultItem, len(pResults)) + for i, r := range pResults { + results[i] = &types.VEResultItem{ + FutureId: r.ID, + Output: r.Output, + } + } + + asyncve := types.AsyncVoteExtension{ + Results: results, + } + + asyncveBytes, err := asyncve.Marshal() + if err != nil { + return nil, err + } + return &cometabci.ResponseExtendVote{ - VoteExtension: nil, + VoteExtension: asyncveBytes, }, nil } } func (k Keeper) VerifyVoteExtensionHandler() sdk.VerifyVoteExtensionHandler { return func(ctx sdk.Context, req *cometabci.RequestVerifyVoteExtension) (*cometabci.ResponseVerifyVoteExtension, error) { + var ve types.AsyncVoteExtension + err := ve.Unmarshal(req.VoteExtension) + if err != nil { + return &cometabci.ResponseVerifyVoteExtension{ + Status: cometabci.ResponseVerifyVoteExtension_REJECT, + }, nil + } + return &cometabci.ResponseVerifyVoteExtension{ Status: cometabci.ResponseVerifyVoteExtension_ACCEPT, }, nil diff --git a/warden/x/async/types/v1beta1/ve.pb.go b/warden/x/async/types/v1beta1/ve.pb.go index 5c55313ce..0b2b57763 100644 --- a/warden/x/async/types/v1beta1/ve.pb.go +++ b/warden/x/async/types/v1beta1/ve.pb.go @@ -25,11 +25,11 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type AsyncInjectedTx struct { - // The results of the execution of the Futures. - Results []*FutureResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` // All the vote extensions gathered for this block. - // TODO: slinky also does that, so technically we're duplicating information and wasting block space. - ExtendedVotesInfo []types.ExtendedVoteInfo `protobuf:"bytes,2,rep,name=extended_votes_info,json=extendedVotesInfo,proto3" json:"extended_votes_info"` + // + // FIXME: slinky also does that, so technically we're duplicating information + // and wasting block space. + ExtendedVotesInfo []types.ExtendedVoteInfo `protobuf:"bytes,1,rep,name=extended_votes_info,json=extendedVotesInfo,proto3" json:"extended_votes_info"` } func (m *AsyncInjectedTx) Reset() { *m = AsyncInjectedTx{} } @@ -65,13 +65,6 @@ func (m *AsyncInjectedTx) XXX_DiscardUnknown() { var xxx_messageInfo_AsyncInjectedTx proto.InternalMessageInfo -func (m *AsyncInjectedTx) GetResults() []*FutureResult { - if m != nil { - return m.Results - } - return nil -} - func (m *AsyncInjectedTx) GetExtendedVotesInfo() []types.ExtendedVoteInfo { if m != nil { return m.ExtendedVotesInfo @@ -79,10 +72,11 @@ func (m *AsyncInjectedTx) GetExtendedVotesInfo() []types.ExtendedVoteInfo { return nil } -// A vote extension coming from a validator. It contains multiple votes for -// different Futures. +// A vote extension coming from a validator. It contains results and votes for +// some futures. type AsyncVoteExtension struct { - Votes []*AsyncVoteExtensionItem `protobuf:"bytes,1,rep,name=votes,proto3" json:"votes,omitempty"` + Results []*VEResultItem `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` + Votes []*VEVoteItem `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"` } func (m *AsyncVoteExtension) Reset() { *m = AsyncVoteExtension{} } @@ -118,30 +112,89 @@ func (m *AsyncVoteExtension) XXX_DiscardUnknown() { var xxx_messageInfo_AsyncVoteExtension proto.InternalMessageInfo -func (m *AsyncVoteExtension) GetVotes() []*AsyncVoteExtensionItem { +func (m *AsyncVoteExtension) GetResults() []*VEResultItem { + if m != nil { + return m.Results + } + return nil +} + +func (m *AsyncVoteExtension) GetVotes() []*VEVoteItem { if m != nil { return m.Votes } return nil } -type AsyncVoteExtensionItem struct { +type VEResultItem struct { + FutureId uint64 `protobuf:"varint,1,opt,name=future_id,json=futureId,proto3" json:"future_id,omitempty"` + Output []byte `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"` +} + +func (m *VEResultItem) Reset() { *m = VEResultItem{} } +func (m *VEResultItem) String() string { return proto.CompactTextString(m) } +func (*VEResultItem) ProtoMessage() {} +func (*VEResultItem) Descriptor() ([]byte, []int) { + return fileDescriptor_e3e24cf4461cf67a, []int{2} +} +func (m *VEResultItem) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VEResultItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VEResultItem.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *VEResultItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_VEResultItem.Merge(m, src) +} +func (m *VEResultItem) XXX_Size() int { + return m.Size() +} +func (m *VEResultItem) XXX_DiscardUnknown() { + xxx_messageInfo_VEResultItem.DiscardUnknown(m) +} + +var xxx_messageInfo_VEResultItem proto.InternalMessageInfo + +func (m *VEResultItem) GetFutureId() uint64 { + if m != nil { + return m.FutureId + } + return 0 +} + +func (m *VEResultItem) GetOutput() []byte { + if m != nil { + return m.Output + } + return nil +} + +type VEVoteItem struct { FutureId uint64 `protobuf:"varint,1,opt,name=future_id,json=futureId,proto3" json:"future_id,omitempty"` Vote FutureVoteType `protobuf:"varint,2,opt,name=vote,proto3,enum=warden.async.v1beta1.FutureVoteType" json:"vote,omitempty"` } -func (m *AsyncVoteExtensionItem) Reset() { *m = AsyncVoteExtensionItem{} } -func (m *AsyncVoteExtensionItem) String() string { return proto.CompactTextString(m) } -func (*AsyncVoteExtensionItem) ProtoMessage() {} -func (*AsyncVoteExtensionItem) Descriptor() ([]byte, []int) { - return fileDescriptor_e3e24cf4461cf67a, []int{2} +func (m *VEVoteItem) Reset() { *m = VEVoteItem{} } +func (m *VEVoteItem) String() string { return proto.CompactTextString(m) } +func (*VEVoteItem) ProtoMessage() {} +func (*VEVoteItem) Descriptor() ([]byte, []int) { + return fileDescriptor_e3e24cf4461cf67a, []int{3} } -func (m *AsyncVoteExtensionItem) XXX_Unmarshal(b []byte) error { +func (m *VEVoteItem) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *AsyncVoteExtensionItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *VEVoteItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_AsyncVoteExtensionItem.Marshal(b, m, deterministic) + return xxx_messageInfo_VEVoteItem.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -151,26 +204,26 @@ func (m *AsyncVoteExtensionItem) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *AsyncVoteExtensionItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_AsyncVoteExtensionItem.Merge(m, src) +func (m *VEVoteItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_VEVoteItem.Merge(m, src) } -func (m *AsyncVoteExtensionItem) XXX_Size() int { +func (m *VEVoteItem) XXX_Size() int { return m.Size() } -func (m *AsyncVoteExtensionItem) XXX_DiscardUnknown() { - xxx_messageInfo_AsyncVoteExtensionItem.DiscardUnknown(m) +func (m *VEVoteItem) XXX_DiscardUnknown() { + xxx_messageInfo_VEVoteItem.DiscardUnknown(m) } -var xxx_messageInfo_AsyncVoteExtensionItem proto.InternalMessageInfo +var xxx_messageInfo_VEVoteItem proto.InternalMessageInfo -func (m *AsyncVoteExtensionItem) GetFutureId() uint64 { +func (m *VEVoteItem) GetFutureId() uint64 { if m != nil { return m.FutureId } return 0 } -func (m *AsyncVoteExtensionItem) GetVote() FutureVoteType { +func (m *VEVoteItem) GetVote() FutureVoteType { if m != nil { return m.Vote } @@ -180,36 +233,39 @@ func (m *AsyncVoteExtensionItem) GetVote() FutureVoteType { func init() { proto.RegisterType((*AsyncInjectedTx)(nil), "warden.async.v1beta1.AsyncInjectedTx") proto.RegisterType((*AsyncVoteExtension)(nil), "warden.async.v1beta1.AsyncVoteExtension") - proto.RegisterType((*AsyncVoteExtensionItem)(nil), "warden.async.v1beta1.AsyncVoteExtensionItem") + proto.RegisterType((*VEResultItem)(nil), "warden.async.v1beta1.VEResultItem") + proto.RegisterType((*VEVoteItem)(nil), "warden.async.v1beta1.VEVoteItem") } func init() { proto.RegisterFile("warden/async/v1beta1/ve.proto", fileDescriptor_e3e24cf4461cf67a) } var fileDescriptor_e3e24cf4461cf67a = []byte{ - // 367 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0xcb, 0x4e, 0xf2, 0x40, - 0x14, 0xee, 0xf0, 0xf3, 0xdf, 0xc6, 0x44, 0x63, 0x25, 0xa6, 0x81, 0x58, 0xa1, 0x71, 0xc1, 0x42, - 0x67, 0x02, 0x6e, 0x5c, 0xb8, 0x91, 0x44, 0x92, 0x6e, 0x1b, 0xa2, 0xc6, 0x0d, 0xf6, 0x72, 0xc0, - 0x1a, 0x98, 0x21, 0xed, 0x14, 0xe1, 0x2d, 0x7c, 0x0c, 0x1f, 0x85, 0x25, 0x4b, 0x57, 0xc6, 0xc0, - 0x8b, 0x98, 0x99, 0x0e, 0xd1, 0x68, 0xe3, 0x6e, 0xe6, 0x7c, 0x97, 0xf3, 0xe5, 0x7c, 0xf8, 0xe0, - 0xd1, 0x4f, 0x22, 0x60, 0xd4, 0x4f, 0xe7, 0x2c, 0xa4, 0xd3, 0x56, 0x00, 0xc2, 0x6f, 0xd1, 0x29, - 0x90, 0x49, 0xc2, 0x05, 0x37, 0x2b, 0x39, 0x4c, 0x14, 0x4c, 0x34, 0x5c, 0xad, 0x0c, 0xf9, 0x90, - 0x2b, 0x02, 0x95, 0xaf, 0x9c, 0x5b, 0xad, 0x09, 0x60, 0x11, 0x24, 0xe3, 0x98, 0x09, 0xea, 0x07, - 0x61, 0x4c, 0xc5, 0x7c, 0x02, 0xa9, 0x06, 0x1b, 0x85, 0x7b, 0x06, 0x99, 0xc8, 0x12, 0xbd, 0xcb, - 0x79, 0x46, 0x78, 0xe7, 0x42, 0xc2, 0x2e, 0x7b, 0x80, 0x50, 0x40, 0xd4, 0x9b, 0x99, 0xe7, 0xf8, - 0x6f, 0x02, 0x69, 0x36, 0x12, 0xa9, 0x85, 0xea, 0xbf, 0x9a, 0x5b, 0x6d, 0x87, 0x14, 0x25, 0x22, - 0x5d, 0x65, 0xe4, 0x29, 0xaa, 0xb7, 0x91, 0x98, 0xd7, 0x78, 0x0f, 0x66, 0x2a, 0x55, 0xd4, 0x9f, - 0x72, 0x01, 0x69, 0x3f, 0x66, 0x03, 0x6e, 0x95, 0x94, 0x53, 0x83, 0x7c, 0xe4, 0x25, 0x32, 0x2f, - 0xb9, 0xd4, 0xdc, 0x2b, 0x2e, 0xc0, 0x65, 0x03, 0xde, 0x29, 0x2f, 0x5e, 0x0f, 0x0d, 0x6f, 0x17, - 0x3e, 0xcd, 0x53, 0x09, 0x38, 0x37, 0xd8, 0x54, 0x49, 0xe5, 0x44, 0xa9, 0xd2, 0x98, 0x33, 0xb3, - 0x83, 0x7f, 0xab, 0x2d, 0x3a, 0xea, 0x71, 0x71, 0xd4, 0xef, 0x42, 0x57, 0xc0, 0xd8, 0xcb, 0xa5, - 0x0e, 0xc7, 0xfb, 0xc5, 0x04, 0xb3, 0x86, 0xff, 0xe7, 0xe7, 0xea, 0xc7, 0x91, 0x85, 0xea, 0xa8, - 0x59, 0xf6, 0xfe, 0xe5, 0x03, 0x37, 0x32, 0xcf, 0x70, 0x59, 0xea, 0xad, 0x52, 0x1d, 0x35, 0xb7, - 0xdb, 0x47, 0x3f, 0x1d, 0x49, 0x3a, 0xf7, 0xe6, 0x13, 0xf0, 0x94, 0xa2, 0x73, 0xb7, 0x58, 0xd9, - 0x68, 0xb9, 0xb2, 0xd1, 0xdb, 0xca, 0x46, 0x4f, 0x6b, 0xdb, 0x58, 0xae, 0x6d, 0xe3, 0x65, 0x6d, - 0x1b, 0xb7, 0xdd, 0x61, 0x2c, 0xee, 0xb3, 0x80, 0x84, 0x7c, 0x4c, 0x73, 0xbf, 0x13, 0x55, 0x54, - 0xc8, 0x47, 0xfa, 0xff, 0xe5, 0x4b, 0x67, 0xba, 0x5e, 0x55, 0xfc, 0xa6, 0xe4, 0xe0, 0x8f, 0xa2, - 0x9d, 0xbe, 0x07, 0x00, 0x00, 0xff, 0xff, 0xae, 0x79, 0x85, 0xd7, 0x6b, 0x02, 0x00, 0x00, + // 390 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x4f, 0x6b, 0xe2, 0x40, + 0x14, 0xcf, 0xb8, 0xae, 0xbb, 0x3b, 0x2b, 0xbb, 0x6c, 0x56, 0x4a, 0x50, 0x9a, 0xc6, 0xd0, 0x83, + 0x97, 0xce, 0xa0, 0x85, 0xd2, 0x43, 0x2f, 0xb5, 0x28, 0xe4, 0x1a, 0xc4, 0x42, 0x2f, 0x36, 0x7f, + 0x46, 0x1b, 0xd1, 0x99, 0x90, 0x4c, 0xac, 0x7e, 0x85, 0x9e, 0xfa, 0xb1, 0x3c, 0x7a, 0xec, 0xa9, + 0x14, 0xfd, 0x22, 0x65, 0x26, 0x23, 0x4a, 0xb1, 0xbd, 0xcd, 0x7b, 0xbf, 0x7f, 0x8f, 0x37, 0x0f, + 0x1e, 0x3f, 0x7a, 0x49, 0x48, 0x28, 0xf6, 0xd2, 0x05, 0x0d, 0xf0, 0xac, 0xe9, 0x13, 0xee, 0x35, + 0xf1, 0x8c, 0xa0, 0x38, 0x61, 0x9c, 0xe9, 0x95, 0x1c, 0x46, 0x12, 0x46, 0x0a, 0xae, 0x56, 0x46, + 0x6c, 0xc4, 0x24, 0x01, 0x8b, 0x57, 0xce, 0xad, 0xd6, 0x38, 0xa1, 0x21, 0x49, 0xa6, 0x11, 0xe5, + 0xd8, 0xf3, 0x83, 0x08, 0xf3, 0x45, 0x4c, 0x52, 0x05, 0xd6, 0x0f, 0xe6, 0x0c, 0x33, 0x9e, 0x25, + 0x2a, 0xcb, 0x1e, 0xc3, 0xbf, 0xd7, 0x02, 0x75, 0xe8, 0x98, 0x04, 0x9c, 0x84, 0xbd, 0xb9, 0x7e, + 0x0b, 0xff, 0x93, 0xb9, 0xb4, 0x0d, 0x07, 0x33, 0xc6, 0x49, 0x3a, 0x88, 0xe8, 0x90, 0x19, 0xc0, + 0xfa, 0xd6, 0xf8, 0xdd, 0xaa, 0xa3, 0x5d, 0x20, 0x12, 0x81, 0xa8, 0xa3, 0xb8, 0x7d, 0xc6, 0x89, + 0x43, 0x87, 0xac, 0x5d, 0x5c, 0xbe, 0x9e, 0x68, 0xee, 0x3f, 0xb2, 0xd7, 0x4f, 0x05, 0x60, 0x3f, + 0x01, 0xa8, 0xcb, 0x30, 0xd1, 0x92, 0xb2, 0x34, 0x62, 0x54, 0xbf, 0x82, 0x3f, 0x12, 0x92, 0x66, + 0x13, 0x9e, 0xaa, 0x0c, 0x1b, 0x1d, 0x5a, 0x00, 0xea, 0x77, 0x5c, 0x49, 0x73, 0x38, 0x99, 0xba, + 0x5b, 0x89, 0x7e, 0x01, 0xbf, 0xcb, 0x21, 0x8d, 0x82, 0xd4, 0x5a, 0x9f, 0x69, 0xe5, 0x78, 0x42, + 0x99, 0xd3, 0xed, 0x1b, 0x58, 0xde, 0x37, 0xd4, 0x6b, 0xf0, 0x57, 0xbe, 0x98, 0x41, 0x14, 0x1a, + 0xc0, 0x02, 0x8d, 0xa2, 0xfb, 0x33, 0x6f, 0x38, 0xa1, 0x7e, 0x04, 0x4b, 0x2c, 0xe3, 0x71, 0xc6, + 0x8d, 0x82, 0x05, 0x1a, 0x65, 0x57, 0x55, 0x76, 0x00, 0xe1, 0xce, 0xf9, 0x6b, 0x8b, 0x4b, 0x58, + 0x14, 0xc1, 0xd2, 0xe0, 0x4f, 0xeb, 0xf4, 0xf0, 0x98, 0x5d, 0xc9, 0x16, 0x86, 0xbd, 0x45, 0x4c, + 0x5c, 0xa9, 0x68, 0xdf, 0x2f, 0xd7, 0x26, 0x58, 0xad, 0x4d, 0xf0, 0xb6, 0x36, 0xc1, 0xf3, 0xc6, + 0xd4, 0x56, 0x1b, 0x53, 0x7b, 0xd9, 0x98, 0xda, 0x5d, 0x77, 0x14, 0xf1, 0x87, 0xcc, 0x47, 0x01, + 0x9b, 0xe2, 0xdc, 0xef, 0x4c, 0xfe, 0x6a, 0xc0, 0x26, 0xaa, 0xfe, 0x50, 0xe2, 0xb9, 0xba, 0x05, + 0x79, 0x25, 0xdb, 0x8b, 0xf0, 0x4b, 0x92, 0x76, 0xfe, 0x1e, 0x00, 0x00, 0xff, 0xff, 0x46, 0xd4, + 0x19, 0x03, 0x98, 0x02, 0x00, 0x00, } func (m *AsyncInjectedTx) Marshal() (dAtA []byte, err error) { @@ -243,20 +299,6 @@ func (m *AsyncInjectedTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintVe(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - } - } - if len(m.Results) > 0 { - for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintVe(dAtA, i, uint64(size)) - } - i-- dAtA[i] = 0xa } } @@ -294,13 +336,27 @@ func (m *AsyncVoteExtension) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintVe(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x12 + } + } + if len(m.Results) > 0 { + for iNdEx := len(m.Results) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Results[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintVe(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } -func (m *AsyncVoteExtensionItem) Marshal() (dAtA []byte, err error) { +func (m *VEResultItem) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -310,12 +366,47 @@ func (m *AsyncVoteExtensionItem) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AsyncVoteExtensionItem) MarshalTo(dAtA []byte) (int, error) { +func (m *VEResultItem) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AsyncVoteExtensionItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *VEResultItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Output) > 0 { + i -= len(m.Output) + copy(dAtA[i:], m.Output) + i = encodeVarintVe(dAtA, i, uint64(len(m.Output))) + i-- + dAtA[i] = 0x12 + } + if m.FutureId != 0 { + i = encodeVarintVe(dAtA, i, uint64(m.FutureId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *VEVoteItem) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VEVoteItem) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VEVoteItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -350,12 +441,6 @@ func (m *AsyncInjectedTx) Size() (n int) { } var l int _ = l - if len(m.Results) > 0 { - for _, e := range m.Results { - l = e.Size() - n += 1 + l + sovVe(uint64(l)) - } - } if len(m.ExtendedVotesInfo) > 0 { for _, e := range m.ExtendedVotesInfo { l = e.Size() @@ -371,6 +456,12 @@ func (m *AsyncVoteExtension) Size() (n int) { } var l int _ = l + if len(m.Results) > 0 { + for _, e := range m.Results { + l = e.Size() + n += 1 + l + sovVe(uint64(l)) + } + } if len(m.Votes) > 0 { for _, e := range m.Votes { l = e.Size() @@ -380,7 +471,23 @@ func (m *AsyncVoteExtension) Size() (n int) { return n } -func (m *AsyncVoteExtensionItem) Size() (n int) { +func (m *VEResultItem) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FutureId != 0 { + n += 1 + sovVe(uint64(m.FutureId)) + } + l = len(m.Output) + if l > 0 { + n += 1 + l + sovVe(uint64(l)) + } + return n +} + +func (m *VEVoteItem) Size() (n int) { if m == nil { return 0 } @@ -430,6 +537,90 @@ func (m *AsyncInjectedTx) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: AsyncInjectedTx: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtendedVotesInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthVe + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthVe + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExtendedVotesInfo = append(m.ExtendedVotesInfo, types.ExtendedVoteInfo{}) + if err := m.ExtendedVotesInfo[len(m.ExtendedVotesInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipVe(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthVe + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AsyncVoteExtension) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AsyncVoteExtension: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AsyncVoteExtension: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Results", wireType) @@ -459,14 +650,14 @@ func (m *AsyncInjectedTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Results = append(m.Results, &FutureResult{}) + m.Results = append(m.Results, &VEResultItem{}) if err := m.Results[len(m.Results)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtendedVotesInfo", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -493,8 +684,8 @@ func (m *AsyncInjectedTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ExtendedVotesInfo = append(m.ExtendedVotesInfo, types.ExtendedVoteInfo{}) - if err := m.ExtendedVotesInfo[len(m.ExtendedVotesInfo)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Votes = append(m.Votes, &VEVoteItem{}) + if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -519,7 +710,7 @@ func (m *AsyncInjectedTx) Unmarshal(dAtA []byte) error { } return nil } -func (m *AsyncVoteExtension) Unmarshal(dAtA []byte) error { +func (m *VEResultItem) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -542,17 +733,36 @@ func (m *AsyncVoteExtension) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AsyncVoteExtension: wiretype end group for non-group") + return fmt.Errorf("proto: VEResultItem: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AsyncVoteExtension: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VEResultItem: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FutureId", wireType) + } + m.FutureId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVe + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FutureId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowVe @@ -562,24 +772,24 @@ func (m *AsyncVoteExtension) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthVe } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthVe } if postIndex > l { return io.ErrUnexpectedEOF } - m.Votes = append(m.Votes, &AsyncVoteExtensionItem{}) - if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Output = append(m.Output[:0], dAtA[iNdEx:postIndex]...) + if m.Output == nil { + m.Output = []byte{} } iNdEx = postIndex default: @@ -603,7 +813,7 @@ func (m *AsyncVoteExtension) Unmarshal(dAtA []byte) error { } return nil } -func (m *AsyncVoteExtensionItem) Unmarshal(dAtA []byte) error { +func (m *VEVoteItem) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -626,10 +836,10 @@ func (m *AsyncVoteExtensionItem) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AsyncVoteExtensionItem: wiretype end group for non-group") + return fmt.Errorf("proto: VEVoteItem: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AsyncVoteExtensionItem: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VEVoteItem: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: