• Welcome to forex.pm forex forum binary options trade. Please login or sign up.
 

Difference between using nLockTime and CLTV in a penalty transaction

Started by Bitcoin, Feb 07, 2022, 06:28 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bitcoin

Difference between using nLockTime and CLTV in a penalty transaction

After opening a payment channel, a penalty transaction must be exchanged between parties involved so that in case the channel was not closed properly nobody will lose their money. If a channel was closed normally, the submission of the penalty transaction will be rejected since it will be regarded as double spending. A penalty transaction requires a time lock to allow the payment channel to be closed in a normal manner. Both nLockTime and CLTV can be used for this purpose. My understanding of nLockTime and CLTV is that nLockTime is a transaction level lock and CLTV is a UTXO level lock. If nLockTime is used for penalty transaction, the submission of penalty transactions are useless since miners will not include them in a mining block until their lock expires. This is very clear to me. But on web materials, it is said CLTV is preferred to nLockTime because of transaction malleability attack. However, I am not clear about how CLTV works in a penalty transaction. I will explain my understanding. Please correct me what is wrong with my understanding. Since CLTV is a UTXO level, the penalty transaction is a valid transaction and miners would accept it and can include it in a mining block. Even if the penalty transaction was mined, the UTXO in that transaction cannot be spent until the corresponding lock expires. But if the channel was closed properly, last transaction of the channel will collide with the already mined penalty transaction. This means a penalty transaction with CLTV cannot be submitted until the lock is expired as was when nLockTime was used. In this case, the lock on the output of the transaction will expire immediately.


Source: Difference between using nLockTime and CLTV in a penalty transaction