Skip to content

fix: Do not send off-path data when closing#358

Merged
divagant-martian merged 4 commits intomainfrom
flub/poll-transmit-off-path-close
Jan 26, 2026
Merged

fix: Do not send off-path data when closing#358
divagant-martian merged 4 commits intomainfrom
flub/poll-transmit-off-path-close

Conversation

@flub
Copy link
Copy Markdown
Collaborator

@flub flub commented Jan 22, 2026

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.

@flub flub marked this pull request as draft January 22, 2026 13:03
@flub
Copy link
Copy Markdown
Collaborator Author

flub commented Jan 22, 2026

Oops, accidentally wrote a monologue in the notes section. Changed back to draft to do the changes.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 22, 2026

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-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.77%. Comparing base (c38be74) to head (a14cfac).

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.
📢 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.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 22, 2026

Performance Comparison Report

16f81f9534b36617e82f353d75096b218321cb1f - artifacts

Raw Benchmarks (localhost)

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

@n0bot n0bot bot added this to iroh Jan 22, 2026
@github-project-automation github-project-automation bot moved this to 🚑 Needs Triage in iroh Jan 22, 2026
@flub flub marked this pull request as ready for review January 22, 2026 17:20
@flub flub moved this from 🚑 Needs Triage to 👀 In review in iroh Jan 22, 2026
@flub flub requested a review from a team January 22, 2026 17:21
@flub flub added this to the quinn: iroh v0.96 milestone Jan 22, 2026
@flub flub linked an issue Jan 23, 2026 that may be closed by this pull request
@flub flub self-assigned this Jan 23, 2026
Copy link
Copy Markdown
Collaborator

@divagant-martian divagant-martian left a comment

Choose a reason for hiding this comment

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

Has side effects!

@github-project-automation github-project-automation bot moved this from 👀 In review to 🏗 In progress in iroh Jan 23, 2026
@flub flub moved this from 🏗 In progress to 👀 In review in iroh Jan 26, 2026
@flub flub requested a review from divagant-martian January 26, 2026 11:59
Base automatically changed from flub/poll-transmit-ohno to main January 26, 2026 15:42
flub and others added 4 commits January 26, 2026 10:55
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>
@divagant-martian divagant-martian force-pushed the flub/poll-transmit-off-path-close branch from 80af150 to a14cfac Compare January 26, 2026 15:56
@divagant-martian divagant-martian added this pull request to the merge queue Jan 26, 2026
Merged via the queue into main with commit aa6c373 Jan 26, 2026
34 checks passed
@divagant-martian divagant-martian deleted the flub/poll-transmit-off-path-close branch January 26, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Sending CONNECTION_CLOSE frames

4 participants