[#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 <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-04 15:33:10 +03:00 committed by Stanislav Bogatyrev
parent 6e5565f238
commit b46011db45
2 changed files with 4 additions and 7 deletions

View file

@ -50,13 +50,11 @@ message SystemHeader {
uint64 Version = 1; uint64 Version = 1;
// PayloadLength is an object payload length // PayloadLength is an object payload length
uint64 PayloadLength = 2; uint64 PayloadLength = 2;
// Address carries object address in the NeoFS system.
// ID is an object identifier, is a valid UUIDv4 // It encapsulates the object and the container identifiers.
bytes ID = 3; refs.Address Address = 3;
// OwnerID is a wallet address // OwnerID is a wallet address
bytes OwnerID = 4; 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. // CreationEpoch carries number of NeoFS epoch on which the object was created.
uint64 CreationEpoch = 6; uint64 CreationEpoch = 6;
} }

View file

@ -463,9 +463,8 @@ Header groups the information about the NeoFS object.
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| Version | [uint64](#uint64) | | Version of the object structure | | Version | [uint64](#uint64) | | Version of the object structure |
| PayloadLength | [uint64](#uint64) | | PayloadLength is an object payload length | | 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 | | 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. | | CreationEpoch | [uint64](#uint64) | | CreationEpoch carries number of NeoFS epoch on which the object was created. |