Commit graph

14333 commits

Author SHA1 Message Date
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
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
Oliver Gugger
5b354c6598
Merge pull request #6527 from voltagecloud/encrypt-tls-key-2
tls: Add ability to encrypt TLS key on disk
2023-01-27 14:08:09 +01:00
Orbital
38cf5a2d67
docs: update v16 release notes 2023-01-26 13:34:49 -06:00
Graham Krizek
5d6ce2824f
docs: Add documentation for the TLS key encryption flag 2023-01-26 13:32:12 -06:00
Orbital
21816d9118
lnd+config: Move to FileExists function in lnrpc package 2023-01-26 13:32:12 -06:00
Orbital
c0f44a17b7
lnd: Add ability to encrypt TLS key on disk 2023-01-26 13:32:11 -06:00
Orbital
60be9085c3
lnd: Move TlsManager files to new files 2023-01-26 13:32:11 -06:00
Orbital
7e03297b1b
lnd: refactor getTLSConfig 2023-01-26 13:32:11 -06:00
Oliver Gugger
33a0cbe634
Merge pull request #7292 from Crypt-iQ/disconnectblock_patch
aliasmgr+channeldb: stop deleting zero-conf edges from graph if reorg occurs
2023-01-26 16:26:28 +01:00
Joost Jager
7a785c74c4
channeldb: final htlc resolution storage opt-in 2023-01-26 07:02:17 +01:00
Olaoluwa Osuntokun
292551fbf4
Merge pull request #7332 from Roasbeef/sign-output-raw-bug-fix
[1/?] - lnwallet: ensure that SignOutputRaw can sign w/ non-default sighash f…
2023-01-25 18:40:44 -08:00
eugene
b0028794c1
release-notes: update for 0.16.0 2023-01-25 12:03:21 -05:00
eugene
9d56963f5e
itest: add zero-conf reorg edge existence test
This itest asserts that zero-conf edges exist even after a reorg.
Without the prior commit, this test fails.
2023-01-25 12:03:21 -05:00
eugene
d807ff23d2
channeldb: fix DisconnectBlockAtHeight bug for zero-conf channels
When a block is disconnected due to a reorg, DisconnectBlockAtHeight
is called for the block height. Prior to this patch, it would delete
every SCID in the graph with a block height greater than the
disconnected height. This meant that a reorg would delete every
zero-conf channel edge from the graph. The fix simply iterates up
until the StartingAlias and deletes every SCID between the
disconnected height and the StartingAlias height.
2023-01-25 12:03:21 -05:00
eugene
feb8e7e64e
aliasmgr: export StartingAlias so other packages can use it 2023-01-25 12:03:19 -05:00
Oliver Gugger
fe5254510e
multi: warn user if they try to switch db types
Warn a user if they attempt to initialise a new db type (sqlite or
postgres) if an old bbolt db file is found.
2023-01-25 14:16:56 +02:00
Elle Mouton
c89e5b68b0
docs: add release note 2023-01-25 14:16:56 +02:00
Chris Geihsler
b39049f17f
docs: add sqlite instructions 2023-01-25 14:16:56 +02:00
Chris Geihsler
a5eaabf548
multi: add sqlite option to itests and github job 2023-01-25 14:16:56 +02:00
Chris Geihsler
8c4d3345e9
make: add kvdb_sqlite to build flags 2023-01-25 14:16:56 +02:00
Elle Mouton
8363c4075c
multi: add sqlite backend option
In this diff, we expose the option to use sqlite as a db backend.
2023-01-25 14:16:55 +02:00
Elle Mouton
2fd4f3f180
go.mod+lnrpc+github: point to latest kvdb changes
Use kvdb package v1.4.1. This update also forced the protobuf version to
be bumped which required `make rpc` to be run to update the generated
files. This also required a bump in the github pinned dependencies
config for the grpc and protobuf libs.
2023-01-25 14:03:00 +02:00