Skip to content
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

Add support for parsing the dns_resolver feature bit #3346

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

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.

#3283 will want to use this, so after both PRs are merged we'll need one more commit to set the feature flag, but #3283 is already getting kinda big so keeping this separate.

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.
A `DNSResolverMessageHandler` which handles resolution requests
should want the `NodeFeatures` included in the node's
`node_announcement` to include `dns_resolver` to indicate to the
world that it provides that service. Here we enable this by
requesting extra feature flags from the `DNSResolverMessageHandler`
in the features `OnionMessenger`, in turn, provides to
`PeerManager` (which builds the `node_announcement`).
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.56%. Comparing base (d49a08a) to head (457b634).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3346      +/-   ##
==========================================
- Coverage   89.59%   89.56%   -0.03%     
==========================================
  Files         127      127              
  Lines      103438   103441       +3     
  Branches   103438   103441       +3     
==========================================
- Hits        92672    92651      -21     
- Misses       8049     8066      +17     
- Partials     2717     2724       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

Small question otherwise LGMT

@@ -177,6 +179,10 @@ mod sealed {
ZeroConf | Keysend,
// Byte 7
Trampoline,
// Byte 8 - 31
,,,,,,,,,,,,,,,,,,,,,,,,
Copy link
Contributor

Choose a reason for hiding this comment

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

what ,,,,,,,,,,,,,,,,,,,,,,,, means in this case?

Copy link
Contributor

@jkczyz jkczyz Oct 8, 2024

Choose a reason for hiding this comment

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

These are used by define_context! to form KNOWN_FEATURE_MASK, which needs bytes 8-31 zeroed.

@@ -177,6 +179,10 @@ mod sealed {
ZeroConf | Keysend,
// Byte 7
Trampoline,
// Byte 8 - 31
,,,,,,,,,,,,,,,,,,,,,,,,
Copy link
Contributor

@jkczyz jkczyz Oct 8, 2024

Choose a reason for hiding this comment

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

These are used by define_context! to form KNOWN_FEATURE_MASK, which needs bytes 8-31 zeroed.

@dunxen
Copy link
Contributor

dunxen commented Oct 8, 2024

Matches what's in bLIPs repo. LGTM

@TheBlueMatt TheBlueMatt merged commit a952d2d into lightningdevkit:main Oct 8, 2024
21 of 22 checks passed
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.

4 participants