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

refactor(iroh-net): Optimise present nodes in ActiveRelay #2781

Open
wants to merge 1 commit into
base: flub/relay-client-cleanup-1
Choose a base branch
from

Conversation

flub
Copy link
Contributor

@flub flub commented Oct 3, 2024

Description

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.

Breaking Changes

Still none if all is well.

Notes & open questions

This targets #2779 as base.

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • [ ] Tests if relevant.
  • [ ] All breaking changes documented.

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.
@flub flub requested a review from ramfox October 3, 2024 12:00
Copy link

github-actions bot commented Oct 3, 2024

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2781/docs/iroh/

Last updated: 2024-10-03T12:02:30Z

Copy link

github-actions bot commented Oct 3, 2024

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: c0c2416

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

1 participant