From b46011db450bf1decb2bb19efc3c569e5cf46b7d Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 4 Aug 2020 15:33:10 +0300 Subject: [PATCH] [#26] object: Combine ID and CID in Address This commit merges object system header fields ID and CID into field Address of type refs.Address. This will allow you to reuse an already existing type of object reference without duplication and simplify taking the address from the object body Signed-off-by: Leonard Lyubich --- object/types.proto | 8 +++----- proto-docs/object.md | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/object/types.proto b/object/types.proto index e6bb914..6de2531 100644 --- a/object/types.proto +++ b/object/types.proto @@ -50,13 +50,11 @@ message SystemHeader { uint64 Version = 1; // PayloadLength is an object payload length uint64 PayloadLength = 2; - - // ID is an object identifier, is a valid UUIDv4 - bytes ID = 3; + // Address carries object address in the NeoFS system. + // It encapsulates the object and the container identifiers. + refs.Address Address = 3; // OwnerID is a wallet address bytes OwnerID = 4; - // CID is a SHA256 hash of the container structure (container identifier) - bytes CID = 5; // CreationEpoch carries number of NeoFS epoch on which the object was created. uint64 CreationEpoch = 6; } diff --git a/proto-docs/object.md b/proto-docs/object.md index eb69f23..0b0ac7c 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -463,9 +463,8 @@ Header groups the information about the NeoFS object. | ----- | ---- | ----- | ----------- | | Version | [uint64](#uint64) | | Version of the object structure | | PayloadLength | [uint64](#uint64) | | PayloadLength is an object payload length | -| ID | [bytes](#bytes) | | ID is an object identifier, is a valid UUIDv4 | +| Address | [refs.Address](#refs.Address) | | Address carries object address in the NeoFS system. It encapsulates the object and the container identifiers. | | OwnerID | [bytes](#bytes) | | OwnerID is a wallet address | -| CID | [bytes](#bytes) | | CID is a SHA256 hash of the container structure (container identifier) | | CreationEpoch | [uint64](#uint64) | | CreationEpoch carries number of NeoFS epoch on which the object was created. |