From ugamkamat1 at gmail.com Wed Jun 5 16:32:51 2019 From: ugamkamat1 at gmail.com (Ugam Kamat) Date: Wed, 5 Jun 2019 22:02:51 +0530 Subject: [Lightning-dev] BOLT #3: Shouldn't timeout be included in the script of "Offered HTLC Outputs" for the local node? In-Reply-To: <036601d51bbb$f406fa70$dc14ef50$@gmail.com> References: <033501d51bb6$9871cb90$c95562b0$@gmail.com> <036601d51bbb$f406fa70$dc14ef50$@gmail.com> Message-ID: <036d01d51bbc$5316c360$f9444a20$@gmail.com> Ah, now I see what you mean, it is locked with absolute timelock and hence I cannot broadcast that transaction. My apologies and thanks for the help! Ugam From: Ugam Kamat Sent: Wednesday, June 5, 2019 10:00 PM To: 'Pierre' Cc: 'lightning-dev' Subject: RE: [Lightning-dev] BOLT #3: Shouldn't timeout be included in the script of "Offered HTLC Outputs" for the local node? Hey Pierre, That?s what I am having a hard time understanding. Although it is timelocked in the second stage HTLC-timeout, I can still spend the original commitment transaction although after some time. This is what my thought process is: * Offer the Htlc output and sign the commitment transactions * Broadcast the commitment transaction containing the offered HTLC outputs to the main chain. The outputs of commitment tx are: (1) to remote; (2) to local with to_self_delay and (3) to P2WSH (the script I pasted earlier) * Commitment transaction gets mined * Spend the third output using 0 0 in the witness stack which will send the outputs to using to_self_delay Now I think when you say the HTLC time out transaction is timelocked, you are referring the to the to_self_delay when spending the htlc-timeout. But although there is that timeout, the commitment transaction is already broadcasted, and the P2WSH output is already sent to my public key (although with a delay I can still spend that without my counterparty?s assent). Now, my counterparty on the other hand when he gets the pre-image, does not have the P2WSH output to claim his bitcoins with the pre-image because it has been already locked with my which I can spend when the to_senf_delay` is over Ugam From: Pierre > Sent: Wednesday, June 5, 2019 9:35 PM To: Ugam Kamat > Cc: lightning-dev > Subject: Re: [Lightning-dev] BOLT #3: Shouldn't timeout be included in the script of "Offered HTLC Outputs" for the local node? Hello Ugam, The HTLC-Timeout transaction is timelocked (with locktime=cltv_expiry). Cheers, Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: