Hello everyone, I am Cuihua, the editor of POWPOWER. POWPOWER has been focusing on the mining neighborhood for 4 years. I am the official distributor of IPollo and have established long-term partnerships with Bitmain, Avalon, Jas miner, inno, Whatsminer and Goldshell.Let’s learn about the mining process today.
Mining is the process of confirming transactions that occur in the BTC system over a period of time and recording them on the blockchain to form new blocks.
It is the preparation work done by the accounting node before the POW workload proof. First you have to check and collect unrecorded transaction information into a data block. After the collection is completed, you need to verify it yourself. There are two main aspects to verify. 1. Whether the payment address in each transaction information has enough balance for payment. 2. Verify that the transaction has the correct signature. These two items are essential. After these two items are verified, the verified data can be packaged.
The transaction data to be packaged by the miner is a string, and after hashing it, a 32-bit output value will be obtained. The Bitcoin blockchain has a rule that the signature of a packaged block of data must start with a certain number of zeros. However, the output value of the hash calculation is random for each of its input values, so what if the input string hash does not get so many values starting with zero? This is why miners need to constantly change a value called “nonce” in the block. Every time the value of the nonce is changed, the data of the block will be changed, and the signature obtained after the hash operation will also be different, that is, every change Once the value of the nonce, it will get a brand new signature for verification.
There are only two situations. One is that the verification is passed, which means that the block is successfully mined, and other miners will no longer compete. They choose to accept the block, record the block, and the miner who dug out the block will get the The reward for this block is received, and the competition for the next block is entered.
The other is to fail, then the previous work is wasted, and the cost of investment cannot be recovered, so miners consciously abide by the rules of packaging and verification, because the cost of doing evil is high, and they maintain Bitcoin. network security.