
Author: 0xshinchann, encrypted KOL; Translation: 0xjs@作 作 作 作 作
OP_CAT was once deleted by Nakamoto from the BTC script language. Now it has re -become a community hot discussion center (Note: OP_CAT is the most discussed by Bitcoin developers during the Bitcoin Asia conference).
As a potential upgrade, it has obtained the initial official designated Bitcoin improvement proposal (BIP) 347.
OP_CAT is a measure aimed at improving Bitcoin’s smart contract function (similar to Ethereum).This article explains what OP_CAT is, work mechanism, what cases, and what controversy in the community.
1. Some background knowledge: how did OP_CAT appear
OP_CAT is an early operation code in Bitcoin.It was originally a programming shortcut created by Bitcoin founder, Nakamoto, the founder of Bitcoin.However, because of worrying about the use of high memory+potential safety vulnerabilities, it was deleted in 2010.
In October 2023, Bitcoin researchers Ethan Heilman and Armin Sabouri proposed the Bitcoin improvement proposal (BIP), and it was recommended that the OP_CAT operating code was introduced into the Bitcoin script language.
This operation code will allow developers to build and evaluate the Merkle tree and other hash data structures in TapScript. Tapscript is used to enable new trading types of native scripts in Taproot upgrades.
2. How does OP_CAT theory play a role?
(i) Popping value: First delete two items (ites) at the top from the stack.
(ii) Connect: Then combine these two items.If X1 and X2 are Item, X2 is the last iTeM, OP_CAT will connect them to form X1X2.
(III) Push back: Then put the new combination of item back to the top of the stack.
However, if the item on the stack is less than two, or the size of the combination item exceeds 520 bytes (this is the limit of scripting elements in Bitcoin), OP_CAT will not work.If it is enabled by a soft split, it will replace the existing unused operations in the script, so that it is in a state of activity without any major changes to the network.
3. Why do I need OP_CAT?What’s the use of it?
Simplified data processing: OP_CAT allows two stack values in tapscript.This simplifies the creation of complex data structure+enhanced script function.
Extended Bitcoin function: OP_CAT introduces universal functions that do not exist in Bitcoin but are vital to Ethereum.This can simplify the development of L2, DEX + DAPP, and make the Bitcoin network multi -functional.
Multi -sign script: OP_CAT can help reduce the size of the multi -sign script and make them more efficient and less cumbersome.
Promoting complex contracts: OP_CAT supports high -end contracts such as vaults, and it can protect funds even if the private key is leaked.
4. OP_CAT acts in Bitcoin controversy: Is OP_CAT perfect?
This proposal is a bit controversial because it affects the path of Bitcoin as a blockchain as a blockchain in the future.
A camp believes that Bitcoin should be maintained, retaining the core function of its transaction BTC, while others believe that Bitcoin has not yet rigid.Essence
The core of the problem is a key decision: whether Bitcoin should be extended to a more programmable public chain, or it is still a P2P payment settlement layer.
For details of BIP 347, please refer to this address: https://github.com/bitcoin/blob/master/bip 0347.Mediawiki