Let's talk briefly about what is the BTC consensus mechanism - POW
In the real banking system, every transfer of users will be settled by a central system - the banking system. Bitcoin is a decentralized peer-to-peer transaction system. Since there is no central institution responsible for supervising each transaction and recording each account, a mechanism is needed to allow the entire system to record each transaction in a regular manner. Bitcoin's consensus mechanism is proof of work (POW for short). Bitcoin transactions are stored in one-way blocks, and all blocks are connected together through hash pointers to form a blockchain.
Since Bitcoin is a decentralized transaction system, two problems arise: first, without a banking system, who is responsible for accounting and settling each transaction; second, how to ensure that the record is a compliant transaction.
For the first problem, Bitcoin adopts the proof of work mechanism (POW for short). Proof of work is to select nodes that record transactions based on the workload results. The specific mechanism is to violently solve a mathematical problem. The hash value of the block header is less than the target value, that is, H (block headers) ≤ target. To solve this inequality, you can only try it out little by little, that is, the harder you work, the greater the probability of calculating it, and whoever is qualified to publish a block, so this process is called proof of work.
Nonce is a value in the block header. Only when a suitable nonce is found to make the hash value of the block header less than the target can the block be legalized and published.
In Bitcoin, the Nonce field is a 32-bit unsigned integer. This means that the value range of Nonce is from 0 to 2^32-1, with a total of 2^32 possible values. When the mining difficulty is very high, even if these 2^32 values are traversed, H (block headers) ≤ target cannot be made. At this time, the input content in the coinbase transaction in the block can be adjusted to change the hash value of the merkle root, and finally make H (block headers) ≤ target.
#SCDO #公链币