Skip to content

Conversation

@turuslan
Copy link
Contributor

@turuslan turuslan commented Sep 9, 2024

  • fix priority_queue order was reversed
  • evict disconnected peers
  • fix didn't select enough peers from buckets
  • reverse bucket indices
  • remove lazy bucket allocation, last bucket held different peers

Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan requested a review from xDimon September 9, 2024 07:47
@kamilsa kamilsa requested a review from igor-egorov September 19, 2024 05:05
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan requested a review from xDimon September 25, 2024 04:33
Signed-off-by: turuslan <turuslan.devbox@gmail.com>

peer_ids = peer_routing_table_->getNearestPeers(
NodeId(msg.key), config_.closerPeerCount * 2);
NodeId::hash(msg.key), config_.closerPeerCount * 2);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
NodeId::hash(msg.key), config_.closerPeerCount * 2);
NodeId::hash(msg.key), std::max(config_.closerPeerCount * 2, config_.query_initial_peers));

Not a change request, only a suggestion if this could be considered as a reasonable edit

Copy link
Member

Choose a reason for hiding this comment

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

If so, the change could be applied here and forth

@turuslan turuslan merged commit 55a46f3 into master Sep 26, 2024
4 checks passed
@turuslan turuslan deleted the fix/kad branch September 26, 2024 08:27
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.

4 participants