Commit Graph

12286 Commits

Author SHA1 Message Date
a6ea019f56 lntest: add itest for remote signing 2021-10-14 16:14:49 +02:00
36dc4b3abf itest: refactor tests to be re-used 2021-10-14 15:42:59 +02:00
78b700387c cmd/lncli+walletrpc: add createwatchonly command 2021-10-14 15:42:58 +02:00
1541b2ef1b multi: create and list all default internal accounts 2021-10-14 15:42:56 +02:00
ceb31f9034 multi: allow watch-only wallet creation 2021-10-14 15:42:55 +02:00
6d339f31c0 rpcwallet: forward FinalizePsbt call over RPC 2021-10-14 15:42:53 +02:00
a3addcc927 multi: forward SendCoins call over RPC 2021-10-14 15:42:52 +02:00
19db382e24 multi: forward address and import calls over RPC
In order to support the full range of on-chain functionality, including
importing watch-only accounts in the watch-only instance, we need to
forward some calls like creating new addresses or importing accounts to
the remote signing instance.
2021-10-14 15:42:51 +02:00
9cae7ad3c2 multi: add remote RPC signing wallet implementation 2021-10-14 15:42:49 +02:00
917cf4e99b signrpc: add compact_sig flag to SignMessage 2021-10-14 15:42:48 +02:00
9fa9dd8e43 multi: extract key ring creation from chain control
To make it possible to supply our own implementation of a secret key
ring, we extract that part from the chain control and split the whole
chain control creation into two parts.
2021-10-14 15:42:47 +02:00
1309c6afea multi: allow internal wallet to be watch-only 2021-10-14 15:42:45 +02:00
6093393e2f multi: refactor SignMessage to specify hashing 2021-10-14 15:42:44 +02:00
00af978bf2 Merge pull request #5708 from guggero/remote-signer-extract-wallet
refactor: move towards more configurable implementation details
2021-10-08 14:23:03 +02:00
0cfe0f43e7 Travis: bump ARM parallelity to 3 2021-10-08 12:22:09 +02:00
82ae284577 docs: add release notes 2021-10-08 12:13:17 +02:00
e1da1f8941 multi: extract wallet initialization
With this commit we extract the wallet creation/unlocking and
initialization completely out of the main function. This will allow us
to use custom implementations in the future.
2021-10-08 12:13:15 +02:00
047d8ea3bc config_builder+lnd: move wallet related code
We move some of the wallet related functions into the new file that
houses the new customizable implementations for some of our interfaces.
Since the next customizable interface will be the wallet, we move those
wallet and chain backend related helper functions.
NOTE: This is a pure code move.
2021-10-08 12:08:25 +02:00
f6d7e70f51 multi: extract database initialization 2021-10-08 12:08:25 +02:00
0e279eb15a multi: refactor external subserver config
As a preparation for making more and more implementation details
configurable, we add a new ImplementationCfg struct that houses all the
interfaces that can be defined externally.
2021-10-08 12:08:23 +02:00
140d5a8086 chainreg+lnd: split chain control initialization
As a preparation for extracting the wallet related initialization code,
we first need to separate the purely configuration related chain control
initialization from the wallet related code. We do that by splitting the
chain control into a partial and full struct that is initialized in two
parts. This also allows us to create the wallet configuration itself
outside of the chain control package and we need to thread through fewer
parameters through the chain control config.
2021-10-08 12:06:54 +02:00
47f1b81a51 walletunlocker+lnd: move WalletUnlockParams
As a preparation for adding the wallet unlock params to the chain
control, we first need to move them out of the main package.
2021-10-08 12:06:54 +02:00
862f712394 lnd+pilot: use minHTLCIn instead of whole config
To remove one more direct dependency to a variable in our main function,
we pass in the required parameter to the autopilot only instead of the
whole chain configuration.
2021-10-08 12:06:54 +02:00
cab800e1e7 chainreg: add chain source and channel constraints
As a preparation for separating the pure config related chain control
setup from the wallet related chain control, we store more information
in the chain control instance that is required for the wallet
initialization.
2021-10-08 12:06:53 +02:00
b22f51098a rpcperms+lnd: use macaroon service from interceptor chain
We'll refactor the wallet creation and unlock process in a following
commit and want to make it possible to not need a direct reference to
the macaroon service in our main function. Since we store it in the
interceptor chain anyway (if we're using macaroons in the first place),
we might as well use the instance there directly.
2021-10-08 12:06:53 +02:00
d12154154a chainreg+lnd: add block cache to chainreg config
The block cache size in the chainreg.Config previously wasn't used but
instead the block cache was passed in as a separate parameter. We
replace the cache size with the actual cache in the config to streamline
things somewhat.
2021-10-08 12:06:53 +02:00
e79d59dd4c multi: use key locator for lnwallet.MessageSigner
To simplify the message signing API even further, we refactor the
lnwallet.MessageSigner interface to use a key locator instead of the
public key to identify which key should be signed with.
2021-10-08 12:06:52 +02:00
afa03f22cc multi: use key locator only for signing messages
To simplify the API surface of a remote signer even more, we refactor
the SignMessage and SignMessageCompact calls to only accept a key
locator as we always know what key we're using for signing anyway.
2021-10-08 12:06:52 +02:00
8b7c88537c multi: refactor SignDigestCompact into SignMessageCompact
To make it possible to use a remote lnrpc server as a signer for our
wallet, we need to change our main interface to sign the message instead
of the message's digest. Otherwise we'd need to alter the
lnrpc.SignMessage RPC to accept a digest instead of only the message
which has security implications.
2021-10-08 12:06:52 +02:00
02757f6735 multi: refactor SignDigest into SignMessage
To make it possible to use a remote signrpc server as a signer for our
wallet, we need to change our main interface to sign the message instead
of the message's digest. Otherwise we'd need to alter the
signrpc.SignMessage RPC to accept a digest instead of only the message
which has security implications.
2021-10-08 12:06:51 +02:00
dd3719d5de Merge pull request #5832 from guggero/node-feature-log
channeldb: fix graph cache feature handling
2021-10-08 10:02:44 +02:00
77bf6cfed3 channeldb: fix graph cache feature handling [skip ci]
Fixes #5830.
When a channel for a node is announced before the node itself is
announced on the network, it's possible that we have channels for a node
but no features defined yet. This was previously logged as a warning
which spammed the log unnecessarily.
2021-10-08 10:02:11 +02:00
c30152c1c0 Merge pull request #5842 from hsjoberg/gomobile-ios-xcframework
build: make gomobile iOS build to .xcframework folder
2021-10-08 09:58:03 +02:00
d630b95c8b Merge pull request #5777 from orbitalturtle/buf-pass-macaroon
Lnd: Listen for RPC calls on a bufconn
2021-10-07 18:50:58 -07:00
082aeab24a build: make gomobile iOS build to .xcframework folder
Recent gomobile versions are now building for the `xcframework`
packaging format instead of `framework`. This commit addresses
this by outputting to a `.xcframework` folder.
2021-10-08 00:21:53 +02:00
935fd267a0 Merge pull request #5834 from torkelrogstad/2021-10-06-getchaininfo
lncli: take chan_id as uint64 in getchaninfo
2021-10-07 12:49:44 -07:00
3efe94b4b1 Merge pull request #5833 from guggero/itest-github-fixes
itest: fix log file upload and flakes
2021-10-07 12:47:32 -07:00
ca4b8180a0 Merge pull request #5826 from guggero/release-fixes
GitHub: download key from git repo, update Roasbeef's key
2021-10-07 12:32:17 -07:00
f290746095 Merge pull request #5838 from ellemouton/printPubKeyInHex
server: print pubkey in hex in log [skip ci]
2021-10-07 12:28:48 -07:00
4d96f31f59 lncli: take chan_id as uint64 in getchaninfo
When taking in chan_id as a int64, there are some channels that cannot
be givn to lncli because they are out of range for an int64.
2021-10-07 14:57:32 +02:00
0d2ea30ada docs: add release notes 2021-10-07 14:26:00 +02:00
e68b1daf00 server: print pubkey in hex in log [skip ci]
Fix log statement that prints out peer pubkey.
2021-10-07 13:02:10 +02:00
0fac6c400e itest: wait for node to fully start up 2021-10-06 16:29:49 +02:00
e9c9ec2e84 itest: exit goroutines on error 2021-10-06 16:29:44 +02:00
b925ebb92c GitHub: only upload logs on failure 2021-10-06 16:29:44 +02:00
ccc03931ad Merge pull request #5483 from ellemouton/respectMinFeeRate
multi: respect and update min relay fee
2021-10-05 16:24:57 -07:00
5cc10ef18b Merge pull request #5811 from guggero/itest-flake-fix
CI: fix more flakes, move itests to GitHub (except ARM itest)
2021-10-05 16:21:09 -07:00
134be244b4 GitHub+Travis: move itests to GitHub Actions 2021-10-05 20:48:48 +02:00
c89637a4e2 itest: fix close of closed channel panic 2021-10-05 20:48:48 +02:00
1774934666 multi: fix Postgres on Travis
Fixes the docker build that was caused by
https://github.com/docker-library/postgres/issues/884.
Using the alpine and version 13 image avoids the problem introduced
with postgres 14 and debian bullseye.
2021-10-05 20:48:48 +02:00