diff --git a/CHANGELOG.md b/CHANGELOG.md index 13e8821..9acec88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added - `INIT` split chain object type (#283) - Link object payload message (#263) +- Children sizes index to the link objects (#264) ### Changed diff --git a/link/types.proto b/link/types.proto index 2bbd5e2..b7d78b5 100644 --- a/link/types.proto +++ b/link/types.proto @@ -11,10 +11,20 @@ import "refs/types.proto"; // chain objects' IDs. It is created only after the whole split chain is known // and signed. This object is the only object that refers to every "child object" // ID. It is NOT required for the original object assembling. It MUST have ALL -// the "child objects" IDs. IDs MUST be ordered according to the original payload -// split, meaning the first payload part holder MUST be placed at the first place -// in the corresponding link object. +// the "child objects" IDs. Child objects MUST be ordered according to the +// original payload split, meaning the first payload part holder MUST be placed +// at the first place in the corresponding link object. Sizes MUST NOT be omitted +// and MUST be a real object payload size in bytes. message Link { - // Full list of the "child" object IDs. - repeated neo.fs.v2.refs.ObjectID children = 1 [json_name = "children"]; + // Object ID with its object's payload size. + message MeasuredObject { + // Object ID. + neo.fs.v2.refs.ObjectID id = 1 [json_name = "id"]; + + // Object size in bytes. + uint32 size = 2 [json_name = "size"]; + } + + // Full list of the "child" object descriptors. + repeated MeasuredObject children = 1 [json_name = "children"]; } diff --git a/proto-docs/link.md b/proto-docs/link.md index a1596a0..a71626b 100644 --- a/proto-docs/link.md +++ b/proto-docs/link.md @@ -7,6 +7,7 @@ - Messages - [Link](#neo.fs.v2.link.Link) + - [Link.MeasuredObject](#neo.fs.v2.link.Link.MeasuredObject) - [Scalar Value Types](#scalar-value-types) @@ -29,14 +30,27 @@ Link is a payload of helper objects that contain the full list of the split chain objects' IDs. It is created only after the whole split chain is known and signed. This object is the only object that refers to every "child object" ID. It is NOT required for the original object assembling. It MUST have ALL -the "child objects" IDs. IDs MUST be ordered according to the original payload -split, meaning the first payload part holder MUST be placed at the first place -in the corresponding link object. +the "child objects" IDs. Child objects MUST be ordered according to the +original payload split, meaning the first payload part holder MUST be placed +at the first place in the corresponding link object. Sizes MUST NOT be omitted +and MUST be a real object payload size in bytes. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| children | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | Full list of the "child" object IDs. | +| children | [Link.MeasuredObject](#neo.fs.v2.link.Link.MeasuredObject) | repeated | Full list of the "child" object descriptors. | + + + + +### Message Link.MeasuredObject +Object ID with its object's payload size. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | | Object ID. | +| size | [uint32](#uint32) | | Object size in bytes. |