Saturday, June 28, 2025
Catatonic Times
No Result
View All Result
  • Home
  • Crypto Updates
  • Bitcoin
  • Ethereum
  • Altcoin
  • Blockchain
  • NFT
  • Regulations
  • Analysis
  • Web3
  • More
    • Metaverse
    • Crypto Exchanges
    • DeFi
    • Scam Alert
  • Home
  • Crypto Updates
  • Bitcoin
  • Ethereum
  • Altcoin
  • Blockchain
  • NFT
  • Regulations
  • Analysis
  • Web3
  • More
    • Metaverse
    • Crypto Exchanges
    • DeFi
    • Scam Alert
No Result
View All Result
Catatonic Times
No Result
View All Result

Bitcoin Covenants: OP_CAT (BIP 347)

by Catatonic Times
May 4, 2025
in Bitcoin
Reading Time: 4 mins read
0 0
A A
0
Home Bitcoin
Share on FacebookShare on Twitter


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

OP_CAT, put ahead for reactivation in tapscript by Ethan Heilman and Armin Sabouri in BIP 347, isn’t a covenant. It was an opcode that was initially included within the first launch of Bitcoin for manipulating information components on the stack. It was deactivated in 2010 with the discharge of Bitcoin 0.3.10 together with various different opcodes as a result of issues of denial of service assaults that might crash nodes. A world most restrict of 520 bytes for any particular person merchandise on the stack whereas executing a script was additionally added. 

It’s best to have already got a fundamental understanding of how script analysis on the stack works, and the fundamental items of a bitcoin transaction, so there isn’t actually a lot pre-requisite explaining mandatory for OP_CAT. 

Whereas OP_CAT will not be a covenant in and of itself, it could actually emulate covenants as a result of a quirk in how Schnorr signatures work. It is a fairly in depth subject, absolutely defined right here by Andrew Poelstra from Blockstream, so I’ll simply persist with a excessive stage view. Each elliptic curve has a generator level, which is basically “0”, that’s used within the elliptic curve math for key era and signing. With Schnorr, you’ll be able to signal utilizing the generator level as a key, and provides or take just a few bytes that it’s important to signal repeatedly to get proper, the ensuing signature is definitely the identical hash of the transaction you signed. 

Put aside the mechanics of how that works mathematically for now, and simply bear in mind for later that these “bizarre” signatures will let you get the present transactions TXID on the stack. 

 How OP_CAT Works

OP_CAT takes the highest two information gadgets on the stack and concatenates them collectively. So if the highest two gadgets on the stack are “1” and “2”, OP_CAT removes each of them after which places “12” on prime of the stack. That’s it. 

What Is OP_CAT Helpful For

Okay, so what’s the massive deal? Why is everybody freaking out about OP_CAT though it’s so easy the reason of the way it works didn’t even take a full paragraph to jot down? 

Two causes, though given the character of OP_CAT I can provide no ensures these are the one two causes. OP_CAT permits the development and verification of merkle bushes straight on the stack, which opens the door to some fascinating habits and performance. It additionally permits emulation of covenants enabling full granular introspection because of the “bizarre” Schnorr signatures talked about above. 

Merkle proof verification is a key element of Taproot, however the best way it’s applied merkle tree verification solely happens within the context of verifying {that a} tapscript spending path is dedicated to within the root Schnorr public key within the output script of the coin being spent. Taproot doesn’t help generic merkle proof verification. 

OP_CAT permits this in a completely generic method. Merely offering the leaf hash(es) after which inside hash nodes in the appropriate order and calling OP_CAT successively will will let you reconstruct a merkle root hash, and evaluate towards a pre-defined hash within the script. You may do that to offer unilateral withdrawal paths for shared UTXOs like in CatVM, you might make transactions depending on different transactions having been included in a block with legitimate work, you can also make a transaction depending on just about any situation that may be verified with a merkle proof. 

Now, for the covenant emulation that permits full introspection. What you are attempting to do is make sure that a transaction has to have sure traits to be legitimate. Keep in mind now that the “bizarre” signature will get the hash of the transaction on the stack. A transaction signature isn’t truly accomplished over the uncooked transaction, it’s accomplished over its hash. This enables us to do one thing fascinating. 

You possibly can assemble very sophisticated and convoluted scripts utilizing OP_CAT to take the person uncooked items of the transaction as a part of the witness, and slowly put them collectively on the stack with OP_CAT. Alongside the best way, particular person items of the transaction might be checked towards predefined hashes by simply hashing them and utilizing OP_EQUAL. On the finish of the script you might have the total transaction on the stack itself, and might append the required information to it after which hash it, as soon as once more evaluating it with OP_EQUAL, this time towards the “bizarre” signature. If that examine passes, a standard CHECKSIG might be run and so long as the “bizarre” signature was made with the transaction being spent, every part executes as legitimate. 

The OP_EQUAL checks of particular person items of the transaction alongside the best way assure that these items of the transaction are precisely what they need to be. If any of them fails verification, the transaction is invalid. This enforces the emulated covenants. On the finish, if the transaction hash constructed with OP_CAT and the “bizarre’ signature match, then the ultimate CHECKSIG ensures that the transaction constructed with OP_CAT and checked towards the emulated covenant matches the precise transaction being spent on the time. 

Closing Ideas

OP_CAT blows open the doorways of introspection and ahead information carrying utterly. Introspection might be completed to any granular diploma desired, with every particular person area of the transaction with the ability to be independently dedicated to. It permits all the identical introspective capabilities that TXHASH does, after which some. 

The potential to confirm generic merkle proofs can also be a robust performance, however brings into query how that functionality will likely be used, and what kind of incentives that might create. Bitcoin scripts may very well be constructed requiring some transaction be made on exterior blockchain programs, so long as they use merkle bushes constructed with the hash capabilities out there in Bitcoin script. 

Whereas OP_CAT is itself not a covenant, it permits full emulation of covenants with a a lot much less environment friendly blockchain footprint (and potential for builders to make errors and burn cash). It’s a proposal that regardless of being extremely easy itself, must be approached cautiously given the huge design house it opens up. 



Source link

Tags: BIPBitcoinCovenantsOP_CAT
Previous Post

Ethereum Prints 5 Red Monthly Candles: What Happened The Last Time?

Next Post

Finovate Global: Meet the International Alums of FinovateSpring 2025

Related Posts

Bitcoin Forms 4-Year Inverse H&S Pattern – Neckline Break Could Send It Parabolic
Bitcoin

Bitcoin Forms 4-Year Inverse H&S Pattern – Neckline Break Could Send It Parabolic

June 27, 2025
After Torres’ No, Lawyer Predicts When It’s Over
Bitcoin

After Torres’ No, Lawyer Predicts When It’s Over

June 27, 2025
Trump-Linked WLFI Secures 0M UAE Investment
Bitcoin

Trump-Linked WLFI Secures $100M UAE Investment

June 27, 2025
XRP Price Declines Back To  As Legal Dispute With SEC Continues
Bitcoin

XRP Price Declines Back To $2 As Legal Dispute With SEC Continues

June 27, 2025
Cathie Wood Trims Coinbase Stake As COIN Hits New ATH
Bitcoin

Cathie Wood Trims Coinbase Stake As COIN Hits New ATH

June 27, 2025
Analyst Drops Bomb On Bitcoin Vs. Global M2 Money Comparisons
Bitcoin

Analyst Drops Bomb On Bitcoin Vs. Global M2 Money Comparisons

June 27, 2025
Next Post
Finovate Global: Meet the International Alums of FinovateSpring 2025

Finovate Global: Meet the International Alums of FinovateSpring 2025

Google embraces zero-knowledge proof tech for enhanced privacy in digital IDs

Google embraces zero-knowledge proof tech for enhanced privacy in digital IDs

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Catatonic Times

Stay ahead in the cryptocurrency world with Catatonic Times. Get real-time updates, expert analyses, and in-depth blockchain news tailored for investors, enthusiasts, and innovators.

Categories

  • Altcoin
  • Analysis
  • Bitcoin
  • Blockchain
  • Crypto Exchanges
  • Crypto Updates
  • DeFi
  • Ethereum
  • Metaverse
  • NFT
  • Regulations
  • Scam Alert
  • Uncategorized
  • Web3

Latest Updates

  • Bitcoin 4-Hour Chart Flashes Bullish Momentum — Breakout Brewing?
  • Bitcoin Forms 4-Year Inverse H&S Pattern – Neckline Break Could Send It Parabolic
  • Goldman Sachs Internship Acceptance Harder Than Harvard
  • About Us
  • Advertise with Us
  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact Us

Copyright © 2024 Catatonic Times.
Catatonic Times is not responsible for the content of external sites.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Home
  • Crypto Updates
  • Bitcoin
  • Ethereum
  • Altcoin
  • Blockchain
  • NFT
  • Regulations
  • Analysis
  • Web3
  • More
    • Metaverse
    • Crypto Exchanges
    • DeFi
    • Scam Alert

Copyright © 2024 Catatonic Times.
Catatonic Times is not responsible for the content of external sites.