From e72dceebd34498303a249945264619ebf019bf3a Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Mon, 31 Aug 2020 13:56:03 +0300 Subject: [PATCH] [#62] Put NodeInfo public_key field first To simplify decoding of NodeInfo structure inside netmap smart contract, the first field, also used as a storage key inside contract, has to be of the fixed length. Signed-off-by: Stanislav Bogatyrev --- netmap/types.proto | 8 ++++---- proto-docs/netmap.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/netmap/types.proto b/netmap/types.proto index 7e1dd42..ae424c5 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -92,11 +92,11 @@ message PlacementPolicy { // NeoFS node description message NodeInfo { - // Ways to connect to a node - string address = 1; - // Public key of the NeoFS node in a binary format. - bytes public_key = 2; + bytes public_key = 1; + + // Ways to connect to a node + string address = 2; // Attributes of the NeoFS node. message Attribute { diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md index d375b12..152e507 100644 --- a/proto-docs/netmap.md +++ b/proto-docs/netmap.md @@ -37,8 +37,8 @@ NeoFS node description | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| address | [string](#string) | | Ways to connect to a node | | public_key | [bytes](#bytes) | | Public key of the NeoFS node in a binary format. | +| address | [string](#string) | | Ways to connect to a node | | attributes | [NodeInfo.Attribute](#neo.fs.v2.netmap.NodeInfo.Attribute) | repeated | Carries list of the NeoFS node attributes in a string key-value format. | | state | [NodeInfo.State](#neo.fs.v2.netmap.NodeInfo.State) | | Carries state of the NeoFS node. |