Skip to content
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

feat(iroh-net)!: upgrade to Quinn 0.11 and Rustls 0.23 #2595

Merged
merged 96 commits into from
Aug 28, 2024
Merged

feat(iroh-net)!: upgrade to Quinn 0.11 and Rustls 0.23 #2595

merged 96 commits into from
Aug 28, 2024

Conversation

flub
Copy link
Contributor

@flub flub commented Aug 6, 2024

Description

Upgrades the Quinn and Rustls dependencies. This touches a lot of dependencies and affects a lot of the internal API due to the changes in Quinn.

Breaking Changes

  • iroh::net::endpoint::Endpoint::accept now returns Incoming instead of Connecting. This allows rejecting incoming connections earlier, notify the initiating side to retry later and more. To get back Connecting, simply use Incoming::accept(). If all you did with Connecting before was to .await it, you can do the same with Incoming, too, and get back a Connection.
  • Removed iroh::net::endpoint::Builder::concurrent_connections. The amount of concurrent connections is now controlled by either calling Incoming::accept or Incoming::refuse after Endpoint::accept.

Notes & open questions

See #2273 for the tracking issue coordinating all this work. This is the last piece of the puzzle.

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

flub and others added 30 commits March 19, 2024 16:10
some warnings still nead that treatment
The stream could have been stopped by the remote but still has the
same effect.  So this isn't expected to be an error
endpoint_bidi_send_recv might be flaky, not sure yet
matheus23 and others added 13 commits August 22, 2024 16:01
This adds a bunch of anyhow .context() calls so that users get much
nicer errors instead of something rather cryptic
We really must keep using this till the last possible moment.  This
API is no longer public so we can make it use QuicMappedAddr.
We need to sure that triggering these odd conditions will not kill our entire magicsocket
Also make it easier to locally reproduce CI failures around this.
This gives an error as used before.
We had two paths that handled not sending a transmit at all. This meant
the 2nd path was never triggered. This instead removes the early-returns
making it easier to reason about the paths taken. Now only an error is
logged if there was nothing sent.

---------

Co-authored-by: Philipp Krüger <[email protected]>
@flub flub marked this pull request as ready for review August 28, 2024 12:21
@b5
Copy link
Member

b5 commented Aug 28, 2024

don't we need a ! on the PR description?

@flub flub changed the title feat(iroh-net): upgrade to Quinn 0.11 and Rustls 0.23 feat(iroh-net)!: upgrade to Quinn 0.11 and Rustls 0.23 Aug 28, 2024
Copy link
Contributor

@matheus23 matheus23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I guess at some point I didn't commit some changes I wanted to make (re: max_transmit_segments and max_receive_segments).

iroh-net/src/magicsock.rs Show resolved Hide resolved
iroh-net/src/magicsock.rs Outdated Show resolved Hide resolved
iroh-net/src/magicsock.rs Outdated Show resolved Hide resolved
iroh-net/src/magicsock.rs Show resolved Hide resolved
flub and others added 2 commits August 28, 2024 16:41
Co-authored-by: Philipp Krüger <[email protected]>
@flub flub requested a review from matheus23 August 28, 2024 14:43
@flub flub added this pull request to the merge queue Aug 28, 2024
Merged via the queue into main with commit 34ec5e2 Aug 28, 2024
27 of 28 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Aug 29, 2024
## Description

Since we have made MagicSock private it should always be created via the
Endpoint, unless we are internally messing around with tests or so.
Because of this we can make sure that the Endpoint always attaches the
correct "me" field to the span. Reducing the amount of noise in the
default log output.

## Breaking Changes

None

## Notes & open questions

Please do not merge before #2595 is merged. I'm trying to not add any
further changes to that PR.

## Change checklist

- [x] Self-review.
- ~~[ ] 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.~~
- ~~[ ] Tests if relevant.~~
- ~~[ ] All breaking changes documented.~~
github-merge-queue bot pushed a commit that referenced this pull request Aug 29, 2024
## Description

iroh-gossip has a direct dependency on Quinn but does not need it.
Remove this.

## Breaking Changes

none

## Notes & open questions

Please do not merge before #2595 is merged. I'm trying to not modify
that PR any further.

## Change checklist

- [x] Self-review.
- ~~[ ] 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.~~
- ~~[ ] Tests if relevant.~~
- ~~[ ] All breaking changes documented.~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants