Skip to content

Commit 53b6738

Browse files
committed
Document better optional features.
1 parent a3ad88a commit 53b6738

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

lightning/src/ln/features.rs

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,81 @@
1818
//! the term "supports" is used in reference to a particular set of [`Features`]. That is, a node
1919
//! supports a feature if it advertises the feature (as either required or optional) to its peers.
2020
//! And the implementation can interpret a feature if the feature is known to it.
21+
//!
22+
//! The following features are currently supported in the LDK:
23+
//! - `DataLossProtect` - requires/supports that a node, which has somehow fallen behind (e.g. has been restored from old backup),
24+
//! can detect that it has fallen behind
25+
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
26+
//! - `set_data_loss_protect_optional` - sets this feature to optional.
27+
//! - `set_data_loss_protect_required` - sets this feature to required.
28+
//! - `supports_data_loss_protect` - checks if this feature is supported.
29+
//! - `requires_data_loss_protect` - checks if this feature is required.
30+
//! - `InitialRoutingSync` - requires/supports that the sending node needs a complete routing information dump
31+
//! (see [BOLT-7](https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#initial-sync) for more information).
32+
//! - `set_initial_routing_sync_optional` - sets this feature to optional.
33+
//! - `set_initial_routing_sync_required` - sets this feature to required.
34+
//! - `initial_routing_sync` - checks if this feature is supported.
35+
//! - `UpfrontShutdownScript` - commits to a shutdown scriptpubkey when opening a channel
36+
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel-message) for more information).
37+
//! - `set_upfront_shutdown_script_optional` - sets this feature to optional.
38+
//! - `set_upfront_shutdown_script_required` - sets this feature to required.
39+
//! - `supports_upfront_shutdown_script` - checks if this feature is supported.
40+
//! - `requires_upfront_shutdown_script` - checks if this feature is required.
41+
//! - `GossipQueries` - requires/supports more sophisticated gossip control
42+
//! (see [BOLT-7](https://github.com/lightning/bolts/blob/master/07-routing-gossip.md)
43+
//! for more information).
44+
//! - `set_gossip_queries_optional` - sets this feature to optional.
45+
//! - `set_gossip_queries_required` - sets this feature to required.
46+
//! - `supports_gossip_queries` - checks if this feature is supported.
47+
//! - `requires_gossip_queries` - checks if this feature is required.
48+
//! - `VariableLengthOnion` - requires/supports variable-length routing onion payloads
49+
//! (see [BOLT-4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md) for more information).
50+
//! - `set_variable_length_onion_optional` - sets this feature to optional.
51+
//! - `set_variable_length_onion_required` - sets this feature to required.
52+
//! - `supports_variable_length_onion`- checks if this feature is supported.
53+
//! - `requires_variable_length_onion` - checks if this feature is required.
54+
//! - `StaticRemoteKey` - requires/supports static key for remote output
55+
//! (see [BOLT-3](https://github.com/lightning/bolts/blob/master/03-transactions.md) for more information).
56+
//! - `set_static_remote_key_optional` - sets this feature to optional.
57+
//! - `set_static_remote_key_required` - sets this feature to required.
58+
//! - `supports_static_remote_key` - checks if this feature is supported.
59+
//! - `requires_static_remote_key` - checks if this feature is required.
60+
//! - `PaymentSecret` - requires/supports that a node supports payment_secret field
61+
//! (see [BOLT-4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md) for more information).
62+
//! - `set_payment_secret_optional` - sets this feature to optional.
63+
//! - `set_payment_secret_required` - sets this feature to required.
64+
//! - `supports_payment_secret` - checks if the feature is supported.
65+
//! - `requires_payment_secret` - checks if the feature is required.
66+
//! - `BasicMPP` - requires/supports that a node can receive basic multi-part payments
67+
//! (see [BOLT-4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md#basic-multi-part-payments) for more information).
68+
//! - `set_basic_mpp_optional` - sets this feature to optional.
69+
//! - `set_basic_mpp_required` - sets this feature to required.
70+
//! - `supports_basic_mpp` - checks if the feature is supported.
71+
//! - `requires_basic_mpp` - checks if the feature is required.
72+
//! - `ShutdownAnySegwit` - requires/supports that future segwit versions are allowed in `shutdown`
73+
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#closing-initiation-shutdown) for more information).
74+
//! - `set_shutdown_any_segwit_optional` - sets this feature to optional.
75+
//! - `set_shutdown_any_segwit_required` - sets this feature to required.
76+
//! - `supports_shutdown_anysegwit` - checks if the feature is supported.
77+
//! - `requires_shutdown_anysegwit` - checks if the feature is required.
78+
//! - `ChannelType` - node supports the channel_type field in open/accept
79+
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#closing-initiation-shutdown) for more information).
80+
//! - `set_channel_type_optional` - sets this feature to optional.
81+
//! - `set_channel_type_required` - sets this feature to required.
82+
//! - `supports_channel_type` - checks if the feature is supported.
83+
//! - `requires_channel_type` - checks if the feature is required.
84+
//! - `SCIDPrivacy` - supply channel aliases for routing
85+
//! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#closing-initiation-shutdown) for more information).
86+
//! - `set_scid_privacy_optional` - sets this feature to optional.
87+
//! - `set_scid_privacy_required` - sets this feature to required.
88+
//! - `supports_scid_privacy` - checks if the feature is supported.
89+
//! - `requires_scid_privacy` - checks if the feature is required.
90+
//! - `Keysend` - send funds to a node without an invoice
91+
//! (see [BOLT-11](https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) for more information).
92+
//! - `set_keysend_optional` - sets this feature to optional.
93+
//! - `set_keysend_required` - sets this feature to required.
94+
//! - `supports_keysend` - checks if the feature is supported.
95+
//! - `requires_keysend` - checks if the feature is required.
2196
//!
2297
//! [BOLT #9]: https://github.com/lightning/bolts/blob/master/09-features.md
2398
//! [messages]: crate::ln::msgs

0 commit comments

Comments
 (0)