Close Menu
StreamLineCrypto.comStreamLineCrypto.com
  • Home
  • Crypto News
  • Bitcoin
  • Altcoins
  • NFT
  • Defi
  • Blockchain
  • Metaverse
  • Regulations
  • Trading
What's Hot

Bitcoin watches as US injects $3 billion into banks

March 3, 2026

Bitcoin jumps 4.8% as Iran outflows spike after U.S.–Israel strike

March 3, 2026

Ripple (XRP) Payments Unifies Fiat and Stablecoin Rails After $200M Rail Acquisition

March 3, 2026
Facebook X (Twitter) Instagram
Tuesday, March 3 2026
  • Contact Us
  • Privacy Policy
  • Cookie Privacy Policy
  • Terms of Use
  • DMCA
Facebook X (Twitter) Instagram
StreamLineCrypto.comStreamLineCrypto.com
  • Home
  • Crypto News
  • Bitcoin
  • Altcoins
  • NFT
  • Defi
  • Blockchain
  • Metaverse
  • Regulations
  • Trading
StreamLineCrypto.comStreamLineCrypto.com

Bitcoin Covenants: CHECKTEMPLATEVERIFY (BIP 119)

March 28, 2025Updated:March 29, 2025No Comments8 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Bitcoin Covenants: CHECKTEMPLATEVERIFY (BIP 119)
Share
Facebook Twitter LinkedIn Pinterest Email
ad


That is the primary article in a sequence deep diving into particular person covenant proposals which have reached a degree of maturity meriting an in depth breakdown. 

CHECKTEMPLATEVERIFY (CTV), put ahead by Jeremy Rubin with BIP 119, is probably the most mature and absolutely fleshed out covenant proposal, not solely out of the proposals we might be overlaying, however out of all the covenant proposals of their entirety. As I discussed within the introduction article to this sequence, there are a lot of issues within the ecosystem relating to covenants which are too versatile enabling issues that wind up having very detrimental penalties for Bitcoin. 

CTV was designed particularly to constrain its capabilities tightly sufficient to keep away from any of these issues. To first perceive how CTV features, we have to perceive the person elements of a Bitcoin transaction. 

https://www.researchgate.net/figure/A-sample-Bitcoin-transaction_fig1_340234444

This can be a very excessive degree view of a Bitcoin transaction. It has inputs, or unspent cash (UTXOs), and outputs, the brand new unspent cash that the transaction will create when it’s confirmed in a block. There are much more items we’ll undergo, however that is the best degree view of a transaction’s construction. 

Each transaction additionally has a model quantity area for the entire transaction, indicating applicability of latest variations of guidelines or options. There’s additionally the marker and the flag, that are set to particular values to point the transaction makes use of Segwit. After that is the enter rely, the variety of inputs within the transaction. Then come the precise inputs. 

Every enter incorporates a TXID of the transaction that created the unspent coin being spent, a VOUT which marks what output in that transaction is being spent, the dimensions of the ScriptSig, and the ScriptSig, which is the unlocking script proving the enter being spent is allowed by its locking script guidelines, and at last a Sequence quantity which is used to make sure the enter being spent is following relative timelock guidelines. i.e. the enter has existed for a sure variety of blocks or size of time since its creation. 

The output rely is the following piece of knowledge, the variety of outputs within the transaction. After this comes the precise outputs, which comprise an quantity of satoshis assigned to that output, the ScriptPubKey measurement, and the precise ScriptPubKey, which is the locking script for that output. Lastly the nLocktime area applies a timelock worth in timestamp or block peak that applies to your entire transaction. 

Every Segwit transaction additionally incorporates a Witness part, the place every enter has a corresponding witness containing a Stack Objects rely, what number of issues might be placed on the script stack, a Dimension area for every merchandise, and the precise information Merchandise to go on the stack. 

How CTV Works

CTV is an opcode that permits probably the most fundamental type of introspection and ahead information finishing up of all of the covenant proposals. It permits a script to take a pre-defined 32 byte hash and evaluate that towards a hash of a lot of the fields of the spending transaction. If the hash derived from the precise spending transaction doesn’t match the pre-defined hash, the transaction is invalid. 

The fields it commits to are:

  • nVersion
  • nLocktime
  • Enter rely
  • A hash of all of the nSequence fields
  • Output rely
  • A hash of all of the outputs
  • Enter index (the place the enter has within the transaction, 1st enter, 2nd, and many others.)

These are all of the fields dedicated to by the CTV hash, of their entirety, and with no capability to select and select. That is the diploma of introspection CTV allows, “does the hash of those fields within the spending transaction match the hash within the locking script of the enter being spent,” that’s it. The hash commits to basically your entire transaction besides the precise inputs. There’s a cause the hash doesn’t embody the inputs. To be able to lock an output to a 32 byte hash with CTV, it is advisable know the hash of the transaction that you’re guaranteeing is the one method for it to be spent. The enter locked with CTV being spent should embody this hash so as to be verified towards CTV. That necessitates having the hash of that transaction earlier than you create the entire transaction. That isn’t doable. 

You may also nest CTV scripts, i.e. have an preliminary CTV script decide to a transaction with outputs that additionally embody CTV scripts. That is what permits CTV to “carry ahead” information. All it carries ahead in follow although is no matter information is contained within the chain of transactions. You are able to do this in principle to an infinite depth, however you might be restricted in follow to a finite depth as a result of the nesting have to be generated backwards ranging from the top. It’s because every degree, or “hop,”  will need to have the hash of the transaction transferring to the following one, in any other case you’ll be able to’t create the locking script within the first place. For those who don’t already know the following transaction, you’ll be able to’t generate the earlier one. 

What Is CTV Helpful For

CTV permits you to limit an output in order that it may well solely be spent, in keeping with consensus guidelines, by a precise pre-defined transaction. A few of you could be asking what the massive deal is, we will already pre-sign transactions. If the extent of introspection is so restricted that it may well solely accomplish one thing we will already do exactly pre-signing, what’s the worth add? 

First, pre-signed transactions all the time depart open the potential of the keyholder(s) signing new transactions and spending these cash differently. You need to belief that the keyholder won’t do that, or will delete the important thing wanted to signal with (which you additionally must belief them on). CTV removes that belief completely. As soon as the spending transaction is outlined and the output locked to that CTV hash is created, there isn’t a chance of being spent one other method, enforced by consensus. 

At present the one method round that belief is to be concerned in pre-signing transactions your self utilizing multisig. Then you definately might be utterly sure that except you select to signal one your self, no different legitimate transaction spending a coin differently might be created. The issue is the extra persons are concerned, the harder and unreliable coordinating everybody to pre-sign a transaction on the identical time turns into. Previous small sizes it turns into a very impractical downside to unravel reliably. 

CTV provides a method for folks to know a set of transactions is dedicated with out everybody having to get on-line on the identical time to signal them. It enormously simplifies the coordination course of by permitting everybody to get the wanted data to anybody else every time they’ll, and as soon as that individual has everybody’s data they’ll create the chain of CTV transactions with out anybody else’s involvement, and everybody can confirm and make sure that the proper end result is the one doable one. 

That’s extremely worthwhile by itself, however CTV can even allow much more worthwhile issues together with different opcodes, which we’ll see within the subsequent article. 

Closing Ideas

CTV is a tightly restricted covenant that permits a level of introspection and ahead information carrying that’s so restricted it doesn’t exceed the precise performance of something that may be achieved with pre-signed transactions. The worth proposition just isn’t in enabling new performance in its personal proper, however drastically bettering the effectivity, scalability, and safety ensures of what might be constructed presently utilizing pre-signed transactions. This alone is a large profit to virtually each presently deployed protocol utilizing pre-signed transactions.

Listed here are a number of the tasks demonstrating how completely fleshed out and explored this explicit covenant is in comparison with the others:

  • A fundamental fee pool instance by stutxo. 
  • A CTV vault implementation by James O’Beirne, who went on to suggest OP_VAULT (which nonetheless makes use of CTV). 
  • A proof-of-concept port of the pre-signed transaction primarily based Ark implementation from Second by Steven Roose to make use of CTV as an alternative.
  • The Sapio Language by Jeremy Rubin himself, a better degree language for constructing contracts with CTV (additionally supporting using pre-signed transactions as an alternative). 
  • Timeout Timber, a proposal for a really fundamental coinpool design by John Legislation.
  • Quite a few different doable protocols, comparable to optimized Discreet Log Contracts (DLCs), non-interactive Lightning channels one celebration may open with out the opposite, and even decentralized methods for miners to pool collectively. 

CTV is an extremely mature proposal at this level, with a excessive worth add, and no danger of enabling something driving the issues round covenants. This could not solely be very critically thought-about, however in my private opinion ought to have been activated years in the past. 



Source link

ad
BIP Bitcoin CHECKTEMPLATEVERIFY Covenants
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Related Posts

Bitcoin watches as US injects $3 billion into banks

March 3, 2026

Bitcoin jumps 4.8% as Iran outflows spike after U.S.–Israel strike

March 3, 2026

Ripple (XRP) Payments Unifies Fiat and Stablecoin Rails After $200M Rail Acquisition

March 3, 2026

XRP Ledger Security Debate Intensifies After BatchGate Scare

March 3, 2026
Add A Comment
Leave A Reply Cancel Reply

ad
What's New Here!
Bitcoin watches as US injects $3 billion into banks
March 3, 2026
Bitcoin jumps 4.8% as Iran outflows spike after U.S.–Israel strike
March 3, 2026
Ripple (XRP) Payments Unifies Fiat and Stablecoin Rails After $200M Rail Acquisition
March 3, 2026
XRP Ledger Security Debate Intensifies After BatchGate Scare
March 3, 2026
Visa and Stripe’s Bridge Expand Global Stablecoin Card Program
March 3, 2026
Facebook X (Twitter) Instagram Pinterest
  • Contact Us
  • Privacy Policy
  • Cookie Privacy Policy
  • Terms of Use
  • DMCA
© 2026 StreamlineCrypto.com - All Rights Reserved!

Type above and press Enter to search. Press Esc to cancel.