Commit Graph

14369 Commits

Author SHA1 Message Date
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
Olaoluwa Osuntokun
be047096c2
docs/release-notes: add entry for taproot sighash bug fix 2023-01-24 19:47:39 -08:00
Olaoluwa Osuntokun
3d8f284af7
lntest/itest: update taproot signing itest to use default and non-default sighashes
Without the prior commit, this test fails with:
```
rpc error: code = Unknown desc = malformed signature: too long: 65 > 64
```
2023-01-24 19:47:34 -08:00
Olaoluwa Osuntokun
8ab598e40c
lntest/itest: make publishTxAndConfirmSweep a test helper
Calling ht.Helper() means we'll get the proper line number if an error
hapens.
2023-01-24 19:47:31 -08:00
Olaoluwa Osuntokun
843c62b59d
lnwallet: ensure that SignOutputRaw can sign w/ non-default sighash for schnorr sigs
Before this commitment, we'd end up failing in `schnorr.ParseSignature`
if a non-default sighash was used. To fix that, we'll slice the
signature to only pass in the sig w/o the sighash flag.
2023-01-24 19:47:29 -08:00
Olaoluwa Osuntokun
9b422acffe
build: update to latest version of btcd 2023-01-24 19:47:26 -08:00
Oliver Gugger
9187d4679b
Merge pull request #7231 from ziggie1984/sign_verify_message_with_addr
Sign/Verify messages and signatures for single addresses
2023-01-24 20:30:15 +01:00
ziggie
bf368a3d43
docs: add 0.16.0 release notes 2023-01-24 18:21:46 +01:00
Oliver Gugger
97f139b617
Merge pull request #7353 from bottlepay/bump-kvdb-etcd
kvdb: bump etcd to v3.5.7
2023-01-24 15:58:15 +01:00
Oliver Gugger
f4400eabe4
Merge pull request #7352 from ellemouton/removeEtcdCleanups
kvdb: remove etcd test fixture cleanup calls
2023-01-24 13:52:37 +01:00
Joost Jager
1725e5bcbe
kvdb: bump etcd to v3.5.7 2023-01-24 13:52:20 +01:00
Joost Jager
b50d59ec2e
lnwallet/test: assert final resolution db storage 2023-01-24 13:34:02 +01:00
ziggie
5edf64f4c5
lncli: add sign/verify message with an address
adds the functionality in the lncli walletkit to sign and verify a
message with a single address. Signing works only with lnd default
wallet account. Verifying signature on messages with external addresses
is also supported.
2023-01-24 09:23:47 +01:00
ziggie
39b77edca1
btcwallet: fix typo 2023-01-24 09:23:47 +01:00
ziggie
28bceb23c8
walletrpc: add test sign/verify methods
Test the introduced methods sign/verify messages for single addresses
2023-01-24 09:23:42 +01:00