Skip to content

Conversation

@Frando
Copy link
Member

@Frando Frando commented Nov 18, 2025

Description

Merges main and adapts for the changes from #3619

Breaking Changes

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.
    • List all breaking changes in the above "Breaking Changes" section.
    • Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are:

rklaehn and others added 4 commits November 17, 2025 15:44
…3662)

## Description

This would make the diff smaller if we decide to go with generic
endpoint ids. See #3653 . And I
also think it is nicer in any case.

## Breaking Changes

None

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist
<!-- Remove any that are not relevant. -->
- [ ] 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.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
    - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
    - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
    - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
    - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
    - [ ] [`sendme`](https://github.com/n0-computer/sendme)
…arameter (#3619)

## Description

on Connection that describes the connection state, and implement the fns
alpn and remote_id differently depending on what the state is.

The upside is that it should be easier to write code that works with
both a 0rtt connection and a fully initialized connection without having
to define a trait to abstract over both variants.

The downside is that it is a bit fancy with the types. But then for the
non 0rtt case you would never see the fanciness, so maybe it is OK?

Todo:
- remove everything but connection and handshake_completed from
Incoming/Outcoming...
- make the ConnectionState trait sealed
- document the ConnectionState instances

Note:

if you have a handler that needs to work with both handshake completed
connections and non handshake completed connections, you could now just
do:

```rust
async fn handler<T: ConnectionState>(conn: Connection<T>) { ... }
```

## Breaking Changes

- `iroh::endpoint::Connection` gets a type parameter to track connection
state. Default is `Connection<HandshakeCompleted>`
- `iroh::endpoint::IncomingZeroRttConnection` is removed, replaced with
type alias to `Connection<IncomingZeroRtt>`
- `iroh::endpoint::OutgoingZeroRttConnection` is removed, replaced with
type alias to `Connection<OutgoingZeroRtt>`

## Notes & open questions

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist
<!-- Remove any that are not relevant. -->
- [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.
- [x] All breaking changes documented.
- [ ] List all breaking changes in the above "Breaking Changes" section.
- [ ] Open an issue or PR on any number0 repos that are affected by this
breaking change. Give guidance on how the updates should be handled or
do the actual updates themselves. The major ones are:
    - [ ] [`quic-rpc`](https://github.com/n0-computer/quic-rpc)
    - [ ] [`iroh-gossip`](https://github.com/n0-computer/iroh-gossip)
    - [ ] [`iroh-blobs`](https://github.com/n0-computer/iroh-blobs)
    - [ ] [`dumbpipe`](https://github.com/n0-computer/dumbpipe)
    - [ ] [`sendme`](https://github.com/n0-computer/sendme)

---------

Co-authored-by: Friedel Ziegelmayer <[email protected]>
Co-authored-by: Frando <[email protected]>
@github-actions
Copy link

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

Last updated: 2025-11-18T09:55:08Z

@n0bot n0bot bot added this to iroh Nov 18, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Nov 18, 2025
@Frando Frando merged commit d538b11 into feat-multipath Nov 18, 2025
26 of 28 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Nov 18, 2025
@matheus23 matheus23 deleted the Frando/mp-merge-main branch November 18, 2025 12:27
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.

3 participants