Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add netmap snapshot request #228

Merged
merged 1 commit into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions netmap/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ service NetmapService {
// information about the current network state has been successfully read;
// - Common failures (SECTION_FAILURE_COMMON).
rpc NetworkInfo (NetworkInfoRequest) returns (NetworkInfoResponse);

// 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).
rpc NetmapSnapshot (NetmapSnapshotRequest) returns (NetmapSnapshotResponse);
}

// Get NodeInfo structure directly from a particular node
Expand Down Expand Up @@ -114,3 +122,45 @@ message NetworkInfoResponse {
// transmission.
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
}

// Get netmap snapshot request
message NetmapSnapshotRequest {
// Get netmap snapshot request body.
message Body {
}

// Body of get netmap snapshot 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;

}

// Response with current netmap snapshot
message NetmapSnapshotResponse {
// Get netmap snapshot response body
message Body {
// Structure of the requested network map.
Netmap netmap = 1 [json_name = "netmap"];
}

// Body of get netmap snapshot 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;

}
9 changes: 9 additions & 0 deletions netmap/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,15 @@ message NodeInfo {
State state = 4 [json_name = "state"];
}

// Network map structure
message Netmap {
// Network map revision number.
uint64 epoch = 1 [json_name = "epoch"];

// Nodes presented in network.
repeated NodeInfo nodes = 2 [json_name = "nodes"];
}

// NeoFS network configuration
message NetworkConfig {
// Single configuration parameter
Expand Down