Commit Graph

142 Commits

Author SHA1 Message Date
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
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
Olaoluwa Osuntokun
e6925cc5be
config: fix linter error 2018-09-12 22:10:14 -07:00
Olaoluwa Osuntokun
e23f889639
config: return an error if unable to parse values in the config file 2018-09-12 21:35:32 -07:00
Olaoluwa Osuntokun
c5ece1e509
Merge pull request #1843 from cfromknecht/change-noencryptwallet
Start deprecating noencryptwallet
2018-09-12 21:07:23 -07:00
Wilmer Paulino
8599b30c78
config: modify private key path to be onion type agnostic 2018-09-11 19:37:11 -07:00
Olaoluwa Osuntokun
146e0efe71
Merge pull request #1802 from wpaulino/equal-zmq-conf-error
config: ensure ZMQ options are not equal and defer creating lnddir until all flag parsing is done
2018-09-05 17:33:40 -07:00
Conner Fromknecht
d85e58f435
config: rename noencryptwallet to noseedbackup
This commit renames the confusing noencryptwallet
flag to noseedbackup, since this highlights the more
crucial information of the flags behavior to the user.
The description has also been capitalized to urge
the user think twice about what they're doing.
2018-09-04 20:52:43 -07:00
Wilmer Paulino
fd61c3c9b0
config: defer creating the base lnd dir until all flag parsing is done
In this commit, we defer creating the base lnd directory until all flag
parsing is done. We do this as it's possible that the config file
specifies a lnddir, but it isn't actually used as the directory has
already been created.
2018-09-04 16:36:15 -07:00
Wilmer Paulino
58ab6c1912
config: ensure ZMQ options when read from the config file are not equal 2018-09-04 16:36:14 -07:00
Conner Fromknecht
af0265f8fa
config: add experimental assumechanvalid flag 2018-09-03 20:15:18 -07:00
Olaoluwa Osuntokun
b9db220e8c
config: properly show list of sub-systems for show debuglevel
Fixes #1772.
2018-08-23 19:48:30 -07:00
Olaoluwa Osuntokun
4d74fa32a9
config: update comment for network directory 2018-08-23 18:05:22 -07:00
Wilmer Paulino
e1726ecb2f config: remove default macaroon path
Co-Authored-By: Karl Ranna <karl@karlranna.com>
2018-08-23 18:05:00 -07:00
Wilmer Paulino
9981fd8fa7 config+lnd: create macaroons files under the network dir
Co-Authored-By: Karl Ranna <karl@karlranna.com>
2018-08-23 18:05:00 -07:00
Wilmer Paulino
6ddae25487 config+cmd/lncli: make cleanAndExpandPath return empty string on empty path
Co-Authored-By: Karl Ranna <karl@karlranna.com>
2018-08-23 18:05:00 -07:00
Olaoluwa Osuntokun
147596047f
Merge pull request #1687 from halseth/disable-inactive-channels
Send ChannelUpdate with Disabled bit if channel inactive for 20 minutes
2018-08-17 18:04:19 -07:00
Johan T. Halseth
9e44b38eee
config: define InactiveChanTimeout 2018-08-17 23:24:13 +02:00
Wilmer Paulino
7724d86801
config+pilot: add flag to specify min confs for autopilot agent 2018-08-16 20:19:31 -07:00
Wilmer Paulino
89325a13b7
autopilot+config: support opening private channels with autopilot agent 2018-08-10 20:45:59 -07:00
Olaoluwa Osuntokun
61f5b3e3f1
Merge pull request #1709 from Empact/noisedial
Move noiseDial from config.go to server.go
2018-08-09 21:43:37 -07:00
Ben Woosley
896128efd0
Move noiseDial from config.go to server.go
noiseDial is only called from server.go, has nothing to do with configuration,
and moving it removes config.go's reliance on btcec and brontide.
2018-08-09 15:13:05 -04:00
Wilmer Paulino
75192a15e3
config: parse different ZMQ hosts for block and tx notifications
Due to recent changes to the BitcoindClient interface, we now require
the backing bitcoind to use different hosts for its ZMQ raw block and
raw transaction notifications. This was needed as the notification queue
maintained by the bitcoind node would sometimes overflow with
transactions and cause block notifications to be dropped/missed.
In this commit, we expand extractBitcoindRPCParams to account for this.
2018-08-08 20:26:29 -07:00
Olaoluwa Osuntokun
6f60f139f4 multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
Wilmer Paulino
833d037f66
config: use config file within lnddir unless overwritten 2018-07-06 12:44:36 -07:00
Olaoluwa Osuntokun
d83f4fbb85
Merge pull request #1498 from yaslama/fix-1488
Fix the ability to disable p2p listening
2018-07-03 22:40:02 -05:00
Olaoluwa Osuntokun
552a371f09
Merge pull request #1475 from cfromknecht/disable-mainnet-debug-htlc
config: disable debug-htlc mode on mainnet
2018-07-03 22:26:45 -05:00
Conner Fromknecht
7d116abedb
config: disable debug-htlc mode on mainnet 2018-07-03 17:08:53 -07:00
Yaacov Akiba Slama
c9c47b3a51 Fix the ability to disable p2p listening 2018-07-03 07:54:17 +03:00
Wilmer Paulino
f5c82983e2
config: only normalize and resolve tor DNS host if it has changed
In the event that the default Tor DNS host wouldn't resolve, it would
prevent `lnd` from starting due to the failed lookup. This should fail
silently as it's only crucial during bootstrapping. However, if the user
has explicitly modified this, we should let them know of the error
immediately.
2018-06-29 16:25:57 -07:00
Wilmer Paulino
bbeb8b2ddd
lncfg+config: use address string in IsLoopback 2018-06-27 19:03:30 -07:00
Olaoluwa Osuntokun
17399994e4
config+server: update usage of lncfg methods to pass in resolver
In this commit, we update all the lncfg methods used to properly pass in
a new resolver. This is required in order to ensure that we don't leak
our DNS queries if Tor mode is active.
2018-06-27 18:10:34 -07:00
Oliver Gugger
c1b1dd96ef
lncfg: move configuration helper methods to new package 2018-06-14 08:19:09 +02:00
Oliver Gugger
460fa25871
config+lnd+server: add unix socket support 2018-06-14 08:19:09 +02:00
Wilmer Paulino
8651b4a422
config: clarify documentation for NAT traversal flag 2018-06-12 18:36:24 -07:00
Wilmer Paulino
5732f5a1c4
config: normalize external IPs when parsing config 2018-06-12 18:32:49 -07:00
John Griffith
ba0db4ce91
Added some additional comments 2018-06-12 18:32:47 -07:00
John Griffith
1c3df21d18
Added NatPmp option 2018-06-12 18:32:46 -07:00
John Griffith
b59077109c
Added Upnp support behind a configuration option, moved the logic to the server code 2018-06-12 18:32:44 -07:00
Olaoluwa Osuntokun
f9c220cc7b
config: fix bug w/ tor onion services, only disable listen if no v2 or v3 2018-06-05 17:40:48 -07:00
Wilmer Paulino
978fc7ba08
config+lnd: update tor config to include onion services flags
In this commit, we update the set of Tor flags to use sane defaults when
not specified. We also include some new flags related to the recent
onion services changes. This allows users to easily get set up on Tor by
only specifying the tor.active flag. If needed, the defaults can still
be overridden.
2018-06-04 20:41:40 -07:00
Olaoluwa Osuntokun
41e1a7b056
config: add new command line option to disable chan update all together
In this commit, we add a new command line option to allow (ideally
routing nodes) to disable receiving up-to-date channel updates all
together. This may be desired as it'll allow routing nodes to save on
bandwidth as they don't need the channel updates to passively forward
HTLCs. In the scenario that they _do_ want to update their routing
policies, the first failed HTLC due to policy inconsistency will then
allow the routing node to propagate the new update to potential nodes
trying to route through it.
2018-05-31 16:30:58 -07:00