From nadav at suredbits.com Wed Jun 5 16:37:59 2019 From: nadav at suredbits.com (Nadav Kohen) Date: Wed, 5 Jun 2019 11:37:59 -0500 Subject: [Lightning-dev] BOLT #3: Shouldn't timeout be included in the script of "Offered HTLC Outputs" for the local node? In-Reply-To: <036d01d51bbc$5316c360$f9444a20$@gmail.com> References: <033501d51bb6$9871cb90$c95562b0$@gmail.com> <036601d51bbb$f406fa70$dc14ef50$@gmail.com> <036d01d51bbc$5316c360$f9444a20$@gmail.com> Message-ID: Hi Ugam, I also ran into an issue understanding this a while back, here's a PR I opened to try and make things more clear: https://github.com/lightningnetwork/lightning-rfc/pull/601 Feel free to add to it or comment if you think things could be improved :) Best, Nadav On Wed, Jun 5, 2019 at 11:33 AM Ugam Kamat wrote: > 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 > > > _______________________________________________ > Lightning-dev mailing list > Lightning-dev at lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: