What is block height?
In many articles about blockchain, we often see that the blockchain forks at a certain block height.
So what exactly is a block height, and why does a fork occur at a certain block height? Today Dabai will talk to you about block height.
01. Blockchain and ledger

The block height is as the name suggests. The height of a block, to be precise, is the number of blocks attached to the blockchain. Therefore, if we want to understand what block height is, we must first understand what blockchain is. If the blockchain is a ledger, then a block is like each page of the ledger.
Every account is clearly recorded in the pages of the accounting book. And in order to prevent transactions from being tampered with and ensure openness and transparency, the blockchain accounting method is that everyone keeps accounts together.
02. Block height and accounting book page number
Since the blockchain is a small accounting book, then each page (block) can record the number of accounts It is limited, so in order to distinguish and find which block a transaction is recorded in, we can easily think of marking the page number in this book. Therefore, if the blockchain is a small accounting book, the block height is like the page number of this accounting book.
Here comes the simple thinking question. In the case of a blockchain with only one longest chain, assuming that the page number of this page of the current ledger is 3, then this block is this block How many blocks in the chain is it? Answer: Block 4.
Some friends may wonder why it is not the third block? The reason is that the blockchain also has a block with a block height of 0, which is the genesis block. Its page number is 0, so when it reaches the block with page number 3, it means that there are 3 blocks in front of it, which is also called the number of ancestors of the block. And it itself is the 4th block of this chain.
03. Block generation and ledger page number generation
Understanding what a block is After the height, Dabai will continue to talk to everyone about how the block height is formed. In the blockchain with the mining mechanism, the page numbers of the small bookkeeping booklet of the blockchain are obtained by miners through competition. For example, the current block height is 3. When a lucky miner solves the calculation problem, he will get the accounting rights of the page of the ledger with page number 4 (that is, the block with a block height of 4), and will receive a certain amount of rewards. At this time, this block will record the transactions that have been packaged and confirmed by the miner. When this block has been formed, miners will continue to compete on the block with block height 4 to get the block with block height 5.
04. Duplication of bifurcation and ledger page numbers

This is equivalent to saying that miner Xiaobai is holding a page with page number 3, and miner Xiaohei is also holding a page with page number 3, although the page numbers of Xiaobai and Xiaohei's paper are The same, but the contents recorded on the two accounting papers are not exactly the same.
But according to the rules, there is no problem with the two pages of Xiaobai and Xiaohei, so which accounting paper should I choose? At this time, some miners will choose Xiaobai's page to be stapled at the back of the accounting book and continue to "seek" the page of accounting paper with page number 4, while some miners will choose Xiaohei's page to be stapled to the back of the accounting book. Continue to "search" for the accounting paper with page number 4 in the accounting book.
This is equivalent to dividing the page with page number 2 into two accounting books. In blockchain, this behavior is called forking. But there is a "longest chain principle" in the blockchain. Miners will choose the longest chain as the main chain to continue mining. For example, after Xiaobai's chain, Xiaohong first mines a block with a block height of 4, then Xiaohei's chain will be abandoned, and miners will choose to continue mining on Xiaobai's chaindig.
Dabai mentioned earlier that block height is used to identify which block a certain transaction belongs to. But now there are two blocks with the same height, so how to identify them?
In fact, in the blockchain, the block hash is used to uniquely identify a block, not the block height. Because even if the height of the block is the same, the content recorded in the block is not exactly the same. Therefore, the hash of the block (obtained from the content of the block) must not be the same, so the hash of the block can be used to Uniquely identifies a block.
In summary, the blockchain is like a ledger, and the blocks are like pages of accounting paper in the ledger. The height of the block is the page number of the accounting paper. A fork occurs when two identical page numbers appear at the same time.
Do you know what block height is and how to identify two blocks with the same height? Welcome to share your views in the message area.
The above is the detailed content of What is block height?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



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.

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

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.

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.

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

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.

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.

Sesame Exchange Gate.io web version is convenient to log in. Just enter "gate.io" in the browser address bar and press Enter to access the official website. The concise homepage provides clear "Login" and "Register" options, and users can choose to log in to a registered account or register a new account according to their own situation. After registering or logging in, you can enter the main trading interface to conduct cryptocurrency trading, check market conditions and account management. Gate.io has a friendly interface and is easy to operate, suitable for beginners and professional traders.