lnd.xprv/lnwallet
Olaoluwa Osuntokun 91165d98bb
lnwallet: eliminate the InitialRevocationWindow within the state machine
This commit modifies the current core channel state machine in order to
may a step towards BOLT-0002 and BOLT-0003 compliance. In this change,
we abandon the prior revocation window, in favor of a fixed revocation
window of size two. The revocation window will be filled at the start
of the lifetime of the channel, and never extended from there until the
channel has been fully closed.

We now maintain two variables, the current un-revoked commitment point,
and the next commitment point to use when creating a new state. The
next commitment point must initially be inserted into the channel state
with the InitNextRevocation method.

A major difference between the prior revocation key handling is that
the remote party now instead sends us the _commitment point_ in
isolation, which we then use locally (with our revocation base point)
to create the next full revocation key for _their_ commitment
transaction.
2017-07-30 17:50:13 -07:00
..
btcwallet lnwallet: update the btcwallet Signer interface due to new key derivation 2017-07-30 17:50:00 -07:00
channel_test.go lnwallet: add update_fee message support. 2017-07-14 16:39:15 -07:00
channel.go lnwallet: eliminate the InitialRevocationWindow within the state machine 2017-07-30 17:50:13 -07: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: update interface-level wallet tests for new funding flow 2017-07-30 17:50:03 -07:00
interface.go lnwallet: modify the Signer interface to reflect new key derivation scheme 2017-07-30 17:49:31 -07:00
log.go lnd: remove seelog logger 2017-06-25 14:19:56 +01: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 Channel[Reservation+Contribution] for new funding flow 2017-07-30 17:49:37 -07:00
script_utils_test.go lnwallet: update TestCommitmentSpendValidation due to new commitment scripts 2017-07-30 17:49:25 -07:00
script_utils.go lnwallet: add new functions to generate + claim second-level HTLC txns 2017-07-30 17:48:56 -07:00
sigpool.go lnwallet: introduce the sigPool struct to optimize state creation+verification 2017-07-30 17:50:06 -07:00
size.go lnwallet: update MaxHTLCNumber to precisely match the spec 2017-07-30 17:49:03 -07:00
wallet.go lnwallet: update internal funding workflow to account for BOLT-0002 2017-07-30 17:49:47 -07: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