Wang 2020 J. Phys. Conf. Ser. 1437 012007
Wang 2020 J. Phys. Conf. Ser. 1437 012007
Wang 2020 J. Phys. Conf. Ser. 1437 012007
Qianwen WANGa, Jiehua Huang, Shen WANG, Yibo CHEN, Pan ZHANG, Li HE
Aisino Corporation, No. 18, Xingshikou Road, Haidian District, Beijing
a
8618811792502, wangqianwen@aisino.com
1. INTRODUCTION
The consensus mechanism is the core cornerstone of the blockchain and an important guarantee for the
security of the blockchain system. The blockchain is a decentralized system, and the consensus
mechanism mathematically allows thousands of nodes scattered around the globe to agree on the
creation of blocks. The consensus mechanism also includes an incentive mechanism to promote the
effective operation of the blockchain system, which is the basis for building trust in the blockchain. In
short, the blockchain consensus mechanism is an algorithm for reaching a distributed consensus on
blockchain transactions. Due to the high network delay in the peer-to-peer network, the order of
transactions observed by each node may not be exactly the same. Therefore, the blockchain system
needs to design a mechanism to agree on the order of transactions that occur within a similar period of
time. This algorithm for agreeing on the order of transactions within a time window is called a
"consensus mechanism." Blockchain is a kind of distributed system. For centralizing different levels of
blockchain, we need different strategies to implement fault-tolerant consensus algorithms to ensure the
security of the books.
Commonly used consensus mechanisms for blockchain public links include POW, POS, DPOS,
PBFT, and a consensus mechanism with a variety of mechanisms.
Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution
of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
Published under licence by IOP Publishing Ltd 1
2019 2nd International Symposium on Big Data and Applied Statistics IOP Publishing
Journal of Physics: Conference Series 1437 (2020) 012007 doi:10.1088/1742-6596/1437/1/012007
channels, and the consensus mechanism solves how the blockchain is in a distributed scenario. The
issue of consistency has laid the foundation for the security of the Bitcoin system.
Bitcoin uses the POW mechanism in the block generation process. A matching Block Hash consists
of N leading zeros, and the number of zeros depends on the difficulty value of the network. To get a
reasonable Block Hash requires a lot of trial calculations, the calculation time depends on the
machine's hash speed. When a node provides a reasonable Block Hash value, it indicates that the node
does undergo a lot of trial calculations. Of course, the absolute value of the number of calculations
cannot be obtained, because finding a reasonable hash is a probability event. When a node has a
computing power of n% of the entire network, the node has a probability of n/100 to find the Block
Hash.
There are incentives in the system to encourage users to benefit from maintaining the blockchain
system. The user participating in the consensus process collects the newly generated transaction record
construction block and attempts to modify the value of Nonce in the block until the hash value of the
block is smaller than the hash value of the specific difficulty, and the block can be broadcasted
externally. The block is verified and approved by other users. After successfully adding to the main
chain, the user can get the corresponding reward.
Here we represent a block as a packet containing triples B = <h', txs, nonce>, where h' is the hash
of the previous block and txs is the transaction record contained in the block. Nonce is a 32-bit integer.
In order to reach a consensus, the system equalizes the node construction block to solve a difficult
problem and sets a difficulty value D. D defines how many leading zeros are needed for the current
block hash value. The more the leading 0 number, the more difficult it is. Since nonce changing any
bit will completely change the hash H(B) of the entire block, there is no way to predict which form of
nonce can meet the requirements. Therefore, in order to meet the block requirements, the node needs
to use its computing resources to try a large number of possible nonce values such that H(B) < D.
The process of embedding the consensus algorithm into the digital currency system is as follows:
1) The new transaction is broadcast to the entire network of miners.
2) Each miner collects transaction records and constructs a new Merkle tree.
3) The miner uses computing resources to find a nonce that meets the current difficulty value.
4) The miner finds a feasible nonce solution and broadcasts the block to the entire network.
5) Other miners verify the block.
6) If the transaction record in this block is valid, the block hash meets the difficulty value
requirement, and the block is the longest block among all the forks, then other honest nodes will
construct the next block after this block. Piece.
Advantage:
1. High degree of decentralization: the algorithm is simple and easy to implement, the nodes can
enter freely, and the degree of decentralization is high.
2. high security: damage to the system requires a huge investment, security is extremely high.
3. Machine trust: The choice of block producers is solved by the node solving hash function. The
final process of generating and verifying the proposal to the consensus is a purely mathematical
problem. The nodes can reach consensus without exchanging additional information. The whole
process No human involvement is required.
Disadvantages:
1. Long confirmation time: In order to ensure the degree of decentralization, the confirmation time
of the block is difficult to shorten.
2. poor expansion: no finality, the need for checkpoint mechanism to make up for the finality, but
the possibility of reaching consensus with the increase in the number of confirmations has also
increased exponentially.
3, waste of resources: the difficulty of mining, coupled with the upgrade of hardware, resulting in
double waste of hardware + resources.
2
2019 2nd International Symposium on Big Data and Applied Statistics IOP Publishing
Journal of Physics: Conference Series 1437 (2020) 012007 doi:10.1088/1742-6596/1437/1/012007
3
2019 2nd International Symposium on Big Data and Applied Statistics IOP Publishing
Journal of Physics: Conference Series 1437 (2020) 012007 doi:10.1088/1742-6596/1437/1/012007
5. Nothing-at-Stake attack: Because mining does not cost, so the fork attack success rate is very
high, it is easy to be split attack. And even without a 51% interest, you can successfully launch a fork
attack.
4
2019 2nd International Symposium on Big Data and Applied Statistics IOP Publishing
Journal of Physics: Conference Series 1437 (2020) 012007 doi:10.1088/1742-6596/1437/1/012007
where f is the maximum number of replicas that are likely to fail. Although there may be more than
3f+1 copies, the extra copy does not improve reliability in addition to performance.
The whole algorithm operates according to the following process. There are 3f + 1 nodes in a
distributed system, which can tolerate f Byzantine error nodes.
1) The client requests the calling service from the primary node.
2) The master node multicasts the request to the secondary node.
3) The secondary node executes the request and sends a reply to the client.
4) The client receives f + 1 replies with the same answer, and the client gets the requested data.
Since the Byzantine fault-tolerant algorithm needs to know the number of nodes in advance, the
nodes can establish connections with each other, and the nodes cannot be dynamically managed,
which cannot meet the requirements of the public chain. However, in certain circumstances, the
blockchain consensus can be achieved using the PBFT algorithm, such as the China Central Bank's
electronic billing system, Hyperledger Fabric, whose number of nodes is determined.
Advantage:
1.the main network is stable without fork
Disadvantages:
1. Low scope of application: only for alliance chain and private chain
2. the system, poor scalability.
3. the system node is fixed: can not cope with the open environment of the public chain, only
applies to the alliance chain or private
4. Low fault tolerance: The PBFT algorithm requires the total number of nodes n>=3f+1 (where f
represents the number of evil nodes). The number of failed nodes of the system shall not exceed 1/3 of
the nodes of the whole network, and the fault tolerance rate is relatively low.
5
2019 2nd International Symposium on Big Data and Applied Statistics IOP Publishing
Journal of Physics: Conference Series 1437 (2020) 012007 doi:10.1088/1742-6596/1437/1/012007
8. Conclusion
In this paper, the popular consensus algorithm of blockchain is summarized. By describing its different
requirements and conditions, the internal implementation, advantages and disadvantages of the four
consensus algorithms of POW, POS, DPOS and BPFT are expounded.
At present, the POW-POS hybrid consensus mechanism is the hotspot of research. It is also a new
direction to use smart contracts to build more transparent consensus rules. The application of the
consensus algorithm to practice is also a test of the algorithm. The new attack method can make us
understand the inadequacies of the existing consensus algorithm. In addition, for consensus algorithms
on the license chain, pluggable switchables are a trend. For different business scenarios, throughput
requirements, and security assumptions, we can use different underlying consensus mechanisms to
better serve top-level applications.
ACKNOWLEDGMENTS
This research was financially supported by National Key R&D Program of China (Grant No.
2017YFB0802701).
REFERENCES
[1] Lamport L, Shostak R E, Pease M C. The Byzantine Generals Problem[J]. ACM Transactions on
Programming Languages and Systems, 1982, 4(3): 382-401.
6
2019 2nd International Symposium on Big Data and Applied Statistics IOP Publishing
Journal of Physics: Conference Series 1437 (2020) 012007 doi:10.1088/1742-6596/1437/1/012007
[2] J. Bonneau, A. Miller, J. Clark, A. Narayanan, J. A. Kroll, and E. W. Felten. Sok: Research
perspectives and challenges for bitcoin and cryptocurrencies. In Proc. IEEE Symposium on
Security and Privacy, May 2015.
[3] Gencer A E, Basu S, Eyal I, et al. Decentralization in Bitcoin and Ethereum
Networks[C]//International Conference on Financial Cryptography and Data Security, 2018.
[4] Castro M, Liskov B. Practical byzantine fault tolerance and proactive recovery[J]. ACM
Transactions on Computer Systems, 2002, 20(4): 398-461.
[5] Fischer M J, Lynch N A, Paterson M S. Impossibility of distributed consensus with one faulty
process[J]. Journal of the ACM, 1985, 32 (2):374-382.
[6] Lamport L. Proving the Correctness of Multiprocess Programs [J]. IEEE Transactions on Software
Engineering, 1977, SE-3(2):125-143.
[7] Eyal I, Sirer E G. Majority Is Not Enough: Bitcoin Mining Is Vulnerable [DB]. eprint arXiv:1311.
0243, 2013.
[8] Yeow K, Gani A, Ahmad R W, et al. Decentralized Consensus for Edge-Centric Internet of
Things: A Review, Taxonomy, and Research Issues[J]. IEEE Access, 2018, 6 (99):1513-
1524.
[9] Lamport L. Proving the Correctness of Multiprocess Programs [J]. IEEE Transactions on Software
Engineering, 1977, SE-3(2):125-143.
[10] BELLARE M, KEELVEEDHSI, RISTENPART T. Messagelocked encryption and secure
Deduplication [C]. Proceedings of Annual International Conference on the Theory and
Application of Cryptographic Techniques, Springer, 2013: 296-312.
[11] AUJLA G S, CHAUDHARY R, KUMAR N, et al. SecSVA: Secure Storage, Verification, and
Auditing of Big Data in the Cloud Environment [J]. IEEE Communications Magazine, 2018,
56(1): 78-85.