Skip to content

test(proto): Never allow constructing empty packets#451

Draft
matheus23 wants to merge 2 commits intomainfrom
matheus23/no-empty-packets
Draft

test(proto): Never allow constructing empty packets#451
matheus23 wants to merge 2 commits intomainfrom
matheus23/no-empty-packets

Conversation

@matheus23
Copy link
Member

@matheus23 matheus23 commented Feb 23, 2026

Description

Adds a debug_assert! that checks for the case in #176

This allows us to generate minimal proptest failures (and other test failures) for when this happens.

This happens all the time.

Notes & open questions

This PR doesn't fix this problem yet. Just adds a test case. Thus draft.

There might be a better/easer/more correct way to check this than what I'm doing here with checking SentPackets, and instead somehow look at whether bytes were written to PacketBuilder::buf, but I admit I don't understand what's going on with the buffer and all the offsets enough to make the correct check for this possible.

@matheus23 matheus23 self-assigned this Feb 23, 2026
@github-actions
Copy link

github-actions bot commented Feb 23, 2026

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

Last updated: 2026-03-04T08:36:21Z

@github-actions
Copy link

github-actions bot commented Feb 23, 2026

Performance Comparison Report

feeff55c54e1838f99ace8c10bcb3fb0c22e3de8 - artifacts

Raw Benchmarks (localhost)

Scenario iroh-quinn upstream Delta CPU (avg/max)
large-single 5939.5 Mbps 7911.8 Mbps -24.9% 97.4% / 99.0%
medium-concurrent 5591.9 Mbps 7126.0 Mbps -21.5% 96.2% / 98.0%
medium-single 3876.9 Mbps 4189.1 Mbps -7.5% 95.8% / 98.3%
small-concurrent 3702.4 Mbps 5110.9 Mbps -27.6% 95.6% / 98.1%
small-single 3575.7 Mbps 4402.5 Mbps -18.8% 96.1% / 98.5%

Netsim Benchmarks (network simulation)

Condition iroh-quinn upstream Delta
ideal 2964.6 Mbps 4052.5 Mbps -26.8%
lan 782.4 Mbps 810.4 Mbps -3.4%
lossy 69.8 Mbps 69.9 Mbps ~0%
wan 83.8 Mbps 83.8 Mbps ~0%

Summary

iroh-quinn is 21.2% slower on average

---
717471daff3e14d82788d78bbd7506ac0e6c498a - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5443.9 Mbps 8193.1 Mbps -33.6% 93.5% / 98.2%
medium-concurrent 5465.5 Mbps 7678.5 Mbps -28.8% 93.7% / 100.0%
medium-single 3586.7 Mbps 4790.4 Mbps -25.1% 99.6% / 186.0%
small-concurrent 3854.8 Mbps 4982.0 Mbps -22.6% 97.0% / 127.0%
small-single 3567.0 Mbps 4861.3 Mbps -26.6% 86.0% / 95.7%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 2921.6 Mbps 4022.9 Mbps -27.4%
lan 782.4 Mbps 810.4 Mbps -3.5%
lossy 55.9 Mbps 55.9 Mbps ~0%
wan 83.8 Mbps 83.8 Mbps ~0%

Summary

noq is 27.4% slower on average

@n0bot n0bot bot added this to iroh Feb 23, 2026
@github-project-automation github-project-automation bot moved this to 🚑 Needs Triage in iroh Feb 23, 2026
@matheus23 matheus23 added this to the quinn: iroh 1.0 RC milestone Feb 24, 2026
@dignifiedquire dignifiedquire moved this from 🚑 Needs Triage to 🏗 In progress in iroh Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

1 participant