Blockchain across Oracle
上QQ阅读APP看书,第一时间看更新

Proof-of-work

Let's start with the best-known method of reaching consensus, referred to as the PoW algorithm or scheme. This scheme is used by blockchains built upon the Bitcoin core code. The PoW scheme is the one used in this chapter to explain the core concepts of the blockchain. It uses a system of hash functions to create conditions under which a single participant (individual, organization, or computer) is allowed to submit its conclusions about the broadcast transactions. Those conclusions, in the form of a new block, are broadcast to all other participants who then can independently verify them. If a participant submits false conclusions, the other participants will fail to compute by the rules of the hash function and the conclusions are rejected. The process of searching for the right conclusion is done by finding the valid hash based on the message input and an arbitrary number (or nonce).

The following diagram shows the steps for finding the correct hash:

The process of proofing a new block on the Bitcoin blockchain

In most of the PoW-style blockchains, the node that submits its conclusions the quickest, and which are verified by a group of other participants, is, in turn, rewarded for its participation. In terms of energy and computing resources, this participation designed to solve the correct hash can be costly. The process of solving, or mining, in such cases is incentivized by the network by giving the participant currency in return. Naturally, this broadens the participation and, in turn, ensures greater stability of the network and a safer, distributed, and decentralized blockchain.

What is Bitcoin mining?

It is a decentralized computational process that serves two goals:
  1. Confirming transactions in a trustful manner when a miner has devoted adequate computational power to proof a block
  2. Creating, or issuing, new bitcoins for each block
The miner bundles new transactions in a block and verifies internally whether they are valid. Then it selects the header of the most recent block and inserts its hash into the new block as a reference. Then it tries to solve the PoW problem and, when a solution is found, the block is added to its local chain and broadcast to the network. When accepted, the miner receives the issued bitcoins.