Relative CHECKLOCKTIMEVERIFY (was CLTV proposal) [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2015-05-06T22:09:59+00:00


Summary:

Several proposals and ideas were discussed by Bitcoin developers regarding the implementation of new opcodes and changes to the Bitcoin scripting system. One proposal was the addition of CHECKLOCKTIMEVERIFY (CLTV), which would make a transaction output unspendable until a certain point in the future. Another proposal suggested increasing the transaction version to achieve a similar outcome. Developers expressed concerns about changing the semantics of nSequence and the potential impact on previously valid transactions. Mark Friedenbach proposed an nSequence-based RCLTV proposal that was already reorg safe. Peter Todd and Matt Corallo discussed the idea of adding OP_RELATIVECHECKLOCKTIMEVERIFY (RCLTV) opcode, acknowledging its drawbacks but highlighting its usefulness for certain protocols. The conversations also touched on time-based locks and the potential incentive issues with mining. Timón proposed a new softfork rule to enforce setting the nHeight of CTxIn to the correct height. Discussions also revolved around implementing RCLTV and OP_MATURITY for more secure transactions against reorganization. In March 2015, Matt Corallo proposed requiring locktime to be at least N plus the input's height. Zooko preferred relative CHECKLOCKTIMEVERIFY over absolute CHECKLOCKTIMEVERIFY due to concerns about "race conditions. "The article discusses the use of the CHECKLOCKTIMEVERIFY opcode in Bitcoin scripts and its applications. Despite challenges such as exposing script information and enforcing mempool invariants during reorganizations, CHECKLOCKTIMEVERIFY can be used in non-interactive time-locked refunds, two-factor wallets, and micropayment channels. Two-factor wallets utilize 2-of-2 multisig scriptPubKeys, allowing users to spend funds without the cooperation of the service by waiting for the expiry time. The article also addresses vulnerabilities in Bitcoin protocols and suggests solutions. It analyzes micropayment channels and proposes using the same scriptPubKey as the two-factor wallet example to solve issues with refund transactions. The PayPub protocol for trustless payments for information is discussed, highlighting a flaw in the existing implementation that can be addressed with scriptPubKeys. The challenge of proving sacrifices of coins to mining fees is mentioned, and CHECKLOCKTIMEVERIFY is suggested as a solution to discourage mining centralization. Finally, the article suggests replacing the nLockTime field entirely with a per-signature capability that would serve as proof of spendability. Detailed specifications and references are provided for these proposed solutions.


Updated on: 2023-08-01T12:06:55.534846+00:00