Commit Graph

12281 Commits

Author SHA1 Message Date
yyforyongyu
2800c4364e
tor: add GETINFO method to check liveness of onion service 2021-10-11 13:11:54 +08:00
yyforyongyu
7daffcbba8
tor: add a new response reader for tor controller
This commit adds a new response reader which replaces the old
textproto.Reader.ReadResponse. The older reader cannot handle the case
when the reply from Tor server contains a data reply line, which uses
the symbol "+" to signal such a case.
2021-10-11 13:11:54 +08:00
yyforyongyu
90e6c70ea0
tor: remove Onion Service upon shutdown
This commit adds a new method to call DEL_ONION when lnd is shutting
down. Tor controller will now be aware of the active serviceID and
removes the service upon shutdown.
2021-10-11 13:11:53 +08:00
yyforyongyu
0b80d4feaa
tor: add logging to tor controller 2021-10-11 13:11:53 +08:00
yyforyongyu
a101a53eb4
tor: patch unit tests for tor controller 2021-10-11 13:11:53 +08:00
yyforyongyu
1ebc3b82c8
tor: rename dial to dialProxy
This commit renames dial to be dialProxy to make the connections
clearer. It also cleans the column width and provides more verbose error
messages.
2021-10-11 13:11:52 +08:00
Olaoluwa Osuntokun
64211da40d
Merge pull request #5839 from ellemouton/noDuplicateConnsForDupAddrs
server: use deduped addrMap for connReq creation
2021-10-08 17:01:45 -07:00
Oliver Gugger
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
Elle Mouton
84f6b70773
server: use deduped addrMap for connReq creation
Use the addrMap for connReq creation to prevent creating duplicate
connection requests if persistentPeerAddrs contains duplicate addresses.
2021-10-08 13:18:59 +02:00
Oliver Gugger
0cfe0f43e7
Travis: bump ARM parallelity to 3 2021-10-08 12:22:09 +02:00
Oliver Gugger
82ae284577
docs: add release notes 2021-10-08 12:13:17 +02:00
Oliver Gugger
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
Oliver Gugger
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
Oliver Gugger
f6d7e70f51
multi: extract database initialization 2021-10-08 12:08:25 +02:00
Oliver Gugger
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
Oliver Gugger
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
Oliver Gugger
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
Oliver Gugger
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
Oliver Gugger
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
Oliver Gugger
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
Oliver Gugger
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
Oliver Gugger
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
Oliver Gugger
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
Oliver Gugger
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
Oliver Gugger
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
Oliver Gugger
dd3719d5de
Merge pull request #5832 from guggero/node-feature-log
channeldb: fix graph cache feature handling
2021-10-08 10:02:44 +02:00
Oliver Gugger
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
Oliver Gugger
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
Olaoluwa Osuntokun
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
Hampus Sjöberg
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
Olaoluwa Osuntokun
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
Olaoluwa Osuntokun
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
Olaoluwa Osuntokun
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
Olaoluwa Osuntokun
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
Torkel Rogstad
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
Oliver Gugger
0d2ea30ada
docs: add release notes 2021-10-07 14:26:00 +02:00
Elle Mouton
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
Oliver Gugger
0fac6c400e
itest: wait for node to fully start up 2021-10-06 16:29:49 +02:00
Oliver Gugger
e9c9ec2e84
itest: exit goroutines on error 2021-10-06 16:29:44 +02:00
Oliver Gugger
b925ebb92c
GitHub: only upload logs on failure 2021-10-06 16:29:44 +02:00
Olaoluwa Osuntokun
ccc03931ad
Merge pull request #5483 from ellemouton/respectMinFeeRate
multi: respect and update min relay fee
2021-10-05 16:24:57 -07:00
Olaoluwa Osuntokun
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
Oliver Gugger
134be244b4
GitHub+Travis: move itests to GitHub Actions 2021-10-05 20:48:48 +02:00
Oliver Gugger
c89637a4e2
itest: fix close of closed channel panic 2021-10-05 20:48:48 +02:00
Oliver Gugger
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
Oliver Gugger
6bc0862fdf
itest: fix commitment_deadline context expired flake 2021-10-05 20:48:48 +02:00
Oliver Gugger
bedba02a2d
itest: enable slow mining by default
We now redirect the mineBlocks function to the mineBlocksSlow function
which waits after each mined block. To reduce the overall time impact of
using that function everywhere, we only wait 20 milliseconds instead of 50ms
after each mined block to give all nodes
some time to process the block. This will still slow down everything by a bit
but reduce flakes that are caused by different sub systems not being
up-to-date.
2021-10-05 20:48:47 +02:00
Oliver Gugger
98061dfd58
mod+lntest: disable stall handler in btcd mining node
The latest version of btcd allows its stall handler to be disabled. We
use that new config option to make sure the mining btcd node and the lnd
chain backend btcd node aren't disconnected if some test takes too long
and no new p2p messages are exchanged.
2021-10-05 20:48:47 +02:00
Elle Mouton
f782df6768
docs: update 0.14 release notes 2021-10-05 18:30:42 +02:00
Elle Mouton
ad2859c863
chainfee: fetch fresh relay fee for btcd
This commit adds a function to the BtcdEstimator that fetches the
current min relay fee from the btcd node.
2021-10-05 18:30:41 +02:00