Commit Graph

256 Commits

Author SHA1 Message Date
Conner Fromknecht
5c91be3f57
config+rpcserver: allow configurable defualt-remote-max-htlcs 2020-08-24 20:11:23 -07:00
carla
5a73029442
multi: add minimum disk space check 2020-08-24 09:38:11 +02:00
carla
c365a16656
healthcheck: monitor access to chain backend
Add a new health check package which will periodically poll health
check functions and shutdown if we do not succeed after our set number
of attempts. The first check that we add is one for our chain backend,
to ensure that we are connected to a bitcoin node.
2020-08-24 09:35:36 +02:00
András Bánki-Horváth
c3821e5ad1
Merge pull request #4493 from bhandras/invoice_gc
invoices: garbage collect settled/canceled invoices
2020-08-24 08:34:58 +02:00
Olaoluwa Osuntokun
d14aa9feaa
Merge pull request #4421 from gkrizek/tls-disable-autofill
tls: add --tlsdisableautofill flag to prevent sensitive data leaks
2020-08-21 19:32:24 -07:00
Graham Krizek
86a0609ecf
config+lnd+cert: add --tlsdisableautofill to prevent information leaks.
This adds in a new boolean flag that when set, prevents LND from writing the system hostname and network interface IPs to the TLS certificate. This will ensure privacy for those that don't want private IP addresses to be exposed on a public facing LND node.
2020-08-13 09:24:39 -05:00
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
Olaoluwa Osuntokun
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
Olaoluwa Osuntokun
6a6521bba0
Merge pull request #4507 from Kixunil/patch-2
Updated deprecation message of noseedbackup
2020-08-06 18:53:53 -07:00
Martin Habovštiak
c4f739ac8a config: Updated deprecation message of noseedbackup
According to the recent discussion `noseedbackup` is not deprecated.
This change clarifies the message about deprecation.
Also fixes a typo.

Closes #4499
2020-08-05 21:29:24 +02:00
Andras Banki-Horvath
2aa680ede2
invoices: optionally garbage collect invoices on the fly
This commit extends invoice garbage collection to also remove invoices
which are canceled when LND is already up and running. When the option
GcCanceledInvoicesOnTheFly is false (default) then invoices are kept and
the behavior is unchanged.
2020-08-05 12:24:17 +02:00
Andras Banki-Horvath
a0d7877d9a
multi: make canceled invoice garbage collection configurable
This commit extends the application config with a flag to control canceled
invoice garbage collection upon startup.
2020-08-05 12:24:16 +02:00
Olaoluwa Osuntokun
e616903d4f
config: unify old and new config values for sync-freelist
In this commit, unify the old and new values for `sync-freelist`, and
also ensure that we don't break behavior for any users that're using the
_old_ value.

To do this, we first rename what was `--db.bolt.no-sync-freelist`, to
`--db.bolt.sync-freelist`. This gets rid of the negation on the config
level, and lets us override that value if the user is specifying the
legacy config option.

In the future, we'll deprecate the old config option, in favor of the
new DB scoped option.
2020-08-04 18:55:00 -07:00
Conner Fromknecht
6622c4814e
multi: enforce routing.MinCLTVDelta=18 for invoices + chanupd
This commit clamps all user-chosen CLTVs in LND to be at least 18, which
is the new conservative value used in the sepc. This minimum is applied
uniformly to forwarding CLTV deltas (via channel updates) as well as
final CLTV deltas for new invoices.
2020-07-24 13:13:56 -07:00
Conner Fromknecht
b907035438
Merge pull request #4412 from aantonop/height_hint_cache_query_disable
New config option - disable height hint cache queries
2020-07-14 18:58:15 -07:00
Olaoluwa Osuntokun
ba3688c3b9
netann: add new HostAnnouncer to support dynamic IPs via domains
In this commit, we add a new sub-system, then `HostAnnouncer` which
allows a users without a static IP address to ensure that lnd always
announces the most up to date address based on a domain name. A new
command line flag `--external-hosts` has been added which allows a user
to specify one or most hosts that should be periodically resolved to
update any advertised IPs the node has.

Fixes #1624.
2020-07-06 17:30:08 -07:00
Joost Jager
24e3234dfa
invoices: optionally hold and auto-cancel keysend payments
Adds a new configuration flag to lnd that will keep keysend payments in
the accepted state. An application can then inspect the payment
parameters and decide whether to settle or cancel.

The on-the-fly inserted keysend invoices get a configurable expiry time.
This is a safeguard in case the application that should decide on the
keysend payments isn't active.
2020-06-27 09:54:11 +02:00
Andreas M. Antonopoulos
61ea9fad78 New config option - disable height hint cache queries
typo broke test


leftover junk


Fix to comply with linter 

and also, D'oh conditional
2020-06-26 21:40:00 -04:00
Anthony Ronning
a76e752f3b
config+lnd+rpcserver: add CORS origin config for REST 2020-06-17 08:34:55 +02:00
Joost Jager
df7a05da84
rpcserver+routerrpc: remove payment limit 2020-05-28 19:34:17 +02:00
Oliver Gugger
75f916b026
log+config: remove global RootLogWriter variable 2020-05-27 09:43:59 +02:00
Oliver Gugger
70772ab99b
config+lnd+rpcserver: use log writer from cfg 2020-05-27 09:43:59 +02:00
Andras Banki-Horvath
b53475da14 lncfg+lnd: prefix etcd db with only network name instead of full path 2020-05-22 11:26:25 +02:00
Andras Banki-Horvath
0e3629e2c7 channeldb+lnd: make channeldb backend configurable
This commit adds support for user configured channeldb backend.
2020-05-22 11:26:25 +02:00
Andras Banki-Horvath
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
Oliver Gugger
d44f205e3f
multi: move global networkDir to cfg 2020-05-14 14:47:35 +02:00
Oliver Gugger
85d5cdfbfd
multi: move global registeredChains to cfg 2020-05-14 14:47:35 +02:00
Oliver Gugger
3b2188d689
multi: move exported items to lncfg 2020-05-14 14:37:51 +02:00
Oliver Gugger
25f8a0804d
config: fix comment and linter errors 2020-05-14 14:37:50 +02:00
Oliver Gugger
1f3a5ce0d4
config: export CleanAndExpandPath 2020-05-14 14:37:50 +02:00
Oliver Gugger
bc3909050e
multi: rename and export logWriter as RootLogWriter 2020-05-14 14:37:50 +02:00
Oliver Gugger
a56ca0d0cf
config: export default values for config file
Variables related to the default configuration file location are
needed if the config parsing is happening externally. We export them
so they don't need to be copied to projects that use lnd as a library.
2020-05-14 14:37:49 +02:00
Oliver Gugger
aba29df84d
config: extract config validation
To allow external configuration parsing and validation, this commit
exports the function that checks a configuration for sanity.
Also because we touch the code, we need to fix all linter errors.
2020-05-14 14:37:49 +02:00
Oliver Gugger
d4d10b5c71
config: extract default config into function
To make it easy to extract the configuration parsing out of the main
package, the default config is exported as its own function.
2020-05-14 14:37:49 +02:00
Oliver Gugger
9ed1cd623f
config+lncfg: move config structs to lncfg, drop suffix 2020-05-14 14:37:48 +02:00
Oliver Gugger
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
Conner Fromknecht
4f6cef83fc
config: adds cli configurable --migration-dry-run 2020-05-11 15:38:56 -07:00
Olaoluwa Osuntokun
9f5f48b20d
Merge pull request #4089 from fguisso/acceptor
rpcserver: parameterize acceptortimeout
2020-04-30 19:03:55 -07:00
Olaoluwa Osuntokun
e8c365dc2e
Merge pull request #4207 from ErikEk/tor-socks-control-port-fix
tor: socks and control can not use the same host:port
2020-04-30 19:02:38 -07:00
Andras Banki-Horvath
556e3525ea misc: fix error formatting in multiple files 2020-04-24 19:15:08 +02:00
ErikEk
28eba07b3e tor: socks and control can not use the same host:port 2020-04-20 10:41:19 +02:00
Oliver Gugger
1e3b0672d7
config+lnd+lncli: add commit back to version string 2020-04-14 15:51:44 +02:00
nsa
f1fd5e86c0 config: add WatchtowerKeyPath Tor option
Co-authored-by: Turtle <orbitalturtle@protonmail.com>
2020-03-29 11:54:59 -04:00
yyforyongyu
97da7b3444 multi: support config bitcoind fee estimate mode 2020-03-25 14:59:23 +08:00
chokoboko
090d56b3a2 config: remove default values from flag descriptions 2020-03-20 01:07:47 +02:00
fguisso
5ab7dd89e7
rpcserver: parameterize acceptortimeout 2020-03-17 16:43:14 -03:00
Wilmer Paulino
e17ad8bc84
Merge pull request #4048 from wpaulino/tor-hashed-password
server+tor: add support for Tor HASHEDPASSWORD authentication method
2020-03-10 11:12:41 -07:00
Tomas Carnecky
018e8b5b97
server+tor: add support for Tor HASHEDPASSWORD authentication method
This provides users an alternative over the SAFECOOKIE authentication
method, which may not be as useful if users are connecting to a remote
Tor sevrer due to lnd not being able to retrieve the cookie file.
2020-03-10 10:32:44 -07:00
Johan T. Halseth
44756b5811
cfg: rename legacyprotocol to protocol
Since we are also going to use it for experimental new features.
2020-03-09 12:59:34 +01:00
Olaoluwa Osuntokun
fce472e820
Merge pull request #3876 from breez/allow-timeouted-initiated-htlc
contractcourt: keep channels with timed-out initiated htlcs.
2020-02-17 14:08:44 -08:00