Skip to content

Conversation

@dignifiedquire
Copy link
Contributor

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

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

Last updated: 2025-12-17T16:49:52Z

@n0bot n0bot bot added this to iroh Dec 17, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Dec 17, 2025
Comment on lines +724 to +727
transports::Addr::Relay(url, _id) => {
// Relay case, grab the latency from net_report
relay_latencies.as_ref().and_then(|l| l.get(&url))
}
Copy link
Member

@matheus23 matheus23 Dec 18, 2025

Choose a reason for hiding this comment

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

The relay latency is not the same thing as the RTT to the peer via the relay, because that depends on the (potentially two!) relays involved in going back and forth.

Besides, I don't think we need an RTT hint for any relay addresses, because they will/should never be used in holepunching.

Comment on lines +729 to +732
// IP case, grab the worst latency we currently have
all_rtts
.get(&addr)
.and_then(|rtts| rtts.iter().max().copied())
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be .min(Duration::from_millis(333)) additionally, just so we don't accidentally balloon the PTO in case there was some kind of weird bad RTT in our IP paths.

Copy link
Member

Choose a reason for hiding this comment

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

Also, IIUC, this won't help broken paths, right? You only have a single connection in the RemoteState, and the remote address that doesn't work for holepunching won't have an RTT estimate. So you're back to having a 333ms initial RTT estimate for remote addresses that don't work. Am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the probes will timeout faster for broken paths, that’s the whole point of this PR

Copy link
Member

Choose a reason for hiding this comment

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

But... the way the code is written, I don't see how that's going to be the case?

@flub flub added this to the iroh: v1.0.0-rc.0 milestone Dec 22, 2025
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.

4 participants