From 21f51c8c8b86b7e51578ea88e74122a7f9655658 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Fri, 31 Jul 2020 17:43:55 +0300 Subject: [PATCH] [#23] Reorganize container message fields Capacity field is obsolete and removed. Salt field renamed to Nonce so it shows better the purpose of the field. Remaining fields are reorded to have fixed size fields on top. It affects stable-marshaller implementation. Signed-off-by: Alex Vanin --- container/types.proto | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/container/types.proto b/container/types.proto index b8d94f2..98c1404 100644 --- a/container/types.proto +++ b/container/types.proto @@ -10,19 +10,17 @@ option (gogoproto.stable_marshaler_all) = true; // The Container service definition. message Container { - // OwnerID is a wallet address. - bytes OwnerID = 1 [(gogoproto.customtype) = "OwnerID", (gogoproto.nullable) = false]; - // Salt is a nonce for unique container id calculation. - bytes Salt = 2 [(gogoproto.customtype) = "UUID", (gogoproto.nullable) = false]; - // Capacity defines amount of data that can be stored in the container (doesn't used for now). - uint64 Capacity = 3; - // Rules define storage policy for the object inside the container. - netmap.PlacementRule Rules = 4 [(gogoproto.nullable) = false]; - // BasicACL with access control rules for owner, system, others and - // permission bits for bearer token and extended ACL. - uint32 BasicACL = 5; - // Attributes define any immutable characteristics of container. - repeated Attribute Attributes = 6; + // OwnerID is a 25 byte NEO3.0 wallet address. + bytes OwnerID = 1; + // Nonce is a 16 byte UUID, used to avoid collisions of container id. + bytes Nonce = 2; + // BasicACL contains access control rules for owner, system, others groups and + // permission bits for bearer token and Extended ACL. + uint32 BasicACL = 3; + // Attributes define any immutable characteristics of container. + repeated Attribute Attributes = 4; + // Rules define storage policy for the object inside the container. + netmap.PlacementRule Rules = 5; } // Attribute is a key-value pair of strings.