Skip to content

Expose node features in GetNodeInfoResponse#231

Open
enigbe wants to merge 2 commits into
lightningdevkit:mainfrom
enigbe:2026-02-expose-node-features-in-getnodeinforesponse
Open

Expose node features in GetNodeInfoResponse#231
enigbe wants to merge 2 commits into
lightningdevkit:mainfrom
enigbe:2026-02-expose-node-features-in-getnodeinforesponse

Conversation

@enigbe

@enigbe enigbe commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What this PR does:

To run payment-activity simulations against networks of ldk-server nodes, clients such as sim-ln need to know whether a server advertises support for capabilities like keysend in its node_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-ln work in bitcoin-dev-project/sim-ln#307.

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
@ldk-reviews-bot

ldk-reviews-bot commented Jun 12, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @benthecarman as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@benthecarman

Copy link
Copy Markdown
Collaborator

We just get a list like this

  "features": {
    "node": [
      0,
      8,
      128,
      136,
      152,
      136,
      10,
      138,
      81,
      161
    ]
  }

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.
@enigbe enigbe force-pushed the 2026-02-expose-node-features-in-getnodeinforesponse branch from da2670e to 795b695 Compare June 13, 2026 09:14
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.

3 participants