From f4974b0e44150fdf0e472d8896e2341f0e3aaf64 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 1 Apr 2021 18:34:30 +0300 Subject: [PATCH] [#143] reputation: Add SendIntermediateResult RPC Add `SendIntermediateResult` RPC to `ReputationService`. Define structures of request and response messages. Signed-off-by: Leonard Lyubich --- reputation/service.proto | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/reputation/service.proto b/reputation/service.proto index 642fd10..45363ae 100644 --- a/reputation/service.proto +++ b/reputation/service.proto @@ -13,6 +13,10 @@ import "session/types.proto"; service ReputationService { // Sends local client trust to any peer from NeoFS network. rpc SendLocalTrust (SendLocalTrustRequest) returns (SendLocalTrustResponse); + + // Sends the intermediate result of the iterative algorithm + // for calculating the global reputation of the node. + rpc SendIntermediateResult (SendIntermediateResultRequest) returns (SendIntermediateResultResponse); } // Request to send local trust. @@ -59,3 +63,46 @@ message SendLocalTrustResponse { // transmission. neo.fs.v2.session.ResponseVerificationHeader verify_header = 3; } + +// Request to send intermediate global trust. +message SendIntermediateResultRequest { + // Request body structure. + message Body { + // Sequence number of the iteration. + uint32 iteration = 1; + + // Current global trust value computed at the specified iteration. + Trust trust = 2; + } + + // Body of the 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 to request to send intermediate global trust. +message SendIntermediateResultResponse { + // Response body structure. + message Body { + } + + // Body of the response message. + Body body = 1; + + // Carries response meta information. Header data is used only to regulate + // message transport and does not affect request 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; +}