Commit Graph

100 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
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
Conner Fromknecht
7e08322d40
chainntfns: rename to CacheConfig and QueryDisabled 2020-07-14 19:24:44 -07: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
Oliver Gugger
4261d3f5af
lnd: remove global cfg variable 2020-05-14 16:18:02 +02:00
Oliver Gugger
85d5cdfbfd
multi: move global registeredChains to cfg 2020-05-14 14:47:35 +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
Olaoluwa Osuntokun
ea5193b104
Merge pull request #4192 from bhandras/fixes
mixed: apply fixes recommended by staticcheck and dead code removal
2020-04-30 19:01:53 -07:00
Wilmer Paulino
c039aee059
chainregistry: increase zmq connection timeout with bitcoind backend
There seems to be a misinterpretation of a variable between the
btcwallet and gozmq libraries. When establish a ZMQ connection, it
expects a timeout, which is used to set read deadlines and determine how
long we should wait before attempting a reconnection. Within btcwallet
and lnd however, this is is interpreted as a polling duration,
explaining the current value of 100ms. Under load, especially on
less-capable hardware, this leads to high resource usage as we get into
a constant reconnection loop. To remedy this, we use a timeout of 5s
instead, which is a much more reasonable value for read timeouts, and is
also what's used for LN peers.
2020-04-28 11:15:44 -07:00
Andras Banki-Horvath
556e3525ea misc: fix error formatting in multiple files 2020-04-24 19:15:08 +02:00
yyforyongyu
97da7b3444 multi: support config bitcoind fee estimate mode 2020-03-25 14:59:23 +08:00
John Newbery
6e4bbc75a0 [Docs] fix defaultBitcoinMinHTLCInMSat comment
Comment says default value is 0, when it is in fact 1.
2020-03-23 12:28:28 -04:00
Joost Jager
7ecbe22531
Merge pull request #3814 from joostjager/sweeper-add-utxo
sweep: add wallet inputs to reach dust limit
2019-12-18 09:53:04 +01:00
Joost Jager
8c43232f66
chainregistry: set static min relay fee
We need it to be set in order to properly test the sweeper handling the
dust limit on regtest.
2019-12-12 14:05:43 +01:00
Joost Jager
16ca36985e
chainregistry: lower incoming htlc amount default 2019-12-11 00:17:02 +01:00
Joost Jager
b826858a50
config: expose minhtlcout as a config parameter 2019-12-11 00:17:01 +01:00
Joost Jager
ddb98fcc41
multi: distinguish between htlc in and out constraints 2019-12-11 00:16:57 +01:00
Olaoluwa Osuntokun
777ed104a3
chainfee: create new chainfee package extracting fees from lnwallet
In this commit, we create a new chainfee package, that houses all fee
related functionality used within the codebase. The creation of this new
package furthers our long-term goal of extracting functionality from the
bloated `lnwallet` package into new distinct packages. Additionally,
this new packages resolves a class of import cycle that could arise if a
new package that was imported by something in `lnwallet` wanted to use
the existing fee related functions in the prior `lnwallet` package.
2019-10-31 16:41:57 -07:00
Wilmer Paulino
b63ed5ad56
config: add sync freelist cli flag 2019-10-04 12:19:42 -04:00
Wilmer Paulino
194a9dea81
multi: support sync freelist option within btcwallet 2019-10-04 12:19:40 -04:00
Wilmer Paulino
62d716d3c3
chainregistry: properly close neutrino database upon errors 2019-07-15 13:42:01 -07:00
Olaoluwa Osuntokun
831afdc919
lnd: add secondary DNS seed for mainnet 2019-06-28 16:10:52 -07:00
Valentine Wallace
25b540fec4 chainregistry+config: add neutrino flag to assert filter header chain 2019-06-06 16:05:12 -07:00
Joost Jager
dff0387363
lntest: move itest into package 2019-05-28 21:43:23 +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
Unknown
16aad1a9ee lnwallet+chainregistry: remove unused FeeEstimator from wallet cfg 2019-04-16 14:16:56 -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
Valentine Wallace
1179895d20 chainregistry+lnd: remove unused cleanUp variable 2019-04-16 14:16:56 -07:00
Olaoluwa Osuntokun
81bfebe7be
Merge pull request #2898 from Roasbeef/neutrino-ban-duration
lnd: increase neutrino ban duration to 48hrs from 5s
2019-04-09 21:51:08 -07:00
Johan T. Halseth
9cc0ea93b2
chainregistry: stop Neutrino before closing DB
To avoid the ChainService still attempting to access the database when
it gets closed, re-order the stop order such that the Chainservice gets
stopped before closing the DB.
2019-04-08 12:48:51 +02:00
Johan T. Halseth
9e67f25957
chainregistry: only stop ChainService after successful start 2019-04-08 12:48:42 +02:00
Olaoluwa Osuntokun
66189f1a21
lnd: increase neutrino ban duration to 48hrs from 5s
In this commit, we fix an oversight that overrode the default ban
duration for neutrino to 5s from the default 24 hrs. We correct this by
raising the ban duration to 48hrs. In the future in order to ignore
these peers persistently, we'll need to start to persist our ban list.
However that's a change for another time.
2019-04-05 16:07:54 -07:00
Olaoluwa Osuntokun
1a488f4aef chains: upgrade the keyRing instance in chainControl to a SecretKeyRing
In this commit, we upgrade regular KeyRing instance to a SecretKeyRing
instance as we need the upgraded instance in order to recover SCB's. Due
to the fact that we don't currently store the full KeyLocator for the
key used to derive a shachain root for each channel, we instead need to
obtain the private key vanilla to re-derive this value.
2019-03-28 17:38:07 -07:00
Olaoluwa Osuntokun
cddbf19aa2
Merge pull request #2759 from Roasbeef/cltv-lower-default
lnd: lower default CLTV delta from 144 to 40
2019-03-27 17:10:08 -07:00
Olaoluwa Osuntokun
10910318a2
lnd: extract neutrino initialization to new function 2019-03-13 17:20:38 -07:00
Wilmer Paulino
1fe6599fd8 lnd+chainregistry: initialize neutrino light client before wallet setup
In this commit, we slightly refactor the startup of lnd when running
with a Neutrino light client backend. We'll now begin syncing our
backend as soon as lnd starts and passes all configuration checks. Since
this is all done before lnd's wallet setup, the light client will be
syncing in the background while the user notes/inputs their wallet seed.
This is done in order to provide a better UX from the point of the user,
such that most of the chain will already be synced by the time they get
to deposit funds into the wallet.
2019-03-13 16:46:50 -07:00
Olaoluwa Osuntokun
c302f1ea3a
lnd: lower default CLTV delta from 144 to 40
In this commit, we lower the default CLTV delta from 144 (1 day) to 40
blocks (~7 hours). We do this as the initial value was purposefully very
high, and was only in place as place holder in earlier versions of the
software. Such a high value can also discourage path finding algorithms
from taking lnd paths due to the negative impact of CLTV value in widely
deployed heuristics.
2019-03-11 18:43:37 -07:00
Johan T. Halseth
c1ab49909f
Merge pull request #2517 from roeierez/chain_control_cleanup
Proper cleanup neutrino database in case of error
2019-02-07 17:26:44 +01:00
Joost Jager
9e012ecc93
multi: move Input interface and related code
This commit is a step to split the lnwallet package. It puts the Input
interface and implementations in a separate package along with all their
dependencies from lnwallet.
2019-01-31 13:25:33 +01:00
Roei Erez
ff172bdd3a proper cleanup neutrino database in case of error 2019-01-28 18:21:26 +02:00
Wilmer Paulino
c72da48111
multi: update to latest ChainNotifier impl New method 2019-01-21 13:57:43 -08:00
Joost Jager
91f3df07e4
lnwallet: prevent static fee estimator fees from being modified
Modifying the static fees is not thread safe. In this commit the fees
are made immutable.
2018-12-18 10:50:05 +01:00
Olaoluwa Osuntokun
b492114016
chainregistry: add the keyRing and walletController to chainControl 2018-12-06 16:25:35 -08:00
Wilmer Paulino
7d94c65afc
Revert "chainregistry: disable height hint cache"
This reverts commit 0e29a457e1f38b2841019dc6664de1697aa84b34.
2018-10-31 09:20:22 -07:00
Wilmer Paulino
2fa64dd6ff multi: update to new BitcoindClient API 2018-09-12 21:05:19 -07:00
Conner Fromknecht
0e29a457e1
chainregistry: disable height hint cache 2018-08-26 15:32:10 -07:00
Wilmer Paulino
4c2a0970b4
chainregistry: modify backends to use a height hint cache 2018-08-21 13:02:15 -04:00
Wilmer Paulino
dae5382fd4
chainregistry: correctly establish connection to bitcoind
In this commit, we fix a bug recently introduced where we would
construct the parameters required to connect to a bitcoind backend, but
never actually started the connection.
2018-08-09 23:29:49 -07:00