Commit Graph

381 Commits

Author SHA1 Message Date
nsa
3791c9efcb lnd: removing activeNetParams global, passed around instead via configs
This commit removes the activeNetParams global in chainparams.go. This
is necessary to isolate code from the lnd package so we can import it
for use in tests, other projects, etc.
2020-08-11 11:41:24 -04:00
f58b00ef55 multi: split database storage into remote and local instances
In this commit, we split the database storage into two classes: remote
and local data. If etcd isn't active, then everything is actually just
local though we use two pointers everywhere. If etcd is active, then
everything but the graph goes into the remote database.
2020-08-07 18:44:02 -07:00
7355c8ba3a lncfg: add new GetBackends which returns active DB backends
In this commit, we modify the existing `GetBackend` method to now be
called `GetBackends`. This new method will populate a new `RemoteDB`
attribute based on if the replicated backend is active or not. As is,
the local backend is used everywhere. An upcoming commit will once again
re-enable the remote backend, in a hybrid manner.
2020-08-07 18:44:00 -07:00
19f68d2538 lnd: log bbolt freelist sync config value on start up 2020-08-04 18:55:02 -07:00
675c1b95c9 lnd: don't set freelist value when creating channeldb
This value actually isn't read anywhere, since it's no longer used.
Instead, `cfg.Db.Bolt.NoSyncFreeList` is what's evaluated when we go to
open the DB.
2020-08-04 18:54:59 -07:00
3e5e60cac4 lnd+kvdb: pass LND abort context to etcd 2020-06-03 17:44:44 +02:00
5e09a5287a lnd: use Infof to format errors on channeldb open 2020-05-27 22:42:46 -07:00
70772ab99b config+lnd+rpcserver: use log writer from cfg 2020-05-27 09:43:59 +02:00
bbc4f06872 lnd: fix regression in DB open time logs
In this commit, we fix a regression in our DB open time logging that was
introduced in #4015. Obtaining the target backend from the configuration
will actually also open the database, so we need to include that in the time
delta as well.
2020-05-22 15:18:23 -07:00
b53475da14 lncfg+lnd: prefix etcd db with only network name instead of full path 2020-05-22 11:26:25 +02:00
0e3629e2c7 channeldb+lnd: make channeldb backend configurable
This commit adds support for user configured channeldb backend.
2020-05-22 11:26:25 +02:00
9d57c1a6b4 lncfg: add configuration for user specified db backend
This commit extends lncfg to support user specified database backend.
This supports configuration for both bolt and etcd (while only allowing
one or the other).
2020-05-22 11:26:25 +02:00
36b90382d3 lnd+server+keychain: remove unused code 2020-05-20 09:07:21 +02:00
f97e7b9951 watchtower: use ECDH interface for watchtower session 2020-05-20 09:06:57 +02:00
be890ef9be lnd+server+netann: use signing interface in node signer 2020-05-20 09:05:35 +02:00
140731af00 lnd+watchtower: rename NodePrivKey to NodeKeyECDH 2020-05-20 09:05:14 +02:00
4261d3f5af lnd: remove global cfg variable 2020-05-14 16:18:02 +02:00
4343f9e9a6 server+rpcserver: don't use global cfg 2020-05-14 16:18:01 +02:00
7e4d0aba2f lnd+rpcserver: don't use global cfg 2020-05-14 16:18:01 +02:00
d44f205e3f multi: move global networkDir to cfg 2020-05-14 14:47:35 +02:00
85d5cdfbfd multi: move global registeredChains to cfg 2020-05-14 14:47:35 +02:00
a7e78112b7 multi: allow external subservers to register themselves
With two new callbacks we allow processes that use lnd as a library
to register additional gRPC and REST subservers to the main server
instances that lnd creates.
2020-05-14 14:47:33 +02:00
620eaa3199 lnd+cmd: move interrupt into cmd
If the main package is used as a library, we don't want it to
register interrupt signals itself. Rather we want to pass in the
shutdown channel manually. We do this in the cmd now.
2020-05-14 14:37:51 +02:00
7158103d4d lnd+config: move config parsing to cmd
Now that we have access to the configuration parsing outside of the
main package, we can move the actual parsing to the command line
package.
2020-05-14 14:37:51 +02:00
bc3909050e multi: rename and export logWriter as RootLogWriter 2020-05-14 14:37:50 +02:00
409d2c9a90 lnd+config: export config struct and LoadConfig
As a preparation to be moved to the lncfg package, the main struct and
functions related to configuration are exported.
2020-05-14 13:05:01 +02:00
4f6cef83fc config: adds cli configurable --migration-dry-run 2020-05-11 15:38:56 -07:00
556e3525ea misc: fix error formatting in multiple files 2020-04-24 19:15:08 +02:00
1e3b0672d7 config+lnd+lncli: add commit back to version string 2020-04-14 15:51:44 +02:00
nsa
ada0b78dfc lnd+server+watchtower: allow Standalone access to the tor controller
This commit lets the watchtower automatically create hidden services
by giving it a pointer to a TorController. The server was also slightly
refactored so that it was not the sole owner of the TorController.
2020-03-29 12:36:54 -04:00
4e47181b99 trivial: typo fix 2020-03-19 05:43:49 +01:00
ba38bda5f0 lnd: reload cert data after renewal
After renewing the certificate, the new certificate wasn't actually
loaded and used, causing the old one to be used until lnd was restarted.
This fixes that by reloading it after it has been written.
2020-02-12 10:59:52 +01:00
f7a85e07b0 lnd+cert: recreate TLS files if IPs or DNS changed
This commit makes lnd recreate its TLS certificate if the config's
tlsextradomains or tlsextraips changed. This is useful, since earlier
user would have to manually delete the files to trigger lnd to recreate
them.

To ensure users don't accidentally have their TLS certificate recreated,
we gate it behind a flag --tlsautorefresh that defaults to false.
2020-02-12 10:59:51 +01:00
bbf3877d65 lnd: fix gosimple linter failure
GoSimple linter check fails for time.Now().Sub. Change the logged
database open time to use time.Since instead.
2020-02-04 10:06:45 +02:00
698f1175f8 lnd: add timing information to db open log 2020-02-03 16:19:01 -08:00
19bdbe7f8d Update channeldb opening log
It might take a few minutes and it should therefore state it...
2020-02-03 16:18:56 -08:00
a870ed5fb7 lnd: add WalletUnlockerAuthOptions
Similar to what was done for the regular RPC server, we add auth dial
options for the wallet unlocker, as it also requires TLS now.
2020-01-14 09:30:09 +01:00
7077d19589 lnd: add Authenticate method
Adds a global Authenticate method that can be used to get the
atuhentication options needed to call the grpc server.

Currently meant only for used with the mobile bindings, so we use the
admin macaroon.
2019-12-18 10:28:22 +01:00
27337dc973 lnd+rpcserver: use same serverOpts for custom listeners
Earlier we used emtpy grpc server options if custom listeners were set.
This was done to disable TLS. Now, we reuse the same server options as
for the regular listeners, in a move towards enabling TLS also here.
2019-12-18 10:28:22 +01:00
f0bd4e775b Merge pull request #3775 from halseth/mobile-listener-signal
[mobile] make Ready signal for custom listeners
2019-12-17 12:26:04 +01:00
61e114f201 autopilot: take channel min htlc from config 2019-12-11 00:17:10 +01:00
dc6c040803 lnd: make Ready signal for custom listeners
This allows the caller to know when lnd is ready to accept RPC calls,
which is inmportant for mobile applications where eveything happens in
process.
2019-11-29 11:59:01 +01:00
84c73f3025 Merge pull request #3740 from guggero/rest-client-receive-size
lnd: increase max message receive size for REST proxy
2019-11-19 17:15:24 -08:00
4cd06465ea lnd: increase max message receive size for REST proxy 2019-11-18 14:06:14 +01:00
dbbb169e06 lnd: use TLS code from cert package 2019-11-18 09:44:54 +01:00
bfe10376f3 lnd: prepare TLS code for extraction 2019-11-14 10:23:35 +01:00
6c6bbdd365 signal: initialize interceptor explictly 2019-11-12 19:16:22 +01:00
3ca2c363fe lnd+rpcserver: initialize new log writer correctly 2019-10-14 14:56:32 +02:00
94f49192cf lnd: refactor sub logger setup to use new rotating log writer 2019-10-14 14:56:31 +02:00
b63ed5ad56 config: add sync freelist cli flag 2019-10-04 12:19:42 -04:00