Commit Graph

14354 Commits

Author SHA1 Message Date
Carla Kirk-Cohen
3cc8e81121
lncli/bugfix: use int64slice for update node announcement features
As is, we'll never get any add/remove features because the flag is
set as an int 64 slice but accessed as an int slice (which has no
value, and the cli doesn't fail if the flag doesn't exist).
2023-02-14 15:53:56 -05:00
Oliver Gugger
f245591e4b
Merge pull request #7386 from guggero/remote-signer-p2tr-inputs
remote signer: fix channel funding with mixed funding input types
2023-02-14 12:34:11 +01:00
Oliver Gugger
c79b0799bf
Merge pull request #7402 from bottlepay/final-resolution-info
rpcserver: expose store final htlc resolutions flag on info call
2023-02-13 23:12:32 +01:00
Oliver Gugger
8ade1acba3
Merge pull request #7399 from prusnak/sample-conf-whitespace
docs: fix whitespace in sample-lnd.conf
2023-02-13 12:54:42 +01:00
Joost Jager
784c0631f3
rpcserver: expose store final htlc resolutions flag on info call
The storage of final htlc resolutions is a safety-critical feature. By
exposing it through the GetInfo call, connected applications can
ensure that the feature is turned on and avoid relying on the assumption
that lnd was configured correctly.
2023-02-13 11:53:27 +01:00
Joost Jager
db5dc4d360
rpcserver: fix line lengths 2023-02-13 11:53:10 +01:00
Oliver Gugger
0c5971ba9e
Merge pull request #7392 from adiabat/hltcinterceptfix
HTLC Interceptor: Fix nil pointer dereference
2023-02-13 11:43:29 +01:00
Pavol Rusnak
2441c2e016
docs: fix whitespace in sample-lnd.conf 2023-02-12 11:30:19 +01:00
adiabat
17f7b9f322 routerrpc: Check for nil IncomingCircuitKey
The grpc stream.Recv() will decode an ForwardHtlcInterceptResponse
without an IncomingCircuit, which will leave that pointer nil,
causing a nil pointer dereferece when components of in.IncomingCircuitKey
are used in the resolveFromClient() function.

This commit checks for the nil pointer and returns an error before
the rest of the parsing.
2023-02-10 13:40:40 -05:00
Oliver Gugger
939614b70d
Merge pull request #7395 from yyforyongyu/fix-unit-test-db
channeldb+invoices: fix unit test flakes
2023-02-10 14:27:17 +01:00
yyforyongyu
4a7d3bc9c2
invoices: fix flake in TestInvoiceExpiryWithRegistry 2023-02-10 20:52:36 +08:00
yyforyongyu
3d61d157c6
channeldb: add unique output index to unit test 2023-02-10 20:52:34 +08:00
Oliver Gugger
f94500281f
Merge pull request #7348 from Torakushi/psbt
Add possibility to define a change scope in FundPsbt
2023-02-08 16:27:58 +01:00
Torakushi
9edc98f940
update release-notes-0.16.0 2023-02-08 12:35:48 +01:00
Torakushi
b3cbab4482
lncli: possibility to define an address type for changes in FundPsbt
With this commit, we can define an address type for default/imported
accounts in FundPsbt using '—change_type' flag. The value for this
flag can only be 'p2tr' at the moment. If not specified, we will use
P2WKH addresses for change outputs. Custom accounts don’t support
this flag as they have a unique scope.
2023-02-08 12:35:47 +01:00
Torakushi
cdb015223b
walletrpc+lnwallet: possibility to define an address type for changes in FundPsbt
By default, P2TR addresses are used for changes. However, some users
might encounter some problems with this change. We add the possibility
to define a custom address type in FundPsbt for default/imported accounts
(only P2TR for now). If no address type is specified for these accounts,
we will use P2WKH by default.
2023-02-08 12:35:44 +01:00
Torakushi
3bb68661e7
mod: update btcwallet dependency 2023-02-08 10:03:30 +01:00
Oliver Gugger
e7fb48ff73
docs: add release notes 2023-02-07 22:15:14 +01:00
Oliver Gugger
df1ea46d9e
rpcwallet: fix p2tr inputs in remote signing
The SendOutputs method isn't used very often in our code so the missing
Taproot sighash type wasn't detected before.
Also, a P2TR input will never have a sigScript, so we can explicitly set
that parameter to nil instead of relying on it being nil anyway.
2023-02-07 22:15:13 +01:00
Oliver Gugger
8bc16b4fb2
rpcwallet: fix np2wkh inputs in remote signing
There is a one byte difference between the sigScript and the
witnessScript in case of a np2wkh input. The remote signer actually
needs the witness script and not the sig script to produce a valid
signature.
2023-02-07 22:15:12 +01:00
Oliver Gugger
c6c52b8eb3
itest: add coverage for np2wkh in remote signing 2023-02-07 22:15:11 +01:00
Oliver Gugger
a2a96c7712
lnwallet: don't re-use sign descriptor
Fixes an issue where re-using a sign descriptor in a loop carried over
signing information from one call to the next, which caused the remote
signing issue.
2023-02-07 22:15:10 +01:00
Oliver Gugger
e4f3a35c0c
funding: fix peer key serialization in log message 2023-02-07 22:15:09 +01:00
Oliver Gugger
5d18fccd42
itest: reproduce remote signing issue
This commit attempts to reproduce the issue as described in #7276.
2023-02-07 22:15:08 +01:00
Oliver Gugger
a233df99c4
Merge pull request #7388 from bhandras/cert-fixup-lnd
lnd: bump lnd/cert version to v1.2.1
2023-02-07 17:23:25 +01:00
Andras Banki-Horvath
91af62a031
lnd: bump lnd/cert version
This commit bumps the lnd/cert version to 1.2.1 and fixes all call sites
where cert.GenCertPair was called.
2023-02-07 09:50:56 +01:00
Oliver Gugger
17d7e84b26
Merge pull request #7387 from bhandras/cert-fixup
cert: removed unused args from `cert.GenCertPair` [no-itest]
2023-02-06 22:52:42 +01:00
Andras Banki-Horvath
c3445e79d9
cert: removed unused args from cert.GenCertPair
Since the cert pair is written with a subsequent call to
cert.WriteCertPair we can safely remove the two file paths from the
argument list of cert.GenCertPair.
2023-02-06 17:11:56 +01:00
Oliver Gugger
3ba975b4db
Merge pull request #7384 from guggero/close-mac-db
walletunlocker: fix unit test flake by closing DB
2023-02-06 16:57:42 +01:00
Oliver Gugger
ad6fe6a78e
Merge pull request #7385 from guggero/github-label-trigger
GitHub: allow skipping itest and changelog check with labels
2023-02-06 15:50:16 +01:00
Oliver Gugger
6874582ed4
GitHub: allow skipping itest and changelog check with labels 2023-02-06 14:11:59 +01:00
Oliver Gugger
aa3647de82
docs: add release notes 2023-02-06 14:08:09 +01:00
Oliver Gugger
2086f09489
walletunlocker: fix unit test flake by closing DB
This fixes a unit test flake that occurred sometimes if the temporary
directory was attempted to be deleted but the wallet or macaroon DB
hasn't been closed yet.

````
--- FAIL: TestChangeWalletPasswordNewRootkey (1.63s)
    testing.go:1097: TempDir RemoveAll cleanup: unlinkat /tmp/TestChangeWalletPasswordNewRootkey3063283009/001/mainnet: directory not empty
FAIL
FAIL	github.com/lightningnetwork/lnd/walletunlocker	6.171s
FAIL
````
2023-02-06 14:08:08 +01:00
Oliver Gugger
0cf0a7dd3b
Merge pull request #7341 from bottlepay/final-settle-opt-in
channeldb: final htlc resolution storage opt-in
2023-02-06 13:21:40 +01:00
Oliver Gugger
75a39da01a
Merge pull request #7171 from guggero/musig2-versioned-rpc
signrpc: Upgrade to MuSig2 BIP draft v1.0.0rc2, add version flag to RPC
2023-02-06 12:35:49 +01:00
Oliver Gugger
1e13bb8e32
docs: add release notes, update musig2 doc 2023-02-06 10:50:30 +01:00
Oliver Gugger
58d0707a77
itest: test both MuSig2 versions 2023-02-06 10:50:30 +01:00
Oliver Gugger
dcf21e506a
lnwallet: fix linter issues in signer 2023-02-06 10:50:30 +01:00
Oliver Gugger
13252aec1d
lnrpc+rpcwallet: add version to MuSig2 RPC calls 2023-02-06 10:50:29 +01:00
Oliver Gugger
ce5fa2e043
multi: add version to MuSig2 API, bump btcd/btcec to v2.3.2
With this commit we bump the github.com/btcd/btcec/v2 library to v2.3.2
which implements the MuSig2 BIP version v1.0.0rc2. With this the
github.com/btcsuite/btcd/btcec/v2/schnorr/musig2 package becomes
v1.0.0rc2 and the github.com/lightningnetwork/lnd/internal/musig2v040
stays at the old v0.4.0 version.
2023-02-03 18:30:10 +01:00
Oliver Gugger
0e5ce71b33
input+lnwallet: put MuSig2 types behind interface
We put the calls that don't use musig2 package specific types as
parameters or return values behind an interface so we can easily call
those directly in the RPC without needing to know the underlying
implementation version. Some calls can't be used in the interface
because they use the specific package version's types. These calls are
implemented in helper functions in the input package instead that do the
necessary type switches.
2023-02-03 18:30:10 +01:00
Oliver Gugger
cb9f2d0398
input+lnrpc: make key sorting optional in input pkg
To allow us to properly test all test vectors, we can't default to true
on key sorting. Instead we add a parameter to the input package and move
the default value to the RPC server.
2023-02-03 18:30:09 +01:00
Oliver Gugger
13789f5d95
input+lnwallet: move some MuSig2 calls to input pkg
As a preparation for making it possible to version switch calls to the
MuSig2 API, we move some of the calls to the input package where in a
future commit we'll call the corresponding code in the correct package.
2023-02-03 18:30:09 +01:00
Oliver Gugger
4f5ede84c6
lnwallet: fix variable names 2023-02-03 18:30:09 +01:00
Oliver Gugger
0154226233
internal/musig2: rename to musig2v040 to avoid confusion
Since we explicitly keep an old version of a library in lnd for backward
compatibility we want to make sure the purpose and version of it is
clear and not misleading.
2023-02-03 18:30:09 +01:00
Oliver Gugger
3012f5e17d
mod+internal: copy MuSig2 v0.4.0 code from btcd/btcec/v2
With this commit we copy the exact code of the MuSig2 code as found in
github.com/btcsuite/btcec/v2/schnorr/musig2 at the tag btcec/v2.2.2.
This corresponds to the MuSig2 BIP specification version of v0.4.0.
2023-02-03 18:30:09 +01:00
Oliver Gugger
ff8f1371b5
itest: add itest for MuSig2 CombineKey
Before we change anything in the MuSig2 API, we first add an integration
test that makes sure the current version of the API combines keys
according to the v0.4.0 test vectors.
2023-02-03 18:25:56 +01:00
Olaoluwa Osuntokun
5d22d5eb6c
Merge pull request #7252 from ellemouton/sqlite-pt2
multi: add sqlite backend option
2023-01-31 10:14:46 -08:00
Oliver Gugger
a4c3e50ca5
Merge pull request #7375 from yyforyongyu/fix-linter
ci: fix lint VSC permissions error
2023-01-31 18:31:33 +01:00
yyforyongyu
22c1605687
ci: fix lint VSC permissions error 2023-02-01 01:00:55 +08:00