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.
The text was updated successfully, but these errors were encountered: