Skip to content

Configurable HumanReadableName resolver#195

Open
tnull wants to merge 2 commits intolightningdevkit:mainfrom
tnull:2026-04-configurable-dns-resolver
Open

Configurable HumanReadableName resolver#195
tnull wants to merge 2 commits intolightningdevkit:mainfrom
tnull:2026-04-configurable-dns-resolver

Conversation

@tnull
Copy link
Copy Markdown
Collaborator

@tnull tnull commented Apr 21, 2026

Bump LDK Node and add configurable HRN resolution.

tnull added 2 commits April 21, 2026 12:39
Picks up support for resolving BIP 353 Human-Readable Names
(ldk-node PR #630), which adds `Config::hrn_config` and the
`HumanReadableNamesConfig` / `HRNResolverConfig` types.

Co-Authored-By: HAL 9000
Exposes LDK Node's new `HumanReadableNamesConfig` via a new `[hrn]`
section in `config.toml`. Users can pick between resolving BIP 353
names locally over DNS (`mode = "dns"`, the default) or via bLIP-32
(`mode = "blip32"`), and, when using DNS, optionally run as an HRN
resolution service for the rest of the network.

Defaults match LDK Node's: resolve via DNS against `8.8.8.8:53` with
the resolution service disabled (enabling it requires the node to be
announceable so others can route resolution requests to us).

Co-Authored-By: HAL 9000
@ldk-reviews-bot
Copy link
Copy Markdown

ldk-reviews-bot commented Apr 21, 2026

I've assigned @benthecarman as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

Copy link
Copy Markdown
Collaborator

@benthecarman benthecarman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to one day add http support as well but mostly looks good!

let mut config = HumanReadableNamesConfig::default();

match value.mode.as_deref() {
None | Some("dns") => {},
Copy link
Copy Markdown
Collaborator

@benthecarman benthecarman Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here we assume that the default is HRNResolverConfig::Dns and then modify the settings below. Would be safer to have the logic of the if let HRNResolverConfig::Dns ... in this arm so if the default ever changed (say to http to support lnurl) then we could better handle it and not silently drop the dns_server_address and enable_resolution_service settings.

match value.mode.as_deref() {
None | Some("dns") => {},
Some("blip32") => {
config.resolution_config = HRNResolverConfig::Blip32;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to throw an error if enable_resolution_service or dns_server_address is set. Otherwise users could be confused that they have something even though we are silently dropping the config option

&mut config.resolution_config
{
if let Some(addr) = value.dns_server_address.as_deref() {
*dns_server_address = SocketAddress::from_str(addr).map_err(|e| {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do something here to assume port 53 if its not provided?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants