Table of Contents
BTC’s block structure
Segregated Witness and Taproot
UTXO transfer model
Home web3.0 Discussion of the principles and technical details of the Ordinal inscription protocol

Discussion of the principles and technical details of the Ordinal inscription protocol

Feb 04, 2024 am 09:30 AM
Blockchain Bitcoin

php editor Baicao will analyze the principles and technical details of the Ordinal inscription protocol in detail. The Ordinal inscription protocol is an encryption protocol used to protect data transmission. It uses advanced encryption algorithms and authentication mechanisms to ensure the security and integrity of data during transmission. This article will introduce the basic principles of the Ordinal inscription protocol, including core technologies such as key exchange, encryption algorithms, and message authentication codes, and deeply explore its application in network communications. Whether you are a beginner or a professional, reading this article will help you gain a deeper understanding of the Ordinal protocol.

BTC’s block structure

Blockchain is a multi-user accounting technology, which can also be called a distributed database. It organizes records into blocks in chronological order and expands the ledger.

Discussion of the principles and technical details of the Ordinal inscription protocol

We used excel to make a table to illustrate how the blockchain works. An excel file represents a blockchain, in which each separate table represents a block. The blocks are in chronological order from 560331, 560332. to the latest 560336. 560336 will package the latest transactions in the block. The main part of the block is the most common double-entry accounting method in the accounting field. The address on one side is recorded as debit (debit), which is inputs from, and the address on the other side is recorded as credit (credit), which is outputs to. Value corresponds to the number of BTC in the corresponding address. The number of Inputs coins will be greater than the number of Outputs coins, and the difference is the transfer fee at the user level and the handling fee obtained by the miners (bookkeepers). The block header will obtain the height of the previous block, the hash value of the previous block, the creation time (timestamp) of this block, and a random number. So as a decentralized accounting technology, who will grab the accounting rights of the next block? It relies on this random number and its corresponding hash value. Miners with computing power perform a hash calculation on the random number of the current block. The miner who first obtains the hash value that meets the conditions has the accounting rights of the next block and wins the block reward and transfer fee. Finally, there is the script area, which can be used for some extended applications. For example, the script op_return can be used as a postscript column. It should be noted that in the actual block, the script area is attached to the input and output information, rather than really being a separate area. For example, the script attached to the input is an unlocking script (ScriptSig), which requires the wallet address for private key signature authorization to allow transfer, while the script attached to the output is a locking script (ScriptPubKey), which is used to set the unlocking conditions for receiving the BTC (generally The condition is "only those with the corresponding private key can consume").

Discussion of the principles and technical details of the Ordinal inscription protocol

Discussion of the principles and technical details of the Ordinal inscription protocol

The original input and output data structure tables show the accompanying parameters of the transaction information. Among them, the unlocking script (ScriptSig) is part of the private key authorization and is also called "witness data".

Segregated Witness and Taproot

While the Bitcoin network has been running for over 10 years without significant incidents, transaction costs have repeatedly spiked to highs that are no longer feasible. As a result, Bitcoin developers have been discussing how to best scale the network to handle growing transaction volumes in the future.

In 2017, the Bitcoin development community was divided into two factions. One faction supported the SegWit function of soft forks, and the other advocated directly expanding the block size, known as the "big block" faction. The split sparked heated debate.

We mentioned above that the unlocking script needs to use private key authorization to generate "witness data", so can this witness data be separated from the block, thereby increasing the capacity of each block in disguise? What about the number of transactions? Segregated Witness was officially activated in August 2017. Its implementation is to divide all transaction data into two parts, one part is the basic information of the transaction (Transaction Data), 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 "segregated witness (witness)" and is transmitted separately from the original transaction.

Discussion of the principles and technical details of the Ordinal inscription protocol

Technically, the implementation of SegWit means that transactions no longer need to include witness data (it will not occupy the 1MB space originally arranged by Bitcoin for blocks). Instead, at the end of a block, an additional separate space is created for witness data. It supports arbitrary data transfers and has a discounted "block weight" that cleverly keeps large amounts of data within Bitcoin's block size limits to avoid the need for a hard fork. In this way, the upper limit of the transaction data size of Bitcoin transactions is increased, while the transaction fee of signature data is reduced. Before the SegWit upgrade, the upper limit of Bitcoin's capacity was 1MB. After SegWit, although the upper limit of pure transactions was still 1M, the size of the Segregated Witness space reached 4MB.

Taproot was implemented in November 2021 and consists of 3 different Bitcoin Improvement Proposals (BIPs), including: Taproot, Tapscript and its new digital signature scheme called "Schnorr Signature". Taproot is designed to bring many benefits to Bitcoin users, such as increased transaction privacy and lower transaction fees. It will also allow Bitcoin to perform more complex transactions, thereby broadening application scenarios (some new opcodes have been added).

These updates are a key enabler for Ordinals NFT, which stores NFT data in a spend script in the Taproot script path (witness data space). This upgrade makes it easier to structure and store arbitrary witness data, laying the foundation for the "ord" standard. As data requirements are relaxed, it is assumed that a transaction can fill an entire block with its transaction and witness data - reaching the 4MB block size (witness data space) limit - greatly expanding the types of media that can be placed on the chain. .

Some people may ask, since some strings are put in the script, are there no restrictions on these strings? What if these scripts are actually executed? If you put the content casually, will there be an error code that refuses to produce a block? This brings up the OP_FALSE instruction. OP_FALSE (also represented as "0" in Bitcoin Script) ensures that the execution path in the scripting language never enters the OP_IF branch and remains unexecuted. It acts as a placeholder or no operation (No Operation) in the script, similar to a "comment" in a high-level language, to ensure that subsequent code is not executed.

Discussion of the principles and technical details of the Ordinal inscription protocol

UTXO transfer model

The above is the detailed content of Discussion of the principles and technical details of the Ordinal inscription protocol. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is Ouyi for? What is Ouyi What is Ouyi for? What is Ouyi Apr 01, 2025 pm 03:18 PM

OKX is a global digital asset trading platform. Its main functions include: 1. Buying and selling digital assets (spot trading), 2. Trading between digital assets, 3. Providing market conditions and data, 4. Providing diversified trading products (such as derivatives), 5. Providing asset value-added services, 6. Convenient asset management.

How to roll positions in digital currency? What are the digital currency rolling platforms? How to roll positions in digital currency? What are the digital currency rolling platforms? Mar 31, 2025 pm 07:36 PM

Digital currency rolling positions is an investment strategy that uses lending to amplify trading leverage to increase returns. This article explains the digital currency rolling process in detail, including key steps such as selecting trading platforms that support rolling (such as Binance, OKEx, gate.io, Huobi, Bybit, etc.), opening a leverage account, setting a leverage multiple, borrowing funds for trading, and real-time monitoring of the market and adjusting positions or adding margin to avoid liquidation. However, rolling position trading is extremely risky, and investors need to operate with caution and formulate complete risk management strategies. To learn more about digital currency rolling tips, please continue reading.

How to calculate the transaction fee of gate.io trading platform? How to calculate the transaction fee of gate.io trading platform? Mar 31, 2025 pm 09:15 PM

The handling fees of the Gate.io trading platform vary according to factors such as transaction type, transaction pair, and user VIP level. The default fee rate for spot trading is 0.15% (VIP0 level, Maker and Taker), but the VIP level will be adjusted based on the user's 30-day trading volume and GT position. The higher the level, the lower the fee rate will be. It supports GT platform coin deduction, and you can enjoy a minimum discount of 55% off. The default rate for contract transactions is Maker 0.02%, Taker 0.05% (VIP0 level), which is also affected by VIP level, and different contract types and leverages

Binance binance computer version entrance Binance binance computer version PC official website login entrance Binance binance computer version entrance Binance binance computer version PC official website login entrance Mar 31, 2025 pm 04:36 PM

This article provides a complete guide to login and registration on Binance PC version. First, we explained in detail the steps for logging in Binance PC version: search for "Binance Official Website" in the browser, click the login button, enter the email and password (enable 2FA to enter the verification code) to log in. Secondly, the article explains the registration process: click the "Register" button, fill in the email address, set a strong password, and verify the email address to complete the registration. Finally, the article also emphasizes account security, reminding users to pay attention to the official domain name, network environment, and regularly updating passwords to ensure account security and better use of various functions provided by Binance PC version, such as viewing market conditions, conducting transactions and managing assets.

Tutorial on how to register, use and cancel Ouyi okex account Tutorial on how to register, use and cancel Ouyi okex account Mar 31, 2025 pm 04:21 PM

This article introduces in detail the registration, use and cancellation procedures of Ouyi OKEx account. To register, you need to download the APP, enter your mobile phone number or email address to register, and complete real-name authentication. The usage covers the operation steps such as login, recharge and withdrawal, transaction and security settings. To cancel an account, you need to contact Ouyi OKEx customer service, provide necessary information and wait for processing, and finally obtain the account cancellation confirmation. Through this article, users can easily master the complete life cycle management of Ouyi OKEx account and conduct digital asset transactions safely and conveniently.

What are the recommended websites for virtual currency app software? What are the recommended websites for virtual currency app software? Mar 31, 2025 pm 09:06 PM

This article recommends ten well-known virtual currency-related APP recommendation websites, including Binance Academy, OKX Learn, CoinGecko, CryptoSlate, CoinDesk, Investopedia, CoinMarketCap, Huobi University, Coinbase Learn and CryptoCompare. These websites not only provide information such as virtual currency market data, price trend analysis, etc., but also provide rich learning resources, including basic blockchain knowledge, trading strategies, and tutorials and reviews of various trading platform APPs, helping users better understand and make use of them

Currency Trading Network Official Website Collection 2025 Currency Trading Network Official Website Collection 2025 Mar 31, 2025 pm 03:57 PM

It ranks among the top in the world, supports all categories of transactions such as spot, contracts, and Web3 wallets. It has high security and low handling fees. A comprehensive trading platform with a long history, known for its compliance and high liquidity, supports multilingual services. The industry leader covers currency trading, leverage, options, etc., with strong liquidity and supports BNB deduction fees.

On which platform is web3 transaction? On which platform is web3 transaction? Mar 31, 2025 pm 07:54 PM

This article lists the top ten well-known Web3 trading platforms, including Binance, OKX, Gate.io, Kraken, Bybit, Coinbase, KuCoin, Bitget, Gemini and Bitstamp. The article compares the characteristics of each platform in detail, such as the number of currencies, trading types (spot, futures, options, NFT, etc.), handling fees, security, compliance, user groups, etc., aiming to help investors choose the most suitable trading platform. Whether it is high-frequency traders, contract trading enthusiasts, or investors who focus on compliance and security, they can find reference information from it.