Workload consensus mechanism of the block chain to prove (POW)

Like Bitcoin, Ethernet Square, NXT, Bitshares block chain systems such as these, which essentially is an encryption economic organization, it is based on peer to peer network is decentralized, without jurisdiction, by a password, economics and social consensus to jointly safeguard. These encrypted network for various reasons, have a variety of different styles - some ASIC-based effort to prove (PoW), and some GPU-based workload proof that some native interests (PoS), some proof of authorized shares (DPOS), there we are about to see Casper interests of proof - these different styles have their philosophy, when studying the mechanism of consensus, it is more important is to understand the thinking of them.

"Consensus" , which is interpreted as the Chinese common understanding. No contact with each other on a particular issue held a common view, not only because the role of consensus on some uncontrollable ethics, values, etc., the rules are very important.

Consensus mechanism, rules of the game, the legal community, is a common way people used to reach and maintain consensus, that is, everyone can agree on and comply with the rules, and this is where the soul of the block chain.

Consensus mechanism in the block chain

Block chain is decentralized, without a command center to tell when to do each node. All participants on the network (nodes) working in consensus mechanism, they collaborate with the completion of a chronological credible public books (public database), and each node maintains a complete data backup, each data content node must match exactly.

Block chain on the work of miners

The block chain, each of the miners are trying to package deal data, a miner a packed one block of data, he put the block to the whole network broadcast, other miners received the data verification after the block, put the confirmation this block save it, stop the current package to work, continue to the next package, in order to extend the block chain.

miner

potential problem

According to the principle of FLP. Impossibility of Distributed Consensus with One Faulty Process a proposed: In an asynchronous system, we can not know for sure whether any of a host crash, because we can not distinguish the difference between performance and slow down the host host or network crashes, that we can not reliably detect the failure error. When multiple hosts a network of clusters by asynchronous communication, the default asynchronous network is unreliable.

In this unreliable network, data will be delayed, may also be lost, however, in each of the miners are quietly doing their work, packing effort, memory block, do not ask that of others packed, then:

  • There may be multiple miners packed the same transaction
  • B and c miners might miners are packaged and broadcasts the data block, and Miner Miner d e are received from the block b and c, all data is stored and verified by

In addition, all the miners working on the network, they will be thinking:

  • Why should I work so hard, I could get what
  • I need to have what conditions can the block
  • If I packed data block is not verified, this time trying to pay off my right

Certainly there will be some malicious miners in the network, such as: a miner does not broadcast his block, but continued to quietly pack directly behind

Consensus mechanism block chain, mainly in order to solve these problems, at present, has developed a variety of mechanisms, each mechanism are both advantages and disadvantages, this paper introduces work POW (Proof of Work) workload proved , will continue after devoted to other consensus mechanisms.

Workload proof (POW)

The consensus of the bits of the first block chain used credits to consume a lot of power calculated from competition block.

Longest chain rule Bitcoin

There is a consensus on the bitcoin block chain - always take the longest even the main chain (effective chain), also known as "the longest chain rule." Each node in a chain of data blocks as their most add, update selection block. For proof of this rule workload is undoubtedly a Church, it must be the backbone of the majority of the miners consume the most economic capital created by the chain. All illegal, not in the main block in the chain, will eventually be discarded, in order to maintain the authority of a public books.

Miners mining process is to find the value of the nonce, so that the following equation holds:

SHA256(SHA256(version + prev_hash + merkle_root + ntime + nbits + nonce )) < TARGET

version: The version block

prev_hash: hash value of a block

merkle_root: tree hash value of transactions need to be written

ntime: Updated

nbits: The current difficulty

Wherein TARGET is not constant, the token bit chain block, each block 2016 (about 14 days) will be adjusted according to the speed of the period of the block, the block resorted speed is maintained for about 10 minutes, is difficult control.

In this period of 2016 blocks, the difficulty of hashing is certain, for every miner who is fair, competitive need is speed and luck, who has more power operator, who have higher probability to win in the competition, faster and packed the block.

So the workload bitcoin block chain of proof is really a very pure strength to live, sometimes call it classic POW.

Why wait so long in the past 10 minutes, the Bitcoin system doing?

  • Broadcast blocks
  • Verify Block
  • Complete hash of the new block

Such a long time, because the probability of data transmission caused by network problems is greatly reduced, as large as possible to ensure that all the miners were to receive broadcast and verify data, but in fact, transfer and validation is not so long 10 minutes, of which 90 % of time is spent hashing, because of the difficulty of this operation is really great. It was such a large enough degree of difficulty, as far as possible to ensure that only the miners while a different block of probability is relatively small, and thus appear less control block chain bifurcation.

In the longest chain rules, even if the block chain is a bifurcation, with the passage of time, the two chains have turned out differently long, relatively short chain will be lost, thereby maintaining only one main chain .

Therefore, data consistency bitcoin block chain, is based on giving up on transaction processing efficiency.

About 51% of attacks

In the POW consensus mechanism, if a node has counted more than 51% of the force of the whole network, then he can achieve a 51% attack (double flowers attacks) . So the block chain, the more force is considered more decentralized, more secure. Then you need to maintain the vitality of the miners, the miners have enough incentive to make efforts to mining, and there are always new miners to join, this is a huge incentive bonus blocks and transaction costs.

On the Bitcoin block chain, the block award from the initial 50 bits coins, half decay every four years, and now only a 12.5. But in the block reward reduction, while the circulation of Bitcoins changed much, transaction costs have become more competitive transaction costs more to promote the enthusiasm of the miners, in order to guarantee the robustness of the bitcoin block chain.

Security POW block chain is based on the huge power consumption, news pointed out that in 2019 for mining bitcoin power consumption than the Swiss national electricity consumption .

Here, I believe that already have a preliminary understanding of the mechanisms of consensus and POW, POW look at the following consensus mechanism Ethernet Square.

Ethernet Square POW consensus mechanism

Read a brief history of Ethernet Square development , we know that the current Ethernet Square is still a POW consensus mechanism. According to the latest news, in December 2019 will be released in Istanbul (Istanbul) upgrade , this time from the Ethernet Square POW transition to the POS. Interested partners can look small Ethernet beautiful picture Square 2.0 .

Square GHost Ethernet protocol

Compared with the longest chain rule bits currency, the Ethernet protocol GHOST Square, single most important difference lies in the way it chooses backbone.

Bifurcation

Ethernet Square, a block of time only ten seconds to shorten the time it means that the block to reduce the difficulty, the same time the miners will be able to block out increases, it will greatly increase the probability of bifurcation, as shown above, how this case maintenance of a backbone. This is GHOST subtlety of bits in the longest chain rule coins, to avoid the bifurcation, and in GHOST protocol is bifurcated to protect the security of the use of chain block, as shown below:

Tert reference block

Square GHOST the Ethernet protocol, the introduction of t blocks, as in FIG. When bifurcation occurs, miners can be referenced m0 digging block 2 1a, 1b as t-block when the block 2 is dug m0, miners m1, m2 can be obtained reward 7/8 block, while m0 can additional bonus resulting block of 1/32 × 2. The miners m1, m2 verifies Upon receipt of the broadcast block 2 and found that longer chain m0 mining, so give up work of the hands, turn back to continue mining at 2 blocks.

When referring tert block up while reference 2, i.e., m0 to give a reference block most bonus t 1/32 × 2 of

T reward to block will increase as a distance from each block is reduced t 1/8, there are no bonus block until the distance t to the eighth block, cited above figure blocks 1 t two blocks 1C, 1d, miners m3, m4 respectively block reward 7/8

In this way, the network may be generated in many bifurcated, and as soon as the excitation combined miners found longest chain, so that more miners mining in the main chain. As long as by the difficulty of control, to keep the whole network backbone and a block rate of no more than one safety threshold , double flowers can effectively resist attacks.

to sum up

In the logic of the workload proved, block chain will consume a lot of energy, and its attack and defense costs are 1: 1, and no defensive advantage. But we still undeniable that the value chain in the block, which is built on a foundation of free markets and on game theory, laid the foundation for other mechanisms of consensus after.

This article first appeared in the systematic study of the block chain technology blog - layman block chain

Guess you like

Origin www.cnblogs.com/blockchainnote/p/11926062.html