-
Notifications
You must be signed in to change notification settings - Fork 2.3k
discovery+lnwire: add support for DNS host names in NodeAnnouncement msg #6337
Copy link
Copy link
Open
Labels
P2should be fixed if one has timeshould be fixed if one has timebeginnerIssues suitable for new developersIssues suitable for new developersdiscoveryPeer and route discovery / whisper protocol related issues/PRsPeer and route discovery / whisper protocol related issues/PRsgood first issueIssues suitable for first time contributors to LNDIssues suitable for first time contributors to LNDp2pCode related to the peer-to-peer behaviourCode related to the peer-to-peer behaviour
Metadata
Metadata
Assignees
Labels
P2should be fixed if one has timeshould be fixed if one has timebeginnerIssues suitable for new developersIssues suitable for new developersdiscoveryPeer and route discovery / whisper protocol related issues/PRsPeer and route discovery / whisper protocol related issues/PRsgood first issueIssues suitable for first time contributors to LNDIssues suitable for first time contributors to LNDp2pCode related to the peer-to-peer behaviourCode related to the peer-to-peer behaviour
Type
Fields
Give feedbackNo fields configured for issues without a type.
Today it isn't possible to advertise a proper hostname in the
NodeAnnouncementmessage. 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 theNodeAnnouncementmessage. 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
lnwire.NodeAnnouncementpeersrpc.UpdateNodeAnnoncementstruct to allow dynamic config of this new field