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

multi: announce Keysend feature bit #6414

Merged
merged 1 commit into from
Apr 15, 2022

Conversation

ellemouton
Copy link
Collaborator

In this commit, we add the keysend feature bit to our NodeAnnouncement
if the accept-keysend option is set.

Fixes #5044

Note that since many nodes out there currently support keysend without signalling for the feature bit, I think we should (for now at least) not require the optional feature bit before sending a keyspend payment to the peer. This mimics CL's behaviour too: ElementsProject/lightning@8252ac5

When majority of nodes start announcing the bit, we can make this more strict in order to not unnecessarily lock up liquidity

In this commit, we add the keysend feature bit to our NodeAnnouncement
if the accept-keysend option is set.
@@ -529,6 +529,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
NoAnchors: cfg.ProtocolOptions.NoAnchorCommitments(),
NoWumbo: !cfg.ProtocolOptions.Wumbo(),
NoScriptEnforcementLease: cfg.ProtocolOptions.NoScriptEnforcementLease(),
NoKeysend: !cfg.AcceptKeySend,
Copy link
Collaborator Author

@ellemouton ellemouton Apr 14, 2022

Choose a reason for hiding this comment

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

i've opted to just using the existing config option rather than moving it to the ProtocolOptions struct since that would break the API which i dont think is worth it for this change. but happy to change it if reviewers disagree!

Copy link
Contributor

@tvolk131 tvolk131 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM 🪡

@Roasbeef Roasbeef modified the milestones: v0.16.0, v0.15.0 Apr 15, 2022
@Roasbeef Roasbeef merged commit 0b20dcc into lightningnetwork:master Apr 15, 2022
@ellemouton ellemouton deleted the keysendFeatureBit branch April 16, 2022 05:32
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.

Keysend feature bit announcement
3 participants