2020-09-03 09:19:02 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package neo.fs.v2.netmap;
|
|
|
|
|
2023-03-07 08:50:02 +00:00
|
|
|
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/netmap/grpc;netmap";
|
2021-03-10 10:54:06 +00:00
|
|
|
option csharp_namespace = "Neo.FileStorage.API.Netmap";
|
2020-09-03 09:19:02 +00:00
|
|
|
|
|
|
|
import "netmap/types.proto";
|
|
|
|
import "refs/types.proto";
|
|
|
|
import "session/types.proto";
|
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// `NetmapService` provides methods to work with `Network Map` and the
|
|
|
|
// information required to build it. The resulting `Network Map` is stored in
|
|
|
|
// sidechain `Netmap` smart contract, while related information can be obtained
|
|
|
|
// from other NeoFS nodes.
|
2020-09-03 09:19:02 +00:00
|
|
|
service NetmapService {
|
2024-02-28 15:53:04 +00:00
|
|
|
// Get NodeInfo structure from the particular node directly.
|
|
|
|
// Node information can be taken from `Netmap` smart contract. In some cases,
|
|
|
|
// though, one may want to get recent information directly or to talk to the
|
|
|
|
// node not yet present in the `Network Map` to find out what API version can
|
|
|
|
// be used for further communication. This can be also used to check if a node
|
|
|
|
// is up and running.
|
2021-11-12 16:10:39 +00:00
|
|
|
//
|
|
|
|
// Statuses:
|
|
|
|
// - **OK** (0, SECTION_SUCCESS):
|
|
|
|
// information about the server has been successfully read;
|
|
|
|
// - Common failures (SECTION_FAILURE_COMMON).
|
2024-02-28 15:53:04 +00:00
|
|
|
rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse);
|
2021-02-17 16:07:28 +00:00
|
|
|
|
|
|
|
// Read recent information about the NeoFS network.
|
2021-11-12 16:10:39 +00:00
|
|
|
//
|
|
|
|
// Statuses:
|
|
|
|
// - **OK** (0, SECTION_SUCCESS):
|
|
|
|
// information about the current network state has been successfully read;
|
|
|
|
// - Common failures (SECTION_FAILURE_COMMON).
|
2024-02-28 15:53:04 +00:00
|
|
|
rpc NetworkInfo(NetworkInfoRequest) returns (NetworkInfoResponse);
|
2022-07-27 13:27:55 +00:00
|
|
|
|
|
|
|
// Returns network map snapshot of the current NeoFS epoch.
|
|
|
|
//
|
|
|
|
// Statuses:
|
|
|
|
// - **OK** (0, SECTION_SUCCESS):
|
|
|
|
// information about the current network map has been successfully read;
|
|
|
|
// - Common failures (SECTION_FAILURE_COMMON).
|
2024-02-28 15:53:04 +00:00
|
|
|
rpc NetmapSnapshot(NetmapSnapshotRequest) returns (NetmapSnapshotResponse);
|
2020-09-03 09:19:02 +00:00
|
|
|
}
|
|
|
|
|
2022-04-13 06:21:33 +00:00
|
|
|
// Get NodeInfo structure directly from a particular node
|
2020-09-03 09:19:02 +00:00
|
|
|
message LocalNodeInfoRequest {
|
2020-10-15 07:50:36 +00:00
|
|
|
// LocalNodeInfo request body is empty.
|
2024-02-28 15:53:04 +00:00
|
|
|
message Body {}
|
2020-10-15 07:50:36 +00:00
|
|
|
// Body of the LocalNodeInfo request message
|
2020-09-03 09:19:02 +00:00
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
|
|
|
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
|
|
|
|
|
|
|
|
// Carries request verification information. This header is used to
|
2020-10-15 07:50:36 +00:00
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-09-03 09:19:02 +00:00
|
|
|
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
|
|
|
|
}
|
|
|
|
|
2020-10-15 07:50:36 +00:00
|
|
|
// Local Node Info, including API Version in use
|
2020-09-03 09:19:02 +00:00
|
|
|
message LocalNodeInfoResponse {
|
2020-10-15 07:50:36 +00:00
|
|
|
// Local Node Info, including API Version in use.
|
2020-09-03 09:19:02 +00:00
|
|
|
message Body {
|
2020-10-15 07:50:36 +00:00
|
|
|
// Latest NeoFS API version in use
|
2020-09-03 09:19:02 +00:00
|
|
|
neo.fs.v2.refs.Version version = 1;
|
|
|
|
|
2020-10-15 07:50:36 +00:00
|
|
|
// NodeInfo structure with recent information from node itself
|
2020-09-03 09:19:02 +00:00
|
|
|
NodeInfo node_info = 2;
|
|
|
|
}
|
|
|
|
// Body of the balance response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries response meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect response execution.
|
|
|
|
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
|
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
2020-10-15 07:50:36 +00:00
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
2020-09-03 09:19:02 +00:00
|
|
|
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
|
|
|
}
|
2021-02-17 16:07:28 +00:00
|
|
|
|
2022-04-13 06:21:33 +00:00
|
|
|
// Get NetworkInfo structure with the network view from a particular node.
|
2021-02-17 16:07:28 +00:00
|
|
|
message NetworkInfoRequest {
|
2024-02-28 15:53:04 +00:00
|
|
|
// NetworkInfo request body is empty.
|
|
|
|
message Body {}
|
|
|
|
// Body of the NetworkInfo request message
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
|
|
|
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
|
|
|
|
|
|
|
|
// Carries request verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
|
|
|
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
|
2021-02-17 16:07:28 +00:00
|
|
|
}
|
|
|
|
|
2021-02-24 11:46:25 +00:00
|
|
|
// Response with NetworkInfo structure including current epoch and
|
|
|
|
// sidechain magic number.
|
2021-02-17 16:07:28 +00:00
|
|
|
message NetworkInfoResponse {
|
2024-02-28 15:53:04 +00:00
|
|
|
// Information about the network.
|
|
|
|
message Body {
|
|
|
|
// NetworkInfo structure with recent information.
|
|
|
|
NetworkInfo network_info = 1;
|
|
|
|
}
|
|
|
|
// Body of the NetworkInfo response message.
|
|
|
|
Body body = 1;
|
|
|
|
|
|
|
|
// Carries response meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect response execution.
|
|
|
|
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
|
|
|
|
|
|
|
|
// Carries response verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
|
|
|
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
2021-02-17 16:07:28 +00:00
|
|
|
}
|
2022-07-27 13:27:55 +00:00
|
|
|
|
|
|
|
// Get netmap snapshot request
|
|
|
|
message NetmapSnapshotRequest {
|
2024-02-28 15:53:04 +00:00
|
|
|
// Get netmap snapshot request body.
|
|
|
|
message Body {}
|
2022-07-27 13:27:55 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// Body of get netmap snapshot request message.
|
|
|
|
Body body = 1;
|
2022-07-27 13:27:55 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// Carries request meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect request execution.
|
|
|
|
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
|
2022-07-27 13:27:55 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// Carries request verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
|
|
|
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
|
2022-07-27 13:27:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Response with current netmap snapshot
|
|
|
|
message NetmapSnapshotResponse {
|
2024-02-28 15:53:04 +00:00
|
|
|
// Get netmap snapshot response body
|
|
|
|
message Body {
|
|
|
|
// Structure of the requested network map.
|
|
|
|
Netmap netmap = 1 [ json_name = "netmap" ];
|
|
|
|
}
|
2022-07-27 13:27:55 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// Body of get netmap snapshot response message.
|
|
|
|
Body body = 1;
|
2022-07-27 13:27:55 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// Carries response meta information. Header data is used only to regulate
|
|
|
|
// message transport and does not affect response execution.
|
|
|
|
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
|
2022-07-27 13:27:55 +00:00
|
|
|
|
2024-02-28 15:53:04 +00:00
|
|
|
// Carries response verification information. This header is used to
|
|
|
|
// authenticate the nodes of the message route and check the correctness of
|
|
|
|
// transmission.
|
|
|
|
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
2022-07-27 13:27:55 +00:00
|
|
|
}
|