Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: MadGamer on March 12, 2018, 08:12:39 AM



Title: The downsides of OP_CHECKLOCKTIMEVERIFY?
Post by: MadGamer on March 12, 2018, 08:12:39 AM
The reason I'm asking this is because apparently, this was created by Peter Todd in 2014 according to GitHub and yet, no one implemented this except for Coinb.in even though It's very useful and from my understanding, this is better then nLockTime where basically the transaction becomes valid after certain period of time while with OP_CHECKLOCKTIMEVERIFY the coins are not even spendable.


Title: Re: The downsides of OP_CHECKLOCKTIMEVERIFY?
Post by: pebwindkraft on March 12, 2018, 08:24:14 AM
Quote
no one implemented this except for Coinb.in
what do you mean by this ?
You don't need to implement anything, you are free to create "your own" transaction and make use of the opcode. It is clear that OP_CHECKSEQUENCEVERIFY is heavily used in lightning setups, to create payment channels. Are you looking for a similiar use case for OP_CHECKLOCKTIMEVERIFY?


Title: Re: The downsides of OP_CHECKLOCKTIMEVERIFY?
Post by: suzanne5223 on March 12, 2018, 09:19:04 AM
Yes, no one implemented the except the mention wallet but the Ligntning Network are going to be the second to implement it and one of the down sides of the OP code is that it is not advisable to reuse the address used to withdraw before.


Title: Re: The downsides of OP_CHECKLOCKTIMEVERIFY?
Post by: Panthers52 on March 13, 2018, 06:32:01 AM
nLockTime is specific to the subject transaction. This means if you sign a transaction with an nLockTime, that transaction cannot confirm in a block prior to that constraint.

OP_CHECKLOCKTIMEVERIFY on the other hand, restrict outputs of a transaction from being spent prior to a certain constraint. There are very different use cases for OP_CHECKLOCKTIMEVERIFY than for nLockTime. If a customer is withdrawing funds from a service, there is no real reason why the service would want to restrict the customer from spending their withdrawal anything other than immediately.

As mentioned above, OP_CHECKLOCKTIMEVERIFY will be used with LN and other similar payment channels. It is likely that OP_CHECKLOCKTIMEVERIFY was soft-forked into Bitcoin with LN/payments channels in mind.


Title: Re: The downsides of OP_CHECKLOCKTIMEVERIFY?
Post by: pebwindkraft on March 13, 2018, 08:13:27 AM
I‘d like to see the proof for statements like „no one uses it“ from the several posters here. I guess this is more a proof of ignorance, than a review of the blockchain and its scripts in transactions. The OP_Code provides beneficial solution to manage all kinds of Time linked smart contracts, as discussed in a longer thread here:

https://bitcointalk.org/index.php?topic=2204938.msg23664225#msg23664225 (https://bitcointalk.org/index.php?topic=2204938.msg23664225#msg23664225)

Last recently I created some bitcoin transactions with a „holding time“ of one year, so that tax declaration will be positive, and I don‘t spend by accident some bitcoins, which I have less than a year. They would be expensive in tax declaration...

So it is up to everyone’s own imagination, to see positive value in new developments (like CLTV), or to stay behind and live with the existing environment.

Maybe also a change in the headline: more to something like „I don‘t understand what CLTV is used for“ or similar. Otherwise it just sounds like something is judged, which isn‘t understood, and this is usually considered a silly thing...