Commit Graph

14778 Commits

Author SHA1 Message Date
ziggie
469dfd5f42
make: add benchmark tests
Add benchmark tests as a separate test run besides the current
unit tests.
2023-05-09 16:47:47 +02:00
ziggie
8f4e9d68d0
lnwire_test: fix BenchmarkReadMessage test
The addition of AliasScid in the tlv_stream field of the
funding_locked msg made the requirement for testdata of the
ExtraOpaqueData part for the funding_locked msg type more strict.
Now the input testdata for the funding_locked test is more specific
and includes the new added AliasScid tlv record.
2023-05-09 16:47:44 +02:00
Oliver Gugger
8df4edef1b
Merge pull request #7624 from ellemouton/marshalBytesAndStringTxid
multi: populate both string and byte TXID in lnrpc.Outpoint
2023-05-08 17:32:54 +02:00
Oliver Gugger
eaa8aa7496
Merge pull request #7678 from erikarvstedt/fix-cert-key-plaintext-detection
Restore support for `PKCS8`-encoded cert private keys
2023-05-08 15:12:41 +02:00
Erik Arvstedt
d21abf9fc0 docs: update release notes 2023-05-08 10:29:06 +02:00
Erik Arvstedt
3004deb045 lnd: Restore support for PKCS8-encoded cert private keys
c0f44a17b7, available since `v0.16.x`,
broke support for certificate private keys encoded in the widely-used
`PKCS8` format.
2023-05-08 07:33:25 +02:00
Olaoluwa Osuntokun
04314d3254
Merge pull request #7667 from ziggie1984/log-fix-typo
[skip ci] htlcswitch: fix double sat/kw output
2023-05-04 11:59:54 -05:00
Oliver Gugger
728452636a
Merge pull request #7568 from carlaKC/7094-updatefeaturemanager
Add config options for custom feature bits
2023-05-04 18:35:23 +02:00
Carla Kirk-Cohen
820920a749
docs: add release notes 2023-05-04 10:42:44 -04:00
Carla Kirk-Cohen
ad6ccb415f
lncli: fix typo in updatenodeannouncement 2023-05-04 10:42:37 -04:00
Carla Kirk-Cohen
019da315a8
itest: add coverage for custom features 2023-05-04 10:42:17 -04: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
e41c65785f
multi: update node announcement features in feature manager first
Move merge of our features into the feature manager, rather than
updating our node announcement then retrospectively setting the
feature manger's set to the new vector. This allows us to use the
feature vector as our single source of truth for announcements.
2023-05-04 10:35:46 -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
Carla Kirk-Cohen
1a9d743e18
lnwire: add feature vector update validation helpers 2023-05-04 10:35:43 -04:00
Carla Kirk-Cohen
3f9f0ea5d1
multi/refactor: separate methods for get and set node announcement
In preparation for a more complex function signature for set node
announcement, separate get and set so that readonly callers don't need
to handle the extra arguments.
2023-05-04 10:35:42 -04:00
Carla Kirk-Cohen
c6263c2fe6
multi/refactor: move node ann modification outside of sign method
In preparation for moving feature bit modification inside of the
feature manager, separate node modification from signing.
2023-05-04 10:35:41 -04:00
ziggie
1519742f8a
[skip ci] htlcswitch: fix double sat/kw output 2023-05-04 15:38:51 +02:00
Oliver Gugger
c6b736b169
Merge pull request #7631 from hieblmi/sendoutputs-reserve
rpc: anchor reserve check for `SendOutputs`
2023-05-04 10:30:32 +02:00
Slyghtning
79a06d1918 docs: update release notes 2023-04-29 22:44:26 +02:00
Slyghtning
77322dddb8 itest: anchor reserve test for SendOutputs 2023-04-29 22:44:26 +02:00
Slyghtning
8f5910bf91 rpc: fix code style 2023-04-29 22:44:26 +02:00
Slyghtning
903b5dde89 rpc: SendOutputs considers anchor reserve 2023-04-29 22:44:23 +02:00
Olaoluwa Osuntokun
3c8c057ea9
Merge pull request #7641 from Roasbeef/btcwallet-async
build: update to btcwallet version with async mempool scan
2023-04-28 14:02:10 -05:00
Olaoluwa Osuntokun
33047e69d9
Merge pull request #7647 from yyforyongyu/skip-checkpoint-resolver
contractcourt: skip checkpoint htlc outgoing resolver if it's resolved
2023-04-28 14:01:14 -05:00
yyforyongyu
186569c610
contractcourt: skip checkpoint timeout resolver upon mempool spend
Previously when a block spend is found for the outpoint, our htlc
timeout resolver will do a checkpoint, which implicitly creates a db
record if there isn't one. Now, if the spend is found in mempool,
the resolver will be deleted once the contract is resolved. Later on
when the spend is found in the block again, the resolver will be created
again, but never gets resolved this time.
2023-04-28 20:38:01 +08:00
yyforyongyu
56dcda0f7c
contractcourt: add debug logs for unresolved contracts 2023-04-28 20:38:00 +08:00
Oliver Gugger
35917eb858
Merge pull request #7643 from ellemouton/lastFewFundingLockeds
multi: catch a few uncaught instances of "funding locked"
2023-04-28 10:05:16 +02:00
Olaoluwa Osuntokun
239da9268c
build: update to btcwallet version with async mempool scan
This version of btcwallet demotes some spammy logs (txns replaced in the
mempool), and makes the initial mempool scan async.

Fixes https://github.com/lightningnetwork/lnd/issues/7640
2023-04-27 16:27:26 -05:00
Elle Mouton
ef17b12a86
funding: update "funding locked" in error string
Replace a few uncaught instances of "funding locked" found in error
strings with "channel_ready"
2023-04-27 20:03:44 +02:00
Elle Mouton
9ea3f55694
multi: update "funding locked" comments
Replace a few un-caught instances of "funding locked" in some comments
with "channel_ready"
2023-04-27 20:02:34 +02:00
Oliver Gugger
7854b73892
Merge pull request #7592 from sangaman/gen-default-macaroons-independently
lnd: generate default macaroons independently
2023-04-27 14:04:27 +02:00
Daniel McNally
16463d4bd4
lnd: generate default macaroons independently
This modifies the `genMacaroons` logic to indepently check for each of
the three default macaroons (admin, readonly, invoice) and generate
whichever are missing. Previously, this was an all or nothing routine.
In other words, either all three didn't exist on disk and all three are
created, or no macaroons are created. Although that works for the first
run of a new node, it can result in inconsistent states if only one or
two of the macaroons is deleted.

See https://github.com/lightningnetwork/lnd/discussions/7566.
2023-04-26 13:30:03 -04:00
Oliver Gugger
fdc1ae9d57
Merge pull request #7635 from GeorgeTsagk/node-sync-err
routing: log node pubkey as hex
2023-04-26 08:59:07 +02:00
Oliver Gugger
0bc82d3038
Merge pull request #7637 from yyforyongyu/fix-itest-panic
Fix panic when canceling rebroadcast for neutrino backend
2023-04-26 08:58:39 +02:00
yyforyongyu
403c1baca6
lnd: skip canceling rebroadcast for neutrino backend 2023-04-26 10:38:13 +08:00
George Tsagkarelis
dd93fc2539
routing: log node pubkey as hex 2023-04-25 21:27:24 +03:00
Elle Mouton
7b186716a1
multi: populate both string and byte TXID in lnrpc.Outpoint
This commit adds a a new `MarshalOutPoint` helper in the `lnrpc` package
that can be used to convert a `wire.Outpoint` to an `lnrpc.Outpoint`.
By using this helper, we are less likely to forget to populate both the
string and byte form of the TXID.
2023-04-24 16:19:26 +02:00
Oliver Gugger
4355ce62d2
Merge pull request #7623 from ellemouton/queueBackupIDOnly
wtclient: queue backup id only
2023-04-24 15:36:09 +02:00
Elle Mouton
9a1ed8c7b2
docs: update release notes 2023-04-24 13:15:40 +02:00
Elle Mouton
08cde98869
wtclient: add mutex locking in perUpdate
Lock the `backupMu` when accessing `c.chanCommitHeights` in the `New`
function. It is not strictly necessary right now but good to add it so
that there is no accidental oversight if the `perUpdate` method is ever
extracted and reused in future.
2023-04-24 13:15:40 +02:00
Elle Mouton
65dc20f2cc
wtclient: let task pipeline only carry wtdb.BackupID
Since the retrubution info of a backup task is now only constructed at
the time that the task is being bound to a session, the in-memory queue
only needs to carry the BackupID of the task.
2023-04-24 13:15:40 +02:00
Elle Mouton
2371bbf09a
wtclient: only fetch retribution info when needed.
Only construct the retribution info at the time that the backup task is
being bound to a session.
2023-04-24 13:15:40 +02:00
Elle Mouton
458ac32146
multi: build retribution info in TowerClient
Since the TowerClient now has a callback that it can use to retrieve the
retribution for a certain channel and commit height, let it use this
call back instead of requiring the info to be passed to it through
BackupState.
2023-04-24 13:15:40 +02:00
Elle Mouton
530a8cae5d
wtclient: lint the package
This commit fixes some lints in the wtclient package. This is done so
that upcoming logic changes are easier to parse.
2023-04-24 13:15:40 +02:00
Elle Mouton
85ec38f447
multi: pass BuildBreachRetribution callback to tower client
In this commit, a new BuildBreachRetribution callback is added to the
tower client's Config struct. The main LND server provides the client
with an implementation of the callback.
2023-04-24 13:15:40 +02:00
Elle Mouton
fe2304efad
channeldb: add a FetchChannelByID method
Add a FetchChannelByID method that allows a caller to fetch an
OpenChannel using an lnwire.ChannelID.
2023-04-24 13:15:40 +02:00