## Description
Now depends on #590 merging first so the added test coverage actually
passes.
This replaces three different proptest functions (`random_interaction`,
`random_interaction_with_multipath_simple_routing` and
`random_interaction_with_multipath_complex_routing`) with a single
`random_interaction` function with a `PairSetup` proptest parameter that
effectively generates the different proptest cases these functions
generate (and more!).
This also:
- fixes a bug where we were never generating a transport config that
would allow testing any QNT operations ever
- fixes a bug in the `Arbitrary` impl for `ArrayRangeSet` that required
filtering out empty `ArrayRangeSet`s after the fact instead of
generating them without them possibly being empty in the first place
- improves the cargo-make scripts to enable optimizations for
longer-running proptests, reducing runtime together with compliation
time overall
## 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.
## Description
This moves the FrameStats into the PathStats, allowing us to check
what frames where sent on which paths. It then makes the
ConnectionStats always be computed to be the sum of all the PathStats.
This has as a nice side effect that some stats no longer need to be
recorded twice. Which was also error-prone.
The PathStats are now boxed in the PathEvent because that variant was
now way bigger than any of the other variants.
It also fixes a few missed fields in the stats code and uses more
defensive code so that won't happen again.
## Breaking Changes
Probably none? I'm only adding some fields to PathStats on the public
API, while the fields on ConnectionStats remain the same.
## Notes & open questions
I need this to be able to write tests that assert frames on specific
paths. But I also think that generally this makes more sense. The
previous version of the stats was thrown together without much thought
I think (by me).
I've cleaned up some cargo.toml mistakes that accumulated by using
tooling that doesn't follow the sorting/and locations of where things
live.
## Description
This updates noq and its dependencies to rand 0.10 and getrandom 0.4.
## Breaking Changes
I don't think there are any of rand's APIs exposed in noq or noq-proto.
So no breaking changes.
## Notes & open questions
~~Blocked on https://github.com/tomtomwombat/fastbloom/pull/27 being
released.~~ We can disable the rand feature for fastbloom instead.
`proptest` still depends on rand 0.9:
```
$ cargo tree -i rand@0.9
rand v0.9.2
└── proptest v1.9.0
[dev-dependencies]
└── noq-proto v0.16.0 (/home/philipp/program/work/noq/noq-proto)
├── noq v0.17.0 (/home/philipp/program/work/noq/noq)
│ ├── bench v0.2.0 (/home/philipp/program/work/noq/bench)
│ └── perf v0.2.0 (/home/philipp/program/work/noq/perf)
└── perf v0.2.0 (/home/philipp/program/work/noq/perf)
```
But it's only a dev-dependency, so won't get pulled in for people
depending on noq.
* Switch to `aes-gcm` crate for retry token logic when using rustls
* Split `rustls-ring` and `rustls-aws-lc-rs` features into `rustls`, `ring` and `aws-lc-rs` features.
* Better document the features.
* `cargo make format`
* Fix outdated feature references
* Avoid double-defining `configured_provider`
* File an issue about suddenly working PQC handshakes now breaking a test
* Fix rebase
* Only enable `aes-gcm` dependency when needed
* Add features for backwards compatibility
* Add some links to the spec's retry packet integrity section
* fix(quinn-udp): disable IP_PKTINFO under Wine
Wine's IP_PKTINFO implementation maps Linux's ipi_addr (the IP header
destination address) to Windows' IN_PKTINFO.ipi_addr. On multi-homed hosts,
ipi_addr and ipi_spec_dst (the local address) can differ, causing QUIC to
discard packets with 'sent to incorrect interface'.
This commit:
- Detects Wine at runtime via ntdll.dll's wine_get_version export
- Disables pktinfo when running under Wine (both send and recv paths)
- Exports is_wine() from the crate for use by downstream tests
- Skips the local_ip assertion in echo tests under Wine
- Upgrades windows-sys to 0.61
See:
- Wine's convert_control_headers(): https://github.com/wine-mirror/wine/blob/master/dlls/ntdll/unix/socket.c
- Linux in_pktinfo fields: https://man7.org/linux/man-pages/man7/ip.7.html
- Windows IN_PKTINFO: https://learn.microsoft.com/en-us/windows/win32/api/ws2ipdef/ns-ws2ipdef-in_pktinfo
* apply CR
* fixup
* cleanup
* Add proptests for encode/decode
* Add proptest arbitrary for VarInt and StreamId
Also fix the StreamId arbitrary::Arbitrary generation
* Add proptest arbitraries for various quinn-proto types and make use of them in the random interaction test
* Add more arbitraries.
* Remove unneeded derives
* Use MaybeFrame arb
* fmt
* Use cfg(test) for the arbitraries.
Also move the encode_decode tests into a separate file.
* Add more cases to TestFrame
* Get rid of the last remaining record enum cases.
* More arbitraries. Now almost every frame type is roundrrip tested.
* remove dead code
* clippy
* Add proptest and test-strategy even in wasm
(we don't *run* proptests, but need them to compile)
* Use a feature flag after all...
going in circles...
* Remove claude settings and DRY the proptest attribute.
* Revert "Use a feature flag after all..."
This reverts commit b27add632b.
* Try to get proptest to work in wasm after all
It doesn't need to run tests, just compile.
* Use the right hmac import
* sort dev deps
* Remove some feature flag gated imports
they are not worth it in terms of DRY
* Use test_strategy::Arbitrary by default in frame. It gets used way more often.
* refactor: Update to rust edition 2025
* bump to 1.88
That's what I need for let chains.
* i asked for let chain, clippy looooooves the let chains!
* more let chains in the workspace
* fix: Don't allow sending path status frames on non-multipath connections
* fix: Ignore PATH_ACKs on abandoned paths
* test: Implement a quinn-proto multipath proptest & add regression tests
* Restructure proptests, fix "invalid key" access in test endpoints
* Turn of MTUD
* Add another regression test
* fix: Correctly check `space.rx_packet` in key updates
Also refactor `PacketNumberSpace::rx_packet` to be an `Option<u64>` instead of `u64`.
* Smaller test case
* fix accepting packets from other remotes.
* Increase the iterations in `drive_bounded`
* Remove proptests itself
* Cargo.lock update fix after merge
* fix imports
* fix merge
* self-review
* cfg-gate proptests
* Implement `RoutingTable` instead of `multipath_addrs`
* Keep connection handles around, but don't use them when drained
* Fix all tests
* Reintroduce proptests
* Move random interaction running tests into submodule
* Implement more complex route table generation
* Prefer `Self::`
* refactor: Prefer not duplicating quinn-proto types
* Don't track `path_ids` in `State`, but fetch them from `Connection`
* Extract out `TestOp::run`
* Reorder things
* Add close operation
* Properly use short-circuiting
* Add holepunching APIs to proptests
* Revert accidental changes
* Return the `ConnectionError` from `Connection::handle_event`
* Revert "Return the `ConnectionError` from `Connection::handle_event`"
This reverts commit 713e17465f.
* Check `Connection::state` in proptests instead of adding a panic_on_transport_error config
* Properly check for transport errors
* `cargo fmt`
* Cfg out `random_interaction` module in Wasm
* format
* Cleanup, fix all clippy issues
* Code review
* WIP add new packet buffer
* Use git dep
* Use PacketBuf for lost_packets as well
* Use published sorted_index_buffer
* fmt
* Get rid of MSRV warning
* fix dependency sort order
TokenMemoryCache is a new implementation of TokenStore.
TokenMemoryCache is designed to store up to 2 tokens per server (this is
configurable) for up to 256 servers (this is also configurable), with a
LRU eviction policy. This is so that it works harmoniously with
rustls::ClientSessionMemoryCache, which by default stores resumption
state for up to 256 servers with a LRU eviction policy.