Author: Rusty Russell 2016-02-08 20:17:07
Published on: 2016-02-08T20:17:07+00:00
The protocol for a Lightning Network payment channel can be simplified by eliminating acknowledgements. Each side of the transaction sends updates in the form of ADD, SETTLE, TIMEOUT, FAIL, and UNADD messages, followed by a COMMIT message with a signature. When a side sends a COMMIT message, they are locking in their updates to the other side's commit transaction, enforcing a requirement that they commit to their own updates first. Each side tracks two commit transactions: their own and the other side's. Once the recipient receives the COMMIT message, they commit the updates to their own commit transaction and stage them to the other side's commit transaction. A COMPLETE message is then sent to complete removal of the old commit transaction.To speed up the process, a non-binding ADD_FAIL message can be added to hint at failing an HTLC as soon as it is committed, allowing the recipient to UNADD if it receives it in time. Fee negotiation can be included in the COMMIT message, with a requested fee rate and a range of acceptable values. In the case of a REJECT message, the fee range can be adjusted and the COMPLETE message can be reattempted. Similar fee negotiation would be required for mutual close.
Updated on: 2023-05-23T22:33:43.102957+00:00