Skip to content

discovery+lnwire: add support for DNS host names in NodeAnnouncement msg #6337

Description

@Roasbeef

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2should be fixed if one has timebeginnerIssues suitable for new developersdiscoveryPeer and route discovery / whisper protocol related issues/PRsgood first issueIssues suitable for first time contributors to LNDp2pCode related to the peer-to-peer behaviour

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions