From 1ffad29e9455c378d22c64d2477152458b9ae8e6 Mon Sep 17 00:00:00 2001 From: vgonkivs Date: Tue, 20 Aug 2024 16:15:01 +0300 Subject: [PATCH 1/3] docs(cip-19): add NamespaceRangeID along with NamespaceRangeContainer --- cips/cip-19.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/cips/cip-19.md b/cips/cip-19.md index 0030c95..8453dc6 100644 --- a/cips/cip-19.md +++ b/cips/cip-19.md @@ -311,6 +311,49 @@ Namespace data may span over multiple rows, in which case all the data is encaps containers. This enables parallelization of namespace data retrieval and certain [compositions](#protocol-compositions) may get advantage of that by requesting containers of a single namespace from multiple servers simultaneously. +#### NamespaceRangeID + +NamespaceRangeID: encapsulates SampleID, Namespace and identifies the continuous range of shares in the DataSquare. Formated as below: + +```text +NamespaceRangeID { + SampleID; + Namespace; + Length: u16; + OmitData: bool; +} +``` + +The fields with validity rules that form NamespaceRangeID are: + +[SampleID](#sampleid): it MUST follow formatting and validity rules. + +[**Namespace**][ns]: A fixed-size 29 bytes array representing the Namespace of interest. It MUST follow [Namespace][ns] +formatting and its validity rules. + +Length: uint16 representation of the length of the range. This number MUST NOT exceed the last original share of the DataSquare. + +OmitData: bool flag that specifies whether the user expects the original data along with the proof or not. + +[Serialized](#serialization-for-share-identifiers) NamespaceRangeID MUST have a length of 44 bytes. + +#### NamespaceRangeContainer + +NamespaceRangeContainer containers encapsulate user-submitted data under [namespaces][ns] within a single or multiple +of [DataSquare][square] rows. It MAY contain [shares][shares] and [NMT][nmt] proof of share inclusion or proof only. + +NamespaceRangeContainer container are protobuf formatted using the following proto3 schema: + +```protobuf +syntax = "proto3"; + +message NamespaceRangeContainer { + repeated RowNamespaceData namespacedData = 1; +} +``` + +The fields with validity rules that form [RowNamespaceData](#rownamespacedata-container) container. + ### Core Structures This section is purposed for messages that do not fit into [Identifier](#share-identifiers) or [Container](#share-containers) From f36f11c39635d72702491c4c428cc94f57195a97 Mon Sep 17 00:00:00 2001 From: vgonkivs Date: Wed, 28 Aug 2024 16:05:44 +0300 Subject: [PATCH 2/3] renamings --- cips/cip-19.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/cips/cip-19.md b/cips/cip-19.md index 8453dc6..324eac4 100644 --- a/cips/cip-19.md +++ b/cips/cip-19.md @@ -311,12 +311,13 @@ Namespace data may span over multiple rows, in which case all the data is encaps containers. This enables parallelization of namespace data retrieval and certain [compositions](#protocol-compositions) may get advantage of that by requesting containers of a single namespace from multiple servers simultaneously. -#### NamespaceRangeID +#### RangeNamespaceDataID -NamespaceRangeID: encapsulates SampleID, Namespace and identifies the continuous range of shares in the DataSquare. Formated as below: +RangeNamespaceDataID: encapsulates SampleID, Namespace and identifies the continuous range of shares in the DataSquare, +starting from the given [SampleID](#sampleid) and contains `Length` number of shares. Formated as below: ```text -NamespaceRangeID { +RangeNamespaceDataID { SampleID; Namespace; Length: u16; @@ -324,7 +325,7 @@ NamespaceRangeID { } ``` -The fields with validity rules that form NamespaceRangeID are: +The fields with validity rules that form RangeNamespaceDataID are: [SampleID](#sampleid): it MUST follow formatting and validity rules. @@ -335,20 +336,20 @@ Length: uint16 representation of the length of the range. This number MUST NOT e OmitData: bool flag that specifies whether the user expects the original data along with the proof or not. -[Serialized](#serialization-for-share-identifiers) NamespaceRangeID MUST have a length of 44 bytes. +[Serialized](#serialization-for-share-identifiers) RangeNamespaceDataID MUST have a length of 44 bytes. -#### NamespaceRangeContainer +#### RangeNamespaceData -NamespaceRangeContainer containers encapsulate user-submitted data under [namespaces][ns] within a single or multiple +RangeNamespaceData containers encapsulate user-submitted data under [namespaces][ns] within a single or multiple of [DataSquare][square] rows. It MAY contain [shares][shares] and [NMT][nmt] proof of share inclusion or proof only. -NamespaceRangeContainer container are protobuf formatted using the following proto3 schema: +RangeNamespaceDatacontainer are protobuf formatted using the following proto3 schema: ```protobuf syntax = "proto3"; -message NamespaceRangeContainer { - repeated RowNamespaceData namespacedData = 1; +message RangeNamespaceData{ + repeated RowNamespaceData namespaceData = 1; } ``` From 5af9ede6d2229f58c22a6066be9b2d191030d52c Mon Sep 17 00:00:00 2001 From: Viacheslav Date: Thu, 29 Aug 2024 10:17:21 +0300 Subject: [PATCH 3/3] apply suggestion Co-authored-by: Rootul P --- cips/cip-19.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cips/cip-19.md b/cips/cip-19.md index 324eac4..7394a96 100644 --- a/cips/cip-19.md +++ b/cips/cip-19.md @@ -343,7 +343,7 @@ OmitData: bool flag that specifies whether the user expects the original data a RangeNamespaceData containers encapsulate user-submitted data under [namespaces][ns] within a single or multiple of [DataSquare][square] rows. It MAY contain [shares][shares] and [NMT][nmt] proof of share inclusion or proof only. -RangeNamespaceDatacontainer are protobuf formatted using the following proto3 schema: +RangeNamespaceData are protobuf formatted using the following proto3 schema: ```protobuf syntax = "proto3";