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

Propagate send errors for some of the discv5 functionality. #241

Open
kdeme opened this issue May 28, 2020 · 0 comments
Open

Propagate send errors for some of the discv5 functionality. #241

kdeme opened this issue May 28, 2020 · 0 comments
Labels
discoveryv5 Discovery v5 related issues

Comments

@kdeme
Copy link
Contributor

kdeme commented May 28, 2020

The send proc currently just logs errors through a async callback.

For some procs that use this it doesn't matter much, e.g. sendWhoareyou:

  • Here you wouldn't care much that it didn't manage to send. Not much you can do about it if it is a network issue. You would just be able to delete the handshake from the table immediately (or not add it in the first place). It would be similar for Nodes and Pong replies. Retrying sounds useless because by the time it works again timeouts are likely to have passed.

For other procs it might matter more:

  • ping: Important on (re)validation of nodes in the routing table. You want to be able to differentiate between e.g. a send failure because of the own node network connection, or because of a lost packet.
  • findNode: Perhaps a little less important, but the lookup could stop early instead of trying many findNodes that will all fail.

So basically, send would have to propagate the error, e.g. through Future[Result[...]].
Other option would be to stop the loops but that sounds more complex.

@kdeme kdeme added the discoveryv5 Discovery v5 related issues label May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discoveryv5 Discovery v5 related issues
Projects
None yet
Development

No branches or pull requests

1 participant