OP_CHECKTEMPLATEVERIFY
Also covering OP_CHECKOUTPUTSHASHVERIFY
OP_CHECKTEMPLATEVERIFY (CTV) is a proposed new opcode that takes a commitment hash as a parameter and requires any transaction executing the opcode include a set of outputs that match the commitment. This makes it possible to create an address that specifies how any funds received to that address may be spent—a design known in Bitcoin as a covenant.
Originally introduced under the name OP_CHECKOUTPUTSHASHVERIFY (COSHV), the proposal initially focused on the ability to create congestion control transactions where a spender pays a single address using CTV which, when confirmed to a suitable depth, then assures several receivers that they can each be paid. This two-step process can probably be used anywhere payment batching is an option but it can likely reduce fees even further than payment batching.
Later versions of the proposal placed greater emphasis on other contracts and covenants that could be created using the new opcode, such as the ability to create channel factories, vaults, and coinjoin transactions in new ways that might simplify construction or reduce fees. Other authors have mentioned that the new opcode could possibly be used to allow users to trustlessly pool their funds together into a single UTXO in a way that would increase privacy.
Criticisms of the proposal have focused on it being too specific to the congestion control use case rather than providing a generic covenant capability.
Primary code and documentation
Optech newsletter and website mentions
2022
- New software fork of Bitcoin Core for testing to include support for CTV
- Proposal to initially restrict
OP_TX
to the features provided byOP_CTV
- BIPs #1309 updates BIP119’s example implementation to use pythonic pseudocode
- Implications of bare CTV not having an address format
- Discussion about activating CTV
- Continued CTV discussion and the design for a CTV-based vault
- Parameters published for
OP_CHECKTEMPLATEVERIFY
signet - OP_TXHASH as a proposed alternative to CTV and APO
- Discussion about how CTV or other covenant features could make DLCs much more efficient
- Mailing list and IRC discussion of CTV, including criticism and rebuttals
- Bi-weekly IRC meetings scheduled for reviewing and discussing
OP_CHECKTEMPLATEVERIFY
2021
- BIPs #1215 makes several updates to the BIP119 OP_CHECKTEMPLATEVERIFY proposal
- Public launch of Sapio with support for using
OP_CHECKTEMPLATEVERIFY
2020
- Sapio: a new language for building contracts with OP_CHECKTEMPLATEVERIFY
- Vault prototype with sample implementation using OP_CHECKTEMPLATEVERIFY
- OP_CHECKTEMPLATEVERIFY workshop summary
- BIPs #875 assigns BIP119 to the OP_CHECKTEMPLATEVERIFY proposal
2019
- 2019 year-in-review: OP_CHECKTEMPLATEVERIFY
- OP_CHECKTEMPLATEVERIFY (CTV) replaces COSHV proposal; concerns restated
- Potential script changes, including new COSHV opcode
- COSHV proposal replaced
- Proposed new opcode for transaction output commitments
- Detailed summary: proposed transaction output commitments
See also
Previous Topic:
OP_CHECKSIGFROMSTACK
Next Topic:
OP_CODESEPARATOR