Skip to content

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

Open

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

  1. added
    p2p
    beginner
    discovery
    on Mar 15, 2022
  2. added this to the v0.16.0 milestone on Mar 15, 2022
  3. gabbyprecious commented on Apr 4, 2022

    @gabbyprecious
    Contributor

    Hi @Roasbeef can I be assigned to this?

  4. DeGrandis commented on Apr 7, 2022

    @DeGrandis

    Hi @Roasbeef , I would like to give this a go too. I'm new to this repo and would like to help. Maybe pairing with @gabbyprecious ?

    Edit: after poking around, this looks to be over my head, for now. I will look for something else.

  5. guggero commented on Apr 11, 2022

    @guggero
    Collaborator

    We don't normally assign issues to external contributors. But if you want to "claim" something, you can always create a draft (!) pull request and link the issue in the description. That way anyone looking at the issue sees that someone is working on it.

  6. tvolk131 commented on Apr 23, 2022

    @tvolk131
    Contributor

    There exist a spec proposal to add a new address type to the NodeAnnouncement message.

    @Roasbeef can you link the spec you're talking about? All I could find was this thread, but this doesn't seem like quite what you're proposing.

  7. remyers commented on Jul 5, 2022

    @remyers

    Is this the PR to add support for the spec change: BOLT 7: add gossip address descriptor type DNS hostname #911 ?

  8. Roasbeef commented on Jul 12, 2022

    @Roasbeef
    MemberAuthor

    @tvolk131 yep see the linked PR above ^

  9. m-schmoock commented on Jul 28, 2022

    @m-schmoock

    Hi @Roasbeef
    lightning/bolts#911 finally reached interop with Rust-Lightning and is going being merged soon. I was thinking about removing the EXPERIMENTAL checks in CLN code for the next release. But there was chatter in our Discord that LND currently won't propagate node_annoucement's that contain (optional) DNS hostnames as address descriptors. About that:

    • Is this correct?
    • If yes, is there an issue on your GitHub for this? (I couldn't find it)
    • We likely can't remove CLN EXPERIMENTAL when LND, which is the biggest part of the network, won't propagate the node_annoucement's
  10. Roasbeef commented on Aug 31, 2022

    @Roasbeef
    MemberAuthor

    But there was chatter in our Discord that LND currently won't propagate node_annoucement's that contain (optional) DNS hostnames as address descriptors. About that:

    No this is fixed now, we'll propagate new addrs that we don't yet understand.

  11. moved this to 📋 Backlog in lnd v0.16.0on Aug 31, 2022
  12. modified the milestones: v0.16.0, v0.16.1 on Dec 6, 2022
  13. added
    P2
    on Aug 8, 2023
  14. removed this from the Medium Priority milestone on Aug 8, 2023
  15. added
    good first issue
    on Apr 15, 2024
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

    P2beginnerdiscoverygood first issuep2p

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions