diff --git a/api/layer/bridge/query.pulsar.go b/api/layer/bridge/query.pulsar.go index 16bf395a2..56912463e 100644 --- a/api/layer/bridge/query.pulsar.go +++ b/api/layer/bridge/query.pulsar.go @@ -7678,14 +7678,14 @@ func (x *fastReflection_QueryGetValsetSigsResponse) ProtoMethods() *protoiface.M var ( md_QueryGetOracleAttestationsRequest protoreflect.MessageDescriptor - fd_QueryGetOracleAttestationsRequest_queryId protoreflect.FieldDescriptor + fd_QueryGetOracleAttestationsRequest_query_id protoreflect.FieldDescriptor fd_QueryGetOracleAttestationsRequest_timestamp protoreflect.FieldDescriptor ) func init() { file_layer_bridge_query_proto_init() md_QueryGetOracleAttestationsRequest = File_layer_bridge_query_proto.Messages().ByName("QueryGetOracleAttestationsRequest") - fd_QueryGetOracleAttestationsRequest_queryId = md_QueryGetOracleAttestationsRequest.Fields().ByName("queryId") + fd_QueryGetOracleAttestationsRequest_query_id = md_QueryGetOracleAttestationsRequest.Fields().ByName("query_id") fd_QueryGetOracleAttestationsRequest_timestamp = md_QueryGetOracleAttestationsRequest.Fields().ByName("timestamp") } @@ -7754,9 +7754,9 @@ func (x *fastReflection_QueryGetOracleAttestationsRequest) Interface() protorefl // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryGetOracleAttestationsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) - if !f(fd_QueryGetOracleAttestationsRequest_queryId, value) { + if len(x.QueryId) != 0 { + value := protoreflect.ValueOfBytes(x.QueryId) + if !f(fd_QueryGetOracleAttestationsRequest_query_id, value) { return } } @@ -7781,8 +7781,8 @@ func (x *fastReflection_QueryGetOracleAttestationsRequest) Range(f func(protoref // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryGetOracleAttestationsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsRequest.queryId": - return x.QueryId != "" + case "layer.bridge.QueryGetOracleAttestationsRequest.query_id": + return len(x.QueryId) != 0 case "layer.bridge.QueryGetOracleAttestationsRequest.timestamp": return x.Timestamp != int64(0) default: @@ -7801,8 +7801,8 @@ func (x *fastReflection_QueryGetOracleAttestationsRequest) Has(fd protoreflect.F // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetOracleAttestationsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsRequest.queryId": - x.QueryId = "" + case "layer.bridge.QueryGetOracleAttestationsRequest.query_id": + x.QueryId = nil case "layer.bridge.QueryGetOracleAttestationsRequest.timestamp": x.Timestamp = int64(0) default: @@ -7821,9 +7821,9 @@ func (x *fastReflection_QueryGetOracleAttestationsRequest) Clear(fd protoreflect // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryGetOracleAttestationsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.bridge.QueryGetOracleAttestationsRequest.queryId": + case "layer.bridge.QueryGetOracleAttestationsRequest.query_id": value := x.QueryId - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) case "layer.bridge.QueryGetOracleAttestationsRequest.timestamp": value := x.Timestamp return protoreflect.ValueOfInt64(value) @@ -7847,8 +7847,8 @@ func (x *fastReflection_QueryGetOracleAttestationsRequest) Get(descriptor protor // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetOracleAttestationsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsRequest.queryId": - x.QueryId = value.Interface().(string) + case "layer.bridge.QueryGetOracleAttestationsRequest.query_id": + x.QueryId = value.Bytes() case "layer.bridge.QueryGetOracleAttestationsRequest.timestamp": x.Timestamp = value.Int() default: @@ -7871,8 +7871,8 @@ func (x *fastReflection_QueryGetOracleAttestationsRequest) Set(fd protoreflect.F // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetOracleAttestationsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsRequest.queryId": - panic(fmt.Errorf("field queryId of message layer.bridge.QueryGetOracleAttestationsRequest is not mutable")) + case "layer.bridge.QueryGetOracleAttestationsRequest.query_id": + panic(fmt.Errorf("field query_id of message layer.bridge.QueryGetOracleAttestationsRequest is not mutable")) case "layer.bridge.QueryGetOracleAttestationsRequest.timestamp": panic(fmt.Errorf("field timestamp of message layer.bridge.QueryGetOracleAttestationsRequest is not mutable")) default: @@ -7888,8 +7888,8 @@ func (x *fastReflection_QueryGetOracleAttestationsRequest) Mutable(fd protorefle // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryGetOracleAttestationsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.bridge.QueryGetOracleAttestationsRequest.queryId": - return protoreflect.ValueOfString("") + case "layer.bridge.QueryGetOracleAttestationsRequest.query_id": + return protoreflect.ValueOfBytes(nil) case "layer.bridge.QueryGetOracleAttestationsRequest.timestamp": return protoreflect.ValueOfInt64(int64(0)) default: @@ -8062,7 +8062,7 @@ func (x *fastReflection_QueryGetOracleAttestationsRequest) ProtoMethods() *proto if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -8072,23 +8072,25 @@ func (x *fastReflection_QueryGetOracleAttestationsRequest) ProtoMethods() *proto } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryId = string(dAtA[iNdEx:postIndex]) + x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) + if x.QueryId == nil { + x.QueryId = []byte{} + } iNdEx = postIndex case 2: if wireType != 0 { @@ -10363,14 +10365,14 @@ func (x *fastReflection_QueryGetValsetByTimestampResponse) ProtoMethods() *proto } var ( - md_QueryGetCurrentAggregateReportRequest protoreflect.MessageDescriptor - fd_QueryGetCurrentAggregateReportRequest_queryId protoreflect.FieldDescriptor + md_QueryGetCurrentAggregateReportRequest protoreflect.MessageDescriptor + fd_QueryGetCurrentAggregateReportRequest_query_id protoreflect.FieldDescriptor ) func init() { file_layer_bridge_query_proto_init() md_QueryGetCurrentAggregateReportRequest = File_layer_bridge_query_proto.Messages().ByName("QueryGetCurrentAggregateReportRequest") - fd_QueryGetCurrentAggregateReportRequest_queryId = md_QueryGetCurrentAggregateReportRequest.Fields().ByName("queryId") + fd_QueryGetCurrentAggregateReportRequest_query_id = md_QueryGetCurrentAggregateReportRequest.Fields().ByName("query_id") } var _ protoreflect.Message = (*fastReflection_QueryGetCurrentAggregateReportRequest)(nil) @@ -10438,9 +10440,9 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Interface() proto // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) - if !f(fd_QueryGetCurrentAggregateReportRequest_queryId, value) { + if len(x.QueryId) != 0 { + value := protoreflect.ValueOfBytes(x.QueryId) + if !f(fd_QueryGetCurrentAggregateReportRequest_query_id, value) { return } } @@ -10459,8 +10461,8 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Range(f func(prot // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.bridge.QueryGetCurrentAggregateReportRequest.queryId": - return x.QueryId != "" + case "layer.bridge.QueryGetCurrentAggregateReportRequest.query_id": + return len(x.QueryId) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetCurrentAggregateReportRequest")) @@ -10477,8 +10479,8 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Has(fd protorefle // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.bridge.QueryGetCurrentAggregateReportRequest.queryId": - x.QueryId = "" + case "layer.bridge.QueryGetCurrentAggregateReportRequest.query_id": + x.QueryId = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetCurrentAggregateReportRequest")) @@ -10495,9 +10497,9 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Clear(fd protoref // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.bridge.QueryGetCurrentAggregateReportRequest.queryId": + case "layer.bridge.QueryGetCurrentAggregateReportRequest.query_id": value := x.QueryId - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetCurrentAggregateReportRequest")) @@ -10518,8 +10520,8 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Get(descriptor pr // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.bridge.QueryGetCurrentAggregateReportRequest.queryId": - x.QueryId = value.Interface().(string) + case "layer.bridge.QueryGetCurrentAggregateReportRequest.query_id": + x.QueryId = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetCurrentAggregateReportRequest")) @@ -10540,8 +10542,8 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Set(fd protorefle // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.bridge.QueryGetCurrentAggregateReportRequest.queryId": - panic(fmt.Errorf("field queryId of message layer.bridge.QueryGetCurrentAggregateReportRequest is not mutable")) + case "layer.bridge.QueryGetCurrentAggregateReportRequest.query_id": + panic(fmt.Errorf("field query_id of message layer.bridge.QueryGetCurrentAggregateReportRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetCurrentAggregateReportRequest")) @@ -10555,8 +10557,8 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) Mutable(fd protor // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryGetCurrentAggregateReportRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.bridge.QueryGetCurrentAggregateReportRequest.queryId": - return protoreflect.ValueOfString("") + case "layer.bridge.QueryGetCurrentAggregateReportRequest.query_id": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.bridge.QueryGetCurrentAggregateReportRequest")) @@ -10719,7 +10721,7 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) ProtoMethods() *p if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -10729,23 +10731,25 @@ func (x *fastReflection_QueryGetCurrentAggregateReportRequest) ProtoMethods() *p } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryId = string(dAtA[iNdEx:postIndex]) + x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) + if x.QueryId == nil { + x.QueryId = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -11318,7 +11322,7 @@ func (x *_Aggregate_6_list) IsValid() bool { var ( md_Aggregate protoreflect.MessageDescriptor - fd_Aggregate_queryId protoreflect.FieldDescriptor + fd_Aggregate_query_id protoreflect.FieldDescriptor fd_Aggregate_aggregateValue protoreflect.FieldDescriptor fd_Aggregate_aggregateReporter protoreflect.FieldDescriptor fd_Aggregate_reporterPower protoreflect.FieldDescriptor @@ -11333,7 +11337,7 @@ var ( func init() { file_layer_bridge_query_proto_init() md_Aggregate = File_layer_bridge_query_proto.Messages().ByName("Aggregate") - fd_Aggregate_queryId = md_Aggregate.Fields().ByName("queryId") + fd_Aggregate_query_id = md_Aggregate.Fields().ByName("query_id") fd_Aggregate_aggregateValue = md_Aggregate.Fields().ByName("aggregateValue") fd_Aggregate_aggregateReporter = md_Aggregate.Fields().ByName("aggregateReporter") fd_Aggregate_reporterPower = md_Aggregate.Fields().ByName("reporterPower") @@ -11410,9 +11414,9 @@ func (x *fastReflection_Aggregate) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Aggregate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) - if !f(fd_Aggregate_queryId, value) { + if len(x.QueryId) != 0 { + value := protoreflect.ValueOfBytes(x.QueryId) + if !f(fd_Aggregate_query_id, value) { return } } @@ -11485,8 +11489,8 @@ func (x *fastReflection_Aggregate) Range(f func(protoreflect.FieldDescriptor, pr // a repeated field is populated if it is non-empty. func (x *fastReflection_Aggregate) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.bridge.Aggregate.queryId": - return x.QueryId != "" + case "layer.bridge.Aggregate.query_id": + return len(x.QueryId) != 0 case "layer.bridge.Aggregate.aggregateValue": return x.AggregateValue != "" case "layer.bridge.Aggregate.aggregateReporter": @@ -11521,8 +11525,8 @@ func (x *fastReflection_Aggregate) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Aggregate) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.bridge.Aggregate.queryId": - x.QueryId = "" + case "layer.bridge.Aggregate.query_id": + x.QueryId = nil case "layer.bridge.Aggregate.aggregateValue": x.AggregateValue = "" case "layer.bridge.Aggregate.aggregateReporter": @@ -11557,9 +11561,9 @@ func (x *fastReflection_Aggregate) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Aggregate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.bridge.Aggregate.queryId": + case "layer.bridge.Aggregate.query_id": value := x.QueryId - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) case "layer.bridge.Aggregate.aggregateValue": value := x.AggregateValue return protoreflect.ValueOfString(value) @@ -11610,8 +11614,8 @@ func (x *fastReflection_Aggregate) Get(descriptor protoreflect.FieldDescriptor) // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Aggregate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.bridge.Aggregate.queryId": - x.QueryId = value.Interface().(string) + case "layer.bridge.Aggregate.query_id": + x.QueryId = value.Bytes() case "layer.bridge.Aggregate.aggregateValue": x.AggregateValue = value.Interface().(string) case "layer.bridge.Aggregate.aggregateReporter": @@ -11658,8 +11662,8 @@ func (x *fastReflection_Aggregate) Mutable(fd protoreflect.FieldDescriptor) prot } value := &_Aggregate_6_list{list: &x.Reporters} return protoreflect.ValueOfList(value) - case "layer.bridge.Aggregate.queryId": - panic(fmt.Errorf("field queryId of message layer.bridge.Aggregate is not mutable")) + case "layer.bridge.Aggregate.query_id": + panic(fmt.Errorf("field query_id of message layer.bridge.Aggregate is not mutable")) case "layer.bridge.Aggregate.aggregateValue": panic(fmt.Errorf("field aggregateValue of message layer.bridge.Aggregate is not mutable")) case "layer.bridge.Aggregate.aggregateReporter": @@ -11689,8 +11693,8 @@ func (x *fastReflection_Aggregate) Mutable(fd protoreflect.FieldDescriptor) prot // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Aggregate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.bridge.Aggregate.queryId": - return protoreflect.ValueOfString("") + case "layer.bridge.Aggregate.query_id": + return protoreflect.ValueOfBytes(nil) case "layer.bridge.Aggregate.aggregateValue": return protoreflect.ValueOfString("") case "layer.bridge.Aggregate.aggregateReporter": @@ -11970,7 +11974,7 @@ func (x *fastReflection_Aggregate) ProtoMethods() *protoiface.Methods { if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -11980,23 +11984,25 @@ func (x *fastReflection_Aggregate) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryId = string(dAtA[iNdEx:postIndex]) + x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) + if x.QueryId == nil { + x.QueryId = []byte{} + } iNdEx = postIndex case 2: if wireType != 2 { @@ -12708,14 +12714,14 @@ func (x *fastReflection_AggregateReporter) ProtoMethods() *protoiface.Methods { var ( md_QueryGetDataBeforeRequest protoreflect.MessageDescriptor - fd_QueryGetDataBeforeRequest_queryId protoreflect.FieldDescriptor + fd_QueryGetDataBeforeRequest_query_id protoreflect.FieldDescriptor fd_QueryGetDataBeforeRequest_timestamp protoreflect.FieldDescriptor ) func init() { file_layer_bridge_query_proto_init() md_QueryGetDataBeforeRequest = File_layer_bridge_query_proto.Messages().ByName("QueryGetDataBeforeRequest") - fd_QueryGetDataBeforeRequest_queryId = md_QueryGetDataBeforeRequest.Fields().ByName("queryId") + fd_QueryGetDataBeforeRequest_query_id = md_QueryGetDataBeforeRequest.Fields().ByName("query_id") fd_QueryGetDataBeforeRequest_timestamp = md_QueryGetDataBeforeRequest.Fields().ByName("timestamp") } @@ -12784,9 +12790,9 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Interface() protoreflect.Prot // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryGetDataBeforeRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) - if !f(fd_QueryGetDataBeforeRequest_queryId, value) { + if len(x.QueryId) != 0 { + value := protoreflect.ValueOfBytes(x.QueryId) + if !f(fd_QueryGetDataBeforeRequest_query_id, value) { return } } @@ -12811,8 +12817,8 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Range(f func(protoreflect.Fie // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryGetDataBeforeRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.bridge.QueryGetDataBeforeRequest.queryId": - return x.QueryId != "" + case "layer.bridge.QueryGetDataBeforeRequest.query_id": + return len(x.QueryId) != 0 case "layer.bridge.QueryGetDataBeforeRequest.timestamp": return x.Timestamp != int64(0) default: @@ -12831,8 +12837,8 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Has(fd protoreflect.FieldDesc // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetDataBeforeRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.bridge.QueryGetDataBeforeRequest.queryId": - x.QueryId = "" + case "layer.bridge.QueryGetDataBeforeRequest.query_id": + x.QueryId = nil case "layer.bridge.QueryGetDataBeforeRequest.timestamp": x.Timestamp = int64(0) default: @@ -12851,9 +12857,9 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Clear(fd protoreflect.FieldDe // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryGetDataBeforeRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.bridge.QueryGetDataBeforeRequest.queryId": + case "layer.bridge.QueryGetDataBeforeRequest.query_id": value := x.QueryId - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) case "layer.bridge.QueryGetDataBeforeRequest.timestamp": value := x.Timestamp return protoreflect.ValueOfInt64(value) @@ -12877,8 +12883,8 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Get(descriptor protoreflect.F // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetDataBeforeRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.bridge.QueryGetDataBeforeRequest.queryId": - x.QueryId = value.Interface().(string) + case "layer.bridge.QueryGetDataBeforeRequest.query_id": + x.QueryId = value.Bytes() case "layer.bridge.QueryGetDataBeforeRequest.timestamp": x.Timestamp = value.Int() default: @@ -12901,8 +12907,8 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Set(fd protoreflect.FieldDesc // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetDataBeforeRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.bridge.QueryGetDataBeforeRequest.queryId": - panic(fmt.Errorf("field queryId of message layer.bridge.QueryGetDataBeforeRequest is not mutable")) + case "layer.bridge.QueryGetDataBeforeRequest.query_id": + panic(fmt.Errorf("field query_id of message layer.bridge.QueryGetDataBeforeRequest is not mutable")) case "layer.bridge.QueryGetDataBeforeRequest.timestamp": panic(fmt.Errorf("field timestamp of message layer.bridge.QueryGetDataBeforeRequest is not mutable")) default: @@ -12918,8 +12924,8 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Mutable(fd protoreflect.Field // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryGetDataBeforeRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.bridge.QueryGetDataBeforeRequest.queryId": - return protoreflect.ValueOfString("") + case "layer.bridge.QueryGetDataBeforeRequest.query_id": + return protoreflect.ValueOfBytes(nil) case "layer.bridge.QueryGetDataBeforeRequest.timestamp": return protoreflect.ValueOfInt64(int64(0)) default: @@ -13092,7 +13098,7 @@ func (x *fastReflection_QueryGetDataBeforeRequest) ProtoMethods() *protoiface.Me if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -13102,23 +13108,25 @@ func (x *fastReflection_QueryGetDataBeforeRequest) ProtoMethods() *protoiface.Me } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryId = string(dAtA[iNdEx:postIndex]) + x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) + if x.QueryId == nil { + x.QueryId = []byte{} + } iNdEx = postIndex case 2: if wireType != 0 { @@ -14326,7 +14334,7 @@ type QueryGetOracleAttestationsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } @@ -14350,11 +14358,11 @@ func (*QueryGetOracleAttestationsRequest) Descriptor() ([]byte, []int) { return file_layer_bridge_query_proto_rawDescGZIP(), []int{17} } -func (x *QueryGetOracleAttestationsRequest) GetQueryId() string { +func (x *QueryGetOracleAttestationsRequest) GetQueryId() []byte { if x != nil { return x.QueryId } - return "" + return nil } func (x *QueryGetOracleAttestationsRequest) GetTimestamp() int64 { @@ -14544,7 +14552,7 @@ type QueryGetCurrentAggregateReportRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` } func (x *QueryGetCurrentAggregateReportRequest) Reset() { @@ -14567,11 +14575,11 @@ func (*QueryGetCurrentAggregateReportRequest) Descriptor() ([]byte, []int) { return file_layer_bridge_query_proto_rawDescGZIP(), []int{23} } -func (x *QueryGetCurrentAggregateReportRequest) GetQueryId() string { +func (x *QueryGetCurrentAggregateReportRequest) GetQueryId() []byte { if x != nil { return x.QueryId } - return "" + return nil } type QueryGetCurrentAggregateReportResponse struct { @@ -14622,7 +14630,7 @@ type Aggregate struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` AggregateValue string `protobuf:"bytes,2,opt,name=aggregateValue,proto3" json:"aggregateValue,omitempty"` AggregateReporter string `protobuf:"bytes,3,opt,name=aggregateReporter,proto3" json:"aggregateReporter,omitempty"` ReporterPower int64 `protobuf:"varint,4,opt,name=reporterPower,proto3" json:"reporterPower,omitempty"` @@ -14654,11 +14662,11 @@ func (*Aggregate) Descriptor() ([]byte, []int) { return file_layer_bridge_query_proto_rawDescGZIP(), []int{25} } -func (x *Aggregate) GetQueryId() string { +func (x *Aggregate) GetQueryId() []byte { if x != nil { return x.QueryId } - return "" + return nil } func (x *Aggregate) GetAggregateValue() string { @@ -14772,7 +14780,7 @@ type QueryGetDataBeforeRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } @@ -14796,11 +14804,11 @@ func (*QueryGetDataBeforeRequest) Descriptor() ([]byte, []int) { return file_layer_bridge_query_proto_rawDescGZIP(), []int{27} } -func (x *QueryGetDataBeforeRequest) GetQueryId() string { +func (x *QueryGetDataBeforeRequest) GetQueryId() []byte { if x != nil { return x.QueryId } - return "" + return nil } func (x *QueryGetDataBeforeRequest) GetTimestamp() int64 { @@ -14971,228 +14979,228 @@ var file_layer_bridge_query_proto_rawDesc = []byte{ 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x22, 0x5b, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, + 0x72, 0x65, 0x73, 0x22, 0x5c, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x22, 0x48, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x59, 0x0a, 0x2b, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x4e, 0x0a, 0x2c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, - 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x76, 0x6d, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x40, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, - 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x72, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x12, - 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x12, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x22, 0x41, 0x0a, 0x25, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x7d, - 0x0a, 0x26, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x22, 0x48, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x59, 0x0a, 0x2b, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x4e, 0x0a, 0x2c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, + 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x76, 0x6d, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x76, 0x6d, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x40, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, + 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x72, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, + 0x12, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x53, 0x65, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x12, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x22, 0x42, 0x0a, 0x25, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, + 0x22, 0x7d, 0x0a, 0x26, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x41, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, + 0x8b, 0x03, 0x0a, 0x09, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x24, + 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x50, + 0x6f, 0x77, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, + 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, + 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x12, 0x32, 0x0a, 0x14, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x14, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x45, 0x0a, + 0x11, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, + 0x6f, 0x77, 0x65, 0x72, 0x22, 0x54, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, + 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x71, 0x0a, 0x1a, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, + 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x8a, 0x03, - 0x0a, 0x09, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, - 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x72, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, - 0x72, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, - 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, 0x73, 0x74, - 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x72, 0x52, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x66, 0x6c, 0x61, 0x67, 0x67, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x32, - 0x0a, 0x14, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x45, 0x0a, 0x11, 0x41, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, - 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, - 0x6f, 0x77, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, - 0x72, 0x22, 0x53, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, - 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, - 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x71, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x52, 0x09, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xc5, 0x0f, 0x0a, 0x05, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x20, 0x2e, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x95, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2a, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, + 0x28, 0x04, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x32, 0xc8, 0x0f, + 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, + 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x2a, 0x2e, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, + 0x74, 0x45, 0x76, 0x6d, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2b, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x76, 0x6d, 0x5f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0xad, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, - 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, - 0x12, 0x26, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, - 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0xd2, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x2e, 0x6c, 0x61, 0x79, 0x65, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x76, + 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0xad, 0x01, 0x0a, + 0x16, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x37, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xcf, 0x01, - 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x36, - 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x42, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, - 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x62, - 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x7b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x7d, 0x12, - 0x95, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, - 0x73, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, - 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x61, 0x79, + 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x28, 0x12, 0x26, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0xd2, 0x01, 0x0a, + 0x1c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x2e, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x7d, 0x12, 0xcf, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x79, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x36, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x79, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x73, 0x2f, 0x7b, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xbf, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, - 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xe7, 0x01, 0x0a, 0x1f, 0x47, 0x65, - 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x39, 0x2e, + 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x42, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x5f, 0x62, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2f, 0x7b, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x7d, 0x12, 0x95, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, + 0x74, 0x53, 0x69, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, + 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, + 0x12, 0x29, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, + 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x73, 0x2f, + 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xc0, 0x01, 0x0a, 0x15, + 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, + 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, + 0x12, 0x3c, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, + 0x67, 0x65, 0x74, 0x5f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, + 0x64, 0x7d, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xe7, + 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x39, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, - 0x45, 0x76, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x79, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x47, 0x12, 0x45, 0x2f, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, - 0x65, 0x76, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x62, 0x79, 0x5f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, - 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2e, 0x2e, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x5f, - 0x62, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2f, 0x7b, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xc4, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, - 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x33, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x6c, 0x61, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x47, 0x12, 0x45, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x65, 0x76, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x5f, 0x62, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x2f, 0x7b, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, + 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x12, 0x2e, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, + 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x42, + 0x79, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x61, + 0x6c, 0x73, 0x65, 0x74, 0x5f, 0x62, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xc5, 0x01, + 0x0a, 0x19, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x33, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, - 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x72, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x7d, 0x12, - 0x9f, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, - 0x65, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, - 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, - 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, - 0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x7d, 0x42, 0x9c, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, - 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x42, 0x58, 0xaa, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xca, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, - 0x72, 0x69, 0x64, 0x67, 0x65, 0xe2, 0x02, 0x18, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x34, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, + 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2f, 0x67, 0x65, + 0x74, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa0, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, + 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, + 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x36, 0x12, 0x34, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, + 0x65, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x42, 0x9c, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, + 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x42, 0x0a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, + 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x42, 0x58, 0xaa, 0x02, + 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xca, 0x02, 0x0c, + 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xe2, 0x02, 0x18, 0x4c, + 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, + 0x3a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/layer/bridge/tx.pulsar.go b/api/layer/bridge/tx.pulsar.go index 8919293d6..dc2d56857 100644 --- a/api/layer/bridge/tx.pulsar.go +++ b/api/layer/bridge/tx.pulsar.go @@ -1760,7 +1760,7 @@ func (x *fastReflection_MsgSubmitBridgeValsetSignatureResponse) ProtoMethods() * var ( md_MsgSubmitOracleAttestation protoreflect.MessageDescriptor fd_MsgSubmitOracleAttestation_creator protoreflect.FieldDescriptor - fd_MsgSubmitOracleAttestation_queryId protoreflect.FieldDescriptor + fd_MsgSubmitOracleAttestation_query_id protoreflect.FieldDescriptor fd_MsgSubmitOracleAttestation_timestamp protoreflect.FieldDescriptor fd_MsgSubmitOracleAttestation_signature protoreflect.FieldDescriptor ) @@ -1769,7 +1769,7 @@ func init() { file_layer_bridge_tx_proto_init() md_MsgSubmitOracleAttestation = File_layer_bridge_tx_proto.Messages().ByName("MsgSubmitOracleAttestation") fd_MsgSubmitOracleAttestation_creator = md_MsgSubmitOracleAttestation.Fields().ByName("creator") - fd_MsgSubmitOracleAttestation_queryId = md_MsgSubmitOracleAttestation.Fields().ByName("queryId") + fd_MsgSubmitOracleAttestation_query_id = md_MsgSubmitOracleAttestation.Fields().ByName("query_id") fd_MsgSubmitOracleAttestation_timestamp = md_MsgSubmitOracleAttestation.Fields().ByName("timestamp") fd_MsgSubmitOracleAttestation_signature = md_MsgSubmitOracleAttestation.Fields().ByName("signature") } @@ -1845,9 +1845,9 @@ func (x *fastReflection_MsgSubmitOracleAttestation) Range(f func(protoreflect.Fi return } } - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) - if !f(fd_MsgSubmitOracleAttestation_queryId, value) { + if len(x.QueryId) != 0 { + value := protoreflect.ValueOfBytes(x.QueryId) + if !f(fd_MsgSubmitOracleAttestation_query_id, value) { return } } @@ -1880,8 +1880,8 @@ func (x *fastReflection_MsgSubmitOracleAttestation) Has(fd protoreflect.FieldDes switch fd.FullName() { case "layer.bridge.MsgSubmitOracleAttestation.creator": return x.Creator != "" - case "layer.bridge.MsgSubmitOracleAttestation.queryId": - return x.QueryId != "" + case "layer.bridge.MsgSubmitOracleAttestation.query_id": + return len(x.QueryId) != 0 case "layer.bridge.MsgSubmitOracleAttestation.timestamp": return x.Timestamp != "" case "layer.bridge.MsgSubmitOracleAttestation.signature": @@ -1904,8 +1904,8 @@ func (x *fastReflection_MsgSubmitOracleAttestation) Clear(fd protoreflect.FieldD switch fd.FullName() { case "layer.bridge.MsgSubmitOracleAttestation.creator": x.Creator = "" - case "layer.bridge.MsgSubmitOracleAttestation.queryId": - x.QueryId = "" + case "layer.bridge.MsgSubmitOracleAttestation.query_id": + x.QueryId = nil case "layer.bridge.MsgSubmitOracleAttestation.timestamp": x.Timestamp = "" case "layer.bridge.MsgSubmitOracleAttestation.signature": @@ -1929,9 +1929,9 @@ func (x *fastReflection_MsgSubmitOracleAttestation) Get(descriptor protoreflect. case "layer.bridge.MsgSubmitOracleAttestation.creator": value := x.Creator return protoreflect.ValueOfString(value) - case "layer.bridge.MsgSubmitOracleAttestation.queryId": + case "layer.bridge.MsgSubmitOracleAttestation.query_id": value := x.QueryId - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) case "layer.bridge.MsgSubmitOracleAttestation.timestamp": value := x.Timestamp return protoreflect.ValueOfString(value) @@ -1960,8 +1960,8 @@ func (x *fastReflection_MsgSubmitOracleAttestation) Set(fd protoreflect.FieldDes switch fd.FullName() { case "layer.bridge.MsgSubmitOracleAttestation.creator": x.Creator = value.Interface().(string) - case "layer.bridge.MsgSubmitOracleAttestation.queryId": - x.QueryId = value.Interface().(string) + case "layer.bridge.MsgSubmitOracleAttestation.query_id": + x.QueryId = value.Bytes() case "layer.bridge.MsgSubmitOracleAttestation.timestamp": x.Timestamp = value.Interface().(string) case "layer.bridge.MsgSubmitOracleAttestation.signature": @@ -1988,8 +1988,8 @@ func (x *fastReflection_MsgSubmitOracleAttestation) Mutable(fd protoreflect.Fiel switch fd.FullName() { case "layer.bridge.MsgSubmitOracleAttestation.creator": panic(fmt.Errorf("field creator of message layer.bridge.MsgSubmitOracleAttestation is not mutable")) - case "layer.bridge.MsgSubmitOracleAttestation.queryId": - panic(fmt.Errorf("field queryId of message layer.bridge.MsgSubmitOracleAttestation is not mutable")) + case "layer.bridge.MsgSubmitOracleAttestation.query_id": + panic(fmt.Errorf("field query_id of message layer.bridge.MsgSubmitOracleAttestation is not mutable")) case "layer.bridge.MsgSubmitOracleAttestation.timestamp": panic(fmt.Errorf("field timestamp of message layer.bridge.MsgSubmitOracleAttestation is not mutable")) case "layer.bridge.MsgSubmitOracleAttestation.signature": @@ -2009,8 +2009,8 @@ func (x *fastReflection_MsgSubmitOracleAttestation) NewField(fd protoreflect.Fie switch fd.FullName() { case "layer.bridge.MsgSubmitOracleAttestation.creator": return protoreflect.ValueOfString("") - case "layer.bridge.MsgSubmitOracleAttestation.queryId": - return protoreflect.ValueOfString("") + case "layer.bridge.MsgSubmitOracleAttestation.query_id": + return protoreflect.ValueOfBytes(nil) case "layer.bridge.MsgSubmitOracleAttestation.timestamp": return protoreflect.ValueOfString("") case "layer.bridge.MsgSubmitOracleAttestation.signature": @@ -2242,7 +2242,7 @@ func (x *fastReflection_MsgSubmitOracleAttestation) ProtoMethods() *protoiface.M if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2252,23 +2252,25 @@ func (x *fastReflection_MsgSubmitOracleAttestation) ProtoMethods() *protoiface.M } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryId = string(dAtA[iNdEx:postIndex]) + x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) + if x.QueryId == nil { + x.QueryId = []byte{} + } iNdEx = postIndex case 3: if wireType != 2 { @@ -2890,7 +2892,7 @@ type MsgSubmitOracleAttestation struct { unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - QueryId string `protobuf:"bytes,2,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,2,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` Timestamp string `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` } @@ -2922,11 +2924,11 @@ func (x *MsgSubmitOracleAttestation) GetCreator() string { return "" } -func (x *MsgSubmitOracleAttestation) GetQueryId() string { +func (x *MsgSubmitOracleAttestation) GetQueryId() []byte { if x != nil { return x.QueryId } - return "" + return nil } func (x *MsgSubmitOracleAttestation) GetTimestamp() string { @@ -2996,52 +2998,52 @@ var file_layer_bridge_tx_proto_rawDesc = []byte{ 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x28, 0x0a, 0x26, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x9a, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, + 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x24, - 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf4, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x72, 0x0a, 0x16, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x1a, - 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x81, 0x01, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x12, 0x2c, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, - 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, - 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x34, - 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, 0x6c, - 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x28, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, - 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x99, 0x01, 0x0a, 0x10, - 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, - 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x42, 0x58, 0xaa, 0x02, - 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xca, 0x02, 0x0c, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xe2, 0x02, 0x18, 0x4c, - 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, - 0x3a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, + 0x24, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf4, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x72, 0x0a, + 0x16, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x1a, 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, + 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x81, 0x01, 0x0a, 0x1b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x2c, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, + 0x56, 0x61, 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x1a, + 0x34, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, + 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x56, 0x61, + 0x6c, 0x73, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x28, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, + 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x30, 0x2e, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x99, 0x01, 0x0a, + 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, + 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2f, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x42, 0x58, 0xaa, + 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xca, 0x02, + 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0xe2, 0x02, 0x18, + 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, + 0x3a, 0x3a, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/layer/daemons/median_values.pulsar.go b/api/layer/daemons/median_values.pulsar.go index 1be067ec2..5b9a28377 100644 --- a/api/layer/daemons/median_values.pulsar.go +++ b/api/layer/daemons/median_values.pulsar.go @@ -1440,8 +1440,8 @@ func (x *fastReflection_GetMedianValueRequest) Interface() protoreflect.ProtoMes // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GetMedianValueRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.QueryData != "" { - value := protoreflect.ValueOfString(x.QueryData) + if len(x.QueryData) != 0 { + value := protoreflect.ValueOfBytes(x.QueryData) if !f(fd_GetMedianValueRequest_query_data, value) { return } @@ -1462,7 +1462,7 @@ func (x *fastReflection_GetMedianValueRequest) Range(f func(protoreflect.FieldDe func (x *fastReflection_GetMedianValueRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "layer.daemons.GetMedianValueRequest.query_data": - return x.QueryData != "" + return len(x.QueryData) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.daemons.GetMedianValueRequest")) @@ -1480,7 +1480,7 @@ func (x *fastReflection_GetMedianValueRequest) Has(fd protoreflect.FieldDescript func (x *fastReflection_GetMedianValueRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "layer.daemons.GetMedianValueRequest.query_data": - x.QueryData = "" + x.QueryData = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.daemons.GetMedianValueRequest")) @@ -1499,7 +1499,7 @@ func (x *fastReflection_GetMedianValueRequest) Get(descriptor protoreflect.Field switch descriptor.FullName() { case "layer.daemons.GetMedianValueRequest.query_data": value := x.QueryData - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.daemons.GetMedianValueRequest")) @@ -1521,7 +1521,7 @@ func (x *fastReflection_GetMedianValueRequest) Get(descriptor protoreflect.Field func (x *fastReflection_GetMedianValueRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "layer.daemons.GetMedianValueRequest.query_data": - x.QueryData = value.Interface().(string) + x.QueryData = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.daemons.GetMedianValueRequest")) @@ -1558,7 +1558,7 @@ func (x *fastReflection_GetMedianValueRequest) Mutable(fd protoreflect.FieldDesc func (x *fastReflection_GetMedianValueRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "layer.daemons.GetMedianValueRequest.query_data": - return protoreflect.ValueOfString("") + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.daemons.GetMedianValueRequest")) @@ -1721,7 +1721,7 @@ func (x *fastReflection_GetMedianValueRequest) ProtoMethods() *protoiface.Method if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1731,23 +1731,25 @@ func (x *fastReflection_GetMedianValueRequest) ProtoMethods() *protoiface.Method } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryData = string(dAtA[iNdEx:postIndex]) + x.QueryData = append(x.QueryData[:0], dAtA[iNdEx:postIndex]...) + if x.QueryData == nil { + x.QueryData = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -2355,7 +2357,7 @@ type GetMedianValueRequest struct { unknownFields protoimpl.UnknownFields // query data to fetch prices for - QueryData string `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` + QueryData []byte `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` } func (x *GetMedianValueRequest) Reset() { @@ -2378,11 +2380,11 @@ func (*GetMedianValueRequest) Descriptor() ([]byte, []int) { return file_layer_daemons_median_values_proto_rawDescGZIP(), []int{3} } -func (x *GetMedianValueRequest) GetQueryData() string { +func (x *GetMedianValueRequest) GetQueryData() []byte { if x != nil { return x.QueryData } - return "" + return nil } // GetMedianValueResponse is the response for the GetMedianValue rpc @@ -2446,7 +2448,7 @@ var file_layer_daemons_median_values_proto_rawDesc = []byte{ 0x6c, 0x75, 0x65, 0x73, 0x52, 0x0c, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x36, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0x5a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x6e, 0x5f, 0x76, diff --git a/api/layer/oracle/aggregate.pulsar.go b/api/layer/oracle/aggregate.pulsar.go index e4c497ce2..684f52d19 100644 --- a/api/layer/oracle/aggregate.pulsar.go +++ b/api/layer/oracle/aggregate.pulsar.go @@ -69,7 +69,7 @@ func (x *_Aggregate_6_list) IsValid() bool { var ( md_Aggregate protoreflect.MessageDescriptor - fd_Aggregate_queryId protoreflect.FieldDescriptor + fd_Aggregate_query_id protoreflect.FieldDescriptor fd_Aggregate_aggregateValue protoreflect.FieldDescriptor fd_Aggregate_aggregateReporter protoreflect.FieldDescriptor fd_Aggregate_reporterPower protoreflect.FieldDescriptor @@ -84,7 +84,7 @@ var ( func init() { file_layer_oracle_aggregate_proto_init() md_Aggregate = File_layer_oracle_aggregate_proto.Messages().ByName("Aggregate") - fd_Aggregate_queryId = md_Aggregate.Fields().ByName("queryId") + fd_Aggregate_query_id = md_Aggregate.Fields().ByName("query_id") fd_Aggregate_aggregateValue = md_Aggregate.Fields().ByName("aggregateValue") fd_Aggregate_aggregateReporter = md_Aggregate.Fields().ByName("aggregateReporter") fd_Aggregate_reporterPower = md_Aggregate.Fields().ByName("reporterPower") @@ -161,9 +161,9 @@ func (x *fastReflection_Aggregate) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Aggregate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) - if !f(fd_Aggregate_queryId, value) { + if len(x.QueryId) != 0 { + value := protoreflect.ValueOfBytes(x.QueryId) + if !f(fd_Aggregate_query_id, value) { return } } @@ -236,8 +236,8 @@ func (x *fastReflection_Aggregate) Range(f func(protoreflect.FieldDescriptor, pr // a repeated field is populated if it is non-empty. func (x *fastReflection_Aggregate) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.oracle.Aggregate.queryId": - return x.QueryId != "" + case "layer.oracle.Aggregate.query_id": + return len(x.QueryId) != 0 case "layer.oracle.Aggregate.aggregateValue": return x.AggregateValue != "" case "layer.oracle.Aggregate.aggregateReporter": @@ -272,8 +272,8 @@ func (x *fastReflection_Aggregate) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Aggregate) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.oracle.Aggregate.queryId": - x.QueryId = "" + case "layer.oracle.Aggregate.query_id": + x.QueryId = nil case "layer.oracle.Aggregate.aggregateValue": x.AggregateValue = "" case "layer.oracle.Aggregate.aggregateReporter": @@ -308,9 +308,9 @@ func (x *fastReflection_Aggregate) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Aggregate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.oracle.Aggregate.queryId": + case "layer.oracle.Aggregate.query_id": value := x.QueryId - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) case "layer.oracle.Aggregate.aggregateValue": value := x.AggregateValue return protoreflect.ValueOfString(value) @@ -361,8 +361,8 @@ func (x *fastReflection_Aggregate) Get(descriptor protoreflect.FieldDescriptor) // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Aggregate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.oracle.Aggregate.queryId": - x.QueryId = value.Interface().(string) + case "layer.oracle.Aggregate.query_id": + x.QueryId = value.Bytes() case "layer.oracle.Aggregate.aggregateValue": x.AggregateValue = value.Interface().(string) case "layer.oracle.Aggregate.aggregateReporter": @@ -409,8 +409,8 @@ func (x *fastReflection_Aggregate) Mutable(fd protoreflect.FieldDescriptor) prot } value := &_Aggregate_6_list{list: &x.Reporters} return protoreflect.ValueOfList(value) - case "layer.oracle.Aggregate.queryId": - panic(fmt.Errorf("field queryId of message layer.oracle.Aggregate is not mutable")) + case "layer.oracle.Aggregate.query_id": + panic(fmt.Errorf("field query_id of message layer.oracle.Aggregate is not mutable")) case "layer.oracle.Aggregate.aggregateValue": panic(fmt.Errorf("field aggregateValue of message layer.oracle.Aggregate is not mutable")) case "layer.oracle.Aggregate.aggregateReporter": @@ -440,8 +440,8 @@ func (x *fastReflection_Aggregate) Mutable(fd protoreflect.FieldDescriptor) prot // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Aggregate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.Aggregate.queryId": - return protoreflect.ValueOfString("") + case "layer.oracle.Aggregate.query_id": + return protoreflect.ValueOfBytes(nil) case "layer.oracle.Aggregate.aggregateValue": return protoreflect.ValueOfString("") case "layer.oracle.Aggregate.aggregateReporter": @@ -721,7 +721,7 @@ func (x *fastReflection_Aggregate) ProtoMethods() *protoiface.Methods { if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -731,23 +731,25 @@ func (x *fastReflection_Aggregate) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryId = string(dAtA[iNdEx:postIndex]) + x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) + if x.QueryId == nil { + x.QueryId = []byte{} + } iNdEx = postIndex case 2: if wireType != 2 { @@ -1501,7 +1503,7 @@ type Aggregate struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` AggregateValue string `protobuf:"bytes,2,opt,name=aggregateValue,proto3" json:"aggregateValue,omitempty"` AggregateReporter string `protobuf:"bytes,3,opt,name=aggregateReporter,proto3" json:"aggregateReporter,omitempty"` ReporterPower int64 `protobuf:"varint,4,opt,name=reporterPower,proto3" json:"reporterPower,omitempty"` @@ -1533,11 +1535,11 @@ func (*Aggregate) Descriptor() ([]byte, []int) { return file_layer_oracle_aggregate_proto_rawDescGZIP(), []int{0} } -func (x *Aggregate) GetQueryId() string { +func (x *Aggregate) GetQueryId() []byte { if x != nil { return x.QueryId } - return "" + return nil } func (x *Aggregate) GetAggregateValue() string { @@ -1649,48 +1651,48 @@ var file_layer_oracle_aggregate_proto_rawDesc = []byte{ 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x03, 0x0a, 0x09, 0x41, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x2c, - 0x0a, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, - 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x09, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x41, + 0x72, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x03, 0x0a, 0x09, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x52, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x66, - 0x6c, 0x61, 0x67, 0x67, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, 0x6c, - 0x61, 0x67, 0x67, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x14, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x5b, 0x0a, 0x13, 0x41, 0x76, 0x61, 0x69, 0x6c, - 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, 0x44, - 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, - 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x73, 0x42, 0xa0, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x42, 0x0e, 0x41, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, - 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x4f, 0x58, 0xaa, 0x02, - 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xca, 0x02, 0x0c, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xe2, 0x02, 0x18, 0x4c, - 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, - 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, + 0x2c, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x11, 0x73, 0x74, 0x61, 0x6e, + 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x76, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, + 0x09, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, + 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x72, 0x52, 0x09, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x66, 0x6c, 0x61, 0x67, 0x67, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x66, + 0x6c, 0x61, 0x67, 0x67, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x14, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x5b, 0x0a, 0x13, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x12, + 0x44, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, + 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x73, 0x42, 0xa0, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x42, 0x0e, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, + 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x4f, 0x58, 0xaa, + 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xca, 0x02, + 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xe2, 0x02, 0x18, + 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, + 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/layer/oracle/commit_report.pulsar.go b/api/layer/oracle/commit_report.pulsar.go index 5def88863..23742fe24 100644 --- a/api/layer/oracle/commit_report.pulsar.go +++ b/api/layer/oracle/commit_report.pulsar.go @@ -15,7 +15,7 @@ import ( var ( md_Commit protoreflect.MessageDescriptor fd_Commit_reporter protoreflect.FieldDescriptor - fd_Commit_queryId protoreflect.FieldDescriptor + fd_Commit_query_id protoreflect.FieldDescriptor fd_Commit_hash protoreflect.FieldDescriptor fd_Commit_incycle protoreflect.FieldDescriptor ) @@ -24,7 +24,7 @@ func init() { file_layer_oracle_commit_report_proto_init() md_Commit = File_layer_oracle_commit_report_proto.Messages().ByName("Commit") fd_Commit_reporter = md_Commit.Fields().ByName("reporter") - fd_Commit_queryId = md_Commit.Fields().ByName("queryId") + fd_Commit_query_id = md_Commit.Fields().ByName("query_id") fd_Commit_hash = md_Commit.Fields().ByName("hash") fd_Commit_incycle = md_Commit.Fields().ByName("incycle") } @@ -102,7 +102,7 @@ func (x *fastReflection_Commit) Range(f func(protoreflect.FieldDescriptor, proto } if len(x.QueryId) != 0 { value := protoreflect.ValueOfBytes(x.QueryId) - if !f(fd_Commit_queryId, value) { + if !f(fd_Commit_query_id, value) { return } } @@ -135,7 +135,7 @@ func (x *fastReflection_Commit) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "layer.oracle.Commit.reporter": return x.Reporter != "" - case "layer.oracle.Commit.queryId": + case "layer.oracle.Commit.query_id": return len(x.QueryId) != 0 case "layer.oracle.Commit.hash": return x.Hash != "" @@ -159,7 +159,7 @@ func (x *fastReflection_Commit) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "layer.oracle.Commit.reporter": x.Reporter = "" - case "layer.oracle.Commit.queryId": + case "layer.oracle.Commit.query_id": x.QueryId = nil case "layer.oracle.Commit.hash": x.Hash = "" @@ -184,7 +184,7 @@ func (x *fastReflection_Commit) Get(descriptor protoreflect.FieldDescriptor) pro case "layer.oracle.Commit.reporter": value := x.Reporter return protoreflect.ValueOfString(value) - case "layer.oracle.Commit.queryId": + case "layer.oracle.Commit.query_id": value := x.QueryId return protoreflect.ValueOfBytes(value) case "layer.oracle.Commit.hash": @@ -215,7 +215,7 @@ func (x *fastReflection_Commit) Set(fd protoreflect.FieldDescriptor, value proto switch fd.FullName() { case "layer.oracle.Commit.reporter": x.Reporter = value.Interface().(string) - case "layer.oracle.Commit.queryId": + case "layer.oracle.Commit.query_id": x.QueryId = value.Bytes() case "layer.oracle.Commit.hash": x.Hash = value.Interface().(string) @@ -243,8 +243,8 @@ func (x *fastReflection_Commit) Mutable(fd protoreflect.FieldDescriptor) protore switch fd.FullName() { case "layer.oracle.Commit.reporter": panic(fmt.Errorf("field reporter of message layer.oracle.Commit is not mutable")) - case "layer.oracle.Commit.queryId": - panic(fmt.Errorf("field queryId of message layer.oracle.Commit is not mutable")) + case "layer.oracle.Commit.query_id": + panic(fmt.Errorf("field query_id of message layer.oracle.Commit is not mutable")) case "layer.oracle.Commit.hash": panic(fmt.Errorf("field hash of message layer.oracle.Commit is not mutable")) case "layer.oracle.Commit.incycle": @@ -264,7 +264,7 @@ func (x *fastReflection_Commit) NewField(fd protoreflect.FieldDescriptor) protor switch fd.FullName() { case "layer.oracle.Commit.reporter": return protoreflect.ValueOfString("") - case "layer.oracle.Commit.queryId": + case "layer.oracle.Commit.query_id": return protoreflect.ValueOfBytes(nil) case "layer.oracle.Commit.hash": return protoreflect.ValueOfString("") @@ -635,7 +635,7 @@ type Commit struct { unknownFields protoimpl.UnknownFields Reporter string `protobuf:"bytes,1,opt,name=reporter,proto3" json:"reporter,omitempty"` - QueryId []byte `protobuf:"bytes,2,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,2,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` Incycle bool `protobuf:"varint,4,opt,name=incycle,proto3" json:"incycle,omitempty"` } @@ -695,25 +695,25 @@ var file_layer_oracle_commit_report_proto_rawDesc = []byte{ 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x1a, 0x15, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x74, - 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6c, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x69, + 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6d, 0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, - 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x69, - 0x6e, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x6e, - 0x63, 0x79, 0x63, 0x6c, 0x65, 0x42, 0xa3, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x42, 0x11, 0x43, 0x6f, 0x6d, 0x6d, - 0x69, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, - 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xa2, 0x02, 0x03, 0x4c, - 0x4f, 0x58, 0xaa, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0xca, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0xe2, 0x02, 0x18, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, - 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x18, 0x0a, 0x07, + 0x69, 0x6e, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, + 0x6e, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x42, 0xa3, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x42, 0x11, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, + 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xa2, 0x02, 0x03, + 0x4c, 0x4f, 0x58, 0xaa, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0xca, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0xe2, 0x02, 0x18, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, + 0x61, 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/layer/oracle/genesis.pulsar.go b/api/layer/oracle/genesis.pulsar.go index 5987f3ac9..65bb21f38 100644 --- a/api/layer/oracle/genesis.pulsar.go +++ b/api/layer/oracle/genesis.pulsar.go @@ -16,7 +16,7 @@ import ( var _ protoreflect.List = (*_GenesisState_2_list)(nil) type _GenesisState_2_list struct { - list *[]string + list *[][]byte } func (x *_GenesisState_2_list) Len() int { @@ -27,17 +27,17 @@ func (x *_GenesisState_2_list) Len() int { } func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) + return protoreflect.ValueOfBytes((*x.list)[i]) } func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() + valueUnwrapped := value.Bytes() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } func (x *_GenesisState_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() + valueUnwrapped := value.Bytes() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } @@ -51,8 +51,8 @@ func (x *_GenesisState_2_list) Truncate(n int) { } func (x *_GenesisState_2_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) + var v []byte + return protoreflect.ValueOfBytes(v) } func (x *_GenesisState_2_list) IsValid() bool { @@ -266,7 +266,7 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "layer.oracle.GenesisState.cyclelist": if x.Cyclelist == nil { - x.Cyclelist = []string{} + x.Cyclelist = [][]byte{} } value := &_GenesisState_2_list{list: &x.Cyclelist} return protoreflect.ValueOfList(value) @@ -287,7 +287,7 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "layer.oracle.GenesisState.cyclelist": - list := []string{} + list := [][]byte{} return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) default: if fd.IsExtension() { @@ -363,8 +363,8 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Cyclelist) > 0 { - for _, s := range x.Cyclelist { - l = len(s) + for _, b := range x.Cyclelist { + l = len(b) n += 1 + l + runtime.Sov(uint64(l)) } } @@ -509,7 +509,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cyclelist", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -519,23 +519,23 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.Cyclelist = append(x.Cyclelist, string(dAtA[iNdEx:postIndex])) + x.Cyclelist = append(x.Cyclelist, make([]byte, postIndex-iNdEx)) + copy(x.Cyclelist[len(x.Cyclelist)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -592,7 +592,7 @@ type GenesisState struct { unknownFields protoimpl.UnknownFields Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - Cyclelist []string `protobuf:"bytes,2,rep,name=cyclelist,proto3" json:"cyclelist,omitempty"` + Cyclelist [][]byte `protobuf:"bytes,2,rep,name=cyclelist,proto3" json:"cyclelist,omitempty"` } func (x *GenesisState) Reset() { @@ -622,7 +622,7 @@ func (x *GenesisState) GetParams() *Params { return nil } -func (x *GenesisState) GetCyclelist() []string { +func (x *GenesisState) GetCyclelist() [][]byte { if x != nil { return x.Cyclelist } @@ -643,7 +643,7 @@ var file_layer_oracle_genesis_proto_rawDesc = []byte{ 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x09, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x6c, + 0x28, 0x0c, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x09, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x9e, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, diff --git a/api/layer/oracle/micro_report.pulsar.go b/api/layer/oracle/micro_report.pulsar.go index 0baef9c7a..b97e1062c 100644 --- a/api/layer/oracle/micro_report.pulsar.go +++ b/api/layer/oracle/micro_report.pulsar.go @@ -124,8 +124,8 @@ func (x *fastReflection_MicroReport) Range(f func(protoreflect.FieldDescriptor, return } } - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) + if len(x.QueryId) != 0 { + value := protoreflect.ValueOfBytes(x.QueryId) if !f(fd_MicroReport_query_id, value) { return } @@ -182,7 +182,7 @@ func (x *fastReflection_MicroReport) Has(fd protoreflect.FieldDescriptor) bool { case "layer.oracle.MicroReport.query_type": return x.QueryType != "" case "layer.oracle.MicroReport.query_id": - return x.QueryId != "" + return len(x.QueryId) != 0 case "layer.oracle.MicroReport.aggregate_method": return x.AggregateMethod != "" case "layer.oracle.MicroReport.value": @@ -216,7 +216,7 @@ func (x *fastReflection_MicroReport) Clear(fd protoreflect.FieldDescriptor) { case "layer.oracle.MicroReport.query_type": x.QueryType = "" case "layer.oracle.MicroReport.query_id": - x.QueryId = "" + x.QueryId = nil case "layer.oracle.MicroReport.aggregate_method": x.AggregateMethod = "" case "layer.oracle.MicroReport.value": @@ -254,7 +254,7 @@ func (x *fastReflection_MicroReport) Get(descriptor protoreflect.FieldDescriptor return protoreflect.ValueOfString(value) case "layer.oracle.MicroReport.query_id": value := x.QueryId - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) case "layer.oracle.MicroReport.aggregate_method": value := x.AggregateMethod return protoreflect.ValueOfString(value) @@ -297,7 +297,7 @@ func (x *fastReflection_MicroReport) Set(fd protoreflect.FieldDescriptor, value case "layer.oracle.MicroReport.query_type": x.QueryType = value.Interface().(string) case "layer.oracle.MicroReport.query_id": - x.QueryId = value.Interface().(string) + x.QueryId = value.Bytes() case "layer.oracle.MicroReport.aggregate_method": x.AggregateMethod = value.Interface().(string) case "layer.oracle.MicroReport.value": @@ -369,7 +369,7 @@ func (x *fastReflection_MicroReport) NewField(fd protoreflect.FieldDescriptor) p case "layer.oracle.MicroReport.query_type": return protoreflect.ValueOfString("") case "layer.oracle.MicroReport.query_id": - return protoreflect.ValueOfString("") + return protoreflect.ValueOfBytes(nil) case "layer.oracle.MicroReport.aggregate_method": return protoreflect.ValueOfString("") case "layer.oracle.MicroReport.value": @@ -717,7 +717,7 @@ func (x *fastReflection_MicroReport) ProtoMethods() *protoiface.Methods { if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -727,23 +727,25 @@ func (x *fastReflection_MicroReport) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryId = string(dAtA[iNdEx:postIndex]) + x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) + if x.QueryId == nil { + x.QueryId = []byte{} + } iNdEx = postIndex case 5: if wireType != 2 { @@ -945,7 +947,7 @@ type MicroReport struct { // string identifier of the data spec QueryType string `protobuf:"bytes,3,opt,name=query_type,json=queryType,proto3" json:"query_type,omitempty"` // hash of the query data - QueryId string `protobuf:"bytes,4,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` + QueryId []byte `protobuf:"bytes,4,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` // aggregate method to use for aggregating all the reports for the query id AggregateMethod string `protobuf:"bytes,5,opt,name=aggregate_method,json=aggregateMethod,proto3" json:"aggregate_method,omitempty"` // hex string of the response value @@ -999,11 +1001,11 @@ func (x *MicroReport) GetQueryType() string { return "" } -func (x *MicroReport) GetQueryId() string { +func (x *MicroReport) GetQueryId() []byte { if x != nil { return x.QueryId } - return "" + return nil } func (x *MicroReport) GetAggregateMethod() string { @@ -1057,7 +1059,7 @@ var file_layer_oracle_micro_report_proto_rawDesc = []byte{ 0x03, 0x52, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x14, 0x0a, diff --git a/api/layer/oracle/query.pulsar.go b/api/layer/oracle/query.pulsar.go index 9737ee0f6..dcd3414ad 100644 --- a/api/layer/oracle/query.pulsar.go +++ b/api/layer/oracle/query.pulsar.go @@ -809,14 +809,14 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } var ( - md_QueryGetReportsbyQidRequest protoreflect.MessageDescriptor - fd_QueryGetReportsbyQidRequest_queryId protoreflect.FieldDescriptor + md_QueryGetReportsbyQidRequest protoreflect.MessageDescriptor + fd_QueryGetReportsbyQidRequest_query_id protoreflect.FieldDescriptor ) func init() { file_layer_oracle_query_proto_init() md_QueryGetReportsbyQidRequest = File_layer_oracle_query_proto.Messages().ByName("QueryGetReportsbyQidRequest") - fd_QueryGetReportsbyQidRequest_queryId = md_QueryGetReportsbyQidRequest.Fields().ByName("queryId") + fd_QueryGetReportsbyQidRequest_query_id = md_QueryGetReportsbyQidRequest.Fields().ByName("query_id") } var _ protoreflect.Message = (*fastReflection_QueryGetReportsbyQidRequest)(nil) @@ -884,9 +884,9 @@ func (x *fastReflection_QueryGetReportsbyQidRequest) Interface() protoreflect.Pr // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryGetReportsbyQidRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) - if !f(fd_QueryGetReportsbyQidRequest_queryId, value) { + if len(x.QueryId) != 0 { + value := protoreflect.ValueOfBytes(x.QueryId) + if !f(fd_QueryGetReportsbyQidRequest_query_id, value) { return } } @@ -905,8 +905,8 @@ func (x *fastReflection_QueryGetReportsbyQidRequest) Range(f func(protoreflect.F // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryGetReportsbyQidRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.oracle.QueryGetReportsbyQidRequest.queryId": - return x.QueryId != "" + case "layer.oracle.QueryGetReportsbyQidRequest.query_id": + return len(x.QueryId) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetReportsbyQidRequest")) @@ -923,8 +923,8 @@ func (x *fastReflection_QueryGetReportsbyQidRequest) Has(fd protoreflect.FieldDe // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetReportsbyQidRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.oracle.QueryGetReportsbyQidRequest.queryId": - x.QueryId = "" + case "layer.oracle.QueryGetReportsbyQidRequest.query_id": + x.QueryId = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetReportsbyQidRequest")) @@ -941,9 +941,9 @@ func (x *fastReflection_QueryGetReportsbyQidRequest) Clear(fd protoreflect.Field // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryGetReportsbyQidRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.oracle.QueryGetReportsbyQidRequest.queryId": + case "layer.oracle.QueryGetReportsbyQidRequest.query_id": value := x.QueryId - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetReportsbyQidRequest")) @@ -964,8 +964,8 @@ func (x *fastReflection_QueryGetReportsbyQidRequest) Get(descriptor protoreflect // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetReportsbyQidRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.oracle.QueryGetReportsbyQidRequest.queryId": - x.QueryId = value.Interface().(string) + case "layer.oracle.QueryGetReportsbyQidRequest.query_id": + x.QueryId = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetReportsbyQidRequest")) @@ -986,8 +986,8 @@ func (x *fastReflection_QueryGetReportsbyQidRequest) Set(fd protoreflect.FieldDe // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetReportsbyQidRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.QueryGetReportsbyQidRequest.queryId": - panic(fmt.Errorf("field queryId of message layer.oracle.QueryGetReportsbyQidRequest is not mutable")) + case "layer.oracle.QueryGetReportsbyQidRequest.query_id": + panic(fmt.Errorf("field query_id of message layer.oracle.QueryGetReportsbyQidRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetReportsbyQidRequest")) @@ -1001,8 +1001,8 @@ func (x *fastReflection_QueryGetReportsbyQidRequest) Mutable(fd protoreflect.Fie // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryGetReportsbyQidRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.QueryGetReportsbyQidRequest.queryId": - return protoreflect.ValueOfString("") + case "layer.oracle.QueryGetReportsbyQidRequest.query_id": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetReportsbyQidRequest")) @@ -1165,7 +1165,7 @@ func (x *fastReflection_QueryGetReportsbyQidRequest) ProtoMethods() *protoiface. if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1175,23 +1175,25 @@ func (x *fastReflection_QueryGetReportsbyQidRequest) ProtoMethods() *protoiface. } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryId = string(dAtA[iNdEx:postIndex]) + x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) + if x.QueryId == nil { + x.QueryId = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -2580,14 +2582,14 @@ func (x *fastReflection_QueryGetReportsbyReporterResponse) ProtoMethods() *proto var ( md_QueryGetReportsbyReporterQidRequest protoreflect.MessageDescriptor fd_QueryGetReportsbyReporterQidRequest_reporter protoreflect.FieldDescriptor - fd_QueryGetReportsbyReporterQidRequest_queryId protoreflect.FieldDescriptor + fd_QueryGetReportsbyReporterQidRequest_query_id protoreflect.FieldDescriptor ) func init() { file_layer_oracle_query_proto_init() md_QueryGetReportsbyReporterQidRequest = File_layer_oracle_query_proto.Messages().ByName("QueryGetReportsbyReporterQidRequest") fd_QueryGetReportsbyReporterQidRequest_reporter = md_QueryGetReportsbyReporterQidRequest.Fields().ByName("reporter") - fd_QueryGetReportsbyReporterQidRequest_queryId = md_QueryGetReportsbyReporterQidRequest.Fields().ByName("queryId") + fd_QueryGetReportsbyReporterQidRequest_query_id = md_QueryGetReportsbyReporterQidRequest.Fields().ByName("query_id") } var _ protoreflect.Message = (*fastReflection_QueryGetReportsbyReporterQidRequest)(nil) @@ -2661,9 +2663,9 @@ func (x *fastReflection_QueryGetReportsbyReporterQidRequest) Range(f func(protor return } } - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) - if !f(fd_QueryGetReportsbyReporterQidRequest_queryId, value) { + if len(x.QueryId) != 0 { + value := protoreflect.ValueOfBytes(x.QueryId) + if !f(fd_QueryGetReportsbyReporterQidRequest_query_id, value) { return } } @@ -2684,8 +2686,8 @@ func (x *fastReflection_QueryGetReportsbyReporterQidRequest) Has(fd protoreflect switch fd.FullName() { case "layer.oracle.QueryGetReportsbyReporterQidRequest.reporter": return x.Reporter != "" - case "layer.oracle.QueryGetReportsbyReporterQidRequest.queryId": - return x.QueryId != "" + case "layer.oracle.QueryGetReportsbyReporterQidRequest.query_id": + return len(x.QueryId) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetReportsbyReporterQidRequest")) @@ -2704,8 +2706,8 @@ func (x *fastReflection_QueryGetReportsbyReporterQidRequest) Clear(fd protorefle switch fd.FullName() { case "layer.oracle.QueryGetReportsbyReporterQidRequest.reporter": x.Reporter = "" - case "layer.oracle.QueryGetReportsbyReporterQidRequest.queryId": - x.QueryId = "" + case "layer.oracle.QueryGetReportsbyReporterQidRequest.query_id": + x.QueryId = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetReportsbyReporterQidRequest")) @@ -2725,9 +2727,9 @@ func (x *fastReflection_QueryGetReportsbyReporterQidRequest) Get(descriptor prot case "layer.oracle.QueryGetReportsbyReporterQidRequest.reporter": value := x.Reporter return protoreflect.ValueOfString(value) - case "layer.oracle.QueryGetReportsbyReporterQidRequest.queryId": + case "layer.oracle.QueryGetReportsbyReporterQidRequest.query_id": value := x.QueryId - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetReportsbyReporterQidRequest")) @@ -2750,8 +2752,8 @@ func (x *fastReflection_QueryGetReportsbyReporterQidRequest) Set(fd protoreflect switch fd.FullName() { case "layer.oracle.QueryGetReportsbyReporterQidRequest.reporter": x.Reporter = value.Interface().(string) - case "layer.oracle.QueryGetReportsbyReporterQidRequest.queryId": - x.QueryId = value.Interface().(string) + case "layer.oracle.QueryGetReportsbyReporterQidRequest.query_id": + x.QueryId = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetReportsbyReporterQidRequest")) @@ -2774,8 +2776,8 @@ func (x *fastReflection_QueryGetReportsbyReporterQidRequest) Mutable(fd protoref switch fd.FullName() { case "layer.oracle.QueryGetReportsbyReporterQidRequest.reporter": panic(fmt.Errorf("field reporter of message layer.oracle.QueryGetReportsbyReporterQidRequest is not mutable")) - case "layer.oracle.QueryGetReportsbyReporterQidRequest.queryId": - panic(fmt.Errorf("field queryId of message layer.oracle.QueryGetReportsbyReporterQidRequest is not mutable")) + case "layer.oracle.QueryGetReportsbyReporterQidRequest.query_id": + panic(fmt.Errorf("field query_id of message layer.oracle.QueryGetReportsbyReporterQidRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetReportsbyReporterQidRequest")) @@ -2791,8 +2793,8 @@ func (x *fastReflection_QueryGetReportsbyReporterQidRequest) NewField(fd protore switch fd.FullName() { case "layer.oracle.QueryGetReportsbyReporterQidRequest.reporter": return protoreflect.ValueOfString("") - case "layer.oracle.QueryGetReportsbyReporterQidRequest.queryId": - return protoreflect.ValueOfString("") + case "layer.oracle.QueryGetReportsbyReporterQidRequest.query_id": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetReportsbyReporterQidRequest")) @@ -2998,7 +3000,7 @@ func (x *fastReflection_QueryGetReportsbyReporterQidRequest) ProtoMethods() *pro if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3008,23 +3010,25 @@ func (x *fastReflection_QueryGetReportsbyReporterQidRequest) ProtoMethods() *pro } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryId = string(dAtA[iNdEx:postIndex]) + x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) + if x.QueryId == nil { + x.QueryId = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -3062,14 +3066,14 @@ func (x *fastReflection_QueryGetReportsbyReporterQidRequest) ProtoMethods() *pro } var ( - md_QueryGetCurrentTipRequest protoreflect.MessageDescriptor - fd_QueryGetCurrentTipRequest_queryData protoreflect.FieldDescriptor + md_QueryGetCurrentTipRequest protoreflect.MessageDescriptor + fd_QueryGetCurrentTipRequest_query_data protoreflect.FieldDescriptor ) func init() { file_layer_oracle_query_proto_init() md_QueryGetCurrentTipRequest = File_layer_oracle_query_proto.Messages().ByName("QueryGetCurrentTipRequest") - fd_QueryGetCurrentTipRequest_queryData = md_QueryGetCurrentTipRequest.Fields().ByName("queryData") + fd_QueryGetCurrentTipRequest_query_data = md_QueryGetCurrentTipRequest.Fields().ByName("query_data") } var _ protoreflect.Message = (*fastReflection_QueryGetCurrentTipRequest)(nil) @@ -3137,9 +3141,9 @@ func (x *fastReflection_QueryGetCurrentTipRequest) Interface() protoreflect.Prot // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryGetCurrentTipRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.QueryData != "" { - value := protoreflect.ValueOfString(x.QueryData) - if !f(fd_QueryGetCurrentTipRequest_queryData, value) { + if len(x.QueryData) != 0 { + value := protoreflect.ValueOfBytes(x.QueryData) + if !f(fd_QueryGetCurrentTipRequest_query_data, value) { return } } @@ -3158,8 +3162,8 @@ func (x *fastReflection_QueryGetCurrentTipRequest) Range(f func(protoreflect.Fie // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryGetCurrentTipRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.oracle.QueryGetCurrentTipRequest.queryData": - return x.QueryData != "" + case "layer.oracle.QueryGetCurrentTipRequest.query_data": + return len(x.QueryData) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetCurrentTipRequest")) @@ -3176,8 +3180,8 @@ func (x *fastReflection_QueryGetCurrentTipRequest) Has(fd protoreflect.FieldDesc // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetCurrentTipRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.oracle.QueryGetCurrentTipRequest.queryData": - x.QueryData = "" + case "layer.oracle.QueryGetCurrentTipRequest.query_data": + x.QueryData = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetCurrentTipRequest")) @@ -3194,9 +3198,9 @@ func (x *fastReflection_QueryGetCurrentTipRequest) Clear(fd protoreflect.FieldDe // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryGetCurrentTipRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.oracle.QueryGetCurrentTipRequest.queryData": + case "layer.oracle.QueryGetCurrentTipRequest.query_data": value := x.QueryData - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetCurrentTipRequest")) @@ -3217,8 +3221,8 @@ func (x *fastReflection_QueryGetCurrentTipRequest) Get(descriptor protoreflect.F // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetCurrentTipRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.oracle.QueryGetCurrentTipRequest.queryData": - x.QueryData = value.Interface().(string) + case "layer.oracle.QueryGetCurrentTipRequest.query_data": + x.QueryData = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetCurrentTipRequest")) @@ -3239,8 +3243,8 @@ func (x *fastReflection_QueryGetCurrentTipRequest) Set(fd protoreflect.FieldDesc // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetCurrentTipRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.QueryGetCurrentTipRequest.queryData": - panic(fmt.Errorf("field queryData of message layer.oracle.QueryGetCurrentTipRequest is not mutable")) + case "layer.oracle.QueryGetCurrentTipRequest.query_data": + panic(fmt.Errorf("field query_data of message layer.oracle.QueryGetCurrentTipRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetCurrentTipRequest")) @@ -3254,8 +3258,8 @@ func (x *fastReflection_QueryGetCurrentTipRequest) Mutable(fd protoreflect.Field // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryGetCurrentTipRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.QueryGetCurrentTipRequest.queryData": - return protoreflect.ValueOfString("") + case "layer.oracle.QueryGetCurrentTipRequest.query_data": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetCurrentTipRequest")) @@ -3418,7 +3422,7 @@ func (x *fastReflection_QueryGetCurrentTipRequest) ProtoMethods() *protoiface.Me if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3428,23 +3432,25 @@ func (x *fastReflection_QueryGetCurrentTipRequest) ProtoMethods() *protoiface.Me } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryData = string(dAtA[iNdEx:postIndex]) + x.QueryData = append(x.QueryData[:0], dAtA[iNdEx:postIndex]...) + if x.QueryData == nil { + x.QueryData = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -3917,16 +3923,16 @@ func (x *fastReflection_QueryGetCurrentTipResponse) ProtoMethods() *protoiface.M } var ( - md_QueryGetUserTipTotalRequest protoreflect.MessageDescriptor - fd_QueryGetUserTipTotalRequest_tipper protoreflect.FieldDescriptor - fd_QueryGetUserTipTotalRequest_queryData protoreflect.FieldDescriptor + md_QueryGetUserTipTotalRequest protoreflect.MessageDescriptor + fd_QueryGetUserTipTotalRequest_tipper protoreflect.FieldDescriptor + fd_QueryGetUserTipTotalRequest_query_data protoreflect.FieldDescriptor ) func init() { file_layer_oracle_query_proto_init() md_QueryGetUserTipTotalRequest = File_layer_oracle_query_proto.Messages().ByName("QueryGetUserTipTotalRequest") fd_QueryGetUserTipTotalRequest_tipper = md_QueryGetUserTipTotalRequest.Fields().ByName("tipper") - fd_QueryGetUserTipTotalRequest_queryData = md_QueryGetUserTipTotalRequest.Fields().ByName("queryData") + fd_QueryGetUserTipTotalRequest_query_data = md_QueryGetUserTipTotalRequest.Fields().ByName("query_data") } var _ protoreflect.Message = (*fastReflection_QueryGetUserTipTotalRequest)(nil) @@ -4000,9 +4006,9 @@ func (x *fastReflection_QueryGetUserTipTotalRequest) Range(f func(protoreflect.F return } } - if x.QueryData != "" { - value := protoreflect.ValueOfString(x.QueryData) - if !f(fd_QueryGetUserTipTotalRequest_queryData, value) { + if len(x.QueryData) != 0 { + value := protoreflect.ValueOfBytes(x.QueryData) + if !f(fd_QueryGetUserTipTotalRequest_query_data, value) { return } } @@ -4023,8 +4029,8 @@ func (x *fastReflection_QueryGetUserTipTotalRequest) Has(fd protoreflect.FieldDe switch fd.FullName() { case "layer.oracle.QueryGetUserTipTotalRequest.tipper": return x.Tipper != "" - case "layer.oracle.QueryGetUserTipTotalRequest.queryData": - return x.QueryData != "" + case "layer.oracle.QueryGetUserTipTotalRequest.query_data": + return len(x.QueryData) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetUserTipTotalRequest")) @@ -4043,8 +4049,8 @@ func (x *fastReflection_QueryGetUserTipTotalRequest) Clear(fd protoreflect.Field switch fd.FullName() { case "layer.oracle.QueryGetUserTipTotalRequest.tipper": x.Tipper = "" - case "layer.oracle.QueryGetUserTipTotalRequest.queryData": - x.QueryData = "" + case "layer.oracle.QueryGetUserTipTotalRequest.query_data": + x.QueryData = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetUserTipTotalRequest")) @@ -4064,9 +4070,9 @@ func (x *fastReflection_QueryGetUserTipTotalRequest) Get(descriptor protoreflect case "layer.oracle.QueryGetUserTipTotalRequest.tipper": value := x.Tipper return protoreflect.ValueOfString(value) - case "layer.oracle.QueryGetUserTipTotalRequest.queryData": + case "layer.oracle.QueryGetUserTipTotalRequest.query_data": value := x.QueryData - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetUserTipTotalRequest")) @@ -4089,8 +4095,8 @@ func (x *fastReflection_QueryGetUserTipTotalRequest) Set(fd protoreflect.FieldDe switch fd.FullName() { case "layer.oracle.QueryGetUserTipTotalRequest.tipper": x.Tipper = value.Interface().(string) - case "layer.oracle.QueryGetUserTipTotalRequest.queryData": - x.QueryData = value.Interface().(string) + case "layer.oracle.QueryGetUserTipTotalRequest.query_data": + x.QueryData = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetUserTipTotalRequest")) @@ -4113,8 +4119,8 @@ func (x *fastReflection_QueryGetUserTipTotalRequest) Mutable(fd protoreflect.Fie switch fd.FullName() { case "layer.oracle.QueryGetUserTipTotalRequest.tipper": panic(fmt.Errorf("field tipper of message layer.oracle.QueryGetUserTipTotalRequest is not mutable")) - case "layer.oracle.QueryGetUserTipTotalRequest.queryData": - panic(fmt.Errorf("field queryData of message layer.oracle.QueryGetUserTipTotalRequest is not mutable")) + case "layer.oracle.QueryGetUserTipTotalRequest.query_data": + panic(fmt.Errorf("field query_data of message layer.oracle.QueryGetUserTipTotalRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetUserTipTotalRequest")) @@ -4130,8 +4136,8 @@ func (x *fastReflection_QueryGetUserTipTotalRequest) NewField(fd protoreflect.Fi switch fd.FullName() { case "layer.oracle.QueryGetUserTipTotalRequest.tipper": return protoreflect.ValueOfString("") - case "layer.oracle.QueryGetUserTipTotalRequest.queryData": - return protoreflect.ValueOfString("") + case "layer.oracle.QueryGetUserTipTotalRequest.query_data": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetUserTipTotalRequest")) @@ -4337,7 +4343,7 @@ func (x *fastReflection_QueryGetUserTipTotalRequest) ProtoMethods() *protoiface. if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4347,23 +4353,25 @@ func (x *fastReflection_QueryGetUserTipTotalRequest) ProtoMethods() *protoiface. } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryData = string(dAtA[iNdEx:postIndex]) + x.QueryData = append(x.QueryData[:0], dAtA[iNdEx:postIndex]...) + if x.QueryData == nil { + x.QueryData = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -4836,14 +4844,14 @@ func (x *fastReflection_QueryGetUserTipTotalResponse) ProtoMethods() *protoiface } var ( - md_QueryGetCurrentAggregatedReportRequest protoreflect.MessageDescriptor - fd_QueryGetCurrentAggregatedReportRequest_queryId protoreflect.FieldDescriptor + md_QueryGetCurrentAggregatedReportRequest protoreflect.MessageDescriptor + fd_QueryGetCurrentAggregatedReportRequest_query_id protoreflect.FieldDescriptor ) func init() { file_layer_oracle_query_proto_init() md_QueryGetCurrentAggregatedReportRequest = File_layer_oracle_query_proto.Messages().ByName("QueryGetCurrentAggregatedReportRequest") - fd_QueryGetCurrentAggregatedReportRequest_queryId = md_QueryGetCurrentAggregatedReportRequest.Fields().ByName("queryId") + fd_QueryGetCurrentAggregatedReportRequest_query_id = md_QueryGetCurrentAggregatedReportRequest.Fields().ByName("query_id") } var _ protoreflect.Message = (*fastReflection_QueryGetCurrentAggregatedReportRequest)(nil) @@ -4911,9 +4919,9 @@ func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Interface() prot // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) - if !f(fd_QueryGetCurrentAggregatedReportRequest_queryId, value) { + if len(x.QueryId) != 0 { + value := protoreflect.ValueOfBytes(x.QueryId) + if !f(fd_QueryGetCurrentAggregatedReportRequest_query_id, value) { return } } @@ -4932,8 +4940,8 @@ func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Range(f func(pro // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.oracle.QueryGetCurrentAggregatedReportRequest.queryId": - return x.QueryId != "" + case "layer.oracle.QueryGetCurrentAggregatedReportRequest.query_id": + return len(x.QueryId) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetCurrentAggregatedReportRequest")) @@ -4950,8 +4958,8 @@ func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Has(fd protorefl // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.oracle.QueryGetCurrentAggregatedReportRequest.queryId": - x.QueryId = "" + case "layer.oracle.QueryGetCurrentAggregatedReportRequest.query_id": + x.QueryId = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetCurrentAggregatedReportRequest")) @@ -4968,9 +4976,9 @@ func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Clear(fd protore // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.oracle.QueryGetCurrentAggregatedReportRequest.queryId": + case "layer.oracle.QueryGetCurrentAggregatedReportRequest.query_id": value := x.QueryId - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetCurrentAggregatedReportRequest")) @@ -4991,8 +4999,8 @@ func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Get(descriptor p // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.oracle.QueryGetCurrentAggregatedReportRequest.queryId": - x.QueryId = value.Interface().(string) + case "layer.oracle.QueryGetCurrentAggregatedReportRequest.query_id": + x.QueryId = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetCurrentAggregatedReportRequest")) @@ -5013,8 +5021,8 @@ func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Set(fd protorefl // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.QueryGetCurrentAggregatedReportRequest.queryId": - panic(fmt.Errorf("field queryId of message layer.oracle.QueryGetCurrentAggregatedReportRequest is not mutable")) + case "layer.oracle.QueryGetCurrentAggregatedReportRequest.query_id": + panic(fmt.Errorf("field query_id of message layer.oracle.QueryGetCurrentAggregatedReportRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetCurrentAggregatedReportRequest")) @@ -5028,8 +5036,8 @@ func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) Mutable(fd proto // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.QueryGetCurrentAggregatedReportRequest.queryId": - return protoreflect.ValueOfString("") + case "layer.oracle.QueryGetCurrentAggregatedReportRequest.query_id": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryGetCurrentAggregatedReportRequest")) @@ -5192,7 +5200,7 @@ func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) ProtoMethods() * if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -5202,23 +5210,25 @@ func (x *fastReflection_QueryGetCurrentAggregatedReportRequest) ProtoMethods() * } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryId = string(dAtA[iNdEx:postIndex]) + x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) + if x.QueryId == nil { + x.QueryId = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -5692,14 +5702,14 @@ func (x *fastReflection_QueryGetAggregatedReportResponse) ProtoMethods() *protoi var ( md_QueryGetDataBeforeRequest protoreflect.MessageDescriptor - fd_QueryGetDataBeforeRequest_queryId protoreflect.FieldDescriptor + fd_QueryGetDataBeforeRequest_query_id protoreflect.FieldDescriptor fd_QueryGetDataBeforeRequest_timestamp protoreflect.FieldDescriptor ) func init() { file_layer_oracle_query_proto_init() md_QueryGetDataBeforeRequest = File_layer_oracle_query_proto.Messages().ByName("QueryGetDataBeforeRequest") - fd_QueryGetDataBeforeRequest_queryId = md_QueryGetDataBeforeRequest.Fields().ByName("queryId") + fd_QueryGetDataBeforeRequest_query_id = md_QueryGetDataBeforeRequest.Fields().ByName("query_id") fd_QueryGetDataBeforeRequest_timestamp = md_QueryGetDataBeforeRequest.Fields().ByName("timestamp") } @@ -5768,9 +5778,9 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Interface() protoreflect.Prot // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryGetDataBeforeRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) - if !f(fd_QueryGetDataBeforeRequest_queryId, value) { + if len(x.QueryId) != 0 { + value := protoreflect.ValueOfBytes(x.QueryId) + if !f(fd_QueryGetDataBeforeRequest_query_id, value) { return } } @@ -5795,8 +5805,8 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Range(f func(protoreflect.Fie // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryGetDataBeforeRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.oracle.QueryGetDataBeforeRequest.queryId": - return x.QueryId != "" + case "layer.oracle.QueryGetDataBeforeRequest.query_id": + return len(x.QueryId) != 0 case "layer.oracle.QueryGetDataBeforeRequest.timestamp": return x.Timestamp != int64(0) default: @@ -5815,8 +5825,8 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Has(fd protoreflect.FieldDesc // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetDataBeforeRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.oracle.QueryGetDataBeforeRequest.queryId": - x.QueryId = "" + case "layer.oracle.QueryGetDataBeforeRequest.query_id": + x.QueryId = nil case "layer.oracle.QueryGetDataBeforeRequest.timestamp": x.Timestamp = int64(0) default: @@ -5835,9 +5845,9 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Clear(fd protoreflect.FieldDe // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryGetDataBeforeRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.oracle.QueryGetDataBeforeRequest.queryId": + case "layer.oracle.QueryGetDataBeforeRequest.query_id": value := x.QueryId - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) case "layer.oracle.QueryGetDataBeforeRequest.timestamp": value := x.Timestamp return protoreflect.ValueOfInt64(value) @@ -5861,8 +5871,8 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Get(descriptor protoreflect.F // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetDataBeforeRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.oracle.QueryGetDataBeforeRequest.queryId": - x.QueryId = value.Interface().(string) + case "layer.oracle.QueryGetDataBeforeRequest.query_id": + x.QueryId = value.Bytes() case "layer.oracle.QueryGetDataBeforeRequest.timestamp": x.Timestamp = value.Int() default: @@ -5885,8 +5895,8 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Set(fd protoreflect.FieldDesc // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGetDataBeforeRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.QueryGetDataBeforeRequest.queryId": - panic(fmt.Errorf("field queryId of message layer.oracle.QueryGetDataBeforeRequest is not mutable")) + case "layer.oracle.QueryGetDataBeforeRequest.query_id": + panic(fmt.Errorf("field query_id of message layer.oracle.QueryGetDataBeforeRequest is not mutable")) case "layer.oracle.QueryGetDataBeforeRequest.timestamp": panic(fmt.Errorf("field timestamp of message layer.oracle.QueryGetDataBeforeRequest is not mutable")) default: @@ -5902,8 +5912,8 @@ func (x *fastReflection_QueryGetDataBeforeRequest) Mutable(fd protoreflect.Field // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryGetDataBeforeRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.QueryGetDataBeforeRequest.queryId": - return protoreflect.ValueOfString("") + case "layer.oracle.QueryGetDataBeforeRequest.query_id": + return protoreflect.ValueOfBytes(nil) case "layer.oracle.QueryGetDataBeforeRequest.timestamp": return protoreflect.ValueOfInt64(int64(0)) default: @@ -6076,7 +6086,7 @@ func (x *fastReflection_QueryGetDataBeforeRequest) ProtoMethods() *protoiface.Me if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -6086,23 +6096,25 @@ func (x *fastReflection_QueryGetDataBeforeRequest) ProtoMethods() *protoiface.Me } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryId = string(dAtA[iNdEx:postIndex]) + x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) + if x.QueryId == nil { + x.QueryId = []byte{} + } iNdEx = postIndex case 2: if wireType != 0 { @@ -7306,14 +7318,14 @@ func (x *fastReflection_QueryCurrentCyclelistQueryRequest) ProtoMethods() *proto } var ( - md_QueryCurrentCyclelistQueryResponse protoreflect.MessageDescriptor - fd_QueryCurrentCyclelistQueryResponse_querydata protoreflect.FieldDescriptor + md_QueryCurrentCyclelistQueryResponse protoreflect.MessageDescriptor + fd_QueryCurrentCyclelistQueryResponse_query_data protoreflect.FieldDescriptor ) func init() { file_layer_oracle_query_proto_init() md_QueryCurrentCyclelistQueryResponse = File_layer_oracle_query_proto.Messages().ByName("QueryCurrentCyclelistQueryResponse") - fd_QueryCurrentCyclelistQueryResponse_querydata = md_QueryCurrentCyclelistQueryResponse.Fields().ByName("querydata") + fd_QueryCurrentCyclelistQueryResponse_query_data = md_QueryCurrentCyclelistQueryResponse.Fields().ByName("query_data") } var _ protoreflect.Message = (*fastReflection_QueryCurrentCyclelistQueryResponse)(nil) @@ -7381,9 +7393,9 @@ func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Interface() protoref // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Querydata != "" { - value := protoreflect.ValueOfString(x.Querydata) - if !f(fd_QueryCurrentCyclelistQueryResponse_querydata, value) { + if len(x.QueryData) != 0 { + value := protoreflect.ValueOfBytes(x.QueryData) + if !f(fd_QueryCurrentCyclelistQueryResponse_query_data, value) { return } } @@ -7402,8 +7414,8 @@ func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Range(f func(protore // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.oracle.QueryCurrentCyclelistQueryResponse.querydata": - return x.Querydata != "" + case "layer.oracle.QueryCurrentCyclelistQueryResponse.query_data": + return len(x.QueryData) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryCurrentCyclelistQueryResponse")) @@ -7420,8 +7432,8 @@ func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Has(fd protoreflect. // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.oracle.QueryCurrentCyclelistQueryResponse.querydata": - x.Querydata = "" + case "layer.oracle.QueryCurrentCyclelistQueryResponse.query_data": + x.QueryData = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryCurrentCyclelistQueryResponse")) @@ -7438,9 +7450,9 @@ func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Clear(fd protoreflec // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.oracle.QueryCurrentCyclelistQueryResponse.querydata": - value := x.Querydata - return protoreflect.ValueOfString(value) + case "layer.oracle.QueryCurrentCyclelistQueryResponse.query_data": + value := x.QueryData + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryCurrentCyclelistQueryResponse")) @@ -7461,8 +7473,8 @@ func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Get(descriptor proto // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.oracle.QueryCurrentCyclelistQueryResponse.querydata": - x.Querydata = value.Interface().(string) + case "layer.oracle.QueryCurrentCyclelistQueryResponse.query_data": + x.QueryData = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryCurrentCyclelistQueryResponse")) @@ -7483,8 +7495,8 @@ func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Set(fd protoreflect. // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.QueryCurrentCyclelistQueryResponse.querydata": - panic(fmt.Errorf("field querydata of message layer.oracle.QueryCurrentCyclelistQueryResponse is not mutable")) + case "layer.oracle.QueryCurrentCyclelistQueryResponse.query_data": + panic(fmt.Errorf("field query_data of message layer.oracle.QueryCurrentCyclelistQueryResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryCurrentCyclelistQueryResponse")) @@ -7498,8 +7510,8 @@ func (x *fastReflection_QueryCurrentCyclelistQueryResponse) Mutable(fd protorefl // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryCurrentCyclelistQueryResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.QueryCurrentCyclelistQueryResponse.querydata": - return protoreflect.ValueOfString("") + case "layer.oracle.QueryCurrentCyclelistQueryResponse.query_data": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.oracle.QueryCurrentCyclelistQueryResponse")) @@ -7569,7 +7581,7 @@ func (x *fastReflection_QueryCurrentCyclelistQueryResponse) ProtoMethods() *prot var n int var l int _ = l - l = len(x.Querydata) + l = len(x.QueryData) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -7602,10 +7614,10 @@ func (x *fastReflection_QueryCurrentCyclelistQueryResponse) ProtoMethods() *prot i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Querydata) > 0 { - i -= len(x.Querydata) - copy(dAtA[i:], x.Querydata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Querydata))) + if len(x.QueryData) > 0 { + i -= len(x.QueryData) + copy(dAtA[i:], x.QueryData) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QueryData))) i-- dAtA[i] = 0xa } @@ -7660,9 +7672,9 @@ func (x *fastReflection_QueryCurrentCyclelistQueryResponse) ProtoMethods() *prot switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Querydata", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -7672,23 +7684,25 @@ func (x *fastReflection_QueryCurrentCyclelistQueryResponse) ProtoMethods() *prot } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.Querydata = string(dAtA[iNdEx:postIndex]) + x.QueryData = append(x.QueryData[:0], dAtA[iNdEx:postIndex]...) + if x.QueryData == nil { + x.QueryData = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -7807,7 +7821,7 @@ type QueryGetReportsbyQidRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` } func (x *QueryGetReportsbyQidRequest) Reset() { @@ -7830,11 +7844,11 @@ func (*QueryGetReportsbyQidRequest) Descriptor() ([]byte, []int) { return file_layer_oracle_query_proto_rawDescGZIP(), []int{2} } -func (x *QueryGetReportsbyQidRequest) GetQueryId() string { +func (x *QueryGetReportsbyQidRequest) GetQueryId() []byte { if x != nil { return x.QueryId } - return "" + return nil } type QueryGetReportsbyQidResponse struct { @@ -7948,7 +7962,7 @@ type QueryGetReportsbyReporterQidRequest struct { unknownFields protoimpl.UnknownFields Reporter string `protobuf:"bytes,1,opt,name=reporter,proto3" json:"reporter,omitempty"` - QueryId string `protobuf:"bytes,2,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,2,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` } func (x *QueryGetReportsbyReporterQidRequest) Reset() { @@ -7978,11 +7992,11 @@ func (x *QueryGetReportsbyReporterQidRequest) GetReporter() string { return "" } -func (x *QueryGetReportsbyReporterQidRequest) GetQueryId() string { +func (x *QueryGetReportsbyReporterQidRequest) GetQueryId() []byte { if x != nil { return x.QueryId } - return "" + return nil } type QueryGetCurrentTipRequest struct { @@ -7990,7 +8004,7 @@ type QueryGetCurrentTipRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - QueryData string `protobuf:"bytes,1,opt,name=queryData,proto3" json:"queryData,omitempty"` + QueryData []byte `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` } func (x *QueryGetCurrentTipRequest) Reset() { @@ -8013,11 +8027,11 @@ func (*QueryGetCurrentTipRequest) Descriptor() ([]byte, []int) { return file_layer_oracle_query_proto_rawDescGZIP(), []int{7} } -func (x *QueryGetCurrentTipRequest) GetQueryData() string { +func (x *QueryGetCurrentTipRequest) GetQueryData() []byte { if x != nil { return x.QueryData } - return "" + return nil } type QueryGetCurrentTipResponse struct { @@ -8061,7 +8075,7 @@ type QueryGetUserTipTotalRequest struct { unknownFields protoimpl.UnknownFields Tipper string `protobuf:"bytes,1,opt,name=tipper,proto3" json:"tipper,omitempty"` - QueryData string `protobuf:"bytes,2,opt,name=queryData,proto3" json:"queryData,omitempty"` + QueryData []byte `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` } func (x *QueryGetUserTipTotalRequest) Reset() { @@ -8091,11 +8105,11 @@ func (x *QueryGetUserTipTotalRequest) GetTipper() string { return "" } -func (x *QueryGetUserTipTotalRequest) GetQueryData() string { +func (x *QueryGetUserTipTotalRequest) GetQueryData() []byte { if x != nil { return x.QueryData } - return "" + return nil } type QueryGetUserTipTotalResponse struct { @@ -8138,7 +8152,7 @@ type QueryGetCurrentAggregatedReportRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` } func (x *QueryGetCurrentAggregatedReportRequest) Reset() { @@ -8161,11 +8175,11 @@ func (*QueryGetCurrentAggregatedReportRequest) Descriptor() ([]byte, []int) { return file_layer_oracle_query_proto_rawDescGZIP(), []int{11} } -func (x *QueryGetCurrentAggregatedReportRequest) GetQueryId() string { +func (x *QueryGetCurrentAggregatedReportRequest) GetQueryId() []byte { if x != nil { return x.QueryId } - return "" + return nil } type QueryGetAggregatedReportResponse struct { @@ -8208,7 +8222,7 @@ type QueryGetDataBeforeRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } @@ -8232,11 +8246,11 @@ func (*QueryGetDataBeforeRequest) Descriptor() ([]byte, []int) { return file_layer_oracle_query_proto_rawDescGZIP(), []int{13} } -func (x *QueryGetDataBeforeRequest) GetQueryId() string { +func (x *QueryGetDataBeforeRequest) GetQueryId() []byte { if x != nil { return x.QueryId } - return "" + return nil } func (x *QueryGetDataBeforeRequest) GetTimestamp() int64 { @@ -8338,7 +8352,7 @@ type QueryCurrentCyclelistQueryResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Querydata string `protobuf:"bytes,1,opt,name=querydata,proto3" json:"querydata,omitempty"` + QueryData []byte `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` } func (x *QueryCurrentCyclelistQueryResponse) Reset() { @@ -8361,11 +8375,11 @@ func (*QueryCurrentCyclelistQueryResponse) Descriptor() ([]byte, []int) { return file_layer_oracle_query_proto_rawDescGZIP(), []int{17} } -func (x *QueryCurrentCyclelistQueryResponse) GetQuerydata() string { +func (x *QueryCurrentCyclelistQueryResponse) GetQueryData() []byte { if x != nil { - return x.Querydata + return x.QueryData } - return "" + return nil } var File_layer_oracle_query_proto protoreflect.FileDescriptor @@ -8399,202 +8413,202 @@ var file_layer_oracle_query_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x37, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x38, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x51, 0x69, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, - 0x64, 0x22, 0x55, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x51, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x35, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0x3e, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x68, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, - 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x2e, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x73, 0x22, 0x5b, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x51, - 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, - 0x39, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x54, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0x44, 0x0a, 0x1a, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x69, 0x70, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x54, 0x69, 0x70, 0x73, 0x52, 0x04, 0x74, 0x69, 0x70, 0x73, - 0x22, 0x53, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x54, 0x69, 0x70, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x44, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0x58, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x70, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, - 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x70, 0x54, - 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x70, 0x73, 0x22, - 0x42, 0x0a, 0x26, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x22, 0x53, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x53, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x21, 0x0a, - 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x61, 0x73, - 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x8b, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x54, 0x69, 0x6d, - 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, - 0x42, 0x34, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x23, - 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x79, - 0x63, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x42, 0x0a, 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x32, 0xb1, 0x0d, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x6b, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x49, 0x64, 0x22, 0x55, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x51, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x35, 0x0a, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, + 0x52, 0x07, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0x3e, 0x0a, 0x20, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x68, 0x0a, 0x21, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, + 0x0a, 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x73, 0x22, 0x5c, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x51, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x22, 0x3a, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0x44, 0x0a, + 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x54, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x74, + 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x54, 0x69, 0x70, 0x73, 0x52, 0x04, 0x74, + 0x69, 0x70, 0x73, 0x22, 0x54, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x54, 0x69, 0x70, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0x58, 0x0a, 0x1c, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x70, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x54, 0x69, 0x70, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, + 0x54, 0x69, 0x70, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, + 0x69, 0x70, 0x73, 0x22, 0x43, 0x0a, 0x26, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, + 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x22, 0x53, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x06, + 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x41, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x54, 0x0a, + 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, + 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x22, 0x21, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x8b, 0x01, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x47, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x06, 0x72, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x34, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x27, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x72, 0x65, + 0x77, 0x61, 0x72, 0x64, 0x22, 0x23, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x43, 0x0a, 0x22, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x6c, 0x69, + 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x32, 0xb7, + 0x0d, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x6b, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, + 0x14, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x9c, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x51, 0x69, 0x64, 0x12, 0x29, 0x2e, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x51, 0x69, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x73, 0x62, 0x79, 0x51, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x73, 0x62, 0x79, 0x5f, 0x71, 0x69, 0x64, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xb0, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x2e, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x9b, - 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x51, - 0x69, 0x64, 0x12, 0x29, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x73, 0x62, 0x79, 0x51, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x51, 0x69, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2b, 0x12, 0x29, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x5f, 0x71, - 0x69, 0x64, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x7d, 0x12, 0xb0, 0x01, 0x0a, - 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x2e, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, - 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x67, 0x65, - 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x5f, 0x72, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x7d, 0x12, - 0xbf, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x51, 0x69, 0x64, 0x12, 0x31, 0x2e, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x51, 0x69, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, - 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x51, - 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x3f, 0x12, 0x3d, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x5f, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x71, 0x69, 0x64, 0x2f, 0x7b, 0x72, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, - 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x54, 0x69, 0x70, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x54, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x62, 0x79, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2f, 0x7b, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x7d, 0x12, 0xc0, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x51, 0x69, 0x64, 0x12, 0x31, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x73, 0x62, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x51, 0x69, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x51, 0x69, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x46, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x12, 0x3e, 0x2f, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x72, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x73, 0x62, 0x79, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x5f, 0x71, 0x69, 0x64, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x7d, 0x2f, + 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa0, 0x01, 0x0a, 0x0d, 0x47, + 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x70, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, - 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x70, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, - 0x74, 0x61, 0x7d, 0x12, 0xb1, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, - 0x69, 0x70, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x29, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x54, 0x69, 0x70, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, - 0x70, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x12, 0x3f, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, - 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, - 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x70, 0x5f, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x2f, 0x7b, 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x7d, 0x12, 0xbc, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, - 0x34, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, - 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, - 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x7b, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x49, 0x64, 0x7d, 0x12, 0xad, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x61, - 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2e, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x74, 0x65, 0x6c, 0x6c, - 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x2f, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, - 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x7d, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x12, 0xac, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x69, - 0x6d, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x2d, - 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x52, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, + 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x70, + 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x7d, 0x12, 0xb2, 0x01, + 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x70, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x12, 0x29, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x70, + 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x69, 0x70, 0x54, 0x6f, 0x74, 0x61, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, + 0x12, 0x40, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x75, 0x73, + 0x65, 0x72, 0x5f, 0x74, 0x69, 0x70, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x2f, 0x7b, 0x74, 0x69, + 0x70, 0x70, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x7d, 0x12, 0xbd, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x34, 0x2e, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, + 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, + 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, + 0x64, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, + 0x66, 0x6f, 0x72, 0x65, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, + 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, + 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x47, + 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x2f, 0x7b, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x7d, 0x12, 0xac, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x42, + 0x61, 0x73, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0x2d, 0x2e, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x47, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, + 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, + 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x67, 0x65, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, + 0x64, 0x73, 0x12, 0xb3, 0x01, 0x0a, 0x15, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x79, + 0x63, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2f, 0x2e, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x6c, 0x69, 0x73, + 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x65, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x52, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, - 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x67, - 0x65, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x64, 0x5f, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x73, 0x12, 0xb3, 0x01, 0x0a, 0x15, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, - 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, - 0x2f, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, - 0x6c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x30, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x79, 0x63, 0x6c, - 0x65, 0x6c, 0x69, 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x74, 0x65, 0x6c, - 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x79, 0x63, 0x6c, - 0x65, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x9c, 0x01, 0x0a, 0x10, - 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, - 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x4f, - 0x58, 0xaa, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0xca, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xe2, - 0x02, 0x18, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, - 0x65, 0x72, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x79, 0x63, 0x6c, 0x65, 0x6c, 0x69, + 0x73, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, + 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x6c, 0x69, + 0x73, 0x74, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x9c, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, + 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x42, 0x0a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, + 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x4f, 0x58, 0xaa, 0x02, + 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xca, 0x02, 0x0c, + 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xe2, 0x02, 0x18, 0x4c, + 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, + 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/layer/oracle/query_id_timestamp_pair.pulsar.go b/api/layer/oracle/query_id_timestamp_pair.pulsar.go index 86f6a3011..3c986ee39 100644 --- a/api/layer/oracle/query_id_timestamp_pair.pulsar.go +++ b/api/layer/oracle/query_id_timestamp_pair.pulsar.go @@ -14,14 +14,14 @@ import ( var ( md_QueryIdTimestampPair protoreflect.MessageDescriptor - fd_QueryIdTimestampPair_queryId protoreflect.FieldDescriptor + fd_QueryIdTimestampPair_query_id protoreflect.FieldDescriptor fd_QueryIdTimestampPair_timestamp protoreflect.FieldDescriptor ) func init() { file_layer_oracle_query_id_timestamp_pair_proto_init() md_QueryIdTimestampPair = File_layer_oracle_query_id_timestamp_pair_proto.Messages().ByName("QueryIdTimestampPair") - fd_QueryIdTimestampPair_queryId = md_QueryIdTimestampPair.Fields().ByName("queryId") + fd_QueryIdTimestampPair_query_id = md_QueryIdTimestampPair.Fields().ByName("query_id") fd_QueryIdTimestampPair_timestamp = md_QueryIdTimestampPair.Fields().ByName("timestamp") } @@ -90,9 +90,9 @@ func (x *fastReflection_QueryIdTimestampPair) Interface() protoreflect.ProtoMess // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryIdTimestampPair) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) - if !f(fd_QueryIdTimestampPair_queryId, value) { + if len(x.QueryId) != 0 { + value := protoreflect.ValueOfBytes(x.QueryId) + if !f(fd_QueryIdTimestampPair_query_id, value) { return } } @@ -117,8 +117,8 @@ func (x *fastReflection_QueryIdTimestampPair) Range(f func(protoreflect.FieldDes // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryIdTimestampPair) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.oracle.QueryIdTimestampPair.queryId": - return x.QueryId != "" + case "layer.oracle.QueryIdTimestampPair.query_id": + return len(x.QueryId) != 0 case "layer.oracle.QueryIdTimestampPair.timestamp": return x.Timestamp != int64(0) default: @@ -137,8 +137,8 @@ func (x *fastReflection_QueryIdTimestampPair) Has(fd protoreflect.FieldDescripto // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIdTimestampPair) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.oracle.QueryIdTimestampPair.queryId": - x.QueryId = "" + case "layer.oracle.QueryIdTimestampPair.query_id": + x.QueryId = nil case "layer.oracle.QueryIdTimestampPair.timestamp": x.Timestamp = int64(0) default: @@ -157,9 +157,9 @@ func (x *fastReflection_QueryIdTimestampPair) Clear(fd protoreflect.FieldDescrip // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryIdTimestampPair) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.oracle.QueryIdTimestampPair.queryId": + case "layer.oracle.QueryIdTimestampPair.query_id": value := x.QueryId - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) case "layer.oracle.QueryIdTimestampPair.timestamp": value := x.Timestamp return protoreflect.ValueOfInt64(value) @@ -183,8 +183,8 @@ func (x *fastReflection_QueryIdTimestampPair) Get(descriptor protoreflect.FieldD // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIdTimestampPair) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.oracle.QueryIdTimestampPair.queryId": - x.QueryId = value.Interface().(string) + case "layer.oracle.QueryIdTimestampPair.query_id": + x.QueryId = value.Bytes() case "layer.oracle.QueryIdTimestampPair.timestamp": x.Timestamp = value.Int() default: @@ -207,8 +207,8 @@ func (x *fastReflection_QueryIdTimestampPair) Set(fd protoreflect.FieldDescripto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryIdTimestampPair) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.QueryIdTimestampPair.queryId": - panic(fmt.Errorf("field queryId of message layer.oracle.QueryIdTimestampPair is not mutable")) + case "layer.oracle.QueryIdTimestampPair.query_id": + panic(fmt.Errorf("field query_id of message layer.oracle.QueryIdTimestampPair is not mutable")) case "layer.oracle.QueryIdTimestampPair.timestamp": panic(fmt.Errorf("field timestamp of message layer.oracle.QueryIdTimestampPair is not mutable")) default: @@ -224,8 +224,8 @@ func (x *fastReflection_QueryIdTimestampPair) Mutable(fd protoreflect.FieldDescr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryIdTimestampPair) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.oracle.QueryIdTimestampPair.queryId": - return protoreflect.ValueOfString("") + case "layer.oracle.QueryIdTimestampPair.query_id": + return protoreflect.ValueOfBytes(nil) case "layer.oracle.QueryIdTimestampPair.timestamp": return protoreflect.ValueOfInt64(int64(0)) default: @@ -398,7 +398,7 @@ func (x *fastReflection_QueryIdTimestampPair) ProtoMethods() *protoiface.Methods if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -408,23 +408,25 @@ func (x *fastReflection_QueryIdTimestampPair) ProtoMethods() *protoiface.Methods } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryId = string(dAtA[iNdEx:postIndex]) + x.QueryId = append(x.QueryId[:0], dAtA[iNdEx:postIndex]...) + if x.QueryId == nil { + x.QueryId = []byte{} + } iNdEx = postIndex case 2: if wireType != 0 { @@ -992,7 +994,7 @@ type QueryIdTimestampPair struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } @@ -1016,11 +1018,11 @@ func (*QueryIdTimestampPair) Descriptor() ([]byte, []int) { return file_layer_oracle_query_id_timestamp_pair_proto_rawDescGZIP(), []int{0} } -func (x *QueryIdTimestampPair) GetQueryId() string { +func (x *QueryIdTimestampPair) GetQueryId() []byte { if x != nil { return x.QueryId } - return "" + return nil } func (x *QueryIdTimestampPair) GetTimestamp() int64 { @@ -1071,29 +1073,29 @@ var file_layer_oracle_query_id_timestamp_pair_proto_rawDesc = []byte{ 0x0a, 0x2a, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x22, 0x4e, 0x0a, 0x14, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x61, - 0x69, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x56, 0x0a, 0x1a, 0x51, 0x75, + 0x79, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x22, 0x4f, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x61, - 0x69, 0x72, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x38, 0x0a, 0x05, 0x70, 0x61, 0x69, 0x72, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x61, 0x69, 0x72, 0x52, 0x05, 0x70, 0x61, 0x69, - 0x72, 0x73, 0x42, 0xab, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x42, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x4f, 0x58, 0xaa, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xca, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0xe2, 0x02, 0x18, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x56, 0x0a, 0x1a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x50, + 0x61, 0x69, 0x72, 0x73, 0x41, 0x72, 0x72, 0x61, 0x79, 0x12, 0x38, 0x0a, 0x05, 0x70, 0x61, 0x69, + 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, + 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x61, 0x69, 0x72, 0x52, 0x05, 0x70, 0x61, + 0x69, 0x72, 0x73, 0x42, 0xab, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x42, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x61, 0x69, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0xa2, 0x02, 0x03, 0x4c, 0x4f, 0x58, 0xaa, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, + 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xca, 0x02, 0x0c, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, + 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0xe2, 0x02, 0x18, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x4f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0d, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/layer/oracle/tips.pulsar.go b/api/layer/oracle/tips.pulsar.go index d5acd26a6..a6b4c19b1 100644 --- a/api/layer/oracle/tips.pulsar.go +++ b/api/layer/oracle/tips.pulsar.go @@ -94,8 +94,8 @@ func (x *fastReflection_Tips) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Tips) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.QueryData != "" { - value := protoreflect.ValueOfString(x.QueryData) + if len(x.QueryData) != 0 { + value := protoreflect.ValueOfBytes(x.QueryData) if !f(fd_Tips_query_data, value) { return } @@ -128,7 +128,7 @@ func (x *fastReflection_Tips) Range(f func(protoreflect.FieldDescriptor, protore func (x *fastReflection_Tips) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "layer.oracle.Tips.query_data": - return x.QueryData != "" + return len(x.QueryData) != 0 case "layer.oracle.Tips.amount": return x.Amount != "" case "layer.oracle.Tips.total_tips": @@ -150,7 +150,7 @@ func (x *fastReflection_Tips) Has(fd protoreflect.FieldDescriptor) bool { func (x *fastReflection_Tips) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "layer.oracle.Tips.query_data": - x.QueryData = "" + x.QueryData = nil case "layer.oracle.Tips.amount": x.Amount = "" case "layer.oracle.Tips.total_tips": @@ -173,7 +173,7 @@ func (x *fastReflection_Tips) Get(descriptor protoreflect.FieldDescriptor) proto switch descriptor.FullName() { case "layer.oracle.Tips.query_data": value := x.QueryData - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) case "layer.oracle.Tips.amount": value := x.Amount return protoreflect.ValueOfString(value) @@ -201,7 +201,7 @@ func (x *fastReflection_Tips) Get(descriptor protoreflect.FieldDescriptor) proto func (x *fastReflection_Tips) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "layer.oracle.Tips.query_data": - x.QueryData = value.Interface().(string) + x.QueryData = value.Bytes() case "layer.oracle.Tips.amount": x.Amount = value.Interface().(string) case "layer.oracle.Tips.total_tips": @@ -246,7 +246,7 @@ func (x *fastReflection_Tips) Mutable(fd protoreflect.FieldDescriptor) protorefl func (x *fastReflection_Tips) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "layer.oracle.Tips.query_data": - return protoreflect.ValueOfString("") + return protoreflect.ValueOfBytes(nil) case "layer.oracle.Tips.amount": return protoreflect.ValueOfString("") case "layer.oracle.Tips.total_tips": @@ -435,7 +435,7 @@ func (x *fastReflection_Tips) ProtoMethods() *protoiface.Methods { if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -445,23 +445,25 @@ func (x *fastReflection_Tips) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryData = string(dAtA[iNdEx:postIndex]) + x.QueryData = append(x.QueryData[:0], dAtA[iNdEx:postIndex]...) + if x.QueryData == nil { + x.QueryData = []byte{} + } iNdEx = postIndex case 2: if wireType != 2 { @@ -581,8 +583,8 @@ type Tips struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // queryData is the query data that was tipped - QueryData string `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` + // query_data is the query data that was tipped + QueryData []byte `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` // the amount that was tipped Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` // totalTips is the total amount of tips for this query data so far @@ -609,11 +611,11 @@ func (*Tips) Descriptor() ([]byte, []int) { return file_layer_oracle_tips_proto_rawDescGZIP(), []int{0} } -func (x *Tips) GetQueryData() string { +func (x *Tips) GetQueryData() []byte { if x != nil { return x.QueryData } - return "" + return nil } func (x *Tips) GetAmount() string { @@ -640,7 +642,7 @@ var file_layer_oracle_tips_proto_rawDesc = []byte{ 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb6, 0x01, 0x0a, 0x04, 0x54, 0x69, 0x70, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x43, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, diff --git a/api/layer/oracle/tx.pulsar.go b/api/layer/oracle/tx.pulsar.go index 59895627e..c5b307d67 100644 --- a/api/layer/oracle/tx.pulsar.go +++ b/api/layer/oracle/tx.pulsar.go @@ -960,8 +960,8 @@ func (x *fastReflection_MsgSubmitValue) Range(f func(protoreflect.FieldDescripto return } } - if x.QueryData != "" { - value := protoreflect.ValueOfString(x.QueryData) + if len(x.QueryData) != 0 { + value := protoreflect.ValueOfBytes(x.QueryData) if !f(fd_MsgSubmitValue_query_data, value) { return } @@ -996,7 +996,7 @@ func (x *fastReflection_MsgSubmitValue) Has(fd protoreflect.FieldDescriptor) boo case "layer.oracle.MsgSubmitValue.creator": return x.Creator != "" case "layer.oracle.MsgSubmitValue.query_data": - return x.QueryData != "" + return len(x.QueryData) != 0 case "layer.oracle.MsgSubmitValue.value": return x.Value != "" case "layer.oracle.MsgSubmitValue.salt": @@ -1020,7 +1020,7 @@ func (x *fastReflection_MsgSubmitValue) Clear(fd protoreflect.FieldDescriptor) { case "layer.oracle.MsgSubmitValue.creator": x.Creator = "" case "layer.oracle.MsgSubmitValue.query_data": - x.QueryData = "" + x.QueryData = nil case "layer.oracle.MsgSubmitValue.value": x.Value = "" case "layer.oracle.MsgSubmitValue.salt": @@ -1046,7 +1046,7 @@ func (x *fastReflection_MsgSubmitValue) Get(descriptor protoreflect.FieldDescrip return protoreflect.ValueOfString(value) case "layer.oracle.MsgSubmitValue.query_data": value := x.QueryData - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) case "layer.oracle.MsgSubmitValue.value": value := x.Value return protoreflect.ValueOfString(value) @@ -1076,7 +1076,7 @@ func (x *fastReflection_MsgSubmitValue) Set(fd protoreflect.FieldDescriptor, val case "layer.oracle.MsgSubmitValue.creator": x.Creator = value.Interface().(string) case "layer.oracle.MsgSubmitValue.query_data": - x.QueryData = value.Interface().(string) + x.QueryData = value.Bytes() case "layer.oracle.MsgSubmitValue.value": x.Value = value.Interface().(string) case "layer.oracle.MsgSubmitValue.salt": @@ -1125,7 +1125,7 @@ func (x *fastReflection_MsgSubmitValue) NewField(fd protoreflect.FieldDescriptor case "layer.oracle.MsgSubmitValue.creator": return protoreflect.ValueOfString("") case "layer.oracle.MsgSubmitValue.query_data": - return protoreflect.ValueOfString("") + return protoreflect.ValueOfBytes(nil) case "layer.oracle.MsgSubmitValue.value": return protoreflect.ValueOfString("") case "layer.oracle.MsgSubmitValue.salt": @@ -1357,7 +1357,7 @@ func (x *fastReflection_MsgSubmitValue) ProtoMethods() *protoiface.Methods { if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1367,23 +1367,25 @@ func (x *fastReflection_MsgSubmitValue) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryData = string(dAtA[iNdEx:postIndex]) + x.QueryData = append(x.QueryData[:0], dAtA[iNdEx:postIndex]...) + if x.QueryData == nil { + x.QueryData = []byte{} + } iNdEx = postIndex case 3: if wireType != 2 { @@ -1926,8 +1928,8 @@ func (x *fastReflection_MsgCommitReport) Range(f func(protoreflect.FieldDescript return } } - if x.QueryData != "" { - value := protoreflect.ValueOfString(x.QueryData) + if len(x.QueryData) != 0 { + value := protoreflect.ValueOfBytes(x.QueryData) if !f(fd_MsgCommitReport_query_data, value) { return } @@ -1956,7 +1958,7 @@ func (x *fastReflection_MsgCommitReport) Has(fd protoreflect.FieldDescriptor) bo case "layer.oracle.MsgCommitReport.creator": return x.Creator != "" case "layer.oracle.MsgCommitReport.query_data": - return x.QueryData != "" + return len(x.QueryData) != 0 case "layer.oracle.MsgCommitReport.hash": return x.Hash != "" default: @@ -1978,7 +1980,7 @@ func (x *fastReflection_MsgCommitReport) Clear(fd protoreflect.FieldDescriptor) case "layer.oracle.MsgCommitReport.creator": x.Creator = "" case "layer.oracle.MsgCommitReport.query_data": - x.QueryData = "" + x.QueryData = nil case "layer.oracle.MsgCommitReport.hash": x.Hash = "" default: @@ -2002,7 +2004,7 @@ func (x *fastReflection_MsgCommitReport) Get(descriptor protoreflect.FieldDescri return protoreflect.ValueOfString(value) case "layer.oracle.MsgCommitReport.query_data": value := x.QueryData - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) case "layer.oracle.MsgCommitReport.hash": value := x.Hash return protoreflect.ValueOfString(value) @@ -2029,7 +2031,7 @@ func (x *fastReflection_MsgCommitReport) Set(fd protoreflect.FieldDescriptor, va case "layer.oracle.MsgCommitReport.creator": x.Creator = value.Interface().(string) case "layer.oracle.MsgCommitReport.query_data": - x.QueryData = value.Interface().(string) + x.QueryData = value.Bytes() case "layer.oracle.MsgCommitReport.hash": x.Hash = value.Interface().(string) default: @@ -2074,7 +2076,7 @@ func (x *fastReflection_MsgCommitReport) NewField(fd protoreflect.FieldDescripto case "layer.oracle.MsgCommitReport.creator": return protoreflect.ValueOfString("") case "layer.oracle.MsgCommitReport.query_data": - return protoreflect.ValueOfString("") + return protoreflect.ValueOfBytes(nil) case "layer.oracle.MsgCommitReport.hash": return protoreflect.ValueOfString("") default: @@ -2293,7 +2295,7 @@ func (x *fastReflection_MsgCommitReport) ProtoMethods() *protoiface.Methods { if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2303,23 +2305,25 @@ func (x *fastReflection_MsgCommitReport) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryData = string(dAtA[iNdEx:postIndex]) + x.QueryData = append(x.QueryData[:0], dAtA[iNdEx:postIndex]...) + if x.QueryData == nil { + x.QueryData = []byte{} + } iNdEx = postIndex case 3: if wireType != 2 { @@ -2830,8 +2834,8 @@ func (x *fastReflection_MsgTip) Range(f func(protoreflect.FieldDescriptor, proto return } } - if x.QueryData != "" { - value := protoreflect.ValueOfString(x.QueryData) + if len(x.QueryData) != 0 { + value := protoreflect.ValueOfBytes(x.QueryData) if !f(fd_MsgTip_query_data, value) { return } @@ -2860,7 +2864,7 @@ func (x *fastReflection_MsgTip) Has(fd protoreflect.FieldDescriptor) bool { case "layer.oracle.MsgTip.tipper": return x.Tipper != "" case "layer.oracle.MsgTip.query_data": - return x.QueryData != "" + return len(x.QueryData) != 0 case "layer.oracle.MsgTip.amount": return x.Amount != nil default: @@ -2882,7 +2886,7 @@ func (x *fastReflection_MsgTip) Clear(fd protoreflect.FieldDescriptor) { case "layer.oracle.MsgTip.tipper": x.Tipper = "" case "layer.oracle.MsgTip.query_data": - x.QueryData = "" + x.QueryData = nil case "layer.oracle.MsgTip.amount": x.Amount = nil default: @@ -2906,7 +2910,7 @@ func (x *fastReflection_MsgTip) Get(descriptor protoreflect.FieldDescriptor) pro return protoreflect.ValueOfString(value) case "layer.oracle.MsgTip.query_data": value := x.QueryData - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfBytes(value) case "layer.oracle.MsgTip.amount": value := x.Amount return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -2933,7 +2937,7 @@ func (x *fastReflection_MsgTip) Set(fd protoreflect.FieldDescriptor, value proto case "layer.oracle.MsgTip.tipper": x.Tipper = value.Interface().(string) case "layer.oracle.MsgTip.query_data": - x.QueryData = value.Interface().(string) + x.QueryData = value.Bytes() case "layer.oracle.MsgTip.amount": x.Amount = value.Message().Interface().(*v1beta1.Coin) default: @@ -2981,7 +2985,7 @@ func (x *fastReflection_MsgTip) NewField(fd protoreflect.FieldDescriptor) protor case "layer.oracle.MsgTip.tipper": return protoreflect.ValueOfString("") case "layer.oracle.MsgTip.query_data": - return protoreflect.ValueOfString("") + return protoreflect.ValueOfBytes(nil) case "layer.oracle.MsgTip.amount": m := new(v1beta1.Coin) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -3208,7 +3212,7 @@ func (x *fastReflection_MsgTip) ProtoMethods() *protoiface.Methods { if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3218,23 +3222,25 @@ func (x *fastReflection_MsgTip) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.QueryData = string(dAtA[iNdEx:postIndex]) + x.QueryData = append(x.QueryData[:0], dAtA[iNdEx:postIndex]...) + if x.QueryData == nil { + x.QueryData = []byte{} + } iNdEx = postIndex case 3: if wireType != 2 { @@ -3666,7 +3672,7 @@ func (x *fastReflection_MsgTipResponse) ProtoMethods() *protoiface.Methods { var _ protoreflect.List = (*_MsgUpdateCyclelist_2_list)(nil) type _MsgUpdateCyclelist_2_list struct { - list *[]string + list *[][]byte } func (x *_MsgUpdateCyclelist_2_list) Len() int { @@ -3677,17 +3683,17 @@ func (x *_MsgUpdateCyclelist_2_list) Len() int { } func (x *_MsgUpdateCyclelist_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) + return protoreflect.ValueOfBytes((*x.list)[i]) } func (x *_MsgUpdateCyclelist_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() + valueUnwrapped := value.Bytes() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } func (x *_MsgUpdateCyclelist_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() + valueUnwrapped := value.Bytes() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } @@ -3701,8 +3707,8 @@ func (x *_MsgUpdateCyclelist_2_list) Truncate(n int) { } func (x *_MsgUpdateCyclelist_2_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) + var v []byte + return protoreflect.ValueOfBytes(v) } func (x *_MsgUpdateCyclelist_2_list) IsValid() bool { @@ -3911,7 +3917,7 @@ func (x *fastReflection_MsgUpdateCyclelist) Mutable(fd protoreflect.FieldDescrip switch fd.FullName() { case "layer.oracle.MsgUpdateCyclelist.cyclelist": if x.Cyclelist == nil { - x.Cyclelist = []string{} + x.Cyclelist = [][]byte{} } value := &_MsgUpdateCyclelist_2_list{list: &x.Cyclelist} return protoreflect.ValueOfList(value) @@ -3933,7 +3939,7 @@ func (x *fastReflection_MsgUpdateCyclelist) NewField(fd protoreflect.FieldDescri case "layer.oracle.MsgUpdateCyclelist.authority": return protoreflect.ValueOfString("") case "layer.oracle.MsgUpdateCyclelist.cyclelist": - list := []string{} + list := [][]byte{} return protoreflect.ValueOfList(&_MsgUpdateCyclelist_2_list{list: &list}) default: if fd.IsExtension() { @@ -4009,8 +4015,8 @@ func (x *fastReflection_MsgUpdateCyclelist) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } if len(x.Cyclelist) > 0 { - for _, s := range x.Cyclelist { - l = len(s) + for _, b := range x.Cyclelist { + l = len(b) n += 1 + l + runtime.Sov(uint64(l)) } } @@ -4144,7 +4150,7 @@ func (x *fastReflection_MsgUpdateCyclelist) ProtoMethods() *protoiface.Methods { if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cyclelist", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4154,23 +4160,23 @@ func (x *fastReflection_MsgUpdateCyclelist) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.Cyclelist = append(x.Cyclelist, string(dAtA[iNdEx:postIndex])) + x.Cyclelist = append(x.Cyclelist, make([]byte, postIndex-iNdEx)) + copy(x.Cyclelist[len(x.Cyclelist)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4656,7 +4662,7 @@ type MsgSubmitValue struct { unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - QueryData string `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` + QueryData []byte `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` Salt string `protobuf:"bytes,4,opt,name=salt,proto3" json:"salt,omitempty"` // hex encoded 32 bytes salt } @@ -4688,11 +4694,11 @@ func (x *MsgSubmitValue) GetCreator() string { return "" } -func (x *MsgSubmitValue) GetQueryData() string { +func (x *MsgSubmitValue) GetQueryData() []byte { if x != nil { return x.QueryData } - return "" + return nil } func (x *MsgSubmitValue) GetValue() string { @@ -4741,7 +4747,7 @@ type MsgCommitReport struct { unknownFields protoimpl.UnknownFields Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - QueryData string `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` + QueryData []byte `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` // hex encoded sha256 of "salt:value" } @@ -4772,11 +4778,11 @@ func (x *MsgCommitReport) GetCreator() string { return "" } -func (x *MsgCommitReport) GetQueryData() string { +func (x *MsgCommitReport) GetQueryData() []byte { if x != nil { return x.QueryData } - return "" + return nil } func (x *MsgCommitReport) GetHash() string { @@ -4818,7 +4824,7 @@ type MsgTip struct { unknownFields protoimpl.UnknownFields Tipper string `protobuf:"bytes,1,opt,name=tipper,proto3" json:"tipper,omitempty"` - QueryData string `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` + QueryData []byte `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` Amount *v1beta1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` } @@ -4849,11 +4855,11 @@ func (x *MsgTip) GetTipper() string { return "" } -func (x *MsgTip) GetQueryData() string { +func (x *MsgTip) GetQueryData() []byte { if x != nil { return x.QueryData } - return "" + return nil } func (x *MsgTip) GetAmount() *v1beta1.Coin { @@ -4898,7 +4904,7 @@ type MsgUpdateCyclelist struct { // authority is the address that controls the module (defaults to x/gov unless overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // list of query data hex strings - Cyclelist []string `protobuf:"bytes,2,rep,name=cyclelist,proto3" json:"cyclelist,omitempty"` + Cyclelist [][]byte `protobuf:"bytes,2,rep,name=cyclelist,proto3" json:"cyclelist,omitempty"` } func (x *MsgUpdateCyclelist) Reset() { @@ -4928,7 +4934,7 @@ func (x *MsgUpdateCyclelist) GetAuthority() string { return "" } -func (x *MsgUpdateCyclelist) GetCyclelist() []string { +func (x *MsgUpdateCyclelist) GetCyclelist() [][]byte { if x != nil { return x.Cyclelist } @@ -4994,7 +5000,7 @@ var file_layer_oracle_tx_proto_rawDesc = []byte{ 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, + 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, @@ -5003,7 +5009,7 @@ var file_layer_oracle_tx_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x19, 0x0a, 0x17, @@ -5011,7 +5017,7 @@ var file_layer_oracle_tx_proto_rawDesc = []byte{ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x06, 0x4d, 0x73, 0x67, 0x54, 0x69, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x69, 0x70, 0x70, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x37, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, @@ -5024,7 +5030,7 @@ var file_layer_oracle_tx_proto_rawDesc = []byte{ 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x34, + 0x03, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x34, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x21, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x78, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x79, 0x63, 0x6c, 0x65, diff --git a/api/layer/registry/query.pulsar.go b/api/layer/registry/query.pulsar.go index ba92fe96f..1d1d4340a 100644 --- a/api/layer/registry/query.pulsar.go +++ b/api/layer/registry/query.pulsar.go @@ -1661,14 +1661,14 @@ func (x *fastReflection_QueryGetDataSpecResponse) ProtoMethods() *protoiface.Met } var ( - md_QueryDecodeQuerydataRequest protoreflect.MessageDescriptor - fd_QueryDecodeQuerydataRequest_querydata protoreflect.FieldDescriptor + md_QueryDecodeQuerydataRequest protoreflect.MessageDescriptor + fd_QueryDecodeQuerydataRequest_query_data protoreflect.FieldDescriptor ) func init() { file_layer_registry_query_proto_init() md_QueryDecodeQuerydataRequest = File_layer_registry_query_proto.Messages().ByName("QueryDecodeQuerydataRequest") - fd_QueryDecodeQuerydataRequest_querydata = md_QueryDecodeQuerydataRequest.Fields().ByName("querydata") + fd_QueryDecodeQuerydataRequest_query_data = md_QueryDecodeQuerydataRequest.Fields().ByName("query_data") } var _ protoreflect.Message = (*fastReflection_QueryDecodeQuerydataRequest)(nil) @@ -1736,9 +1736,9 @@ func (x *fastReflection_QueryDecodeQuerydataRequest) Interface() protoreflect.Pr // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryDecodeQuerydataRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Querydata != "" { - value := protoreflect.ValueOfString(x.Querydata) - if !f(fd_QueryDecodeQuerydataRequest_querydata, value) { + if len(x.QueryData) != 0 { + value := protoreflect.ValueOfBytes(x.QueryData) + if !f(fd_QueryDecodeQuerydataRequest_query_data, value) { return } } @@ -1757,8 +1757,8 @@ func (x *fastReflection_QueryDecodeQuerydataRequest) Range(f func(protoreflect.F // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryDecodeQuerydataRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.registry.QueryDecodeQuerydataRequest.querydata": - return x.Querydata != "" + case "layer.registry.QueryDecodeQuerydataRequest.query_data": + return len(x.QueryData) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.registry.QueryDecodeQuerydataRequest")) @@ -1775,8 +1775,8 @@ func (x *fastReflection_QueryDecodeQuerydataRequest) Has(fd protoreflect.FieldDe // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDecodeQuerydataRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.registry.QueryDecodeQuerydataRequest.querydata": - x.Querydata = "" + case "layer.registry.QueryDecodeQuerydataRequest.query_data": + x.QueryData = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.registry.QueryDecodeQuerydataRequest")) @@ -1793,9 +1793,9 @@ func (x *fastReflection_QueryDecodeQuerydataRequest) Clear(fd protoreflect.Field // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryDecodeQuerydataRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.registry.QueryDecodeQuerydataRequest.querydata": - value := x.Querydata - return protoreflect.ValueOfString(value) + case "layer.registry.QueryDecodeQuerydataRequest.query_data": + value := x.QueryData + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.registry.QueryDecodeQuerydataRequest")) @@ -1816,8 +1816,8 @@ func (x *fastReflection_QueryDecodeQuerydataRequest) Get(descriptor protoreflect // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDecodeQuerydataRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.registry.QueryDecodeQuerydataRequest.querydata": - x.Querydata = value.Interface().(string) + case "layer.registry.QueryDecodeQuerydataRequest.query_data": + x.QueryData = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.registry.QueryDecodeQuerydataRequest")) @@ -1838,8 +1838,8 @@ func (x *fastReflection_QueryDecodeQuerydataRequest) Set(fd protoreflect.FieldDe // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryDecodeQuerydataRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.registry.QueryDecodeQuerydataRequest.querydata": - panic(fmt.Errorf("field querydata of message layer.registry.QueryDecodeQuerydataRequest is not mutable")) + case "layer.registry.QueryDecodeQuerydataRequest.query_data": + panic(fmt.Errorf("field query_data of message layer.registry.QueryDecodeQuerydataRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.registry.QueryDecodeQuerydataRequest")) @@ -1853,8 +1853,8 @@ func (x *fastReflection_QueryDecodeQuerydataRequest) Mutable(fd protoreflect.Fie // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryDecodeQuerydataRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.registry.QueryDecodeQuerydataRequest.querydata": - return protoreflect.ValueOfString("") + case "layer.registry.QueryDecodeQuerydataRequest.query_data": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.registry.QueryDecodeQuerydataRequest")) @@ -1924,7 +1924,7 @@ func (x *fastReflection_QueryDecodeQuerydataRequest) ProtoMethods() *protoiface. var n int var l int _ = l - l = len(x.Querydata) + l = len(x.QueryData) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -1957,10 +1957,10 @@ func (x *fastReflection_QueryDecodeQuerydataRequest) ProtoMethods() *protoiface. i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Querydata) > 0 { - i -= len(x.Querydata) - copy(dAtA[i:], x.Querydata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Querydata))) + if len(x.QueryData) > 0 { + i -= len(x.QueryData) + copy(dAtA[i:], x.QueryData) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QueryData))) i-- dAtA[i] = 0xa } @@ -2015,9 +2015,9 @@ func (x *fastReflection_QueryDecodeQuerydataRequest) ProtoMethods() *protoiface. switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Querydata", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2027,23 +2027,25 @@ func (x *fastReflection_QueryDecodeQuerydataRequest) ProtoMethods() *protoiface. } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.Querydata = string(dAtA[iNdEx:postIndex]) + x.QueryData = append(x.QueryData[:0], dAtA[iNdEx:postIndex]...) + if x.QueryData == nil { + x.QueryData = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -2985,14 +2987,14 @@ func (x *fastReflection_QueryGenerateQuerydataRequest) ProtoMethods() *protoifac } var ( - md_QueryGenerateQuerydataResponse protoreflect.MessageDescriptor - fd_QueryGenerateQuerydataResponse_querydata protoreflect.FieldDescriptor + md_QueryGenerateQuerydataResponse protoreflect.MessageDescriptor + fd_QueryGenerateQuerydataResponse_query_data protoreflect.FieldDescriptor ) func init() { file_layer_registry_query_proto_init() md_QueryGenerateQuerydataResponse = File_layer_registry_query_proto.Messages().ByName("QueryGenerateQuerydataResponse") - fd_QueryGenerateQuerydataResponse_querydata = md_QueryGenerateQuerydataResponse.Fields().ByName("querydata") + fd_QueryGenerateQuerydataResponse_query_data = md_QueryGenerateQuerydataResponse.Fields().ByName("query_data") } var _ protoreflect.Message = (*fastReflection_QueryGenerateQuerydataResponse)(nil) @@ -3060,9 +3062,9 @@ func (x *fastReflection_QueryGenerateQuerydataResponse) Interface() protoreflect // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryGenerateQuerydataResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Querydata != "" { - value := protoreflect.ValueOfString(x.Querydata) - if !f(fd_QueryGenerateQuerydataResponse_querydata, value) { + if len(x.QueryData) != 0 { + value := protoreflect.ValueOfBytes(x.QueryData) + if !f(fd_QueryGenerateQuerydataResponse_query_data, value) { return } } @@ -3081,8 +3083,8 @@ func (x *fastReflection_QueryGenerateQuerydataResponse) Range(f func(protoreflec // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryGenerateQuerydataResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "layer.registry.QueryGenerateQuerydataResponse.querydata": - return x.Querydata != "" + case "layer.registry.QueryGenerateQuerydataResponse.query_data": + return len(x.QueryData) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.registry.QueryGenerateQuerydataResponse")) @@ -3099,8 +3101,8 @@ func (x *fastReflection_QueryGenerateQuerydataResponse) Has(fd protoreflect.Fiel // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGenerateQuerydataResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "layer.registry.QueryGenerateQuerydataResponse.querydata": - x.Querydata = "" + case "layer.registry.QueryGenerateQuerydataResponse.query_data": + x.QueryData = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.registry.QueryGenerateQuerydataResponse")) @@ -3117,9 +3119,9 @@ func (x *fastReflection_QueryGenerateQuerydataResponse) Clear(fd protoreflect.Fi // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryGenerateQuerydataResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "layer.registry.QueryGenerateQuerydataResponse.querydata": - value := x.Querydata - return protoreflect.ValueOfString(value) + case "layer.registry.QueryGenerateQuerydataResponse.query_data": + value := x.QueryData + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.registry.QueryGenerateQuerydataResponse")) @@ -3140,8 +3142,8 @@ func (x *fastReflection_QueryGenerateQuerydataResponse) Get(descriptor protorefl // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGenerateQuerydataResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "layer.registry.QueryGenerateQuerydataResponse.querydata": - x.Querydata = value.Interface().(string) + case "layer.registry.QueryGenerateQuerydataResponse.query_data": + x.QueryData = value.Bytes() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.registry.QueryGenerateQuerydataResponse")) @@ -3162,8 +3164,8 @@ func (x *fastReflection_QueryGenerateQuerydataResponse) Set(fd protoreflect.Fiel // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryGenerateQuerydataResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.registry.QueryGenerateQuerydataResponse.querydata": - panic(fmt.Errorf("field querydata of message layer.registry.QueryGenerateQuerydataResponse is not mutable")) + case "layer.registry.QueryGenerateQuerydataResponse.query_data": + panic(fmt.Errorf("field query_data of message layer.registry.QueryGenerateQuerydataResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.registry.QueryGenerateQuerydataResponse")) @@ -3177,8 +3179,8 @@ func (x *fastReflection_QueryGenerateQuerydataResponse) Mutable(fd protoreflect. // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryGenerateQuerydataResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "layer.registry.QueryGenerateQuerydataResponse.querydata": - return protoreflect.ValueOfString("") + case "layer.registry.QueryGenerateQuerydataResponse.query_data": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: layer.registry.QueryGenerateQuerydataResponse")) @@ -3248,7 +3250,7 @@ func (x *fastReflection_QueryGenerateQuerydataResponse) ProtoMethods() *protoifa var n int var l int _ = l - l = len(x.Querydata) + l = len(x.QueryData) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -3281,10 +3283,10 @@ func (x *fastReflection_QueryGenerateQuerydataResponse) ProtoMethods() *protoifa i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Querydata) > 0 { - i -= len(x.Querydata) - copy(dAtA[i:], x.Querydata) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Querydata))) + if len(x.QueryData) > 0 { + i -= len(x.QueryData) + copy(dAtA[i:], x.QueryData) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QueryData))) i-- dAtA[i] = 0xa } @@ -3339,9 +3341,9 @@ func (x *fastReflection_QueryGenerateQuerydataResponse) ProtoMethods() *protoifa switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Querydata", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3351,23 +3353,25 @@ func (x *fastReflection_QueryGenerateQuerydataResponse) ProtoMethods() *protoifa } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.Querydata = string(dAtA[iNdEx:postIndex]) + x.QueryData = append(x.QueryData[:0], dAtA[iNdEx:postIndex]...) + if x.QueryData == nil { + x.QueryData = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -4465,8 +4469,8 @@ type QueryDecodeQuerydataRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // querydata is the query data hex string to be decoded. - Querydata string `protobuf:"bytes,1,opt,name=querydata,proto3" json:"querydata,omitempty"` + // query_data is the query data hex string to be decoded. + QueryData []byte `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` } func (x *QueryDecodeQuerydataRequest) Reset() { @@ -4489,11 +4493,11 @@ func (*QueryDecodeQuerydataRequest) Descriptor() ([]byte, []int) { return file_layer_registry_query_proto_rawDescGZIP(), []int{4} } -func (x *QueryDecodeQuerydataRequest) GetQuerydata() string { +func (x *QueryDecodeQuerydataRequest) GetQueryData() []byte { if x != nil { - return x.Querydata + return x.QueryData } - return "" + return nil } // QueryDecodeQuerydataResponse is response type for the Query/DecodeQuerydata RPC method. @@ -4539,9 +4543,9 @@ type QueryGenerateQuerydataRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // querytype for which querydata is to be generated. + // querytype for which query_data is to be generated. Querytype string `protobuf:"bytes,1,opt,name=querytype,proto3" json:"querytype,omitempty"` - // parameters for which querydata is to be generated. + // parameters for which query_data is to be generated. Parameters string `protobuf:"bytes,2,opt,name=parameters,proto3" json:"parameters,omitempty"` } @@ -4585,8 +4589,8 @@ type QueryGenerateQuerydataResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // querydata is the generated querydata hex string. - Querydata string `protobuf:"bytes,1,opt,name=querydata,proto3" json:"querydata,omitempty"` + // query_data is the generated query_data hex string. + QueryData []byte `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` } func (x *QueryGenerateQuerydataResponse) Reset() { @@ -4609,11 +4613,11 @@ func (*QueryGenerateQuerydataResponse) Descriptor() ([]byte, []int) { return file_layer_registry_query_proto_rawDescGZIP(), []int{7} } -func (x *QueryGenerateQuerydataResponse) GetQuerydata() string { +func (x *QueryGenerateQuerydataResponse) GetQueryData() []byte { if x != nil { - return x.Querydata + return x.QueryData } - return "" + return nil } // QueryDecodeValueRequest is request type for the Query/DecodeValue RPC method. @@ -4726,93 +4730,93 @@ var file_layer_registry_query_proto_rawDesc = []byte{ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x70, 0x65, 0x63, 0x52, 0x04, - 0x73, 0x70, 0x65, 0x63, 0x22, 0x3b, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, + 0x73, 0x70, 0x65, 0x63, 0x22, 0x3c, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, - 0x61, 0x22, 0x32, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x5d, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, + 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x44, 0x61, + 0x74, 0x61, 0x22, 0x32, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, + 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x5d, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x3f, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, - 0x74, 0x65, 0x72, 0x73, 0x22, 0x3e, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x4d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, - 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x3e, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, 0x6f, - 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x32, 0x8d, 0x06, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x71, 0x0a, - 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x70, 0x65, 0x63, - 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, - 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x70, - 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x61, 0x79, 0x65, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x44, 0x61, 0x74, 0x61, 0x22, 0x4d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, + 0x65, 0x63, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3e, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, + 0x63, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x64, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x8e, 0x06, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, + 0x71, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x6c, 0x61, - 0x79, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x67, 0x65, 0x74, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x12, 0xa2, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x63, 0x6f, - 0x64, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x2e, 0x6c, 0x61, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x70, + 0x65, 0x63, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, + 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x65, 0x63, 0x6f, 0x64, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, - 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, - 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, - 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x7d, 0x12, 0xb7, 0x01, 0x0a, - 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x2d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2e, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x7b, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x7d, 0x12, 0x9a, 0x01, 0x0a, 0x0b, 0x44, 0x65, 0x63, 0x6f, 0x64, - 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, - 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x32, 0x12, 0x30, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x72, 0x79, 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2f, - 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x72, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x03, 0x4c, 0x52, 0x58, 0xaa, 0x02, 0x0e, - 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xca, 0x02, - 0x0e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xe2, - 0x02, 0x1a, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x4c, - 0x61, 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x53, 0x70, 0x65, 0x63, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x67, + 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2f, 0x7b, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x0f, 0x44, 0x65, + 0x63, 0x6f, 0x64, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2b, 0x2e, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6c, 0x61, 0x79, + 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, + 0x12, 0x2d, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, + 0x74, 0x61, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x7d, 0x12, + 0xb7, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2d, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x64, 0x61, 0x74, 0x61, + 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x7d, 0x12, 0x9a, 0x01, 0x0a, 0x0b, 0x44, 0x65, + 0x63, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x2e, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x2f, 0x7b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x7d, 0x42, 0xa8, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x42, 0x0a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x65, 0x6c, 0x6c, 0x6f, 0x72, 0x2d, 0x69, + 0x6f, 0x2f, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6c, 0x61, 0x79, 0x65, + 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x03, 0x4c, 0x52, 0x58, + 0xaa, 0x02, 0x0e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0xca, 0x02, 0x0e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x79, 0xe2, 0x02, 0x1a, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0f, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/app/extend_vote.go b/app/extend_vote.go index 132c2cdfe..8247b88d9 100644 --- a/app/extend_vote.go +++ b/app/extend_vote.go @@ -25,28 +25,28 @@ import ( ) type OracleKeeper interface { - // GetQueryIdAndTimestampPairsByBlockHeight(ctx sdk.Context, height uint64) oracletypes.QueryIdTimestampPairsArray - // GetAggregateReport(ctx sdk.Context, queryId []byte, timestamp time.Time) (*oracletypes.Aggregate, error) - GetTimestampBefore(ctx sdk.Context, queryId []byte, timestamp time.Time) (time.Time, error) - GetTimestampAfter(ctx sdk.Context, queryId []byte, timestamp time.Time) (time.Time, error) - GetAggregatedReportsByHeight(ctx sdk.Context, height int64) []oracletypes.Aggregate - GetDataBeforePublic(ctx sdk.Context, queryId []byte, timestamp time.Time) (*oracletypes.Aggregate, error) + // GetQueryIdAndTimestampPairsByBlockHeight(ctx context.Context, height uint64) oracletypes.QueryIdTimestampPairsArray + // GetAggregateReport(ctx context.Context, queryId []byte, timestamp time.Time) (*oracletypes.Aggregate, error) + GetTimestampBefore(ctx context.Context, queryId []byte, timestamp time.Time) (time.Time, error) + GetTimestampAfter(ctx context.Context, queryId []byte, timestamp time.Time) (time.Time, error) + GetAggregatedReportsByHeight(ctx context.Context, height int64) []oracletypes.Aggregate + GetDataBeforePublic(ctx context.Context, queryId []byte, timestamp time.Time) (*oracletypes.Aggregate, error) } type BridgeKeeper interface { - GetValidatorCheckpointFromStorage(ctx sdk.Context) (*bridgetypes.ValidatorCheckpoint, error) + GetValidatorCheckpointFromStorage(ctx context.Context) (*bridgetypes.ValidatorCheckpoint, error) Logger(ctx context.Context) log.Logger - GetEVMAddressByOperator(ctx sdk.Context, operatorAddress string) (string, error) - EVMAddressFromSignature(ctx sdk.Context, sigHexString string) (string, error) - SetEVMAddressByOperator(ctx sdk.Context, operatorAddr string, evmAddr string) error - GetValidatorSetSignaturesFromStorage(ctx sdk.Context, timestamp uint64) (*bridgetypes.BridgeValsetSignatures, error) - SetBridgeValsetSignature(ctx sdk.Context, operatorAddress string, timestamp uint64, signature string) error - GetLatestCheckpointIndex(ctx sdk.Context) (uint64, error) - GetBridgeValsetByTimestamp(ctx sdk.Context, timestamp uint64) (*bridgetypes.BridgeValidatorSet, error) - GetValidatorTimestampByIdxFromStorage(ctx sdk.Context, checkpointIdx uint64) (*bridgetypes.CheckpointTimestamp, error) - GetValidatorCheckpointParamsFromStorage(ctx sdk.Context, timestamp uint64) (*bridgetypes.ValidatorCheckpointParams, error) - SetOracleAttestation(ctx sdk.Context, operatorAddress string, queryId string, timestamp uint64, signature string) error - GetValidatorDidSignCheckpoint(ctx sdk.Context, operatorAddr string, checkpointTimestamp uint64) (didSign bool, prevValsetIndex int64, err error) + GetEVMAddressByOperator(ctx context.Context, operatorAddress string) (string, error) + EVMAddressFromSignature(ctx context.Context, sigHexString string) (string, error) + SetEVMAddressByOperator(ctx context.Context, operatorAddr string, evmAddr string) error + GetValidatorSetSignaturesFromStorage(ctx context.Context, timestamp uint64) (*bridgetypes.BridgeValsetSignatures, error) + SetBridgeValsetSignature(ctx context.Context, operatorAddress string, timestamp uint64, signature string) error + GetLatestCheckpointIndex(ctx context.Context) (uint64, error) + GetBridgeValsetByTimestamp(ctx context.Context, timestamp uint64) (*bridgetypes.BridgeValidatorSet, error) + GetValidatorTimestampByIdxFromStorage(ctx context.Context, checkpointIdx uint64) (*bridgetypes.CheckpointTimestamp, error) + GetValidatorCheckpointParamsFromStorage(ctx context.Context, timestamp uint64) (*bridgetypes.ValidatorCheckpointParams, error) + SetOracleAttestation(ctx context.Context, operatorAddress string, queryId []byte, timestamp uint64, signature string) error + GetValidatorDidSignCheckpoint(ctx context.Context, operatorAddr string, checkpointTimestamp uint64) (didSign bool, prevValsetIndex int64, err error) } type StakingKeeper interface { @@ -62,7 +62,7 @@ type VoteExtHandler struct { } type OracleAttestation struct { - QueryId string + QueryId []byte Timestamp uint64 Attestation []byte } @@ -113,6 +113,7 @@ func (h *VoteExtHandler) ExtendVoteHandler(ctx sdk.Context, req *abci.RequestExt } voteExt.InitialSignature = initialSignature } + // logic for generating oracle sigs and including them via vote extensions blockHeight := ctx.BlockHeight() - 1 reports := h.oracleKeeper.GetAggregatedReportsByHeight(ctx, int64(blockHeight)) @@ -125,20 +126,17 @@ func (h *VoteExtHandler) ExtendVoteHandler(ctx sdk.Context, req *abci.RequestExt for _, aggReport := range reports { currentTime := time.Now() ts := currentTime.Unix() + 100 - queryId, err := hex.DecodeString(aggReport.QueryId) - if err != nil { - panic(err) - } - reportTime, err := h.oracleKeeper.GetTimestampBefore(ctx, queryId, time.Unix(ts, 0)) + + reportTime, err := h.oracleKeeper.GetTimestampBefore(ctx, aggReport.QueryId, time.Unix(ts, 0)) if err != nil { return nil, err } - tsBefore, err := h.oracleKeeper.GetTimestampBefore(ctx, queryId, reportTime) + tsBefore, err := h.oracleKeeper.GetTimestampBefore(ctx, aggReport.QueryId, reportTime) if err != nil { // set to 0 tsBefore = time.Unix(0, 0) } - tsAfter, err := h.oracleKeeper.GetTimestampAfter(ctx, queryId, reportTime) + tsAfter, err := h.oracleKeeper.GetTimestampAfter(ctx, aggReport.QueryId, reportTime) if err != nil { // set to 0 tsAfter = time.Unix(0, 0) @@ -222,7 +220,7 @@ func (h *VoteExtHandler) VerifyVoteExtensionHandler(ctx sdk.Context, req *abci.R } func (h *VoteExtHandler) EncodeOracleAttestationData( - queryId string, + queryId []byte, value string, timestamp int64, aggregatePower int64, @@ -241,13 +239,8 @@ func (h *VoteExtHandler) EncodeOracleAttestationData( var domainSepBytes32 [32]byte copy(domainSepBytes32[:], NEW_REPORT_ATTESTATION_DOMAIN_SEPERATOR) - // Convert queryId to bytes32 - queryIdBytes, err := hex.DecodeString(queryId) - if err != nil { - return nil, err - } var queryIdBytes32 [32]byte - copy(queryIdBytes32[:], queryIdBytes) + copy(queryIdBytes32[:], queryId) // Convert value to bytes valueBytes, err := hex.DecodeString(value) @@ -440,7 +433,7 @@ func (h *VoteExtHandler) GetKeyName() string { } } -func (h *VoteExtHandler) CheckAndSignValidatorCheckpoint(ctx sdk.Context) (signature []byte, timestamp uint64, err error) { +func (h *VoteExtHandler) CheckAndSignValidatorCheckpoint(ctx context.Context) (signature []byte, timestamp uint64, err error) { // get latest checkpoint index latestCheckpointIdx, err := h.bridgeKeeper.GetLatestCheckpointIndex(ctx) if err != nil { @@ -486,7 +479,7 @@ func (h *VoteExtHandler) CheckAndSignValidatorCheckpoint(ctx sdk.Context) (signa } } -func (h *VoteExtHandler) GetValidatorIndexInValset(ctx sdk.Context, evmAddress string, valset *bridgetypes.BridgeValidatorSet) (int, error) { +func (h *VoteExtHandler) GetValidatorIndexInValset(ctx context.Context, evmAddress string, valset *bridgetypes.BridgeValidatorSet) (int, error) { for i, val := range valset.BridgeValidatorSet { if val.EthereumAddress == evmAddress { return i, nil diff --git a/app/proposal_handler.go b/app/proposal_handler.go index 07b900a97..71fc0984f 100644 --- a/app/proposal_handler.go +++ b/app/proposal_handler.go @@ -35,7 +35,7 @@ type ValsetSignatures struct { type OracleAttestations struct { OperatorAddresses []string `json:"operator_addresses"` Attestations []string `json:"attestations"` - QueryIds []string `json:"query_ids"` + QueryIds [][]byte `json:"query_ids"` Timestamps []int64 `json:"timestamps"` } @@ -285,11 +285,11 @@ func (h *ProposalHandler) ValidatorOperatorAddressFromVote(ctx sdk.Context, vote return operatorAddress, nil } -func (h *ProposalHandler) CheckOracleAttestationsFromLastCommit(ctx sdk.Context, commit abci.ExtendedCommitInfo) ([]string, []string, []string, []int64, error) { +func (h *ProposalHandler) CheckOracleAttestationsFromLastCommit(ctx sdk.Context, commit abci.ExtendedCommitInfo) ([]string, [][]byte, []string, []int64, error) { var attestations []string var timestamps []int64 var operatorAddresses []string - var queryIds []string + var queryIds [][]byte for _, vote := range commit.Votes { extension := vote.GetVoteExtension() diff --git a/daemons/reporter/client/current_query.go b/daemons/reporter/client/current_query.go index 2469e9e9f..a67f0a47d 100644 --- a/daemons/reporter/client/current_query.go +++ b/daemons/reporter/client/current_query.go @@ -4,22 +4,18 @@ import ( "context" "encoding/hex" "fmt" - "strings" "github.com/tellor-io/layer/utils" oracletypes "github.com/tellor-io/layer/x/oracle/types" ) -func (c *Client) CurrentQuery(ctx context.Context) (string, error) { +func (c *Client) CurrentQuery(ctx context.Context) ([]byte, error) { response, err := c.OracleQueryClient.CurrentCyclelistQuery(ctx, &oracletypes.QueryCurrentCyclelistQueryRequest{}) if err != nil { - return "", fmt.Errorf("error calling 'CurrentCyclelistQuery': %v", err) - } - qid, err := utils.QueryIDFromDataString(response.Querydata) - if err != nil { - return "", fmt.Errorf("error getting query id from data string: %v", err) + return nil, fmt.Errorf("error calling 'CurrentCyclelistQuery': %v", err) } + qid := utils.QueryIDFromData(response.QueryData) c.logger.Info("ReporterDaemon", "next query id in cycle list", hex.EncodeToString(qid)) - return strings.ToLower(response.Querydata), nil + return response.QueryData, nil } diff --git a/daemons/reporter/client/median.go b/daemons/reporter/client/median.go index 60f624825..43e554c5c 100644 --- a/daemons/reporter/client/median.go +++ b/daemons/reporter/client/median.go @@ -1,6 +1,7 @@ package client import ( + "encoding/hex" "fmt" "strings" "time" @@ -9,7 +10,7 @@ import ( "github.com/tellor-io/layer/lib/prices" ) -func (c *Client) median(querydata string) (string, error) { +func (c *Client) median(querydata []byte) (string, error) { params := c.MarketParams exchPrices := c.MarketToExchange mapping := exchPrices.GetValidMedianPrices(params, time.Now()) @@ -19,7 +20,9 @@ func (c *Client) median(querydata string) (string, error) { for _, marketParam := range c.MarketParams { mapQueryDataToMarketParams[strings.ToLower(marketParam.QueryData)] = marketParam } - mp, found := mapQueryDataToMarketParams[querydata] + + key := hex.EncodeToString(querydata) + mp, found := mapQueryDataToMarketParams[key] if !found { return "", fmt.Errorf("no market param found for query data: %s", querydata) } diff --git a/daemons/server/median/median.go b/daemons/server/median/median.go index a694d092b..6fb3690be 100644 --- a/daemons/server/median/median.go +++ b/daemons/server/median/median.go @@ -2,6 +2,7 @@ package median import ( "context" + "encoding/hex" "fmt" "strings" "time" @@ -54,7 +55,7 @@ func (s *medianServer) GetAllMedianValues(ctx context.Context, req *types.GetAll func (s *medianServer) GetMedianValue(ctx context.Context, req *types.GetMedianValueRequest) (*types.GetMedianValueResponse, error) { // check if query data exists in map - mp, found := s.queryDataTomarketParams[req.QueryData] + mp, found := s.queryDataTomarketParams[hex.EncodeToString(req.QueryData)] if !found { return nil, fmt.Errorf("no market param found for query data: %s", req.QueryData) } diff --git a/daemons/server/types/median_values.pb.go b/daemons/server/types/median_values.pb.go index ade85febb..ecb46f0b2 100644 --- a/daemons/server/types/median_values.pb.go +++ b/daemons/server/types/median_values.pb.go @@ -176,7 +176,7 @@ func (m *GetAllMedianValuesResponse) GetMedianValues() []*MedianValues { // GetMedianValuesRequest is the request for the GetMedianValues rpc type GetMedianValueRequest struct { // query data to fetch prices for - QueryData string `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` + QueryData []byte `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` } func (m *GetMedianValueRequest) Reset() { *m = GetMedianValueRequest{} } @@ -212,11 +212,11 @@ func (m *GetMedianValueRequest) XXX_DiscardUnknown() { var xxx_messageInfo_GetMedianValueRequest proto.InternalMessageInfo -func (m *GetMedianValueRequest) GetQueryData() string { +func (m *GetMedianValueRequest) GetQueryData() []byte { if m != nil { return m.QueryData } - return "" + return nil } // GetMedianValueResponse is the response for the GetMedianValue rpc @@ -277,7 +277,7 @@ func init() { proto.RegisterFile("layer/daemons/median_values.proto", fileDescri var fileDescriptor_9b64c378347d9f4f = []byte{ // 437 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x41, 0x8b, 0xd3, 0x40, - 0x14, 0xee, 0x74, 0x5d, 0xd9, 0x8e, 0x5b, 0x0f, 0xe3, 0x2a, 0x31, 0xd5, 0x10, 0x83, 0x42, 0x14, + 0x14, 0xee, 0x74, 0x5d, 0xd9, 0x1d, 0x5b, 0x0f, 0xe3, 0x2a, 0x31, 0xd5, 0x10, 0x83, 0x42, 0x14, 0xcc, 0xc8, 0x0a, 0x9e, 0x55, 0x84, 0xa5, 0x07, 0x2f, 0x11, 0x3c, 0x14, 0x34, 0x4c, 0x9b, 0x47, 0x0c, 0x4e, 0x66, 0xd2, 0xc9, 0xa4, 0x58, 0xc4, 0x8b, 0x7f, 0x40, 0xa1, 0xbf, 0xc7, 0xbb, 0xc7, 0x82, 0x17, 0x8f, 0xd2, 0xfa, 0x43, 0xa4, 0x93, 0xa0, 0x49, 0x6b, 0xd1, 0xbd, 0xe5, 0xcd, 0xfb, @@ -285,14 +285,14 @@ var fileDescriptor_9b64c378347d9f4f = []byte{ 0x34, 0x83, 0x38, 0x65, 0x22, 0x9a, 0x31, 0x5e, 0x42, 0x11, 0xe4, 0x4a, 0x6a, 0x49, 0xfa, 0x06, 0x12, 0xd4, 0x10, 0xfb, 0x24, 0x91, 0x89, 0x34, 0x1d, 0xba, 0xf9, 0xaa, 0x40, 0xf6, 0x8d, 0x44, 0xca, 0x84, 0x03, 0x65, 0x79, 0x4a, 0x99, 0x10, 0x52, 0x33, 0x9d, 0x4a, 0x51, 0x53, 0x78, 0xaf, - 0xf0, 0xf1, 0x73, 0xc3, 0xfc, 0xd2, 0x10, 0x93, 0x01, 0xee, 0x65, 0x4c, 0xbd, 0x05, 0x1d, 0xa5, + 0x70, 0xef, 0xb9, 0x61, 0x7e, 0x69, 0x88, 0xc9, 0x00, 0x1f, 0x67, 0x4c, 0xbd, 0x05, 0x1d, 0xa5, 0xb1, 0x85, 0x5c, 0xe4, 0xf7, 0xc3, 0xa3, 0xea, 0x60, 0x18, 0x93, 0x13, 0x7c, 0x98, 0xab, 0x74, 0x02, 0x56, 0xd7, 0x45, 0xfe, 0x85, 0xb0, 0x2a, 0x88, 0x8d, 0x8f, 0xe0, 0x5d, 0x2e, 0x05, 0x08, 0x6d, 0x1d, 0xb8, 0xc8, 0x3f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ce, 0xf7, 0xb5, 0xd3, 0x19, 0xd1, 0x24, 0xd5, 0x6f, 0xca, 0x71, 0x30, 0x91, 0x19, 0xd5, 0xc0, 0xb9, 0x54, 0xf7, 0x53, 0x49, 0xdb, 0x4b, 0x54, 0x80, 0x9a, 0x81, 0xa2, 0x7a, 0x9e, - 0x43, 0x31, 0xbe, 0x68, 0x36, 0xe0, 0xe1, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd8, 0xe9, 0xa4, - 0xbf, 0x69, 0x03, 0x00, 0x00, + 0x43, 0x31, 0xbe, 0x68, 0x36, 0xe0, 0xe1, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0e, 0xaf, 0x89, + 0x50, 0x69, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -948,7 +948,7 @@ func (m *GetMedianValueRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMedianValues @@ -958,23 +958,25 @@ func (m *GetMedianValueRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthMedianValues } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthMedianValues } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryData = string(dAtA[iNdEx:postIndex]) + m.QueryData = append(m.QueryData[:0], dAtA[iNdEx:postIndex]...) + if m.QueryData == nil { + m.QueryData = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex diff --git a/daemons/server/types/median_values.pb.gw.go b/daemons/server/types/median_values.pb.gw.go index 8212c2080..bde77f516 100644 --- a/daemons/server/types/median_values.pb.gw.go +++ b/daemons/server/types/median_values.pb.gw.go @@ -67,7 +67,7 @@ func request_MedianValuesService_GetMedianValue_0(ctx context.Context, marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_data") } - protoReq.QueryData, err = runtime.String(val) + protoReq.QueryData, err = runtime.Bytes(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_data", err) @@ -94,7 +94,7 @@ func local_request_MedianValuesService_GetMedianValue_0(ctx context.Context, mar return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_data") } - protoReq.QueryData, err = runtime.String(val) + protoReq.QueryData, err = runtime.Bytes(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_data", err) diff --git a/proto/layer/bridge/query.proto b/proto/layer/bridge/query.proto index ca5108eab..42b41c853 100644 --- a/proto/layer/bridge/query.proto +++ b/proto/layer/bridge/query.proto @@ -41,7 +41,7 @@ service Query { } rpc GetOracleAttestations (QueryGetOracleAttestationsRequest) returns (QueryGetOracleAttestationsResponse) { - option (google.api.http).get = "/layer/bridge/get_oracle_attestations/{queryId}/{timestamp}"; + option (google.api.http).get = "/layer/bridge/get_oracle_attestations/{query_id}/{timestamp}"; } rpc GetEvmAddressByValidatorAddress (QueryGetEvmAddressByValidatorAddressRequest) returns (QueryGetEvmAddressByValidatorAddressResponse) { @@ -53,15 +53,15 @@ service Query { } rpc GetCurrentAggregateReport (QueryGetCurrentAggregateReportRequest) returns (QueryGetCurrentAggregateReportResponse) { - option (google.api.http).get = "/layer/bridge/get_current_aggregate_report/{queryId}"; + option (google.api.http).get = "/layer/bridge/get_current_aggregate_report/{query_id}"; } rpc GetDataBefore (QueryGetDataBeforeRequest) returns (QueryGetDataBeforeResponse) { - option (google.api.http).get = "/layer/bridge/get_data_before/{queryId}/{timestamp}"; + option (google.api.http).get = "/layer/bridge/get_data_before/{query_id}/{timestamp}"; } // rpc GetCurrentAggregateReportTest (QueryGetCurrentAggregateReportTestRequest) returns (QueryGetCurrentAggregateReportTestResponse) { - // option (google.api.http).get = "/layer/bridge/get_current_aggregate_report_test/{queryId}"; + // option (google.api.http).get = "/layer/bridge/get_current_aggregate_report_test/{query_id}"; // } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -141,7 +141,7 @@ message QueryGetValsetSigsResponse { } message QueryGetOracleAttestationsRequest { - string queryId = 1; + bytes query_id = 1; int64 timestamp = 2; } @@ -166,7 +166,7 @@ message QueryGetValsetByTimestampResponse { } message QueryGetCurrentAggregateReportRequest { - string queryId = 1; + bytes query_id = 1; } message QueryGetCurrentAggregateReportResponse { @@ -176,7 +176,7 @@ message QueryGetCurrentAggregateReportResponse { message Aggregate { - string queryId = 1; + bytes query_id = 1; string aggregateValue = 2; string aggregateReporter = 3; int64 reporterPower = 4; @@ -194,7 +194,7 @@ message AggregateReporter { } message QueryGetDataBeforeRequest { - string queryId = 1; + bytes query_id = 1; int64 timestamp = 2; } @@ -204,7 +204,7 @@ message QueryGetDataBeforeResponse { } // message QueryGetCurrentAggregateReportTestRequest { -// string queryId = 1; +// bytes query_id = 1; // } // message QueryGetCurrentAggregateReportTestResponse { diff --git a/proto/layer/bridge/tx.proto b/proto/layer/bridge/tx.proto index e67808dfc..42a177fa8 100644 --- a/proto/layer/bridge/tx.proto +++ b/proto/layer/bridge/tx.proto @@ -34,7 +34,7 @@ message MsgSubmitOracleAttestation { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; - string queryId = 2; + bytes query_id = 2; string timestamp = 3; string signature = 4; } diff --git a/proto/layer/daemons/median_values.proto b/proto/layer/daemons/median_values.proto index ddc2e6c45..469d47887 100644 --- a/proto/layer/daemons/median_values.proto +++ b/proto/layer/daemons/median_values.proto @@ -38,7 +38,7 @@ message GetAllMedianValuesResponse { // GetMedianValuesRequest is the request for the GetMedianValues rpc message GetMedianValueRequest { // query data to fetch prices for - string query_data = 1; + bytes query_data = 1; } // GetMedianValueResponse is the response for the GetMedianValue rpc diff --git a/proto/layer/oracle/aggregate.proto b/proto/layer/oracle/aggregate.proto index aa563bb21..90ae94881 100644 --- a/proto/layer/oracle/aggregate.proto +++ b/proto/layer/oracle/aggregate.proto @@ -8,7 +8,7 @@ import "layer/oracle/aggregate_reporter.proto"; option go_package = "github.com/tellor-io/layer/x/oracle/types"; message Aggregate { - string queryId = 1; + bytes query_id = 1; string aggregateValue = 2; string aggregateReporter = 3; int64 reporterPower = 4; diff --git a/proto/layer/oracle/commit_report.proto b/proto/layer/oracle/commit_report.proto index 1ddafada7..c87fb80ea 100644 --- a/proto/layer/oracle/commit_report.proto +++ b/proto/layer/oracle/commit_report.proto @@ -7,7 +7,7 @@ option go_package = "github.com/tellor-io/layer/x/oracle/types"; message Commit { string reporter = 1; - bytes queryId = 2; + bytes query_id = 2; string hash = 3; bool incycle = 4; } diff --git a/proto/layer/oracle/genesis.proto b/proto/layer/oracle/genesis.proto index 317ceaba5..10249641b 100644 --- a/proto/layer/oracle/genesis.proto +++ b/proto/layer/oracle/genesis.proto @@ -9,5 +9,5 @@ option go_package = "github.com/tellor-io/layer/x/oracle/types"; // GenesisState defines the oracle module's genesis state. message GenesisState { Params params = 1 [(gogoproto.nullable) = false]; - repeated string cyclelist = 2 [(gogoproto.nullable) = false]; + repeated bytes cyclelist = 2 [(gogoproto.nullable) = false]; } diff --git a/proto/layer/oracle/micro_report.proto b/proto/layer/oracle/micro_report.proto index c6bccffc4..aca5b998a 100644 --- a/proto/layer/oracle/micro_report.proto +++ b/proto/layer/oracle/micro_report.proto @@ -15,7 +15,7 @@ message MicroReport { // string identifier of the data spec string query_type = 3; // hash of the query data - string query_id = 4; + bytes query_id = 4; // aggregate method to use for aggregating all the reports for the query id string aggregate_method = 5; // hex string of the response value diff --git a/proto/layer/oracle/query.proto b/proto/layer/oracle/query.proto index 2c0cb2de9..21c01d848 100644 --- a/proto/layer/oracle/query.proto +++ b/proto/layer/oracle/query.proto @@ -27,7 +27,7 @@ service Query { // Queries a list of GetReportsbyQid items. rpc GetReportsbyQid (QueryGetReportsbyQidRequest ) returns (QueryGetReportsbyQidResponse ) { - option (google.api.http).get = "/layer/oracle/get_reportsby_qid/{queryId}"; + option (google.api.http).get = "/layer/oracle/get_reportsby_qid/{query_id}"; } rpc GetReportsbyReporter (QueryGetReportsbyReporterRequest ) returns (QueryGetReportsbyReporterResponse) { @@ -35,31 +35,31 @@ service Query { } rpc GetReportsbyReporterQid (QueryGetReportsbyReporterQidRequest) returns (QueryGetReportsbyQidResponse ) { - option (google.api.http).get = "/layer/oracle/get_reportsby_reporter_qid/{reporter}/{queryId}"; + option (google.api.http).get = "/layer/oracle/get_reportsby_reporter_qid/{reporter}/{query_id}"; } // Queries a list of GetCurrentTip items. rpc GetCurrentTip (QueryGetCurrentTipRequest) returns (QueryGetCurrentTipResponse) { - option (google.api.http).get = "/tellor-io/layer/oracle/get_current_tip/{queryData}"; + option (google.api.http).get = "/tellor-io/layer/oracle/get_current_tip/{query_data}"; } // Queries a list of GetUserTipTotal items. rpc GetUserTipTotal (QueryGetUserTipTotalRequest) returns (QueryGetUserTipTotalResponse) { - option (google.api.http).get = "/tellor-io/layer/oracle/get_user_tip_total/{tipper}/{queryData}"; + option (google.api.http).get = "/tellor-io/layer/oracle/get_user_tip_total/{tipper}/{query_data}"; } // Queries a list of GetAggregatedReport items. rpc GetAggregatedReport (QueryGetCurrentAggregatedReportRequest) returns (QueryGetAggregatedReportResponse) { - option (google.api.http).get = "/tellor-io/layer/oracle/get_aggregated_report/{queryId}"; + option (google.api.http).get = "/tellor-io/layer/oracle/get_aggregated_report/{query_id}"; } // Queries a list of GetAggregatedReport items. rpc GetDataBefore (QueryGetDataBeforeRequest) returns (QueryGetAggregatedReportResponse) { - option (google.api.http).get = "/tellor-io/layer/oracle/GetDataBefore/{queryId}/{timestamp}"; + option (google.api.http).get = "/tellor-io/layer/oracle/GetDataBefore/{query_id}/{timestamp}"; } @@ -86,7 +86,7 @@ message QueryParamsResponse { } message QueryGetReportsbyQidRequest { - string queryId = 1; + bytes query_id = 1; } message QueryGetReportsbyQidResponse { @@ -103,11 +103,11 @@ message QueryGetReportsbyReporterResponse { message QueryGetReportsbyReporterQidRequest { string reporter = 1; - string queryId = 2; + bytes query_id = 2; } message QueryGetCurrentTipRequest { - string queryData = 1; + bytes query_data = 1; } message QueryGetCurrentTipResponse { @@ -116,7 +116,7 @@ message QueryGetCurrentTipResponse { message QueryGetUserTipTotalRequest { string tipper = 1; - string queryData = 2; + bytes query_data = 2; } message QueryGetUserTipTotalResponse { @@ -124,7 +124,7 @@ message QueryGetUserTipTotalResponse { } message QueryGetCurrentAggregatedReportRequest { - string queryId = 1; + bytes query_id = 1; } message QueryGetAggregatedReportResponse { @@ -132,7 +132,7 @@ message QueryGetAggregatedReportResponse { } message QueryGetDataBeforeRequest { - string queryId = 1; + bytes query_id = 1; int64 timestamp = 2; } @@ -145,6 +145,6 @@ message QueryGetTimeBasedRewardsResponse { message QueryCurrentCyclelistQueryRequest {} message QueryCurrentCyclelistQueryResponse { - string querydata = 1; + bytes query_data = 1; } diff --git a/proto/layer/oracle/query_id_timestamp_pair.proto b/proto/layer/oracle/query_id_timestamp_pair.proto index febf62b8c..68441ce3f 100644 --- a/proto/layer/oracle/query_id_timestamp_pair.proto +++ b/proto/layer/oracle/query_id_timestamp_pair.proto @@ -4,7 +4,7 @@ package layer.oracle; option go_package = "github.com/tellor-io/layer/x/oracle/types"; message QueryIdTimestampPair { - string queryId = 1; + bytes query_id = 1; int64 timestamp = 2; } diff --git a/proto/layer/oracle/tips.proto b/proto/layer/oracle/tips.proto index c7c145440..723ab002b 100644 --- a/proto/layer/oracle/tips.proto +++ b/proto/layer/oracle/tips.proto @@ -9,8 +9,8 @@ option go_package = "github.com/tellor-io/layer/x/oracle/types"; // Tips is a struct that contains the query data and the amount it was tipped message Tips { - // queryData is the query data that was tipped - string query_data = 1; + // query_data is the query data that was tipped + bytes query_data = 1; // the amount that was tipped string amount = 2 [ (cosmos_proto.scalar) = "cosmos.Int", diff --git a/proto/layer/oracle/tx.proto b/proto/layer/oracle/tx.proto index 57965329c..7c396ea85 100644 --- a/proto/layer/oracle/tx.proto +++ b/proto/layer/oracle/tx.proto @@ -43,7 +43,7 @@ message MsgUpdateParamsResponse {} message MsgSubmitValue { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; - string query_data = 2; + bytes query_data = 2; string value = 3; string salt = 4; // hex encoded 32 bytes salt } @@ -53,7 +53,7 @@ message MsgSubmitValueResponse {} message MsgCommitReport { option (cosmos.msg.v1.signer) = "creator"; string creator = 1; - string query_data = 2; + bytes query_data = 2; string hash = 3; // hex encoded sha256 of "salt:value" } @@ -62,7 +62,7 @@ message MsgCommitReportResponse {} message MsgTip { option (cosmos.msg.v1.signer) = "tipper"; string tipper = 1; - string query_data = 2; + bytes query_data = 2; cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; } @@ -76,7 +76,7 @@ message MsgUpdateCyclelist { // authority is the address that controls the module (defaults to x/gov unless overwritten). string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // list of query data hex strings - repeated string cyclelist = 2; + repeated bytes cyclelist = 2; } // MsgUpdateCycleResponse defines the Msg/UpdateCycle response type. diff --git a/proto/layer/registry/query.proto b/proto/layer/registry/query.proto index dfcf631ff..1e1164766 100644 --- a/proto/layer/registry/query.proto +++ b/proto/layer/registry/query.proto @@ -23,7 +23,7 @@ service Query { // Queries a list of DecodeQuerydata items. rpc DecodeQuerydata(QueryDecodeQuerydataRequest) returns (QueryDecodeQuerydataResponse) { - option (google.api.http).get = "/layer/registry/decode_querydata/{querydata}"; + option (google.api.http).get = "/layer/registry/decode_querydata/{query_data}"; } // Queries a list of GenerateQuerydata items. @@ -60,8 +60,8 @@ message QueryGetDataSpecResponse { // QueryDecodeQuerydataRequest is request type for the Query/DecodeQuerydata RPC method. message QueryDecodeQuerydataRequest { - // querydata is the query data hex string to be decoded. - string querydata = 1; + // query_data is the query data hex string to be decoded. + bytes query_data = 1; } // QueryDecodeQuerydataResponse is response type for the Query/DecodeQuerydata RPC method. @@ -72,17 +72,17 @@ message QueryDecodeQuerydataResponse { // QueryGenerateQuerydataRequest is request type for the Query/GenerateQuerydata RPC method. message QueryGenerateQuerydataRequest { - // querytype for which querydata is to be generated. + // querytype for which query_data is to be generated. string querytype = 1; - // parameters for which querydata is to be generated. + // parameters for which query_data is to be generated. string parameters = 2; } // QueryGenerateQuerydataResponse is response type for the Query/GenerateQuerydata RPC method. message QueryGenerateQuerydataResponse { - // querydata is the generated querydata hex string. - string querydata = 1; + // query_data is the generated query_data hex string. + bytes query_data = 1; } // QueryDecodeValueRequest is request type for the Query/DecodeValue RPC method. diff --git a/tests/integration/dispute_keeper_test.go b/tests/integration/dispute_keeper_test.go index 74495689a..5a877b4f2 100644 --- a/tests/integration/dispute_keeper_test.go +++ b/tests/integration/dispute_keeper_test.go @@ -2,6 +2,7 @@ package integration_test import ( "bytes" + "encoding/hex" "time" "cosmossdk.io/collections" @@ -32,10 +33,11 @@ func (s *IntegrationTestSuite) TestVotingOnDispute() { s.NoError(err) // assemble report with reporter to dispute + qId, _ := hex.DecodeString("83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992") report := oracletypes.MicroReport{ Reporter: repAcc.String(), Power: 100, - QueryId: "83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992", + QueryId: qId, Value: "000000000000000000000000000000000000000000000058528649cf80ee0000", Timestamp: time.Unix(1696516597, 0), } @@ -110,10 +112,11 @@ func (s *IntegrationTestSuite) TestProposeDisputeFromBond() { _, err := createReporterStakedWithValidator(s.ctx, s.reporterkeeper, s.stakingKeeper, valAddr, delegators, commission, stakeAmount) s.NoError(err) + qId, _ := hex.DecodeString("83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992") report := oracletypes.MicroReport{ Reporter: repAcc.String(), Power: 100, - QueryId: "83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992", + QueryId: qId, Value: "000000000000000000000000000000000000000000000058528649cf80ee0000", Timestamp: time.Unix(1696516597, 0), BlockNumber: s.ctx.BlockHeight(), @@ -162,10 +165,11 @@ func (s *IntegrationTestSuite) TestExecuteVoteInvalid() { _, err := createReporterStakedWithValidator(s.ctx, s.reporterkeeper, s.stakingKeeper, valAddr, delegators, commission, stakeAmount) s.NoError(err) + qId, _ := hex.DecodeString("83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992") report := oracletypes.MicroReport{ Reporter: repAcc.String(), Power: 100, - QueryId: "83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992", + QueryId: qId, Value: "000000000000000000000000000000000000000000000058528649cf80ee0000", Timestamp: time.Unix(1696516597, 0), } @@ -256,10 +260,11 @@ func (s *IntegrationTestSuite) TestExecuteVoteNoQuorumInvalid() { reporter, err := createReporterStakedWithValidator(s.ctx, s.reporterkeeper, s.stakingKeeper, valAddr, delegators, commission, stakeAmount) s.NoError(err) + qId, _ := hex.DecodeString("83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992") report := oracletypes.MicroReport{ Reporter: repAcc.String(), Power: 100, - QueryId: "83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992", + QueryId: qId, Value: "000000000000000000000000000000000000000000000058528649cf80ee0000", Timestamp: time.Unix(1696516597, 0), } @@ -334,10 +339,12 @@ func (s *IntegrationTestSuite) TestExecuteVoteSupport() { } _, err = oracleServer.Tip(s.ctx, &msg) s.Nil(err) + + qId, _ := hex.DecodeString("83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992") report := oracletypes.MicroReport{ Reporter: repAcc.String(), Power: 100, - QueryId: "83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992", + QueryId: qId, Value: "000000000000000000000000000000000000000000000058528649cf80ee0000", Timestamp: time.Unix(1696516597, 0), } @@ -455,10 +462,11 @@ func (s *IntegrationTestSuite) TestExecuteVoteAgainst() { _, err = oracleServer.Tip(s.ctx, &msg) s.Nil(err) + qId, _ := hex.DecodeString("83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992") report := oracletypes.MicroReport{ Reporter: repAcc.String(), Power: 100, - QueryId: "83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992", + QueryId: qId, Value: "000000000000000000000000000000000000000000000058528649cf80ee0000", Timestamp: time.Unix(1696516597, 0), } diff --git a/tests/integration/keeper_test.go b/tests/integration/keeper_test.go index 0ee8feffb..271b2d1c0 100644 --- a/tests/integration/keeper_test.go +++ b/tests/integration/keeper_test.go @@ -75,10 +75,10 @@ import ( integration "github.com/tellor-io/layer/tests" ) -const ( - ethQueryData = "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706f745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003657468000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" - btcQueryData = "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706f745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003627463000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" - trbQueryData = "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706f745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003747262000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" +var ( + ethQueryData, _ = hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706f745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003657468000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000") + btcQueryData, _ = hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706f745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003627463000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000") + trbQueryData, _ = hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706f745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003747262000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000") ) type IntegrationTestSuite struct { diff --git a/tests/integration/oracle_keeper_test.go b/tests/integration/oracle_keeper_test.go index 35a140c89..56cf11e0e 100644 --- a/tests/integration/oracle_keeper_test.go +++ b/tests/integration/oracle_keeper_test.go @@ -2,7 +2,6 @@ package integration_test import ( "encoding/hex" - "strings" "testing" "time" @@ -40,8 +39,7 @@ func (s *IntegrationTestSuite) TestTipping() { _, err := msgServer.Tip(s.ctx, &msg) s.NoError(err) - queryId, err := utils.QueryIDFromDataString(ethQueryData) - s.NoError(err) + queryId := utils.QueryIDFromData(ethQueryData) tips, err := s.oraclekeeper.GetQueryTip(s.ctx, queryId) s.NoError(err) @@ -67,8 +65,8 @@ func (s *IntegrationTestSuite) TestTipping() { s.Equal(userTips.Total, tips) // tip different query - btcQueryId, err := utils.QueryIDFromDataString(btcQueryData) - s.NoError(err) + btcQueryId := utils.QueryIDFromData(btcQueryData) + _, err = msgServer.Tip(s.ctx, &types.MsgTip{QueryData: btcQueryData, Tipper: addr.String(), Amount: tip}) s.NoError(err) tips, err = s.oraclekeeper.GetQueryTip(s.ctx, btcQueryId) @@ -121,8 +119,7 @@ func (s *IntegrationTestSuite) TestTippingReporting() { _, err := msgServer.Tip(s.ctx, &msg) s.NoError(err) - queryId, err := utils.QueryIDFromDataString(ethQueryData) - s.NoError(err) + queryId := utils.QueryIDFromData(ethQueryData) tips, err := s.oraclekeeper.GetQueryTip(s.ctx, queryId) s.NoError(err) @@ -143,7 +140,7 @@ func (s *IntegrationTestSuite) TestTippingReporting() { s.ctx = s.ctx.WithBlockTime(s.ctx.BlockTime().Add(time.Second * 7)) // bypassing offset that expires time to commit/reveal err = s.oraclekeeper.SetAggregatedReport(s.ctx) s.Nil(err) - res, err := s.oraclekeeper.GetAggregatedReport(s.ctx, &types.QueryGetCurrentAggregatedReportRequest{QueryId: hex.EncodeToString(queryId)}) + res, err := s.oraclekeeper.GetAggregatedReport(s.ctx, &types.QueryGetCurrentAggregatedReportRequest{QueryId: queryId}) s.Nil(err) s.Equal(res.Report.AggregateReporter, newReporter.String()) // tip should be 0 after aggregated report @@ -273,7 +270,7 @@ func (s *IntegrationTestSuite) TestMedianReports() { s.ctx = s.ctx.WithBlockTime(s.ctx.BlockTime().Add(time.Second * 7)) // bypass time to expire query so it can be aggregated s.app.EndBlocker(s.ctx) // EndBlocker aggregates reports // check median - qId := "83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992" + qId, _ := hex.DecodeString("83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992") res, err := s.oraclekeeper.GetAggregatedReport(s.ctx, &types.QueryGetCurrentAggregatedReportRequest{QueryId: qId}) s.Nil(err) expectedMedianReporterIndex := 4 @@ -282,7 +279,7 @@ func (s *IntegrationTestSuite) TestMedianReports() { s.Equal(reporters[expectedMedianReporterIndex].value, res.Report.AggregateValue) } -func report(creator, value, salt, hash, qdata string) (types.MsgCommitReport, types.MsgSubmitValue) { +func report(creator, value, salt, hash string, qdata []byte) (types.MsgCommitReport, types.MsgSubmitValue) { commit := types.MsgCommitReport{ Creator: creator, QueryData: qdata, @@ -302,12 +299,12 @@ func (s *IntegrationTestSuite) TestGetCylceListQueries() { // Get supported queries resp, err := s.oraclekeeper.GetCyclelist(s.ctx) s.NoError(err) - s.Equal(resp, []string{trbQueryData[2:], ethQueryData[2:], btcQueryData[2:]}) + s.Equal(resp, [][]byte{trbQueryData, ethQueryData, btcQueryData}) - matic := "00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000056D6174696300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" + matic, _ := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000056D6174696300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000") msgContent := &types.MsgUpdateCyclelist{ Authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), - Cyclelist: []string{matic}, + Cyclelist: [][]byte{matic}, } proposal1, err := s.govKeeper.SubmitProposal(s.ctx, []sdk.Msg{msgContent}, "", "test", "description", accs[0], false) s.NoError(err) @@ -335,7 +332,7 @@ func (s *IntegrationTestSuite) TestGetCylceListQueries() { s.True(proposal1.Status == v1.StatusPassed) resp, err = s.oraclekeeper.GetCyclelist(s.ctx) s.NoError(err) - s.Equal([]string{strings.ToLower(matic)}, resp) + s.Equal([][]byte{matic}, resp) } func (s *IntegrationTestSuite) TestTimeBasedRewardsOneReporter() { @@ -346,21 +343,20 @@ func (s *IntegrationTestSuite) TestTimeBasedRewardsOneReporter() { s.NoError(err) // testing for a query id and check if the reporter gets the reward, bypassing the commit/reveal process - qId, err := utils.QueryIDFromDataString(ethQueryData) - s.NoError(err) + qId := utils.QueryIDFromData(ethQueryData) value := []string{"000001"} reporterPower := int64(1) addr, err := createReporter(s.ctx, 1, s.reporterkeeper) s.NoError(err) - reports := testutil.GenerateReports([]sdk.AccAddress{addr}, value, []int64{reporterPower}, hex.EncodeToString(qId)) + reports := testutil.GenerateReports([]sdk.AccAddress{addr}, value, []int64{reporterPower}, qId) bal1 := s.bankKeeper.GetBalance(s.ctx, addr, s.denom) _, err = s.oraclekeeper.WeightedMedian(s.ctx, reports[:1]) s.NoError(err) - res, err := s.oraclekeeper.GetAggregatedReport(s.ctx, &types.QueryGetCurrentAggregatedReportRequest{QueryId: hex.EncodeToString(qId)}) + res, err := s.oraclekeeper.GetAggregatedReport(s.ctx, &types.QueryGetCurrentAggregatedReportRequest{QueryId: qId}) s.NoError(err) s.Equal(res.Report.AggregateReportIndex, int64(0), "single report should be at index 0") @@ -386,8 +382,8 @@ func (s *IntegrationTestSuite) TestTimeBasedRewardsTwoReporters() { err := s.bankKeeper.SendCoinsFromAccountToModule(s.ctx, tipper, minttypes.TimeBasedRewards, sdk.NewCoins(sdk.NewCoin(s.denom, reward))) s.NoError(err) - qId, err := utils.QueryIDFromDataString(ethQueryData) - s.NoError(err) + qId := utils.QueryIDFromData(ethQueryData) + value := []string{"000001", "000002"} reporterPower1 := int64(1) reporterPower2 := int64(2) @@ -399,7 +395,7 @@ func (s *IntegrationTestSuite) TestTimeBasedRewardsTwoReporters() { s.NoError(err) // generate 2 reports for ethQueryData - reports := testutil.GenerateReports([]sdk.AccAddress{reporterAddr, reporterAddr2}, value, []int64{reporterPower1, reporterPower2}, hex.EncodeToString(qId)) + reports := testutil.GenerateReports([]sdk.AccAddress{reporterAddr, reporterAddr2}, value, []int64{reporterPower1, reporterPower2}, qId) testCases := []struct { name string @@ -426,7 +422,7 @@ func (s *IntegrationTestSuite) TestTimeBasedRewardsTwoReporters() { _, err = s.oraclekeeper.WeightedMedian(s.ctx, reports) s.NoError(err) - res, err := s.oraclekeeper.GetAggregatedReport(s.ctx, &types.QueryGetCurrentAggregatedReportRequest{QueryId: hex.EncodeToString(qId)}) + res, err := s.oraclekeeper.GetAggregatedReport(s.ctx, &types.QueryGetCurrentAggregatedReportRequest{QueryId: qId}) s.NoError(err, "error getting aggregated report") tbr, err := s.oraclekeeper.GetTimeBasedRewards(s.ctx, &types.QueryGetTimeBasedRewardsRequest{}) s.NoError(err, "error getting time based rewards") @@ -465,9 +461,8 @@ func (s *IntegrationTestSuite) TestTimeBasedRewardsThreeReporters() { s.NoError(err) // generate 4 reports for ethQueryData - qId, err := utils.QueryIDFromDataString(ethQueryData) - s.NoError(err) - reports := testutil.GenerateReports([]sdk.AccAddress{reporterAddr, reporterAddr2, reporterAddr3}, values, []int64{reporterPower1, reporterPower2, reporterPower3}, hex.EncodeToString(qId)) + qId := utils.QueryIDFromData(ethQueryData) + reports := testutil.GenerateReports([]sdk.AccAddress{reporterAddr, reporterAddr2, reporterAddr3}, values, []int64{reporterPower1, reporterPower2, reporterPower3}, qId) testCases := []struct { name string @@ -500,7 +495,7 @@ func (s *IntegrationTestSuite) TestTimeBasedRewardsThreeReporters() { } s.oraclekeeper.WeightedMedian(s.ctx, reports[:3]) - res, _ := s.oraclekeeper.GetAggregatedReport(s.ctx, &types.QueryGetCurrentAggregatedReportRequest{QueryId: hex.EncodeToString(qId)}) + res, _ := s.oraclekeeper.GetAggregatedReport(s.ctx, &types.QueryGetCurrentAggregatedReportRequest{QueryId: qId}) tbr, _ := s.oraclekeeper.GetTimeBasedRewards(s.ctx, &types.QueryGetTimeBasedRewardsRequest{}) err = s.oraclekeeper.AllocateRewards(s.ctx, res.Report.Reporters, tbr.Reward.Amount, false) s.NoError(err) @@ -524,8 +519,8 @@ func (s *IntegrationTestSuite) TestCommitQueryMixed() { // accs, _, _ := s.createValidatorAccs([]int64{100, 200, 300, 400, 500}) queryData1, err := s.oraclekeeper.GetCurrentQueryInCycleList(s.ctx) s.Nil(err) - queryData2 := "00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000056D6174696300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" - queryData3 := "00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000005737465746800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" + queryData2, _ := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000056D6174696300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000") + queryData3, _ := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000005737465746800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000") msg := types.MsgTip{ Tipper: tipper.String(), QueryData: queryData2, @@ -570,9 +565,8 @@ func (s *IntegrationTestSuite) TestTipQueryNotInCycleListSingleDelegator() { valAddr := valAddrs[0] delegators := repAccs[1:] - queryData := "00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000366696C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" - queryId, err := utils.QueryIDFromDataString(queryData) - s.Nil(err) + queryData, _ := utils.QueryBytesFromString("00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000366696C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000") + queryId := utils.QueryIDFromData(queryData) // tip. Using msgServer.Tip to handle the transfers and burning of tokens msg := types.MsgTip{ @@ -580,7 +574,7 @@ func (s *IntegrationTestSuite) TestTipQueryNotInCycleListSingleDelegator() { QueryData: queryData, Amount: sdk.NewCoin(s.denom, tipAmount), } - _, err = msgServer.Tip(s.ctx, &msg) + _, err := msgServer.Tip(s.ctx, &msg) s.Nil(err) // create createReporterStakedWithValidator handles the delegation and staking plus the reporter creation @@ -595,7 +589,7 @@ func (s *IntegrationTestSuite) TestTipQueryNotInCycleListSingleDelegator() { reporterPower := int64(1) value := []string{"000001"} - reports := testutil.GenerateReports(repAccs[1:], value, []int64{reporterPower}, hex.EncodeToString(queryId)) + reports := testutil.GenerateReports(repAccs[1:], value, []int64{reporterPower}, queryId) query, err := s.oraclekeeper.Query.Get(s.ctx, queryId) s.Nil(err) query.HasRevealedReports = true @@ -644,9 +638,8 @@ func (s *IntegrationTestSuite) TestTipQueryNotInCycleListTwoDelegators() { delegator1 := accs[1] delegator2 := accs[2] - queryData := "00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000366696C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" - queryId, err := utils.QueryIDFromDataString(queryData) - s.Nil(err) + queryData, _ := utils.QueryBytesFromString("00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000366696C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000") + queryId := utils.QueryIDFromData(queryData) // tip. Using msgServer.Tip to handle the transfers and burning of tokens msg := types.MsgTip{ @@ -654,7 +647,7 @@ func (s *IntegrationTestSuite) TestTipQueryNotInCycleListTwoDelegators() { QueryData: queryData, Amount: sdk.NewCoin(s.denom, tipAmount), } - _, err = msgServer.Tip(s.ctx, &msg) + _, err := msgServer.Tip(s.ctx, &msg) s.Nil(err) // create createReporterStakedWithValidator handles the delegation and staking plus the reporter creation with 50 percent commission @@ -676,7 +669,7 @@ func (s *IntegrationTestSuite) TestTipQueryNotInCycleListTwoDelegators() { reporterPower := int64(2) // normalize by sdk.DefaultPowerReduction value := []string{"000001"} - reports := testutil.GenerateReports([]sdk.AccAddress{repAcc}, value, []int64{reporterPower}, hex.EncodeToString(queryId)) + reports := testutil.GenerateReports([]sdk.AccAddress{repAcc}, value, []int64{reporterPower}, queryId) query, err := s.oraclekeeper.Query.Get(s.ctx, queryId) s.Nil(err) query.HasRevealedReports = true diff --git a/testutil/utils.go b/testutil/utils.go index 5c20678a1..50f05b482 100644 --- a/testutil/utils.go +++ b/testutil/utils.go @@ -1,28 +1,22 @@ package testutil import ( - "encoding/hex" "fmt" "math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tellor-io/layer/utils" oracletypes "github.com/tellor-io/layer/x/oracle/types" ) -func GenerateReports(reporters []sdk.AccAddress, values []string, powers []int64, qId string) []oracletypes.MicroReport { +func GenerateReports(reporters []sdk.AccAddress, values []string, powers []int64, queryId []byte) []oracletypes.MicroReport { var reports []oracletypes.MicroReport - queryId, err := utils.QueryBytesFromString(qId) - if err != nil { - panic(fmt.Sprintf("failed to decode query ID string: %v", err)) - } for i, reporter := range reporters { reports = append(reports, oracletypes.MicroReport{ Reporter: reporter.String(), Value: values[i], Power: powers[i], - QueryId: hex.EncodeToString(queryId), + QueryId: queryId, }) } return reports diff --git a/x/bridge/client/cli/query_get_current_aggregate_report.go b/x/bridge/client/cli/query_get_current_aggregate_report.go index 0f8fecad5..deb887fe1 100644 --- a/x/bridge/client/cli/query_get_current_aggregate_report.go +++ b/x/bridge/client/cli/query_get_current_aggregate_report.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" + "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/bridge/types" ) @@ -27,7 +28,12 @@ func CmdGetCurrentAggregateReport() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - params := &types.QueryGetCurrentAggregateReportRequest{QueryId: queryId} + qIdBz, err := utils.QueryBytesFromString(queryId) + if err != nil { + return err + } + + params := &types.QueryGetCurrentAggregateReportRequest{QueryId: qIdBz} res, err := queryClient.GetCurrentAggregateReport(cmd.Context(), params) if err != nil { diff --git a/x/bridge/client/cli/query_get_data_before.go b/x/bridge/client/cli/query_get_data_before.go index ebf1d0452..82c700c4d 100644 --- a/x/bridge/client/cli/query_get_data_before.go +++ b/x/bridge/client/cli/query_get_data_before.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" + "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/bridge/types" ) @@ -32,7 +33,12 @@ func CmdGetDataBefore() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - params := &types.QueryGetDataBeforeRequest{QueryId: queryId, Timestamp: timestampInt} + qIdBz, err := utils.QueryBytesFromString(queryId) + if err != nil { + return err + } + + params := &types.QueryGetDataBeforeRequest{QueryId: qIdBz, Timestamp: timestampInt} res, err := queryClient.GetDataBefore(cmd.Context(), params) if err != nil { diff --git a/x/bridge/client/cli/query_get_oracle_attestations.go b/x/bridge/client/cli/query_get_oracle_attestations.go index a0ffbcf96..2ee365584 100644 --- a/x/bridge/client/cli/query_get_oracle_attestations.go +++ b/x/bridge/client/cli/query_get_oracle_attestations.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" + "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/bridge/types" ) @@ -32,7 +33,12 @@ func CmdGetOracleAttestations() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - params := &types.QueryGetOracleAttestationsRequest{QueryId: queryId, Timestamp: timestamp} + qIdBz, err := utils.QueryBytesFromString(queryId) + if err != nil { + return err + } + + params := &types.QueryGetOracleAttestationsRequest{QueryId: qIdBz, Timestamp: timestamp} res, err := queryClient.GetOracleAttestations(cmd.Context(), params) if err != nil { diff --git a/x/bridge/keeper/keeper.go b/x/bridge/keeper/keeper.go index fa92347aa..18b71443d 100644 --- a/x/bridge/keeper/keeper.go +++ b/x/bridge/keeper/keeper.go @@ -41,7 +41,7 @@ type ( ValidatorCheckpointParamsMap collections.Map[uint64, types.ValidatorCheckpointParams] ValidatorCheckpointIdxMap collections.Map[uint64, types.CheckpointTimestamp] LatestCheckpointIdx collections.Item[types.CheckpointIdx] - OracleAttestationsMap collections.Map[string, types.OracleAttestations] + OracleAttestationsMap collections.Map[[]byte, types.OracleAttestations] BridgeValsetByTimestampMap collections.Map[uint64, types.BridgeValidatorSet] ValsetTimestampToIdxMap collections.Map[uint64, types.CheckpointIdx] @@ -70,7 +70,7 @@ func NewKeeper( ValidatorCheckpointParamsMap: collections.NewMap(sb, types.ValidatorCheckpointParamsMapKey, "validator_checkpoint_params_map", collections.Uint64Key, codec.CollValue[types.ValidatorCheckpointParams](cdc)), ValidatorCheckpointIdxMap: collections.NewMap(sb, types.ValidatorCheckpointIdxMapKey, "validator_checkpoint_idx_map", collections.Uint64Key, codec.CollValue[types.CheckpointTimestamp](cdc)), LatestCheckpointIdx: collections.NewItem(sb, types.LatestCheckpointIdxKey, "latest_checkpoint_idx", codec.CollValue[types.CheckpointIdx](cdc)), - OracleAttestationsMap: collections.NewMap(sb, types.OracleAttestationsMapKey, "oracle_attestations_map", collections.StringKey, codec.CollValue[types.OracleAttestations](cdc)), + OracleAttestationsMap: collections.NewMap(sb, types.OracleAttestationsMapKey, "oracle_attestations_map", collections.BytesKey, codec.CollValue[types.OracleAttestations](cdc)), BridgeValsetByTimestampMap: collections.NewMap(sb, types.BridgeValsetByTimestampMapKey, "bridge_valset_by_timestamp_map", collections.Uint64Key, codec.CollValue[types.BridgeValidatorSet](cdc)), ValsetTimestampToIdxMap: collections.NewMap(sb, types.ValsetTimestampToIdxMapKey, "valset_timestamp_to_idx_map", collections.Uint64Key, codec.CollValue[types.CheckpointIdx](cdc)), @@ -92,7 +92,7 @@ func (k Keeper) Logger(ctx context.Context) log.Logger { return sdkCtx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } -func (k Keeper) GetCurrentValidatorsEVMCompatible(ctx sdk.Context) ([]*types.BridgeValidator, error) { +func (k Keeper) GetCurrentValidatorsEVMCompatible(ctx context.Context) ([]*types.BridgeValidator, error) { validators, err := k.stakingKeeper.GetAllValidators(ctx) if err != nil { return nil, err @@ -127,7 +127,7 @@ func (k Keeper) GetCurrentValidatorsEVMCompatible(ctx sdk.Context) ([]*types.Bri return bridgeValset, nil } -func (k Keeper) GetCurrentValidatorSetEVMCompatible(ctx sdk.Context) (*types.BridgeValidatorSet, error) { +func (k Keeper) GetCurrentValidatorSetEVMCompatible(ctx context.Context) (*types.BridgeValidatorSet, error) { // use GetBridgeValidators to get the current bridge validator set bridgeValset, err := k.GetCurrentValidatorsEVMCompatible(ctx) if err != nil { @@ -138,7 +138,7 @@ func (k Keeper) GetCurrentValidatorSetEVMCompatible(ctx sdk.Context) (*types.Bri } // function for loading last saved bridge validator set and comparing it to current set -func (k Keeper) CompareBridgeValidators(ctx sdk.Context) (bool, error) { +func (k Keeper) CompareBridgeValidators(ctx context.Context) (bool, error) { // load current validator set in EVM compatible format currentValidatorSetEVMCompatible, err := k.GetCurrentValidatorSetEVMCompatible(ctx) if err != nil { @@ -180,14 +180,15 @@ func (k Keeper) CompareBridgeValidators(ctx sdk.Context) (bool, error) { } } -func (k Keeper) SetBridgeValidatorParams(ctx sdk.Context, bridgeValidatorSet *types.BridgeValidatorSet) error { +func (k Keeper) SetBridgeValidatorParams(ctx context.Context, bridgeValidatorSet *types.BridgeValidatorSet) error { var totalPower uint64 for _, validator := range bridgeValidatorSet.BridgeValidatorSet { totalPower += validator.GetPower() } powerThreshold := totalPower * 2 / 3 - validatorTimestamp := uint64(ctx.BlockTime().Unix()) + sdkCtx := sdk.UnwrapSDKContext(ctx) + validatorTimestamp := uint64(sdkCtx.BlockTime().Unix()) // calculate validator set hash _, validatorSetHash, err := k.EncodeAndHashValidatorSet(ctx, bridgeValidatorSet) @@ -259,7 +260,7 @@ func (k Keeper) SetBridgeValidatorParams(ctx sdk.Context, bridgeValidatorSet *ty } func (k Keeper) CalculateValidatorSetCheckpoint( - ctx sdk.Context, + ctx context.Context, powerThreshold uint64, validatorTimestamp uint64, validatorSetHash []byte, @@ -354,7 +355,7 @@ func (k Keeper) CalculateValidatorSetCheckpoint( return checkpoint, nil } -func (k Keeper) GetValidatorCheckpointFromStorage(ctx sdk.Context) (*types.ValidatorCheckpoint, error) { +func (k Keeper) GetValidatorCheckpointFromStorage(ctx context.Context) (*types.ValidatorCheckpoint, error) { checkpoint, err := k.ValidatorCheckpoint.Get(ctx) if err != nil { k.Logger(ctx).Error("Failed to get validator checkpoint", "error", err) @@ -363,7 +364,7 @@ func (k Keeper) GetValidatorCheckpointFromStorage(ctx sdk.Context) (*types.Valid return &checkpoint, nil } -func (k Keeper) GetValidatorCheckpointParamsFromStorage(ctx sdk.Context, timestamp uint64) (*types.ValidatorCheckpointParams, error) { +func (k Keeper) GetValidatorCheckpointParamsFromStorage(ctx context.Context, timestamp uint64) (*types.ValidatorCheckpointParams, error) { checkpointParams, err := k.ValidatorCheckpointParamsMap.Get(ctx, timestamp) if err != nil { k.Logger(ctx).Error("Failed to get validator checkpoint params", "error", err) @@ -372,7 +373,7 @@ func (k Keeper) GetValidatorCheckpointParamsFromStorage(ctx sdk.Context, timesta return &checkpointParams, nil } -func (k Keeper) GetValidatorTimestampByIdxFromStorage(ctx sdk.Context, checkpointIdx uint64) (*types.CheckpointTimestamp, error) { +func (k Keeper) GetValidatorTimestampByIdxFromStorage(ctx context.Context, checkpointIdx uint64) (*types.CheckpointTimestamp, error) { checkpointTimestamp, err := k.ValidatorCheckpointIdxMap.Get(ctx, checkpointIdx) if err != nil { k.Logger(ctx).Error("Failed to get validator checkpoint index", "error", err) @@ -381,7 +382,7 @@ func (k Keeper) GetValidatorTimestampByIdxFromStorage(ctx sdk.Context, checkpoin return &checkpointTimestamp, nil } -func (k Keeper) GetValidatorSetSignaturesFromStorage(ctx sdk.Context, timestamp uint64) (*types.BridgeValsetSignatures, error) { +func (k Keeper) GetValidatorSetSignaturesFromStorage(ctx context.Context, timestamp uint64) (*types.BridgeValsetSignatures, error) { valsetSigs, err := k.BridgeValsetSignaturesMap.Get(ctx, timestamp) if err != nil { k.Logger(ctx).Error("Failed to get bridge valset signatures", "error", err) @@ -390,8 +391,10 @@ func (k Keeper) GetValidatorSetSignaturesFromStorage(ctx sdk.Context, timestamp return &valsetSigs, nil } -func (k Keeper) GetOracleAttestationsFromStorage(ctx sdk.Context, queryId string, timestamp uint64) (*types.OracleAttestations, error) { - key := hex.EncodeToString(crypto.Keccak256([]byte(queryId + fmt.Sprint(timestamp)))) +func (k Keeper) GetOracleAttestationsFromStorage(ctx context.Context, queryId []byte, timestamp uint64) (*types.OracleAttestations, error) { + var timestampBz []byte + binary.LittleEndian.PutUint64(timestampBz, timestamp) + key := crypto.Keccak256(append(queryId, timestampBz...)) oracleAttestations, err := k.OracleAttestationsMap.Get(ctx, key) if err != nil { k.Logger(ctx).Error("Failed to get oracle attestations", "error", err) @@ -400,7 +403,7 @@ func (k Keeper) GetOracleAttestationsFromStorage(ctx sdk.Context, queryId string return &oracleAttestations, nil } -func (k Keeper) EncodeAndHashValidatorSet(ctx sdk.Context, validatorSet *types.BridgeValidatorSet) (encodedBridgeValidatorSet []byte, bridgeValidatorSetHash []byte, err error) { +func (k Keeper) EncodeAndHashValidatorSet(ctx context.Context, validatorSet *types.BridgeValidatorSet) (encodedBridgeValidatorSet []byte, bridgeValidatorSetHash []byte, err error) { // Define Go equivalent of the Solidity Validator struct type Validator struct { Addr common.Address @@ -460,7 +463,7 @@ func (k Keeper) EncodeAndHashValidatorSet(ctx sdk.Context, validatorSet *types.B return finalEncoded, valSetHash, nil } -func (k Keeper) PowerDiff(ctx sdk.Context, b types.BridgeValidatorSet, c types.BridgeValidatorSet) float64 { +func (k Keeper) PowerDiff(ctx context.Context, b types.BridgeValidatorSet, c types.BridgeValidatorSet) float64 { powers := map[string]int64{} for _, bv := range b.BridgeValidatorSet { powers[bv.EthereumAddress] = int64(bv.GetPower()) @@ -482,7 +485,7 @@ func (k Keeper) PowerDiff(ctx sdk.Context, b types.BridgeValidatorSet, c types.B return gomath.Abs(delta / float64(gomath.MaxUint32)) } -func (k Keeper) EVMAddressFromSignature(ctx sdk.Context, sigHexString string) (string, error) { +func (k Keeper) EVMAddressFromSignature(ctx context.Context, sigHexString string) (string, error) { message := "TellorLayer: Initial bridge daemon signature" // convert message to bytes msgBytes := []byte(message) @@ -516,7 +519,7 @@ func (k Keeper) EVMAddressFromSignature(ctx sdk.Context, sigHexString string) (s return recoveredAddr.Hex(), nil } -func (k Keeper) SetEVMAddressByOperator(ctx sdk.Context, operatorAddr string, evmAddr string) error { +func (k Keeper) SetEVMAddressByOperator(ctx context.Context, operatorAddr string, evmAddr string) error { evmAddrBytes := common.HexToAddress(evmAddr).Bytes() evmAddrType := types.EVMAddress{ EVMAddress: evmAddrBytes, @@ -530,7 +533,7 @@ func (k Keeper) SetEVMAddressByOperator(ctx sdk.Context, operatorAddr string, ev return nil } -func (k Keeper) SetBridgeValsetSignature(ctx sdk.Context, operatorAddress string, timestamp uint64, signature string) error { +func (k Keeper) SetBridgeValsetSignature(ctx context.Context, operatorAddress string, timestamp uint64, signature string) error { // get the bridge valset signatures array by timestamp valsetSigs, err := k.BridgeValsetSignaturesMap.Get(ctx, timestamp) if err != nil { @@ -586,9 +589,12 @@ func (k Keeper) SetBridgeValsetSignature(ctx sdk.Context, operatorAddress string return nil } -func (k Keeper) SetOracleAttestation(ctx sdk.Context, operatorAddress string, queryId string, timestamp uint64, signature string) error { +func (k Keeper) SetOracleAttestation(ctx context.Context, operatorAddress string, queryId []byte, timestamp uint64, signature string) error { // get the key by taking keccak256 hash of queryid and timestamp - key := hex.EncodeToString(crypto.Keccak256([]byte(queryId + fmt.Sprint(timestamp)))) + var timestampBz []byte + binary.LittleEndian.PutUint64(timestampBz, timestamp) + key := crypto.Keccak256(append(queryId, timestampBz...)) + // check if map for this key exists, otherwise create a new map exists, err := k.OracleAttestationsMap.Has(ctx, key) if err != nil { @@ -650,7 +656,7 @@ func (k Keeper) SetOracleAttestation(ctx sdk.Context, operatorAddress string, qu return nil } -func (k Keeper) GetEVMAddressByOperator(ctx sdk.Context, operatorAddress string) (string, error) { +func (k Keeper) GetEVMAddressByOperator(ctx context.Context, operatorAddress string) (string, error) { ethAddress, err := k.OperatorToEVMAddressMap.Get(ctx, operatorAddress) if err != nil { k.Logger(ctx).Info("Error getting EVM address from operator address", "error", err) @@ -661,7 +667,7 @@ func (k Keeper) GetEVMAddressByOperator(ctx sdk.Context, operatorAddress string) return hex.EncodeToString(ethAddress.EVMAddress), nil } -func (k Keeper) SetBridgeValsetByTimestamp(ctx sdk.Context, timestamp uint64, bridgeValset types.BridgeValidatorSet) error { +func (k Keeper) SetBridgeValsetByTimestamp(ctx context.Context, timestamp uint64, bridgeValset types.BridgeValidatorSet) error { err := k.BridgeValsetByTimestampMap.Set(ctx, timestamp, bridgeValset) if err != nil { k.Logger(ctx).Info("Error setting bridge valset by timestamp", "error", err) @@ -670,7 +676,7 @@ func (k Keeper) SetBridgeValsetByTimestamp(ctx sdk.Context, timestamp uint64, br return nil } -func (k Keeper) GetBridgeValsetByTimestamp(ctx sdk.Context, timestamp uint64) (*types.BridgeValidatorSet, error) { +func (k Keeper) GetBridgeValsetByTimestamp(ctx context.Context, timestamp uint64) (*types.BridgeValidatorSet, error) { bridgeValset, err := k.BridgeValsetByTimestampMap.Get(ctx, timestamp) if err != nil { k.Logger(ctx).Info("Error getting bridge valset by timestamp", "error", err) @@ -679,7 +685,7 @@ func (k Keeper) GetBridgeValsetByTimestamp(ctx sdk.Context, timestamp uint64) (* return &bridgeValset, nil } -func (k Keeper) GetLatestCheckpointIndex(ctx sdk.Context) (uint64, error) { +func (k Keeper) GetLatestCheckpointIndex(ctx context.Context) (uint64, error) { checkpointIdx, err := k.LatestCheckpointIdx.Get(ctx) if err != nil { k.Logger(ctx).Info("Error getting latest checkpoint index", "error", err) @@ -688,7 +694,7 @@ func (k Keeper) GetLatestCheckpointIndex(ctx sdk.Context) (uint64, error) { return checkpointIdx.Index, nil } -func (k Keeper) GetValidatorDidSignCheckpoint(ctx sdk.Context, operatorAddr string, checkpointTimestamp uint64) (didSign bool, prevValsetIndex int64, err error) { +func (k Keeper) GetValidatorDidSignCheckpoint(ctx context.Context, operatorAddr string, checkpointTimestamp uint64) (didSign bool, prevValsetIndex int64, err error) { // get the valset index by timestamp valsetIdx, err := k.ValsetTimestampToIdxMap.Get(ctx, checkpointTimestamp) if err != nil { diff --git a/x/bridge/keeper/query_get_current_aggregate_report.go b/x/bridge/keeper/query_get_current_aggregate_report.go index 39c23d4a0..d4ef15177 100644 --- a/x/bridge/keeper/query_get_current_aggregate_report.go +++ b/x/bridge/keeper/query_get_current_aggregate_report.go @@ -2,26 +2,18 @@ package keeper import ( "context" - "encoding/hex" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tellor-io/layer/x/bridge/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) -func (k Keeper) GetCurrentAggregateReport(goCtx context.Context, req *types.QueryGetCurrentAggregateReportRequest) (*types.QueryGetCurrentAggregateReportResponse, error) { +func (k Keeper) GetCurrentAggregateReport(ctx context.Context, req *types.QueryGetCurrentAggregateReportRequest) (*types.QueryGetCurrentAggregateReportResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - ctx := sdk.UnwrapSDKContext(goCtx) - - queryIdBytes, err := hex.DecodeString(req.QueryId) - if err != nil { - return nil, status.Error(codes.InvalidArgument, "invalid query id") - } - aggregate, timestamp := k.oracleKeeper.GetCurrentAggregateReport(ctx, queryIdBytes) + aggregate, timestamp := k.oracleKeeper.GetCurrentAggregateReport(ctx, req.QueryId) if aggregate == nil { return nil, status.Error(codes.NotFound, "aggregate not found") } diff --git a/x/bridge/keeper/query_get_data_before.go b/x/bridge/keeper/query_get_data_before.go index f7a30622d..16c84daec 100644 --- a/x/bridge/keeper/query_get_data_before.go +++ b/x/bridge/keeper/query_get_data_before.go @@ -2,27 +2,19 @@ package keeper import ( "context" - "encoding/hex" "time" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tellor-io/layer/x/bridge/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) -func (k Keeper) GetDataBefore(goCtx context.Context, req *types.QueryGetDataBeforeRequest) (*types.QueryGetDataBeforeResponse, error) { +func (k Keeper) GetDataBefore(ctx context.Context, req *types.QueryGetDataBeforeRequest) (*types.QueryGetDataBeforeResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - ctx := sdk.UnwrapSDKContext(goCtx) - - queryIdBytes, err := hex.DecodeString(req.QueryId) - if err != nil { - return nil, status.Error(codes.InvalidArgument, "invalid query id") - } - aggregate, timestamp, err := k.oracleKeeper.GetAggregateBefore(ctx, queryIdBytes, time.Unix(req.Timestamp, 0)) + aggregate, timestamp, err := k.oracleKeeper.GetAggregateBefore(ctx, req.QueryId, time.Unix(req.Timestamp, 0)) if err != nil { return nil, status.Error(codes.Internal, "failed to get aggregate before") } @@ -33,7 +25,6 @@ func (k Keeper) GetDataBefore(goCtx context.Context, req *types.QueryGetDataBefo return &types.QueryGetDataBeforeResponse{ Aggregate: aggregate, - // Aggregate: &bridgeAggregate, Timestamp: uint64(timeUnix), }, nil } diff --git a/x/bridge/types/expected_keepers.go b/x/bridge/types/expected_keepers.go index c343e8c6d..48451f17f 100644 --- a/x/bridge/types/expected_keepers.go +++ b/x/bridge/types/expected_keepers.go @@ -33,6 +33,6 @@ type BankKeeper interface { } type OracleKeeper interface { - GetCurrentAggregateReport(ctx sdk.Context, queryId []byte) (aggregate *oracletypes.Aggregate, timestamp time.Time) - GetAggregateBefore(ctx sdk.Context, queryId []byte, timestampBefore time.Time) (aggregate *oracletypes.Aggregate, timestamp time.Time, err error) + GetCurrentAggregateReport(ctx context.Context, queryId []byte) (aggregate *oracletypes.Aggregate, timestamp time.Time) + GetAggregateBefore(ctx context.Context, queryId []byte, timestampBefore time.Time) (aggregate *oracletypes.Aggregate, timestamp time.Time, err error) } diff --git a/x/bridge/types/message_submit_oracle_attestation.go b/x/bridge/types/message_submit_oracle_attestation.go index 0162919b4..1d34d3a68 100644 --- a/x/bridge/types/message_submit_oracle_attestation.go +++ b/x/bridge/types/message_submit_oracle_attestation.go @@ -4,6 +4,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/tellor-io/layer/utils" ) const TypeMsgSubmitOracleAttestation = "submit_oracle_attestation" @@ -11,9 +12,14 @@ const TypeMsgSubmitOracleAttestation = "submit_oracle_attestation" var _ sdk.Msg = &MsgSubmitOracleAttestation{} func NewMsgSubmitOracleAttestation(creator string, queryId string, timestamp string, signature string) *MsgSubmitOracleAttestation { + queryIdBz, err := utils.QueryBytesFromString(queryId) + if err != nil { + panic(err) + } + return &MsgSubmitOracleAttestation{ Creator: creator, - QueryId: queryId, + QueryId: queryIdBz, Timestamp: timestamp, Signature: signature, } diff --git a/x/bridge/types/query.pb.go b/x/bridge/types/query.pb.go index a65c5c45f..18555504b 100644 --- a/x/bridge/types/query.pb.go +++ b/x/bridge/types/query.pb.go @@ -852,7 +852,7 @@ func (m *QueryGetValsetSigsResponse) GetSignatures() []string { } type QueryGetOracleAttestationsRequest struct { - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } @@ -889,11 +889,11 @@ func (m *QueryGetOracleAttestationsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetOracleAttestationsRequest proto.InternalMessageInfo -func (m *QueryGetOracleAttestationsRequest) GetQueryId() string { +func (m *QueryGetOracleAttestationsRequest) GetQueryId() []byte { if m != nil { return m.QueryId } - return "" + return nil } func (m *QueryGetOracleAttestationsRequest) GetTimestamp() int64 { @@ -1132,7 +1132,7 @@ func (m *QueryGetValsetByTimestampResponse) GetBridgeValidatorSet() []*BridgeVal } type QueryGetCurrentAggregateReportRequest struct { - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` } func (m *QueryGetCurrentAggregateReportRequest) Reset() { *m = QueryGetCurrentAggregateReportRequest{} } @@ -1168,11 +1168,11 @@ func (m *QueryGetCurrentAggregateReportRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetCurrentAggregateReportRequest proto.InternalMessageInfo -func (m *QueryGetCurrentAggregateReportRequest) GetQueryId() string { +func (m *QueryGetCurrentAggregateReportRequest) GetQueryId() []byte { if m != nil { return m.QueryId } - return "" + return nil } type QueryGetCurrentAggregateReportResponse struct { @@ -1230,7 +1230,7 @@ func (m *QueryGetCurrentAggregateReportResponse) GetTimestamp() uint64 { } type Aggregate struct { - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` AggregateValue string `protobuf:"bytes,2,opt,name=aggregateValue,proto3" json:"aggregateValue,omitempty"` AggregateReporter string `protobuf:"bytes,3,opt,name=aggregateReporter,proto3" json:"aggregateReporter,omitempty"` ReporterPower int64 `protobuf:"varint,4,opt,name=reporterPower,proto3" json:"reporterPower,omitempty"` @@ -1275,11 +1275,11 @@ func (m *Aggregate) XXX_DiscardUnknown() { var xxx_messageInfo_Aggregate proto.InternalMessageInfo -func (m *Aggregate) GetQueryId() string { +func (m *Aggregate) GetQueryId() []byte { if m != nil { return m.QueryId } - return "" + return nil } func (m *Aggregate) GetAggregateValue() string { @@ -1398,7 +1398,7 @@ func (m *AggregateReporter) GetPower() int64 { } type QueryGetDataBeforeRequest struct { - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } @@ -1435,11 +1435,11 @@ func (m *QueryGetDataBeforeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetDataBeforeRequest proto.InternalMessageInfo -func (m *QueryGetDataBeforeRequest) GetQueryId() string { +func (m *QueryGetDataBeforeRequest) GetQueryId() []byte { if m != nil { return m.QueryId } - return "" + return nil } func (m *QueryGetDataBeforeRequest) GetTimestamp() int64 { @@ -1536,97 +1536,97 @@ func init() { func init() { proto.RegisterFile("layer/bridge/query.proto", fileDescriptor_e48df680904493de) } var fileDescriptor_e48df680904493de = []byte{ - // 1432 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08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0xb7, 0x83, 0x96, 0xdc, 0x41, 0x3f, 0x27, 0x48, - 0x25, 0x37, 0x97, 0x89, 0xa4, 0x32, 0x96, 0xa5, 0x89, 0xa4, 0xb2, 0x56, 0x24, 0xe5, 0x5d, 0x46, - 0xea, 0x3a, 0xba, 0x36, 0x8e, 0x54, 0xc0, 0xa0, 0xd1, 0x1c, 0x35, 0xd8, 0x1e, 0xa6, 0x6e, 0xb3, - 0x7f, 0x76, 0xdc, 0x76, 0x3f, 0x14, 0xdb, 0x82, 0xd0, 0x9b, 0x99, 0x50, 0xe2, 0x2b, 0x56, 0xb1, - 0x3a, 0xd9, 0x90, 0x83, 0x5c, 0x62, 0x20, 0x2f, 0xa2, 0xf3, 0x42, 0x90, 0x0e, 0xa1, 0x0d, 0xc7, - 0xd0, 0xe3, 0x95, 0xfe, 0x41, 0x82, 0xff, 0x09, 0x57, 0x20, 0xa4, 0x8a, 0xd3, 0x66, 0x6e, 0x62, - 0xc5, 0xcb, 0xd3, 0x3b, 0x70, 0xbc, 0xeb, 0x0c, 0xef, 0x2d, 0x74, 0x23, 0x8d, 0xd7, 0x9b, 0x67, - 0x8d, 0xe8, 0xa2, 0xa5, 0x6e, 0xf3, 0x19, 0xba, 0x13, 0x63, 0xf0, 0x97, 0x04, 0x67, 0x26, 0xec, - 0x47, 0x68, 0x35, 0x73, 0x56, 0x4c, 0x5a, 0xd7, 0x8a, 0xef, 0xec, 0xc5, 0x95, 0xf3, 0x7b, 0xc0, - 0xf8, 0xdd, 0x43, 0x77, 0xc5, 0x53, 0x07, 0x7b, 0xe6, 0x6e, 0xb3, 0x84, 0x3d, 0xc4, 0x85, 0xea, - 0x76, 0x72, 0x19, 0xdc, 0x41, 0xdf, 0x4a, 0x50, 0x10, 0xed, 0x5d, 0xa8, 0x36, 0xae, 0x43, 0xd2, - 0x2b, 0x5e, 0x51, 0x9d, 0xda, 0x9e, 0x13, 0x59, 0x65, 0x44, 0x56, 0xd0, 0x52, 0x66, 0x63, 0x35, - 0x47, 0x61, 0xf7, 0xc7, 0x8e, 0xe7, 0x47, 0x09, 0x4e, 0x65, 0x6e, 0x5d, 0x68, 0x45, 0x8c, 0x64, - 0xec, 0x9a, 0x57, 0xbc, 0xb2, 0x3b, 0x27, 0xce, 0xe1, 0x26, 0xe3, 0x70, 0x0d, 0x5d, 0x49, 0x73, - 0x68, 0x79, 0x9e, 0x8d, 0xe0, 0xc9, 0x6c, 0x78, 0x6f, 0x7f, 0xd8, 0x71, 0xe8, 0x2b, 0xef, 0xfe, - 0x86, 0x8f, 0x72, 0xd6, 0xfd, 0x4d, 0xed, 0x02, 0x59, 0xf7, 0x37, 0xfd, 0xbe, 0x2b, 0x37, 0x18, - 0xc4, 0xab, 0x68, 0x25, 0x0d, 0xb1, 0x8d, 0x29, 0x6e, 0x34, 0x99, 0xb9, 0xf8, 0x1e, 0xd4, 0xd7, - 0x5f, 0xbc, 0x2a, 0x4b, 0x2f, 0x5f, 0x95, 0xa5, 0x3f, 0x5e, 0x95, 0xa5, 0xcf, 0x5f, 0x97, 0x67, - 0x5e, 0xbe, 0x2e, 0xcf, 0xfc, 0xf6, 0xba, 0x3c, 0xf3, 0xd1, 0x79, 0xdd, 0xa0, 0x9d, 0x41, 0xb3, - 0xd6, 0xb2, 0x7a, 0x2a, 0x25, 0xdd, 0xae, 0x65, 0xbf, 0x65, 0x58, 0x3c, 0xc5, 0x73, 0x3f, 0x09, - 0x1d, 0xf5, 0x89, 0xd3, 0x5c, 0x60, 0xff, 0xd7, 0xb7, 0xf2, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x40, 0xc4, 0x95, 0x02, 0xae, 0x14, 0x00, 0x00, + // 1435 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0x4b, 0x6f, 0x1b, 0xd5, + 0x17, 0xcf, 0xd8, 0x49, 0x1a, 0x9f, 0xbe, 0x6f, 0xfd, 0x6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, 0x92, 0xe7, 0x1e, 0xfb, 0x32, + 0x2c, 0xe8, 0xce, 0x37, 0x67, 0xee, 0x7e, 0x48, 0x9b, 0x29, 0xa4, 0x93, 0x11, 0x38, 0xe9, 0xfc, + 0x02, 0xae, 0xc3, 0x72, 0x28, 0x94, 0x4d, 0xe8, 0x43, 0x5d, 0x9b, 0xb1, 0xf6, 0xd7, 0xa0, 0x92, + 0xe6, 0x1a, 0xd4, 0xda, 0xd6, 0x35, 0x03, 0xd3, 0x91, 0x45, 0x6c, 0x36, 0x70, 0x4a, 0x4a, 0x48, + 0x22, 0x7d, 0x02, 0x27, 0x3d, 0xef, 0x0f, 0xd8, 0x9b, 0xb4, 0x41, 0xa9, 0x13, 0x98, 0x3d, 0x7d, + 0x1e, 0x80, 0x65, 0x58, 0x62, 0x2f, 0x5e, 0x5b, 0x57, 0x79, 0x3f, 0xed, 0x61, 0xdf, 0x9b, 0x6a, + 0x14, 0x5b, 0x21, 0x8e, 0xed, 0x5e, 0x30, 0xde, 0xd3, 0xa2, 0x73, 0x8c, 0x12, 0xec, 0xc3, 0x21, + 0x39, 0x47, 0x19, 0x91, 0x49, 0x1f, 0xc1, 0xd9, 0xd0, 0xc3, 0xc4, 0x47, 0x70, 0x6b, 0xe2, 0xd7, + 0x9d, 0x4b, 0x3c, 0xc4, 0xe1, 0x8b, 0x15, 0x1d, 0xe3, 0x09, 0xb9, 0xf4, 0x3e, 0x9c, 0x9b, 0x2d, + 0x74, 0x50, 0x52, 0x32, 0x8e, 0x3d, 0x0e, 0x21, 0x89, 0x74, 0x13, 0xea, 0xd1, 0x03, 0x69, 0x4d, + 0xfc, 0xae, 0x98, 0xed, 0x48, 0xad, 0xe0, 0x50, 0x52, 0x22, 0xfc, 0x37, 0x2f, 0x71, 0x0b, 0xde, + 0xf2, 0x72, 0xde, 0x1a, 0x59, 0x16, 0x31, 0xe8, 0x86, 0xb7, 0x9c, 0x28, 0x64, 0x68, 0x5a, 0x74, + 0x7a, 0x33, 0x48,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3b, 0x27, 0xce, 0xe1, 0x3a, 0xe3, 0x70, 0x05, + 0x5d, 0x4a, 0x72, 0xe8, 0xba, 0x9e, 0x6d, 0xff, 0xcd, 0x6c, 0xbb, 0xaf, 0x7f, 0xa8, 0xe5, 0xd0, + 0xd7, 0xee, 0x0d, 0x0e, 0x9e, 0xe5, 0xac, 0x1b, 0x9c, 0x58, 0x07, 0xb2, 0x6e, 0x70, 0xf2, 0x85, + 0x97, 0xae, 0x31, 0x8c, 0x97, 0xd1, 0xc5, 0x24, 0x46, 0x15, 0x53, 0xdc, 0xee, 0x30, 0xf3, 0x8c, + 0x9b, 0xd0, 0xba, 0xf5, 0xe2, 0x55, 0x4d, 0x78, 0xf9, 0xaa, 0x26, 0xfc, 0xf1, 0xaa, 0x26, 0x7c, + 0xf1, 0xba, 0x36, 0xf7, 0xf2, 0x75, 0x6d, 0xee, 0xb7, 0xd7, 0xb5, 0xb9, 0x8f, 0x4f, 0x6b, 0x3a, + 0xed, 0x8d, 0x3a, 0xcd, 0xae, 0x39, 0x90, 0x29, 0xe9, 0xf7, 0x4d, 0xeb, 0x1d, 0xdd, 0xe4, 0x39, + 0x9e, 0x7b, 0x59, 0xe8, 0x64, 0x48, 0xec, 0xce, 0x22, 0xfb, 0x2f, 0xbf, 0x0b, 0x7f, 0x07, 0x00, + 0x00, 0xff, 0xff, 0xfa, 0x67, 0x99, 0x7c, 0xb5, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -5090,7 +5090,7 @@ func (m *QueryGetOracleAttestationsRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5100,23 +5100,25 @@ func (m *QueryGetOracleAttestationsRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = string(dAtA[iNdEx:postIndex]) + m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) + if m.QueryId == nil { + m.QueryId = []byte{} + } iNdEx = postIndex case 2: if wireType != 0 { @@ -5590,7 +5592,7 @@ func (m *QueryGetCurrentAggregateReportRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5600,23 +5602,25 @@ func (m *QueryGetCurrentAggregateReportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = string(dAtA[iNdEx:postIndex]) + m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) + if m.QueryId == nil { + m.QueryId = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -5777,7 +5781,7 @@ func (m *Aggregate) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5787,23 +5791,25 @@ func (m *Aggregate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = string(dAtA[iNdEx:postIndex]) + m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) + if m.QueryId == nil { + m.QueryId = []byte{} + } iNdEx = postIndex case 2: if wireType != 2 { @@ -6165,7 +6171,7 @@ func (m *QueryGetDataBeforeRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -6175,23 +6181,25 @@ func (m *QueryGetDataBeforeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = string(dAtA[iNdEx:postIndex]) + m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) + if m.QueryId == nil { + m.QueryId = []byte{} + } iNdEx = postIndex case 2: if wireType != 0 { diff --git a/x/bridge/types/query.pb.gw.go b/x/bridge/types/query.pb.gw.go index ebb0e6ab9..db508c1e5 100644 --- a/x/bridge/types/query.pb.gw.go +++ b/x/bridge/types/query.pb.gw.go @@ -260,15 +260,15 @@ func request_Query_GetOracleAttestations_0(ctx context.Context, marshaler runtim _ = err ) - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } val, ok = pathParams["timestamp"] @@ -298,15 +298,15 @@ func local_request_Query_GetOracleAttestations_0(ctx context.Context, marshaler _ = err ) - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } val, ok = pathParams["timestamp"] @@ -444,15 +444,15 @@ func request_Query_GetCurrentAggregateReport_0(ctx context.Context, marshaler ru _ = err ) - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } msg, err := client.GetCurrentAggregateReport(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -471,15 +471,15 @@ func local_request_Query_GetCurrentAggregateReport_0(ctx context.Context, marsha _ = err ) - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } msg, err := server.GetCurrentAggregateReport(ctx, &protoReq) @@ -498,15 +498,15 @@ func request_Query_GetDataBefore_0(ctx context.Context, marshaler runtime.Marsha _ = err ) - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } val, ok = pathParams["timestamp"] @@ -536,15 +536,15 @@ func local_request_Query_GetDataBefore_0(ctx context.Context, marshaler runtime. _ = err ) - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } val, ok = pathParams["timestamp"] @@ -1099,15 +1099,15 @@ var ( pattern_Query_GetValsetSigs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "bridge", "get_valset_sigs", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetOracleAttestations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"layer", "bridge", "get_oracle_attestations", "queryId", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetOracleAttestations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"layer", "bridge", "get_oracle_attestations", "query_id", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GetEvmAddressByValidatorAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "bridge", "get_evm_address_by_validator_address", "validatorAddress"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GetValsetByTimestamp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "bridge", "get_valset_by_timestamp", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetCurrentAggregateReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "bridge", "get_current_aggregate_report", "queryId"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetCurrentAggregateReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "bridge", "get_current_aggregate_report", "query_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetDataBefore_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"layer", "bridge", "get_data_before", "queryId", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetDataBefore_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"layer", "bridge", "get_data_before", "query_id", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/bridge/types/tx.pb.go b/x/bridge/types/tx.pb.go index 0ffee78de..527edc006 100644 --- a/x/bridge/types/tx.pb.go +++ b/x/bridge/types/tx.pb.go @@ -216,7 +216,7 @@ var xxx_messageInfo_MsgSubmitBridgeValsetSignatureResponse proto.InternalMessage type MsgSubmitOracleAttestation struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - QueryId string `protobuf:"bytes,2,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,2,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` Timestamp string `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Signature string `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"` } @@ -261,11 +261,11 @@ func (m *MsgSubmitOracleAttestation) GetCreator() string { return "" } -func (m *MsgSubmitOracleAttestation) GetQueryId() string { +func (m *MsgSubmitOracleAttestation) GetQueryId() []byte { if m != nil { return m.QueryId } - return "" + return nil } func (m *MsgSubmitOracleAttestation) GetTimestamp() string { @@ -330,33 +330,34 @@ func init() { func init() { proto.RegisterFile("layer/bridge/tx.proto", fileDescriptor_cb4091a52ebadfca) } var fileDescriptor_cb4091a52ebadfca = []byte{ - // 414 bytes of a gzipped FileDescriptorProto - 0x1f, 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b, - 0xd0, 0x2b, 0x47, 0xdf, 0x09, 0x95, 0xc7, 0xa1, 0x63, 0xba, 0xcc, 0xb7, 0x24, 0x78, 0x1e, 0xe3, - 0xbf, 0x28, 0xb3, 0xd2, 0x4d, 0x9f, 0xe6, 0xbb, 0x1e, 0x05, 0x20, 0x9c, 0xd7, 0xc9, 0x22, 0xff, - 0x7b, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xbf, 0x32, 0xf5, 0x08, 0x04, 0x00, 0x00, + // 420 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0x49, 0xac, 0x4c, + 0x2d, 0xd2, 0x4f, 0x2a, 0xca, 0x4c, 0x49, 0x4f, 0xd5, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0xe2, 0x01, 0x0b, 0xeb, 0x41, 0x84, 0xa5, 0xc4, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, + 0xf5, 0x73, 0x8b, 0xd3, 0xf5, 0xcb, 0x0c, 0x41, 0x14, 0x44, 0x99, 0x52, 0x36, 0x97, 0xa4, 0x6f, + 0x71, 0x7a, 0x50, 0x6a, 0x7a, 0x66, 0x71, 0x49, 0x6a, 0x91, 0x7f, 0x41, 0x6a, 0x51, 0x62, 0x49, + 0x7e, 0x51, 0x40, 0x69, 0x52, 0x76, 0x6a, 0xa5, 0x90, 0x04, 0x17, 0x7b, 0x72, 0x51, 0x2a, 0x48, + 0x40, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc6, 0x15, 0x52, 0xe3, 0xe2, 0xcb, 0x47, 0x51, + 0x2b, 0xc1, 0x04, 0x56, 0x80, 0x26, 0x6a, 0xc5, 0xd3, 0xf4, 0x7c, 0x83, 0x16, 0x4c, 0x97, 0x92, + 0x32, 0x97, 0x22, 0x4e, 0xcb, 0x82, 0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d, 0x65, 0x42, 0x8a, + 0x6a, 0xb8, 0x1b, 0x4a, 0xb9, 0xc4, 0x71, 0xc5, 0x9f, 0x06, 0x0e, 0x03, 0x31, 0x54, 0x4a, 0x19, + 0x10, 0xab, 0x12, 0x66, 0xad, 0x93, 0xf3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, + 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, + 0x44, 0x69, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x97, 0xa4, 0xe6, + 0xe4, 0xe4, 0x17, 0xe9, 0x66, 0xe6, 0xeb, 0x43, 0xb2, 0x7a, 0x05, 0x3c, 0xb3, 0x57, 0x16, 0xa4, + 0x16, 0x27, 0xb1, 0x81, 0x73, 0xb2, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x45, 0x28, 0x4e, + 0x09, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1244,7 +1245,7 @@ func (m *MsgSubmitOracleAttestation) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1254,23 +1255,25 @@ func (m *MsgSubmitOracleAttestation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = string(dAtA[iNdEx:postIndex]) + m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) + if m.QueryId == nil { + m.QueryId = []byte{} + } iNdEx = postIndex case 3: if wireType != 2 { diff --git a/x/dispute/keeper/msg_server_propose_dispute_test.go b/x/dispute/keeper/msg_server_propose_dispute_test.go index 3ba3039cf..fc972968e 100644 --- a/x/dispute/keeper/msg_server_propose_dispute_test.go +++ b/x/dispute/keeper/msg_server_propose_dispute_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "encoding/hex" "time" "cosmossdk.io/math" @@ -17,9 +18,10 @@ import ( func (s *KeeperTestSuite) TestMsgProposeDisputeFromAccount() sdk.AccAddress { addr := sample.AccAddressBytes() s.ctx = s.ctx.WithBlockTime(time.Now()) + qId, _ := hex.DecodeString("83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992") report := oracletypes.MicroReport{ Reporter: addr.String(), - QueryId: "83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992", + QueryId: qId, Value: "000000000000000000000000000000000000000000000058528649cf80ee0000", Timestamp: time.Unix(1696516597, 0), Power: 1, diff --git a/x/mint/abci.go b/x/mint/abci.go index e212c69b0..26cb9016e 100644 --- a/x/mint/abci.go +++ b/x/mint/abci.go @@ -1,6 +1,7 @@ package mint import ( + "context" "time" cosmosmath "cosmossdk.io/math" @@ -12,13 +13,15 @@ import ( // BeginBlocker updates the inflation rate, annual provisions, and then mints // the block provision for the current block. -func BeginBlocker(ctx sdk.Context, k keeper.Keeper) error { +func BeginBlocker(ctx context.Context, k keeper.Keeper) error { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) - currentTime := ctx.BlockTime() - if err := mintBlockProvision(ctx, k, currentTime); err != nil { + + sdkCtx := sdk.UnwrapSDKContext(ctx) + currentTime := sdkCtx.BlockTime() + if err := mintBlockProvision(sdkCtx, k, currentTime); err != nil { return err } - setPreviousBlockTime(ctx, k, currentTime) + setPreviousBlockTime(sdkCtx, k, currentTime) return nil } diff --git a/x/oracle/client/cli/query_get_aggregated_report.go b/x/oracle/client/cli/query_get_aggregated_report.go index 6a4543872..97c26d99f 100644 --- a/x/oracle/client/cli/query_get_aggregated_report.go +++ b/x/oracle/client/cli/query_get_aggregated_report.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" + "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" ) @@ -28,9 +29,13 @@ func CmdGetAggregatedReport() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - params := &types.QueryGetCurrentAggregatedReportRequest{ + queryId, err := utils.QueryBytesFromString(reqQueryId) + if err != nil { + return err + } - QueryId: reqQueryId, + params := &types.QueryGetCurrentAggregatedReportRequest{ + QueryId: queryId, } res, err := queryClient.GetAggregatedReport(cmd.Context(), params) diff --git a/x/oracle/client/cli/query_get_current_tip.go b/x/oracle/client/cli/query_get_current_tip.go index b00add513..aaae77b0d 100644 --- a/x/oracle/client/cli/query_get_current_tip.go +++ b/x/oracle/client/cli/query_get_current_tip.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" + "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" ) @@ -26,9 +27,13 @@ func CmdGetCurrentTip() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - params := &types.QueryGetCurrentTipRequest{ + qData, err := utils.QueryBytesFromString(reqQueryData) + if err != nil { + return err + } - QueryData: reqQueryData, + params := &types.QueryGetCurrentTipRequest{ + QueryData: qData, } res, err := queryClient.GetCurrentTip(cmd.Context(), params) diff --git a/x/oracle/client/cli/query_get_data_before.go b/x/oracle/client/cli/query_get_data_before.go index 587b1c37f..f716cbdb7 100644 --- a/x/oracle/client/cli/query_get_data_before.go +++ b/x/oracle/client/cli/query_get_data_before.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" + "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" ) @@ -32,8 +33,13 @@ func CmdGetDataBefore() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) + queryId, err := utils.QueryBytesFromString(reqQueryId) + if err != nil { + return err + } + params := &types.QueryGetDataBeforeRequest{ - QueryId: reqQueryId, + QueryId: queryId, Timestamp: reqTimestamp, } diff --git a/x/oracle/client/cli/query_get_median.go b/x/oracle/client/cli/query_get_median.go index f3066dd6a..2cf4994de 100644 --- a/x/oracle/client/cli/query_get_median.go +++ b/x/oracle/client/cli/query_get_median.go @@ -7,6 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" mediantypes "github.com/tellor-io/layer/daemons/server/types" + "github.com/tellor-io/layer/utils" ) var _ = strconv.Itoa(0) @@ -26,7 +27,12 @@ func CmdGetMedianValue() *cobra.Command { queryClient := mediantypes.NewMedianValuesServiceClient(clientCtx) - params := &mediantypes.GetMedianValueRequest{QueryData: argQueryData} + qData, err := utils.QueryBytesFromString(argQueryData) + if err != nil { + return err + } + + params := &mediantypes.GetMedianValueRequest{QueryData: qData} res, err := queryClient.GetMedianValue(cmd.Context(), params) if err != nil { diff --git a/x/oracle/client/cli/query_get_reportsby_address_qid.go b/x/oracle/client/cli/query_get_reportsby_address_qid.go index 032c92259..e415d8c89 100644 --- a/x/oracle/client/cli/query_get_reportsby_address_qid.go +++ b/x/oracle/client/cli/query_get_reportsby_address_qid.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" + "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" ) @@ -27,10 +28,15 @@ func CmdGetReportsbyAddressQid() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) + qIdBz, err := utils.QueryBytesFromString(reqQid) + if err != nil { + return err + } + params := &types.QueryGetReportsbyReporterQidRequest{ Reporter: reqAddress, - QueryId: reqQid, + QueryId: qIdBz, } res, err := queryClient.GetReportsbyReporterQid(cmd.Context(), params) diff --git a/x/oracle/client/cli/query_get_reportsby_qid.go b/x/oracle/client/cli/query_get_reportsby_qid.go index a54139cbd..a95fe5454 100644 --- a/x/oracle/client/cli/query_get_reportsby_qid.go +++ b/x/oracle/client/cli/query_get_reportsby_qid.go @@ -27,9 +27,13 @@ func CmdGetReportsbyQid() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - params := &types.QueryGetReportsbyQidRequest{ + qIdBz, err := utils.QueryBytesFromString(reqQId) + if err != nil { + return err + } - QueryId: reqQId, + params := &types.QueryGetReportsbyQidRequest{ + QueryId: qIdBz, } res, err := queryClient.GetReportsbyQid(cmd.Context(), params) diff --git a/x/oracle/client/cli/query_get_user_tip_total.go b/x/oracle/client/cli/query_get_user_tip_total.go index 56c0e4ed4..d98a55966 100644 --- a/x/oracle/client/cli/query_get_user_tip_total.go +++ b/x/oracle/client/cli/query_get_user_tip_total.go @@ -6,6 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" + "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" ) @@ -27,10 +28,14 @@ func CmdGetUserTipTotal() *cobra.Command { queryClient := types.NewQueryClient(clientCtx) - params := &types.QueryGetUserTipTotalRequest{ + queryDataBz, err := utils.QueryBytesFromString(reqQueryData) + if err != nil { + return err + } + params := &types.QueryGetUserTipTotalRequest{ Tipper: reqTipper, - QueryData: reqQueryData, + QueryData: queryDataBz, } res, err := queryClient.GetUserTipTotal(cmd.Context(), params) diff --git a/x/oracle/client/cli/tx_commit_report.go b/x/oracle/client/cli/tx_commit_report.go index dd61aeea6..31c36f19b 100644 --- a/x/oracle/client/cli/tx_commit_report.go +++ b/x/oracle/client/cli/tx_commit_report.go @@ -9,18 +9,18 @@ import ( "github.com/cosmos/cosmos-sdk/client/tx" "github.com/spf13/cobra" "github.com/tellor-io/layer/x/oracle/types" - "github.com/tellor-io/layer/x/oracle/utils" + oracleutils "github.com/tellor-io/layer/x/oracle/utils" ) var _ = strconv.Itoa(0) func CmdCommitReport() *cobra.Command { cmd := &cobra.Command{ - Use: "commit-report [query-id] [salted-value]", + Use: "commit-report [query-data] [salted-value]", Short: "Broadcast message commitReport", Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) (err error) { - argQueryId := args[0] + argQueryData := args[0] argValue := args[1] clientCtx, err := client.GetClientTxContext(cmd) @@ -38,16 +38,16 @@ func CmdCommitReport() *cobra.Command { // return err // } - salt, err := utils.Salt(32) + salt, err := oracleutils.Salt(32) if err != nil { return err } - commit := utils.CalculateCommitment(string(valueDecoded), salt) + commit := oracleutils.CalculateCommitment(string(valueDecoded), salt) msg := types.NewMsgCommitReport( clientCtx.GetFromAddress().String(), - argQueryId, + argQueryData, commit, ) if err := msg.ValidateBasic(); err != nil { diff --git a/x/oracle/client/cli/tx_commit_submit_report.go b/x/oracle/client/cli/tx_commit_submit_report.go index 66b7bb7ea..5bb4185a5 100644 --- a/x/oracle/client/cli/tx_commit_submit_report.go +++ b/x/oracle/client/cli/tx_commit_submit_report.go @@ -12,8 +12,9 @@ import ( "github.com/spf13/cobra" mediantypes "github.com/tellor-io/layer/daemons/server/types" "github.com/tellor-io/layer/lib/prices" + "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" - "github.com/tellor-io/layer/x/oracle/utils" + oracleutils "github.com/tellor-io/layer/x/oracle/utils" ) var _ = strconv.Itoa(0) @@ -32,7 +33,12 @@ func CmdCommitSubmitReport() *cobra.Command { } queryClient := mediantypes.NewMedianValuesServiceClient(clientCtx) - params := &mediantypes.GetMedianValueRequest{QueryData: argQueryData} + queryDataBz, err := utils.QueryBytesFromString(argQueryData) + if err != nil { + return err + } + + params := &mediantypes.GetMedianValueRequest{QueryData: queryDataBz} medianValue, err := queryClient.GetMedianValue(cmd.Context(), params) if err != nil { @@ -59,12 +65,12 @@ func CmdCommitSubmitReport() *cobra.Command { // return err // } // get hash - salt, err := utils.Salt(32) + salt, err := oracleutils.Salt(32) if err != nil { return err } - commit := utils.CalculateCommitment(string(valueDecoded), salt) + commit := oracleutils.CalculateCommitment(string(valueDecoded), salt) msg := types.NewMsgCommitReport( clientCtx.GetFromAddress().String(), diff --git a/x/oracle/keeper/aggregate.go b/x/oracle/keeper/aggregate.go index be43eb5a2..58201bb28 100644 --- a/x/oracle/keeper/aggregate.go +++ b/x/oracle/keeper/aggregate.go @@ -11,7 +11,6 @@ import ( "cosmossdk.io/collections/indexes" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" ) @@ -34,7 +33,7 @@ func (k Keeper) SetAggregatedReport(ctx sdk.Context) (err error) { return err } - var aggrFunc func(ctx sdk.Context, reports []types.MicroReport) (*types.Aggregate, error) + var aggrFunc func(ctx context.Context, reports []types.MicroReport) (*types.Aggregate, error) reportersToPay := make([]*types.AggregateReporter, 0) for _, query := range queries { if query.Expiration.Add(offset).Before(ctx.BlockTime()) { @@ -89,31 +88,28 @@ func (k Keeper) SetAggregatedReport(ctx sdk.Context) (err error) { return k.AllocateRewards(ctx, reportersToPay, tbr, false) } -func (k Keeper) SetAggregate(ctx sdk.Context, report *types.Aggregate) error { - queryId, err := utils.QueryBytesFromString(report.QueryId) - if err != nil { - return err - } - nonce, err := k.Nonces.Get(ctx, queryId) +func (k Keeper) SetAggregate(ctx context.Context, report *types.Aggregate) error { + nonce, err := k.Nonces.Get(ctx, report.QueryId) if err != nil && !errors.Is(err, collections.ErrNotFound) { return err } nonce++ - err = k.Nonces.Set(ctx, queryId, nonce) + err = k.Nonces.Set(ctx, report.QueryId, nonce) if err != nil { return err } report.Nonce = nonce - currentTimestamp := ctx.BlockTime().Unix() - report.Height = ctx.BlockHeight() + sdkCtx := sdk.UnwrapSDKContext(ctx) + currentTimestamp := sdkCtx.BlockTime().Unix() + report.Height = sdkCtx.BlockHeight() - return k.Aggregates.Set(ctx, collections.Join(queryId, currentTimestamp), *report) + return k.Aggregates.Set(ctx, collections.Join(report.QueryId, currentTimestamp), *report) } // getDataBefore returns the last aggregate before or at the given timestamp for the given query id. // TODO: add a test for this function. -func (k Keeper) getDataBefore(ctx sdk.Context, queryId []byte, timestamp time.Time) (*types.Aggregate, error) { +func (k Keeper) getDataBefore(ctx context.Context, queryId []byte, timestamp time.Time) (*types.Aggregate, error) { rng := collections.NewPrefixedPairRange[[]byte, int64](queryId).EndInclusive(timestamp.Unix()).Descending() var mostRecent *types.Aggregate // This should get us the most recent aggregate, as they are walked in descending order @@ -137,7 +133,7 @@ func (k Keeper) getDataBefore(ctx sdk.Context, queryId []byte, timestamp time.Ti return mostRecent, nil } -func (k Keeper) GetDataBeforePublic(ctx sdk.Context, queryId []byte, timestamp time.Time) (*types.Aggregate, error) { +func (k Keeper) GetDataBeforePublic(ctx context.Context, queryId []byte, timestamp time.Time) (*types.Aggregate, error) { return k.getDataBefore(ctx, queryId, timestamp) } @@ -157,7 +153,7 @@ func (k Keeper) GetCurrentValueForQueryId(ctx context.Context, queryId []byte) ( return mostRecent, nil } -func (k Keeper) GetTimestampBefore(ctx sdk.Context, queryId []byte, timestamp time.Time) (time.Time, error) { +func (k Keeper) GetTimestampBefore(ctx context.Context, queryId []byte, timestamp time.Time) (time.Time, error) { rng := collections.NewPrefixedPairRange[[]byte, int64](queryId).EndExclusive(timestamp.Unix()).Descending() var mostRecent int64 err := k.Aggregates.Walk(ctx, rng, func(key collections.Pair[[]byte, int64], value types.Aggregate) (stop bool, err error) { @@ -176,7 +172,7 @@ func (k Keeper) GetTimestampBefore(ctx sdk.Context, queryId []byte, timestamp ti return time.Unix(mostRecent, 0), nil } -func (k Keeper) GetTimestampAfter(ctx sdk.Context, queryId []byte, timestamp time.Time) (time.Time, error) { +func (k Keeper) GetTimestampAfter(ctx context.Context, queryId []byte, timestamp time.Time) (time.Time, error) { rng := collections.NewPrefixedPairRange[[]byte, int64](queryId).StartExclusive(timestamp.Unix()) var mostRecent int64 err := k.Aggregates.Walk(ctx, rng, func(key collections.Pair[[]byte, int64], value types.Aggregate) (stop bool, err error) { @@ -195,7 +191,7 @@ func (k Keeper) GetTimestampAfter(ctx sdk.Context, queryId []byte, timestamp tim return time.Unix(mostRecent, 0), nil } -func (k Keeper) GetAggregatedReportsByHeight(ctx sdk.Context, height int64) []types.Aggregate { +func (k Keeper) GetAggregatedReportsByHeight(ctx context.Context, height int64) []types.Aggregate { iter, err := k.Aggregates.Indexes.BlockHeight.MatchExact(ctx, height) if err != nil { panic(err) @@ -214,7 +210,7 @@ func (k Keeper) GetAggregatedReportsByHeight(ctx sdk.Context, height int64) []ty return reports } -func (k Keeper) GetCurrentAggregateReport(ctx sdk.Context, queryId []byte) (aggregate *types.Aggregate, timestamp time.Time) { +func (k Keeper) GetCurrentAggregateReport(ctx context.Context, queryId []byte) (aggregate *types.Aggregate, timestamp time.Time) { rng := collections.NewPrefixedPairRange[[]byte, int64](queryId).Descending() err := k.Aggregates.Walk(ctx, rng, func(key collections.Pair[[]byte, int64], value types.Aggregate) (stop bool, err error) { aggregate = &value @@ -227,7 +223,7 @@ func (k Keeper) GetCurrentAggregateReport(ctx sdk.Context, queryId []byte) (aggr return aggregate, timestamp } -func (k Keeper) GetAggregateBefore(ctx sdk.Context, queryId []byte, timestampBefore time.Time) (aggregate *types.Aggregate, timestamp time.Time, err error) { +func (k Keeper) GetAggregateBefore(ctx context.Context, queryId []byte, timestampBefore time.Time) (aggregate *types.Aggregate, timestamp time.Time, err error) { // Convert the timestampBefore to Unix time and create a range that ends just before this timestamp rng := collections.NewPrefixedPairRange[[]byte, int64](queryId).EndExclusive(timestampBefore.Unix()).Descending() diff --git a/x/oracle/keeper/cycle_list.go b/x/oracle/keeper/cycle_list.go index 230c949f7..e3a216d71 100644 --- a/x/oracle/keeper/cycle_list.go +++ b/x/oracle/keeper/cycle_list.go @@ -2,13 +2,12 @@ package keeper import ( "context" - "encoding/hex" "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" ) -func (k Keeper) GetCyclelist(ctx context.Context) ([]string, error) { +func (k Keeper) GetCyclelist(ctx context.Context) ([][]byte, error) { iter, err := k.Cyclelist.Iterate(ctx, nil) if err != nil { @@ -45,22 +44,22 @@ func (k Keeper) RotateQueries(ctx context.Context) error { } -func (k Keeper) GetCurrentQueryInCycleList(ctx context.Context) (string, error) { +func (k Keeper) GetCurrentQueryInCycleList(ctx context.Context) ([]byte, error) { idx, err := k.CyclelistSequencer.Peek(ctx) if err != nil { - return "", err + return nil, err } q, err := k.GetCyclelist(ctx) if err != nil { - return "", err + return nil, err } return q[idx], nil } // should be called only once when updating the cycle list -func (k Keeper) InitCycleListQuery(ctx context.Context, queries []string) error { +func (k Keeper) InitCycleListQuery(ctx context.Context, queries [][]byte) error { for _, querydata := range queries { @@ -68,15 +67,12 @@ func (k Keeper) InitCycleListQuery(ctx context.Context, queries []string) error if err != nil { return err } - queryId, err := utils.QueryIDFromDataString(querydata) - if err != nil { - return err - } + queryId := utils.QueryIDFromData(querydata) err = k.Query.Set(ctx, queryId, query) if err != nil { return err } - err = k.Cyclelist.Set(ctx, queryId, utils.Remove0xPrefix(querydata)) + err = k.Cyclelist.Set(ctx, queryId, querydata) if err != nil { return err } @@ -84,15 +80,10 @@ func (k Keeper) InitCycleListQuery(ctx context.Context, queries []string) error return nil } -func (k Keeper) GenesisCycleList(ctx context.Context, cyclelist []string) error { +func (k Keeper) GenesisCycleList(ctx context.Context, cyclelist [][]byte) error { - for _, query := range cyclelist { - query := utils.Remove0xPrefix(query) - queryDataBytes, err := hex.DecodeString(query) - if err != nil { - return err - } - queryId := HashQueryData(queryDataBytes) + for _, queryData := range cyclelist { + queryId := utils.QueryIDFromData(queryData) nextId, err := k.QuerySequnecer.Next(ctx) if err != nil { @@ -107,7 +98,7 @@ func (k Keeper) GenesisCycleList(ctx context.Context, cyclelist []string) error if err != nil { return err } - err = k.Cyclelist.Set(ctx, queryId, query) + err = k.Cyclelist.Set(ctx, queryId, queryData) if err != nil { return err } diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index f477c4865..4d44d9480 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -12,7 +12,6 @@ import ( "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/crypto" "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" regTypes "github.com/tellor-io/layer/x/registry/types" @@ -40,7 +39,7 @@ type ( // the address capable of executing a MsgUpdateParams message. Typically, this // should be the x/gov module account. // key: reporter, queryid // keep track of the total tips Aggregates *collections.IndexedMap[collections.Pair[[]byte, int64], types.Aggregate, aggregatesIndex] // key: queryId, timestamp // key: queryId // keep track of the current cycle - Cyclelist collections.Map[[]byte, string] + Cyclelist collections.Map[[]byte, []byte] CyclelistSequencer collections.Sequence authority string } @@ -99,7 +98,7 @@ func NewKeeper( codec.CollValue[types.QueryMeta](cdc), NewQueryIndex(sb), ), - Cyclelist: collections.NewMap(sb, types.CyclelistPrefix, "cyclelist", collections.BytesKey, collections.StringValue), + Cyclelist: collections.NewMap(sb, types.CyclelistPrefix, "cyclelist", collections.BytesKey, collections.BytesValue), CyclelistSequencer: collections.NewSequence(sb, types.CycleSeqPrefix, "cycle_sequencer"), } @@ -117,23 +116,16 @@ func (k Keeper) GetAuthority() string { return k.authority } -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) -} - -func HashQueryData(queryData []byte) []byte { - return crypto.Keccak256(queryData) +func (k Keeper) Logger(ctx context.Context) log.Logger { + sdkCtx := sdk.UnwrapSDKContext(ctx) + return sdkCtx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } // initialize query for a given query data -func (k Keeper) initializeQuery(ctx context.Context, querydata string) (types.QueryMeta, error) { +func (k Keeper) initializeQuery(ctx context.Context, querydata []byte) (types.QueryMeta, error) { // initialize query tip first time - queryDataBytes, err := utils.QueryBytesFromString(querydata) - if err != nil { - return types.QueryMeta{}, err - } - queryType, _, err := regTypes.DecodeQueryType(queryDataBytes) + queryType, _, err := regTypes.DecodeQueryType(querydata) if err != nil { return types.QueryMeta{}, err } @@ -148,7 +140,7 @@ func (k Keeper) initializeQuery(ctx context.Context, querydata string) (types.Qu query := types.QueryMeta{ Id: id, RegistrySpecTimeframe: dataSpec.ReportBufferWindow, - QueryId: HashQueryData(queryDataBytes), + QueryId: utils.QueryIDFromData(querydata), } return query, nil } diff --git a/x/oracle/keeper/msg_server_commit_report.go b/x/oracle/keeper/msg_server_commit_report.go index e240c44ca..66ff42526 100644 --- a/x/oracle/keeper/msg_server_commit_report.go +++ b/x/oracle/keeper/msg_server_commit_report.go @@ -1,6 +1,7 @@ package keeper import ( + "bytes" "context" "errors" @@ -38,14 +39,10 @@ func (k msgServer) CommitReport(goCtx context.Context, msg *types.MsgCommitRepor if reporter.TotalTokens.LT(params.MinStakeAmount) { return nil, errorsmod.Wrapf(types.ErrNotEnoughStake, "reporter has %s, required amount is %s", reporter.TotalTokens, params.MinStakeAmount) } - // normalize by removing 0x prefix and lowercasing - msg.QueryData = utils.Remove0xPrefix(msg.QueryData) // get query id bytes hash from query data - queryId, err := utils.QueryIDFromDataString(msg.QueryData) - if err != nil { - return nil, types.ErrInvalidQueryData.Wrapf("invalid query data: %s", err) - } + queryId := utils.QueryIDFromData(msg.QueryData) + // get query info by query id query, err := k.Keeper.Query.Get(ctx, queryId) if err != nil { @@ -61,7 +58,7 @@ func (k msgServer) CommitReport(goCtx context.Context, msg *types.MsgCommitRepor return nil, err } // bool to check if query is in cycle - incycle := msg.QueryData == cycleQuery + incycle := bytes.Equal(msg.QueryData, cycleQuery) if query.Amount.IsZero() && query.Expiration.Before(ctx.BlockTime()) && !incycle { return nil, types.ErrNoTipsNotInCycle.Wrapf("query does not have tips and is not in cycle") diff --git a/x/oracle/keeper/msg_server_commit_report_test.go b/x/oracle/keeper/msg_server_commit_report_test.go index 8f2341486..a886eaada 100644 --- a/x/oracle/keeper/msg_server_commit_report_test.go +++ b/x/oracle/keeper/msg_server_commit_report_test.go @@ -11,23 +11,23 @@ import ( "github.com/tellor-io/layer/testutil/sample" - "github.com/tellor-io/layer/x/oracle/keeper" + "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" - "github.com/tellor-io/layer/x/oracle/utils" + oracleutils "github.com/tellor-io/layer/x/oracle/utils" registrytypes "github.com/tellor-io/layer/x/registry/types" reportertypes "github.com/tellor-io/layer/x/reporter/types" ) -func (s *KeeperTestSuite) TestCommitValue() (reportertypes.OracleReporter, string, string) { +func (s *KeeperTestSuite) TestCommitValue() (reportertypes.OracleReporter, string, []byte) { // get the current query in cycle list s.ctx = s.ctx.WithBlockTime(time.Now()) queryData, err := s.oracleKeeper.GetCurrentQueryInCycleList(s.ctx) s.Nil(err) // value 100000000000000000000 in hex value := "000000000000000000000000000000000000000000000058528649cf80ee0000" - salt, err := utils.Salt(32) + salt, err := oracleutils.Salt(32) s.Nil(err) - hash := utils.CalculateCommitment(value, salt) + hash := oracleutils.CalculateCommitment(value, salt) addr := sample.AccAddressBytes() @@ -47,10 +47,7 @@ func (s *KeeperTestSuite) TestCommitValue() (reportertypes.OracleReporter, strin _, err = s.msgServer.CommitReport(s.ctx, &commitreq) s.Nil(err) - _hexxy, err := hex.DecodeString(queryData) - s.Nil(err) - - qId := keeper.HashQueryData(_hexxy) + qId := utils.QueryIDFromData(queryData) query, err := s.oracleKeeper.Query.Get(s.ctx, qId) s.Nil(err) s.NotNil(query) @@ -63,13 +60,13 @@ func (s *KeeperTestSuite) TestCommitValue() (reportertypes.OracleReporter, strin func (s *KeeperTestSuite) TestCommitQueryNotInCycleList() { - queryData := "00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000005737465746800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" + queryData, _ := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000005737465746800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000") value := "000000000000000000000000000000000000000000000058528649cf80ee0000" // Commit report transaction - salt, err := utils.Salt(32) + salt, err := oracleutils.Salt(32) s.Nil(err) - hash := utils.CalculateCommitment(value, salt) + hash := oracleutils.CalculateCommitment(value, salt) addr := sample.AccAddressBytes() @@ -99,9 +96,9 @@ func (s *KeeperTestSuite) TestCommitQueryInCycleListPlusTippedQuery() { value := "000000000000000000000000000000000000000000000058528649cf80ee0000" // Commit report transaction - salt, err := utils.Salt(32) + salt, err := oracleutils.Salt(32) s.Nil(err) - hash := utils.CalculateCommitment(value, salt) + hash := oracleutils.CalculateCommitment(value, salt) addr := sample.AccAddressBytes() @@ -123,7 +120,7 @@ func (s *KeeperTestSuite) TestCommitQueryInCycleListPlusTippedQuery() { s.NoError(err) // commit for query that was tipped - queryData2 := "00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000005737465746800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000" + queryData2, _ := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000005737465746800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000") tip := sdk.NewCoin("loya", math.NewInt(1000)) _ = s.bankKeeper.On("SendCoinsFromAccountToModule", s.ctx, addr, types.ModuleName, sdk.NewCoins(tip)).Return(nil) // mock the 2% burn @@ -147,43 +144,15 @@ func (s *KeeperTestSuite) TestCommitQueryInCycleListPlusTippedQuery() { } -func (s *KeeperTestSuite) TestCommitWithBadQueryData() { - - // try to commit bad query data - queryData := "stupidQueryData" - value := "000000000000000000000000000000000000000000000058528649cf80ee0000" - - salt, err := utils.Salt(32) - s.Nil(err) - hash := utils.CalculateCommitment(value, salt) - - addr := sample.AccAddressBytes() - - stakedReporter := reportertypes.NewOracleReporter( - addr.String(), - math.NewInt(1_000_000), - nil, - ) - _ = s.reporterKeeper.On("Reporter", s.ctx, addr).Return(&stakedReporter, nil) - - var commitreq = types.MsgCommitReport{ - Creator: addr.String(), - QueryData: queryData, - Hash: hash, - } - _, err = s.msgServer.CommitReport(s.ctx, &commitreq) - s.ErrorContains(err, "invalid query data") -} - func (s *KeeperTestSuite) TestCommitWithReporterWithLowStake() { // try to commit from unbonded reporter queryData, err := s.oracleKeeper.GetCurrentQueryInCycleList(s.ctx) s.Nil(err) value := "000000000000000000000000000000000000000000000058528649cf80ee0000" - salt, err := utils.Salt(32) + salt, err := oracleutils.Salt(32) s.Nil(err) - hash := utils.CalculateCommitment(value, salt) + hash := oracleutils.CalculateCommitment(value, salt) randomAddr := sample.AccAddressBytes() @@ -211,9 +180,9 @@ func (s *KeeperTestSuite) TestCommitWithJailedValidator() { s.Nil(err) value := "000000000000000000000000000000000000000000000058528649cf80ee0000" - salt, err := utils.Salt(32) + salt, err := oracleutils.Salt(32) s.Nil(err) - hash := utils.CalculateCommitment(value, salt) + hash := oracleutils.CalculateCommitment(value, salt) randomAddr := sample.AccAddressBytes() @@ -244,9 +213,9 @@ func (s *KeeperTestSuite) TestCommitWithMissingCreator() { s.Nil(err) value := "000000000000000000000000000000000000000000000058528649cf80ee0000" - salt, err := utils.Salt(32) + salt, err := oracleutils.Salt(32) s.Nil(err) - hash := utils.CalculateCommitment(value, salt) + hash := oracleutils.CalculateCommitment(value, salt) s.Nil(err) var commitreq = types.MsgCommitReport{ @@ -262,9 +231,9 @@ func (s *KeeperTestSuite) TestCommitWithMissingQueryData() { // commit with no query data value := "000000000000000000000000000000000000000000000058528649cf80ee0000" - salt, err := utils.Salt(32) + salt, err := oracleutils.Salt(32) s.Nil(err) - hash := utils.CalculateCommitment(value, salt) + hash := oracleutils.CalculateCommitment(value, salt) s.Nil(err) addr := sample.AccAddressBytes() diff --git a/x/oracle/keeper/msg_server_submit_value.go b/x/oracle/keeper/msg_server_submit_value.go index 53d5b501a..1e03d4989 100644 --- a/x/oracle/keeper/msg_server_submit_value.go +++ b/x/oracle/keeper/msg_server_submit_value.go @@ -1,10 +1,9 @@ package keeper import ( + "bytes" "context" - "encoding/hex" "errors" - "fmt" "cosmossdk.io/collections" "cosmossdk.io/math" @@ -16,8 +15,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" layertypes "github.com/tellor-io/layer/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func (k msgServer) SubmitValue(goCtx context.Context, msg *types.MsgSubmitValue) (*types.MsgSubmitValueResponse, error) { @@ -46,12 +43,8 @@ func (k msgServer) SubmitValue(goCtx context.Context, msg *types.MsgSubmitValue) votingPower := reporter.TotalTokens.Quo(layertypes.PowerReduction).Int64() // decode query data hex string to bytes - msg.QueryData = utils.Remove0xPrefix(msg.QueryData) - qDataBytes, err := hex.DecodeString(msg.QueryData) - if err != nil { - return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("failed to decode query data string: %v", err)) - } - queryId := utils.QueryIDFromData(qDataBytes) + + queryId := utils.QueryIDFromData(msg.QueryData) query, err := k.Keeper.Query.Get(ctx, queryId) if err != nil { @@ -70,8 +63,8 @@ func (k msgServer) SubmitValue(goCtx context.Context, msg *types.MsgSubmitValue) if err != nil { return nil, err } - incycle = msg.QueryData == cycleQuery - err = k.directReveal(ctx, query, qDataBytes, msg.Value, reporterAddr, votingPower, incycle) + incycle = bytes.Equal(msg.QueryData, cycleQuery) + err = k.directReveal(ctx, query, msg.QueryData, msg.Value, reporterAddr, votingPower, incycle) if err != nil { return nil, err } @@ -88,7 +81,7 @@ func (k msgServer) SubmitValue(goCtx context.Context, msg *types.MsgSubmitValue) } incycle = commit.Incycle - err = k.setValue(ctx, reporterAddr, query, msg.Value, qDataBytes, votingPower, incycle) + err = k.setValue(ctx, reporterAddr, query, msg.Value, msg.QueryData, votingPower, incycle) if err != nil { return nil, err } diff --git a/x/oracle/keeper/msg_server_submit_value_test.go b/x/oracle/keeper/msg_server_submit_value_test.go index 25d1c9ecd..689942486 100644 --- a/x/oracle/keeper/msg_server_submit_value_test.go +++ b/x/oracle/keeper/msg_server_submit_value_test.go @@ -1,7 +1,6 @@ package keeper_test import ( - "encoding/hex" "time" sdk "github.com/cosmos/cosmos-sdk/types" @@ -13,7 +12,7 @@ import ( reportertypes "github.com/tellor-io/layer/x/reporter/types" ) -func (s *KeeperTestSuite) TestSubmitValue() (reportertypes.OracleReporter, string) { +func (s *KeeperTestSuite) TestSubmitValue() (reportertypes.OracleReporter, []byte) { value := "000000000000000000000000000000000000000000000058528649cf80ee0000" // Commit value transaction first stakedReporter, salt, queryData := s.TestCommitValue() @@ -33,18 +32,15 @@ func (s *KeeperTestSuite) TestSubmitValue() (reportertypes.OracleReporter, strin s.Nil(err) s.Equal(&types.MsgSubmitValueResponse{}, res) - queryId, err := utils.QueryIDFromDataString(queryData) - s.NoError(err) - queryIdStr := hex.EncodeToString(queryId) - - report, err := s.queryClient.GetReportsbyQid(s.ctx, &types.QueryGetReportsbyQidRequest{QueryId: queryIdStr}) + queryId := utils.QueryIDFromData(queryData) + report, err := s.queryClient.GetReportsbyQid(s.ctx, &types.QueryGetReportsbyQidRequest{QueryId: queryId}) s.Nil(err) microReport := types.MicroReport{ Reporter: stakedReporter.GetReporter(), Power: stakedReporter.TotalTokens.Quo(sdk.DefaultPowerReduction).Int64(), QueryType: "SpotPrice", - QueryId: queryIdStr, + QueryId: queryId, AggregateMethod: "weighted-median", Value: value, Timestamp: s.ctx.BlockTime(), @@ -58,7 +54,7 @@ func (s *KeeperTestSuite) TestSubmitValue() (reportertypes.OracleReporter, strin } s.Equal(&expectedReport, report) - return stakedReporter, queryIdStr + return stakedReporter, queryId } // Note: this test fails because logic allows for submit value with no commit @@ -92,7 +88,7 @@ func (s *KeeperTestSuite) TestSubmitValue() (reportertypes.OracleReporter, strin func (s *KeeperTestSuite) TestSubmitWithBadQueryData() { // submit value with bad query data - badQueryData := "stupidQueryData" + badQueryData := []byte("stupidQueryData") value := "000000000000000000000000000000000000000000000058528649cf80ee0000" stakedReporter, salt, _ := s.TestCommitValue() @@ -108,7 +104,7 @@ func (s *KeeperTestSuite) TestSubmitWithBadQueryData() { _ = s.reporterKeeper.On("Reporter", s.ctx, sdk.MustAccAddressFromBech32(stakedReporter.GetReporter())).Return(&stakedReporter, nil) _, err := s.msgServer.SubmitValue(s.ctx, &submitreq) - s.ErrorContains(err, "failed to decode query data string") + s.ErrorContains(err, "collections: not found: key") } func (s *KeeperTestSuite) TestSubmitWithBadValue() { diff --git a/x/oracle/keeper/msg_server_tip.go b/x/oracle/keeper/msg_server_tip.go index b007fe9ff..6ead8f694 100644 --- a/x/oracle/keeper/msg_server_tip.go +++ b/x/oracle/keeper/msg_server_tip.go @@ -27,10 +27,8 @@ func (k msgServer) Tip(goCtx context.Context, msg *types.MsgTip) (*types.MsgTipR } // get query id bytes hash from query data - queryId, err := utils.QueryIDFromDataString(msg.QueryData) - if err != nil { - return nil, err - } + queryId := utils.QueryIDFromData(msg.QueryData) + // get query info for the query id query, err := k.Keeper.Query.Get(ctx, queryId) if err != nil { diff --git a/x/oracle/keeper/msg_update_cyclelist.go b/x/oracle/keeper/msg_update_cyclelist.go index cae3c01f6..b27286e3c 100644 --- a/x/oracle/keeper/msg_update_cyclelist.go +++ b/x/oracle/keeper/msg_update_cyclelist.go @@ -4,17 +4,15 @@ import ( "context" errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tellor-io/layer/x/oracle/types" ) -func (k msgServer) UpdateCyclelist(goCtx context.Context, req *types.MsgUpdateCyclelist) (*types.MsgUpdateCyclelistResponse, error) { +func (k msgServer) UpdateCyclelist(ctx context.Context, req *types.MsgUpdateCyclelist) (*types.MsgUpdateCyclelistResponse, error) { if k.GetAuthority() != req.Authority { return nil, errorsmod.Wrapf(types.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.GetAuthority(), req.Authority) } - ctx := sdk.UnwrapSDKContext(goCtx) if err := k.Cyclelist.Clear(ctx, nil); err != nil { return nil, err } diff --git a/x/oracle/keeper/query_current_cyclelist_query.go b/x/oracle/keeper/query_current_cyclelist_query.go index 9668e088c..27f33efaa 100644 --- a/x/oracle/keeper/query_current_cyclelist_query.go +++ b/x/oracle/keeper/query_current_cyclelist_query.go @@ -3,21 +3,19 @@ package keeper import ( "context" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tellor-io/layer/x/oracle/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) -func (k Querier) CurrentCyclelistQuery(goCtx context.Context, req *types.QueryCurrentCyclelistQueryRequest) (*types.QueryCurrentCyclelistQueryResponse, error) { +func (k Querier) CurrentCyclelistQuery(ctx context.Context, req *types.QueryCurrentCyclelistQueryRequest) (*types.QueryCurrentCyclelistQueryResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - ctx := sdk.UnwrapSDKContext(goCtx) querydata, err := k.GetCurrentQueryInCycleList(ctx) if err != nil { return nil, err } - return &types.QueryCurrentCyclelistQueryResponse{Querydata: querydata}, nil + return &types.QueryCurrentCyclelistQueryResponse{QueryData: querydata}, nil } diff --git a/x/oracle/keeper/query_get_aggregated_report.go b/x/oracle/keeper/query_get_aggregated_report.go index 3b9a52c5a..7940f9ea3 100644 --- a/x/oracle/keeper/query_get_aggregated_report.go +++ b/x/oracle/keeper/query_get_aggregated_report.go @@ -3,23 +3,17 @@ package keeper import ( "context" - "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) -func (k Keeper) GetAggregatedReport(goCtx context.Context, req *types.QueryGetCurrentAggregatedReportRequest) (*types.QueryGetAggregatedReportResponse, error) { +func (k Keeper) GetAggregatedReport(ctx context.Context, req *types.QueryGetCurrentAggregatedReportRequest) (*types.QueryGetAggregatedReportResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - queryId, err := utils.QueryBytesFromString(req.QueryId) - if err != nil { - panic(err) - } - - mostRecent, err := k.GetCurrentValueForQueryId(goCtx, queryId) + mostRecent, err := k.GetCurrentValueForQueryId(ctx, req.QueryId) if err != nil { return nil, err } diff --git a/x/oracle/keeper/query_get_current_tip.go b/x/oracle/keeper/query_get_current_tip.go index e990779b6..5b5a9f783 100644 --- a/x/oracle/keeper/query_get_current_tip.go +++ b/x/oracle/keeper/query_get_current_tip.go @@ -3,25 +3,18 @@ package keeper import ( "context" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) -func (k Keeper) GetCurrentTip(goCtx context.Context, req *types.QueryGetCurrentTipRequest) (*types.QueryGetCurrentTipResponse, error) { +func (k Keeper) GetCurrentTip(ctx context.Context, req *types.QueryGetCurrentTipRequest) (*types.QueryGetCurrentTipResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - ctx := sdk.UnwrapSDKContext(goCtx) - - // req.QueryData = regtypes.Remove0xPrefix(req.QueryData) - queryId, err := utils.QueryIDFromDataString(req.QueryData) - if err != nil { - return nil, status.Error(codes.InvalidArgument, "invalid query data") - } + queryId := utils.QueryIDFromData(req.QueryData) tips, err := k.GetQueryTip(ctx, queryId) if err != nil { return nil, err diff --git a/x/oracle/keeper/query_get_data_before.go b/x/oracle/keeper/query_get_data_before.go index b386f3545..b391a5b22 100644 --- a/x/oracle/keeper/query_get_data_before.go +++ b/x/oracle/keeper/query_get_data_before.go @@ -2,10 +2,8 @@ package keeper import ( "context" - "encoding/hex" "time" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tellor-io/layer/x/oracle/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -16,13 +14,8 @@ func (k Keeper) GetDataBefore(goCtx context.Context, req *types.QueryGetDataBefo return nil, status.Error(codes.InvalidArgument, "invalid request") } - ctx := sdk.UnwrapSDKContext(goCtx) - queryId, err := hex.DecodeString(req.QueryId) - if err != nil { - panic(err) - } t := time.Unix(req.Timestamp, 0) - report, err := k.getDataBefore(ctx, queryId, t) + report, err := k.getDataBefore(goCtx, req.QueryId, t) if err != nil { return nil, err } diff --git a/x/oracle/keeper/query_get_reports.go b/x/oracle/keeper/query_get_reports.go index ec9e209cc..01684773c 100644 --- a/x/oracle/keeper/query_get_reports.go +++ b/x/oracle/keeper/query_get_reports.go @@ -3,7 +3,6 @@ package keeper import ( "context" - "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" "cosmossdk.io/collections" @@ -13,19 +12,16 @@ import ( "google.golang.org/grpc/status" ) -func (k Querier) GetReportsbyQid(goCtx context.Context, req *types.QueryGetReportsbyQidRequest) (*types.QueryGetReportsbyQidResponse, error) { +func (k Querier) GetReportsbyQid(ctx context.Context, req *types.QueryGetReportsbyQidRequest) (*types.QueryGetReportsbyQidResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } reports := types.Reports{ MicroReports: []*types.MicroReport{}, } - queryIdBytes, err := utils.QueryBytesFromString(req.QueryId) - if err != nil { - return nil, status.Error(codes.InvalidArgument, "failed to decode query ID") - } - rng := collections.NewPrefixedTripleRange[[]byte, []byte, uint64](queryIdBytes) - err = k.Reports.Walk(goCtx, rng, func(key collections.Triple[[]byte, []byte, uint64], value types.MicroReport) (stop bool, err error) { + + rng := collections.NewPrefixedTripleRange[[]byte, []byte, uint64](req.QueryId) + err := k.Reports.Walk(ctx, rng, func(key collections.Triple[[]byte, []byte, uint64], value types.MicroReport) (stop bool, err error) { reports.MicroReports = append(reports.MicroReports, &value) return false, nil }) @@ -35,7 +31,7 @@ func (k Querier) GetReportsbyQid(goCtx context.Context, req *types.QueryGetRepor return &types.QueryGetReportsbyQidResponse{Reports: reports}, nil } -func (k Querier) GetReportsbyReporter(goCtx context.Context, req *types.QueryGetReportsbyReporterRequest) (*types.QueryGetReportsbyReporterResponse, error) { +func (k Querier) GetReportsbyReporter(ctx context.Context, req *types.QueryGetReportsbyReporterRequest) (*types.QueryGetReportsbyReporterResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } @@ -43,12 +39,12 @@ func (k Querier) GetReportsbyReporter(goCtx context.Context, req *types.QueryGet reporter := sdk.MustAccAddressFromBech32(req.Reporter) // Retrieve the stored reports for the current block height. - iter, err := k.Reports.Indexes.Reporter.MatchExact(goCtx, reporter.Bytes()) + iter, err := k.Reports.Indexes.Reporter.MatchExact(ctx, reporter.Bytes()) if err != nil { return nil, err } - reports, err := indexes.CollectValues(goCtx, k.Reports, iter) + reports, err := indexes.CollectValues(ctx, k.Reports, iter) if err != nil { return nil, err } @@ -56,7 +52,7 @@ func (k Querier) GetReportsbyReporter(goCtx context.Context, req *types.QueryGet return &types.QueryGetReportsbyReporterResponse{MicroReports: reports}, nil } -func (k Querier) GetReportsbyReporterQid(goCtx context.Context, req *types.QueryGetReportsbyReporterQidRequest) (*types.QueryGetReportsbyQidResponse, error) { +func (k Querier) GetReportsbyReporterQid(ctx context.Context, req *types.QueryGetReportsbyReporterQidRequest) (*types.QueryGetReportsbyQidResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } @@ -66,14 +62,9 @@ func (k Querier) GetReportsbyReporterQid(goCtx context.Context, req *types.Query return nil, status.Error(codes.InvalidArgument, "failed to decode reporter address") } - qId, err := utils.QueryBytesFromString(req.QueryId) - if err != nil { - return nil, status.Error(codes.InvalidArgument, "failed to decode query ID") - } - microReports := []*types.MicroReport{} - rng := collections.NewSuperPrefixedTripleRange[[]byte, []byte, uint64](qId, reporterAdd.Bytes()) - err = k.Reports.Walk(goCtx, rng, func(key collections.Triple[[]byte, []byte, uint64], value types.MicroReport) (stop bool, err error) { + rng := collections.NewSuperPrefixedTripleRange[[]byte, []byte, uint64](req.QueryId, reporterAdd.Bytes()) + err = k.Reports.Walk(ctx, rng, func(key collections.Triple[[]byte, []byte, uint64], value types.MicroReport) (stop bool, err error) { microReports = append(microReports, &value) return false, nil }) diff --git a/x/oracle/keeper/query_get_user_tip_total.go b/x/oracle/keeper/query_get_user_tip_total.go index 9573a42e2..bbfcef42e 100644 --- a/x/oracle/keeper/query_get_user_tip_total.go +++ b/x/oracle/keeper/query_get_user_tip_total.go @@ -22,7 +22,7 @@ func (k Keeper) GetUserTipTotal(goCtx context.Context, req *types.QueryGetUserTi tipper := sdk.MustAccAddressFromBech32(req.Tipper) var totalTips types.UserTipTotal - if req.QueryData == "" { + if len(req.QueryData) == 0 { // if query data is not provide, return total tips for the tipper on all queries totalTips, err := k.GetUserTips(ctx, tipper) if err != nil { @@ -31,12 +31,8 @@ func (k Keeper) GetUserTipTotal(goCtx context.Context, req *types.QueryGetUserTi return &types.QueryGetUserTipTotalResponse{TotalTips: &totalTips}, nil } // if query data is provided, return total tips for the tipper on the specific query - queryId, err := utils.QueryIDFromDataString(req.QueryData) - if err != nil { - return nil, err - } + queryId := utils.QueryIDFromData(req.QueryData) - // TODO: figure out query id here tip, err := k.Tips.Get(ctx, collections.Join(queryId, tipper.Bytes())) if err != nil { if errors.Is(err, collections.ErrNotFound) { diff --git a/x/oracle/keeper/submit_value.go b/x/oracle/keeper/submit_value.go index b7955e470..5952d59c4 100644 --- a/x/oracle/keeper/submit_value.go +++ b/x/oracle/keeper/submit_value.go @@ -1,12 +1,12 @@ package keeper import ( - "encoding/hex" "fmt" "cosmossdk.io/collections" + "github.com/tellor-io/layer/utils" "github.com/tellor-io/layer/x/oracle/types" - "github.com/tellor-io/layer/x/oracle/utils" + oracleutils "github.com/tellor-io/layer/x/oracle/utils" regTypes "github.com/tellor-io/layer/x/registry/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -29,12 +29,12 @@ func (k Keeper) setValue(ctx sdk.Context, reporter sdk.AccAddress, query types.Q if err := dataSpec.ValidateValue(val); err != nil { return status.Error(codes.InvalidArgument, fmt.Sprintf("failed to validate value: %v", err)) } - queryId := HashQueryData(queryData) + queryId := utils.QueryIDFromData(queryData) report := types.MicroReport{ Reporter: reporter.String(), Power: power, QueryType: queryType, - QueryId: hex.EncodeToString(queryId), + QueryId: queryId, Value: val, AggregateMethod: dataSpec.AggregationMethod, Timestamp: ctx.BlockTime(), @@ -53,7 +53,7 @@ func (k Keeper) setValue(ctx sdk.Context, reporter sdk.AccAddress, query types.Q func (k Keeper) VerifyCommit(ctx sdk.Context, reporter string, value, salt, hash string) bool { // calculate commitment - calculatedCommit := utils.CalculateCommitment(value, salt) + calculatedCommit := oracleutils.CalculateCommitment(value, salt) // compare calculated commitment with the one stored return calculatedCommit == hash } diff --git a/x/oracle/keeper/tip.go b/x/oracle/keeper/tip.go index 567898d39..e740b5ff6 100644 --- a/x/oracle/keeper/tip.go +++ b/x/oracle/keeper/tip.go @@ -11,7 +11,7 @@ import ( "github.com/tellor-io/layer/x/oracle/types" ) -func (k Keeper) transfer(ctx sdk.Context, tipper sdk.AccAddress, tip sdk.Coin) (sdk.Coin, error) { +func (k Keeper) transfer(ctx context.Context, tipper sdk.AccAddress, tip sdk.Coin) (sdk.Coin, error) { twoPercent := tip.Amount.Mul(math.NewInt(2)).Quo(math.NewInt(100)) burnCoin := sdk.NewCoin(tip.Denom, twoPercent) if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, tipper, types.ModuleName, sdk.NewCoins(tip)); err != nil { @@ -24,7 +24,7 @@ func (k Keeper) transfer(ctx sdk.Context, tipper sdk.AccAddress, tip sdk.Coin) ( return tip.Sub(burnCoin), nil } -func (k Keeper) GetQueryTip(ctx sdk.Context, queryId []byte) (math.Int, error) { +func (k Keeper) GetQueryTip(ctx context.Context, queryId []byte) (math.Int, error) { tip, err := k.Query.Get(ctx, queryId) if err != nil { if errors.Is(err, collections.ErrNotFound) { diff --git a/x/oracle/keeper/weighted_median.go b/x/oracle/keeper/weighted_median.go index bbfe7dc9b..15d3f9ffc 100644 --- a/x/oracle/keeper/weighted_median.go +++ b/x/oracle/keeper/weighted_median.go @@ -1,23 +1,23 @@ package keeper import ( + "context" "errors" "math" "math/big" "sort" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tellor-io/layer/x/oracle/types" ) -func (k Keeper) WeightedMedian(ctx sdk.Context, reports []types.MicroReport) (*types.Aggregate, error) { +func (k Keeper) WeightedMedian(ctx context.Context, reports []types.MicroReport) (*types.Aggregate, error) { var medianReport types.Aggregate values := make(map[string]*big.Int) for _, r := range reports { val, ok := new(big.Int).SetString(r.Value, 16) if !ok { - ctx.Logger().Error("WeightedMedian", "error", "failed to parse value") + k.Logger(ctx).Error("WeightedMedian", "error", "failed to parse value") return nil, errors.New("failed to parse value") } values[r.Reporter] = val diff --git a/x/oracle/keeper/weighted_median_test.go b/x/oracle/keeper/weighted_median_test.go index bc46d3035..81404dd6d 100644 --- a/x/oracle/keeper/weighted_median_test.go +++ b/x/oracle/keeper/weighted_median_test.go @@ -1,6 +1,8 @@ package keeper_test import ( + "encoding/hex" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tellor-io/layer/testutil" "github.com/tellor-io/layer/testutil/sample" @@ -8,7 +10,7 @@ import ( ) func (s *KeeperTestSuite) TestWeightedMedian() { - qId := "83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992" + qId, _ := hex.DecodeString("83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992") reporters := make([]sdk.AccAddress, 18) for i := 0; i < 18; i++ { reporters[i] = sample.AccAddressBytes() @@ -43,7 +45,7 @@ func (s *KeeperTestSuite) TestWeightedMedian() { // // special case A -- lower weighted median and upper weighted median are equal, powers are equal // // calculates lower median - qId = "a6f013ee236804827b77696d350e9f0ac3e879328f2a3021d473a0b778ad78ac" + qId, _ = hex.DecodeString("a6f013ee236804827b77696d350e9f0ac3e879328f2a3021d473a0b778ad78ac") currentReporters = reporters[5:9] valuesInt = []int{10, 10, 20, 20} values = testutil.IntToHex(valuesInt) @@ -71,7 +73,7 @@ func (s *KeeperTestSuite) TestWeightedMedian() { // special case B -- lower weighted median and upper weighted median are equal, powers are not all equal // calculates lower median - qId = "48e9e2c732ba278de6ac88a3a57a5c5ba13d3d8370e709b3b98333a57876ca95" + qId, _ = hex.DecodeString("48e9e2c732ba278de6ac88a3a57a5c5ba13d3d8370e709b3b98333a57876ca95") currentReporters = reporters[9:13] valuesInt = []int{10, 10, 20, 20} values = testutil.IntToHex(valuesInt) @@ -98,7 +100,7 @@ func (s *KeeperTestSuite) TestWeightedMedian() { s.Equal(res.Report.StandardDeviation, testutil.CalculateStandardDeviation(valuesInt, powers, weightedMean), "std deviation is not correct") // // 5 reporters with even weights, should be equal to normal median - qId = "907154958baee4fb0ce2bbe50728141ac76eb2dc1731b3d40f0890746dd07e62" + qId, _ = hex.DecodeString("907154958baee4fb0ce2bbe50728141ac76eb2dc1731b3d40f0890746dd07e62") currentReporters = reporters[13:18] valuesInt = []int{10, 20, 30, 40, 50} values = testutil.IntToHex(valuesInt) diff --git a/x/oracle/keeper/weighted_mode.go b/x/oracle/keeper/weighted_mode.go index a6ef86cba..139eb50e5 100644 --- a/x/oracle/keeper/weighted_mode.go +++ b/x/oracle/keeper/weighted_mode.go @@ -1,11 +1,12 @@ package keeper import ( - sdk "github.com/cosmos/cosmos-sdk/types" + "context" + "github.com/tellor-io/layer/x/oracle/types" ) -func (k Keeper) WeightedMode(ctx sdk.Context, reports []types.MicroReport) (*types.Aggregate, error) { +func (k Keeper) WeightedMode(ctx context.Context, reports []types.MicroReport) (*types.Aggregate, error) { if len(reports) == 0 { return nil, types.ErrNoReportsToAggregate.Wrapf("can't aggregate empty reports") } diff --git a/x/oracle/keeper/weighted_mode_test.go b/x/oracle/keeper/weighted_mode_test.go index 4eb2f4f57..c2abbc567 100644 --- a/x/oracle/keeper/weighted_mode_test.go +++ b/x/oracle/keeper/weighted_mode_test.go @@ -1,6 +1,8 @@ package keeper_test import ( + "encoding/hex" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tellor-io/layer/testutil/sample" "github.com/tellor-io/layer/x/oracle/types" @@ -11,7 +13,7 @@ func (s *KeeperTestSuite) TestWeightedMode() { for i := 0; i < 10; i++ { reporters[i] = sample.AccAddressBytes() } - qId := "83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992" + qId, _ := hex.DecodeString("83a7f3d48786ac2667503a61e8c415438ed2922eb86a2906e4ee66d9a2ce4992") // normal scenario // list of reports expectedReporter := reporters[3].String() @@ -65,7 +67,7 @@ func (s *KeeperTestSuite) TestWeightedMode() { s.Equal(res.Report.AggregateReportIndex, int64(3), "report index is not correct") // scenario where mode is not decided by most powerful reporter - qId2 := "a6f013ee236804827b77696d350e9f0ac3e879328f2a3021d473a0b778ad78ac" + qId2, _ := hex.DecodeString("a6f013ee236804827b77696d350e9f0ac3e879328f2a3021d473a0b778ad78ac") expectedReporter = reporters[6].String() reports = []types.MicroReport{ { diff --git a/x/oracle/mocks/RegistryKeeper.go b/x/oracle/mocks/RegistryKeeper.go index 653f7ed97..abbe6186f 100644 --- a/x/oracle/mocks/RegistryKeeper.go +++ b/x/oracle/mocks/RegistryKeeper.go @@ -3,11 +3,11 @@ package mocks import ( - mock "github.com/stretchr/testify/mock" + context "context" - registrytypes "github.com/tellor-io/layer/x/registry/types" + mock "github.com/stretchr/testify/mock" - types "github.com/cosmos/cosmos-sdk/types" + types "github.com/tellor-io/layer/x/registry/types" ) // RegistryKeeper is an autogenerated mock type for the RegistryKeeper type @@ -16,21 +16,21 @@ type RegistryKeeper struct { } // GetSpec provides a mock function with given fields: ctx, queryType -func (_m *RegistryKeeper) GetSpec(ctx types.Context, queryType string) (registrytypes.DataSpec, error) { +func (_m *RegistryKeeper) GetSpec(ctx context.Context, queryType string) (types.DataSpec, error) { ret := _m.Called(ctx, queryType) - var r0 registrytypes.DataSpec + var r0 types.DataSpec var r1 error - if rf, ok := ret.Get(0).(func(types.Context, string) (registrytypes.DataSpec, error)); ok { + if rf, ok := ret.Get(0).(func(context.Context, string) (types.DataSpec, error)); ok { return rf(ctx, queryType) } - if rf, ok := ret.Get(0).(func(types.Context, string) registrytypes.DataSpec); ok { + if rf, ok := ret.Get(0).(func(context.Context, string) types.DataSpec); ok { r0 = rf(ctx, queryType) } else { - r0 = ret.Get(0).(registrytypes.DataSpec) + r0 = ret.Get(0).(types.DataSpec) } - if rf, ok := ret.Get(1).(func(types.Context, string) error); ok { + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { r1 = rf(ctx, queryType) } else { r1 = ret.Error(1) diff --git a/x/oracle/types/aggregate.pb.go b/x/oracle/types/aggregate.pb.go index 655c9b59d..37aa4cf58 100644 --- a/x/oracle/types/aggregate.pb.go +++ b/x/oracle/types/aggregate.pb.go @@ -29,7 +29,7 @@ var _ = time.Kitchen const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Aggregate struct { - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` AggregateValue string `protobuf:"bytes,2,opt,name=aggregateValue,proto3" json:"aggregateValue,omitempty"` AggregateReporter string `protobuf:"bytes,3,opt,name=aggregateReporter,proto3" json:"aggregateReporter,omitempty"` ReporterPower int64 `protobuf:"varint,4,opt,name=reporterPower,proto3" json:"reporterPower,omitempty"` @@ -74,11 +74,11 @@ func (m *Aggregate) XXX_DiscardUnknown() { var xxx_messageInfo_Aggregate proto.InternalMessageInfo -func (m *Aggregate) GetQueryId() string { +func (m *Aggregate) GetQueryId() []byte { if m != nil { return m.QueryId } - return "" + return nil } func (m *Aggregate) GetAggregateValue() string { @@ -196,33 +196,34 @@ func init() { func init() { proto.RegisterFile("layer/oracle/aggregate.proto", fileDescriptor_788ad347f505f8a6) } var fileDescriptor_788ad347f505f8a6 = []byte{ - // 416 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xcf, 0x6f, 0xd3, 0x30, - 0x14, 0xae, 0xc9, 0xd6, 0x35, 0xe6, 0x87, 0x84, 0xa9, 0x90, 0x55, 0xa1, 0x24, 0x9a, 0x00, 0x05, - 0x09, 0x1c, 0x69, 0x9c, 0x39, 0x74, 0xec, 0xb2, 0x1b, 0xb2, 0x10, 0x07, 0x38, 0x20, 0xa7, 0x79, - 0x73, 0x23, 0xb9, 0x71, 0x70, 0x9c, 0xb1, 0xfe, 0x0b, 0x9c, 0xf6, 0x67, 0xed, 0xb8, 0x23, 0x27, - 0x40, 0xed, 0x3f, 0x82, 0xea, 0xd4, 0x61, 0x74, 0xbb, 0xf9, 0x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0b, 0xce, - 0x94, 0x90, 0x12, 0x0a, 0x7a, 0x90, 0xa0, 0x74, 0xc4, 0x3d, 0x24, 0x63, 0xbc, 0x5f, 0xe9, 0x6a, - 0x06, 0x74, 0x94, 0xa0, 0x74, 0x8f, 0x77, 0x80, 0x1c, 0xe1, 0xf1, 0xce, 0x5c, 0xa7, 0x55, 0x01, - 0x17, 0x34, 0x74, 0x93, 0xdc, 0xc9, 0x91, 0xa7, 0x78, 0x38, 0x87, 0x52, 0xce, 0x2d, 0xc5, 0x4e, - 0xb5, 0x45, 0x87, 0x5f, 0xf0, 0x93, 0xe9, 0xb9, 0x28, 0x95, 0xc8, 0x15, 0x7c, 0xf4, 0xfb, 0x6c, - 0xc8, 0x09, 0xc6, 0xfd, 0x76, 0x1b, 0x8a, 0xdc, 0x48, 0x13, 0xd6, 0x05, 0x80, 0xf9, 0x00, 0xb0, - 0xde, 0x70, 0x3c, 0xba, 0xfa, 0x15, 0x0f, 0x2e, 0x7f, 0xc7, 0x88, 0xdf, 0xf0, 0x1d, 0xbf, 0xbf, - 0x5a, 0x45, 0xe8, 0x7a, 0x15, 0xa1, 0x3f, 0xab, 0x08, 0x5d, 0xae, 0xa3, 0xc1, 0xf5, 0x3a, 0x1a, - 0xfc, 0x5c, 0x47, 0x83, 0xcf, 0xaf, 0x64, 0x69, 0xe7, 0x6d, 0xce, 0x66, 0x7a, 0x91, 0x59, 0x50, - 0x4a, 0x9b, 0x37, 0xa5, 0xce, 0xba, 0xfc, 0x5c, 0xf8, 0x04, 0xd9, 0x65, 0x0d, 0x4d, 0x3e, 0x74, - 0xed, 0xde, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x03, 0x03, 0x31, 0xc1, 0x02, 0x00, 0x00, + // 422 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xae, 0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, 0x9b, 0x99, 0x45, 0xea, 0x40, 0x6b, 0x63, 0xdf, 0x29, 0x93, 0x36, 0x01, 0x3a, 0x6f, 0x23, + 0xe4, 0x96, 0x25, 0x54, 0xd9, 0xc0, 0xb7, 0x7b, 0xff, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xf9, + 0xe2, 0x3e, 0xc2, 0x02, 0x00, 0x00, } func (m *Aggregate) Marshal() (dAtA []byte, err error) { @@ -464,7 +465,7 @@ func (m *Aggregate) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowAggregate @@ -474,23 +475,25 @@ func (m *Aggregate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthAggregate } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthAggregate } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = string(dAtA[iNdEx:postIndex]) + m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) + if m.QueryId == nil { + m.QueryId = []byte{} + } iNdEx = postIndex case 2: if wireType != 2 { diff --git a/x/oracle/types/commit_report.pb.go b/x/oracle/types/commit_report.pb.go index 04042f638..0e0fb1111 100644 --- a/x/oracle/types/commit_report.pb.go +++ b/x/oracle/types/commit_report.pb.go @@ -24,7 +24,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Commit struct { Reporter string `protobuf:"bytes,1,opt,name=reporter,proto3" json:"reporter,omitempty"` - QueryId []byte `protobuf:"bytes,2,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,2,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` Incycle bool `protobuf:"varint,4,opt,name=incycle,proto3" json:"incycle,omitempty"` } @@ -97,21 +97,21 @@ func init() { func init() { proto.RegisterFile("layer/oracle/commit_report.proto", fileDescriptor_b56672e00badb6a1) } var fileDescriptor_b56672e00badb6a1 = []byte{ - // 213 bytes of a gzipped FileDescriptorProto + // 219 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xc8, 0x49, 0xac, 0x4c, 0x2d, 0xd2, 0xcf, 0x2f, 0x4a, 0x4c, 0xce, 0x49, 0xd5, 0x4f, 0xce, 0xcf, 0xcd, 0xcd, 0x2c, 0x89, 0x2f, 0x4a, 0x2d, 0xc8, 0x2f, 0x2a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0xab, - 0xd0, 0x83, 0xa8, 0x90, 0x12, 0x45, 0x51, 0x5f, 0x52, 0x01, 0x51, 0xa4, 0x94, 0xc3, 0xc5, 0xe6, + 0xd0, 0x83, 0xa8, 0x90, 0x12, 0x45, 0x51, 0x5f, 0x52, 0x01, 0x51, 0xa4, 0x94, 0xcb, 0xc5, 0xe6, 0x0c, 0xd6, 0x2b, 0x24, 0xc5, 0xc5, 0x01, 0xd1, 0x9e, 0x5a, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, - 0x19, 0x04, 0xe7, 0x0b, 0x49, 0x70, 0xb1, 0x17, 0x96, 0xa6, 0x16, 0x55, 0x7a, 0xa6, 0x48, 0x30, - 0x29, 0x30, 0x6a, 0xf0, 0x04, 0xc1, 0xb8, 0x42, 0x42, 0x5c, 0x2c, 0x19, 0x89, 0xc5, 0x19, 0x12, - 0xcc, 0x60, 0x1d, 0x60, 0x36, 0x48, 0x75, 0x66, 0x5e, 0x72, 0x65, 0x72, 0x4e, 0xaa, 0x04, 0x8b, - 0x02, 0xa3, 0x06, 0x47, 0x10, 0x8c, 0xeb, 0xe4, 0x7c, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, - 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, - 0x72, 0x0c, 0x51, 0x9a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x25, - 0xa9, 0x39, 0x39, 0xf9, 0x45, 0xba, 0x99, 0xf9, 0xfa, 0x10, 0x37, 0x57, 0xc0, 0x5d, 0x5d, 0x59, - 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x76, 0xb9, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x93, 0x44, - 0x83, 0x02, 0x01, 0x00, 0x00, + 0x19, 0x04, 0xe7, 0x0b, 0x49, 0x72, 0x71, 0x14, 0x96, 0xa6, 0x16, 0x55, 0xc6, 0x67, 0xa6, 0x48, + 0x30, 0x29, 0x30, 0x6a, 0xf0, 0x04, 0xb1, 0x83, 0xf9, 0x9e, 0x29, 0x42, 0x42, 0x5c, 0x2c, 0x19, + 0x89, 0xc5, 0x19, 0x12, 0xcc, 0x60, 0x2d, 0x60, 0xb6, 0x90, 0x04, 0x17, 0x7b, 0x66, 0x5e, 0x72, + 0x65, 0x72, 0x4e, 0xaa, 0x04, 0x8b, 0x02, 0xa3, 0x06, 0x47, 0x10, 0x8c, 0xeb, 0xe4, 0x7c, 0xe2, + 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, + 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x9a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, + 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x25, 0xa9, 0x39, 0x39, 0xf9, 0x45, 0xba, 0x99, 0xf9, 0xfa, 0x10, + 0x47, 0x57, 0xc0, 0x9d, 0x5d, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x76, 0xba, 0x31, 0x20, 0x00, + 0x00, 0xff, 0xff, 0x74, 0xb4, 0x6d, 0xff, 0x03, 0x01, 0x00, 0x00, } func (m *Commit) Marshal() (dAtA []byte, err error) { diff --git a/x/oracle/types/cyclelist.go b/x/oracle/types/cyclelist.go index 335ceb52f..4cdafbd1e 100644 --- a/x/oracle/types/cyclelist.go +++ b/x/oracle/types/cyclelist.go @@ -1,12 +1,26 @@ package types -func InitialCycleList() []string { - return []string{ +import "encoding/hex" + +func InitialCycleList() [][]byte { + strs := []string{ //ETH/USD - "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003657468000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003657468000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000", //BTC/USD - "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003627463000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003627463000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000", //TRB/USD - "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003747262000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000", + "00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000953706F745072696365000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000003747262000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037573640000000000000000000000000000000000000000000000000000000000", } + + var cycleList [][]byte + + for _, str := range strs { + bz, err := hex.DecodeString(str) + if err != nil { + panic(err) + } + cycleList = append(cycleList, bz) + } + + return cycleList } diff --git a/x/oracle/types/errors.go b/x/oracle/types/errors.go index 16ee54737..eff9c1424 100644 --- a/x/oracle/types/errors.go +++ b/x/oracle/types/errors.go @@ -20,5 +20,4 @@ var ( ErrNoReportsToAggregate = sdkerrors.Register(ModuleName, 1108, "no reports to aggregate") ErrQueryNotFound = sdkerrors.Register(ModuleName, 1109, "query not found") ErrNoTipsNotInCycle = sdkerrors.Register(ModuleName, 1110, "no tips not in cycle") - ErrInvalidQueryData = sdkerrors.Register(ModuleName, 1111, "invalid query data") ) diff --git a/x/oracle/types/expected_keepers.go b/x/oracle/types/expected_keepers.go index 40adbf443..40384fe6a 100644 --- a/x/oracle/types/expected_keepers.go +++ b/x/oracle/types/expected_keepers.go @@ -29,7 +29,7 @@ type BankKeeper interface { type RegistryKeeper interface { // Methods imported from registry should be defined here - GetSpec(ctx sdk.Context, queryType string) (rktypes.DataSpec, error) + GetSpec(ctx context.Context, queryType string) (rktypes.DataSpec, error) } type ReporterKeeper interface { diff --git a/x/oracle/types/genesis.pb.go b/x/oracle/types/genesis.pb.go index b55d534ba..229450900 100644 --- a/x/oracle/types/genesis.pb.go +++ b/x/oracle/types/genesis.pb.go @@ -26,7 +26,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the oracle module's genesis state. type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - Cyclelist []string `protobuf:"bytes,2,rep,name=cyclelist,proto3" json:"cyclelist,omitempty"` + Cyclelist [][]byte `protobuf:"bytes,2,rep,name=cyclelist,proto3" json:"cyclelist,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -69,7 +69,7 @@ func (m *GenesisState) GetParams() Params { return Params{} } -func (m *GenesisState) GetCyclelist() []string { +func (m *GenesisState) GetCyclelist() [][]byte { if m != nil { return m.Cyclelist } @@ -92,12 +92,12 @@ var fileDescriptor_ae3e046083fcf09b = []byte{ 0xa9, 0x42, 0x46, 0x5c, 0x6c, 0x10, 0x79, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x11, 0x3d, 0x64, 0xf3, 0xf5, 0x02, 0xc0, 0x72, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0x55, 0x0a, 0x29, 0x71, 0x71, 0x26, 0x57, 0x26, 0xe7, 0xa4, 0xe6, 0x64, 0x16, 0x97, 0x48, 0x30, 0x29, 0x30, - 0x6b, 0x70, 0x42, 0x15, 0x20, 0x84, 0x9d, 0x9c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, + 0x6b, 0xf0, 0x40, 0x15, 0x20, 0x84, 0x9d, 0x9c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x33, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xbf, 0x24, 0x35, 0x27, 0x27, 0xbf, 0x48, 0x37, 0x33, 0x5f, 0x1f, 0xe2, 0xe2, 0x0a, 0x98, 0x9b, 0x4b, 0x2a, - 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x6e, 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x69, 0x41, - 0x9c, 0xdb, 0x10, 0x01, 0x00, 0x00, + 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x6e, 0x36, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x34, 0x40, + 0x07, 0xff, 0x10, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -162,8 +162,8 @@ func (m *GenesisState) Size() (n int) { l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) if len(m.Cyclelist) > 0 { - for _, s := range m.Cyclelist { - l = len(s) + for _, b := range m.Cyclelist { + l = len(b) n += 1 + l + sovGenesis(uint64(l)) } } @@ -242,7 +242,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Cyclelist", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -252,23 +252,23 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.Cyclelist = append(m.Cyclelist, string(dAtA[iNdEx:postIndex])) + m.Cyclelist = append(m.Cyclelist, make([]byte, postIndex-iNdEx)) + copy(m.Cyclelist[len(m.Cyclelist)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/oracle/types/message_commit_report.go b/x/oracle/types/message_commit_report.go index 558f01df6..b1d0a7122 100644 --- a/x/oracle/types/message_commit_report.go +++ b/x/oracle/types/message_commit_report.go @@ -4,6 +4,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/tellor-io/layer/utils" ) const TypeMsgCommitReport = "commit_report" @@ -11,9 +12,14 @@ const TypeMsgCommitReport = "commit_report" var _ sdk.Msg = &MsgCommitReport{} func NewMsgCommitReport(creator string, queryData string, hash string) *MsgCommitReport { + qDataBz, err := utils.QueryBytesFromString(queryData) + if err != nil { + panic(err) + } + return &MsgCommitReport{ Creator: creator, - QueryData: queryData, + QueryData: qDataBz, Hash: hash, } } @@ -52,7 +58,7 @@ func (msg *MsgCommitReport) GetSignerAndValidateMsg() (sdk.AccAddress, error) { if err != nil { return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - if msg.QueryData == "" { + if len(msg.QueryData) == 0 { return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "query data field cannot be empty") } if msg.Hash == "" { diff --git a/x/oracle/types/message_submit_value.go b/x/oracle/types/message_submit_value.go index e82988d25..62704f928 100644 --- a/x/oracle/types/message_submit_value.go +++ b/x/oracle/types/message_submit_value.go @@ -4,6 +4,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/tellor-io/layer/utils" ) const TypeMsgSubmitValue = "submit_value" @@ -11,9 +12,14 @@ const TypeMsgSubmitValue = "submit_value" var _ sdk.Msg = &MsgSubmitValue{} func NewMsgSubmitValue(creator string, queryData string, value string, salt string) *MsgSubmitValue { + queryDataBz, err := utils.QueryBytesFromString(queryData) + if err != nil { + panic(err) + } + return &MsgSubmitValue{ Creator: creator, - QueryData: queryData, + QueryData: queryDataBz, Value: value, Salt: salt, } @@ -53,7 +59,7 @@ func (msg *MsgSubmitValue) GetSignerAndValidateMsg() (sdk.AccAddress, error) { if err != nil { return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) } - if msg.QueryData == "" { + if len(msg.QueryData) == 0 { return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "query data cannot be empty") } if msg.Value == "" { diff --git a/x/oracle/types/message_tip.go b/x/oracle/types/message_tip.go index a3ec9c90c..424251782 100644 --- a/x/oracle/types/message_tip.go +++ b/x/oracle/types/message_tip.go @@ -4,6 +4,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/tellor-io/layer/utils" ) const TypeMsgTip = "tip" @@ -11,9 +12,14 @@ const TypeMsgTip = "tip" var _ sdk.Msg = &MsgTip{} func NewMsgTip(tipper string, queryData string, amount sdk.Coin) *MsgTip { + queryDataBz, err := utils.QueryBytesFromString(queryData) + if err != nil { + panic(err) + } + return &MsgTip{ Tipper: tipper, - QueryData: queryData, + QueryData: queryDataBz, Amount: amount, } } diff --git a/x/oracle/types/micro_report.pb.go b/x/oracle/types/micro_report.pb.go index 015f8a5ae..ddff5abce 100644 --- a/x/oracle/types/micro_report.pb.go +++ b/x/oracle/types/micro_report.pb.go @@ -36,7 +36,7 @@ type MicroReport struct { // string identifier of the data spec QueryType string `protobuf:"bytes,3,opt,name=query_type,json=queryType,proto3" json:"query_type,omitempty"` // hash of the query data - QueryId string `protobuf:"bytes,4,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` + QueryId []byte `protobuf:"bytes,4,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` // aggregate method to use for aggregating all the reports for the query id AggregateMethod string `protobuf:"bytes,5,opt,name=aggregate_method,json=aggregateMethod,proto3" json:"aggregate_method,omitempty"` // hex string of the response value @@ -103,11 +103,11 @@ func (m *MicroReport) GetQueryType() string { return "" } -func (m *MicroReport) GetQueryId() string { +func (m *MicroReport) GetQueryId() []byte { if m != nil { return m.QueryId } - return "" + return nil } func (m *MicroReport) GetAggregateMethod() string { @@ -152,30 +152,30 @@ func init() { func init() { proto.RegisterFile("layer/oracle/micro_report.proto", fileDescriptor_c39350954f878191) } var fileDescriptor_c39350954f878191 = []byte{ - // 359 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x51, 0xbd, 0x6e, 0xdb, 0x30, - 0x10, 0x16, 0xed, 0xda, 0x96, 0x68, 0x03, 0x2d, 0x08, 0x0f, 0xac, 0xd0, 0x4a, 0x6a, 0x27, 0x79, - 0xa8, 0x04, 0xb4, 0x6f, 0xe0, 0x4e, 0x19, 0x9c, 0x41, 0xf0, 0x94, 0x45, 0x90, 0xe4, 0x0b, 0x2d, - 0x84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7, 0xce, 0x39, 0x0f, 0x1d, 0x05, 0x28, 0x1c, 0xff, 0x75, 0x23, - 0x93, 0x38, 0x3a, 0x25, 0x8e, 0x96, 0x27, 0xc7, 0xdc, 0xde, 0xbd, 0xf9, 0xd6, 0xf6, 0xdd, 0x47, - 0xc9, 0xa5, 0x8c, 0xfc, 0xc0, 0x4e, 0xd1, 0x16, 0x1c, 0x78, 0xb9, 0x51, 0xd4, 0x0e, 0x50, 0x68, - 0x27, 0x17, 0x82, 0xfc, 0xc2, 0x93, 0x9c, 0x8b, 0xe2, 0x2e, 0xbd, 0x6f, 0xaa, 0x1c, 0x24, 0x75, - 0x74, 0xf2, 0xb1, 0xe6, 0xae, 0x35, 0x35, 0xff, 0xbf, 0x3b, 0x78, 0x68, 0x7f, 0xf0, 0xd0, 0xc7, - 0xc1, 0x43, 0xdb, 0xa3, 0x67, 0xed, 0x8f, 0x9e, 0xf5, 0x7a, 0xf4, 0xac, 0x9b, 0x19, 0x2b, 0xd5, - 0xba, 0xc9, 0xa3, 0x42, 0x54, 0xb1, 0x02, 0xce, 0x85, 0xfc, 0x53, 0x8a, 0xd8, 0x9c, 0xf5, 0xf9, - 0x74, 0xd8, 0x6e, 0x6b, 0x9b, 0x7c, 0xa8, 0xbf, 0xfb, 0xef, 0x33, 0x00, 0x00, 0xff, 0xff, 0x0f, - 0x39, 0x4c, 0x75, 0xf5, 0x01, 0x00, 0x00, + // 364 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x91, 0xb1, 0x6e, 0xdb, 0x30, + 0x10, 0x86, 0x45, 0xbb, 0xb6, 0x25, 0xda, 0x40, 0x0b, 0xc2, 0x03, 0x2b, 0xb4, 0x92, 0xda, 0x49, + 0x1e, 0x2a, 0x01, 0xed, 0x1b, 0xb8, 0x53, 0x06, 0x67, 0x10, 0x3c, 0x65, 0x11, 0x24, 0xf9, 0x42, + 0x0b, 0xa1, 0x42, 0x85, 0xa6, 0x92, 0xe8, 0x2d, 0xfc, 0x46, 0x59, 0x3d, 0x7a, 0xcc, 0x94, 0x04, + 0xf6, 0x8b, 0x04, 0x22, 0x61, 0x7b, 0xd3, 0xff, 0xdd, 0x7f, 0x77, 0xfa, 0x79, 0xd8, 0xe7, 0x59, + 0x0b, 0x32, 0x16, 0x32, 0x2b, 0x38, 0xc4, 0x55, 0x59, 0x48, 0x91, 0x4a, 0xa8, 0x85, 0x54, 0x51, + 0x2d, 0x85, 0x12, 0x64, 0xa2, 0x0d, 0x91, 0x31, 0xb8, 0x53, 0x26, 0x98, 0xd0, 0x85, 0xb8, 0xfb, + 0x32, 0x1e, 0xd7, 0x67, 0x42, 0x30, 0x0e, 0xb1, 0x56, 0x79, 0x73, 0x1b, 0xab, 0xb2, 0x82, 0x8d, + 0xca, 0xaa, 0xda, 0x18, 0x7e, 0xbf, 0xf4, 0xf0, 0x78, 0xd1, 0xcd, 0x4e, 0xf4, 0x68, 0xe2, 0x62, + 0xdb, 0x2c, 0x01, 0x49, 0x51, 0x80, 0x42, 0x27, 0x39, 0x6b, 0x32, 0xc5, 0x83, 0x5a, 0x3c, 0x81, + 0xa4, 0xbd, 0x00, 0x85, 0xfd, 0xc4, 0x08, 0xf2, 0x13, 0xe3, 0x87, 0x06, 0x64, 0x9b, 0xaa, 0xb6, + 0x06, 0xda, 0xd7, 0x3d, 0x8e, 0x26, 0xcb, 0xb6, 0x06, 0xf2, 0x1d, 0xdb, 0xa6, 0x5c, 0xae, 0xe8, + 0x97, 0x00, 0x85, 0x93, 0x64, 0xa4, 0xf5, 0xd5, 0x8a, 0xcc, 0xf0, 0xb7, 0x8c, 0x31, 0x09, 0x2c, + 0x53, 0x90, 0x56, 0xa0, 0xd6, 0x62, 0x45, 0x07, 0xba, 0xff, 0xeb, 0x99, 0x2f, 0x34, 0xee, 0x56, + 0x3f, 0x66, 0xbc, 0x01, 0x3a, 0xd4, 0x75, 0x23, 0xc8, 0x1c, 0x3b, 0xe7, 0x3c, 0x74, 0x14, 0xa0, + 0x70, 0xfc, 0xd7, 0x8d, 0x4c, 0xe2, 0xe8, 0x94, 0x38, 0x5a, 0x9e, 0x1c, 0x73, 0x7b, 0xf7, 0xe6, + 0x5b, 0xdb, 0x77, 0x1f, 0x25, 0x97, 0x36, 0xf2, 0x03, 0x3b, 0x45, 0x5b, 0x70, 0xe0, 0xe5, 0x46, + 0x51, 0x3b, 0x40, 0xa1, 0x9d, 0x5c, 0x00, 0xf9, 0x85, 0x27, 0x39, 0x17, 0xc5, 0x5d, 0x7a, 0xdf, + 0x54, 0x39, 0x48, 0xea, 0xe8, 0xe4, 0x63, 0xcd, 0xae, 0x35, 0x9a, 0xff, 0xdf, 0x1d, 0x3c, 0xb4, + 0x3f, 0x78, 0xe8, 0xe3, 0xe0, 0xa1, 0xed, 0xd1, 0xb3, 0xf6, 0x47, 0xcf, 0x7a, 0x3d, 0x7a, 0xd6, + 0xcd, 0x8c, 0x95, 0x6a, 0xdd, 0xe4, 0x51, 0x21, 0xaa, 0x58, 0x01, 0xe7, 0x42, 0xfe, 0x29, 0x45, + 0x6c, 0xce, 0xfa, 0x7c, 0x3a, 0x6c, 0xf7, 0x6a, 0x9b, 0x7c, 0xa8, 0x7f, 0xf7, 0xdf, 0x67, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xfd, 0x3f, 0xc3, 0x21, 0xf5, 0x01, 0x00, 0x00, } func (m *MicroReport) Marshal() (dAtA []byte, err error) { @@ -437,7 +437,7 @@ func (m *MicroReport) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowMicroReport @@ -447,23 +447,25 @@ func (m *MicroReport) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthMicroReport } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthMicroReport } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = string(dAtA[iNdEx:postIndex]) + m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) + if m.QueryId == nil { + m.QueryId = []byte{} + } iNdEx = postIndex case 5: if wireType != 2 { diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index d95fc117e..5c25deedd 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -116,7 +116,7 @@ func (m *QueryParamsResponse) GetParams() Params { } type QueryGetReportsbyQidRequest struct { - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` } func (m *QueryGetReportsbyQidRequest) Reset() { *m = QueryGetReportsbyQidRequest{} } @@ -152,11 +152,11 @@ func (m *QueryGetReportsbyQidRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetReportsbyQidRequest proto.InternalMessageInfo -func (m *QueryGetReportsbyQidRequest) GetQueryId() string { +func (m *QueryGetReportsbyQidRequest) GetQueryId() []byte { if m != nil { return m.QueryId } - return "" + return nil } type QueryGetReportsbyQidResponse struct { @@ -293,7 +293,7 @@ func (m *QueryGetReportsbyReporterResponse) GetMicroReports() []MicroReport { type QueryGetReportsbyReporterQidRequest struct { Reporter string `protobuf:"bytes,1,opt,name=reporter,proto3" json:"reporter,omitempty"` - QueryId string `protobuf:"bytes,2,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,2,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` } func (m *QueryGetReportsbyReporterQidRequest) Reset() { *m = QueryGetReportsbyReporterQidRequest{} } @@ -336,15 +336,15 @@ func (m *QueryGetReportsbyReporterQidRequest) GetReporter() string { return "" } -func (m *QueryGetReportsbyReporterQidRequest) GetQueryId() string { +func (m *QueryGetReportsbyReporterQidRequest) GetQueryId() []byte { if m != nil { return m.QueryId } - return "" + return nil } type QueryGetCurrentTipRequest struct { - QueryData string `protobuf:"bytes,1,opt,name=queryData,proto3" json:"queryData,omitempty"` + QueryData []byte `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` } func (m *QueryGetCurrentTipRequest) Reset() { *m = QueryGetCurrentTipRequest{} } @@ -380,11 +380,11 @@ func (m *QueryGetCurrentTipRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetCurrentTipRequest proto.InternalMessageInfo -func (m *QueryGetCurrentTipRequest) GetQueryData() string { +func (m *QueryGetCurrentTipRequest) GetQueryData() []byte { if m != nil { return m.QueryData } - return "" + return nil } type QueryGetCurrentTipResponse struct { @@ -433,7 +433,7 @@ func (m *QueryGetCurrentTipResponse) GetTips() *Tips { type QueryGetUserTipTotalRequest struct { Tipper string `protobuf:"bytes,1,opt,name=tipper,proto3" json:"tipper,omitempty"` - QueryData string `protobuf:"bytes,2,opt,name=queryData,proto3" json:"queryData,omitempty"` + QueryData []byte `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` } func (m *QueryGetUserTipTotalRequest) Reset() { *m = QueryGetUserTipTotalRequest{} } @@ -476,11 +476,11 @@ func (m *QueryGetUserTipTotalRequest) GetTipper() string { return "" } -func (m *QueryGetUserTipTotalRequest) GetQueryData() string { +func (m *QueryGetUserTipTotalRequest) GetQueryData() []byte { if m != nil { return m.QueryData } - return "" + return nil } type QueryGetUserTipTotalResponse struct { @@ -528,7 +528,7 @@ func (m *QueryGetUserTipTotalResponse) GetTotalTips() *UserTipTotal { } type QueryGetCurrentAggregatedReportRequest struct { - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` } func (m *QueryGetCurrentAggregatedReportRequest) Reset() { @@ -566,11 +566,11 @@ func (m *QueryGetCurrentAggregatedReportRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetCurrentAggregatedReportRequest proto.InternalMessageInfo -func (m *QueryGetCurrentAggregatedReportRequest) GetQueryId() string { +func (m *QueryGetCurrentAggregatedReportRequest) GetQueryId() []byte { if m != nil { return m.QueryId } - return "" + return nil } type QueryGetAggregatedReportResponse struct { @@ -618,7 +618,7 @@ func (m *QueryGetAggregatedReportResponse) GetReport() *Aggregate { } type QueryGetDataBeforeRequest struct { - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } @@ -655,11 +655,11 @@ func (m *QueryGetDataBeforeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetDataBeforeRequest proto.InternalMessageInfo -func (m *QueryGetDataBeforeRequest) GetQueryId() string { +func (m *QueryGetDataBeforeRequest) GetQueryId() []byte { if m != nil { return m.QueryId } - return "" + return nil } func (m *QueryGetDataBeforeRequest) GetTimestamp() int64 { @@ -786,7 +786,7 @@ func (m *QueryCurrentCyclelistQueryRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryCurrentCyclelistQueryRequest proto.InternalMessageInfo type QueryCurrentCyclelistQueryResponse struct { - Querydata string `protobuf:"bytes,1,opt,name=querydata,proto3" json:"querydata,omitempty"` + QueryData []byte `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` } func (m *QueryCurrentCyclelistQueryResponse) Reset() { *m = QueryCurrentCyclelistQueryResponse{} } @@ -822,11 +822,11 @@ func (m *QueryCurrentCyclelistQueryResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryCurrentCyclelistQueryResponse proto.InternalMessageInfo -func (m *QueryCurrentCyclelistQueryResponse) GetQuerydata() string { +func (m *QueryCurrentCyclelistQueryResponse) GetQueryData() []byte { if m != nil { - return m.Querydata + return m.QueryData } - return "" + return nil } func init() { @@ -853,76 +853,77 @@ func init() { func init() { proto.RegisterFile("layer/oracle/query.proto", fileDescriptor_bb27caa9d264c5c4) } var fileDescriptor_bb27caa9d264c5c4 = []byte{ - // 1098 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x97, 0x41, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xb3, 0x69, 0x71, 0xc9, 0xb4, 0x15, 0x62, 0xea, 0x36, 0xc9, 0x36, 0x72, 0x92, 0xad, - 0xd4, 0x26, 0x41, 0xd9, 0xad, 0xd3, 0x96, 0x50, 0x55, 0x25, 0xaa, 0x5d, 0x54, 0xf5, 0x80, 0x44, - 0x1d, 0x57, 0x42, 0x70, 0xb0, 0xd6, 0xf6, 0xb0, 0x1d, 0xd5, 0xf6, 0x6c, 0x76, 0xc7, 0x80, 0x15, - 0xf9, 0xc2, 0x95, 0x0b, 0x12, 0x47, 0x0e, 0x5c, 0x11, 0x02, 0xa9, 0x15, 0x57, 0x24, 0xae, 0x3d, - 0x46, 0xe2, 0xc2, 0x09, 0x50, 0x82, 0xc4, 0xd7, 0x40, 0x33, 0xf3, 0xc6, 0xeb, 0xb1, 0x77, 0x37, - 0xa6, 0x97, 0x64, 0x77, 0xe6, 0xbd, 0xb7, 0xbf, 0xf7, 0xe6, 0xed, 0xff, 0xad, 0xd1, 0x52, 0xc7, - 0x1f, 0x90, 0xc8, 0x63, 0x91, 0xdf, 0xea, 0x10, 0xef, 0xa0, 0x4f, 0xa2, 0x81, 0x1b, 0x46, 0x8c, - 0x33, 0x7c, 0x41, 0xee, 0xb8, 0x6a, 0xc7, 0x2e, 0x06, 0x2c, 0x60, 0x72, 0xc3, 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 0xe0, 0xde, 0x43, 0x0b, 0x5c, 0x2c, 0xd4, - 0x13, 0x42, 0xdb, 0x24, 0x34, 0xdc, 0x12, 0x63, 0xa7, 0x82, 0xae, 0x4f, 0x24, 0xfd, 0x40, 0xbf, - 0x7c, 0x6d, 0x75, 0x28, 0xa7, 0x77, 0xf4, 0x7e, 0xd2, 0x7a, 0xd3, 0xce, 0x40, 0xe8, 0xa1, 0x82, - 0x3a, 0x3d, 0xc0, 0x5b, 0x34, 0xf1, 0x46, 0x7e, 0x35, 0x30, 0x73, 0xf6, 0x93, 0x83, 0x14, 0x25, - 0xa8, 0x90, 0xcf, 0x58, 0x44, 0x4e, 0x65, 0x11, 0x75, 0xe4, 0xb4, 0x4b, 0x62, 0xee, 0x77, 0x43, - 0x59, 0xc7, 0x33, 0xb5, 0x64, 0xc1, 0x59, 0x47, 0xab, 0x3a, 0x68, 0x9d, 0x76, 0x49, 0xc5, 0x8f, - 0x05, 0xe8, 0x17, 0x7e, 0xd4, 0x1e, 0x49, 0xc4, 0xd7, 0x56, 0x92, 0xcd, 0xb4, 0x0d, 0x64, 0x13, - 0x88, 0x6c, 0xc4, 0x12, 0x64, 0xb3, 0xec, 0x2a, 0x39, 0x72, 0x85, 0x1c, 0xb9, 0x20, 0x47, 0x6e, - 0x95, 0xd1, 0x5e, 0xe5, 0xb6, 0x78, 0x03, 0x7e, 0xfc, 0x6b, 0xf5, 0x46, 0x40, 0xf9, 0xb3, 0x7e, - 0xd3, 0x6d, 0xb1, 0xae, 0x07, 0xda, 0xa5, 0xfe, 0x6d, 0xc7, 0xed, 0xe7, 0x1e, 0x1f, 0x84, 0x24, - 0x96, 0x0e, 0x3f, 0xfc, 0xfb, 0x62, 0xcb, 0xaa, 0x41, 0x78, 0xe7, 0x1a, 0xbc, 0x95, 0x70, 0x36, - 0xd5, 0x41, 0xab, 0x43, 0x3a, 0x34, 0xe6, 0x72, 0x51, 0x23, 0x57, 0x90, 0x93, 0x67, 0x04, 0xcc, - 0xba, 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9c, 0x94, - 0xe6, 0x8e, 0x4e, 0x4a, 0x73, 0x7f, 0x9c, 0x94, 0xe6, 0x3e, 0xd9, 0x1c, 0x1b, 0xb6, 0x93, 0x41, - 0xbf, 0x1c, 0xfd, 0x36, 0x11, 0x33, 0xb7, 0x59, 0x90, 0xbf, 0x17, 0x6e, 0xfd, 0x17, 0x00, 0x00, - 0xff, 0xff, 0x6b, 0xe0, 0x0d, 0x0e, 0x98, 0x0d, 0x00, 0x00, + // 1106 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x97, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xc0, 0xb3, 0x69, 0xbf, 0x69, 0x33, 0x4d, 0xf5, 0x15, 0xd3, 0xb4, 0xa9, 0xb7, 0xc1, 0x49, + 0xb6, 0x52, 0x9b, 0x46, 0x64, 0xb7, 0x31, 0xa1, 0x44, 0x55, 0x15, 0x05, 0x3b, 0x02, 0x7a, 0x40, + 0xa2, 0x8b, 0x2b, 0x21, 0x84, 0x64, 0x8d, 0xed, 0x61, 0x3b, 0xaa, 0xed, 0xd9, 0xec, 0x8e, 0x01, + 0x2b, 0xf2, 0x85, 0x2b, 0x17, 0x24, 0xae, 0x1c, 0x38, 0x22, 0x84, 0x50, 0x05, 0x07, 0x4e, 0x48, + 0x1c, 0x7b, 0xac, 0xc4, 0x85, 0x13, 0xa0, 0x04, 0x89, 0x7f, 0x03, 0xed, 0xcc, 0x1b, 0xaf, 0xc7, + 0xde, 0xdd, 0x18, 0x2e, 0xc9, 0xee, 0xbc, 0x1f, 0xf3, 0x79, 0x6f, 0xde, 0xbc, 0xb7, 0x46, 0xd7, + 0x3b, 0x64, 0x40, 0x23, 0x8f, 0x47, 0xa4, 0xd5, 0xa1, 0xde, 0x51, 0x9f, 0x46, 0x03, 0x37, 0x8c, + 0xb8, 0xe0, 0x78, 0x49, 0x4a, 0x5c, 0x25, 0xb1, 0x97, 0x03, 0x1e, 0x70, 0x29, 0xf0, 0x92, 0x27, + 0xa5, 0x63, 0xaf, 0x06, 0x9c, 0x07, 0x1d, 0xea, 0x91, 0x90, 0x79, 0xa4, 0xd7, 0xe3, 0x82, 0x08, + 0xc6, 0x7b, 0x31, 0x48, 0xb7, 0x5a, 0x3c, 0xee, 0xf2, 0xd8, 0x6b, 0x92, 0x18, 0x5c, 0x7b, 0x1f, + 0xef, 0x34, 0xa9, 0x20, 0x3b, 0x5e, 0x48, 0x02, 0xd6, 0x93, 0xca, 0xa0, 0x5b, 0x32, 0x38, 0x42, + 0x12, 0x91, 0xae, 0x76, 0x63, 0x1b, 0xa2, 0x88, 0x86, 0x3c, 0x12, 0x5a, 0xb6, 0x66, 0xc8, 0xba, + 0xac, 0x15, 0xf1, 0x86, 0xd2, 0x00, 0x85, 0x15, 0x43, 0x41, 0xb0, 0x50, 0x5b, 0xde, 0x30, 0x04, + 0xfd, 0x98, 0x46, 0x0d, 0xc1, 0x42, 0x1d, 0x97, 0x21, 0x24, 0x41, 0x10, 0xd1, 0x80, 0x08, 0x0a, + 0xd2, 0x97, 0x48, 0x97, 0xf5, 0xb8, 0x27, 0xff, 0xc2, 0x52, 0x79, 0x3c, 0x54, 0x1d, 0x64, 0x8b, + 0x33, 0x08, 0xcf, 0x59, 0x46, 0xf8, 0x51, 0x92, 0x80, 0x77, 0x65, 0x60, 0x3e, 0x3d, 0xea, 0xd3, + 0x58, 0x38, 0x0f, 0xd1, 0x15, 0x63, 0x35, 0x0e, 0x79, 0x2f, 0xa6, 0xb8, 0x82, 0x16, 0x54, 0x02, + 0xae, 0x5b, 0xeb, 0xd6, 0xe6, 0xa5, 0xca, 0xb2, 0x3b, 0x7e, 0x14, 0xae, 0xd2, 0xae, 0x9e, 0x7f, + 0xfe, 0xfb, 0xda, 0x9c, 0x0f, 0x9a, 0xce, 0x1e, 0xba, 0x21, 0x5d, 0xbd, 0x45, 0x85, 0xaf, 0x32, + 0xd4, 0x1c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76, 0x4b, 0xd9, 0x25, 0xdf, 0x2b, 0x1a, 0x30, 0xb9, 0x3e, + 0x43, 0xfc, 0x83, 0xaa, 0xdb, 0xf1, 0xc6, 0x9a, 0x57, 0xb7, 0x19, 0x93, 0x20, 0x2f, 0xab, 0x59, + 0xed, 0xdd, 0x79, 0x5b, 0x82, 0x56, 0xf1, 0x41, 0x11, 0xa8, 0xfe, 0xaa, 0x6a, 0xc8, 0xe6, 0xee, + 0x1d, 0xab, 0xc9, 0x32, 0x34, 0xa1, 0x7f, 0xb6, 0xd0, 0x95, 0x8c, 0x2e, 0x8d, 0x77, 0x0b, 0x93, + 0x96, 0x33, 0x12, 0xec, 0x9c, 0x2b, 0x90, 0x37, 0x03, 0x9c, 0x03, 0x19, 0xc7, 0x7d, 0xbc, 0x57, + 0x14, 0xc7, 0xe8, 0x03, 0xb0, 0x0d, 0x85, 0x32, 0x5e, 0x17, 0xdf, 0xab, 0xba, 0x48, 0x07, 0x42, + 0x5e, 0x5d, 0x4c, 0x8d, 0x8c, 0x7f, 0x0d, 0x7b, 0x28, 0x61, 0xf7, 0xf1, 0x83, 0x3c, 0x58, 0x63, + 0x97, 0x31, 0xc8, 0x24, 0xf5, 0x30, 0x6e, 0x86, 0xf8, 0x3b, 0x95, 0xf0, 0xc9, 0x39, 0x82, 0xb7, + 0xb3, 0x69, 0x72, 0x66, 0x52, 0x1e, 0x7c, 0xde, 0x78, 0x72, 0xee, 0x49, 0xf8, 0xbb, 0xd8, 0x2d, + 0xca, 0x74, 0x82, 0xd9, 0x48, 0xe6, 0x55, 0x92, 0x69, 0x85, 0xf5, 0xa3, 0x85, 0xae, 0x66, 0x0e, + 0x11, 0x9c, 0xd5, 0xbe, 0x8a, 0x66, 0x92, 0x7d, 0x77, 0x76, 0x83, 0xa9, 0x86, 0x97, 0x03, 0xad, + 0xef, 0x62, 0x4b, 0xdb, 0x37, 0x64, 0xd2, 0xab, 0xb5, 0xe7, 0x27, 0x65, 0xeb, 0xc5, 0x49, 0xd9, + 0xfa, 0xf3, 0xa4, 0x6c, 0x7d, 0x71, 0x5a, 0x9e, 0x7b, 0x71, 0x5a, 0x9e, 0xfb, 0xed, 0xb4, 0x3c, + 0xf7, 0xc1, 0x9d, 0xb1, 0x99, 0x3b, 0xe9, 0xf4, 0xd3, 0xd1, 0x0f, 0x95, 0x64, 0xf4, 0x36, 0x17, + 0xe4, 0x8f, 0x87, 0x57, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x61, 0xea, 0x1a, 0x1b, 0xa5, 0x0d, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1904,10 +1905,10 @@ func (m *QueryCurrentCyclelistQueryResponse) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l - if len(m.Querydata) > 0 { - i -= len(m.Querydata) - copy(dAtA[i:], m.Querydata) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Querydata))) + if len(m.QueryData) > 0 { + i -= len(m.QueryData) + copy(dAtA[i:], m.QueryData) + i = encodeVarintQuery(dAtA, i, uint64(len(m.QueryData))) i-- dAtA[i] = 0xa } @@ -2147,7 +2148,7 @@ func (m *QueryCurrentCyclelistQueryResponse) Size() (n int) { } var l int _ = l - l = len(m.Querydata) + l = len(m.QueryData) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -2326,7 +2327,7 @@ func (m *QueryGetReportsbyQidRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2336,23 +2337,25 @@ func (m *QueryGetReportsbyQidRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = string(dAtA[iNdEx:postIndex]) + m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) + if m.QueryId == nil { + m.QueryId = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -2689,7 +2692,7 @@ func (m *QueryGetReportsbyReporterQidRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2699,23 +2702,25 @@ func (m *QueryGetReportsbyReporterQidRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = string(dAtA[iNdEx:postIndex]) + m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) + if m.QueryId == nil { + m.QueryId = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -2771,7 +2776,7 @@ func (m *QueryGetCurrentTipRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2781,23 +2786,25 @@ func (m *QueryGetCurrentTipRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryData = string(dAtA[iNdEx:postIndex]) + m.QueryData = append(m.QueryData[:0], dAtA[iNdEx:postIndex]...) + if m.QueryData == nil { + m.QueryData = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -2971,7 +2978,7 @@ func (m *QueryGetUserTipTotalRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2981,23 +2988,25 @@ func (m *QueryGetUserTipTotalRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryData = string(dAtA[iNdEx:postIndex]) + m.QueryData = append(m.QueryData[:0], dAtA[iNdEx:postIndex]...) + if m.QueryData == nil { + m.QueryData = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -3139,7 +3148,7 @@ func (m *QueryGetCurrentAggregatedReportRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3149,23 +3158,25 @@ func (m *QueryGetCurrentAggregatedReportRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = string(dAtA[iNdEx:postIndex]) + m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) + if m.QueryId == nil { + m.QueryId = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -3307,7 +3318,7 @@ func (m *QueryGetDataBeforeRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3317,23 +3328,25 @@ func (m *QueryGetDataBeforeRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = string(dAtA[iNdEx:postIndex]) + m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) + if m.QueryId == nil { + m.QueryId = []byte{} + } iNdEx = postIndex case 2: if wireType != 0 { @@ -3589,9 +3602,9 @@ func (m *QueryCurrentCyclelistQueryResponse) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Querydata", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3601,23 +3614,25 @@ func (m *QueryCurrentCyclelistQueryResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Querydata = string(dAtA[iNdEx:postIndex]) + m.QueryData = append(m.QueryData[:0], dAtA[iNdEx:postIndex]...) + if m.QueryData == nil { + m.QueryData = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/oracle/types/query.pb.gw.go b/x/oracle/types/query.pb.gw.go index 31e19aeb5..58ac047db 100644 --- a/x/oracle/types/query.pb.gw.go +++ b/x/oracle/types/query.pb.gw.go @@ -62,15 +62,15 @@ func request_Query_GetReportsbyQid_0(ctx context.Context, marshaler runtime.Mars _ = err ) - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } msg, err := client.GetReportsbyQid(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -89,15 +89,15 @@ func local_request_Query_GetReportsbyQid_0(ctx context.Context, marshaler runtim _ = err ) - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } msg, err := server.GetReportsbyQid(ctx, &protoReq) @@ -181,15 +181,15 @@ func request_Query_GetReportsbyReporterQid_0(ctx context.Context, marshaler runt return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "reporter", err) } - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } msg, err := client.GetReportsbyReporterQid(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -219,15 +219,15 @@ func local_request_Query_GetReportsbyReporterQid_0(ctx context.Context, marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "reporter", err) } - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } msg, err := server.GetReportsbyReporterQid(ctx, &protoReq) @@ -246,15 +246,15 @@ func request_Query_GetCurrentTip_0(ctx context.Context, marshaler runtime.Marsha _ = err ) - val, ok = pathParams["queryData"] + val, ok = pathParams["query_data"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryData") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_data") } - protoReq.QueryData, err = runtime.String(val) + protoReq.QueryData, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryData", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_data", err) } msg, err := client.GetCurrentTip(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -273,15 +273,15 @@ func local_request_Query_GetCurrentTip_0(ctx context.Context, marshaler runtime. _ = err ) - val, ok = pathParams["queryData"] + val, ok = pathParams["query_data"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryData") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_data") } - protoReq.QueryData, err = runtime.String(val) + protoReq.QueryData, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryData", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_data", err) } msg, err := server.GetCurrentTip(ctx, &protoReq) @@ -311,15 +311,15 @@ func request_Query_GetUserTipTotal_0(ctx context.Context, marshaler runtime.Mars return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tipper", err) } - val, ok = pathParams["queryData"] + val, ok = pathParams["query_data"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryData") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_data") } - protoReq.QueryData, err = runtime.String(val) + protoReq.QueryData, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryData", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_data", err) } msg, err := client.GetUserTipTotal(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -349,15 +349,15 @@ func local_request_Query_GetUserTipTotal_0(ctx context.Context, marshaler runtim return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tipper", err) } - val, ok = pathParams["queryData"] + val, ok = pathParams["query_data"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryData") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_data") } - protoReq.QueryData, err = runtime.String(val) + protoReq.QueryData, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryData", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_data", err) } msg, err := server.GetUserTipTotal(ctx, &protoReq) @@ -376,15 +376,15 @@ func request_Query_GetAggregatedReport_0(ctx context.Context, marshaler runtime. _ = err ) - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } msg, err := client.GetAggregatedReport(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -403,15 +403,15 @@ func local_request_Query_GetAggregatedReport_0(ctx context.Context, marshaler ru _ = err ) - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } msg, err := server.GetAggregatedReport(ctx, &protoReq) @@ -430,15 +430,15 @@ func request_Query_GetDataBefore_0(ctx context.Context, marshaler runtime.Marsha _ = err ) - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } val, ok = pathParams["timestamp"] @@ -468,15 +468,15 @@ func local_request_Query_GetDataBefore_0(ctx context.Context, marshaler runtime. _ = err ) - val, ok = pathParams["queryId"] + val, ok = pathParams["query_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "queryId") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_id") } - protoReq.QueryId, err = runtime.String(val) + protoReq.QueryId, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "queryId", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_id", err) } val, ok = pathParams["timestamp"] @@ -1014,19 +1014,19 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"layer", "oracle", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetReportsbyQid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "oracle", "get_reportsby_qid", "queryId"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetReportsbyQid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "oracle", "get_reportsby_qid", "query_id"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GetReportsbyReporter_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "oracle", "get_reportsby_reporter", "reporter"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetReportsbyReporterQid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"layer", "oracle", "get_reportsby_reporter_qid", "reporter", "queryId"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetReportsbyReporterQid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"layer", "oracle", "get_reportsby_reporter_qid", "reporter", "query_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetCurrentTip_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"tellor-io", "layer", "oracle", "get_current_tip", "queryData"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetCurrentTip_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"tellor-io", "layer", "oracle", "get_current_tip", "query_data"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetUserTipTotal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"tellor-io", "layer", "oracle", "get_user_tip_total", "tipper", "queryData"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetUserTipTotal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"tellor-io", "layer", "oracle", "get_user_tip_total", "tipper", "query_data"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetAggregatedReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"tellor-io", "layer", "oracle", "get_aggregated_report", "queryId"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetAggregatedReport_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"tellor-io", "layer", "oracle", "get_aggregated_report", "query_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetDataBefore_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"tellor-io", "layer", "oracle", "GetDataBefore", "queryId", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetDataBefore_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"tellor-io", "layer", "oracle", "GetDataBefore", "query_id", "timestamp"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GetTimeBasedRewards_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"tellor-io", "layer", "oracle", "get_time_based_rewards"}, "", runtime.AssumeColonVerbOpt(false))) diff --git a/x/oracle/types/query_id_timestamp_pair.pb.go b/x/oracle/types/query_id_timestamp_pair.pb.go index 20218639a..1b8fc8ac4 100644 --- a/x/oracle/types/query_id_timestamp_pair.pb.go +++ b/x/oracle/types/query_id_timestamp_pair.pb.go @@ -23,7 +23,7 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type QueryIdTimestampPair struct { - QueryId string `protobuf:"bytes,1,opt,name=queryId,proto3" json:"queryId,omitempty"` + QueryId []byte `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } @@ -60,11 +60,11 @@ func (m *QueryIdTimestampPair) XXX_DiscardUnknown() { var xxx_messageInfo_QueryIdTimestampPair proto.InternalMessageInfo -func (m *QueryIdTimestampPair) GetQueryId() string { +func (m *QueryIdTimestampPair) GetQueryId() []byte { if m != nil { return m.QueryId } - return "" + return nil } func (m *QueryIdTimestampPair) GetTimestamp() int64 { @@ -128,22 +128,22 @@ func init() { } var fileDescriptor_bb8bf6d5c3138e5d = []byte{ - // 226 bytes of a gzipped FileDescriptorProto + // 227 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xca, 0x49, 0xac, 0x4c, 0x2d, 0xd2, 0xcf, 0x2f, 0x4a, 0x4c, 0xce, 0x49, 0xd5, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0x8c, 0xcf, 0x4c, 0x89, 0x2f, 0xc9, 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x88, 0x2f, 0x48, 0xcc, 0x2c, - 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0xab, 0xd5, 0x83, 0xa8, 0x55, 0xf2, 0xe3, - 0x12, 0x09, 0x04, 0x29, 0xf7, 0x4c, 0x09, 0x81, 0x29, 0x0e, 0x48, 0xcc, 0x2c, 0x12, 0x92, 0xe0, - 0x62, 0x2f, 0x84, 0x88, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0xc1, 0xb8, 0x42, 0x32, 0x5c, - 0x9c, 0x70, 0x73, 0x25, 0x98, 0x14, 0x18, 0x35, 0x98, 0x83, 0x10, 0x02, 0x4a, 0x61, 0x5c, 0x52, - 0xd8, 0xcc, 0x2b, 0x76, 0x2c, 0x2a, 0x4a, 0xac, 0x14, 0xb2, 0xe0, 0x62, 0x05, 0xb9, 0xa4, 0x58, - 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x49, 0x0f, 0xd9, 0x2d, 0x7a, 0xd8, 0x34, 0x06, 0x41, - 0x34, 0x38, 0x39, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, - 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x66, 0x7a, - 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x49, 0x6a, 0x4e, 0x4e, 0x7e, 0x91, - 0x6e, 0x66, 0xbe, 0x3e, 0x24, 0x40, 0x2a, 0x60, 0x41, 0x52, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, - 0x06, 0x0e, 0x01, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x75, 0x0e, 0x5e, 0x3d, 0x2f, 0x01, - 0x00, 0x00, + 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0xab, 0xd5, 0x83, 0xa8, 0x55, 0xf2, 0xe7, + 0x12, 0x09, 0x04, 0x29, 0xf7, 0x4c, 0x09, 0x81, 0x29, 0x0e, 0x48, 0xcc, 0x2c, 0x12, 0x92, 0xe4, + 0xe2, 0x80, 0x19, 0x23, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x13, 0xc4, 0x5e, 0x08, 0x51, 0x27, 0x24, + 0xc3, 0xc5, 0x09, 0x37, 0x58, 0x82, 0x49, 0x81, 0x51, 0x83, 0x39, 0x08, 0x21, 0xa0, 0x14, 0xc6, + 0x25, 0x85, 0xcd, 0xc0, 0x62, 0xc7, 0xa2, 0xa2, 0xc4, 0x4a, 0x21, 0x0b, 0x2e, 0x56, 0x90, 0x53, + 0x8a, 0x25, 0x18, 0x15, 0x98, 0x35, 0xb8, 0x8d, 0x94, 0xf4, 0x90, 0x1d, 0xa3, 0x87, 0x4d, 0x63, + 0x10, 0x44, 0x83, 0x93, 0xf3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, + 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x69, + 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x97, 0xa4, 0xe6, 0xe4, 0xe4, + 0x17, 0xe9, 0x66, 0xe6, 0xeb, 0x43, 0x42, 0xa4, 0x02, 0x16, 0x26, 0x25, 0x95, 0x05, 0xa9, 0xc5, + 0x49, 0x6c, 0xe0, 0x20, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x72, 0x28, 0xdd, 0xca, 0x30, + 0x01, 0x00, 0x00, } func (m *QueryIdTimestampPair) Marshal() (dAtA []byte, err error) { @@ -299,7 +299,7 @@ func (m *QueryIdTimestampPair) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQueryIdTimestampPair @@ -309,23 +309,25 @@ func (m *QueryIdTimestampPair) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQueryIdTimestampPair } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQueryIdTimestampPair } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryId = string(dAtA[iNdEx:postIndex]) + m.QueryId = append(m.QueryId[:0], dAtA[iNdEx:postIndex]...) + if m.QueryId == nil { + m.QueryId = []byte{} + } iNdEx = postIndex case 2: if wireType != 0 { diff --git a/x/oracle/types/tips.pb.go b/x/oracle/types/tips.pb.go index 631b78114..c75415c76 100644 --- a/x/oracle/types/tips.pb.go +++ b/x/oracle/types/tips.pb.go @@ -27,8 +27,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Tips is a struct that contains the query data and the amount it was tipped type Tips struct { - // queryData is the query data that was tipped - QueryData string `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` + // query_data is the query data that was tipped + QueryData []byte `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` // the amount that was tipped Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` // totalTips is the total amount of tips for this query data so far @@ -68,11 +68,11 @@ func (m *Tips) XXX_DiscardUnknown() { var xxx_messageInfo_Tips proto.InternalMessageInfo -func (m *Tips) GetQueryData() string { +func (m *Tips) GetQueryData() []byte { if m != nil { return m.QueryData } - return "" + return nil } func init() { @@ -82,24 +82,24 @@ func init() { func init() { proto.RegisterFile("layer/oracle/tips.proto", fileDescriptor_1dd649bc410cbcce) } var fileDescriptor_1dd649bc410cbcce = []byte{ - // 261 bytes of a gzipped FileDescriptorProto + // 264 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0x49, 0xac, 0x4c, 0x2d, 0xd2, 0xcf, 0x2f, 0x4a, 0x4c, 0xce, 0x49, 0xd5, 0x2f, 0xc9, 0x2c, 0x28, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0x4b, 0xe8, 0x41, 0x24, 0xa4, 0x24, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xe3, 0xc1, 0x72, 0xfa, 0x10, 0x0e, 0x44, 0xa1, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x44, 0x1c, 0xc4, 0x82, 0x88, 0x2a, 0x6d, 0x63, 0xe4, 0x62, 0x09, 0xc9, 0x2c, 0x28, 0x16, 0x92, 0xe5, 0xe2, 0x2a, 0x2c, 0x4d, 0x2d, 0xaa, 0x8c, 0x4f, 0x49, 0x2c, 0x49, 0x94, 0x60, 0x54, 0x60, - 0xd4, 0xe0, 0x0c, 0xe2, 0x04, 0x8b, 0xb8, 0x24, 0x96, 0x24, 0x0a, 0x39, 0x73, 0xb1, 0x25, 0xe6, - 0xe6, 0x97, 0xe6, 0x95, 0x48, 0x30, 0x81, 0xa4, 0x9c, 0xb4, 0x4f, 0xdc, 0x93, 0x67, 0xb8, 0x75, - 0x4f, 0x5e, 0x14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 0x92, 0x4b, 0x5b, 0x74, 0xb9, 0xa0, 0x96, 0x7b, 0xe6, 0x95, 0x04, + 0x41, 0xb5, 0x0a, 0x79, 0x71, 0x71, 0x95, 0xe4, 0x97, 0x24, 0xe6, 0xc4, 0x83, 0xdc, 0x2f, 0xc1, + 0x4c, 0xba, 0x41, 0x9c, 0x60, 0xed, 0x20, 0xf7, 0x3a, 0x39, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, + 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, + 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x66, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, + 0x7e, 0x49, 0x6a, 0x4e, 0x4e, 0x7e, 0x91, 0x6e, 0x66, 0xbe, 0x3e, 0x24, 0xfc, 0x2a, 0xe0, 0x21, + 0x58, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x0e, 0x04, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xca, 0x9f, 0x2a, 0xd6, 0x5e, 0x01, 0x00, 0x00, } func (m *Tips) Marshal() (dAtA []byte, err error) { @@ -219,7 +219,7 @@ func (m *Tips) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTips @@ -229,23 +229,25 @@ func (m *Tips) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthTips } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTips } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryData = string(dAtA[iNdEx:postIndex]) + m.QueryData = append(m.QueryData[:0], dAtA[iNdEx:postIndex]...) + if m.QueryData == nil { + m.QueryData = []byte{} + } iNdEx = postIndex case 2: if wireType != 2 { diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index 02204a619..e33bd2757 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -127,7 +127,7 @@ var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo type MsgSubmitValue struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - QueryData string `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` + QueryData []byte `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` Salt string `protobuf:"bytes,4,opt,name=salt,proto3" json:"salt,omitempty"` } @@ -172,11 +172,11 @@ func (m *MsgSubmitValue) GetCreator() string { return "" } -func (m *MsgSubmitValue) GetQueryData() string { +func (m *MsgSubmitValue) GetQueryData() []byte { if m != nil { return m.QueryData } - return "" + return nil } func (m *MsgSubmitValue) GetValue() string { @@ -231,7 +231,7 @@ var xxx_messageInfo_MsgSubmitValueResponse proto.InternalMessageInfo type MsgCommitReport struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - QueryData string `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` + QueryData []byte `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` } @@ -275,11 +275,11 @@ func (m *MsgCommitReport) GetCreator() string { return "" } -func (m *MsgCommitReport) GetQueryData() string { +func (m *MsgCommitReport) GetQueryData() []byte { if m != nil { return m.QueryData } - return "" + return nil } func (m *MsgCommitReport) GetHash() string { @@ -327,7 +327,7 @@ var xxx_messageInfo_MsgCommitReportResponse proto.InternalMessageInfo type MsgTip struct { Tipper string `protobuf:"bytes,1,opt,name=tipper,proto3" json:"tipper,omitempty"` - QueryData string `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` + QueryData []byte `protobuf:"bytes,2,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` } @@ -371,11 +371,11 @@ func (m *MsgTip) GetTipper() string { return "" } -func (m *MsgTip) GetQueryData() string { +func (m *MsgTip) GetQueryData() []byte { if m != nil { return m.QueryData } - return "" + return nil } func (m *MsgTip) GetAmount() types.Coin { @@ -426,7 +426,7 @@ type MsgUpdateCyclelist struct { // authority is the address that controls the module (defaults to x/gov unless overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // list of query data hex strings - Cyclelist []string `protobuf:"bytes,2,rep,name=cyclelist,proto3" json:"cyclelist,omitempty"` + Cyclelist [][]byte `protobuf:"bytes,2,rep,name=cyclelist,proto3" json:"cyclelist,omitempty"` } func (m *MsgUpdateCyclelist) Reset() { *m = MsgUpdateCyclelist{} } @@ -469,7 +469,7 @@ func (m *MsgUpdateCyclelist) GetAuthority() string { return "" } -func (m *MsgUpdateCyclelist) GetCyclelist() []string { +func (m *MsgUpdateCyclelist) GetCyclelist() [][]byte { if m != nil { return m.Cyclelist } @@ -529,49 +529,49 @@ func init() { func init() { proto.RegisterFile("layer/oracle/tx.proto", fileDescriptor_85ff275c542a231a) } var fileDescriptor_85ff275c542a231a = []byte{ - // 669 bytes of a gzipped FileDescriptorProto + // 670 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4d, 0x6f, 0xd3, 0x4a, 0x14, 0x8d, 0x9b, 0x34, 0x4f, 0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0x88, 0x39, 0x03, 0x1b, 0xf7, 0xae, 0x85, 0x53, 0x76, 0xf4, 0x1c, 0xca, 0xd3, 0xde, 0xae, 0x2d, + 0x74, 0x4d, 0xa1, 0xc6, 0xdd, 0xeb, 0xd0, 0x8c, 0xb2, 0x07, 0x95, 0x19, 0x47, 0x2e, 0x0a, 0x9d, + 0x86, 0x2f, 0x11, 0x7a, 0x99, 0xc3, 0xd0, 0x63, 0xc8, 0xc7, 0xee, 0xaa, 0x2e, 0x54, 0xf7, 0x68, + 0x68, 0xd4, 0x2e, 0xcb, 0x66, 0xad, 0xaf, 0x61, 0x65, 0xfe, 0xfa, 0xeb, 0x57, 0x9c, 0x4e, 0x56, + 0x61, 0x6c, 0xde, 0x54, 0x91, 0xd2, 0x1b, 0xcb, 0x6f, 0xe3, 0xf7, 0xa7, 0xdd, 0x39, 0x3e, 0x35, + 0xb5, 0x93, 0x53, 0x53, 0xfb, 0x7d, 0x6a, 0x6a, 0x9f, 0xce, 0xcc, 0xdc, 0xc9, 0x99, 0x99, 0xfb, + 0x79, 0x66, 0xe6, 0x5e, 0xdd, 0xf7, 0xa8, 0x18, 0x8e, 0xfb, 0x96, 0xcb, 0x02, 0x5b, 0x10, 0xdf, + 0x67, 0xd1, 0x36, 0x65, 0xf6, 0x9c, 0x2f, 0xc4, 0x24, 0x24, 0xbc, 0x5f, 0x94, 0x0f, 0xe9, 0x83, + 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x41, 0xd5, 0xf0, 0x86, 0x07, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1276,8 +1276,8 @@ func (m *MsgUpdateCyclelist) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } if len(m.Cyclelist) > 0 { - for _, s := range m.Cyclelist { - l = len(s) + for _, b := range m.Cyclelist { + l = len(b) n += 1 + l + sovTx(uint64(l)) } } @@ -1529,7 +1529,7 @@ func (m *MsgSubmitValue) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1539,23 +1539,25 @@ func (m *MsgSubmitValue) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryData = string(dAtA[iNdEx:postIndex]) + m.QueryData = append(m.QueryData[:0], dAtA[iNdEx:postIndex]...) + if m.QueryData == nil { + m.QueryData = []byte{} + } iNdEx = postIndex case 3: if wireType != 2 { @@ -1757,7 +1759,7 @@ func (m *MsgCommitReport) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1767,23 +1769,25 @@ func (m *MsgCommitReport) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryData = string(dAtA[iNdEx:postIndex]) + m.QueryData = append(m.QueryData[:0], dAtA[iNdEx:postIndex]...) + if m.QueryData == nil { + m.QueryData = []byte{} + } iNdEx = postIndex case 3: if wireType != 2 { @@ -1953,7 +1957,7 @@ func (m *MsgTip) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1963,23 +1967,25 @@ func (m *MsgTip) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.QueryData = string(dAtA[iNdEx:postIndex]) + m.QueryData = append(m.QueryData[:0], dAtA[iNdEx:postIndex]...) + if m.QueryData == nil { + m.QueryData = []byte{} + } iNdEx = postIndex case 3: if wireType != 2 { @@ -2150,7 +2156,7 @@ func (m *MsgUpdateCyclelist) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Cyclelist", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2160,23 +2166,23 @@ func (m *MsgUpdateCyclelist) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Cyclelist = append(m.Cyclelist, string(dAtA[iNdEx:postIndex])) + m.Cyclelist = append(m.Cyclelist, make([]byte, postIndex-iNdEx)) + copy(m.Cyclelist[len(m.Cyclelist)-1], dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/registry/keeper/dataspec.go b/x/registry/keeper/dataspec.go index 4113de532..48a9f9f31 100644 --- a/x/registry/keeper/dataspec.go +++ b/x/registry/keeper/dataspec.go @@ -1,6 +1,7 @@ package keeper import ( + "context" "strings" sdk "github.com/cosmos/cosmos-sdk/types" @@ -19,7 +20,7 @@ func (k Keeper) SetDataSpec(ctx sdk.Context, querytype string, dataspec types.Da // It converts the query type to lowercase before performing the retrieval. // If the DataSpec is found, it is returned along with a nil error. // If the DataSpec is not found, an empty DataSpec and an error are returned. -func (k Keeper) GetSpec(ctx sdk.Context, querytype string) (types.DataSpec, error) { +func (k Keeper) GetSpec(ctx context.Context, querytype string) (types.DataSpec, error) { querytype = strings.ToLower(querytype) return k.SpecRegistry.Get(ctx, querytype) } @@ -28,7 +29,7 @@ func (k Keeper) GetSpec(ctx sdk.Context, querytype string) (types.DataSpec, erro // It returns true if the data specification exists, otherwise false. // It converts the query type parameter to lower case before, for keeping things consistent. // Returns an error if there was an issue checking the registry. -func (k Keeper) HasSpec(ctx sdk.Context, querytype string) (bool, error) { +func (k Keeper) HasSpec(ctx context.Context, querytype string) (bool, error) { querytype = strings.ToLower(querytype) return k.SpecRegistry.Has(ctx, querytype) } diff --git a/x/registry/keeper/query_decode_querydata.go b/x/registry/keeper/query_decode_querydata.go index b0eab6608..f714c4b5a 100644 --- a/x/registry/keeper/query_decode_querydata.go +++ b/x/registry/keeper/query_decode_querydata.go @@ -2,7 +2,6 @@ package keeper import ( "context" - "encoding/hex" "fmt" sdk "github.com/cosmos/cosmos-sdk/types" @@ -16,14 +15,7 @@ func (k Querier) DecodeQuerydata(goCtx context.Context, req *types.QueryDecodeQu return nil, status.Error(codes.InvalidArgument, "invalid request") } - // remove 0x from hex string if present - req.Querydata = types.Remove0xPrefix(req.Querydata) - // decode query data hex to bytes - queryDataBytes, err := hex.DecodeString(req.Querydata) - if err != nil { - return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("failed to decode query data string: %v", err)) - } - queryType, fieldBytes, err := types.DecodeQueryType(queryDataBytes) + queryType, fieldBytes, err := types.DecodeQueryType(req.QueryData) if err != nil { return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("failed to decode query data: %v", err)) } diff --git a/x/registry/keeper/query_decode_querydata_test.go b/x/registry/keeper/query_decode_querydata_test.go index 1278f96a7..6603a57d0 100644 --- a/x/registry/keeper/query_decode_querydata_test.go +++ b/x/registry/keeper/query_decode_querydata_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "encoding/hex" "testing" "github.com/stretchr/testify/require" @@ -27,7 +28,8 @@ func TestDecodeQuerydata(t *testing.T) { require.Equal(t, msgres, &types.MsgRegisterSpecResponse{}) // generate query data querier := keeper.NewQuerier(k) - res, err := querier.DecodeQuerydata(ctx, &types.QueryDecodeQuerydataRequest{Querydata: "00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000d74657374517565727954797065000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000047465737400000000000000000000000000000000000000000000000000000000"}) + qData, _ := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000d74657374517565727954797065000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000047465737400000000000000000000000000000000000000000000000000000000") + res, err := querier.DecodeQuerydata(ctx, &types.QueryDecodeQuerydataRequest{QueryData: qData}) require.NoError(t, err) require.Equal(t, res, &types.QueryDecodeQuerydataResponse{Spec: `testQueryType: ["test"]`}) } diff --git a/x/registry/keeper/query_generate_querydata.go b/x/registry/keeper/query_generate_querydata.go index a2eac8c60..bd3873888 100644 --- a/x/registry/keeper/query_generate_querydata.go +++ b/x/registry/keeper/query_generate_querydata.go @@ -4,18 +4,16 @@ import ( "context" "fmt" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tellor-io/layer/x/registry/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) -func (k Keeper) GenerateQuerydata(goCtx context.Context, req *types.QueryGenerateQuerydataRequest) (*types.QueryGenerateQuerydataResponse, error) { +func (k Keeper) GenerateQuerydata(ctx context.Context, req *types.QueryGenerateQuerydataRequest) (*types.QueryGenerateQuerydataResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - ctx := sdk.UnwrapSDKContext(goCtx) // fetch data spec from store exists, err := k.HasSpec(ctx, req.Querytype) if !exists { @@ -31,5 +29,5 @@ func (k Keeper) GenerateQuerydata(goCtx context.Context, req *types.QueryGenerat return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("failed to encode query data: %v", err)) } - return &types.QueryGenerateQuerydataResponse{Querydata: querydata}, nil + return &types.QueryGenerateQuerydataResponse{QueryData: querydata}, nil } diff --git a/x/registry/keeper/query_generate_querydata_test.go b/x/registry/keeper/query_generate_querydata_test.go index 668bed73a..e5c4eb4bb 100644 --- a/x/registry/keeper/query_generate_querydata_test.go +++ b/x/registry/keeper/query_generate_querydata_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "encoding/hex" "testing" "github.com/stretchr/testify/require" @@ -32,7 +33,7 @@ func TestGenerateQueryData(t *testing.T) { Parameters: `["test"]`, }) require.NoError(t, err) - expectedquerydata := "00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000d74657374517565727954797065000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000047465737400000000000000000000000000000000000000000000000000000000" - require.Equal(t, queryres, &types.QueryGenerateQuerydataResponse{Querydata: expectedquerydata}) + expectedquerydata, _ := hex.DecodeString("00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000d74657374517565727954797065000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000047465737400000000000000000000000000000000000000000000000000000000") + require.Equal(t, queryres, &types.QueryGenerateQuerydataResponse{QueryData: expectedquerydata}) } diff --git a/x/registry/types/dataspec.go b/x/registry/types/dataspec.go index 547a74c25..f9e0da174 100644 --- a/x/registry/types/dataspec.go +++ b/x/registry/types/dataspec.go @@ -1,7 +1,6 @@ package types import ( - "encoding/hex" "encoding/json" "fmt" "reflect" @@ -24,21 +23,21 @@ func GenesisDataSpec() DataSpec { } } -func (d DataSpec) EncodeData(querytype, datafields string) (string, error) { +func (d DataSpec) EncodeData(querytype, datafields string) ([]byte, error) { argMarshller := d.MakeArgMarshaller() args := MakeArguments(argMarshller) interfacefields := MakePackdata(datafields, argMarshller) encodedBytes, err := args.Pack(interfacefields...) if err != nil { - return "", fmt.Errorf("Failed to pack arguments: %v", err) + return nil, fmt.Errorf("Failed to pack arguments: %v", err) } querydataBytes, err := EncodeWithQuerytype(querytype, encodedBytes) if err != nil { - return "", fmt.Errorf("Failed to encode arguments: %v", err) + return nil, fmt.Errorf("Failed to encode arguments: %v", err) } - return hex.EncodeToString(querydataBytes), nil + return querydataBytes, nil } func (d DataSpec) ValidateValue(value string) error { diff --git a/x/registry/types/dataspec_test.go b/x/registry/types/dataspec_test.go index e6f8ab01e..0cc9f2c92 100644 --- a/x/registry/types/dataspec_test.go +++ b/x/registry/types/dataspec_test.go @@ -47,10 +47,9 @@ func TestTupleListEncoding(t *testing.T) { ] ]`) require.NoError(t, err) - expectedResult := "0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000184d696d696372794d6163726f4d61726b65744d617368757000000000000000000000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000a6d61726b65742d63617000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000375736400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000004000000000000000000000000050f5474724e0ee42d9a4e711ccfb275809fd6d4a0000000000000000000000000000000000000000000000000000000000000010657468657265756d2d6d61696e6e6574000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000f87e31492faf9a91b02ee0deaad50d51d56d5d4d0000000000000000000000000000000000000000000000000000000000000010657468657265756d2d6d61696e6e657400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000034d85c9cdeb23fa97cb08333b511ac86e1c4e2580000000000000000000000000000000000000000000000000000000000000010657468657265756d2d6d61696e6e6574000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d00000000000000000000000000000000000000000000000000000000000000010657468657265756d2d6d61696e6e657400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000473616e6400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000f5d2fb29fb7d3cfee444a200298f468908cc9420000000000000000000000000000000000000000000000000000000000000010657468657265756d2d6d61696e6e65740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046d616e6100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943810000000000000000000000000000000000000000000000000000000000000010657468657265756d2d6d61696e6e65740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036170650000000000000000000000000000000000000000000000000000000000" - require.Equal(t, expectedResult[2:], encodedDataSpec) - resultBytes := hexutil.MustDecode(expectedResult) - queryType, resultBytes, err := DecodeQueryType(resultBytes) + expectedResult := hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000184d696d696372794d6163726f4d61726b65744d617368757000000000000000000000000000000000000000000000000000000000000000000000000000000620000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000a6d61726b65742d63617000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000375736400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000004000000000000000000000000050f5474724e0ee42d9a4e711ccfb275809fd6d4a0000000000000000000000000000000000000000000000000000000000000010657468657265756d2d6d61696e6e6574000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000f87e31492faf9a91b02ee0deaad50d51d56d5d4d0000000000000000000000000000000000000000000000000000000000000010657468657265756d2d6d61696e6e657400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000034d85c9cdeb23fa97cb08333b511ac86e1c4e2580000000000000000000000000000000000000000000000000000000000000010657468657265756d2d6d61696e6e6574000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000003845badade8e6dff049820680d1f14bd3903a5d00000000000000000000000000000000000000000000000000000000000000010657468657265756d2d6d61696e6e657400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000473616e6400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000f5d2fb29fb7d3cfee444a200298f468908cc9420000000000000000000000000000000000000000000000000000000000000010657468657265756d2d6d61696e6e65740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046d616e6100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943810000000000000000000000000000000000000000000000000000000000000010657468657265756d2d6d61696e6e65740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036170650000000000000000000000000000000000000000000000000000000000") + require.Equal(t, expectedResult, encodedDataSpec) + queryType, resultBytes, err := DecodeQueryType(encodedDataSpec) require.Equal(t, queryType, "MimicryMacroMarketMashup") require.NoError(t, err) res, err := DecodeParamtypes(resultBytes, dataSpec.AbiComponents) @@ -77,10 +76,9 @@ func TestTupleDataSpecEncoding(t *testing.T) { // Test encoding of data spec encodedDataSpec, err := dataspec.EncodeData("Tuplenoarray", `[["123","456","hello"]]`) require.NoError(t, err) - expectedResult := "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000c5475706c656e6f6172726179000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000007b00000000000000000000000000000000000000000000000000000000000001c80000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000568656c6c6f000000000000000000000000000000000000000000000000000000" - require.Equal(t, expectedResult[2:], encodedDataSpec) - resultBytes := hexutil.MustDecode(expectedResult) - queryType, resultBytes, err := DecodeQueryType(resultBytes) + expectedResult := hexutil.MustDecode("0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000c5475706c656e6f6172726179000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000007b00000000000000000000000000000000000000000000000000000000000001c80000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000568656c6c6f000000000000000000000000000000000000000000000000000000") + require.Equal(t, expectedResult, encodedDataSpec) + queryType, resultBytes, err := DecodeQueryType(expectedResult) require.Equal(t, queryType, "Tuplenoarray") require.NoError(t, err) res, err := DecodeParamtypes(resultBytes, dataspec.AbiComponents) @@ -254,7 +252,9 @@ func TestMixedEncoding(t *testing.T) { t.Run(tc.name, func(t *testing.T) { encodedData, err := tc.dataSpec.EncodeData(tc.queryType, tc.datafields) require.NoError(t, err) - require.Equal(t, tc.expectedEncodedResult[2:], encodedData) + + expEncodedResult, _ := hexutil.Decode(tc.expectedEncodedResult) + require.Equal(t, expEncodedResult, encodedData) resultBytes := hexutil.MustDecode(tc.expectedEncodedResult) queryType, resultBytes, err := DecodeQueryType(resultBytes) require.Equal(t, queryType, tc.queryType) diff --git a/x/registry/types/query.pb.go b/x/registry/types/query.pb.go index dead47cac..006684756 100644 --- a/x/registry/types/query.pb.go +++ b/x/registry/types/query.pb.go @@ -206,8 +206,8 @@ func (m *QueryGetDataSpecResponse) GetSpec() *DataSpec { // QueryDecodeQuerydataRequest is request type for the Query/DecodeQuerydata RPC method. type QueryDecodeQuerydataRequest struct { - // querydata is the query data hex string to be decoded. - Querydata string `protobuf:"bytes,1,opt,name=querydata,proto3" json:"querydata,omitempty"` + // query_data is the query data hex string to be decoded. + QueryData []byte `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` } func (m *QueryDecodeQuerydataRequest) Reset() { *m = QueryDecodeQuerydataRequest{} } @@ -243,11 +243,11 @@ func (m *QueryDecodeQuerydataRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryDecodeQuerydataRequest proto.InternalMessageInfo -func (m *QueryDecodeQuerydataRequest) GetQuerydata() string { +func (m *QueryDecodeQuerydataRequest) GetQueryData() []byte { if m != nil { - return m.Querydata + return m.QueryData } - return "" + return nil } // QueryDecodeQuerydataResponse is response type for the Query/DecodeQuerydata RPC method. @@ -298,9 +298,9 @@ func (m *QueryDecodeQuerydataResponse) GetSpec() string { // QueryGenerateQuerydataRequest is request type for the Query/GenerateQuerydata RPC method. type QueryGenerateQuerydataRequest struct { - // querytype for which querydata is to be generated. + // querytype for which query_data is to be generated. Querytype string `protobuf:"bytes,1,opt,name=querytype,proto3" json:"querytype,omitempty"` - // parameters for which querydata is to be generated. + // parameters for which query_data is to be generated. Parameters string `protobuf:"bytes,2,opt,name=parameters,proto3" json:"parameters,omitempty"` } @@ -353,8 +353,8 @@ func (m *QueryGenerateQuerydataRequest) GetParameters() string { // QueryGenerateQuerydataResponse is response type for the Query/GenerateQuerydata RPC method. type QueryGenerateQuerydataResponse struct { - // querydata is the generated querydata hex string. - Querydata string `protobuf:"bytes,1,opt,name=querydata,proto3" json:"querydata,omitempty"` + // query_data is the generated query_data hex string. + QueryData []byte `protobuf:"bytes,1,opt,name=query_data,json=queryData,proto3" json:"query_data,omitempty"` } func (m *QueryGenerateQuerydataResponse) Reset() { *m = QueryGenerateQuerydataResponse{} } @@ -390,11 +390,11 @@ func (m *QueryGenerateQuerydataResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGenerateQuerydataResponse proto.InternalMessageInfo -func (m *QueryGenerateQuerydataResponse) GetQuerydata() string { +func (m *QueryGenerateQuerydataResponse) GetQueryData() []byte { if m != nil { - return m.Querydata + return m.QueryData } - return "" + return nil } // QueryDecodeValueRequest is request type for the Query/DecodeValue RPC method. @@ -514,46 +514,46 @@ func init() { func init() { proto.RegisterFile("layer/registry/query.proto", fileDescriptor_6ea550dd9a444afe) } var fileDescriptor_6ea550dd9a444afe = []byte{ - // 619 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcd, 0x6a, 0x13, 0x51, - 0x14, 0xc7, 0x33, 0xa5, 0x0d, 0xf4, 0x54, 0x14, 0xaf, 0xa5, 0x86, 0x69, 0x3a, 0xca, 0x75, 0x61, - 0xb1, 0xe9, 0x8c, 0xc4, 0x2e, 0x0a, 0xc5, 0x2e, 0x6a, 0x45, 0x41, 0x04, 0x8d, 0xc1, 0x85, 0x20, - 0xe1, 0x36, 0xb9, 0x8c, 0x81, 0x34, 0x77, 0x32, 0x73, 0x23, 0x86, 0x92, 0x8d, 0x7b, 0x41, 0xd0, - 0x95, 0x4b, 0x5f, 0xc2, 0x57, 0xe8, 0xb2, 0xe0, 0xc6, 0x95, 0x48, 0xe2, 0x83, 0xc8, 0x9c, 0x7b, - 0x9a, 0x8f, 0xf9, 0xa8, 0xdd, 0x4d, 0xfe, 0xe7, 0xdc, 0x73, 0x7e, 0xe7, 0x2b, 0x60, 0x77, 0xc4, - 0x40, 0x86, 0x5e, 0x28, 0xfd, 0x76, 0xa4, 0xc3, 0x81, 0xd7, 0xeb, 0xcb, 0x70, 0xe0, 0x06, 0xa1, - 0xd2, 0x8a, 0x5d, 0x45, 0x9b, 0x7b, 0x6e, 0xb3, 0x57, 0x7d, 0xe5, 0x2b, 0x34, 0x79, 0xf1, 0x97, - 0xf1, 0xb2, 0xcb, 0xbe, 0x52, 0x7e, 0x47, 0x7a, 0x22, 0x68, 0x7b, 0xa2, 0xdb, 0x55, 0x5a, 0xe8, - 0xb6, 0xea, 0x46, 0x64, 0x75, 0x12, 0xf1, 0x5b, 0x42, 0x8b, 0x46, 0x14, 0xc8, 0x26, 0xd9, 0xd7, - 0x13, 0xf6, 0x40, 0x84, 0xe2, 0x98, 0x1e, 0xf3, 0x55, 0x60, 0x2f, 0x63, 0x9e, 0x17, 0x28, 0xd6,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e7, 0xb4, 0x14, 0x6f, - 0x87, 0x08, 0xeb, 0x86, 0x10, 0xa5, 0xe1, 0xc1, 0xe3, 0xd3, 0x91, 0x63, 0x9d, 0x8d, 0x1c, 0xeb, - 0xcf, 0xc8, 0xb1, 0x3e, 0x8f, 0x9d, 0xc2, 0xd9, 0xd8, 0x29, 0xfc, 0x1a, 0x3b, 0x85, 0x37, 0x5b, - 0x7e, 0x5b, 0xbf, 0xeb, 0x1f, 0xb9, 0x4d, 0x75, 0xec, 0x69, 0xd9, 0xe9, 0xa8, 0x70, 0xbb, 0xad, - 0x28, 0xfe, 0x87, 0x69, 0x86, 0xb8, 0xe0, 0xe8, 0xa8, 0x88, 0xff, 0xf1, 0x0f, 0xfe, 0x05, 0x00, - 0x00, 0xff, 0xff, 0x4e, 0x8d, 0x82, 0xd9, 0x82, 0x06, 0x00, 0x00, + // 624 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4d, 0x6b, 0x13, 0x5d, + 0x14, 0xc7, 0x33, 0xa5, 0x0d, 0xf4, 0xb4, 0x3c, 0x0f, 0x5e, 0x43, 0x0d, 0xd3, 0x74, 0x94, 0xeb, + 0xc2, 0x62, 0x93, 0x19, 0x89, 0x0a, 0x05, 0xdf, 0xa0, 0x56, 0x14, 0x44, 0xd0, 0x18, 0x5c, 0x08, + 0x12, 0x6e, 0x93, 0xcb, 0x18, 0x48, 0x73, 0x27, 0x33, 0x37, 0x62, 0x28, 0xd9, 0xf8, 0x01, 0x44, + 0xd0, 0x95, 0x5b, 0x3f, 0x84, 0x5f, 0xa1, 0xcb, 0x82, 0x1b, 0x57, 0x22, 0x89, 0x1f, 0x44, 0xe6, + 0xdc, 0x93, 0x26, 0x99, 0x99, 0xd8, 0xee, 0x26, 0xe7, 0xe5, 0x7f, 0x7e, 0xf7, 0xbc, 0x04, 0xec, + 0x8e, 0x18, 0xc8, 0xd0, 0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6b, + 0x6d, 0x97, 0xcf, 0x17, 0x4c, 0x88, 0xb7, 0x11, 0xd1, 0x63, 0x95, 0x24, 0xa2, 0x19, 0x54, 0xa3, + 0x37, 0xc9, 0x98, 0x50, 0xc6, 0xdf, 0x43, 0xf6, 0xdd, 0x82, 0x0b, 0xa9, 0x2d, 0x64, 0x95, 0x05, + 0x9d, 0xc9, 0x3e, 0x06, 0xdb, 0x3d, 0x6f, 0x38, 0xb1, 0x3e, 0x44, 0xd6, 0x7b, 0xec, 0x4e, 0xba, + 0x9d, 0x26, 0x25, 0x45, 0x8b, 0x2d, 0xf5, 0x8e, 0xa6, 0x27, 0x34, 0x64, 0x5f, 0x2d, 0x58, 0x9b, + 0xd9, 0xd7, 0x05, 0x63, 0x4f, 0x1f, 0xc8, 0x82, 0xb1, 0x67, 0xac, 0x3e, 0xdf, 0x45, 0xce, 0x2a, + 0xbb, 0xb1, 0xa0, 0xa7, 0x78, 0x3c, 0x44, 0x58, 0x37, 0x84, 0x68, 0x1a, 0xee, 0x3d, 0x3a, 0x1e, + 0x39, 0xd6, 0xc9, 0xc8, 0xb1, 0x7e, 0x8f, 0x1c, 0xeb, 0xd3, 0xd8, 0xc9, 0x9d, 0x8c, 0x9d, 0xdc, + 0xcf, 0xb1, 0x93, 0x7b, 0xbd, 0xe3, 0xb7, 0xf5, 0xdb, 0xfe, 0x81, 0xdb, 0x54, 0x87, 0x9e, 0x96, + 0x9d, 0x8e, 0x0a, 0x2b, 0x6d, 0x45, 0xfa, 0xef, 0xa7, 0x15, 0xe2, 0x07, 0x47, 0x07, 0x79, 0xfc, + 0x9b, 0xbf, 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0x62, 0xe3, 0x71, 0xd0, 0x85, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -931,10 +931,10 @@ func (m *QueryDecodeQuerydataRequest) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l - if len(m.Querydata) > 0 { - i -= len(m.Querydata) - copy(dAtA[i:], m.Querydata) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Querydata))) + if len(m.QueryData) > 0 { + i -= len(m.QueryData) + copy(dAtA[i:], m.QueryData) + i = encodeVarintQuery(dAtA, i, uint64(len(m.QueryData))) i-- dAtA[i] = 0xa } @@ -1028,10 +1028,10 @@ func (m *QueryGenerateQuerydataResponse) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l - if len(m.Querydata) > 0 { - i -= len(m.Querydata) - copy(dAtA[i:], m.Querydata) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Querydata))) + if len(m.QueryData) > 0 { + i -= len(m.QueryData) + copy(dAtA[i:], m.QueryData) + i = encodeVarintQuery(dAtA, i, uint64(len(m.QueryData))) i-- dAtA[i] = 0xa } @@ -1168,7 +1168,7 @@ func (m *QueryDecodeQuerydataRequest) Size() (n int) { } var l int _ = l - l = len(m.Querydata) + l = len(m.QueryData) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -1211,7 +1211,7 @@ func (m *QueryGenerateQuerydataResponse) Size() (n int) { } var l int _ = l - l = len(m.Querydata) + l = len(m.QueryData) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -1586,9 +1586,9 @@ func (m *QueryDecodeQuerydataRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Querydata", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1598,23 +1598,25 @@ func (m *QueryDecodeQuerydataRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Querydata = string(dAtA[iNdEx:postIndex]) + m.QueryData = append(m.QueryData[:0], dAtA[iNdEx:postIndex]...) + if m.QueryData == nil { + m.QueryData = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -1864,9 +1866,9 @@ func (m *QueryGenerateQuerydataResponse) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Querydata", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field QueryData", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1876,23 +1878,25 @@ func (m *QueryGenerateQuerydataResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Querydata = string(dAtA[iNdEx:postIndex]) + m.QueryData = append(m.QueryData[:0], dAtA[iNdEx:postIndex]...) + if m.QueryData == nil { + m.QueryData = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/registry/types/query.pb.gw.go b/x/registry/types/query.pb.gw.go index ea9f0c1d1..8aaf1cd9e 100644 --- a/x/registry/types/query.pb.gw.go +++ b/x/registry/types/query.pb.gw.go @@ -116,15 +116,15 @@ func request_Query_DecodeQuerydata_0(ctx context.Context, marshaler runtime.Mars _ = err ) - val, ok = pathParams["querydata"] + val, ok = pathParams["query_data"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "querydata") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_data") } - protoReq.Querydata, err = runtime.String(val) + protoReq.QueryData, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "querydata", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_data", err) } msg, err := client.DecodeQuerydata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) @@ -143,15 +143,15 @@ func local_request_Query_DecodeQuerydata_0(ctx context.Context, marshaler runtim _ = err ) - val, ok = pathParams["querydata"] + val, ok = pathParams["query_data"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "querydata") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "query_data") } - protoReq.Querydata, err = runtime.String(val) + protoReq.QueryData, err = runtime.Bytes(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "querydata", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_data", err) } msg, err := server.DecodeQuerydata(ctx, &protoReq) @@ -581,7 +581,7 @@ var ( pattern_Query_GetDataSpec_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "registry", "get_data_spec", "query_type"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_DecodeQuerydata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "registry", "decode_querydata", "querydata"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_DecodeQuerydata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"layer", "registry", "decode_querydata", "query_data"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GenerateQuerydata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"layer", "registry", "generate_querydata", "querytype", "parameters"}, "", runtime.AssumeColonVerbOpt(false)))