forked from TrueCloudLab/frostfs-api
reputation: Rename and reformat
* Rename: - SendLocalTrust → AnnounceLocalTrust - SendIntermediateResult → AnnounceIntermediateResult Those methods don't expect to Send anything, but to further announce the trust information from the node. * Change PeerID to explicitly use public key as a node identifier * Minor comments reformat Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
b50b951dd0
commit
37e13c5475
2 changed files with 47 additions and 43 deletions
|
@ -7,10 +7,8 @@ option csharp_namespace = "Neo.FileStorage.API.Reputation";
|
|||
|
||||
import "refs/types.proto";
|
||||
|
||||
// NeoFS unique peer identifier.
|
||||
//
|
||||
// `PeerID` is a 33 byte long compressed public key of the node
|
||||
// stored in network map.
|
||||
// NeoFS unique peer identifier is 33 byte long compressed public key of the
|
||||
// node, the same as the one stored in the network map.
|
||||
//
|
||||
// String presentation is
|
||||
// [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string.
|
||||
|
@ -21,44 +19,43 @@ import "refs/types.proto";
|
|||
// [URL-safe](https://tools.ietf.org/html/rfc4648#section-5) base64 encoding
|
||||
// with/without paddings are accepted.
|
||||
message PeerID {
|
||||
// Peer identifier in a binary format.
|
||||
bytes value = 1 [json_name = "value"];
|
||||
// Peer node's public key
|
||||
bytes public_key = 1 [json_name = "publicKey"];
|
||||
}
|
||||
|
||||
// Trust value to NeoFS network peer.
|
||||
// Trust level to a NeoFS network peer.
|
||||
message Trust {
|
||||
// Identifier of the trusted peer.
|
||||
// Identifier of the trusted peer
|
||||
PeerID peer = 1 [json_name = "peer"];
|
||||
|
||||
// Trust value.
|
||||
// Trust level in [0:1] range
|
||||
double value = 2 [json_name = "value"];
|
||||
}
|
||||
|
||||
// Trust value of a peer to a peer.
|
||||
// Trust level of a peer to a peer.
|
||||
message PeerToPeerTrust {
|
||||
// Identifier of the trusting peer.
|
||||
// Identifier of the trusting peer
|
||||
PeerID trusting_peer = 1 [json_name = "trustingPeer"];
|
||||
|
||||
// Trust value.
|
||||
// Trust level
|
||||
Trust trust = 2 [json_name = "trust"];
|
||||
}
|
||||
|
||||
// Global trust value to NeoFS network peer.
|
||||
// Global trust level to NeoFS node.
|
||||
message GlobalTrust {
|
||||
// Message format version. Effectively the version of API library used to create
|
||||
// the message.
|
||||
neo.fs.v2.refs.Version version = 1 [json_name = "version"];
|
||||
|
||||
// Message body structure.
|
||||
message Body {
|
||||
// Node manager ID.
|
||||
// Node manager ID
|
||||
PeerID manager = 1 [json_name = "manager"];
|
||||
|
||||
// Global trust value.
|
||||
// Global trust level
|
||||
Trust trust = 2 [json_name = "trust"];
|
||||
}
|
||||
|
||||
// Message body.
|
||||
// Message body
|
||||
Body body = 2 [json_name = "body"];
|
||||
|
||||
// Signature of the binary `body` field by the manager.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue