Commit Graph

19 Commits

Author SHA1 Message Date
Carla Kirk-Cohen
fe7cad2695
features: disallow unsetting of config-set features 2023-05-04 10:35:49 -04:00
Carla Kirk-Cohen
4e36e2fd2b
multi: add custom feature bits to config options 2023-05-04 10:35:48 -04:00
Carla Kirk-Cohen
4e98f4da5e
feature/refactor: unexport set raw 2023-05-04 10:35:47 -04:00
Carla Kirk-Cohen
019127c4f4
multi: add restriction on maximum feature bit in invoices
Base 32 encoded bolt 11 invoices only allow 10 bits to express the
length of the feature vector in a tagged field, so there is a much
lower limit on the values invoice custom features can hold.

Other places in the protocol are theoretically limited by the maximum
message size, but since we express a feature bit as u16 we don't need
to be concerned about this.

The decision is made to track maximum per-set in the feature manager,
which is conceptually aware of sets and then validate in lnwire/features
against some arbitrary maximum value provided to the caller to keep
the base features package unaware of sets.
2023-05-04 10:35:45 -04:00
Carla Kirk-Cohen
5a139fd297
feature: add update function for safe feature update
Disallow update of any features that are defined by LND (since
just updating the feature, but not the functionality will result in
strange behavior). All known feature bits should be toggled using
protocol config options.
2023-05-04 10:35:44 -04:00
Olaoluwa Osuntokun
89529fbb4f
feature+lncfg: add config option to turn of anysegwit 2022-08-10 18:44:37 -07:00
eugene
a6c62eb71e
lnwire+feature: new zero-conf, scid-alias feature bit + chantypes
This defines the zero-conf feature bit, the scid-alias feature bit,
the zero-conf channel type, and the scid-alias channel type. It also
defines the dependency "tree" that exists for the feature bits.

The scid-alias feature bit signals that the node requires an alias
short channel id to be sent in funding_locked. The scid-alias channel
type requires that the channel is private, in addition to some other
forwarding-related privacy measures.
2022-07-07 17:10:24 -04:00
Elle Mouton
c54cc6e841
multi: announce Keysend feature bit
In this commit, we add the keysend feature bit to our NodeAnnouncement
if the accept-keysend option is set.
2022-04-14 14:01:19 +02:00
positiveblue
ae2aa5671f
lnrpc/peers: handle feature bit changes in updateNodeAnnouncement 2022-04-02 19:10:25 -07:00
Dimitris Apostolou
530a2059e5
multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
Olaoluwa Osuntokun
31ae48c59c
feature: if a bit is unset, then all other features that dep it should be
This fixes an issue where if one tries to unset a feature like anchors,
and other feature depend on it, then `lnd` fails to start as it realizes
that its dependnacy set is inconsistent.

Fixes https://github.com/lightningnetwork/lnd/issues/6002
2021-11-24 14:35:34 +01:00
Wilmer Paulino
6052a446dc
lnwire+feature: add feature bit for script enforced lease support 2021-10-19 18:30:14 -07:00
Conner Fromknecht
438b03afa4
features: define temporary AMP feature bits 30/31 2021-04-07 12:08:34 -07:00
Johan T. Halseth
abefa93065
lnwire+feature: define AnchorsZeroFeeHtlcTx feature 2020-12-15 10:13:04 +01:00
Olaoluwa Osuntokun
73cdb6a50f
feature: add feature sets for the wumbo channel feature bit 2020-07-10 16:27:11 -07:00
Johan T. Halseth
21126ab0f3
multi: optionally enable and signal anchor support
Defaults to disabled.
2020-03-09 12:59:34 +01:00
carla
496434259a
feature: add ListSets function 2019-12-17 23:18:33 +02:00
Conner Fromknecht
3208e287c3
feature/manager: ensure all feature sets properly set deps 2019-12-16 13:06:45 -08:00
Conner Fromknecht
fe566e1755
feature: add new feature pkg to manage feature sets
This commit introduces a feature.Manager, which derives feature vectors
for various contexts within the daemon. The sets can be described via a
staticly compiled format, which makes any runtime adjustments to the
feature sets when the manager is initialized.
2019-11-08 05:29:16 -08:00