Skip to content

Conversation

@rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Nov 12, 2025

Description

This is the latest attempt that leaves more internals alone.

Replaces #3576

The basic approach is to first replace the EndpointId type alias with PublicKey everywhere and then reintroduce EndpointId as a new type only in public APIs. The entire relay crate, despite being public, still works with PublicKey.

Every place where we have a PublicKey and need an EndpointId on the outside we can just use .into(). In tests it is Ok to go from EndpointId to PublicKey using .expect_ed().

Discovery works with EndpointId, but discovery services that fundamentally require ed keys, such as pkarr, will just do nothing for non ed keys.

Todo:

  • tickets need a new version which has a variant identifier for the key
  • tostring/parse roundtrip
  • check public iroh api for remaining PublicKey
  • bikeshed how the tostring for an EndpointId should look like
  • remove or change Endpoint::secret_key

Todo (later?):

  • change encoding for mdns to be able to encode an actual endpoint id, not just a public key

The relay protocol of course remains fully based on ed keys. Changing that to support different keys would be a major effort, but with multipath we might be able to just add a second one using whatever new keys we support.

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:

- remove EndpointId type alias
- add EndpointId enum
- gradually reintroduce EndpointId to the public API
Still ugly .expect_ed() in tests.
@n0bot n0bot bot added this to iroh Nov 12, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Nov 12, 2025
@rklaehn rklaehn changed the title WIP allow non-ed keys in EndpointID feat: WIP allow non-ed keys in EndpointID Nov 13, 2025
@github-actions
Copy link

github-actions bot commented Nov 13, 2025

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

Last updated: 2025-11-13T16:32:56Z

github-merge-queue bot pushed a commit that referenced this pull request Nov 17, 2025
…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)
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.

3 participants