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: don't disconnect privileged peers #2057

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

xDimon
Copy link
Member

@xDimon xDimon commented Apr 23, 2024

Referenced issues

Resolves (partially) #2065

Description of the Change

Detect real validators over authority discovery and avoid disconnection for such peers

Possible Drawbacks

Privileged peers might displace syncing peers

Checklist Before Opening a PR

Before you open a Pull Request (PR), please make sure you've completed the following steps and confirm by answering 'Yes' to each item:

  1. Code is formatted: Have you run your code through clang-format to ensure it adheres to the project's coding standards? Yes
  2. Code is documented: Have you added comments and documentation to your code according to the guidelines in the project's contributing guidelines? No (not affected)
  3. Self-review: Have you reviewed your own code to ensure it is free of typos, syntax errors, logical errors, and unresolved TODOs or FIXME without linking to an issue? Yes
  4. Zombienet Tests: Have you ensured that the zombienet tests are passing? Zombienet is a network simulation and testing tool used in this project. It's important to ensure that these tests pass to maintain the stability and reliability of the project. No (not affected)

Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
@xDimon xDimon requested review from iceseer and kamilsa April 25, 2024 08:10
@xDimon xDimon marked this pull request as ready for review April 25, 2024 08:11
@@ -327,6 +330,14 @@ namespace kagome::network {
std::chrono::duration_cast<std::chrono::milliseconds>(peer_ttl).count();

for (const auto &[peer_id, desc] : active_peers_) {
// Skip peer having immunity
// TODO(xDimon): it's validators now.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't leave such todos without link to the issue

Signed-off-by: Dmitriy Khaustov aka xDimon <khaustov.dm@gmail.com>
@xDimon xDimon requested a review from turuslan June 25, 2024 14:16
@xDimon xDimon enabled auto-merge (squash) June 25, 2024 14:21
@xDimon xDimon merged commit 1ef9521 into master Jun 25, 2024
12 of 14 checks passed
@xDimon xDimon deleted the feature/dont_disconnect_known_validators branch June 25, 2024 14:49
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.

3 participants