Commit Graph

45 Commits

Author SHA1 Message Date
Carla Kirk-Cohen
eaa85920ea
multi: enable optional route blinding feature 2024-04-26 11:35:17 -04:00
Oliver Gugger
648fb22f63
multi: wrap all errors 2024-04-11 15:04:03 +02:00
Keagan McClelland
dad53b3f9a Revert "feature: make gossip queries compulsory"
This reverts commit 717facc202.

It turns out that we can't do this since it would result in
incompatibility with LDK. The spec has been updated to reallow
optional gossip queries so we revert this commit.
2024-04-02 16:43:27 -07:00
Keagan McClelland
109265c77a multi: make static remote key compulsory 2024-01-11 13:58:01 -08:00
Keagan McClelland
d47338cd45 feature: fixup making data loss protection compulsory 2024-01-11 13:58:01 -08:00
Keagan McClelland
717facc202 feature: make gossip queries compulsory 2024-01-11 13:57:56 -08:00
Keagan McClelland
239103c2b3 multi: make tlv onion compulsory 2024-01-11 09:43:31 -08:00
bitcoin-lightning
b72fc9529e docs: fix typos 2023-12-21 15:21:35 +00:00
Olaoluwa Osuntokun
384b1b1c12
feature: use +100 staging bit for taproot channels
In this commit, we carry out a new notion introduced during a recent
spec meeting to use a feature bit plus 100 before the feature has been
finalized in the spec.

We split into the Final and Staging bits.
2023-08-22 16:34:28 -07:00
Olaoluwa Osuntokun
7323e9373b
feature+lncfg: add new CLI flag to opt into taproot chans 2023-08-22 16:32:35 -07:00
Olaoluwa Osuntokun
32f4f4cea7
feature: add SimpleTaprootChannelsOptional to the set of default chan types 2023-08-22 16:32:02 -07:00
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
Olaoluwa Osuntokun
5f9c1b902f
lnwire+feature: add awareness of option_shutdown_anysegwit
In this commit, we add awareness of the option_shutdown_anysegwit that
permits both sides to send newer segwit based addresses. This'll
eventually enable us to send taproot addresses for co-op close.
2022-08-10 18:44:26 -07:00
positiveblue
aee52294c7
feature: remove ScidAliasOptional dependency on ExplicitChannelTypeOptional
The [spec](https://github.com/lightning/bolts/blob/master/09-features.md)
does not specify a dependency between `ScidAliasOptional` (47) and
`ExplicitChannelTypeOptional` (45).

This bug lead to some connectivity issues with peers not setting the
45 feature bit while setting the 47.

The issue [6802](https://github.com/lightningnetwork/lnd/issues/6802) is
an example of this.
2022-08-08 10:11:06 -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
Tommy Volk
9a10c80bcb multi: move many t.Fatalf calls to require.NoError 2022-06-17 04:26:55 +00: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
Oliver Gugger
895a2e497b
multi: formatting and comment fixes 2022-02-10 11:02:02 +01: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
Olaoluwa Osuntokun
d0779e2ec2
lnwire: add new feature bits for explicit channel type negotiation
If these bits are present, then both sides can examine the new
CommitmentType TLV field that's present and use this in place of the
existing implicit commiment type negotiation. With this change, it's now
possible to actually deprecate old unsupported commitment types
properly.
2021-08-30 19:17:24 -07:00
Conner Fromknecht
e97da53676
feature: populate SetInvoiceAmp with TlvOpt+PayAddrReq+AmpReq 2021-05-10 16:55:16 -07:00
Conner Fromknecht
bbb841bd5f
feature/set: add SetInvoiceAmp
AMP invoices need to signal:
 - AMPRequired in order to avoid being paid by older clients that don't
   support it.
 - Can't advertised MPP optional, otherwise older clients will attempt
   to pay the invoice with regular MPP payment.

Hence, the features advertised on AMP invoices are mutually exclusive
from those advertised on MPP. Create a new set to classify the two.
2021-05-10 16:55:16 -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
82ccab606c
feature: flip the required bit for payment addr in invoices/payload
In this commit, we move to start requiring the payment addr feature bit
in the invoices we produce. With this change, if a user attempts to pay
one of our invoices (assuming they're also an lnd node), then they'll
receive an error when they attempt to pay. At this point, *most* lnd
nodes should be on v0.11 at this point, and this change will notify any
lagging wallet authors to update, as these payments are generally more
secure.
2020-11-25 16:31:50 -08:00
Olaoluwa Osuntokun
3825b9e463
feature: flip static remote key from optional to required
It's been sometime since we introduced this new safety enhancing feature
bit. At this point, we're now moving to require it as it makes our SCB
recovery system more robust, and it's also an implicit feature bit for
for anchor commitments as they're defined now.
2020-11-11 19:45:37 -08: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
Carsten Otto
a908a74acb Fix typos 2020-01-17 21:18:20 +00:00
Conner Fromknecht
f9a1acfbe4
feature/required: add ValidateRequired method
This wraps the raw UnknownRequiredFeatures method and returns a proper
error type to enable more exact testing.
2020-01-08 12:24:37 -08:00
Conner Fromknecht
1dbeb34a66
feature/default_sets: expose optional mpp and pay_addr features IN9 2019-12-18 23:58:11 -08:00
Conner Fromknecht
acb7b83ead
routing/pathfind: validate final hop feature dependencies 2019-12-18 23:54:11 -08: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
868a5425c1
feature/deps: validate feature dependencies 2019-12-16 13:06:30 -08:00
carla
cc7accea3d
mulit: Signal support for upfront shutdown
This commit enables signalling for the optional
upfront shutdown script feature bit.
2019-12-03 11:38:29 +02: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