Skip to content

fix(qnt): distinguish may_probe from may_migrate#660

Draft
flub wants to merge 1 commit into
mainfrom
flub/remote-may-probe
Draft

fix(qnt): distinguish may_probe from may_migrate#660
flub wants to merge 1 commit into
mainfrom
flub/remote-may-probe

Conversation

@flub
Copy link
Copy Markdown
Collaborator

@flub flub commented May 19, 2026

Description

The QNT impl did re-use may_migrate to see on whether packets are allowed from a remote. But probing packets do not trigger migration and the two need to be treated separately.

Fixes #654.

Breaking Changes

n/a

Notes & open questions

This is an early draft, I need to properly sanity check. And server/client migration may be involved.

Change checklist

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

The QNT impl did re-use may_migrate to see on whether packets are
allowed from a remote. But probing packets do not trigger migration
and the two need to be treated separately.

Fixes #654.
@github-actions
Copy link
Copy Markdown

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

Last updated: 2026-05-19T12:53:17Z

@github-actions
Copy link
Copy Markdown

Performance Comparison Report

193bc1b8f8a421765bce3bda7e8b4430b0a78ae9 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5643.3 Mbps 7845.3 Mbps -28.1% 97.0% / 98.7%
medium-concurrent 5461.8 Mbps 7929.7 Mbps -31.1% 96.6% / 98.0%
medium-single 3740.1 Mbps 4719.6 Mbps -20.8% 96.2% / 98.5%
small-concurrent 3817.5 Mbps 5365.6 Mbps -28.9% 98.0% / 100.0%
small-single 3600.7 Mbps 4847.6 Mbps -25.7% 96.2% / 98.5%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3060.8 Mbps 4092.7 Mbps -25.2%
lan 782.4 Mbps 810.4 Mbps -3.5%
lossy 69.8 Mbps 69.8 Mbps ~0%
wan 83.8 Mbps 83.8 Mbps ~0%

Summary

noq is 26.6% slower on average

@n0bot n0bot Bot added this to iroh May 19, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh May 19, 2026
if let Some(hs) = self.state.as_handshake() {
hs.allow_server_migration
} else {
self.n0_nat_traversal.is_negotiated() && self.is_handshake_confirmed()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So I'd like to replace this line with false to fix the fact that clients aren't supposed to run migrate(), i.e. servers aren't allowed to migrate and we should not start doing the whole current and previous PathData dance in the client's PathState.

This would fix the slew of rare proptest failures we were generating in the last month (all of the ones that contain two PassiveMigrations): They were all exercising a case where both the client and server would migrate at the same time and then get stuck in a loop.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good. Does that mean this fix is independent of this PR? That would mean you don't have to wait on this getting ready enough.

Stanley00 pushed a commit to stanley-fork/noq that referenced this pull request May 21, 2026
…low probing (n0-computer#663)

## Description

Subsumes n0-computer#660 

Fixes n0-computer#654 

- Separates `peer_may_probe` from `peer_may_migrate` (taken from n0-computer#660 )
- Adds a test that failed before the above change was applied
- Makes `peer_may_migrate` return `false` for the client side to avoid
triggering migration probing on clients
- Adds a proptest regression we've observed a bunch of times that
reproduced the above issue but can't be fixed without also depending on
n0-computer#660 without breaking other tests.

## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.

---------

Co-authored-by: Floris Bruynooghe <flub@n0.computer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚑 Needs Triage

Development

Successfully merging this pull request may close these issues.

Off-path probes dropped pre-AEAD server-side when migration is forbidden

2 participants