Skip to content

fix(iroh): better waiting for the NodeAddr to be ready in the echo example #3424

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

flub
Copy link
Contributor

@flub flub commented Aug 1, 2025

Description

This is a major footgun right now, and even this basic example gets it wrong.

Breaking Changes

Notes & open questions

There might be other examples affected, I didn't look.

My first version was very different, and absolutely horrible to write and still failed because of obscure borrowing errors. This is probably rather difficult for people new to rust. Maybe we need to provide a better helper function?

Change checklist

  • Self-review.

This is a major footgun right now, and even this basic example gets it
wrong.
Copy link

github-actions bot commented Aug 1, 2025

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

Last updated: 2025-08-01T10:04:55Z

@n0bot n0bot bot added this to iroh Aug 1, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Aug 1, 2025
Copy link

github-actions bot commented Aug 1, 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: 36b847c

@flub flub changed the title Do a better job at waiting for the NodeAddr to be ready fix(iroh): Do a better job at waiting for the NodeAddr to be ready in the echo example Aug 1, 2025
@flub flub changed the title fix(iroh): Do a better job at waiting for the NodeAddr to be ready in the echo example fix(iroh): better waiting for the NodeAddr to be ready in the echo example Aug 1, 2025
Copy link
Member

@matheus23 matheus23 left a comment

Choose a reason for hiding this comment

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

This complicates the example quite a bit.

If this is how we should wait for connectivity, should we update the way that node_addr() works?

This is a major footgun right now, and even this basic example gets it wrong.

Can you explain what exactly the example gets wrong? What's the failure scenario that you're seeing?

@flub
Copy link
Contributor Author

flub commented Aug 1, 2025

This complicates the example quite a bit.

Yes it does!

If this is how we should wait for connectivity, should we update the way that node_addr() works?

Maybe.

This is a major footgun right now, and even this basic example gets it wrong.

Can you explain what exactly the example gets wrong? What's the failure scenario that you're seeing?

Users keep running into the cases where they use .node_addr().initialized() and end up with an address that does not have a relay URL inside it. And then run into connectivity problems.

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.

2 participants