Commit Graph

70 Commits

Author SHA1 Message Date
752fc86c7d lnwire: add feature bits for new rbf coop close 2025-03-18 11:44:20 -05:00
ab7aae0708 multi: rename nolint:lll to nolint:ll
Find and replace all nolint instances refering to the `lll` linter and
replace with `ll` which is the name of our custom version of the `lll`
linter which can be used to ignore log lines during linting.

The next commit will do the configuration of the custom linter and
disable the default one.
2024-12-02 09:14:21 +02:00
7a5b55a473 lnwire: signal that we support quiescence 2024-11-26 13:51:56 -07:00
f02bb58486 multi: add experimental endorsement feature bit and disable option 2024-11-22 09:16:58 -05:00
7f9268c38f lnwire: add new taproot chans overlay feature bit 2024-10-02 18:10:04 -07:00
66302ceb29 lnwire: make RawFeatureVector a Record producer 2024-09-18 16:14:58 +02:00
f1a58dcab1 lnwire: update Bolt11 blinded path feature bits
so that they dont clash with the htlc-endorsement feature bits.
2024-08-07 20:13:34 +02:00
9192c165ff feature: define new feature bit for bolt11 blinded paths
We need a new feature bit for BOLT11 invoices in order to indicate that
they contain the new blinded path tagged field. Tagged fields pre-date
TLV and so nodes who dont understand them will simply skip them.
Therefore the feature bit helps them to fail fast.
2024-07-26 09:53:49 +02:00
eaa85920ea multi: enable optional route blinding feature 2024-04-26 11:35:17 -04:00
d8979d3086 multi: add validation of blinded route encrypted data
Co-authored-by: Calvin Zachman <calvin.zachman@protonmail.com>
2024-03-27 09:36:40 -04:00
c48841a38b record: add TLV encoding/decoding for blinded route data blobs
This commit adds encoding and decoding for blinded route data blobs.
TLV fields such as path_id (which are only used for the final hop)
are omitted to minimize the change size.
2024-03-27 09:36:39 -04:00
3cc50ced55 lnwire: create common encoder/decoder for raw feature vectors
We'll need to pack feature vectors for route blinding, so we pull
the encoding/decoding out into separate functions (currently
contained in ChannelType). Though it's more lines of code, we keep
most of the ChannelType assertions so that we strictly enforce
use of the alias.
2024-03-27 09:36:38 -04:00
78d9996620 trivial: Fix spelling errors
- Fixes some spelling in code comments and a couple of function names
2023-09-21 22:35:33 -04:00
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
eccc77315b lnwire: add feature bits for simple taproot chans 2023-08-22 16:29:17 -07:00
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
1a9d743e18 lnwire: add feature vector update validation helpers 2023-05-04 10:35:43 -04:00
f8a8326141 multi: replace FundingLocked and funding_locked strings
This commit is created by running the following commands,
```shell
find . -name "*.go" -exec sed -i '' 's/\"FundingLocked/\"ChannelReady/g' {} \;
find . -name "*.go" -exec sed -i '' 's/FundingLocked\"/ChannelReady\"/g' {} \;
find . -name "*.go" -exec sed -i '' 's/\ funding_locked/\ channel_ready/g' {} \;
```
2023-03-17 18:21:59 +08:00
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
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
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
9195f29e61 routing+channeldb: send payment metadata from invoice 2022-04-13 22:55:40 +02:00
60a1f2d8d9 Merge pull request #5874 from Roasbeef/chan-type-feature-bit-fix
lnwire: switch chan_type feature to bits 44/45
2021-10-25 14:19:29 -07:00
6052a446dc lnwire+feature: add feature bit for script enforced lease support 2021-10-19 18:30:14 -07:00
028fc86e5c lnwire: switch chan_type feature to bits 44/45
We were using an older feature bit that was just "selected". This commit
has us use the feature bit officially included in the spec.

See https://github.com/lightningnetwork/lightning-rfc/pull/906
2021-10-19 17:40:33 -07:00
031d7b1d55 lnwire: extend RawFeatureVector with helper methods 2021-08-30 19:17:31 -07:00
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
e381b33b21 lnwire: fix typo in docs 2021-08-10 05:36:08 +08:00
438b03afa4 features: define temporary AMP feature bits 30/31 2021-04-07 12:08:34 -07:00
abefa93065 lnwire+feature: define AnchorsZeroFeeHtlcTx feature 2020-12-15 10:13:04 +01:00
550341c036 lnwire: fix typo 2020-12-04 23:07:53 +08:00
baeceb2a0b lnwire: add new RequiresFeature method
In this commit, we add a new RequiresFeature method to the feature
vector struct. This method allows us to check if the set of features
we're examining *require* that the even portion of a bit pair be set.
This can be used to check if new behavior should be allowed (after we
flip new bits to be required) for existing contexts.
2020-11-25 16:31:56 -08:00
724f439b0b lnwire: update anchor bit to spec 2020-09-11 11:10:58 +02:00
954e292895 lnwire: fix minor typos in wumbo features 2020-07-20 08:36:39 +02:00
1b8fd008c4 lnwire: define feature bits for wumbo channels 2020-07-10 16:27:10 -07:00
21126ab0f3 multi: optionally enable and signal anchor support
Defaults to disabled.
2020-03-09 12:59:34 +01:00
1dbeb34a66 feature/default_sets: expose optional mpp and pay_addr features IN9 2019-12-18 23:58:11 -08:00
9025a30f5d lnwire/features: add EmptyFeatureVector constructor 2019-12-18 23:52:44 -08:00
24e663519a lnwire/features: add payment-addr and mpp feature bits 2019-12-16 13:06:15 -08:00
a168f37b9c lnwire+rpcserver: populate feature bits on decodepayreq 2019-12-10 13:09:36 -08:00
f34239889b lnwire/feature: remove feature bit number from name
The number and the name will be separate on the rpc level, so we remove
the feature bit from the string. Currently this method is unused apart
from maybe in some rare logging instances.
2019-12-10 13:08:59 -08:00
2fb7172725 lnwire: Add upfront shutdown messages and feature bit
This commit adds the feature bit and additional fields
required in `open_channel` and `accept_channel` wire
messages for `option_upfront_shutdown_script`.
2019-12-03 11:38:21 +02:00
4c872c438b channeldb: complete migration 12 for TLV invoices 2019-11-22 02:24:28 -08:00
c6a01f02cd lnwire/features: add Encode256 and Decode256
These will allow us to serialize invoice features bits without double
encoding the length.
2019-11-22 02:23:35 -08:00
5e27b5022c multi: remove LocalFeatures and GlobalFeatures 2019-11-08 05:32:00 -08:00
16318c5a41 multi: merge local+global features from remote peer 2019-11-08 05:31:47 -08:00
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
90e36ca04b lnwire/features: add unified Features namespace 2019-11-08 05:28:47 -08:00
65a991999d lnwire/features: static_remote_key bits, 10/11 -> 12/13
Final version of spec allocated 12/13 to option_static_remote_key.
2019-10-02 03:33:22 -07:00
a9541b8f6a lnwire: define new feature bits for commitment's with tweakless remote outputs 2019-09-25 18:25:32 -07:00