
"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks." - Bitcoin Genesis Block
first level title
1.1. Overview
1.1. Overview
Each bitcoin is composed of 100 million "Satoshis" (1 btc = 10 ^ 8 sat), each of which is uniquely identified and indivisible.
1. According to the "ordinal" of sat in Bitcoin,
2. Give each Satoshi a specific meaning "Inscriptions"
This is the Ordinals protocol.
2. How are satoshis numbered?
He uses Bitcoin's unique block process and UTXO model to make every "Satoshi (sat)” has a unique number.
Bitcoin is in "mining", the mining process is that miners obtain block rights by solving complex mathematical problems (POW) to verify new transactions and add them to the blockchain. The Bitcoin network will generate a new block every 10 minutes or so , each block contains a set of new transactions and the hash value of the previous block, where the miner’s income is also calledCoinbase block
The "account balance model" is adopted in Ethereum, that is, each address has a separate storage structure and space balance (balance) is one of the fields.
The advantages of this model are:
Simple Very easy to understand and code to implement.
Efficient, each transaction only needs to verify whether the sending account has enough balance to pay for the transaction;
Expandable reading:
Expandable reading:[Frontier Interpretation] Stanford Researcher Paper - Mechanism, Innovation and Limitations of Ethereum Reversible Transaction Standard ERC 20/721 R
But the Bitcoin network is different,The balance of his account is not indicated by a numbersecondary title
2.1. UTXO model of Bitcoin
UTXO (Unspent Transaction Output) is a ledger model. In the Bitcoin system, each transaction generates some outputs. For example, the output of a transfer transaction is the receiver’s Bitcoin address and transfer amount. These outputs are stored in UTXO collections, which are used to record unspent transaction outputs.
Each transaction consists of several inputs (Input) and several outputs (Output). Every transaction costs an input and generates an output, and the output it generates is the "unspent transaction output"; an Input points to an Output in the previous block, only Coinbase transactions do not Input, only output out of thin air.
The advantage of the UTXO model is more security and privacy protection, because it has no centralized account records and account balance information that may be leaked by the traditional account model.
The disadvantage of the UTXO model is that it increases the transaction verification cost and storage cost. Every time a transaction needs to be verified whether the payment and receipt of the transaction is legal, it also needs to store a large amount of UTXO information.
So any transaction,text
So we say how many bitcoins we have (bitcoins) actually refers to the number of bitcoins (bitcoins) specified in those UTXOs we own, so if we want to count the number of BTCs in an address:
Start scanning from the genesis block;
When a certain output of a certain transaction is a specified address, the balance increases;
secondary title
2.2, the relationship between sat and UTXO
Note that each sat is not UTXO! Since UTXO is the smallest transaction unit that cannot be divided, sat can only exist in UTXO, and UTXO contains a certain range of sats, and can only generate new output after spending a certain UTXO Split the sats number in
For example, I got 50 BTC rewards in the Genesis block or CoinBase block, and the corresponding Input and Output are
If I make a transfer of 20 BTC to address B, the UTXO will appear centrally, where the input is the output of the previous transaction
The sats consumption order here is based on FIFO"first in first out"(First-In-First-Out) principle, in the case of the same transaction fee, the earlier UTXO will be used for transactions more preferentially than the later UTXO.
secondary title
2.3. Representation of Ordinal number
Ordinal Number has many representations, such as degree notation (Degree Notation)
What's interesting about this notation is that it artificially creates a scarcity for sats based on Bitcoin's own cyclical nature:
common: all sats that are not the first sat in block mint
uncommon: the sat is the first sat mined from a certain block (D== 0)
rare: the first sat mined at difficulty adjustment (C== 0&&D== 0)
epic: the first sat mined during halving (B== 0&&D== 0
legendary: The first sat mined when Cycle rotation occurs (B==C==D== 0)
mythic: the first sat mined in the genesis block (A==B==C==D== 0)
For example: https://ordinals.com/sat/1 ° 0 ′ 0 ″ 0 ‴, so the core point of Fomo chasing is not what is contained in the content of mint, but the corresponding serial number value such as Ordinal Number.
first level title
3. How to Inscriptions any content
secondary title
3.1. SegWit (Segregated Witness)
It is a major upgrade of Bitcoin that was activated in August 2017. Its main purpose is to optimize Bitcoin's transaction processing capabilities, reduce transaction costs, and achieve Bitcoin expansion under safer conditions. SegWit is a soft fork (Soft Fork) upgrade, covering multiple BIPs (141, 142, 143, 144 and 145), the so-called soft fork is compatible with the old version of the Bitcoin client, without destroying the Bitcoin network compatibility.
itsThe core change is to separate the signature (Witness Data) in the transaction from the transaction data, making transaction data smaller, thereby reducing transaction fees and increasing the capacity of the Bitcoin network.
The implementation of SegWit is to divide all transaction data into two parts, one part is the basic information of the transaction (Transaction Data), and the other part is the signature information of the transaction (Witness Data), and save the signature information in a new data structure , is in a new block called a "segregated witness" and is transmitted separately from the original transaction.
In this way, the upper limit of the transaction data size of the Bitcoin transaction is increased, while the transaction fee of the signature data is reduced. Before the SegWit upgrade, the size limit of Bitcoin was 1 MB, and after SegWit, the size limit of Bitcoin transactions reached 4 MB.
So Oridnals Inscription'sThe essence is to hide the inscription data in the witness data.
3.2. Taproot upgrade
Similar to the SegWit upgrade, the Taproot upgrade is also a soft fork upgrade. It is a Bitcoin upgrade proposal proposed by Bitcoin Core contributor Gregory Maxwell in 2018. To improve the currency trading mechanism.
The upgrade mainly includes 3 technical concepts - P2SH, MAST and Schnorr. The result is to make complex transactions such as multi-signature transactions and time-lock transactions look like ordinary Bitcoin transactions, which enhances the privacy of Bitcoin, and the purpose is to promote the upgrade of various scenarios such as the deployment of smart contracts and the expansion of use cases for Bitcoin. .
In the SegWit upgrade, a new version number was added to the Bitcoin protocol to represent the new transaction format. In the Taproot upgrade, the most important change to the Bitcoin protocol is updating the script verifier from the ScriptVerify flag to the ScriptVerify v2 flag to support Tapscript.
The chaining of a Tapscript needs to be divided into two steps: commit and reveal. The content of Inscription is included in the first input of the reveal transaction, thus inscribed on the first sat of the first output of this transaction. for example
There are multiple operation instructions here, but the beginning must be OP_FALSE. After this instruction is pushed into the execution stack, the script will stop running, but it is still stored on the chain.
So the essence of Ordinal Inscription is: on the Bitcoin networkA simple accounting layer is built with a script tapscript that will never be executed, for statistics and records of assets and data
Since there is only bookkeeping, this means that there will be no script execution and verification process similar to smart contracts.It must be highly dependent on the centralized management and reporting results under the chain.
4. What is BRC20?
The name of BRC-20 looks a lot like Ethereum’s ERC 20 at first glance, but in fact the two technologies are very different. The holding status of ERC-20 tokens is stored on the chain, and network consensus can be obtained on the chain. BRC 20 is an inscription in JSON format inscribed with the help of the Ordinals protocol. This specification only defines the deployment, minting and transfer behavior of brc-20 tokens.And the holding status of BRC-20 tokens is maintained by off-chain services.
What does the deployed json look like?
The corresponding op also has Mint and Transfer. The two formats are almost the same. Of course, if you are familiar with transactions on Ethereum, you will find it strange. How to express the transfer receiver here?
This is because when the transfer transaction takes effect, it is when the sat corresponding to the inscription is traded, so whoever receives the sat corresponding to the inscription is the transfer object, so the transfer of brc-20 must be accompanied by the transfer of bitcoin ownership (not It is only consumed as a handling fee).
The centralized organization derives the current balance that the user should have based on each op registered on the chain.
Further reading:
Further reading:[Source Code Interpretation] What exactly is the NFT you bought?
In this process, the inscription is 'attached' to the transaction (Satoshi),Bitcoin miners don't process these inscriptions, from the point of view of the chain, it is still no different from other satoshis, they are all transferred as ordinary satoshis.
5. How to evaluate Ordinals and BRC 20
BRC-20 and Ordinals NFT have brought a lot of controversy to Bitcoin, basically divided into two camps:
The supporters believe that as long as you pay the transaction fee, you haveFull rights to use the block space in any way, no matter what the transaction is, they believe that BRC-20 and NFT have brought a new culture and narrative to Bitcoin, which is conducive to improving the actual application value of Bitcoin.
Opponents believe that these BRC-20 and NFT are worthless and are junk transactions. Excessive junk transactions will occupy transaction bandwidth, resulting in longer transaction block entry time and higher handling fees.
From the author’s point of view, through the above technical implementation route, it can be clearly felt that although new things are popular in terms of price, their technical defects are also very obvious.
1. Too centralized
The Ordinals protocol must be based on offline services outside the Bitcoin network for state maintenance. If the underlying status service is unavailable or defective, it may lead to asset loss, because the Bitcoin network has no way to prevent invalid inscriptions from being uploaded to the chain, and the centralized platform has to decide whose inscription is valid, and it is valid on this platform.
2. Lack of credible verification mechanism
Interpretation of the latest Final ERC-6147: a minimalist semi-mandatory NFT property right separation standard
Expandable reading:Interpretation of the latest Final ERC-6147: a minimalist semi-mandatory NFT property right separation standard
3. Bitcoin network performance limitations
At present, the block interval of Bitcoin is as long as ten minutes, and the transaction confirmation speed is too slow, which will also lead to poor transaction experience. Moreover, the transaction cost of Bitcoin is too high, and a successful on-chain inscription transaction will deduct three-party commissions, platform network data delays, and estimated error costs caused by various lags, so the miner's fee is at least It takes 2-3 times
4. Lack of infrastructure
For example, as the core transaction and pricing service of token, now it mainly relies on the guarantee of the order system of the trading platform, and the result of complete centralization lacks authoritative trading methods and pricing methods. For example, if there is no centralized platform ruling in its transaction scene, it is very easy to be double-spending. The logical paradox of the first-come-first-served fomo mechanism of inscriptions and the mechanism of miners’ priority packaging according to miners’ fees determines that mint is not necessarily fair
5. Lack of security
BRC 20 is easy to give users the illusion, making it think that BRC 20 is a token created using the security of Bitcoin, which will be as safe and stable as Bitcoin, but in fact it is not the same as BTC. The security of BTC is based on encryption and consensus algorithms. On top of the support, it has been running relatively stably for quite a long time and has withstood the test of time. BRC 20 uses the Ordinals protocol to bind BTC. The Ordinals protocol is currently running for a short time and is still in the initial stage of development. There are some security risks that have not been discovered yet.
SlowMist also issued a reminder of the security risks of BRC 20:
Recently, BRC-20 has become popular. We have noticed that BRC-20 may have security risks from Mint tokens to transactions: on Mint tokens, the security of the related BRC 20 token casting platform is doubtful, and the defense measures are relatively weak, and it is easy to be maliciously The attack tampers with the code, resulting in the theft of assets while users of Mint. In terms of trading methods, there are two ways: one is to find a third party to guarantee the transaction in private, and it is easy to encounter scammers, counterfeit currency, etc.; the other is to place orders on special trading platforms, and the security of these trading platforms cannot be guaranteed.
Although the author is not optimistic about the Ordinals in front of him, after all, his application of block space is still too monotonous, just putting pictures and NFTs in it does not generate more value. But as an interesting attempt, such a circle-breaking innovation can also arouse everyone's thinking:
How to take advantage of Bitcoin programmability? After all, there will be no stronger consensus and security than Bitcoin in today's public chain.
It’s all about the use of storage space. In fact, the financial transactions output by the Ordinals protocol in OP-Ruturn are essentially no different from other things stored by full nodes, but does Bitcoin only serve high-net-worth transactions? Is it free to use the block space to store and execute some low-cost data?
first level title
appendix
https://docs.ordinals.com/introduction.html
https://github.com/casey/ord/blob/master/bip.mediawiki#specification
https://docs.lightning.engineering/the-lightning-network/taproot-assets/taproot-assets-protocol
https://learnblockchain.cn/article/3050
https://www.wu-talk.com/index.php? m=content&c=index&a=show&catid= 6&id= 13659
https://learnblockchain.cn/article/5376
Experience Web3.Unity and review the GameFi exploration path
Experience Web3.Unity and review the GameFi exploration path
Interpretation of impermanent loss in Dex: principle, mechanism, formula derivation
Starting from the bill, why is the transaction on the chain worth analyzing?
Interpreting Nostr: A Censorship-Resistant Decentralized Social Protocol
Interpretation of impermanent loss in Dex: principle, mechanism, formula derivation
You are welcome to leave a message to the author from the background of the official account to discuss the issues of the web3 industry.Focus on Fourteen, bringing you value from a technical perspective