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): Allow customising the TransportConfig for connections #3111

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

flub
Copy link
Contributor

@flub flub commented Jan 9, 2025

Description

Previously the TransportConfig was hardcoded for the
client (client/server in QUIC terminology: client initiates the
connection, server accepts the connection). This rendered some
customisations on the server-side, as supported by the Builder,
impossible since the client would negotiate different limits.

Specifically the QUIC keep-alives were at a 1s or faster interval
while the connection timeout was at 30s or less.

This adds a new API marked as experimental which allows customising
the transport config for clients.

Secondly it also respects any custom TransportConfig set in the
Builder for clients as well as servers. This is not a behaviour
change since the parameters set by default are now moved to the
Builder and due to how these are negotiated it does not matter that
the server will now also have the same values set by default.

Closes #2872.

Breaking Changes

iroh

If Builder::transport_config is used it will now also affect initiated
connections, while before it only affected the accepted connections.

Notes & open questions

Change checklist

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

flub added 2 commits January 9, 2025 12:48
Previously the TransportConfig was hardcoded for the
client (client/server in QUIC terminology: client initiates the
connection, server accepts the connection).  This rendered some
customisations on the server-side, as supported by the Builder,
impossible since the client would negotiate different limits.

Specifically the QUIC keep-alives were at a 1s or faster interval
while the connection timeout was at 30s or less.

This adds a new API marked as experimental which allows customising
the transport config for clients.

Secondly it also respects any custom TransportConfig set in the
Builder for clients as well as servers.  This is not a behaviour
change since the parameters set by default are now moved to the
Builder and due to how these are negotiated it does not matter that
the server will now also have the same values set by default.

Closes #2872.
Copy link

github-actions bot commented Jan 9, 2025

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

Last updated: 2025-01-09T12:02:16Z

@flub flub requested a review from a team January 9, 2025 12:01
Copy link

github-actions bot commented Jan 9, 2025

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: 4cbeb83

@flub flub self-assigned this Jan 9, 2025
@matheus23 matheus23 added this to the v0.32.0 milestone Jan 14, 2025
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.

Iroh Connection cannot adjust TransportConfig for outgoing connections
2 participants