This commit adds some additional documentation in the form of comments
to the start of the revised single funder workflow.
A primary change lies in the introduction of the exchange of Channel
Derivation Points (CDP’s) for both sides. Using CDP’s we can derive
channel authentication proofs which are both unforgettable and binding.
This commit adds the SingleFundingSignComplete message to the single
funder transaction workflow. This marks the second to last message sent
in the workflow. The message transports Bob’s signature for the
commitment transaction, allowing Alice to broadcast the funding
transaction as she can now refund her inputs.
This commit adds the SingleFundingComplete message to the single funder
channel workflow. This is the 3rd message sent in the workflow,
traveling from Alice to Bob once Alice is able to construct the final
commitment transaction.
Only nested p2sh or pure witness outputs are used when selecting coins
for inputs to a funding transaction.
The funding transaction output now uses p2wsh rather than regular p2sh.
All tests have been updated accordingly.
The new available address types are: regular p2pkh, p2wkh, and finally
p2wkh nested within p2sh. The latter address type will initially be
used to allow users to “fund” the lnd wallet.
The newest version has changed the generated gRPC source files a bit.
If you’re running the _newset_ version of gRPC against the previously
generated code, you’ll get a compile error.
This commit fixes the above behavior.
This method has been added in order to allow lnd to collect eligible
unspent witness programs outputs from the wallet controller for use as
inputs to the funding transaction.
Additionally, the change address functions now also specify whether the
generated change address should be payable to a witness program or not.
The WalletController will serve as a layer of separation between “base”
Bitcoin wallet logic, and the higher level Lightning Network logic. As
a result LightningWallet will no behave as an overly wallet, relying on
the lower wallet for basic services such as new address, signing etc.
Within this higher level lies the awareness of channel types, chain
monitoring, HTLCs, and so on.
The state of OpenChannel on disk has now been partitioned into several
buckets+keys within the db. At the top level, a set of prefixed keys
stored common data updated frequently (with every channel update).
These fields are stored at the top level in order to facilities prefix
scans, and to avoid read/write amplification due to
serialization/deserialization with each read/write.
Within the active channel bucket, a nested bucket keyed on the node’s
ID stores the remainder of the channel.
Additionally OpenChannel now uses elkrem rather than shachain, delivery
scripts instead of addresses, stores the total net fees, and splits the
csv delay into the remote vs local node’s.
Several TODO’s have been left lingering, to be visited in the near
future.
Commit includes basic tests for Open/Create. Additionally, rather than
relying on btcwallet’s addmgr for encryption/decryption, this package
now exposes a simple crypto system interface.