lightning-dev

BOLT #3: Shouldn't timeout be included in the script of "Offered HTLC Outputs" for the local node?

BOLT #3: Shouldn't timeout be included in the script of "Offered HTLC Outputs" for the local node?

Original Postby Ugam Kamat

Posted on: June 5, 2019 16:30 UTC

In an email exchange between Ugam Kamat and Pierre regarding Lightning Network protocol, Ugam expresses confusion about the timing of spending the original commitment transaction.

Ugam outlines his thought process which involves offering the HTLC output and signing the commitment transactions, broadcasting them to the main chain, and then spending the third output using 0 0 in the witness stack to send the outputs using to_self_delay. Pierre responds by clarifying that the HTLC-Timeout transaction is timelocked with locktime=cltv_expiry. Ugam further explains that although the timeout exists, the commitment transaction has already been broadcasted and the P2WSH output has been sent to his public key, allowing him to spend it without his counterparty's assent after the delay. On the other hand, when Ugam's counterparty receives the pre-image, they do not have access to the P2WSH output to claim their bitcoins because it has already been locked with Ugam's public key.