Is the "addresses" field in bolt 7 ASCII or Punycode encoded?
Bolt 7 says DNS hostnames (type 5) in the addresses
field of the node_announcement
gossip message have to be ascii encoded and non-ascii characters have to be Punycode encoded. However, to my understanding, it would only make sense to encode the whole string either in ASCII or Punycode. If the hostname is encoded in ASCII and only single, non-ascii characters are encoded in Punycode, the receiver would decode it as ascii and get a different hostname (as punycode is valid ascii). Encoding every hostname in Punycode would result in every string having a hyphen postfix: example.com-, which would probably also be interpreted wrong by receivers as the bolt says it has to be valid ASCII (not Punycode). How would the receiver detect if a hostname is pure ascii or punycode? Is the xn--
used by lightning implementations?
from Recent Questions - Bitcoin Stack Exchange https://ift.tt/XYhATCF
via IFTTT