Expose node-invariant features via NodeStatus#810
Conversation
|
👋 Thanks for assigning @tnull as a reviewer! |
There was a problem hiding this comment.
I'm not convinced we should expose this as freestanding APIs. Note that for channels and invoices these might also might be confusing as people really would be interested in the negotiated features, not what we generally, maybe support.
I guess we could consider to find a way to expose the invariant node features via an API (or maybe Node::status) if that would be useful, but for channels we should do #305 and maybe expose features in a sane way through list_channels. But note all of this should also work in bindings, so reusing LDK types might be challenging.
e1acc25 to
3ac1658
Compare
3ac1658 to
5a87041
Compare
I agree too. I only added them after reviewing cln-grpc and thought parity with them (on ldk-server) would make sense. I've removed the free-standing APIs.
I've just opened #841 in relation to this. |
|
🔔 1st Reminder Hey @joostjager! This PR has been waiting for your review. |
|
🔔 2nd Reminder Hey @joostjager! This PR has been waiting for your review. |
Expose the feature flags advertised by the node in its node_announcement message via NodeStatus::node_features. For UniFFI consumers, expose NodeFeatures as an object with BOLT 9 byte encoding helpers and typed feature accessors. This intentionally avoids exposing freestanding Node methods for init, channel, invoice, or node feature contexts. Channel and invoice features are context-specific, and exposing node-level helpers for them could be confused with negotiated per-peer, per-channel, or per-invoice features. Those negotiated feature surfaces are handled separately.
Switch the UniFFI NodeFeatures exposure from a raw custom Vec<u8> conversion to an object wrapper with BOLT 9 byte encoding helpers and typed feature accessors.
5a87041 to
0668b4f
Compare
For node features, I've decided to expose via |
What this PR does
For users interested in features announced in
node_announcement, we make node_features available viaNode::status().The plan is to modify
ldk-server'shandle_get_node_info_requestand make features available onGetNodeInfoResponseso that the node's supported features are available to any requesting client.lnrpcandcln-grpcmake these fields available in the response toget_node_info.This is in relation to an exploratory
sim-lnPR seeking to support/integrateldk-node/server.