Commit Graph

198 Commits

Author SHA1 Message Date
carla
9b35c349de
multi: Set upfront shutdown from open and accept chanel messages
This commit gets upfront shutdown scripts from openchannel and
acceptchannel wire messages sent from our peer and sets upfront
shutdown scripts in our open and accept channel messages when
the remote peer supports option upfront shutdown and we have
the feature enabled.
2019-12-03 11:38:29 +02:00
Conner Fromknecht
216b933d9b
config+itest: allow unsafe disconnect by default
This commit beings the process of deprecating unsafe-disconnect. Many
moons ago this was disallowed to prevent concurency bugs surrounding
reconnect. Despite the name, it has been safe to enable this feature for
well over a year, as several PRs have been merged that addressed the
possible issues that existed when the feature was added.
2019-11-19 20:13:04 -08:00
Wilmer Paulino
0b2ef8bb4e
Merge pull request #2813 from wereHamster/tor-target-ip-address
Tor option to override target IP address
2019-10-22 17:15:54 +02:00
Oliver Gugger
3ca2c363fe
lnd+rpcserver: initialize new log writer correctly 2019-10-14 14:56:32 +02:00
Oliver Gugger
d3995a73ae
build: move log rotator code 2019-10-14 14:56:31 +02:00
Oliver Gugger
3ea74c4362
build: move log level parse code and add new leveled sub logger interface 2019-10-14 14:56:30 +02:00
Wilmer Paulino
b63ed5ad56
config: add sync freelist cli flag 2019-10-04 12:19:42 -04:00
Olaoluwa Osuntokun
e84fe8f947
Merge pull request #3358 from halseth/mainnet-neutrino
config: allow mainnet neutrino
2019-09-25 19:15:48 -07:00
fridokus
b3669d71e3 Fix typo in config.go 2019-09-24 14:49:59 +02:00
fguisso
2b7f9a3029 config: fix configfile flags 2019-09-19 17:05:56 -03:00
Johan T. Halseth
d9a55334dc
config: allow mainnet neutrino 2019-09-17 13:27:19 +02:00
Tomas Carnecky
b1fc008433 Tor option to override target ip address 2019-09-14 17:05:32 +02:00
Hampus Sjöberg
7c85363ef6 config: Add norest config for disabling REST API
This commit adds a new config `norest` for disabling the REST API.
This is useful in cases where it is not needed (i.e lnd running on
mobile devices).
2019-09-09 22:18:38 +02:00
Wilmer Paulino
d8dd6b3245
htlcswitch: cap fee updates to max fee allocation
In this commit, we begin to enforce a maximum channel commitment fee for
channel initiators when attempting to update their commitment fee. Now,
if the new commitment fee happens to exceed their maximum, then a fee
update of the maximum fee allocation will be proposed instead if needed.

A default of up to 50% of the channel initiator's balance is enforced
for the maximum channel commitment fee. It can be modified through the
`--max-channel-fee-allocation` CLI flag.
2019-09-03 16:49:59 -07:00
Johan T. Halseth
9ef66f568f
Merge pull request #2203 from ccdle12/reject-htlc-option
htlcswitch+config+server: adding RejectHTLC flag
2019-08-26 14:53:32 +02:00
Olaoluwa Osuntokun
653d557fec
config: add new legacy protocol build tag protected sub-config for legacy onion
In this commit, we add a new build tag protected sub-config for legacy
protocol features. The goal of this addition is to be able to default to
new feature within lnd, but expose hooks at the config level to allow
integration tests to force the old behavior to ensure that we're able to
support both the old+new versions.
2019-08-22 18:53:08 -07:00
ccdle12
05d0d028bc
htlcswitch+config+server: Adds a rejecthtlc flag that disables forwarded
htlcs

config: Adding RejectHTLC field in config struct

This commit adds a RejectHTLC field in the config struct in config.go.
This allows the user to run lnd as a node that does not accept onward
HTLCs.

htlcswitch/switch: Adding a field RejectHTLC to the switch config

This commit adds a field RejectHTLC to the switch config. When the
switch receives an HTLC it will check this flag and if the HTLC is not
from the source hop, the HTLC will be rejected.

htlcswitch/switch: adding check for RejectHTLC flag and incomingChanID

This commit adds a check when receiving UpdateAddHTLC. The check looks
for the RejectHTLC flag set and whether the HTLC is from the sourceHop
(the local switch). If the HTLC is not from the sourceHop, then we
reject the HTLC and return a FailChannelDisabled error.

server: adding RejectHTLC field to initialization of switch

lnd_test: adding test for RejectHTLC

This commit adds a test which tests that a node with the --rejecthtlc
flag will reject any onward HTLCs but still can receive direct HTLCs and
can send HTLCs.
2019-08-20 11:01:44 +01:00
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