Commit Graph

181 Commits

Author SHA1 Message Date
Joost Jager
4dd054ae90
multi: remove debug invoices
Debug invoices are rarely used nowadays, but keep asking for maintenance
every time refactoring in primarily the invoice registry occurs. We have
passed the cost/benefit tipping point, so therefore the debug invoice
concept is removed in this commit.

Previously the debughtlc flag also controlled whether hodl masks were
active. It is safe to remove that additional condition because the hodl
masks are still guarded by the dev build tag.
2019-08-14 21:33:03 +02:00
Olaoluwa Osuntokun
6e9e0eaddd
Merge pull request #3359 from cfromknecht/flag-flip-no-historical-gossip
discovery: flag flip no historical gossip
2019-08-02 15:31:33 -07:00
Olaoluwa Osuntokun
9eb7237a2e
Merge pull request #3348 from wpaulino/max-cltv-expiry-config
htlcswitch: make max cltv expiry configurable and lower default
2019-08-02 14:00:17 -07:00
Conner Fromknecht
994719026f
config+server: add ignore-historical-filters CLI option
This commit adds the ignore-historical-filters CLI option, initially
defaulting to false. Users may use this option to prevent lnd from doing
historical gossip dumps to peers that set their `gossip_timestamp_range`
in the past. Enabling this option will result in lower bandwidth and
memory consumption. Down the road the plan is to make this default to
true.
2019-07-30 17:26:03 -07:00
Wilmer Paulino
0431701262
multi: only allow specifying towers to TowerClient through RPC
With the introduction of the WatchtowerClient RPC subserver, the lnd
configuration flag to specify private watchtowers for the client is no
longer needed and can lead to confusion upon users. Therefore, we remove
the flag completely, and only rely on the watchtower client being active
through a new --wtclient.active flag.
2019-07-30 15:18:17 -07:00
Wilmer Paulino
87ff463abd
htlcswitch+lnd: make max cltv expiry configurable 2019-07-26 18:05:58 -07:00
Wilmer Paulino
eb8576aa8d
config: default autopilot min confs to 1
This prevents spending unconfirmed funds by default. Users will have to
explicitly set this to 0 in order to do so.
2019-07-24 11:59:28 -07:00
Olaoluwa Osuntokun
df40a9c1e1
Merge pull request #3177 from halseth/autopilot-targetconf-conf
[autopilot] make confirmation target configurable
2019-06-17 16:05:00 -07:00
Conner Fromknecht
c1f24feb8b
config: expose watchtower conf 2019-06-13 19:54:19 -07:00
Conner Fromknecht
fb8214b808
config: expose+validate private tower addr 2019-06-13 19:54:18 -07:00
Valentine Wallace
f5eeb05e0a
rpcserver+monitoring/config: enable Prometheus monitoring.
Start the Prometheus exporter in rpcserver.go if monitoring is enabled through the
build tag. Also allow users to specify what address they want the Prometheus
exporter to be listening on.
2019-06-11 11:26:09 -07:00
Johan T. Halseth
187c8bc0b5
config+autopilot: make conftarget configurable 2019-06-08 17:29:33 +02:00
Valentine Wallace
25b540fec4 chainregistry+config: add neutrino flag to assert filter header chain 2019-06-06 16:05:12 -07:00
Joost Jager
054e42f680
routing+routerrpc: expose mission control parameters in lnd config
This commit exposes the three main parameters that influence mission
control and path finding to the user as command line or config file
flags. It allows for fine-tuning for optimal results.
2019-06-04 13:22:50 +02:00
Joost Jager
dff0387363
lntest: move itest into package 2019-05-28 21:43:23 +02:00
Johan T. Halseth
4806003b74
Merge pull request #2704 from MDrollette/multiple-opts
config: allow adding multiple tls ips and domains
2019-05-22 08:59:19 +02:00
Karl Ranna
d941220762 config: fix litecoin simnet mode
This commit fixes a bug where it was impossible to run lnd in litecoin's
simnet mode because of code duplication. As a result `numNets > 1`
conditional was always true when running lnd with `cfg.Litecoin.SimNet`
flag.
2019-05-05 18:35:20 +03:00
Joost Jager
5d2de91241
config: update broadcast delta to reduce risk of channel force close 2019-05-03 12:22:30 +02:00
Danny Paz
6fd5ef88b6 add litecoin regtest configuration to lnd
regtest change to chainregistry for default port number

merge w/ master
2019-04-26 21:14:26 -07:00
Johan T. Halseth
b53899c43c
lnd: rename package main->lnd 2019-04-23 20:57:33 +02:00
Olaoluwa Osuntokun
6c4566bfce
Merge pull request #2949 from wpaulino/lncfg-parse-network
lncfg: parse network for TCP addresses to listen on correct interface
2019-04-22 16:01:28 -07:00
Conner Fromknecht
ab4a6750cc
Merge pull request #1865 from ExchangeUnion/litecoin-simnet
config: Experimental support for Litecoin/simnet
2019-04-19 14:43:47 -07:00
Olaoluwa Osuntokun
1fa13e5cfc chainregistry+config: enable neutrino fee estimation from external api
Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
2019-04-16 14:16:56 -07:00
Wilmer Paulino
88aafe5c91
config: enforce safe auth of gRPC/REST listeners after parsing 2019-04-12 18:39:14 -07:00
Wilmer Paulino
be727ab0be config+server: expose HistoricalSyncInterval flag
This allows us to set how often the daemon should routinely perform
historical graph syncs.
2019-04-11 15:45:19 -07:00
Conner Fromknecht
25d2b1b537
Merge pull request #2885 from cfromknecht/stagger-initial-reconnect
server: stagger initial reconnects
2019-04-05 15:46:12 -07:00
Joost Jager
ab4da0f53d
cnct: define separate broadcast delta for outgoing htlcs
This commits exposes the various parameters around going to chain and
accepting htlcs in a clear way.

In addition to this, it reverts those parameters to what they were
before the merge of commit d1076271456bdab1625ea6b52b93ca3e1bd9aed9.
2019-04-05 11:36:07 +02:00
Conner Fromknecht
cf80476e01
server: stagger initial reconnects
This commit adds optional jitter to our initial reconnection to our
persistent peers. Currently we will attempt reconnections to all peers
simultaneously, which results in large amount of contention as the
number of channels a node has grows.

We resolve this by adding a randomized delay between 0 and 30 seconds
for all persistent peers. This spreads out the load and contention to
resources such as the database, read/write pools, and memory
allocations. On my node, this allows to start up with about 80% of the
memory burst compared to the all-at-once approach.

This also has a second-order effect in better distributing messages sent
at constant intervals, such as pings. This reduces the concurrent jobs
submitted to the read and write pools at any given time, resulting in
better reuse of read/write buffers and fewer bursty allocation and
garbage collection cycles.
2019-04-05 02:31:58 -07:00
Wilmer Paulino
80b84eef9c
config+peer: replace NoChanUpdates flag with NumGraphSyncPeers
In this commit, we replace the NoChanUpdates flag with a flag that
allows us to specify the number of peers we want to actively receive new
graph updates from. This will be required when integrating the new
gossiper SyncManager subsystem with the rest of lnd.
2019-04-03 15:43:51 -07:00
Conner Fromknecht
433665932c
config: expose Caches subconfig 2019-04-01 16:34:17 -07:00
Olaoluwa Osuntokun
9512d7036f
config: add new backupfilepath argument for SCBs
In this commit, we add a new config option: `backupfilepath` for the new
SCB implementation. This argument allows users to specify a custom
location for the SCB file such as NFS or distinct partition.
2019-03-28 17:53:32 -07:00
Olaoluwa Osuntokun
71161848aa
Merge pull request #2736 from cfromknecht/config-num-workers
lncfg: add CLI worker configuration
2019-03-19 15:47:38 -07:00
Olaoluwa Osuntokun
b4a1024ac7
Merge pull request #2490 from aakselrod/tor-null-auth-and-listen-fixes
Tor null auth and listen fixes
2019-03-15 14:53:12 -07:00
Conner Fromknecht
d81ce61033
config: add sanity check to prevent non-negative worker counts 2019-03-13 20:32:52 -07:00
Conner Fromknecht
76116f0d1a
config: use CLI worker configuration instead of NumCPU() 2019-03-13 20:32:39 -07:00
Matt Drollette
261558aad6 config: allow adding multiple tls ips and domains 2019-03-10 13:53:37 -05:00
Conner Fromknecht
4686db4196
config+server+lnd_test: expose chan status manager config options
Exposes the three parameters that dictate
the behavior of the channel status manager:
 * --chan-enable-timeout
 * --chan-disable-timeout
 * --chan-status-sample-interval
2019-02-14 17:13:11 -08:00
Olaoluwa Osuntokun
b56e95587f
config: increase default trickle delay from 30s to 1m30s
In this commit, we increase the default trickle delay from 30s to 1m30s.
We do this as before we implement the new INV gossip mechanism, we want
to de-emphasise the quick propagation of updates through the network
which eats up bandwidth.
2019-01-25 14:40:28 -08:00
Johan T. Halseth
36e7694e8e
config+pilot: define autopilot.heuristic
And validate the config set by the user.
2019-01-23 09:05:42 +01:00
Alex Akselrod
66a150297a config: default to listening for p2p on localhost when tor enabled
When Tor is enabled, this change allows manual hidden service
configuration by defaulting to listening for p2p connections on
the loopback address. It also allows overriding this manually
for situations where the Tor daemon is running on another machine,
such as when using Whonix or OnionPi-like systems.
2019-01-18 22:45:31 -07:00
Conner Fromknecht
aa75680dcf
config: add minbackoff to mirror maxbackoff 2019-01-04 14:05:28 -08:00
Igor Cota
02442ecbae Server: make maximum backoff configurable 2018-12-06 10:57:09 +01:00
Conner Fromknecht
668bd4db33
Merge pull request #2094 from cfromknecht/validate-color
config: validate node color after reading config
2018-11-29 16:18:44 -08:00
Olaoluwa Osuntokun
a8ac3cfe7d
lnd+rpc: fix linter errors 2018-11-28 20:57:10 -08:00
Olaoluwa Osuntokun
4002caec69
config+rpc: create new generalized dynamic sub rpc server config framework
In this commit, we add the glue infrastructure to make the sub RPC
server system work properly. Our high level goal is the following: using
only the lnrpc package (with no visibility into the sub RPC servers),
the RPC server is able to find, create, run, and manage the entire set
of present and future sub RPC servers. In order to achieve this, we use
the reflect package and build tags heavily to permit a loosely coupled
configuration parsing system for the sub RPC servers.

We start with a new `subRpcServerConfigs` struct which is _always_
present.  This struct has its own group, and will house a series of
sub-configs, one for each sub RPC server. Each sub-config is actually
gated behind a build flag, and can be used to allow users on the command
line or in the config to specify arguments related to the sub-server. If
the config isn't present, then we don't attempt to parse it at all, if
it is, then that means the RPC server has been registered, and we should
parse the contents of its config.

The `subRpcServerConfigs` struct has two main methods:
`PopulateDependancies` and `FetchConfig`. The `PopulateDependancies` is
used to dynamically locate and set the config fields for each new
sub-server. As the config may not actually have any fields (if the build
flag is off), we use the reflect pacakge to determine if things are
compiled in or not, then if so, we dynamically set each of the config
parameters. The `PopulateDependancies` method implements the
`lnrpc.SubServerConfigDispatcher` interface. Our goal is to allow sub
servers to look up their actual config in this main config struct. We
achieve this by using reflect to look up the target field _as if it were
a key in a map_. If the field is found, then we check if it has any
actual attributes (it won't if the build flag is off), if it is, then we
return it as we expect it to be populated already.
2018-11-28 20:57:05 -08:00
whythat
2c9a039845 config: add option to disable incoming push amounts in OpenChannel
This is useful for merchant-side prevention of accidental pushes
during channel opening.
2018-11-02 01:54:02 +02:00
Conner Fromknecht
b0318e2b74
config: validate node color after reading config 2018-10-24 22:10:18 -07:00
Conner Fromknecht
0903fe3183
main+lnd: display build.Version() for commit hash 2018-10-05 13:04:45 +09:00
Offer Markovich
28213b784f config: Experimental support for Litecoin/simnet
This PR adds the configuration needed to run LND with Litecoin on simnet. The change is minimal and has no impact for users that don't enable this mode. When using this configuration, the user is being warned that this mode is not officially supported.
2018-09-14 09:03:09 +03:00
Olaoluwa Osuntokun
e6925cc5be
config: fix linter error 2018-09-12 22:10:14 -07:00