diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b67e88..542f6e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ - Add `__SYSTEM__` attribute prefix (#12, #14) - Add `allow_impersonate` flag to bearer token (#18) +### Removed +- Reputation system (#22) + ## [2.14.0] - 2022-09-23 - Anmado (안마도, 鞍馬島) ### Added diff --git a/netmap/types.proto b/netmap/types.proto index 750e523..8b317dc 100644 --- a/netmap/types.proto +++ b/netmap/types.proto @@ -273,13 +273,6 @@ message NetworkConfig { // - **ContainerFee** \ // Fee paid for container creation by the container owner. // Value: little-endian integer. Default: 0. - // - **EigenTrustAlpha** \ - // Alpha parameter of EigenTrust algorithm used in the Reputation system. - // Value: decimal floating-point number in UTF-8 string representation. - // Default: 0. - // - **EigenTrustIterations** \ - // Number of EigenTrust algorithm iterations to pass in the Reputation system. - // Value: little-endian integer. Default: 0. // - **EpochDuration** \ // NeoFS epoch duration measured in Sidechain blocks. // Value: little-endian integer. Default: 0. diff --git a/proto-docs/netmap.md b/proto-docs/netmap.md index e746b78..1467a5d 100644 --- a/proto-docs/netmap.md +++ b/proto-docs/netmap.md @@ -313,13 +313,6 @@ System parameters: - **ContainerFee** \ Fee paid for container creation by the container owner. Value: little-endian integer. Default: 0. -- **EigenTrustAlpha** \ - Alpha parameter of EigenTrust algorithm used in the Reputation system. - Value: decimal floating-point number in UTF-8 string representation. - Default: 0. -- **EigenTrustIterations** \ - Number of EigenTrust algorithm iterations to pass in the Reputation system. - Value: little-endian integer. Default: 0. - **EpochDuration** \ NeoFS epoch duration measured in Sidechain blocks. Value: little-endian integer. Default: 0. diff --git a/proto-docs/reputation.md b/proto-docs/reputation.md deleted file mode 100644 index 19558f3..0000000 --- a/proto-docs/reputation.md +++ /dev/null @@ -1,289 +0,0 @@ -# Protocol Documentation - - -## Table of Contents - -- [reputation/service.proto](#reputation/service.proto) - - Services - - [ReputationService](#neo.fs.v2.reputation.ReputationService) - - - Messages - - [AnnounceIntermediateResultRequest](#neo.fs.v2.reputation.AnnounceIntermediateResultRequest) - - [AnnounceIntermediateResultRequest.Body](#neo.fs.v2.reputation.AnnounceIntermediateResultRequest.Body) - - [AnnounceIntermediateResultResponse](#neo.fs.v2.reputation.AnnounceIntermediateResultResponse) - - [AnnounceIntermediateResultResponse.Body](#neo.fs.v2.reputation.AnnounceIntermediateResultResponse.Body) - - [AnnounceLocalTrustRequest](#neo.fs.v2.reputation.AnnounceLocalTrustRequest) - - [AnnounceLocalTrustRequest.Body](#neo.fs.v2.reputation.AnnounceLocalTrustRequest.Body) - - [AnnounceLocalTrustResponse](#neo.fs.v2.reputation.AnnounceLocalTrustResponse) - - [AnnounceLocalTrustResponse.Body](#neo.fs.v2.reputation.AnnounceLocalTrustResponse.Body) - - -- [reputation/types.proto](#reputation/types.proto) - - - Messages - - [GlobalTrust](#neo.fs.v2.reputation.GlobalTrust) - - [GlobalTrust.Body](#neo.fs.v2.reputation.GlobalTrust.Body) - - [PeerID](#neo.fs.v2.reputation.PeerID) - - [PeerToPeerTrust](#neo.fs.v2.reputation.PeerToPeerTrust) - - [Trust](#neo.fs.v2.reputation.Trust) - - -- [Scalar Value Types](#scalar-value-types) - - - - -
- -## reputation/service.proto - - - - - - -### Service "neo.fs.v2.reputation.ReputationService" -`ReputationService` provides mechanisms for exchanging trust values with -other NeoFS nodes. Nodes rate each other's reputation based on how good they -process requests and set a trust level based on that rating. The trust -information is passed to the next nodes to check and aggregate unless the -final result is recorded. - -``` -rpc AnnounceLocalTrust(AnnounceLocalTrustRequest) returns (AnnounceLocalTrustResponse); -rpc AnnounceIntermediateResult(AnnounceIntermediateResultRequest) returns (AnnounceIntermediateResultResponse); - -``` - -#### Method AnnounceLocalTrust - -Announce local client trust information to any node in NeoFS network. - -Statuses: -- **OK** (0, SECTION_SUCCESS): -local trust has been successfully announced; -- Common failures (SECTION_FAILURE_COMMON). - -| Name | Input | Output | -| ---- | ----- | ------ | -| AnnounceLocalTrust | [AnnounceLocalTrustRequest](#neo.fs.v2.reputation.AnnounceLocalTrustRequest) | [AnnounceLocalTrustResponse](#neo.fs.v2.reputation.AnnounceLocalTrustResponse) | -#### Method AnnounceIntermediateResult - -Announce the intermediate result of the iterative algorithm for -calculating the global reputation of the node in NeoFS network. - -Statuses: -- **OK** (0, SECTION_SUCCESS): -intermediate trust estimation has been successfully announced; -- Common failures (SECTION_FAILURE_COMMON). - -| Name | Input | Output | -| ---- | ----- | ------ | -| AnnounceIntermediateResult | [AnnounceIntermediateResultRequest](#neo.fs.v2.reputation.AnnounceIntermediateResultRequest) | [AnnounceIntermediateResultResponse](#neo.fs.v2.reputation.AnnounceIntermediateResultResponse) | - - - - - -### Message AnnounceIntermediateResultRequest -Announce intermediate global trust information. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body | [AnnounceIntermediateResultRequest.Body](#neo.fs.v2.reputation.AnnounceIntermediateResultRequest.Body) | | Body of the request message. | -| meta_header | [neo.fs.v2.session.RequestMetaHeader](#neo.fs.v2.session.RequestMetaHeader) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. | -| verify_header | [neo.fs.v2.session.RequestVerificationHeader](#neo.fs.v2.session.RequestVerificationHeader) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. | - - - - -### Message AnnounceIntermediateResultRequest.Body -Announce intermediate global trust information. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| epoch | [uint64](#uint64) | | Iteration execution Epoch number | -| iteration | [uint32](#uint32) | | Iteration sequence number | -| trust | [PeerToPeerTrust](#neo.fs.v2.reputation.PeerToPeerTrust) | | Current global trust value calculated at the specified iteration | - - - - -### Message AnnounceIntermediateResultResponse -Intermediate global trust information announcement response. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body | [AnnounceIntermediateResultResponse.Body](#neo.fs.v2.reputation.AnnounceIntermediateResultResponse.Body) | | Body of the response message. | -| meta_header | [neo.fs.v2.session.ResponseMetaHeader](#neo.fs.v2.session.ResponseMetaHeader) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. | -| verify_header | [neo.fs.v2.session.ResponseVerificationHeader](#neo.fs.v2.session.ResponseVerificationHeader) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. | - - - - -### Message AnnounceIntermediateResultResponse.Body -Response to the node's intermediate global trust information announcement has -an empty body because the trust exchange operation is asynchronous. If -Trust information does not pass sanity checks, it is silently ignored. - - - - - -### Message AnnounceLocalTrustRequest -Announce node's local trust information. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body | [AnnounceLocalTrustRequest.Body](#neo.fs.v2.reputation.AnnounceLocalTrustRequest.Body) | | Body of the request message. | -| meta_header | [neo.fs.v2.session.RequestMetaHeader](#neo.fs.v2.session.RequestMetaHeader) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. | -| verify_header | [neo.fs.v2.session.RequestVerificationHeader](#neo.fs.v2.session.RequestVerificationHeader) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. | - - - - -### Message AnnounceLocalTrustRequest.Body -Announce node's local trust information. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| epoch | [uint64](#uint64) | | Trust assessment Epoch number | -| trusts | [Trust](#neo.fs.v2.reputation.Trust) | repeated | List of normalized local trust values to other NeoFS nodes. The value is calculated according to EigenTrust++ algorithm and must be a floating point number in [0;1] range. | - - - - -### Message AnnounceLocalTrustResponse -Node's local trust information announcement response. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| body | [AnnounceLocalTrustResponse.Body](#neo.fs.v2.reputation.AnnounceLocalTrustResponse.Body) | | Body of the response message. | -| meta_header | [neo.fs.v2.session.ResponseMetaHeader](#neo.fs.v2.session.ResponseMetaHeader) | | Carries response meta information. Header data is used only to regulate message transport and does not affect request execution. | -| verify_header | [neo.fs.v2.session.ResponseVerificationHeader](#neo.fs.v2.session.ResponseVerificationHeader) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. | - - - - -### Message AnnounceLocalTrustResponse.Body -Response to the node's local trust information announcement has an empty body -because the trust exchange operation is asynchronous. If Trust information -does not pass sanity checks, it is silently ignored. - - - - - - - - - - - -## reputation/types.proto - - - - - - - -### Message GlobalTrust -Global trust level to NeoFS node. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| version | [neo.fs.v2.refs.Version](#neo.fs.v2.refs.Version) | | Message format version. Effectively, the version of API library used to create the message. | -| body | [GlobalTrust.Body](#neo.fs.v2.reputation.GlobalTrust.Body) | | Message body | -| signature | [neo.fs.v2.refs.Signature](#neo.fs.v2.refs.Signature) | | Signature of the binary `body` field by the manager. | - - - - -### Message GlobalTrust.Body -Message body structure. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| manager | [PeerID](#neo.fs.v2.reputation.PeerID) | | Node manager ID | -| trust | [Trust](#neo.fs.v2.reputation.Trust) | | Global trust level | - - - - -### Message PeerID -NeoFS unique peer identifier is a 33 byte long compressed public key of the -node, the same as the one stored in the network map. - -String presentation is a -[base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string. - -JSON value will be 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. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| public_key | [bytes](#bytes) | | Peer node's public key | - - - - -### Message PeerToPeerTrust -Trust level of a peer to a peer. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| trusting_peer | [PeerID](#neo.fs.v2.reputation.PeerID) | | Identifier of the trusting peer | -| trust | [Trust](#neo.fs.v2.reputation.Trust) | | Trust level | - - - - -### Message Trust -Trust level to a NeoFS network peer. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| peer | [PeerID](#neo.fs.v2.reputation.PeerID) | | Identifier of the trusted peer | -| value | [double](#double) | | Trust level in [0:1] range | - - - - - - - -## Scalar Value Types - -| .proto Type | Notes | C++ Type | Java Type | Python Type | -| ----------- | ----- | -------- | --------- | ----------- | -| double | | double | double | float | -| float | | float | float | float | -| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | -| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | -| uint32 | Uses variable-length encoding. | uint32 | int | int/long | -| uint64 | Uses variable-length encoding. | uint64 | long | int/long | -| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | -| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | -| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | -| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | -| sfixed32 | Always four bytes. | int32 | int | int | -| sfixed64 | Always eight bytes. | int64 | long | int/long | -| bool | | bool | boolean | boolean | -| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | -| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | - diff --git a/reputation/service.proto b/reputation/service.proto deleted file mode 100644 index 2b3c9a6..0000000 --- a/reputation/service.proto +++ /dev/null @@ -1,128 +0,0 @@ -syntax = "proto3"; - -package neo.fs.v2.reputation; - -option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/reputation/grpc;reputation"; -option csharp_namespace = "Neo.FileStorage.API.Reputation"; - -import "reputation/types.proto"; -import "session/types.proto"; - -// `ReputationService` provides mechanisms for exchanging trust values with -// other NeoFS nodes. Nodes rate each other's reputation based on how good they -// process requests and set a trust level based on that rating. The trust -// information is passed to the next nodes to check and aggregate unless the -// final result is recorded. -service ReputationService { - // Announce local client trust information to any node in NeoFS network. - // - // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // local trust has been successfully announced; - // - Common failures (SECTION_FAILURE_COMMON). - rpc AnnounceLocalTrust (AnnounceLocalTrustRequest) returns (AnnounceLocalTrustResponse); - - // Announce the intermediate result of the iterative algorithm for - // calculating the global reputation of the node in NeoFS network. - // - // Statuses: - // - **OK** (0, SECTION_SUCCESS): - // intermediate trust estimation has been successfully announced; - // - Common failures (SECTION_FAILURE_COMMON). - rpc AnnounceIntermediateResult (AnnounceIntermediateResultRequest) returns (AnnounceIntermediateResultResponse); -} - -// Announce node's local trust information. -message AnnounceLocalTrustRequest { - // Announce node's local trust information. - message Body { - // Trust assessment Epoch number - uint64 epoch = 1; - - // List of normalized local trust values to other NeoFS nodes. The value - // is calculated according to EigenTrust++ algorithm and must be a - // floating point number in [0;1] range. - repeated Trust trusts = 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; -} - -// Node's local trust information announcement response. -message AnnounceLocalTrustResponse { - // Response to the node's local trust information announcement has an empty body - // because the trust exchange operation is asynchronous. If Trust information - // does not pass sanity checks, it is silently ignored. - 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; -} - -// Announce intermediate global trust information. -message AnnounceIntermediateResultRequest { - // Announce intermediate global trust information. - message Body { - // Iteration execution Epoch number - uint64 epoch = 1; - - // Iteration sequence number - uint32 iteration = 2; - - // Current global trust value calculated at the specified iteration - PeerToPeerTrust trust = 3; - } - - // 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; -} - -// Intermediate global trust information announcement response. -message AnnounceIntermediateResultResponse { - // Response to the node's intermediate global trust information announcement has - // an empty body because the trust exchange operation is asynchronous. If - // Trust information does not pass sanity checks, it is silently ignored. - 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; -} diff --git a/reputation/types.proto b/reputation/types.proto deleted file mode 100644 index 74262e7..0000000 --- a/reputation/types.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; - -package neo.fs.v2.reputation; - -option go_package = "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/reputation/grpc;reputation"; -option csharp_namespace = "Neo.FileStorage.API.Reputation"; - -import "refs/types.proto"; - -// NeoFS unique peer identifier is a 33 byte long compressed public key of the -// node, the same as the one stored in the network map. -// -// String presentation is a -// [base58](https://tools.ietf.org/html/draft-msporny-base58-02) encoded string. -// -// JSON value will be 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 node's public key - bytes public_key = 1 [json_name = "publicKey"]; -} - -// Trust level to a NeoFS network peer. -message Trust { - // Identifier of the trusted peer - PeerID peer = 1 [json_name = "peer"]; - - // Trust level in [0:1] range - double value = 2 [json_name = "value"]; -} - -// Trust level of a peer to a peer. -message PeerToPeerTrust { - // Identifier of the trusting peer - PeerID trusting_peer = 1 [json_name = "trustingPeer"]; - - // Trust level - Trust trust = 2 [json_name = "trust"]; -} - -// 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 - PeerID manager = 1 [json_name = "manager"]; - - // Global trust level - Trust trust = 2 [json_name = "trust"]; - } - - // Message body - Body body = 2 [json_name = "body"]; - - // Signature of the binary `body` field by the manager. - neo.fs.v2.refs.Signature signature = 3 [json_name = "signature"]; -}