作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2022, Vol. 48 ›› Issue (6): 50-56. doi: 10.19678/j.issn.1000-3428.0063433

• 区块链理论与技术 • 上一篇    下一篇

基于综合选举的DPoS共识算法

王兵1, 李辉灵1, 牛新征2   

  1. 1. 西南石油大学 计算机科学学院, 成都 610500;
    2. 电子科技大学 计算机科学与工程学院, 成都 611731
  • 收稿日期:2021-12-01 修回日期:2022-01-25 发布日期:2022-01-28
  • 作者简介:王兵(1977—),男,副教授、硕士,主研方向为区块链技术;李辉灵,硕士研究生;牛新征,副教授、博士。
  • 基金资助:
    2021年四川省科技计划重点项目(2021YFS0391)。

DPoS Consensus Algorithm Based on Comprehensive Election

WANG Bing1, LI Huiling1, NIU Xinzheng2   

  1. 1. School of Computer Science, Southwest Petroleum University, Chengdu 610500, China;
    2. School of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu 611731, China
  • Received:2021-12-01 Revised:2022-01-25 Published:2022-01-28

摘要: 区块链技术是一种信任机制,具有去中心化、防篡改、可追溯的特性。共识算法是区块链核心技术之一,可维持区块链网络的运行,相较于工作量证明、权益证明等其他公有链共识算法,股份授权证明(DPoS)共识算法具有低延时、高吞吐量、几乎不分叉等优势。但由于按股份权重进行投票选举,选取的委托人总是持币量大的节点,导致其余节点出现投票政治冷漠性的情况,同时节点出块顺序随机,增大了节点通信的消耗。针对上述问题,提出一种综合选举算法CE-DPoS,该算法通过节点之间的通信消耗预先设定网络信息表,根据节点的意愿权重进行投票,投票后计算每个节点的最终得分。选择所有节点中分数最高的节点作为第一个委托人节点,再从该节点的网络信息表中选择得分最高的节点作为第二个委托人节点,直至选定委托人节点数达到系统规定。仿真实验结果表明,与DPoS、BFT-DPoS共识算法相比,CE-DPoS共识算法能动态地选择委托人节点,节点之间选举相对公平,节点活跃度提升至85%,同时出块时间降至0.4 s,能更好地应对日益增长的交易量。

关键词: 共识算法, 区块链, 股份授权证明算法, 委托人选举, 出块时间

Abstract: Blockchain technology is a trust mechanism with distinct characteristics, such as decentralization, tamper-proof, and traceability.The consensus algorithm is a core technology of the blockchain which maintains the operation of the blockchain network.Compared with Proof of Work (PoW), Proof of Stake (PoS), and other public blockchain consensus algorithms, the Delegate PoS (DPoS) consensus algorithm has the advantages of low latency, high throughput, and almost no forks.However, weaknesses exist in the form of weak centralization.Since the delegate nodes elected in the DPoS consensus algorithm are consistently nodes with a large amount of currency, it usually leads to voting political apathy.To solve this problem, a comprehensive election algorithm is proposed, codenamed Comprehensive Election-DPoS (CE-DPoS), in which each node can vote according to its own wishes.Subsequently, the final score of each node is calculated after each node in the algorithm votes with each other according to the weight of willingness.Thereafter, the node with the highest score among all nodes is selected as the first delegate node, then the node with the highest score from the network information table of the previously selected node is selected as the second delegate node until the number of selected delegate nodes reaches system regulations.The experimental results reveal that compared with DPoS and BFT-DPOS consensus algorithms, the CE-DPoS consensus algorithm can dynamically and effectively select the delegate nodes, increasing node activity to 85%.Simultaneously, the block generation time is reduced to 0.4 s, which can better cope with the increasing transaction volume.

Key words: consensus algorithm, blockchain, Delegate Proof of Stake(DPoS) algorithm, delegate election, block time

中图分类号: