lnd.xprv/lnwallet
Olaoluwa Osuntokun d7cdf822e3
lnwallet: update commitmentKeyRing to account for distinct HTLC keys
In this commit, we update all the key derivation within the state
machine to account for the recent spec change which introduces a
distinct key for usages within all HTLC scripts. This change means that
the commitment payment and delay base points, are only required to be
online in the case that a party is forced to go to chain.

We introduce an additional local tweak to the keyring for the HTLC
tweak. Additionally, two new keys have been added: a local and a remote
HTLC key. Generation of sender/receiver HTLC scripts now use the local
and remote HTLC keys rather than the “payment” key for each party.
Finally, when creating/verifying signatures for second-level HTLC
transactions, we use these the distinct HTLC keys, rather than re-using
the payment keys.
2017-11-16 20:00:03 -08:00
..
btcwallet lnwallet/btcwallet: Use signDesc.HashType when signing 2017-11-06 14:31:03 +01:00
channel_test.go lnwallet: update commitmentKeyRing to account for distinct HTLC keys 2017-11-16 20:00:03 -08:00
channel.go lnwallet: update commitmentKeyRing to account for distinct HTLC keys 2017-11-16 20:00:03 -08:00
config.go lnwallet: flesh out the Config struct, wallet constructor now takes 2017-07-30 17:49:41 -07:00
interface_test.go lnwallet: fix linter complaints re. capitalization in interface test 2017-11-11 17:24:48 -08:00
interface.go lnwallet: Extend Utxo struct with AddressType. 2017-10-19 17:37:53 -07:00
log.go lnwallet: don't attach the rpcclient to the lnwallet logging instance 2017-08-30 20:32:37 -07:00
parameters.go fundingmanager+lnwallet: add HTLC dust limit logic 2016-12-13 11:01:57 -08:00
README.md multi: fix formatting issues in packge README's 2017-03-27 16:25:25 -07:00
reservation.go lnwallet: update funding flow to use new channeldb API's 2017-11-10 19:50:59 -08:00
script_utils_test.go lnwallet: update commitmentKeyRing to account for distinct HTLC keys 2017-11-16 20:00:03 -08:00
script_utils.go lnwallet: update sender/receiver HTLC scripts to use distinct HTLC keys 2017-11-16 20:00:02 -08:00
signdescriptor_test.go lnwallet: move latest SignDescriptor + serialization 2017-08-25 17:56:50 -07:00
signdescriptor.go lnwallet/signdesc: increases max witness parsing length 2017-09-19 19:18:21 -07:00
sigpool.go lnwallet: ensure sigPool goroutines can always exit 2017-11-11 14:59:56 -08:00
size_test.go lnwallet: Add TxWeightEstimator support for nested pay-to-witness. 2017-10-19 17:37:53 -07:00
size.go lnwallet/size: adds htlc success and timeout witness sizes 2017-11-15 18:04:44 -08:00
txout_test.go lnwallet: move txout serialization out of lnwire 2017-09-14 13:56:25 +02:00
txout.go lnwallet: move txout serialization out of lnwire 2017-09-14 13:56:25 +02:00
wallet.go lnwallet: populate our HtlcBasePoint when reserving a funding reservation 2017-11-16 20:00:01 -08:00
witnessgen.go lnwallet/witnessgen: add HtlcOfferedTimeLock witness type 2017-11-15 18:04:44 -08:00

lnwallet

Build Status MIT licensed GoDoc

The lnwallet package implements an abstracted wallet controller that is able to drive channel funding workflows, a number of script utilities, witness generation functions for the various Lightning scripts, revocation key derivation, and the commitment update state machine.

The package is used within lnd as the core wallet of the daemon. The wallet itself is composed of several distinct interfaces that decouple the implementation of things like signing and blockchain access. This separation allows new WalletController implementations to be be easily dropped into lnd without disrupting the code base. A series of integration tests at the interface level are also in place to ensure conformance of the implementation with the interface.

Installation and Updating

$ go get -u github.com/lightningnetwork/lnd/lnwallet