Editor's note: This article comes from Baihua Blockchain (ID: hellobtc), author: Yan Wenchun. 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. Let me tell you a storyThis 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. 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 us first understand the structure of Bitcoin blocks. Bitcoin blocks are mainly composed of two parts: block header and block body. The block body is used to contain all transactions packed in the block. A block body full of transaction information is about 1M in size (for ease of understanding, we use the original 1M limit as an example, and it often exceeds 1M at present). ▲Simple diagram of block structure The information contained in the block header includes six 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. ▲Simple diagram of block structure For mining, collecting the "6 dragon balls" in the block header will give you a chance 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 find through trial and error. 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 6 bytes 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. 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. If you are smart, you must have understood how Bitcoin mining works now! If you think it is interesting, try to share it with your friends. |
>>: Chaoke.com is in debt of millions of dollars, and users are blocked from withdrawing money
Which men with good looks are worthy of your life...
Summary : Japan plans to implement a 28 trillion ...
For women, the softer the facial features, the mo...
Every girl is full of expectations for her child,...
Everyone has moles, and moles in different places...
Many people do not have strong fortune in terms o...
Look at your ears to see if you are blessed The a...
People will come into contact with many people in...
What is the personality and destiny of a woman wi...
In our palm lines, there are forks, breaks, etc.,...
Looking at IPFS, many people may be confused by v...
On November 19, the reporter learned from the cen...
Your face can reveal certain tendencies in your l...
Men's appearance: Men who are ashamed of chea...
How to read wrinkles between eyebrows I have writ...