-
Notifications
You must be signed in to change notification settings - Fork 163
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
refactor(iroh-net): Optimise present nodes in ActiveRelay #2781
Merged
Commits on Oct 3, 2024
-
refactor(iroh-net): Keep connection name, remove connection count
These are two cleanups in the relay client: - The `relay::Client` hands out a connection object when asked to connect. This `Conn` was imported with rename to `RelayClient` which was a bit confusing as this was already the relay client. It is now renamed to `RelayConn` which makes a lot more sense. The related builder struct etc are renamed to match. - The `relay::Client` had a counter for the number of connections made to the relay. That seems fun, but was entirely unused. If this is a useful thing to have it should probably be a counter metric instead but let's not add anything that no one is using. Removing this makes a lot of APIs a bit simpler and removes some state tracking.
Configuration menu - View commit details
-
Copy full SHA for 544b933 - Browse repository at this point
Copy the full SHA 544b933View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1ea4b2 - Browse repository at this point
Copy the full SHA b1ea4b2View commit details -
Apply suggestions from code review
Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 62c7421 - Browse repository at this point
Copy the full SHA 62c7421View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60ebe40 - Browse repository at this point
Copy the full SHA 60ebe40View commit details -
Configuration menu - View commit details
-
Copy full SHA for b38cf2f - Browse repository at this point
Copy the full SHA b38cf2fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a22c2d3 - Browse repository at this point
Copy the full SHA a22c2d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b344622 - Browse repository at this point
Copy the full SHA b344622View commit details -
refactor(iroh-net): Optimise present nodes in ActiveRelay
The ActiveRelay actor keeps track of which remote nodes are present on the relay connection so that we can optimise relay connections to remote nodes. This does two main optimisations: - There were two sets of these nodes kept, they could easily be unified. - The set is best stored in a BTreeSet since they are simple NodeIds stored in them. - Bonus: rename peer to node to match our naming convention. - Bonus: identify nodes by NodeId since this is a routing key here.
Configuration menu - View commit details
-
Copy full SHA for 4c6e223 - Browse repository at this point
Copy the full SHA 4c6e223View commit details -
Apply suggestions from code review
Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 275b399 - Browse repository at this point
Copy the full SHA 275b399View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.