-
Notifications
You must be signed in to change notification settings - Fork 913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
announce-addr: address 'dns:port' is not announceable #5657
Comments
In our unit tests, clightning doesn't work either |
Indeed, they broke it at some point. I used to have DNS names in my Supposedly there's been defined a new node announcement type that allows gossiping DNS names in addition to IP addresses. Looking forward to that. |
That's nice feature, but for the time being that would be nice to have a work around as we can't update :( |
Any ideas, @rustyrussell? |
That is correct, we had to disable automatic resolution, to allow non-resolved hostnames to be added and announced. If we were to resolve on our end we'd replace what is supposed to be a dynamic address that changes with DNS into a static IP that'll not work when the address changes (ISP renewing lease). I'm sure @m-schmoock can explain it in detail, but the tldr is that some implementations didn't like us announcing the new address type (DNS symbolic names) and were dropping our |
This is a regression, I had not appreciated that we would now treat names as literals to announce. Until DNS-name address records become widely supported, we should always turn it to IP address unless overridden somehow! |
Before DNS name gossip, if I remember, the DNS name were resolved into IP and those were what got gossiped. I understand the problem with ISP dynamic ip, so I am happy about DNS announcement, it's shame it can't be enabled because of other implementations for now. But rather than disabling it, you should probably fallback to IP announcement for those hosts like before. |
If there is a patch to restore previous behavior, I would be happy to just take it and use it on our distrib, so at least we can up to date with latest clightning versions. |
This LND issue has been resolved, and on current master the gossip announcement of type DNS is already non-experimental anymore. ( e0d6f3c connectd: DNS Bolt7 #911 no longer EXPERIMENTAL ) |
Still nothing here? please we have many people who can't update c-lightning because of this. :( |
Forget about it, we will just remove |
Actually, we can't remove announce-addr as our unit tests depends on it too much, and BTCPay Server also depends on it to fetch the node information to show to the customers in the checkout page. We are stuck until you fix it. |
Okay @NicolasDorier I looked into it briefly. Version 0.12.1 still has DNS support experimental, thus the What older version of clightning did was to try to resolve a DNS name these IPs would have then been announced once statically (without checking for changes ever, this is another topic). Maybe we can do the following to 'fix' the breakage: If a DNS name is given, announce it as an DNS name AND ALSO, if it resolves to a local interface, the statically old fashioned way.
In your quote above I wonder what the is |
It's the Docker hostname of the Core Lightning container in our test setup. |
@cdecker @rustyrussell Anyone using DNS names will effectively make their node disapear, as |
We could re-experimentalize including DNS names in |
Try to kick off some discussion about this in #5657 |
Wouldn't it make sense to construct and sign two node announcements: one containing the DNS names and the other containing the addresses to which those names resolve? Send out both announcements. Peers that don't support DNS names will drop the announcement containing them and propagate the other one. Nodes that support the names will replace the announcement containing addresses. |
Interesting thought. But one is not supposed to send out gossip too quickly. This applies to channel and node announcements. Otherwise on gets throttled (and again unvisible). Also the recent update that's parseable/readable invalidates the last one. So then only the DNS name would be seen, which is not nice when you maybe also want to announce a TOR address (for connectivity). |
So alternate which one you're sending every day or whatever the period is. And include your Tor address in all of your announcements. The IP-containing announcements that you send should always have serial numbers / expiration times that are less than that of the name-containing announcement you most recently sent, so that nodes that support name-containing announcements will drop your no-name announcements on the spot as stale. |
Note that actually we aren't using |
Doesn't work Our address There are too many problems now to be able to update:
|
The If you use a valid hostname, at least this issue is gone. |
ok I will try that |
My little nothing path :) This extends the testcase for is_dnsaddr for a case that came up in issue ElementsProject#5657 ElementsProject#5657 Also fixes a typo in a comment. Changelog-None
@m-schmoock I tried, I confirm you are right. We still have problems to update, but this is unrelated to this issue. I close this one. |
Ok, is there an issue for this? Deprecations are a tool to make lives easier, not a rigid stick to beat developers with: if enforcing this causes problems we should have delayed removal until that was fixed! |
That's not true. Registered domain names must not contain underscores. DNS records can contain underscores, and in fact that's a common pattern in several standardized protocols. For example, DMARC records are named |
Well okay, but does it make sense to announce hostnames from your local network? |
Or do you mean something like this is valid on public dns servers?
|
FQDNs containing underscores are globally resolvable. You just can't register a first-level domain name containing underscores at a domain registrar. So, it does make sense to announce FQDNs containing underscores. It makes less sense to announce unqualified names or names qualified by a domain that's not resolvable from the global root name servers, but I would argue it's not CLN's place to make that judgment. |
@whitslack Any other additional characters allowed except underscores? |
Sure. I just created one to demonstrate. See for yourself:
|
There are no restrictions on what bytes may appear in a domain name label. IETF RFC 1035 says (emphasis mine):
|
Yeah, @m-schmoock please relax this requirement for the imminent point release? We should probably note in the CHANGELOG (and release draft) that we recommend using IP addresses for announce-addr and addr configs in public nodes until DNS records are more widely recognized. |
@rustyrussell I think that's fine about jsonrpc v2. I tried to add it on our library and tested it against old nodes, and they accept it, so we can add it to our lib and support still old nodes. |
@m-schmoock I agree with @whitslack. The DNS name validation should be relaxed. |
The hostname part of a DNS FQDN can allow for additional characters other than specified in `man 7 hostname`. This extends is_dnsaddr and the test issue ElementsProject#5657. Also fixes a typo in a comment. Changelog-None
The hostname part of a DNS FQDN can allow for additional characters other than specified in `man 7 hostname`. This extends is_dnsaddr and the test issue ElementsProject#5657. Also fixes a typo in a comment. Changelog-Fixed: wireaddr: ElementsProject#5657 allow '_' underscore in hostname part of DNS FQDN
|
On a related note, why do you reject uppercase characters in domain names? DNS labels are case-insensitive. Quoting IETF RFC 1035 again:
|
@whitslack
... And I didn't read to the part where it says
I just hadn't time to address this yet, see: #5792 |
@m-schmoock: You keep referring to
I guess you're exercising that second sentence very liberally, as you're arbitrarily inventing and imposing artificial constraints on DNS names. I'm done arguing this, though. If someone needs to announce a more general name, they'll just have to hack the CLN source themselves. 🤷♂️ |
I was not referring, I was answering your question "why do you reject uppercase" and how it came to be initially. Yes, I don't think its a good idea to allow users to typo in names that will not be globally resolvable by other nodes. Keep in mind that these |
The hostname part of a DNS FQDN can allow for additional characters other than specified in `man 7 hostname`. This extends is_dnsaddr and the test issue ElementsProject#5657. Also fixes a typo in a comment. Changelog-Fixed: wireaddr: ElementsProject#5657 allow '_' underscore in hostname part of DNS FQDN
The hostname part of a DNS FQDN can allow for additional characters other than specified in `man 7 hostname`. This extends is_dnsaddr and the test issue ElementsProject#5657. Also fixes a typo in a comment. Changelog-Fixed: wireaddr: ElementsProject#5657 allow '_' underscore in hostname part of DNS FQDN
Trying to update c-lightning from
0.10.2
to0.12.1
Get this error during start:
lightningd: /root/.lightning/config line 9: announce-addr: address 'btcpay763334.lndyn.com:9735' is not announceable
My config is the following
What should I do instead?
The text was updated successfully, but these errors were encountered: