From e2e06841b3d2de4c524dd24b2187df700dda8f01 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 29 Feb 2024 11:53:25 +0530 Subject: [PATCH] Support retrieving records using attributes --- api/cerc/registry/v1/registry.pulsar.go | 593 ++++++++++++++++++++++-- proto/cerc/registry/v1/registry.proto | 6 + x/registry/keeper/keeper.go | 130 +++++- x/registry/keys.go | 2 + x/registry/registry.pb.go | 333 +++++++++---- 5 files changed, 940 insertions(+), 124 deletions(-) diff --git a/api/cerc/registry/v1/registry.pulsar.go b/api/cerc/registry/v1/registry.pulsar.go index 497fb74f..f45b1d6c 100644 --- a/api/cerc/registry/v1/registry.pulsar.go +++ b/api/cerc/registry/v1/registry.pulsar.go @@ -6130,6 +6130,486 @@ func (x *fastReflection_ExpiryQueue) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_RecordsList_1_list)(nil) + +type _RecordsList_1_list struct { + list *[]string +} + +func (x *_RecordsList_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_RecordsList_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_RecordsList_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_RecordsList_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_RecordsList_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message RecordsList at list field Value as it is not of Message kind")) +} + +func (x *_RecordsList_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_RecordsList_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_RecordsList_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_RecordsList protoreflect.MessageDescriptor + fd_RecordsList_value protoreflect.FieldDescriptor +) + +func init() { + file_cerc_registry_v1_registry_proto_init() + md_RecordsList = File_cerc_registry_v1_registry_proto.Messages().ByName("RecordsList") + fd_RecordsList_value = md_RecordsList.Fields().ByName("value") +} + +var _ protoreflect.Message = (*fastReflection_RecordsList)(nil) + +type fastReflection_RecordsList RecordsList + +func (x *RecordsList) ProtoReflect() protoreflect.Message { + return (*fastReflection_RecordsList)(x) +} + +func (x *RecordsList) slowProtoReflect() protoreflect.Message { + mi := &file_cerc_registry_v1_registry_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_RecordsList_messageType fastReflection_RecordsList_messageType +var _ protoreflect.MessageType = fastReflection_RecordsList_messageType{} + +type fastReflection_RecordsList_messageType struct{} + +func (x fastReflection_RecordsList_messageType) Zero() protoreflect.Message { + return (*fastReflection_RecordsList)(nil) +} +func (x fastReflection_RecordsList_messageType) New() protoreflect.Message { + return new(fastReflection_RecordsList) +} +func (x fastReflection_RecordsList_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_RecordsList +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_RecordsList) Descriptor() protoreflect.MessageDescriptor { + return md_RecordsList +} + +// 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_RecordsList) Type() protoreflect.MessageType { + return _fastReflection_RecordsList_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_RecordsList) New() protoreflect.Message { + return new(fastReflection_RecordsList) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_RecordsList) Interface() protoreflect.ProtoMessage { + return (*RecordsList)(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_RecordsList) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Value) != 0 { + value := protoreflect.ValueOfList(&_RecordsList_1_list{list: &x.Value}) + if !f(fd_RecordsList_value, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_RecordsList) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cerc.registry.v1.RecordsList.value": + return len(x.Value) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.registry.v1.RecordsList")) + } + panic(fmt.Errorf("message cerc.registry.v1.RecordsList 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_RecordsList) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cerc.registry.v1.RecordsList.value": + x.Value = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.registry.v1.RecordsList")) + } + panic(fmt.Errorf("message cerc.registry.v1.RecordsList 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_RecordsList) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cerc.registry.v1.RecordsList.value": + if len(x.Value) == 0 { + return protoreflect.ValueOfList(&_RecordsList_1_list{}) + } + listValue := &_RecordsList_1_list{list: &x.Value} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.registry.v1.RecordsList")) + } + panic(fmt.Errorf("message cerc.registry.v1.RecordsList 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_RecordsList) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cerc.registry.v1.RecordsList.value": + lv := value.List() + clv := lv.(*_RecordsList_1_list) + x.Value = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.registry.v1.RecordsList")) + } + panic(fmt.Errorf("message cerc.registry.v1.RecordsList 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_RecordsList) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.registry.v1.RecordsList.value": + if x.Value == nil { + x.Value = []string{} + } + value := &_RecordsList_1_list{list: &x.Value} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.registry.v1.RecordsList")) + } + panic(fmt.Errorf("message cerc.registry.v1.RecordsList 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_RecordsList) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cerc.registry.v1.RecordsList.value": + list := []string{} + return protoreflect.ValueOfList(&_RecordsList_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.registry.v1.RecordsList")) + } + panic(fmt.Errorf("message cerc.registry.v1.RecordsList 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_RecordsList) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cerc.registry.v1.RecordsList", 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_RecordsList) 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_RecordsList) 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_RecordsList) 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_RecordsList) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*RecordsList) + 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.Value) > 0 { + for _, s := range x.Value { + l = len(s) + 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().(*RecordsList) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Value) > 0 { + for iNdEx := len(x.Value) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Value[iNdEx]) + copy(dAtA[i:], x.Value[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value[iNdEx]))) + 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().(*RecordsList) + 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: RecordsList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RecordsList: 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 Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Value = append(x.Value, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -6712,6 +7192,43 @@ func (x *ExpiryQueue) GetValue() []string { return nil } +// List of record ids +// Value type to be used in AttributesMap +type RecordsList struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` +} + +func (x *RecordsList) Reset() { + *x = RecordsList{} + if protoimpl.UnsafeEnabled { + mi := &file_cerc_registry_v1_registry_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RecordsList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RecordsList) ProtoMessage() {} + +// Deprecated: Use RecordsList.ProtoReflect.Descriptor instead. +func (*RecordsList) Descriptor() ([]byte, []int) { + return file_cerc_registry_v1_registry_proto_rawDescGZIP(), []int{9} +} + +func (x *RecordsList) GetValue() []string { + if x != nil { + return x.Value + } + return nil +} + var File_cerc_registry_v1_registry_proto protoreflect.FileDescriptor var file_cerc_registry_v1_registry_proto_rawDesc = []byte{ @@ -6932,20 +7449,23 @@ var file_cerc_registry_v1_registry_proto_rawDesc = []byte{ 0x22, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x33, 0x0a, 0x0b, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0xc5, - 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, - 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, - 0x6f, 0x6e, 0x69, 0x63, 0x32, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x52, 0x58, 0xaa, 0x02, 0x10, 0x43, - 0x65, 0x72, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x10, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x79, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x23, + 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x42, 0xc5, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, + 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, + 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, + 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x32, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x63, 0x65, 0x72, 0x63, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, + 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x52, + 0x58, 0xaa, 0x02, 0x10, 0x43, 0x65, 0x72, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -6960,7 +7480,7 @@ func file_cerc_registry_v1_registry_proto_rawDescGZIP() []byte { return file_cerc_registry_v1_registry_proto_rawDescData } -var file_cerc_registry_v1_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_cerc_registry_v1_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_cerc_registry_v1_registry_proto_goTypes = []interface{}{ (*Params)(nil), // 0: cerc.registry.v1.Params (*Record)(nil), // 1: cerc.registry.v1.Record @@ -6971,23 +7491,24 @@ var file_cerc_registry_v1_registry_proto_goTypes = []interface{}{ (*NameRecordEntry)(nil), // 6: cerc.registry.v1.NameRecordEntry (*Signature)(nil), // 7: cerc.registry.v1.Signature (*ExpiryQueue)(nil), // 8: cerc.registry.v1.ExpiryQueue - (*v1beta1.Coin)(nil), // 9: cosmos.base.v1beta1.Coin - (*durationpb.Duration)(nil), // 10: google.protobuf.Duration - (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp + (*RecordsList)(nil), // 9: cerc.registry.v1.RecordsList + (*v1beta1.Coin)(nil), // 10: cosmos.base.v1beta1.Coin + (*durationpb.Duration)(nil), // 11: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp } var file_cerc_registry_v1_registry_proto_depIdxs = []int32{ - 9, // 0: cerc.registry.v1.Params.record_rent:type_name -> cosmos.base.v1beta1.Coin - 10, // 1: cerc.registry.v1.Params.record_rent_duration:type_name -> google.protobuf.Duration - 9, // 2: cerc.registry.v1.Params.authority_rent:type_name -> cosmos.base.v1beta1.Coin - 10, // 3: cerc.registry.v1.Params.authority_rent_duration:type_name -> google.protobuf.Duration - 10, // 4: cerc.registry.v1.Params.authority_grace_period:type_name -> google.protobuf.Duration - 10, // 5: cerc.registry.v1.Params.authority_auction_commits_duration:type_name -> google.protobuf.Duration - 10, // 6: cerc.registry.v1.Params.authority_auction_reveals_duration:type_name -> google.protobuf.Duration - 9, // 7: cerc.registry.v1.Params.authority_auction_commit_fee:type_name -> cosmos.base.v1beta1.Coin - 9, // 8: cerc.registry.v1.Params.authority_auction_reveal_fee:type_name -> cosmos.base.v1beta1.Coin - 9, // 9: cerc.registry.v1.Params.authority_auction_minimum_bid:type_name -> cosmos.base.v1beta1.Coin + 10, // 0: cerc.registry.v1.Params.record_rent:type_name -> cosmos.base.v1beta1.Coin + 11, // 1: cerc.registry.v1.Params.record_rent_duration:type_name -> google.protobuf.Duration + 10, // 2: cerc.registry.v1.Params.authority_rent:type_name -> cosmos.base.v1beta1.Coin + 11, // 3: cerc.registry.v1.Params.authority_rent_duration:type_name -> google.protobuf.Duration + 11, // 4: cerc.registry.v1.Params.authority_grace_period:type_name -> google.protobuf.Duration + 11, // 5: cerc.registry.v1.Params.authority_auction_commits_duration:type_name -> google.protobuf.Duration + 11, // 6: cerc.registry.v1.Params.authority_auction_reveals_duration:type_name -> google.protobuf.Duration + 10, // 7: cerc.registry.v1.Params.authority_auction_commit_fee:type_name -> cosmos.base.v1beta1.Coin + 10, // 8: cerc.registry.v1.Params.authority_auction_reveal_fee:type_name -> cosmos.base.v1beta1.Coin + 10, // 9: cerc.registry.v1.Params.authority_auction_minimum_bid:type_name -> cosmos.base.v1beta1.Coin 3, // 10: cerc.registry.v1.AuthorityEntry.entry:type_name -> cerc.registry.v1.NameAuthority - 11, // 11: cerc.registry.v1.NameAuthority.expiry_time:type_name -> google.protobuf.Timestamp + 12, // 11: cerc.registry.v1.NameAuthority.expiry_time:type_name -> google.protobuf.Timestamp 5, // 12: cerc.registry.v1.NameEntry.entry:type_name -> cerc.registry.v1.NameRecord 6, // 13: cerc.registry.v1.NameRecord.latest:type_name -> cerc.registry.v1.NameRecordEntry 6, // 14: cerc.registry.v1.NameRecord.history:type_name -> cerc.registry.v1.NameRecordEntry @@ -7112,6 +7633,18 @@ func file_cerc_registry_v1_registry_proto_init() { return nil } } + file_cerc_registry_v1_registry_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RecordsList); 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{ @@ -7119,7 +7652,7 @@ func file_cerc_registry_v1_registry_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cerc_registry_v1_registry_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/cerc/registry/v1/registry.proto b/proto/cerc/registry/v1/registry.proto index 001a6ea5..a97bbeb1 100644 --- a/proto/cerc/registry/v1/registry.proto +++ b/proto/cerc/registry/v1/registry.proto @@ -138,3 +138,9 @@ message ExpiryQueue { string id = 1; repeated string value = 2; } + +// List of record ids +// Value type to be used in AttributesMap +message RecordsList { + repeated string value = 1; +} diff --git a/x/registry/keeper/keeper.go b/x/registry/keeper/keeper.go index 320e3672..fbc854cc 100644 --- a/x/registry/keeper/keeper.go +++ b/x/registry/keeper/keeper.go @@ -107,6 +107,7 @@ type Keeper struct { NameRecords *collections.IndexedMap[string, registrytypes.NameRecord, NameRecordsIndexes] RecordExpiryQueue collections.Map[time.Time, registrytypes.ExpiryQueue] AuthorityExpiryQueue collections.Map[time.Time, registrytypes.ExpiryQueue] + AttributesMap collections.Map[collections.Pair[string, string], registrytypes.RecordsList] } // NewKeeper creates a new Keeper instance @@ -149,6 +150,10 @@ func NewKeeper( sb, registrytypes.AuthorityExpiryQueuePrefix, "authority_expiry_queue", sdk.TimeKey, codec.CollValue[registrytypes.ExpiryQueue](cdc), ), + AttributesMap: collections.NewMap( + sb, registrytypes.AttributesMapPrefix, "attributes_map", + collections.PairKeyCodec(collections.StringKey, collections.StringKey), codec.CollValue[registrytypes.RecordsList](cdc), + ), } schema, err := sb.Build() @@ -239,7 +244,41 @@ func (k Keeper) GetRecordsByBondId(ctx sdk.Context, bondId string) ([]registryty // RecordsFromAttributes gets a list of records whose attributes match all provided values func (k Keeper) RecordsFromAttributes(ctx sdk.Context, attributes []*registrytypes.QueryRecordsRequest_KeyValueInput, all bool) ([]registrytypes.Record, error) { - panic("unimplemented") + resultRecordIds := []string{} + for i, attr := range attributes { + suffix, err := QueryValueToJSON(attr.Value) + if err != nil { + return nil, err + } + mapKey := collections.Join(attr.Key, string(suffix)) + recordIds, err := k.getAttributeMapping(ctx, mapKey) + if err != nil { + return nil, err + } + + if i == 0 { + resultRecordIds = recordIds + } else { + resultRecordIds = getIntersection(recordIds, resultRecordIds) + } + } + + records := []registrytypes.Record{} + for _, id := range resultRecordIds { + record, err := k.GetRecordById(ctx, id) + if err != nil { + return nil, err + } + if record.Deleted { + continue + } + if !all && len(record.Names) == 0 { + continue + } + records = append(records, record) + } + + return records, nil } // TODO not recursive, and only should be if we want to support querying with whole sub-objects, @@ -372,20 +411,14 @@ func (k Keeper) processRecord(ctx sdk.Context, record *registrytypes.ReadableRec // TODO look up/validate record type here - if err := k.processAttributes(ctx, record.Attributes, record.Id, ""); err != nil { + if err := k.processAttributes(ctx, record.Attributes, record.Id); err != nil { return err } - // TODO - // expiryTimeKey := GetAttributesIndexKey(ExpiryTimeAttributeName, []byte(record.ExpiryTime)) - // if err := k.SetAttributeMapping(ctx, expiryTimeKey, record.ID); err != nil { - // return err - // } - return k.insertRecordExpiryQueue(ctx, recordObj) } -func (k Keeper) processAttributes(ctx sdk.Context, attrs registrytypes.AttributeMap, id string, prefix string) error { +func (k Keeper) processAttributes(ctx sdk.Context, attrs registrytypes.AttributeMap, id string) error { np := basicnode.Prototype.Map nb := np.NewBuilder() encAttrs, err := canonicaljson.Marshal(attrs) @@ -404,7 +437,7 @@ func (k Keeper) processAttributes(ctx sdk.Context, attrs registrytypes.Attribute return fmt.Errorf("record attributes must be a map, not %T", n.Kind()) } - return k.processAttributeMap(ctx, n, id, prefix) + return k.processAttributeMap(ctx, n, id, "") } func (k Keeper) processAttributeMap(ctx sdk.Context, n ipld.Node, id string, prefix string) error { @@ -429,17 +462,55 @@ func (k Keeper) processAttributeMap(ctx sdk.Context, n ipld.Node, id string, pre if err := dagjson.Encode(valuenode, &buf); err != nil { return err } - // TODO - // value := buf.Bytes() - // indexKey := GetAttributesIndexKey(prefix+key, value) - // if err := k.SetAttributeMapping(ctx, indexKey, id); err != nil { - // return err - // } + + value := buf.Bytes() + mapKey := collections.Join(prefix+key, string(value)) + if err := k.setAttributeMapping(ctx, mapKey, id); err != nil { + return err + } } } return nil } +func (k Keeper) setAttributeMapping(ctx sdk.Context, key collections.Pair[string, string], recordId string) error { + var recordIds []string + + has, err := k.AttributesMap.Has(ctx, key) + if err != nil { + return err + } + if has { + value, err := k.AttributesMap.Get(ctx, key) + if err != nil { + return err + } + recordIds = value.Value + } + + recordIds = append(recordIds, recordId) + + return k.AttributesMap.Set(ctx, key, registrytypes.RecordsList{Value: recordIds}) +} + +func (k Keeper) getAttributeMapping(ctx sdk.Context, key collections.Pair[string, string]) ([]string, error) { + if has, err := k.AttributesMap.Has(ctx, key); !has { + if err != nil { + return []string{}, err + } + + k.Logger(ctx).Debug(fmt.Sprintf("store doesn't have key: %v", key)) + return []string{}, nil + } + + value, err := k.AttributesMap.Get(ctx, key) + if err != nil { + return []string{}, err + } + + return value.Value, nil +} + func (k Keeper) populateRecordNames(ctx sdk.Context, record *registrytypes.Record) error { iter, err := k.NameRecords.Indexes.Cid.MatchExact(ctx, record.Id) if err != nil { @@ -622,3 +693,30 @@ func (k Keeper) tryTakeRecordRent(ctx sdk.Context, record registrytypes.Record) record.Deleted = false return k.SaveRecord(ctx, record) } + +func getIntersection(a []string, b []string) []string { + result := []string{} + if len(a) < len(b) { + for _, str := range a { + if contains(b, str) { + result = append(result, str) + } + } + } else { + for _, str := range b { + if contains(a, str) { + result = append(result, str) + } + } + } + return result +} + +func contains(arr []string, str string) bool { + for _, s := range arr { + if s == str { + return true + } + } + return false +} diff --git a/x/registry/keys.go b/x/registry/keys.go index 8c5c39fa..6f03eb73 100644 --- a/x/registry/keys.go +++ b/x/registry/keys.go @@ -33,4 +33,6 @@ var ( RecordExpiryQueuePrefix = collections.NewPrefix(8) AuthorityExpiryQueuePrefix = collections.NewPrefix(9) + + AttributesMapPrefix = collections.NewPrefix(10) ) diff --git a/x/registry/registry.pb.go b/x/registry/registry.pb.go index 3fff0fa0..b104b413 100644 --- a/x/registry/registry.pb.go +++ b/x/registry/registry.pb.go @@ -679,6 +679,52 @@ func (m *ExpiryQueue) GetValue() []string { return nil } +// List of record ids +// Value type to be used in AttributesMap +type RecordsList struct { + Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` +} + +func (m *RecordsList) Reset() { *m = RecordsList{} } +func (m *RecordsList) String() string { return proto.CompactTextString(m) } +func (*RecordsList) ProtoMessage() {} +func (*RecordsList) Descriptor() ([]byte, []int) { + return fileDescriptor_d792f2373089b5b9, []int{9} +} +func (m *RecordsList) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RecordsList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RecordsList.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 *RecordsList) XXX_Merge(src proto.Message) { + xxx_messageInfo_RecordsList.Merge(m, src) +} +func (m *RecordsList) XXX_Size() int { + return m.Size() +} +func (m *RecordsList) XXX_DiscardUnknown() { + xxx_messageInfo_RecordsList.DiscardUnknown(m) +} + +var xxx_messageInfo_RecordsList proto.InternalMessageInfo + +func (m *RecordsList) GetValue() []string { + if m != nil { + return m.Value + } + return nil +} + func init() { proto.RegisterType((*Params)(nil), "cerc.registry.v1.Params") proto.RegisterType((*Record)(nil), "cerc.registry.v1.Record") @@ -689,89 +735,91 @@ func init() { proto.RegisterType((*NameRecordEntry)(nil), "cerc.registry.v1.NameRecordEntry") proto.RegisterType((*Signature)(nil), "cerc.registry.v1.Signature") proto.RegisterType((*ExpiryQueue)(nil), "cerc.registry.v1.ExpiryQueue") + proto.RegisterType((*RecordsList)(nil), "cerc.registry.v1.RecordsList") } func init() { proto.RegisterFile("cerc/registry/v1/registry.proto", fileDescriptor_d792f2373089b5b9) } var fileDescriptor_d792f2373089b5b9 = []byte{ - // 1221 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xcb, 0x6e, 0xdb, 0x46, - 0x17, 0x36, 0x6d, 0x59, 0xb6, 0x8e, 0x63, 0xff, 0xc1, 0xfc, 0x4e, 0x22, 0xbb, 0xb1, 0xe8, 0xa8, - 0x28, 0xec, 0x20, 0x30, 0x09, 0xd9, 0x28, 0x82, 0x24, 0xe8, 0xc2, 0x72, 0x1d, 0xc3, 0x0d, 0xda, - 0x3a, 0xe3, 0xac, 0x5a, 0x14, 0x02, 0x2f, 0x13, 0x79, 0x5a, 0x91, 0x14, 0xc8, 0xa1, 0x1a, 0x2d, - 0x0b, 0x74, 0xd3, 0x9d, 0x97, 0x59, 0xf4, 0x0d, 0xba, 0xe8, 0x63, 0x34, 0xcb, 0x2c, 0xbb, 0x29, - 0x5b, 0xd8, 0x40, 0x1f, 0x40, 0x4f, 0x50, 0x70, 0x66, 0x78, 0x95, 0x14, 0xb5, 0xc8, 0x8e, 0xe7, - 0xf6, 0xcd, 0x37, 0xdf, 0x9c, 0xb9, 0x10, 0x54, 0x8b, 0xf8, 0x96, 0xee, 0x93, 0x2e, 0x0d, 0x98, - 0x3f, 0xd4, 0x07, 0xad, 0xf4, 0x5b, 0xeb, 0xfb, 0x1e, 0xf3, 0xd0, 0xcd, 0x38, 0x41, 0x4b, 0x9d, - 0x83, 0xd6, 0x66, 0xa3, 0xeb, 0x79, 0xdd, 0x1e, 0xd1, 0x79, 0xdc, 0x0c, 0x5f, 0xea, 0x76, 0xe8, - 0x1b, 0x8c, 0x7a, 0xae, 0xa8, 0xd8, 0x54, 0xcb, 0x71, 0x46, 0x1d, 0x12, 0x30, 0xc3, 0xe9, 0xcb, - 0x84, 0xf5, 0xae, 0xd7, 0xf5, 0xf8, 0xa7, 0x1e, 0x7f, 0x49, 0x6f, 0xc3, 0xf2, 0x02, 0xc7, 0x0b, - 0x74, 0xd3, 0x08, 0x88, 0x3e, 0x68, 0x99, 0x84, 0x19, 0x2d, 0xdd, 0xf2, 0xa8, 0x84, 0x6d, 0xfe, - 0xb1, 0x0a, 0xd5, 0x33, 0xc3, 0x37, 0x9c, 0x00, 0x51, 0x58, 0xf1, 0x89, 0xe5, 0xf9, 0x76, 0xc7, - 0x27, 0x2e, 0xab, 0x2b, 0xdb, 0xca, 0xee, 0xca, 0xfe, 0x86, 0x26, 0x00, 0xb4, 0x18, 0x40, 0x93, - 0x00, 0xda, 0x91, 0x47, 0xdd, 0xf6, 0xde, 0x9b, 0x48, 0x9d, 0x1b, 0x45, 0xea, 0x47, 0xdf, 0x06, - 0x9e, 0xfb, 0xb8, 0x99, 0xab, 0x6d, 0x6e, 0x0f, 0x0d, 0xa7, 0x57, 0x74, 0x61, 0x10, 0x16, 0x26, - 0x2e, 0x43, 0x97, 0x0a, 0xac, 0xe7, 0x82, 0x9d, 0x64, 0xae, 0xf5, 0x79, 0x39, 0xa8, 0x98, 0xac, - 0x96, 0x4c, 0x56, 0xfb, 0x54, 0x26, 0xb4, 0x8f, 0xe4, 0xa0, 0x0f, 0xc7, 0x06, 0x4d, 0x41, 0x26, - 0x8c, 0x9e, 0xc5, 0x5e, 0xff, 0xa9, 0x2a, 0x18, 0x65, 0x54, 0x12, 0x60, 0x14, 0xc2, 0x9a, 0x11, - 0xb2, 0x0b, 0xcf, 0xa7, 0x6c, 0x28, 0x04, 0x58, 0x98, 0x25, 0xc0, 0x81, 0xe4, 0xf2, 0x40, 0x70, - 0x29, 0x96, 0x27, 0x2c, 0x4a, 0x5e, 0xbc, 0x9a, 0x3a, 0xb8, 0x12, 0x3f, 0x2b, 0x70, 0xa7, 0x98, - 0x92, 0x89, 0x51, 0x99, 0x25, 0xc6, 0xa9, 0x24, 0xf0, 0xc9, 0x24, 0x02, 0x63, 0x7a, 0x4c, 0x0b, - 0x73, 0x49, 0x6e, 0x15, 0x68, 0xa5, 0xaa, 0xbc, 0x56, 0xe0, 0x76, 0x56, 0xd7, 0xf5, 0x0d, 0x8b, - 0x74, 0xfa, 0xc4, 0xa7, 0x9e, 0x5d, 0x5f, 0x9c, 0xc5, 0xee, 0x44, 0xb2, 0x7b, 0x52, 0x66, 0x97, - 0x87, 0x19, 0x27, 0x57, 0x88, 0x72, 0x6e, 0xeb, 0x69, 0xf0, 0x24, 0x8e, 0x9d, 0xf1, 0x10, 0xfa, - 0x41, 0x81, 0x8d, 0xac, 0xca, 0x08, 0xad, 0x78, 0xd0, 0x0e, 0x71, 0x0d, 0xb3, 0x47, 0xec, 0x7a, - 0x75, 0x5b, 0xd9, 0x5d, 0x6e, 0x1f, 0x8f, 0x22, 0xf5, 0xb0, 0x3c, 0x7c, 0x29, 0x75, 0x9c, 0x41, - 0x39, 0x01, 0x67, 0x2b, 0x74, 0x28, 0x42, 0xc7, 0x22, 0x82, 0x7e, 0x53, 0x60, 0x42, 0x9d, 0xe5, - 0x39, 0x0e, 0x65, 0x41, 0xb6, 0x90, 0x4b, 0xb3, 0xa4, 0xea, 0x48, 0xa9, 0xce, 0xa7, 0x71, 0x2d, - 0x43, 0x4e, 0x27, 0x3d, 0x96, 0xc9, 0x25, 0x54, 0xcb, 0x33, 0x38, 0x12, 0x69, 0xe9, 0x42, 0x4f, - 0x9e, 0x89, 0x4f, 0x06, 0xc4, 0xe8, 0xe5, 0x66, 0xb2, 0xfc, 0xde, 0x33, 0x29, 0x43, 0x4e, 0x9f, - 0xc9, 0x58, 0xe6, 0xe4, 0x99, 0x60, 0x91, 0x96, 0xce, 0xe4, 0x17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34, - 0x1f, 0xc1, 0xff, 0x4a, 0x31, 0xb4, 0x96, 0x9d, 0x9a, 0xfc, 0x70, 0xcc, 0x5a, 0x64, 0x3e, 0xdf, - 0x22, 0x4d, 0x06, 0xb5, 0x73, 0xda, 0x75, 0x0d, 0x16, 0xfa, 0x04, 0x3d, 0x80, 0x85, 0x80, 0x76, - 0x65, 0xb7, 0x6f, 0x8c, 0x22, 0xf5, 0x96, 0xd0, 0x3a, 0xa0, 0xdd, 0x44, 0xe3, 0xf8, 0x13, 0xc7, - 0x59, 0xf1, 0xe2, 0xf7, 0x43, 0x93, 0x6f, 0x8f, 0xb1, 0xe3, 0x56, 0x06, 0x92, 0xa2, 0xc4, 0xc4, - 0xd5, 0x7e, 0x68, 0x3e, 0x23, 0xc3, 0xe6, 0x01, 0xac, 0x1c, 0xf3, 0xa5, 0x79, 0x1e, 0x92, 0x90, - 0x8c, 0x91, 0x5d, 0x87, 0xc5, 0x81, 0xd1, 0x0b, 0x09, 0x97, 0xa2, 0x86, 0x85, 0xd1, 0x3e, 0x7c, - 0x73, 0xd5, 0x50, 0xde, 0x5e, 0x35, 0x94, 0xbf, 0xae, 0x1a, 0xca, 0xe5, 0x75, 0x63, 0xee, 0xed, - 0x75, 0x63, 0xee, 0xf7, 0xeb, 0xc6, 0xdc, 0x57, 0x3b, 0x5d, 0xca, 0xb4, 0x81, 0x6d, 0x6a, 0xcc, - 0xd3, 0x63, 0xd5, 0xf6, 0xa8, 0xa7, 0xf7, 0x0c, 0xcb, 0x73, 0xa9, 0xb5, 0x6f, 0xeb, 0xaf, 0xd2, - 0xbf, 0x38, 0xb3, 0xca, 0xfb, 0xea, 0xe0, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xef, 0x57, - 0x0f, 0xe9, 0x0d, 0x00, 0x00, + // 1234 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xcd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d0, 0xe4, 0xe3, 0x31, 0x76, 0xdc, 0x4a, 0x43, 0x1c, 0x14, 0x8b, 0xb8, + 0xdc, 0x0b, 0xcd, 0xa7, 0x64, 0xd0, 0xd8, 0x87, 0xea, 0x11, 0xdf, 0x9a, 0x67, 0x21, 0x09, 0xc9, + 0x18, 0xd9, 0x35, 0x58, 0xec, 0x1b, 0xdd, 0x90, 0xf0, 0x52, 0x54, 0xb0, 0x10, 0x1a, 0x77, 0xa1, + 0x2a, 0x32, 0x0c, 0xbe, 0xa0, 0x01, 0x4b, 0x9d, 0x94, 0x8c, 0x53, 0xeb, 0xe0, 0xf5, 0x65, 0x5d, + 0x79, 0x73, 0x59, 0x57, 0xfe, 0xb9, 0xac, 0x2b, 0x17, 0x57, 0xf5, 0xb9, 0x37, 0x57, 0xf5, 0xb9, + 0x3f, 0xaf, 0xea, 0x73, 0xdf, 0x6c, 0x77, 0x28, 0xd3, 0xfa, 0xb6, 0xa9, 0x31, 0x4f, 0x8f, 0x4a, + 0xbb, 0x4b, 0x3d, 0xbd, 0x6b, 0x58, 0x9e, 0x4b, 0xad, 0x3d, 0x5b, 0x7f, 0x99, 0xfc, 0xea, 0x99, + 0x65, 0xde, 0x7c, 0xfb, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x80, 0xc8, 0x98, 0x0e, 0x0e, + 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -1305,6 +1353,38 @@ func (m *ExpiryQueue) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *RecordsList) 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 *RecordsList) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RecordsList) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + for iNdEx := len(m.Value) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Value[iNdEx]) + copy(dAtA[i:], m.Value[iNdEx]) + i = encodeVarintRegistry(dAtA, i, uint64(len(m.Value[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintRegistry(dAtA []byte, offset int, v uint64) int { offset -= sovRegistry(v) base := offset @@ -1535,6 +1615,21 @@ func (m *ExpiryQueue) Size() (n int) { return n } +func (m *RecordsList) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Value) > 0 { + for _, s := range m.Value { + l = len(s) + n += 1 + l + sovRegistry(uint64(l)) + } + } + return n +} + func sovRegistry(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -3216,6 +3311,88 @@ func (m *ExpiryQueue) Unmarshal(dAtA []byte) error { } return nil } +func (m *RecordsList) 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 ErrIntOverflowRegistry + } + 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: RecordsList: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RecordsList: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRegistry + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRegistry + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRegistry + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRegistry(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRegistry + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipRegistry(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0