Commit graph

4 commits

Author SHA1 Message Date
Leonard Lyubich
732038ac28 [#444] cmd/node: Serve ReputationService on the node
Register reputation service server that:
  * verifies signatures of the requests and signs the responses;
  * attaches response meta header to the responses;
  * logs body structures of the requests (only as initial implementation, in
    future it will be replaces with local trust storage).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-04-01 14:54:22 +03:00
Leonard Lyubich
a6f2394dec [#428] cmd/node: Trigger local trust controller on new epoch
Implement and call `initReputationService` func that constructs local trust
storage and controller, and subscribes the controller on new epoch
notification. Event handler calls `Controller.Report` method to process
collected values.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-24 10:11:52 +03:00
Leonard Lyubich
c4a1c70089 [#428] cmd/node: Implement logging writer provider
Implement simple `WriterProvider` building a `Writer` that writes incoming
data to the log. In the future, this action will be replaced by sending the
value to the manager nodes.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-24 10:11:52 +03:00
Leonard Lyubich
d9f1491566 [#428] cmd/node: Implement iterator provider on local trust storage
Implement iterator provider on wrapper over the local trust storage.
Provided iterator passes normalized local trust values according to original
EigenTrust algorithm description. In the borderline case, normalized values
are set as 1/N, N - number of remote nodes in network map.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-24 10:11:52 +03:00