Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: reputation of peer #1347

Merged
merged 10 commits into from
Sep 29, 2022
Merged

Feature: reputation of peer #1347

merged 10 commits into from
Sep 29, 2022

Conversation

xDimon
Copy link
Member

@xDimon xDimon commented Sep 21, 2022

Signed-off-by: Dmitriy Khaustov aka xDimon [email protected]

Referenced issues

Resolves #1316

Description of the Change

ReputationRepository (ex. PeerRatingRepository) has refactored.
ReputationChange has implemented.
Added change of reputation where it is needed.
Added tiker for smooth zeroing of reputation.
Additional checks in grandpa.

Benefits

Ability to manage connected peers by rating.

Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
@codecov
Copy link

codecov bot commented Sep 21, 2022

Codecov Report

Merging #1347 (7a23886) into master (7a35947) will decrease coverage by 0.16%.
The diff coverage is 4.43%.

@@            Coverage Diff             @@
##           master    #1347      +/-   ##
==========================================
- Coverage   24.40%   24.24%   -0.17%     
==========================================
  Files         621      622       +1     
  Lines       23062    23235     +173     
  Branches    12030    12143     +113     
==========================================
+ Hits         5629     5634       +5     
- Misses      12226    12384     +158     
- Partials     5207     5217      +10     
Impacted Files Coverage Δ
core/consensus/grandpa/grandpa_context.hpp 25.00% <ø> (+25.00%) ⬆️
core/consensus/grandpa/impl/grandpa_impl.hpp 100.00% <ø> (ø)
core/consensus/grandpa/impl/voting_round_impl.cpp 22.95% <0.00%> (-1.11%) ⬇️
core/injector/application_injector.cpp 33.22% <ø> (ø)
core/log/configurator.cpp 22.22% <ø> (ø)
core/network/impl/protocols/protocol_factory.hpp 66.66% <ø> (ø)
.../network/impl/protocols/protocol_req_collation.cpp 0.00% <0.00%> (ø)
core/network/impl/protocols/sync_protocol_impl.cpp 8.64% <0.00%> (ø)
core/network/impl/protocols/sync_protocol_impl.hpp 0.00% <ø> (ø)
core/network/reputation_change.hpp 0.00% <0.00%> (ø)
... and 8 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@kamilsa kamilsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just general comment that would be good to add trace logs whenever reputation of node changes

Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
Signed-off-by: Dmitriy Khaustov aka xDimon <[email protected]>
@xDimon xDimon enabled auto-merge (squash) September 29, 2022 17:43
@xDimon xDimon merged commit 91bf737 into master Sep 29, 2022
@xDimon xDimon deleted the feature/grandpa_rating branch September 29, 2022 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce peers rating for grandpa protocol
4 participants