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

feat(networking): dont add bootstrap ndoes as relay candidates #1862

Merged
merged 1 commit into from
Jun 9, 2024

Conversation

joshuef
Copy link
Contributor

@joshuef joshuef commented Jun 9, 2024

This should more evenly spread the load of bootstrap peering.


This pull request primarily focuses on updating the logic in the SwarmDriver implementation and modifying constants in the relay_manager.rs file. The key changes include a new condition to prevent bootstrap peers from being used as relay candidates and an adjustment to the maximum concurrent relay connections and potential candidates.

Key changes:

  • sn_networking/src/event/swarm.rs: A new condition has been added to the SwarmDriver implementation to check if a peer is a bootstrap peer. Bootstrap peers will no longer be used as potential relay candidates. This change aims to improve the relay selection process by excluding peers that are already serving a critical role in the network.

Constants adjustment:

  • sn_networking/src/relay_manager.rs: The constants MAX_CONCURRENT_RELAY_CONNECTIONS and MAX_POTENTIAL_CANDIDATES have been modified. The maximum concurrent relay connections have been reduced from 3 to 2, while the maximum potential candidates have been increased from 15 to 1000. This change could potentially enhance the efficiency of the relay selection process by exploring a larger pool of candidates while limiting the number of active connections.

Increase the potential pool of candidates
@joshuef joshuef merged commit f5475df into maidsafe:main Jun 9, 2024
39 checks passed
@joshuef joshuef deleted the ReduceRelayBurdenOnBootstraps branch June 9, 2024 21:10
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.

1 participant