Skip to content

Conversation

lexnv
Copy link
Collaborator

@lexnv lexnv commented Jul 3, 2025

This PR adds a new AddressStoreBuckets to hold the addresses of a kademlia peer.

The new structure contains 3 buckets:

  • successfully dialed addresses
  • not yet dialed addresses
  • addresses that failed to dial

This has the main benefit of not sorting addresses by score while returning the peer addresses, which is a frequent operation needed to respond to FIND_NODE queries. The assumption is that the new address store, designed specifically for Kademlia, will improve CPU usage by roughly 5-7%.

Next steps

Before reviewing this PR need to go through:

  • versi net testing
  • deployed on kusama validator to validate perf assumption
  • if performance looks promising consider switching transport manager as well

Closes: #408

@lexnv lexnv self-assigned this Jul 3, 2025
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.

AddressStore: Improve the efficiency of the address store
1 participant