Commit Graph

85 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
0cd2448f49 chains: specify that current btc+ltc genesis hashes are for testnet 2018-03-14 18:24:26 -07:00
Conner Fromknecht
5f7a62913f
chainregistry: generalize bitcoind logic to handle litecoind 2018-03-14 16:57:37 -07:00
Conner Fromknecht
2447f3097f
chainregistry: init secret key ring wth CoinType from params 2018-03-13 16:33:45 -07:00
Olaoluwa Osuntokun
9981c4ce38
lnd: populate the secret key ring in the lnwallet config 2018-03-06 16:04:05 -05:00
Johan T. Halseth
6d5c0679f4
chainregistry: express fee rates in sat/vbyte 2018-02-26 22:42:25 +01:00
Olaoluwa Osuntokun
3fcce9959b
lnd: pass through the custom dialer+DNS to neutrino
In this commit, we modify our initialization of neutrino to also pass
in the custom dialer and name resolver function. With this change, if
lnd is configured to use Tor, then neutrino will as well. This means
that *both* the Bitcoin P2P as well as the Lightning P2P traffic will
be proxied over Tor.
2018-02-09 12:16:17 -08:00
Conner Fromknecht
d0afac0407 chainregistry: move neutrino database to chain dir 2018-01-31 17:37:08 -08:00
Alex
9a02884d0b main/lntest: factor out node config options, add options for bitcoind
This commit factors out the btcd and ltcd options into their own sections
similar to neutrino, and adds a bitcoind section as well. Now, you specify
node options similarly to:

--ltcd.rpchost=...
or
--btcd.rpcuser=...
or
--bitcoind.zmqpath=...

For Bitcoin, you specify an alternate back-end to btcd as follows:

--bitcoin.node=bitcoind
or
--bitcoin.node=neutrino

You can also specify the default option:
--bitcoin.node=btcd

For Litecoin, only `btcd` mode is valid, and corresponds to the `ltcd`
section. For example:

--litecoin.node=btcd
--ltcd.rpchost=...

The new code also attempts to read the correct options and auth info
from bitcoin.conf just as it does from btcd.conf/ltcd.conf.
2018-01-15 13:59:34 -08:00
Johan T. Halseth
10bd46ac72
chainregistry: use forwarding policy rules from config
This commit removes the definitions of
defaultBitcoinForwardingPolicy and defaultLitecoinForwardingPolicy
from the the chainregistry, and instead creates a routingPolicy
from the values found in the config.
2018-01-12 22:56:44 +01:00
Olaoluwa Osuntokun
f50b911ebc lnd: if using btcd backend, ensure that --txindex is active
In this commit, we add a new runtime assertion to ensure that the
backed btcd node (if this mode is active) has the proper indexes set
up. Atm, if btcd isn’t running with the txindex active, then the
current ChainNotifier implementation will be unable to properly handle
certain classes of historical notification dispatches.

In order to test that the running btcd node is configured properly,
we’ll fetch the latest block, then try to query a transaction within
that block using the txindex. If btcd isn’t running with this mode
active, then the request will fail. In this case, we’ll then fail to
start lnd with an error.

Fixes #525.
2018-01-08 19:47:37 -08:00
Olaoluwa Osuntokun
a036098e36
chains: increase default MInHTLC value to 1000 mSAT (1 SAT) 2017-12-13 17:10:30 -08:00
Olaoluwa Osuntokun
30b4ab2c74
chains: use proper genesis hash for Bitcoin's testnet 2017-12-02 18:04:08 -08:00
Olaoluwa Osuntokun
4d6cd2ee36
chain: the default minHTLC policy is now 1 2017-11-30 22:54:39 -08:00
Olaoluwa Osuntokun
f4f476fe9f
chainregistry: also disable fee estimation for regtest 2017-11-29 16:15:09 -08:00
Olaoluwa Osuntokun
ad364ae9a1
chains+server: if not in simnet mode, use BtcdFeeEstimator 2017-11-23 23:10:12 -06:00
Olaoluwa Osuntokun
991a2fbb5f
chainregistry: add shim for TCP fallback for current DNS seed 2017-10-30 19:02:56 -07:00
Olaoluwa Osuntokun
8358349b2d
lnd: revert back to prior default wallet public passphrase
In this commit we ensure the behavior of lnd with the —noencryptwallet
command line option heaves as it did before user initiated wallet
encryption was implemented. We do this by modifying the
waitForWalletPassword method to instead return two pass phrases: one
public and one private. The default wallet public passphrase is then
restarted back to the value which was used stoically in the codebase
before the latest merged PR.
2017-10-19 19:53:28 -07:00
Johan T. Halseth
62dc6b81d2 chainregistry: take wallet password as parameter to newChainControlFromConfig
This let the caller of newChainControlFromConfig set the password
to be used when creating or unlocking the wallet database. The
provided password is used both as private and public password.
2017-10-19 19:17:35 -07:00
Olaoluwa Osuntokun
fe0a7b6a09
multi: fix linter errors 2017-09-03 17:05:11 -07:00
Olaoluwa Osuntokun
74ef963124
chains: add a set of BOLT-0010 DNS seeds for bitcoin 2017-09-03 16:53:33 -07:00
Olaoluwa Osuntokun
d5cc0441f4
chains: use distinct StaticFeeEstimator instances for Bitcoin and Litecoin 2017-09-03 16:53:09 -07:00
Olaoluwa Osuntokun
9f0efddc20
multi: switch from btcrpcclient to rpcclient 2017-08-24 18:54:24 -07:00
Olaoluwa Osuntokun
5fa345310b
chain: set default fees to min possible 2017-08-22 00:52:36 -07:00
Olaoluwa Osuntokun
16462e1d57
chains: specify a default CLTV expiration of 1 day equiv for each chain 2017-08-02 21:18:54 -07:00
Olaoluwa Osuntokun
a73589f3e9
lnd: properly initialize LightningWallet with new config 2017-07-30 17:52:07 -07:00
Olaoluwa Osuntokun
89537318c1
chains: add default routing policy for current supported blockchains 2017-06-17 00:12:43 +02:00
Olaoluwa Osuntokun
dc40662770
lnwallet/btcwallet: properly pass in FeeEstimator to btcwallet
This commit fixes a bug wherein the wallet would use the default relay
fee to craft transactions. On testnet, this might be insufficient or be
rejected all together in a mainnet setting. Therefore, we now pass in
the FeeEstimator interface and ensure that it’s consulted in order to
set the relay fee the wallet will use to craft transactions.

Note that this is a hold over until we have true dynamic fee
calculation within lnd which can then be extended to the internal
wallets.
2017-06-07 17:01:27 -07:00
Olaoluwa Osuntokun
9fd70958f4
multi: fix linter errors 2017-06-05 19:45:01 -07:00
Olaoluwa Osuntokun
cbf7cd48f5
multi: update to latest neutrino API changes 2017-06-05 19:41:07 -07:00
Olaoluwa Osuntokun
4b29c70c45
lnd: rename light client cmd line option to --neutrino.X=K 2017-06-05 19:23:09 -07:00
Olaoluwa Osuntokun
593ba7c8f0
lnd: newChainControlFromConfig can now create light client backed chainControl
This commit finishes up the implementation of newChainControlFromConfig
in order to properly initiate the members of the chainControl struct
when the new light client mode (neutrino). With this lnd is now able to
switch over to either mode with a simple configuration change.
2017-06-05 19:14:41 -07:00
Alex
7859f4fcc6 chainregistry: change data dir for address manager 2017-06-05 18:54:22 -07:00
Alex
d5130909d4 chainregistry: create neutrino DB in correct directory 2017-06-05 18:54:16 -07:00
Olaoluwa Osuntokun
770d6b136f
chainregistry: add new method to automatically create chainControl 2017-06-05 18:48:12 -07:00
Olaoluwa Osuntokun
04d0e099cc
lnd: add new chainRegistry struct for multi-chain dispatch
This commit adds a new agent to the codebase: the chainRegistry. In a
multi-chain future, the chainRegistry will be the dispatch point
capable of mapping cross-chain parameters, and a particular chain to
the chainControl for that chain. The chainControl struct encompasses
the 3 primary interfaces used within the daemon to register for events,
and drive other workflows.
2017-05-02 19:57:46 -07:00