Ugam Kamat [ARCHIVE] on Nostr: đź“… Original date posted:2019-06-05 đź“ť Original message: Ah, now I see what you ...
đź“… Original date posted:2019-06-05
đź“ť Original message:
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 <ugamkamat1 at gmail.com>
Sent: Wednesday, June 5, 2019 10:00 PM
To: 'Pierre' <pm+lists at acinq.fr>
Cc: 'lightning-dev' <lightning-dev at lists.linuxfoundation.org>
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 <remotehtlcsig> <localhtlcsig> 0 in the witness stack which will send the outputs to <local_delayed_pubkey> 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 <local_delayed_pubkey> which I can spend when the to_senf_delay` is over
Ugam
From: Pierre <pm+lists at acinq.fr <mailto:pm+lists at acinq.fr> >
Sent: Wednesday, June 5, 2019 9:35 PM
To: Ugam Kamat <ugamkamat1 at gmail.com <mailto:ugamkamat1 at gmail.com> >
Cc: lightning-dev <lightning-dev at lists.linuxfoundation.org <mailto:lightning-dev at lists.linuxfoundation.org> >
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 <https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#htlc-timeout-and-htlc-success-transactions> is timelocked (with locktime=cltv_expiry).
Cheers,
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190605/da8d2741/attachment-0001.html>
đź“ť Original message:
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 <ugamkamat1 at gmail.com>
Sent: Wednesday, June 5, 2019 10:00 PM
To: 'Pierre' <pm+lists at acinq.fr>
Cc: 'lightning-dev' <lightning-dev at lists.linuxfoundation.org>
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 <remotehtlcsig> <localhtlcsig> 0 in the witness stack which will send the outputs to <local_delayed_pubkey> 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 <local_delayed_pubkey> which I can spend when the to_senf_delay` is over
Ugam
From: Pierre <pm+lists at acinq.fr <mailto:pm+lists at acinq.fr> >
Sent: Wednesday, June 5, 2019 9:35 PM
To: Ugam Kamat <ugamkamat1 at gmail.com <mailto:ugamkamat1 at gmail.com> >
Cc: lightning-dev <lightning-dev at lists.linuxfoundation.org <mailto:lightning-dev at lists.linuxfoundation.org> >
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 <https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#htlc-timeout-and-htlc-success-transactions> is timelocked (with locktime=cltv_expiry).
Cheers,
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20190605/da8d2741/attachment-0001.html>