fix: Do not send off-path data when closing#358
Merged
divagant-martian merged 4 commits intomainfrom Jan 26, 2026
Merged
Conversation
Collaborator
Author
|
Oops, accidentally wrote a monologue in the notes section. Changed back to draft to do the changes. |
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/quinn/pr/358/docs/iroh_quinn/ Last updated: 2026-01-26T15:58:36Z |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #358 +/- ##
==========================================
- Coverage 76.77% 76.77% -0.01%
==========================================
Files 81 81
Lines 22944 22945 +1
==========================================
Hits 17615 17615
- Misses 5329 5330 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Performance Comparison Report
|
| Scenario | iroh-quinn | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | N/A | 8137.2 Mbps | N/A | N/A |
| medium-concurrent | N/A | 7244.4 Mbps | N/A | N/A |
| medium-single | N/A | 4113.6 Mbps | N/A | N/A |
| small-concurrent | N/A | 4932.2 Mbps | N/A | N/A |
| small-single | N/A | 4161.6 Mbps | N/A | N/A |
6bdbd037c406b3d5a94c869f2ce8b63dee62523a - artifacts
Raw Benchmarks (localhost)
| Scenario | iroh-quinn | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5284.6 Mbps | 8075.0 Mbps | -34.6% | 95.9% / 117.0% |
| medium-concurrent | 5452.1 Mbps | 7340.2 Mbps | -25.7% | 95.8% / 114.0% |
| medium-single | 3882.2 Mbps | 3985.3 Mbps | -2.6% | 88.0% / 96.6% |
| small-concurrent | 3864.3 Mbps | 5028.2 Mbps | -23.1% | 93.0% / 101.0% |
| small-single | 3481.0 Mbps | 4223.5 Mbps | -17.6% | 87.5% / 96.5% |
Netsim Benchmarks (network simulation)
| Condition | iroh-quinn | upstream | Delta |
|---|---|---|---|
| ideal | 2686.4 Mbps | 3491.7 Mbps | -23.1% |
| lan | 768.5 Mbps | 796.4 Mbps | -3.5% |
| lossy | 69.8 Mbps | 55.9 Mbps | +25.0% |
| wan | 83.8 Mbps | 83.8 Mbps | ~0% |
Summary
iroh-quinn is 22.7% slower on average
d342bd05b6995fdc6040afa0aa7fa716e7c0ce1c - artifacts
Raw Benchmarks (localhost)
| Scenario | iroh-quinn | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5306.8 Mbps | 7699.9 Mbps | -31.1% | 98.1% / 182.0% |
| medium-concurrent | 5414.2 Mbps | 7178.0 Mbps | -24.6% | 92.7% / 99.0% |
| medium-single | 3709.2 Mbps | 4130.2 Mbps | -10.2% | 93.2% / 123.0% |
| small-concurrent | 3735.4 Mbps | 5019.9 Mbps | -25.6% | 97.7% / 128.0% |
| small-single | 3276.6 Mbps | 4288.4 Mbps | -23.6% | 89.1% / 97.0% |
Netsim Benchmarks (network simulation)
| Condition | iroh-quinn | upstream | Delta |
|---|---|---|---|
| ideal | 3016.7 Mbps | 3826.9 Mbps | -21.2% |
| lan | 782.4 Mbps | 806.3 Mbps | -3.0% |
| lossy | 69.9 Mbps | 69.4 Mbps | ~0% |
| wan | 83.8 Mbps | 83.8 Mbps | ~0% |
Summary
iroh-quinn is 23.3% slower on average
80af1506d01974b41174d788113ea2fa70a80ac2 - artifacts
Raw Benchmarks (localhost)
| Scenario | iroh-quinn | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5349.1 Mbps | 8150.8 Mbps | -34.4% | 92.4% / 97.1% |
| medium-concurrent | 5454.9 Mbps | 7922.5 Mbps | -31.1% | 96.5% / 118.0% |
| medium-single | 4269.6 Mbps | 4577.7 Mbps | -6.7% | 96.2% / 116.0% |
| small-concurrent | 3881.8 Mbps | 5128.5 Mbps | -24.3% | 94.5% / 119.0% |
| small-single | 3414.6 Mbps | 4774.6 Mbps | -28.5% | 92.9% / 120.0% |
Netsim Benchmarks (network simulation)
| Condition | iroh-quinn | upstream | Delta |
|---|---|---|---|
| ideal | 2849.0 Mbps | 3631.6 Mbps | -21.5% |
| lan | 771.4 Mbps | 796.4 Mbps | -3.1% |
| lossy | 69.8 Mbps | 55.9 Mbps | +25.0% |
| wan | 83.8 Mbps | 83.8 Mbps | ~0% |
Summary
iroh-quinn is 25.6% slower on average
a14cfaca6180ff09946ad96c8df6d61b3b04d8ba - artifacts
Raw Benchmarks (localhost)
| Scenario | iroh-quinn | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5300.7 Mbps | 7676.1 Mbps | -30.9% | 91.0% / 96.8% |
| medium-concurrent | 5446.7 Mbps | 7623.9 Mbps | -28.6% | 95.2% / 109.0% |
| medium-single | 3911.4 Mbps | 4463.2 Mbps | -12.4% | 93.8% / 109.0% |
| small-concurrent | 3715.8 Mbps | 5039.6 Mbps | -26.3% | 96.7% / 112.0% |
| small-single | 3276.2 Mbps | 4407.5 Mbps | -25.7% | 93.2% / 110.0% |
Netsim Benchmarks (network simulation)
| Condition | iroh-quinn | upstream | Delta |
|---|---|---|---|
| ideal | 2890.9 Mbps | 3966.3 Mbps | -27.1% |
| lan | 782.5 Mbps | 810.4 Mbps | -3.4% |
| lossy | 69.8 Mbps | 69.8 Mbps | ~0% |
| wan | 83.8 Mbps | 83.8 Mbps | ~0% |
Summary
iroh-quinn is 25.4% slower on average
divagant-martian
requested changes
Jan 23, 2026
Collaborator
divagant-martian
left a comment
There was a problem hiding this comment.
Has side effects!
matheus23
approved these changes
Jan 26, 2026
When we are closing we're only supposed to send packets containing CONNECTION_CLOSE and (PATH_)ACK frames. There is no need to continue sending any off-path data.
Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
80af150 to
a14cfac
Compare
divagant-martian
approved these changes
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When we are closing we're only supposed to send packets containing
CONNECTION_CLOSE and (PATH_)ACK frames. There is no need to continue
sending any off-path data.
We do have the option of sending a CONNECTION_CLOSE to the new
remote if we get an involuntary migration during close. But we'd
have to make sure not to exceed the anti-amplification limit
since we can no longer validate the path.
We are also allowed to simply discard packets from a migrated
peer during the closing state. Which is what we do.
Breaking Changes
n/a
Notes & open questions
Closes #357
Note that the base is #338. I won't merge before that is merged so
it shows up as a separate commit because this was a pre-existing
bug.