You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have the rendezvous behaviour refresh its registration upon any external address changes
Motivation
When there is ever a change in an external address, we would have to register to the namespace on the rendezvous node so that it can have the up-to-date address of the peer. This would could create some complexity and be redundant to do since it may require
a. A wrapper around rendezvous behaviour but track registered namespaces and monitor FromSwarm::ExternalAddrConfirmed and FromSwarm::ExternalAddrExpired for any changes to register to the existing namespaces.
b. To monitor for any changes to Swarm::external_addresses and register to any namespaces so the node can be up to date. This would require checking in a loop of sorts.
Although the spec is not specific on updating on every change, it does state
Peers can refresh their registrations at any time with a new `REGISTER` message
With this said, I do believe it would be appropriate to automate this upon external address changes.
Current Implementation
Current implementation does not register upon any changes to the external addresses, however it does have placeholders that would allow us to implement this easily due to it tracking the external addresses
While we do track discovered peers, we dont explicitly track namespaces we are successfully registered to based on the implementation client implementation so its hard to determine if we want to reuse discovered_peers keys when refreshing or if we want to have a separate field to track the successful registration to a given node.
While we do track discovered peers, we dont explicitly track namespaces we are successfully registered to based on the implementation client implementation so its hard to determine if we want to reuse discovered_peers keys when refreshing or if we want to have a separate field to track the successful registration to a given node.
I'd opt for a separate field. I am not even sure our own registration is part of the mentioned map.
Description
Have the rendezvous behaviour refresh its registration upon any external address changes
Motivation
When there is ever a change in an external address, we would have to register to the namespace on the rendezvous node so that it can have the up-to-date address of the peer. This would could create some complexity and be redundant to do since it may require
a. A wrapper around rendezvous behaviour but track registered namespaces and monitor
FromSwarm::ExternalAddrConfirmed
andFromSwarm::ExternalAddrExpired
for any changes to register to the existing namespaces.b. To monitor for any changes to
Swarm::external_addresses
and register to any namespaces so the node can be up to date. This would require checking in a loop of sorts.Although the spec is not specific on updating on every change, it does state
With this said, I do believe it would be appropriate to automate this upon external address changes.
Current Implementation
Current implementation does not register upon any changes to the external addresses, however it does have placeholders that would allow us to implement this easily due to it tracking the external addresses
rust-libp2p/protocols/rendezvous/src/client.rs
Lines 220 to 224 in c4ab04c
While we do track discovered peers, we dont explicitly track namespaces we are successfully registered to based on the implementation client implementation so its hard to determine if we want to reuse
discovered_peers
keys when refreshing or if we want to have a separate field to track the successful registration to a given node.rust-libp2p/protocols/rendezvous/src/client.rs
Line 50 in c4ab04c
Are you planning to do it yourself in a pull request ?
Maybe
The text was updated successfully, but these errors were encountered: