-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Today it isn't possible to advertise a proper hostname in the NodeAnnouncement
message. Historically, we've gotten around this by adding a CLI option that allows users to specify a hostname that should periodically be queried to resolve a new IP to advertise. There exist a spec proposal to add a new address type to the NodeAnnouncement
message. With this implemented, we can actually remove our existing hack around this prior lack of protocol feature.
Related to this spec addition is another proposal to add a websockets type. Turns out that most web browsers (read: Chrome) doesn't allow raw websockets (so no TLS layer), which means in practice, one is required to connect via a hostname in either case. As a result, implementing this also gives us a way to expose LN p2p connection over websockets, with the caveat that the node requires a hostname, or uses some existing TPC<->WS proxy.
Steps to Completion
- Add new host name address type to
lnwire.NodeAnnouncement
- Add a new config flag to allow users to set this new field.
- Extend the existing
peersrpc.UpdateNodeAnnoncement
struct to allow dynamic config of this new field