Skip to content

refactor!: rename Node to Endpoint in all cases#3542

Merged
dignifiedquire merged 10 commits intomainfrom
refactor-node-endpoint
Oct 15, 2025
Merged

refactor!: rename Node to Endpoint in all cases#3542
dignifiedquire merged 10 commits intomainfrom
refactor-node-endpoint

Conversation

@dignifiedquire
Copy link
Copy Markdown
Contributor

@dignifiedquire dignifiedquire commented Oct 15, 2025

Description

This normalizes naming, to call the main iroh handle, Endpoint and instead ofNode in all cases.

Closes #3301

Breaking Changes

  • All APIs that include Node now use Endpoint

  • renamed

    • iroh_relay::RelayNode -> RelayConfig
    • iroh_base::NodeAddr -> EndpointAddr
    • iroh_base::NodeAddr.node_id -> endpoint_id
    • iroh_base::NodeId -> EndpointId
    • iroh_base::NodeTicket -> EndpointTicket
    • iroh::Endpoint::node_addr -> iroh::Endpoint::addr
    • iroh::Endpoint::watch_node_addr -> iroh::Endpoint::watchaddr
    • iroh::Endpoint::node_id -> iroh::Endpoint::id

@dignifiedquire dignifiedquire self-assigned this Oct 15, 2025
@dignifiedquire dignifiedquire added this to the v0.94 milestone Oct 15, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 15, 2025

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

Last updated: 2025-10-15T13:08:27Z

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 15, 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: aba4c4c


impl Ticket for NodeTicket {
impl Ticket for EndpointTicket {
const KIND: &'static str = "node";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

s/node/endpoint? If we want to break all tickets.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah, I wasn't sure about this one

/// The [`NodeId`] of the original sender.
remote_node_id: NodeId,
/// The [`EndpointId`] of the original sender.
remote_endpoint_id: EndpointId,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i have no idea if this is a wire-change or not

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

asfaict it is not, thanks to the custom encoding

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this file have been renamed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not sure

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not sure

@n0bot n0bot bot added this to iroh Oct 15, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Oct 15, 2025
Copy link
Copy Markdown
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

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

if you get CI happy it's probably ok

@dignifiedquire dignifiedquire added this pull request to the merge queue Oct 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 15, 2025
@dignifiedquire dignifiedquire added this pull request to the merge queue Oct 15, 2025
Merged via the queue into main with commit bfc6ba0 Oct 15, 2025
51 of 54 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Oct 15, 2025
@dignifiedquire dignifiedquire deleted the refactor-node-endpoint branch October 15, 2025 13:40
github-merge-queue bot pushed a commit that referenced this pull request Oct 21, 2025
## Description

#3542 included unintended changes to the `RelayMap` API. This cleans
this up: We don't call entries in the relay map *endpoints*, instead we
simply call them *relays*.

Also improves the API docs and adds some examples for how to work with
the `FromIterator` generic types used in construction and access. And
renamed a couple of variables at use site in tests mostly to follow the
new pattern.

## Breaking Changes

### Renamed

* `iroh_relay::RelayMap::get_endpoint` -> `get`
* `iroh_relay::RelayMap::endpoints` -> `relays`
* `iroh_relay::RelayMap::contains_endpoint` -> `contains`

## 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: ✅ Done

Development

Successfully merging this pull request may close these issues.

Rename NodeId and NodeAddr to EndpointId, EndpointAddr

3 participants