计算机应用 ›› 2020, Vol. 40 ›› Issue (8): 2274-2278.DOI: 10.11772/j.issn.1001-9081.2019122206

• 网络空间安全 • 上一篇    下一篇

基于工作量证明和权益证明改进的区块链共识机制

吴梦宇, 朱国胜, 吴善超   

  1. 湖北大学 计算机与信息工程学院, 武汉 430062
  • 收稿日期:2020-01-02 修回日期:2020-03-04 出版日期:2020-08-10 发布日期:2020-08-21
  • 通讯作者: 朱国胜(1972-),男,湖北大冶人,教授,博士,主要研究方向:下一代互联网、软件定义网络,zhuguosheng@hubu.edu.cn
  • 作者简介:吴梦宇(1994-),男,安徽芜湖人,硕士研究生,主要研究方向:区块链、网络安全;吴善超(1994-),男,安徽铜陵人,硕士研究生,主要研究方向:数据挖掘。
  • 基金资助:
    赛尔网络下一代互联网技术创新项目(NGII20180803)。

Improved consensus mechanism of blockchain based on proof-of-work and proof-of-stake

WU Mengyu, ZHU Guosheng, WU Shanchao   

  1. School of Computer Science and Information Engineering, Hubei University, Wuhan Hubei 430062, China
  • Received:2020-01-02 Revised:2020-03-04 Online:2020-08-10 Published:2020-08-21
  • Supported by:
    This work is partially supported by the CERNET Innovation Project (NGII20180803).

摘要: 当前区块链工作量证明(PoW)机制浪费大量算力和电力的缺陷日益凸显,而权益证明(PoS)机制由于无成本权益以及权益无限增长容易产生分叉和富者愈富问题,不能保证区块链的稳定性。针对二者的缺陷,提出了一种基于PoW和PoS改进的区块链共识机制PoWaS。首先,降低哈希计算的难度并限制最大难度值,以减少寻找随机数所花费的算力和电力资源;其次,为有效持币时间和币龄设置上限,防止由于币龄无限增长而带来的富者无限富的问题;然后,引入信用值的概念,为每个节点赋予一个信用值,并根据节点行为升降信用值;最后,加入竞争等待时间,由寻找随机数所花费的时间、币龄和信用值计算得到一个值pStake,而pStake最大的节点获得打包记账权。实验搭建了一个拥有6个节点的PoWaS共识机制区块链,实验结果表明PoWaS可以减少算力浪费、加快出块速度和平衡记账权竞争。

关键词: 区块链, 共识机制, 工作量证明, 权益证明, 信用值

Abstract: At present, the Proof-of-Work (PoW) mechanism of blockchain wastes a lot of computational power and electric power, and the Proof-of-Stake (PoS) mechanism is prone to bifurcation and makes the rich get richer due to the nothing-at-stake and unlimited growth of rights and interests, which cannot guarantee the stability of blockchain. In order to overcome the shortcomings of the two above mechanisms, an improved consensus mechanism of blockchain named Proof of Work and Stake (PoWaS) was proposed based on PoW and PoS. First, the difficulty of hashing calculation was reduced and the maximum value of difficulty was limited to reduce the computational power and electric power resources spent in searching for nonces. Second, the upper limits for the effective coin holding time and the coin age were set to prevent the problem of unlimited wealth of the rich caused by the infinite growth of the coin age. Third, with the concept of credit value adopted, the credit value was assigned to each node, and the credit value was increased or decreased based on node behaviors. Finally, the competition waiting time was added, and the time spent searching for nonces, coin age, and credit value were used to calculate a value named pStake. The node with the largest pStake gained the right to pack and account. A blockchain of PoWaS consensus mechanism with six nodes was built to carry out experiments. Experimental results show that the PoWaS can reduce the waste of computational power, speed up the block mining and balance the competition of accounting rights.

Key words: blockchain, consensus mechanism, Proof-of-Work (PoW), Proof-of-Stake (PoS), credit value

中图分类号: