Close Menu
    Trending
    • Crypto Bleeds For A 3rd Straight Month, A First In History: Analyst
    • Introducing the EF Academic Secretariat 2026 PhD Fellowship
    • Bitcoin P2P Traffic Goes Dark
    • Institutional Exit? US Investors Are Dumping ETH at a Record Rate
    • Bitcoin Crashes Below $67,000 As Stifel Warns Of Potential Drop To $38,000
    • Virginia Lawmakers Advance Bill For A State Bitcoin Fund
    • Liquidations Top $1.3 Billion as BTC Plummets Below $67K, ETH Loses $2K Support
    • Bitcoin hits ‘fire-sale’ value as capital flows capitulate: Bitwise
    Facebook X (Twitter) Instagram YouTube
    Finance Insider Today
    • Home
    • Cryptocurrency
    • Bitcoin
    • Ethereum
    • Altcoins
    • Market Trends
    • More
      • Blockchain
      • Mining
    • Sponsored
    Finance Insider Today
    Home»Bitcoin»Bitcoin Covenants: OP_CAT (BIP 347)
    Bitcoin

    Bitcoin Covenants: OP_CAT (BIP 347)

    Finance Insider TodayBy Finance Insider TodayMay 3, 2025No Comments6 Mins Read
    Share
    Facebook Twitter LinkedIn Pinterest Email


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

    OP_CAT, put ahead for reactivation in tapscript by Ethan Heilman and Armin Sabouri in BIP 347, just isn’t a covenant. It was an opcode that was initially included within the first launch of Bitcoin for manipulating knowledge parts on the stack. It was deactivated in 2010 with the release of Bitcoin 0.3.10 together with plenty of different opcodes as a consequence 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. 

    You must have already got a primary understanding of how script analysis on the stack works, and the essential items of a bitcoin transaction, so there isn’t actually a lot pre-requisite explaining needed for OP_CAT. 

    Whereas OP_CAT is probably not a covenant in and of itself, it may emulate covenants as a consequence of a quirk in how Schnorr signatures work. It is a fairly in depth matter, totally defined 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 technology and signing. With Schnorr, you possibly can signal utilizing the generator level as a key, and provides or take a number of bytes that it’s a must 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 mean you can get the present transactions TXID on the stack. 

     How OP_CAT Works

    OP_CAT takes the highest two knowledge 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 instantly on the stack, which opens the door to some fascinating conduct and performance. It additionally permits emulation of covenants enabling full granular introspection as a result of “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 very generic method. Merely offering the leaf hash(es) after which inside hash nodes in the fitting order and calling OP_CAT successively will mean you can reconstruct a merkle root hash, and examine in opposition to a pre-defined hash within the script. You possibly can do that to supply unilateral withdrawal paths for shared UTXOs like in CatVM, you may 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 allows full introspection. What you are attempting to do is be certain 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 really performed over the uncooked transaction, it’s performed over its hash. This enables us to do one thing fascinating. 

    You may 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 may be checked in opposition to predefined hashes by simply hashing them and utilizing OP_EQUAL. On the finish of the script you may have the total transaction on the stack itself, and may append the required knowledge to it after which hash it, as soon as once more evaluating it with OP_EQUAL, this time in opposition to the “bizarre” signature. If that examine passes, a standard CHECKSIG may be run and so long as the “bizarre” signature was made with the transaction being spent, all the pieces 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 in opposition to the emulated covenant matches the precise transaction being spent on the time. 

    Closing Ideas

    OP_CAT blows open the doorways of introspection and ahead knowledge carrying fully. Introspection may be completed to any granular diploma desired, with every particular person area of the transaction having 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 be a robust performance, however brings into query how that functionality can be used, and what sort of incentives that might create. Bitcoin scripts might be constructed requiring some transaction be made on exterior blockchain methods, so long as they use merkle bushes constructed with the hash features 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, ought to be approached cautiously given the large design house it opens up. 



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Finance Insider Today

    Related Posts

    Bitcoin P2P Traffic Goes Dark

    February 6, 2026

    Virginia Lawmakers Advance Bill For A State Bitcoin Fund

    February 6, 2026

    Bitcoin Price Crashes To $69,000 As Crypto Panic Spreads

    February 5, 2026

    US Government Cannot ‘Bail Out’ Bitcoin

    February 5, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    Bitcoin Is Highly Unlikely To Spring Back Anytime Soon

    November 23, 2025

    Bitcoin Sees Sharp Increase in Taker Buy/Sell Ratio on Binance—What Does It Signal?

    May 3, 2025

    Ethereum Stuck Below $4,060: A Fakeout Or Fresh Leg Down To $3,600?

    September 27, 2025

    Analyzing Signals for Investors to Maximize Profits in November

    October 30, 2025

    Ethereum Steals the Spotlight With $1.59B Inflows, But Not All Altcoins Are Winning

    July 29, 2025
    Categories
    • Altcoins
    • Bitcoin
    • Blockchain
    • Cryptocurrency
    • Ethereum
    • Market Trends
    • Mining
    About us

    Welcome to Finance Insider Today – your go-to source for the latest Crypto News, Market Trends, and Blockchain Insights.

    At FinanceInsiderToday.com, we’re passionate about helping our readers stay informed in the fast-moving world of cryptocurrency. Whether you're a seasoned investor, a crypto enthusiast, or just getting started in the digital finance space, we bring you the most relevant and timely news to keep you ahead of the curve.
    We cover everything from Bitcoin and Ethereum to DeFi, NFTs, altcoins, regulations, and the evolving landscape of Web3. With a global perspective and a focus on clarity, Finance Insider Today is your trusted companion in navigating the future of digital finance.

    Thanks for joining us on this journey. Stay tuned, stay informed, and stay ahead.

    Top Insights

    Crypto Bleeds For A 3rd Straight Month, A First In History: Analyst

    February 6, 2026

    Introducing the EF Academic Secretariat 2026 PhD Fellowship

    February 6, 2026

    Bitcoin P2P Traffic Goes Dark

    February 6, 2026
    Categories
    • Altcoins
    • Bitcoin
    • Blockchain
    • Cryptocurrency
    • Ethereum
    • Market Trends
    • Mining
    Facebook X (Twitter) Instagram YouTube
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2025 Financeinsidertoday.com All Rights Reserved.

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