Skip to content

Commit 1abbe2a

Browse files
committed
Add support for parsing the dns_resolver feature bit
This feature bit is used to indicate that a node will make DNS queries on behalf of onion message senders, returning DNSSEC TXT proofs for the requested names. It is used to signal support for bLIP 32 resolution and can be used to find nodes from which we can try to resolve BIP 32 HRNs.
1 parent d49a08a commit 1abbe2a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

lightning-types/src/features.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
//! (see the [`Keysend` feature assignment proposal](https://github.com/lightning/bolts/issues/605#issuecomment-606679798) for more information).
6969
//! - `Trampoline` - supports receiving and forwarding Trampoline payments
7070
//! (see the [`Trampoline` feature proposal](https://github.com/lightning/bolts/pull/836) for more information).
71+
//! - `DnsResolver` - supports resolving DNS names to TXT DNSSEC proofs for BIP 353 payments
72+
//! (see [bLIP 32](https://github.com/lightning/blips/blob/master/blip-0032.md) for more information).
7173
//!
7274
//! LDK knows about the following features, but does not support them:
7375
//! - `AnchorsNonzeroFeeHtlcTx` - the initial version of anchor outputs, which was later found to be
@@ -177,6 +179,10 @@ mod sealed {
177179
ZeroConf | Keysend,
178180
// Byte 7
179181
Trampoline,
182+
// Byte 8 - 31
183+
,,,,,,,,,,,,,,,,,,,,,,,,
184+
// Byte 32
185+
DnsResolver,
180186
]
181187
);
182188
define_context!(ChannelContext, []);
@@ -565,6 +571,17 @@ mod sealed {
565571
supports_trampoline_routing,
566572
requires_trampoline_routing
567573
);
574+
define_feature!(
575+
259,
576+
DnsResolver,
577+
[NodeContext],
578+
"Feature flags for DNS resolving.",
579+
set_dns_resolution_optional,
580+
set_dns_resolution_required,
581+
supports_dns_resolution,
582+
requires_dns_resolution
583+
);
584+
568585
// Note: update the module-level docs when a new feature bit is added!
569586

570587
#[cfg(any(test, feature = "_test_utils"))]

0 commit comments

Comments
 (0)