Commit Graph

42 Commits

Author SHA1 Message Date
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
yyforyongyu
550341c036
lnwire: fix typo 2020-12-04 23:07:53 +08:00
Olaoluwa Osuntokun
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
Johan T. Halseth
724f439b0b
lnwire: update anchor bit to spec 2020-09-11 11:10:58 +02:00
Bjarne Magnussen
954e292895
lnwire: fix minor typos in wumbo features 2020-07-20 08:36:39 +02:00
Olaoluwa Osuntokun
1b8fd008c4
lnwire: define feature bits for wumbo channels 2020-07-10 16:27:10 -07:00
Johan T. Halseth
21126ab0f3
multi: optionally enable and signal anchor support
Defaults to disabled.
2020-03-09 12:59:34 +01: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
9025a30f5d
lnwire/features: add EmptyFeatureVector constructor 2019-12-18 23:52:44 -08:00
Conner Fromknecht
24e663519a
lnwire/features: add payment-addr and mpp feature bits 2019-12-16 13:06:15 -08:00
Conner Fromknecht
a168f37b9c
lnwire+rpcserver: populate feature bits on decodepayreq 2019-12-10 13:09:36 -08:00
Conner Fromknecht
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
Steven Roose
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
Conner Fromknecht
4c872c438b
channeldb: complete migration 12 for TLV invoices 2019-11-22 02:24:28 -08:00
Conner Fromknecht
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
Conner Fromknecht
5e27b5022c
multi: remove LocalFeatures and GlobalFeatures 2019-11-08 05:32:00 -08:00
Conner Fromknecht
16318c5a41
multi: merge local+global features from remote peer 2019-11-08 05:31:47 -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
Conner Fromknecht
90e36ca04b
lnwire/features: add unified Features namespace 2019-11-08 05:28:47 -08:00
Conner Fromknecht
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
Olaoluwa Osuntokun
a9541b8f6a
lnwire: define new feature bits for commitment's with tweakless remote outputs 2019-09-25 18:25:32 -07:00
Conner Fromknecht
8c2176fbf8
lnwire/features: add EncodeBase32 and DecodeBase32 w/ generic helpers 2019-08-27 15:51:24 -07:00
Conner Fromknecht
2953f3532a
lnwire/features: add SerializeSize32 for base32 encodings 2019-08-27 15:51:24 -07:00
Olaoluwa Osuntokun
9145c0fd38
lnwire: add new TLV onion feature bits 2019-08-22 18:53:06 -07:00
nsa
7a65be7f14 lnwire: features "maxAllowedSize" fix 2019-02-06 07:02:10 -05:00
Olaoluwa Osuntokun
5c434b17ff
lnwire: ensure even/odd features have the same base name
In this commit, we fix a bug in the way we defined our even/odd features
for a particular feature. The check for if a feature bit is part of a
pair assumes that the pair bit has the exact same name as the bit being
queried. The way we defined our feature map didn't take note of this
assumption, as a result, any attempts to require a new bit moving from
optional to required would fail since the bit would be found, but the
names differed.
2019-01-31 20:58:10 -08:00
Conner Fromknecht
055dc233a1 lnwire/features: add required gq to local features
This commit adds the required feature name to our
set of local known features. This will allow other
peers connecting to us to set the required gossip
queries feature bit. This is required for the
subsequent commits, which instruct the server to
set the bit depending on user configured preferences.
2018-09-05 18:51:04 -07:00
Olaoluwa Osuntokun
fa6a0a7ce9
lnwire: recognize required query sync feature bit 2018-08-23 19:36:17 -07:00
Olaoluwa Osuntokun
c5065fcdba
lnwire: add new gossip query required+optional feature bits 2018-05-31 16:30:49 -07:00
Olaoluwa Osuntokun
0fcd9ce7c8
lnwire: add recognition of the data loss proected feature bit
In this commit, we add recognition of the data loss protected feature
bit. We already implement the full feature set, but then never added the
bit to our set of known features.
2018-05-31 16:30:44 -07:00
Olaoluwa Osuntokun
53f1743be0
lnwire: fix serialization order of global+local features in Init msg
Fixes #428.
2017-11-17 13:27:23 -08:00
Jim Posen
9fd77a6e40 multi: Update lnd to use new feature vector API. 2017-10-17 22:47:20 -07:00
Jim Posen
1633ab180f lnwire: New API for feature vectors.
This is a rewrite of feature vectors in lnwire. This has a few
benefits:

1) a simpler interface
2) separate structs for a plain set of feature bits and a feature
vector with associated feature names
their respective feature sets
3) loosened requirements that bits MUST be assigned in pairs
4) fix endianness of encoding/decoding
2017-10-17 22:47:20 -07:00
nsa
d65f17f1b1 fuzzing: fixed calculation of serializedSize() in features.go
This commit fixes an incorrectly calculated size of a
*FeatureVector in the serializedSize() function. go-fuzz
found that when calling NewFeatureVectorFromReader, if
a flag is invalid, it is not added to f.flags. However,
it will skip the index that wasn't included. This
becomes a problem when serializedSize() calculates the
length of f.flags via len() which can lead to an index
out of range since certain flags may be missing.
2017-09-19 16:21:31 -07:00
Olaoluwa Osuntokun
587300aa80
lnwire: use ReadFull instead of Read when parsing feature vectors
This commit fixes a bug lingering in the decoding of the feature
vectors which was masked by the prior method of reading the _entire_
message from the stream before parsing it. The issue was that
performing a zero-byte Read on an io.Reader that’s purely streaming
will result in an indefinite block. We fix this bug by properly using
io.ReadFull in this context.
2017-04-19 16:07:17 -07:00
Olaoluwa Osuntokun
0db384fd6b
lnwire: properly fold at 80-columns within features.go 2017-03-16 12:12:00 -07:00
Andrey Samokhvalov
fd97a4bd19 lnd: partially fix golint warnings 2017-03-13 16:30:23 -07:00
Andrey Samokhvalov
8fb54782e2 lnd: fix gosimple warnings 2017-03-13 16:30:23 -07:00
Olaoluwa Osuntokun
f9b44567ed
lnwire: remove String() method from FeatureVector
This commit removes the String() method from the FeatureVector as it
can produce confusing output when revving a feature vector and not
knowing the strip mapping ahead of time.
2017-02-22 15:53:47 -08:00
Andrey Samokhvalov
ae15a193e2 lnwire+features: transition to the user friendly list of features 2017-02-21 01:25:05 -08:00
Andrey Samokhvalov
3dd619fb35 lnwire: Add BOLT#1 'init' message
'init' message is the first message reveals the features supported or required
by this node. Nodes wait for receipt of the other's features to simplify error
diagnosis where features are incompatible. This message will help negotioate the
the features which are supported by both sides.
2017-02-17 13:27:29 +08:00