Skip to content

Add multipath #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 321 commits into
base: iroh-0.11.x
Choose a base branch
from
Draft

Add multipath #28

wants to merge 321 commits into from

Conversation

flub
Copy link
Collaborator

@flub flub commented Jan 15, 2025

No description provided.

@flub flub changed the title Add multipath to Quinn Add multipath Jan 15, 2025
gretchenfrage and others added 24 commits January 26, 2025 18:40
When a client receives a token from a NEW_TOKEN frame, it submits it to
a TokenStore object for storage. When an endpoint connects to a server,
it queries the TokenStore object for a token applicable to the server
name, and uses it if one is retrieved.

As of this commit, the only provided implementation of TokenStore is
NoneTokenStore, which is equivalent to the lack of a token store, and is
the default.
When we first added tests::util::IncomingConnectionBehavior, we opted to
use an enum instead of a callback because it seemed cleaner. However,
the number of variants have grown, and adding integration tests for
validation tokens from NEW_TOKEN frames threatens to make this logic
even more complicated. Moreover, there is another advantage to callbacks
we have not been exploiting: a stateful FnMut can assert that incoming
connection handling within a test follows a certain expected sequence
of Incoming properties.

As such, this commit replaces TestEndpoint.incoming_connection_behavior
with a handle_incoming callback, and modifies an existing test to
exploit this functionality to test more things than it was previously.
Configures the default clients and servers in proto tests to be able to
utilize NEW_TOKEN frames. This involves creating simple implementations
of token-related traits internal to the test module. These
implementations are essentially the most boring possible implementation
that is able to actually utilize tokens. They would not be suitable for
use in real applications because their memory usage is unbounded.
Moves the existing `stateless_retry` test into that module.
Also adds a `FakeTimeSource` utility to the test module.
This addresses 3 ToDos that don't actually change the code:
1. what path should be used to attempt to remove packet protection when
receiving the first packet?
  None. The extension has not been successfully negotiated
2. what path should be used for packet protection of an initial close?
None. Initial close is done before the handshake is completed and the
extension has not been negotiated.
3. 0-rtt multipath validations:
None: Section 7 of rfc9000 states that extensions must declare what
happens with 0-rtt transport parameters and the draft states that
`initial_max_path_id` must not be remembered. This is (to me) equivalent
to silently ignoring any 0-rtt params as what comes from finalizing the
handshake is used

All of this needs some review from someone else
This is newly required for libfuzzer-sys 0.4.9. It is a permissive
license similar to the MIT or 3-claused BSD licenses.
flub and others added 14 commits June 5, 2025 18:17
Somehow that managed to escape so far.

Also, look at me embracing unwrap!
* add a paths to open queue and start creating some errors

* wip

* improve error cases when queueing a path open

* queue two frames for opening a path or failing to do so

* queue open path

* fix future polling

* ugly return types are declared ugly

* fix doc link
Somehow that managed to escape so far.

Also, look at me embracing unwrap!
@bastienvty
Copy link

bastienvty commented Jun 13, 2025

Hi, I am currently doing some experiments and research on MPQUIC and am interested in your implementation. I wanted to know what the current status of this PR and the integration of MPQUIC. What has been achieved and what else needs to be done? I am open to help and put some work into it if needed.

flub added 15 commits June 13, 2025 16:34
This changes the open_path function to no longer return the
PATH_ABANDON frame, but instead put it on the pending data.  And adds
functionality to send it in poll_transmit.
This changes the open_path function to no longer return the PATH_ABANDON
frame, but instead put it on the pending data. And adds functionality to
send it in poll_transmit.
This always accepts the status set by the peer, the draft says it is
only a suggestion.
- PTO is computed for the right path
- crypto keys update uses 3 * max PTO of all paths
- draining state uses 3 * max PTO of all paths
- PTO is computed for the right path
- crypto keys update uses 3 * max PTO of all paths
- draining state uses 3 * max PTO of all paths
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.