refactor(proto): Introduce CanonicalIpPort to fix IP canonicalization issues#629
Merged
Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/629/docs/noq/ Last updated: 2026-04-30T12:39:59Z |
Performance Comparison Report
|
| Scenario | noq | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5981.6 Mbps | 7948.6 Mbps | -24.7% | 95.3% / 101.0% |
| medium-concurrent | 5460.6 Mbps | 7918.4 Mbps | -31.0% | 94.4% / 101.0% |
| medium-single | 4489.7 Mbps | 4749.2 Mbps | -5.5% | 96.6% / 150.0% |
| small-concurrent | 3919.5 Mbps | 5310.5 Mbps | -26.2% | 99.6% / 152.0% |
| small-single | 3556.2 Mbps | 4771.9 Mbps | -25.5% | 93.5% / 101.0% |
Netsim Benchmarks (network simulation)
| Condition | noq | upstream | Delta |
|---|---|---|---|
| ideal | 3061.7 Mbps | 4046.4 Mbps | -24.3% |
| lan | 782.4 Mbps | 818.2 Mbps | -4.4% |
| lossy | 69.9 Mbps | 69.9 Mbps | ~0% |
| wan | 83.8 Mbps | 83.8 Mbps | ~0% |
Summary
noq is 23.3% slower on average
f001f5ed8902b4d233a639b72189e373f71f0e76 - artifacts
Raw Benchmarks (localhost)
| Scenario | noq | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5666.7 Mbps | 7990.5 Mbps | -29.1% | 95.9% / 100.0% |
| medium-concurrent | 5434.1 Mbps | 7724.3 Mbps | -29.6% | 95.0% / 147.0% |
| medium-single | 3946.0 Mbps | 4733.1 Mbps | -16.6% | 99.4% / 150.0% |
| small-concurrent | 3929.8 Mbps | 5197.6 Mbps | -24.4% | 92.9% / 101.0% |
| small-single | 3586.3 Mbps | 4730.3 Mbps | -24.2% | 93.8% / 100.0% |
Netsim Benchmarks (network simulation)
| Condition | noq | upstream | Delta |
|---|---|---|---|
| ideal | 3100.6 Mbps | N/A | N/A |
| lan | 782.5 Mbps | N/A | N/A |
| lossy | 69.8 Mbps | N/A | N/A |
| wan | 83.8 Mbps | N/A | N/A |
Summary
noq is 25.7% slower on average
flub
approved these changes
Apr 30, 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
CanonicalIpPortwrapper aroundIpPortthat makes sureIpAddr::to_canonicalis called.check_remote_addressso it compares the canonical address instead of mixing the compared types.next_probe_addrreturn anIpPortandmark_probe_senttake anIpPortto save needless conversions.Notes & open questions
This should unblock n0-computer/iroh#4213 and seems to fix the test problems with ipv4-only hosts.
Change checklist