Expose node features in GetNodeInfoResponse#231
Open
enigbe wants to merge 2 commits into
Open
Conversation
We return the node-announcement feature set from GetNodeInfoResponse so clients can inspect advertised node capabilities, such as keysend support, directly from the node info API. For now, only features advertised in node_announcement are populated. We document this narrower contract explicitly while leaving the Features message shape open for future parity with APIs such as cln-grpc, where the default feature set may also include init, channel, and invoice features. AI-Assisted-By: OpenAI Codex
|
👋 Thanks for assigning @benthecarman as a reviewer! |
Collaborator
|
We just get a list like this would be better if this had some more info, at least giving the name of each feature so we knew what it represented |
Decode exposed features into semantic entries We replace raw feature bytes, as previously used in NodeFeatures, with decoded Feature entries so clients can inspect the feature name, support bit, required bit, and known-ness directly. Given the structure of LDK Features, which are different based on contexts, we create and use this shared Feature shape for invoice, offer, and node feature contexts, with the conversion logic centralized in proto_adapter (see features_to_proto). Additionally, we also update the CLI e2e assertions to check keysend support through the readable get-node-info feature response.
da2670e to
795b695
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
To run payment-activity simulations against networks of
ldk-servernodes, clients such assim-lnneed to know whether a server advertises support for capabilities likekeysendin itsnode_announcement.This PR exposes node-announcement features through
GetNodeInfoResponse.features, allowing clients to query the node directly for its advertised feature set. For now, only node-announcement features are populated; the proto documentation reflects this narrower contract while leaving room for future expansion to other feature contexts.This is needed by the ongoing
sim-lnwork in bitcoin-dev-project/sim-ln#307.