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

[feature]: allow feature bits to be sent using peersrpc.UpdateNodeAnnouncement #7094

Closed
Roasbeef opened this issue Oct 29, 2022 · 6 comments · Fixed by #7568
Closed

[feature]: allow feature bits to be sent using peersrpc.UpdateNodeAnnouncement #7094

Roasbeef opened this issue Oct 29, 2022 · 6 comments · Fixed by #7568
Assignees
Labels
enhancement Improvements to existing features / behaviour feature bits node-management tlv wire protocol Encoding of messages for the communication between nodes
Milestone

Comments

@Roasbeef
Copy link
Member

Is your feature request related to a problem? Please describe.

Today it's possible to create all sorts of meta/overlay protocols that hook into lnd using the various interceptors we have. However, none of these are able to currently advertise feature bits or custom TLVs in the node announcement message.

Describe the solution you'd like

Extend the new UpdateNodeAnnouncement RPC call to allow feature bits to be set.

Only feature bits that lnd doesn't know about and/or isn't setting should be allowed. Otherwise it would be possible for a user to create a node ann that would actually be rejected by other peers due to things like violating dependnacy constraints.

The resposnse should tell the caller if their feature bits were able to be set or not, and the final set of feature bits that are now advertised.

With another small change, we can also enable custom TLV ranges to be set as well.

Describe alternatives you've considered

Only allow it in the config, but that wouldn't be that flexible.

@Roasbeef Roasbeef added enhancement Improvements to existing features / behaviour wire protocol Encoding of messages for the communication between nodes tlv node-management feature bits labels Oct 29, 2022
@joostjager
Copy link
Collaborator

You probably want to also allow in config?

@joostjager
Copy link
Collaborator

Related: #5587 (comment)

@carlaKC
Copy link
Collaborator

carlaKC commented Nov 16, 2022

This is actually mostly addressed in #5587, I'm going to put up a PR to allow setting feature bit values in config because I think that's useful for more "permanent" use cases.

Only feature bits that lnd doesn't know about and/or isn't setting should be allowed.

Do we want to update the API to add this restriction? As I read the current update code, we're allowed to set/unset features that are known to LND (provided dependencies remain valid). This would be a breaking change for the API, but I think it's pretty unlikely that people are using to to mess with defined protocol features?

@saubyk saubyk added this to the v0.16.0 milestone Nov 17, 2022
@saubyk saubyk modified the milestones: v0.16.0, v0.16.1 Feb 14, 2023
@saubyk saubyk removed this from the v0.16.1 milestone Mar 13, 2023
@SeverinAlexB
Copy link

Hi guys!
The LSPSpec group is working on a spec for channel purchase and Just-In-Time channels for wallets. This will be built on LNDs SendCustomMessage and thus should not require any of your developers time.

The spec will define a node announcement feature bit though. Is there any timeline for the extension of UpdateNodeAnnouncement? We at Synonym are using LND in our Blocktank product and the LSPSpec requires this feature bit.

Best regards
Sev

@ZmnSCPxj-jr
Copy link

To interject, the LSPS0 proposal also requires an init feature bit as well, not just node_announcement.

@carlaKC
Copy link
Collaborator

carlaKC commented Apr 4, 2023

To interject, the LSPS0 proposal also requires an init feature bit as well, not just node_announcement.

Picking this back up in #7568, will add the ability to configure LND with custom init features :)

@saubyk saubyk added this to the v0.17.0 milestone Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features / behaviour feature bits node-management tlv wire protocol Encoding of messages for the communication between nodes
Projects
No open projects
Status: Done
6 participants