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-base): allow the addr info of tickets to be empty #2254

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Apr 30, 2024

Description

feat(iroh-base): allow the addr info of tickets to be empty

Without this, a ticket that does not contain any addresses or relay URL can not be parsed. But we need to allow this if we want to use short tickets.

Breaking Changes

Notes & open questions

Note: I did not remove the error type Validation. That way we don't have breaking changes, and we might need it again in the future.

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@dignifiedquire
Copy link
Contributor

Side note: I was thinking that we should allow parsing a node id as a NodeTicket if it is exactly 32 bytes long, this would allow to use Node Tickets and Node IDs interchangeably in more places

@rklaehn rklaehn force-pushed the allow-empty-node-ticket branch from 3b9ba42 to 91acbda Compare April 30, 2024 11:52
@rklaehn
Copy link
Contributor Author

rklaehn commented Apr 30, 2024

Side note: I was thinking that we should allow parsing a node id as a NodeTicket if it is exactly 32 bytes long, this would allow to use Node Tickets and Node IDs interchangeably in more places

Not sure about that. We do guarantee ticket stability by having the variant byte. We do not guarantee node id stability. We might change encoding to zbase32 in the future or use a different hash.

For a tool I would just write an NodeIdOrTicket enum. Maybe we should have such a helper.

@rklaehn rklaehn changed the title allow the addr info of tickets to be empty feat(iroh-base): allow the addr info of tickets to be empty Apr 30, 2024
@rklaehn rklaehn requested a review from dignifiedquire April 30, 2024 12:29
@rklaehn rklaehn added this pull request to the merge queue Apr 30, 2024
Merged via the queue into main with commit 5502c5a Apr 30, 2024
21 of 22 checks passed
@rklaehn rklaehn deleted the allow-empty-node-ticket branch April 30, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants