HTLCs using OP_CHECKSEQUENCEVERIFY/OP_LOCKTIMEVERIFY and revocation hashes.



Summary:

In a message exchange between Anthony Towns and Rusty Russell in July 2015, they discuss the concept of hash time-locked contracts (HTLCs) required for lightning to be a network. Both parties maintain a commitment transaction with two outputs, one paying to self and the other paying to the other side. In order to generate HTLCs, each commitment transaction gets an additional output per HTLC. This output is spendable under four conditions: the recipient knows the R value; the HTLC has timed out; the HTLC has been revoked; or the commit transaction has been revoked.Rusty explains that the last two failure modes are separate from each other because HTLCs have different lifetimes from commit transactions. However, Anthony questions the logic behind this statement. Upon further inspection, it is revealed that the paper had removed unnecessary HTLC revocation as it was a leftover from before HTLCs were reduced to a single output. Rusty mentions that he still hasn't written the code, but hopes to finish the dual-anchor code soon so that HTLCs can be implemented next. The conversation provides insight into the technicalities of lightning and the requirements for its successful implementation.


Updated on: 2023-05-23T18:21:25.758964+00:00