2021-03-24 10:08:16 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package neo.fs.v2.reputation;
|
|
|
|
|
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/reputation/grpc;reputation";
|
|
|
|
option csharp_namespace = "Neo.FileStorage.API.Reputation";
|
|
|
|
|
2021-04-02 08:00:53 +00:00
|
|
|
import "refs/types.proto";
|
|
|
|
|
2021-05-06 16:50:20 +00:00
|
|
|
// NeoFS unique peer identifier is 33 byte long compressed public key of the
|
|
|
|
// node, the same as the one stored in the network map.
|
2021-04-02 07:56:01 +00:00
|
|
|
//
|
|
|
|
// String presentation is
|
|
|
|
// [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string.
|
|
|
|
//
|
|
|
|
// JSON value will be the data encoded as a string using standard base64
|
|
|
|
// encoding with paddings. Either
|
|
|
|
// [standard](https://tools.ietf.org/html/rfc4648#section-4) or
|
|
|
|
// [URL-safe](https://tools.ietf.org/html/rfc4648#section-5) base64 encoding
|
|
|
|
// with/without paddings are accepted.
|
|
|
|
message PeerID {
|
2021-05-06 16:50:20 +00:00
|
|
|
// Peer node's public key
|
|
|
|
bytes public_key = 1 [json_name = "publicKey"];
|
2021-04-02 07:56:01 +00:00
|
|
|
}
|
|
|
|
|
2021-05-06 16:50:20 +00:00
|
|
|
// Trust level to a NeoFS network peer.
|
2021-03-24 10:08:16 +00:00
|
|
|
message Trust {
|
2021-05-06 16:50:20 +00:00
|
|
|
// Identifier of the trusted peer
|
2021-04-02 07:56:01 +00:00
|
|
|
PeerID peer = 1 [json_name = "peer"];
|
2021-03-24 10:08:16 +00:00
|
|
|
|
2021-05-06 16:50:20 +00:00
|
|
|
// Trust level in [0:1] range
|
2021-03-24 10:08:16 +00:00
|
|
|
double value = 2 [json_name = "value"];
|
|
|
|
}
|
2021-04-02 08:00:53 +00:00
|
|
|
|
2021-05-06 16:50:20 +00:00
|
|
|
// Trust level of a peer to a peer.
|
2021-04-09 07:49:20 +00:00
|
|
|
message PeerToPeerTrust {
|
2021-05-06 16:50:20 +00:00
|
|
|
// Identifier of the trusting peer
|
2021-04-09 07:49:20 +00:00
|
|
|
PeerID trusting_peer = 1 [json_name = "trustingPeer"];
|
|
|
|
|
2021-05-06 16:50:20 +00:00
|
|
|
// Trust level
|
2021-04-09 07:49:20 +00:00
|
|
|
Trust trust = 2 [json_name = "trust"];
|
|
|
|
}
|
|
|
|
|
2021-05-06 16:50:20 +00:00
|
|
|
// Global trust level to NeoFS node.
|
2021-04-02 08:00:53 +00:00
|
|
|
message GlobalTrust {
|
2021-04-02 10:08:37 +00:00
|
|
|
// Message format version. Effectively the version of API library used to create
|
|
|
|
// the message.
|
|
|
|
neo.fs.v2.refs.Version version = 1 [json_name = "version"];
|
2021-04-02 08:00:53 +00:00
|
|
|
// Message body structure.
|
|
|
|
message Body {
|
2021-05-06 16:50:20 +00:00
|
|
|
// Node manager ID
|
2021-04-02 08:00:53 +00:00
|
|
|
PeerID manager = 1 [json_name = "manager"];
|
|
|
|
|
2021-05-06 16:50:20 +00:00
|
|
|
// Global trust level
|
2021-04-02 08:00:53 +00:00
|
|
|
Trust trust = 2 [json_name = "trust"];
|
|
|
|
}
|
|
|
|
|
2021-05-06 16:50:20 +00:00
|
|
|
// Message body
|
2021-04-02 10:08:37 +00:00
|
|
|
Body body = 2 [json_name = "body"];
|
2021-04-02 08:00:53 +00:00
|
|
|
|
|
|
|
// Signature of the binary `body` field by the manager.
|
2021-04-02 10:08:37 +00:00
|
|
|
neo.fs.v2.refs.Signature signature = 3 [json_name = "signature"];
|
2021-04-02 08:00:53 +00:00
|
|
|
}
|