Skip to content

Conversation

@dignifiedquire
Copy link
Collaborator

No description provided.

@github-actions
Copy link

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

Last updated: 2025-12-17T16:38:43Z

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 54.54545% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.65%. Comparing base (4dcb3a7) to head (46c9205).

Files with missing lines Patch % Lines
quinn/src/connection.rs 30.43% 16 Missing ⚠️
quinn-proto/src/connection/mod.rs 75.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #278      +/-   ##
==========================================
- Coverage   76.69%   76.65%   -0.04%     
==========================================
  Files          83       83              
  Lines       23241    23271      +30     
==========================================
+ Hits        17824    17838      +14     
- Misses       5417     5433      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@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 +857 to +864
let pto = match rtt_hint {
Some(rtt_hint) => rtt_hint,
None => {
// Fallback to the pessimistic calculation
// TODO: we could consider using known PTOs in this case
self.ack_frequency.max_ack_delay_for_pto() + data.rtt.pto_base()
}
};
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.

Suggested change
let pto = match rtt_hint {
Some(rtt_hint) => rtt_hint,
None => {
// Fallback to the pessimistic calculation
// TODO: we could consider using known PTOs in this case
self.ack_frequency.max_ack_delay_for_pto() + data.rtt.pto_base()
}
};
if let Some(rtt_hint) = rtt_hint {
data.rtt = RttEstimator::new(rtt_hint);
}
let pto = self.ack_frequency.max_ack_delay_for_pto() + data.rtt.pto_base();

That seems more correct to me...
We don't want to only change the PathOpen timer, we also want to change the time at which we resend path challenges, and change when we consider packets lost, etc.
Also, the PTO would actually be a different value in this case, because we make assumptions about variance, and add the max ACK delay. It surprises me that all of that would be skipped in your version.

Comment on lines +6275 to +6282
pub fn initiate_nat_traversal_round<F>(
&mut self,
now: Instant,
) -> Result<Vec<SocketAddr>, iroh_hp::Error> {
rtt_hints: F,
) -> Result<Vec<SocketAddr>, iroh_hp::Error>
where
F: Fn(&SocketAddr) -> Option<Duration>,
{
Copy link
Member

Choose a reason for hiding this comment

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

This gives you a lot of control in theory. But I'd have preferred to keep it simple with only a single RTT hint for all probes. This RTT would then be set to the worst RTT you expect to get. E.g. when we haven't hole-punched an IP path yet, then this should be set to the relay path's RTT, and if we have some IP paths already, then this should be set to the worst IP path's RTT.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

a single value seems bad imho, making it a lot less useful, as we might be using multiple transports between different probes

@flub flub added holepunching multipath Related to the QUIC Multipath extension. and removed holepunching labels Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

multipath Related to the QUIC Multipath extension.

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

5 participants