Commit Graph

13 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun 1669e3d5ec
lnd: use first key in keychain.KeyFamilyNodeKey as our nodeID
In this commit, we update lnd to now access the deterministic
keychain.KeyRing struct in order to obtain our identity public key.
With this change, if the user recovers their wallet with the same seed,
then they’ll have access to the same prior node identity. This change
also makes it easy for us to support node key rotation in the future by
bumping up our requested index.
2018-03-06 16:04:04 -05:00
Olaoluwa Osuntokun 4b20e805fe
multi: update packages due to recent SignDescriptor and WalletController changes 2018-03-06 16:04:03 -05:00
Johan T. Halseth 7b30425111
multi test: update tests/mocks to use EstimateFeePerVSize 2018-02-26 22:42:27 +01:00
Jason Dufair 84551c616f lnwallet/lnrpc: Expose sync status to gRPC interface
This commit adds wallet_best_block_timestamp to the gRPC interface.
This is done in order to allow clients to calculate progress while
lnd syncs to the blockchain. wallet_best_block_timestamp is exposed
via the GetInfo() rpc call. Additionally, IsSynced() returns the
WalletBestBlockTimestamp as the second value in the tuple
that is returned, providing additional detail when querying about the
status of the sync. The BtcWallet interface has also been updated
accordingly.

This commit was created to support the issue to
[Add progress bar for chain sync] (lightninglabs/lightning-app#10) in
lightning-app
2018-02-20 19:00:06 -08:00
Olaoluwa Osuntokun 2faafbcd93
breacharbiter: properly account for second-level spends during breach remedy
In this commit, we address an un accounted for case during the breach
remedy process. If the remote node actually went directly to the second
layer during a channel breach attempt, then we wouldn’t properly be
able to sweep with out justice transaction, as some HTLC inputs may
actually be spent at that point.

In order to address this case, we’ll now catch the transaction
rejection, then check to see which input was spent, promote that to a
second level spend, and repeat as necessary. At the end of this loop,
any inputs which have been spent to the second level will have had the
prevouts and witnesses updated.

In order to perform this transition, we now also store the second level
witness script in the database. This allow us to modify the sign desc
with the proper input value, as well as witness script.
2018-01-22 19:20:01 -08:00
Olaoluwa Osuntokun b391049e49
lnd+test: update unit tests to account for recent API changes 2018-01-22 19:19:46 -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
Conner Fromknecht 20738885ef
mock: adds mockSpendNotifier and updates mockSigner 2018-01-05 13:47:17 -08:00
Olaoluwa Osuntokun a3cd248404
funding+utxonursery+breacharbiter: use new FeeEstimator API 2017-11-23 23:10:13 -06:00
Johan T. Halseth f5e324684f
test: use signDesc.HashType instead of SigHashAll in mockSigner 2017-11-06 14:31:23 +01:00
Jim Posen c94130328a lnwallet: Extend Utxo struct with AddressType.
The Utxo struct now includes the address type and redeem/witness
scripts. This is necessary for accurate fee estimation.
2017-10-19 17:37:53 -07:00
Olaoluwa Osuntokun 7f575b688e
multi: txscript.WitnessScript -> txscript.WitnessSignature 2017-08-24 18:55:32 -07:00
Johan T. Halseth e8e87322dd
peer: add channel close fee negotiation
This commit adds the fee negotiation procedure performed
on channel shutdown. The current algorithm picks an ideal
a fee based on the FeeEstimator and commit weigth, then
accepts the remote's fee if it is at most 50%-200% away
from the ideal. The fee negotiation procedure is similar
both as sender and receiver of the initial shutdown
message, and this commit also make both sides use the
same code path for handling these messages.
2017-08-11 12:10:32 +02:00