Notification
Mycryptopot
  • Home
  • News
  • Crypto
    • Altcoins
    • Bitcoin
    • Blockchain
    • Cardano
    • Ethereum
    • Nft
    • Solana
    • XRP
    • Tron
  • MarketCap
  • Market
  • Forex
  • Mining
  • Metaverse
  • Exchange
  • Regulations
  • Analysis
    • Crypto Bubbles
    • Multi Currency
    • Evaluation
Reading: Bitcoin Covenants: OP_CAT (BIP 347)
Share
bitcoin
Bitcoin (BTC) $ 76,566.00
ethereum
Ethereum (ETH) $ 2,280.67
tether
Tether (USDT) $ 0.999803
bnb
BNB (BNB) $ 622.65
usd-coin
USDC (USDC) $ 0.999782
xrp
XRP (XRP) $ 1.39
binance-usd
BUSD (BUSD) $ 0.993882
dogecoin
Dogecoin (DOGE) $ 0.099137
cardano
Cardano (ADA) $ 0.245776
solana
Solana (SOL) $ 83.56
polkadot
Polkadot (DOT) $ 1.22
tron
TRON (TRX) $ 0.323245
MycryptopotMycryptopot
Search
  • Home
  • News
  • Crypto
    • Altcoins
    • Bitcoin
    • Blockchain
    • Cardano
    • Ethereum
    • Nft
    • Solana
    • XRP
    • Tron
  • MarketCap
  • Market
  • Forex
  • Mining
  • Metaverse
  • Exchange
  • Regulations
  • Analysis
    • Crypto Bubbles
    • Multi Currency
    • Evaluation
© 2024 All Rights reserved | Powered by Crypto My Crypto Pot
Mycryptopot > News > Crypto > Bitcoin > Bitcoin Covenants: OP_CAT (BIP 347)
Bitcoin

Bitcoin Covenants: OP_CAT (BIP 347)

May 3, 2025 8 Min Read
Share
Bitcoin Covenants: OP_CAT (BIP 347)
mycryptopot

That is the fifth article in a collection 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, will not be a covenant. It was an opcode that was initially included within the first launch of Bitcoin for manipulating knowledge components on the stack. It was deactivated in 2010 with the discharge of Bitcoin 0.3.10 together with a variety of different opcodes on account of considerations of denial of service assaults that might crash nodes. A worldwide most restrict of 520 bytes for any particular person merchandise on the stack whereas executing a script was additionally added.

mycryptopot

It is best to have already got a fundamental 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 obligatory for OP_CAT.

Whereas OP_CAT will not be a covenant in and of itself, it may well emulate covenants on account of a quirk in how Schnorr signatures work. This can be a fairly in depth subject, totally defined right here by Andrew Poelstra from Blockstream, so I’ll simply keep on with a excessive degree 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 a couple of bytes that you must 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 keep in mind for later that these “bizarre” signatures help you 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 high of the stack. That’s it.

mycryptopot

What Is OP_CAT Helpful For

Okay, so what’s the large 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 put in writing?

Two causes, though given the character of OP_CAT I may give no ensures these are the one two causes. OP_CAT permits the development and verification of merkle bushes immediately on the stack, which opens the door to some attention-grabbing conduct 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 way in which it’s carried out 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 assist 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 suitable order and calling OP_CAT successively will help you reconstruct a merkle root hash, and evaluate towards a pre-defined hash within the script. You possibly can do that to offer unilateral withdrawal paths for shared UTXOs like in CatVM, you can make transactions depending on different transactions having been included in a block with legitimate work, you may 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 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 performed over the uncooked transaction, it’s performed over its hash. This permits us to do one thing attention-grabbing.

You possibly can assemble very difficult 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 way in which, particular person items of the transaction may be checked towards predefined hashes by simply hashing them and utilizing OP_EQUAL. On the finish of the script you might have the complete transaction on the stack itself, and might append the required knowledge to it after which hash it, as soon as once more evaluating it with OP_EQUAL, this time towards the “bizarre” signature. If that test passes, a standard CHECKSIG may 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 way in which 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 knowledge carrying utterly. Introspection may be achieved to any granular diploma desired, with every particular person discipline 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 might be used, and what kind of incentives that might create. Bitcoin scripts could possibly be constructed requiring some transaction be made on exterior blockchain programs, so long as they use merkle bushes constructed with the hash features accessible 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 large design house it opens up.

This submit Bitcoin Covenants: OP_CAT (BIP 347) first appeared on Bitcoin Journal and is written by Shinobi.

mycryptopot

You Might Also Like

Anthony Pompliano’s ProCap Appears Better Than Peers Based on the BTC HODLer’s Own Data

Solana dominates real value rankings, DEX volume during H1

Bitcoin’s next major move hinges on a $63 billion “fallen angel” signal that most investors are completely ignoring

Bitcoin On The Global Stage: Pakistan And El Salvador Share Notes

‘Black Swan’ Author Nassim Taleb Believes Elon Musk’s X Money is ‘Much Smarter’ Than Bitcoin

TAGGED:BitcoinBitcoin News
Share This Article
Facebook Twitter Copy Link
Previous Article Bitcoin Bitcoin Long-Term Holders Could Influence BTC’s Return To $100K — Here’s How
Next Article There is a Trading Volume Explosion in These Altcoins in South Korea! XRP Takes First Place, Bitcoin Lags Behind! There is a Trading Volume Explosion in These Altcoins in South Korea! XRP Takes First Place, Bitcoin Lags Behind!
Leave a comment Leave a comment

Leave a Reply Cancel reply

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

- Advertisement -
mycryptopot

Popular News

Tangle Network Partners with Orochi Network to Advance Blockchain Capabilities
Tangle Network Partners with Orochi Network to Advance Blockchain Capabilities
SONEX launches on Soneium’s mainnet 
SONEX launches on Soneium’s mainnet 
Shiba Inu
Solana Unveils “Seeker” Phone: Will SOL Spike To $250 Now?
Shiba Inu
Cardano: Recent Poll Has ADA Beating Out Ethereum & Solana
image
Begich Revives Bitcoin Reserve Bill as ARMA
Highlights From ABS2024 In Taipei: 13,245 Attendees Gather For Asia’s Premier Blockchain Summit
Highlights From ABS2024 In Taipei: 13,245 Attendees Gather For Asia’s Premier Blockchain Summit
- Advertisement -
mycryptopot

You Might Also Like

Bitcoin
Bitcoin

Crypto Market Today: 5 Bullish Catalysts To Watch That Say Bitcoin Price Is Going Higher

May 29, 2025
image
Bitcoin

Saylor warns of internal risks as Bitcoin enters new institutional era

April 5, 2026
Elon Musk in thoughtful pose with hands clasped at a conference or presentation
Tron

Strategy (MSTR) Climbs as BTC Holdings Appreciate $3.9B

October 6, 2025
Dormant Bitcoin whale last active at $12 per BTC awakens sending funds to Kraken
Bitcoin

Dormant Bitcoin whale last active at $12 per BTC awakens sending funds to Kraken

September 13, 2025
Mycryptopot

"Welcome to MyCryptoPot, your go-to source for the latest insights and developments in the ever-evolving world of cryptocurrency.

Editor Choice

Nigerian Think Tank, Japanese Tech Firm Partner on Blockchain Research
What was Solana Price on Launch?
LINE Messenger’s Bold Move to Revolutionize Japanese Digital Payments

Follow Us on Socials

We use social media to react to breaking news, update supporters and share information

Facebook Twitter Telegram
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms of Service
Reading: Bitcoin Covenants: OP_CAT (BIP 347)
Share
© 2024 All Rights reserved | Powered by Crypto My Crypto Pot
Welcome Back!

Sign in to your account

Lost your password?