Skip to content

Conversation

dignifiedquire
Copy link
Contributor

@dignifiedquire dignifiedquire commented Oct 9, 2025

Description

Closes #3471

Breaking Changes

  • added
    • iroh::Endpoint::insert_relay
    • iroh::Endpoint::remove_relay
    • iroh::Endpoint::RelayMap::insert
    • iroh::Endpoint::RelayMap::remove
  • changed
    • iroh_relay::RelayMap::urls
    • iroh_relay::RelayMap::nodes
    • iroh_relay::RelayMap::get_node

Notes & open questions

  • Are the changes to the API of RelayMap acceptable?
  • Is this enough?

Copy link

github-actions bot commented Oct 9, 2025

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

Last updated: 2025-10-14T15:21:39Z

Copy link

github-actions bot commented Oct 9, 2025

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: ebe1453

@n0bot n0bot bot added this to iroh Oct 9, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Oct 9, 2025
Copy link
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

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

I guess this is fairly reasonable. Can't see anything wrong with it right away.

self.nodes.keys()
pub fn urls<T>(&self) -> T
where
T: FromIterator<RelayUrl>,
Copy link
Contributor

Choose a reason for hiding this comment

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

that's... fancy

And maybe a little unfortunate as we're now forcing an allocation. But I guess this is needed because the the inner lock.

}

fn handle_relay_map_change(&mut self) {
self.re_stun(UpdateReason::RelayMapChange);
Copy link
Contributor

Choose a reason for hiding this comment

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

this is like the only thing that is needed, and the test just works? I'm both impressed and surprised!

@dignifiedquire dignifiedquire added this to the v0.94 milestone Oct 10, 2025
@dignifiedquire dignifiedquire force-pushed the feat-dynamic-relay-map branch 2 times, most recently from 6aa6834 to 1dd5391 Compare October 14, 2025 08:55
Copy link
Collaborator

@Arqu Arqu left a comment

Choose a reason for hiding this comment

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

LGTM codewise

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.

feat: ability to dynamically modify an endpoint RelayMap

3 participants