From f9e76434026f5fab5b75650bb1db25f26b36ae66 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Fri, 26 Feb 2021 10:53:47 +0300 Subject: [PATCH] =?UTF-8?q?Release=20v2.4.0=20-=20Ganghwado=20(=EA=B0=95?= =?UTF-8?q?=ED=99=94=EB=8F=84,=20=E6=B1=9F=E8=8F=AF=E5=B3=B6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added `netmap.NetworkInfo` RPC. Signed-off-by: Alex Vanin --- CHANGELOG.md | 18 +++++++++++ proto-docs/netmap.md | 70 +++++++++++++++++++++++++++++++++++++++++ proto-docs/object.md | 5 +++ proto-docs/tombstone.md | 2 +- 4 files changed, 94 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4cddb2..8ac3209 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [2.4.0] - 2021-02-26 - Ganghwado (강화도, 江華島) + +This release provides new RPC method to fetch network info from storage node. +By getting current epoch value, application might set up correct expiration +values in the objects. + +### Added + +- `netmap.NetworkInfo` request for getting node's network view. +- Release instructions. + +### Changed + +- Clarified processing of empty search query in `object.Search` RPC. +- Specified connection of tombstone expiration value with well-known + `__NEOFS__EXPIRATION_EPOCH` object attribute. + ## [2.3.0] - 2021-02-11 - Seonyudo (선유도, 仙遊島) This release brings support for nodes to exchange information about disk space @@ -313,3 +330,4 @@ Bump major release [2.2.0]: https://github.com/nspcc-dev/neofs-api/compare/v2.1.1...v2.2.0 [2.2.1]: https://github.com/nspcc-dev/neofs-api/compare/v2.2.0...v2.2.1 [2.3.0]: https://github.com/nspcc-dev/neofs-api/compare/v2.2.1...v2.3.0 +[2.4.0]: https://github.com/nspcc-dev/neofs-api/compare/v2.3.0...v2.4.0 diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md index ab0cde6..6b2493c 100644 --- a/proto-docs/netmap.md +++ b/proto-docs/netmap.md @@ -12,12 +12,17 @@ - [LocalNodeInfoRequest.Body](#neo.fs.v2.netmap.LocalNodeInfoRequest.Body) - [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse) - [LocalNodeInfoResponse.Body](#neo.fs.v2.netmap.LocalNodeInfoResponse.Body) + - [NetworkInfoRequest](#neo.fs.v2.netmap.NetworkInfoRequest) + - [NetworkInfoRequest.Body](#neo.fs.v2.netmap.NetworkInfoRequest.Body) + - [NetworkInfoResponse](#neo.fs.v2.netmap.NetworkInfoResponse) + - [NetworkInfoResponse.Body](#neo.fs.v2.netmap.NetworkInfoResponse.Body) - [netmap/types.proto](#netmap/types.proto) - Messages - [Filter](#neo.fs.v2.netmap.Filter) + - [NetworkInfo](#neo.fs.v2.netmap.NetworkInfo) - [NodeInfo](#neo.fs.v2.netmap.NodeInfo) - [NodeInfo.Attribute](#neo.fs.v2.netmap.NodeInfo.Attribute) - [PlacementPolicy](#neo.fs.v2.netmap.PlacementPolicy) @@ -47,6 +52,7 @@ NeoFS nodes. ``` rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse); +rpc NetworkInfo(NetworkInfoRequest) returns (NetworkInfoResponse); ``` @@ -61,6 +67,13 @@ further communication. Can also be used to check if node is up and running. | Name | Input | Output | | ---- | ----- | ------ | | LocalNodeInfo | [LocalNodeInfoRequest](#neo.fs.v2.netmap.LocalNodeInfoRequest) | [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse) | +#### Method NetworkInfo + +Read recent information about the NeoFS network. + +| Name | Input | Output | +| ---- | ----- | ------ | +| NetworkInfo | [NetworkInfoRequest](#neo.fs.v2.netmap.NetworkInfoRequest) | [NetworkInfoResponse](#neo.fs.v2.netmap.NetworkInfoResponse) | @@ -108,6 +121,51 @@ Local Node Info, including API Version in use. | version | [neo.fs.v2.refs.Version](#neo.fs.v2.refs.Version) | | Latest NeoFS API version in use | | node_info | [NodeInfo](#neo.fs.v2.netmap.NodeInfo) | | NodeInfo structure with recent information from node itself | + + + +### Message NetworkInfoRequest +Get NetworkInfo structure with the network view from particular node. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| body | [NetworkInfoRequest.Body](#neo.fs.v2.netmap.NetworkInfoRequest.Body) | | Body of the NetworkInfo request message | +| meta_header | [neo.fs.v2.session.RequestMetaHeader](#neo.fs.v2.session.RequestMetaHeader) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. | +| verify_header | [neo.fs.v2.session.RequestVerificationHeader](#neo.fs.v2.session.RequestVerificationHeader) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. | + + + + +### Message NetworkInfoRequest.Body +NetworkInfo request body is empty. + + + + + +### Message NetworkInfoResponse +Response with NetworkInfo structure including current epoch and +sidechain magic number. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| body | [NetworkInfoResponse.Body](#neo.fs.v2.netmap.NetworkInfoResponse.Body) | | Body of the NetworkInfo response message. | +| meta_header | [neo.fs.v2.session.ResponseMetaHeader](#neo.fs.v2.session.ResponseMetaHeader) | | Carries response meta information. Header data is used only to regulate message transport and does not affect response execution. | +| verify_header | [neo.fs.v2.session.ResponseVerificationHeader](#neo.fs.v2.session.ResponseVerificationHeader) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. | + + + + +### Message NetworkInfoResponse.Body +Information about the network. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| network_info | [NetworkInfo](#neo.fs.v2.netmap.NetworkInfo) | | NetworkInfo structure with recent information. | + @@ -139,6 +197,18 @@ results, that will satisfy filter's conditions. | filters | [Filter](#neo.fs.v2.netmap.Filter) | repeated | List of inner filters. Top level operation will be applied to the whole list. | + + +### Message NetworkInfo +Information about NeoFS network + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| current_epoch | [uint64](#uint64) | | Number of the current epoch in the NeoFS network. | +| magic_number | [uint64](#uint64) | | Magic number of the sidechain of the NeoFS network. | + + ### Message NodeInfo diff --git a/proto-docs/object.md b/proto-docs/object.md index ab07679..355f7a4 100644 --- a/proto-docs/object.md +++ b/proto-docs/object.md @@ -554,6 +554,11 @@ Object Search request body Filter structure checks if object header field or attribute content matches a value. +If no filters set, search request will return all objects of the +container, including Regular object, Tombstones and Storage Group +objects. Most human users expect to get only object they can directly +work with. In that case the `$Object:ROOT` filter should be used. + By default `key` field refers to the corresponding object's `Attribute`. Some Object's header fields can also be accessed by adding `$Object:` prefix to the name. Here is the list of fields available via this prefix: diff --git a/proto-docs/tombstone.md b/proto-docs/tombstone.md index e43a212..1dca62a 100644 --- a/proto-docs/tombstone.md +++ b/proto-docs/tombstone.md @@ -31,7 +31,7 @@ purged from the NeoFS network. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| expiration_epoch | [uint64](#uint64) | | Last NeoFS epoch number of the tombstone lifetime. It's set by tombstone creator depending on current NeoFS network settings. | +| expiration_epoch | [uint64](#uint64) | | Last NeoFS epoch number of the tombstone lifetime. It's set by tombstone creator depending on current NeoFS network settings. Tombstone object must have the same expiration epoch value in `__NEOFS__EXPIRATION_EPOCH` attribute. Otherwise tombstone will be rejected by storage node. | | split_id | [bytes](#bytes) | | 16 byte UUID used to identify the split object hierarchy parts. Must be unique inside container. All objects participating in the split must have the same `split_id` value. | | members | [neo.fs.v2.refs.ObjectID](#neo.fs.v2.refs.ObjectID) | repeated | List of objects to be deleted. |