forked from TrueCloudLab/frostfs-api
[#143] reputation: Add dedicated type for peer ID
Define `PeerID` message. Change `Trust.peer` field type to `PeerID`. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
f4974b0e44
commit
5bf79d3dbf
1 changed files with 19 additions and 4 deletions
|
@ -5,13 +5,28 @@ package neo.fs.v2.reputation;
|
||||||
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/reputation/grpc;reputation";
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/reputation/grpc;reputation";
|
||||||
option csharp_namespace = "Neo.FileStorage.API.Reputation";
|
option csharp_namespace = "Neo.FileStorage.API.Reputation";
|
||||||
|
|
||||||
|
// NeoFS unique peer identifier.
|
||||||
|
//
|
||||||
|
// `PeerID` is a 33 byte long compressed public key of the node
|
||||||
|
// stored in network map.
|
||||||
|
//
|
||||||
|
// 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 {
|
||||||
|
// Peer identifier in a binary format.
|
||||||
|
bytes value = 1 [json_name = "value"];
|
||||||
|
}
|
||||||
|
|
||||||
// Trust value to NeoFS network peer.
|
// Trust value to NeoFS network peer.
|
||||||
message Trust {
|
message Trust {
|
||||||
// Identifier of the trusted peer.
|
// Identifier of the trusted peer.
|
||||||
//
|
PeerID peer = 1 [json_name = "peer"];
|
||||||
// For storage nodes, it is the node's public key
|
|
||||||
// fixed in the network map.
|
|
||||||
bytes peer = 1 [json_name = "peer"];
|
|
||||||
|
|
||||||
// Trust value.
|
// Trust value.
|
||||||
double value = 2 [json_name = "value"];
|
double value = 2 [json_name = "value"];
|
||||||
|
|
Loading…
Reference in a new issue