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

Allow for updating ENR and the enr-seq number #208

Closed
kdeme opened this issue Apr 2, 2020 · 1 comment
Closed

Allow for updating ENR and the enr-seq number #208

kdeme opened this issue Apr 2, 2020 · 1 comment
Labels
discoveryv5

Comments

@kdeme
Copy link
Contributor

@kdeme kdeme commented Apr 2, 2020

We should be able to add/update/remove fields in the ENR and update enr-seq number.

Currently the ENR is created in the discovery protocol initialisation, newProtocol, based on the passed parameters.
We should either have a call to update this ENR, or create the ENR before discovery gets started and pass it to newProtocol, or both.

ENR settings will usually change outside of the Discovery protocol, e.g.:

  • any custom fields ("capabilities", etc.): e.g. eth2-field
  • IP-address / port because these got updated.
  • ...

But can also from inside Discovery:

  • (enough) pong messages which inform your IP-address -> update ENR.

The latter will also require this without a restart (others might also), thus it looks like update is needed.

However, in order to correctly update ENR across restarts, the enr-seq number needs to be stored. So perhaps we should just store the whole ENR also.

@kdeme kdeme added the discoveryv5 label Apr 2, 2020
@kdeme kdeme mentioned this issue Jul 7, 2020
@kdeme
Copy link
Contributor Author

@kdeme kdeme commented Jul 10, 2020

Implemented in #266

@kdeme kdeme closed this as completed Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discoveryv5
Projects
None yet
Development

No branches or pull requests

1 participant