Skip to content

Add fallback HrnResolver to LDK onion-message resolver#23

Open
benthecarman wants to merge 2 commits into
rust-bitcoin:mainfrom
benthecarman:lnurl-fallback
Open

Add fallback HrnResolver to LDK onion-message resolver#23
benthecarman wants to merge 2 commits into
rust-bitcoin:mainfrom
benthecarman:lnurl-fallback

Conversation

@benthecarman
Copy link
Copy Markdown
Contributor

The onion-message DNSSEC resolver cannot satisfy LNURL lookups and also cannot run when the network graph contains no DNS-resolving nodes. Allow callers to plug in an arbitrary fallback HrnResolver (such as HTTPHrnResolver) which is consulted in those cases and used for all LNURL resolution.

Comment thread src/onion_message_resolver.rs Outdated
@benthecarman benthecarman force-pushed the lnurl-fallback branch 2 times, most recently from e53ce08 to dd87054 Compare May 11, 2026 22:21
Comment thread src/onion_message_resolver.rs Outdated
Comment thread src/onion_message_resolver.rs
Comment thread src/onion_message_resolver.rs Outdated
Comment thread src/onion_message_resolver.rs Outdated
The onion-message DNSSEC resolver cannot satisfy LNURL lookups and
also cannot run when the network graph contains no DNS-resolving
nodes. This adds an optional HTTPHrnResolver as a fallback to resolve
which is used in those cases and for all LNURL resolution.
}
Box::pin(async move { Err(e) })
},
Ok(recv) => Box::pin(async move { Ok(recv.await) }),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm, I believe in the case that the HRN does not resolve to any DNSSEC name (and only uses LNURL) this will simply silently time out and there won't be any LNURL attempt made. We should figure out what to do here, I guess we have to have a second or two timeout here before we attempt LNURL and then we poll both LNURL and DNSSEC and return whichever returns a valid response first (if either does)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

for that then we need a runtime then, no?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmmmmmm, I think instead we should do lightning/blips#71 and fallback if we get a failure response.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah that makes sense to me

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.

2 participants