Monday, August 25, 2025
No Result
View All Result
Coin Digest Daily
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Altcoin
    • Ethereum
    • Crypto Exchanges
  • Blockchain
  • NFT
  • Metaverse
  • Web3
  • DeFi
  • Analysis
  • Scam Alert
  • Regulations
Marketcap
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Altcoin
    • Ethereum
    • Crypto Exchanges
  • Blockchain
  • NFT
  • Metaverse
  • Web3
  • DeFi
  • Analysis
  • Scam Alert
  • Regulations
No Result
View All Result
Coin Digest Daily
No Result
View All Result

Bitcoin Covenants: OP_CAT (BIP 347)

4 May 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, will not be 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 discharge of Bitcoin 0.3.10 together with numerous different opcodes as a consequence of issues of denial of service assaults that would 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 need 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 mandatory for OP_CAT. 

Whereas OP_CAT is probably not a covenant in and of itself, it could emulate covenants as a consequence of a quirk in how Schnorr signatures work. It is a fairly in depth matter, totally defined right here by Andrew Poelstra from Blockstream, so I’ll simply keep on with a excessive stage view. Each elliptic curve has a generator level, which is actually “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 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 permit you to 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. 

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 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 timber 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 part of Taproot, however the way in which 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 proper order and calling OP_CAT successively will permit you to reconstruct a merkle root hash, and examine in opposition to a pre-defined hash within the script. You can do that to offer unilateral withdrawal paths for shared UTXOs like in CatVM, you possibly 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 permits full introspection. What you are attempting to do is make sure that a transaction has to have sure traits to be legitimate. Bear in mind now that the “bizarre” signature will get the hash of the transaction on the stack. A transaction signature isn’t truly completed over the uncooked transaction, it’s completed over its hash. This permits us to do one thing attention-grabbing. 

You’ll be able to 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 could be checked in opposition to predefined hashes by simply hashing them and utilizing OP_EQUAL. On the finish of the script you’ve the complete transaction on the stack itself, and might append the mandatory 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 test passes, a traditional CHECKSIG could be run and so long as the “bizarre” signature was made with the transaction being spent, every little thing 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 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 could be completed to any granular diploma desired, with every particular person discipline of the transaction having the ability to be independently dedicated to. It allows all the identical introspective capabilities that TXHASH does, after which some. 

The potential to confirm generic merkle proofs can also be a strong performance, however brings into query how that functionality will likely be used, and what kind of incentives that would create. Bitcoin scripts might be constructed requiring some transaction be made on exterior blockchain methods, so long as they use merkle timber 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, needs to be approached cautiously given the huge design house it opens up. 



Source link

Tags: BIPBitcoinCovenantsOP_CAT
Previous Post

XRP Price Is Eyeing Another Breakout To $4: Analyst Says Watch This Level

Next Post

Finovate Global: Meet the International Alums of FinovateSpring 2025 – Finovate

Related Posts

Hacker Moves Loot: Over 38,000 Solana Purchased With Stolen Crypto
Bitcoin

Hacker Moves Loot: Over 38,000 Solana Purchased With Stolen Crypto

25 August 2025
Ether Soars In August—But Will September Spoil The Party?
Bitcoin

Ether Soars In August—But Will September Spoil The Party?

24 August 2025
Wall Street’s Crypto Titans: Billions in Bitcoin and Ethereum Stashed Away – Crypto News Bitcoin News
Bitcoin

Wall Street’s Crypto Titans: Billions in Bitcoin and Ethereum Stashed Away – Crypto News Bitcoin News

24 August 2025
With ETH Pumping And BTC Maintaining, What’s The Best Crypto To Buy Now?
Bitcoin

With ETH Pumping And BTC Maintaining, What’s The Best Crypto To Buy Now?

25 August 2025
AUSTRAC Orders Binance Australia to Appoint Auditor Over AML Failings – Regulation Bitcoin News
Bitcoin

AUSTRAC Orders Binance Australia to Appoint Auditor Over AML Failings – Regulation Bitcoin News

24 August 2025
Analyst Says Dogecoin Price Is Entering Expansion Phase – Here’s What It Means
Bitcoin

Analyst Says Dogecoin Price Is Entering Expansion Phase – Here’s What It Means

24 August 2025
Next Post
Finovate Global: Meet the International Alums of FinovateSpring 2025 – Finovate

Finovate Global: Meet the International Alums of FinovateSpring 2025 - Finovate

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 *

  • Trending
  • Comments
  • Latest
FTT jumps 7% as Backpack launches platform to help FTX victims liquidate claims – CoinJournal

FTT jumps 7% as Backpack launches platform to help FTX victims liquidate claims – CoinJournal

19 July 2025
PENDLE token goes live on BeraChain and HyperEVM to expand cross-chain utility – CoinJournal

PENDLE token goes live on BeraChain and HyperEVM to expand cross-chain utility – CoinJournal

30 July 2025
A Russian Hacking Group Is Using Fake Versions of MetaMask to Steal $1M in Crypto – Decrypt

A Russian Hacking Group Is Using Fake Versions of MetaMask to Steal $1M in Crypto – Decrypt

10 August 2025
Ethereum Reclaims $4,600 With Unprecedented $1 Billion In Spot ETF Inflow

Ethereum Reclaims $4,600 With Unprecedented $1 Billion In Spot ETF Inflow

13 August 2025
XRP Price Blasts Higher by 10%, Bulls Eye Even Bigger Gains

XRP Price Blasts Higher by 10%, Bulls Eye Even Bigger Gains

8 August 2025
PEPE Gears Up For 120% Move As Indicators Point To An End Of Decline | Bitcoinist.com

PEPE Gears Up For 120% Move As Indicators Point To An End Of Decline | Bitcoinist.com

8 August 2025
Coinbase CEO Predicts $1M Bitcoin Driven by FOMO, ETFs, Government Action – Markets and Prices Bitcoin News

Coinbase CEO Predicts $1M Bitcoin Driven by FOMO, ETFs, Government Action – Markets and Prices Bitcoin News

25 August 2025
Hacker Moves Loot: Over 38,000 Solana Purchased With Stolen Crypto

Hacker Moves Loot: Over 38,000 Solana Purchased With Stolen Crypto

25 August 2025
Ether Soars In August—But Will September Spoil The Party?

Ether Soars In August—But Will September Spoil The Party?

24 August 2025
BlockDAG’s Presale Path to $1 Target as Solana and Ripple Navigate Markets

BlockDAG’s Presale Path to $1 Target as Solana and Ripple Navigate Markets

24 August 2025
Solana Eyes $360 After Breaking $200 – Here’s Why $SNORT Could Deliver Bigger Gains

Solana Eyes $360 After Breaking $200 – Here’s Why $SNORT Could Deliver Bigger Gains

24 August 2025
Wall Street’s Crypto Titans: Billions in Bitcoin and Ethereum Stashed Away – Crypto News Bitcoin News

Wall Street’s Crypto Titans: Billions in Bitcoin and Ethereum Stashed Away – Crypto News Bitcoin News

24 August 2025
Facebook Twitter Instagram Youtube RSS
Coin Digest Daily

Stay ahead in the world of cryptocurrencies with Coin Digest Daily. Your daily dose of insightful news, market trends, and expert analyses. Empowering you to make informed decisions in the ever-evolving blockchain space.

CATEGORIES

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

SITEMAP

  • About us
  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2024 Coin Digest Daily.
Coin Digest Daily is not responsible for the content of external sites.

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

Copyright © 2024 Coin Digest Daily.
Coin Digest Daily 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
  • bitcoinBitcoin(BTC)$113,148.00-1.61%
  • ethereumEthereum(ETH)$4,743.74-0.99%
  • rippleXRP(XRP)$3.04-0.48%
  • tetherTether(USDT)$1.000.02%
  • binancecoinBNB(BNB)$877.490.04%
  • solanaSolana(SOL)$210.190.73%
  • usd-coinUSDC(USDC)$1.000.00%
  • staked-etherLido Staked Ether(STETH)$4,733.11-0.65%
  • dogecoinDogecoin(DOGE)$0.232004-1.81%
  • tronTRON(TRX)$0.356984-2.01%