* Use ArrayRangeSet in SendBuffer
* Implement replace for ArrayRangeSet
* Remove RangeSet
* WIP
* Remove complex op from ArrayRangeSet that is used nowhere
also remove some stray println! from some tests
* Shut up clippy
* fmt
* Replace replace with an iterator and insert.
iter_range does a linear scan, but so do all other ArrayRangeSet ops.
binary search only becomes worth it when it becomes very large. For typical
sizes linear scan is perfectly fine!
* fmt
* Put back the former println! statements as info!
* Remove common_set_tests macro
we only have one range set now!
* Add proptests for assembler
Also fix a bug in the assembler when going to unordered state after reading
data, and add a regression test for that case.
* Increase ops before we switch to unordered
Otherwise this test mostly tests unordered mode!
* Update quinn-proto/src/connection/assembler.rs
Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
* Add defragment to the prop test ops
only to be used when in ordered mode for some reason 🤷
* fmt
---------
Co-authored-by: Philipp Krüger <philipp.krueger1@gmail.com>
This improves the condition of when the RTT learned from a
PATH_RESPONSE can be used. The easiest way to achieve this correctly
is by embedding the logic in the RttEstimator itself.
According to https://www.rfc-editor.org/rfc/rfc9002#section-6.2.2-2:
A connection MAY use the delay between sending a PATH_CHALLENGE and
receiving a PATH_RESPONSE to set the initial RTT (see kInitialRtt
in Appendix A.2) for a new path, but the delay SHOULD NOT be
considered an RTT sample.
Before we used this as a normal sample, this fixes this to only use it
as the initial RTT.
This is a bug that did sneak in with the introduction of the
PathBlocked enum. If a PacketNumberSpace is blocked for any
reason (anti-amplification, congestion or pacing), we still need to be
able to send tail-loss probes on higher PacketNumberSpaces. Otherwise
those spaces could end up in a deadlock too.
* 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
* Enable qlog for proptests
* Panic with debug assertions when we end up accessing old PNSes
* Add generated regression test `regression_packet_number_space_missing`
* Fix accessing packet number space of paths that have been forgotten
* Always panic in `for_path`, even if we're not in debug_assertions
* 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
* Take semver-compatible dependency updates
* proto: use new constructor where possible
* proto: drop unused From impl
* quinn: import more types
* quinn: remove indirection in connection initialization
---------
Co-authored-by: Dirkjan Ochtman <dirkjan@ochtman.nl>
* chore: add more Debug derives
* fix: do not unconditionally use path 0 in APIs
* fix(quinn): reexport PathId
* fixup: debug for controllermetrics
* cleanup and remove `network_path_changed` api
* fix: do not use Instant::now in proto tests
Proto tests using the Pair driver should not use Instant::now() for
API calls. The Pair keeps track of time itself, and advances time
faster than real time. So time can be ahead of real time. API calls
that need a "now" should take the time from the Pair::time field.
* remove unused import
* Also fixup the non-multipath tests
* fix(proto): send path acks only in 1RTT space
Closes https://github.com/n0-computer/iroh/issues/3727
* check for multipath frames being on incoming
* fixup format
* fixup: undo filters
* expand frame checks
* expand check to also restrict QAD frames
* fix: run MTU discovery on all paths
This ensures that MTU discovery is run on all open, validated paths
and not-abandoned paths.
Fixes#3526.
* spelling
* describe the conditions in text
* clearly differentiate client and server states
This makes reasoning much easier since only the required fields are
present in the corresponding side state. It also reduces state size, now
it's 112 bytes, before it was 160 bytes
* apply clippy fixes
* fmt
* fix: disable GSO on windows if failures happen
Unfortunately this is not feature gated, so had the risk of tanking
performance on windows. Though it should not normally happen.
* make this state exist
* love running compiler on ci
* params
* imports
* param
* and slowly doing everything arqu did...
* adjust the test