A classic story that will help you understand Bitcoin mining in 3 minutes

A classic story that will help you understand Bitcoin mining in 3 minutes

In previous popular science articles, Plain Language Blockchain (ID: hellobtc) introduced Bitcoin mining: miners use continuous trial and error until they find a suitable random number, and new blocks are mined, and they receive corresponding block rewards and transaction fee rewards.

Some friends left messages in the background, hoping to introduce the mining process in more detail. Today, the Plain Language Blockchain will introduce it from a different angle, so that you can understand Bitcoin mining in three minutes.

01 Let me tell you a story


This is an ancient legend. There are 7 dragon balls scattered around the world. Whoever gathers the 7 dragon balls and recites a spell can summon the dragon. The dragon will grant him one wish. After the dragon grants his wish, the 7 dragon balls will automatically fly away and turn into stone. They can only be used again after one year. Yes, this story comes from the famous Japanese anime "Dragon Ball". If you can understand this story, you can understand Bitcoin mining. Don't believe it? Let's wait and see.

02   Bitcoin mining is like summoning the "dragon"

To summon the dragon, you need to collect 7 dragon balls. Bitcoin mining is very similar to summoning the dragon. You need to collect 6 "dragon balls" to summon Bitcoin. Let's first understand the structure of the Bitcoin block.

Bitcoin blocks are mainly composed of two parts: block header and block body . The block body is used to load all transactions packed in the block. The size of a block full of transaction information is generally no more than 1M.

▲Simple diagram of block structure

The information contained in the block header includes 6 fields : version, parent block header hash value (that is, the previous block) , hash value of the Merkle tree root in the block, timestamp, difficulty target, and random number ( Nonce ) . The size of the block header is fixed, only 80 bytes , and the capacity of 12,500 block headers is only 1M.

Please note: If you find that these terms are incomprehensible after reading this, it doesn’t matter. Just ignore them and treat them as “dragon balls”. They will not affect your understanding of mining.

▲Simplified diagram of the block header structure

For mining, if you collect the "6 dragon balls" in the block header , you will have the opportunity to "summon the dragon". The 6 "dragon balls" are the 6 fields in the block header, and the "dragon" is the new block mined. The wish you make to the "dragon" is the Bitcoin reward , including the reward for creating a new block and the transaction fees of the transactions contained in the block.

Let’s first understand what the 6 “dragon balls” of Bitcoin mining are and how easy they are to obtain.

Among the 6 fields, except for the random number which needs to be found through trial and error, the other 5 fields are easy to obtain.

1. Version field: It is used to track the version number of software upgrades and can be automatically obtained from the software information;

2. Hash value of the parent block header: After the parent block is mined, the hash value of its block header is determined and easy to obtain;

3. Hash value of the Merkle tree root in the block: When the transactions packaged in a block are determined, this field is also determined, so easy;

4. Timestamp refers to the approximate time when the block was generated, which is also certain;

5. Difficulty target: The difficulty target of the proof-of-work algorithm for this block is given by the system and is also determined;

That is to say, 5 of the 6 "Dragon Balls" in the block header are easy to obtain and relatively certain. Only the 6th "Dragon Ball" - the random number (Nonce) is an uncertain variable that miners need to constantly try and find.

Only when the right Nonce is found can the "dragon" be summoned - new blocks can be mined and Bitcoin rewards can be obtained.

What is a suitable random number? Take the hash value of the six "dragon balls" in the block header. If this value is less than or equal to the difficulty target value given by the system, then even if the suitable random number is found, you can successfully "summon the dragon" - dig out a new block and get a Bitcoin reward. This is the process of Bitcoin mining.

03 Summary


Let’s summarize: Bitcoin mining is similar to summoning the dragon in "Dragon Ball". Collecting 6 "Dragon Balls" will give you a chance to "summon the dragon".

Of the six "Dragon Balls", five are easy to obtain, but the sixth one - the random number - requires miners to constantly try and find it. Only when the right random number is found, that is, the hash operation is performed on the six "Dragon Balls" in the block header as a whole, and the value obtained is less than or equal to the difficulty target value, can a new block be mined and the corresponding Bitcoin reward be obtained.

Compared to collecting 7 dragon balls to summon a dragon, collecting 6 "dragon balls" to summon Bitcoin, which one do you think is more difficult? Come and write down your thoughts in the comment section, and you will have a chance to win a prize if you leave a wonderful comment.

Source: Vernacular Blockchain

Author: Yan Wenchun

<<:  f2pool GRIN Mining Tutorial

>>:  Research Report丨Grin Mining Equipment Investment Return Analysis Report

Recommend

What facial features indicate the arrival of marriage?

Everyone hopes that their true love can come soon...

What kind of men are smart and capable, suitable for starting a business?

Not everyone is suitable for this great and diffi...

Dash may usher in a new breakthrough at the 2016 San Francisco d10e Summit

What is the D10E Summit? D10E stands for Decentra...

What are the facial features of an incompetent man?

In this society, it is generally believed that me...

Is it good for a woman to have a "川" palm in palmistry?

Is the Sichuan palm good for women? The independe...

Are men with moles on their crow's feet loyal in relationships? Will you cheat?

As one of the traditional physiognomy techniques, ...

Are women with short eyebrows okay?

Nowadays, many girls draw their eyebrows, and man...

What kind of woman has a bad face?

Whether a face is good or bad will affect our for...

Is it good to connect the career line and the wisdom line?

Is it good to connect the career line and the wis...

The facial features of a childless person have these characteristics

People are always not satisfied with the status q...

Vietnam Bitcoin Ponzi Scheme on the verge of collapse

Since the birth of Bitcoin, there have been a num...

From on-chain data to Web3: ETH is leaving the exchange

It is undeniable that the crypto market continues...

Jia Yueting's Weibo: LeEco Finance puts blockchain concept on the wall

 Jia Yueting, who is in the whirlpool of public op...

How to read the wisdom line in palmistry

The wisdom line in palmistry is also called the h...

Do you have the palmistry characteristics of a woman destined to be rich?

Financial independence is a woman's greatest ...