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

Expiry of discovered peers when they are no longer alive #3040

Open
andrewdavidmackenzie opened this issue Dec 12, 2024 · 0 comments
Open

Expiry of discovered peers when they are no longer alive #3040

andrewdavidmackenzie opened this issue Dec 12, 2024 · 0 comments
Labels
c-iroh discovery feat New feature or request

Comments

@andrewdavidmackenzie
Copy link

When a peer has been discovered and appears in the remotes of the "discoveree", it stays there for a long time (I can't tell if "forever", or just a very long time), well after the peer has closed/crashed/ended.

The suggested method of using last_used to filter out peers discovered some time ago doesn't work:

Docs
https://docs.rs/iroh-net/latest/iroh_net/endpoint/struct.RemoteInfo.html

It seems last_used field (not called last_seen) is only updated when data transfer between peers takes place, not when that peer is discovered, or "re-discovered". It returns None in discovered peers in my tests, and that seems to match the docs description also.

So, I think we'd either need some other method of expiring peers (mDNS has a TTL setting when registering a service), or this field would need to be redefined, and updated each time the peer is discovered/confirmed-alive. But I'd argue that of the TTL expires and we try to confirm-alive and the peer is not alive, then it should be removed from the remotes - and updating the last_used would not be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-iroh discovery feat New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants