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

计算机工程 ›› 2023, Vol. 49 ›› Issue (2): 175-180. doi: 10.19678/j.issn.1000-3428.0063845

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

基于物联网区块链的轻量级共识算法研究

苏瑞国, 阳建, 秦继伟, 武晓雄, 贾振红   

  1. 新疆大学 信息科学与工程学院, 乌鲁木齐 830046
  • 收稿日期:2022-01-26 修回日期:2022-03-01 发布日期:2022-03-23
  • 作者简介:苏瑞国(1997-),男,硕士,主研方向为区块链、食品溯源;阳建,硕士;秦继伟,教授、博士、博士生导师;武晓雄,硕士;贾振红(通信作者),教授、博士生导师。
  • 基金资助:
    自治区重大科技专项项目(课题四)“新疆地区食品安全风险防控与大数据智慧监管技术研究与应用”(2020A03001-4)。

Research on Lightweight Consensus Algorithm Based on IoT Blockchain

SU Ruiguo, YANG Jian, QIN Jiwei, WU Xiaoxiong, JIA Zhenhong   

  1. School of Information Science and Engineering, Xinjiang University, Urumqi 830046, China
  • Received:2022-01-26 Revised:2022-03-01 Published:2022-03-23

摘要: 面对规模庞大的物联网数据,高效的共识算法是区块链技术与物联网应用相结合的关键。为解决大规模物联网区块链系统中传统共识算法通信开销大、扩展性低、共识机制复杂度高的问题,基于Hyperledger Fabric搭建一个物联网区块链框架,并设计基于投票和交易证明的轻量级共识算法PoVT。在链码验证交易后,根据节点之间发起和收到的交易,选择交易的源节点和目标节点作为代表参与共识。在共识阶段通过设计新的投票方式简化共识流程,仅需一次全节点广播即可生成新的区块。以优先收集到一定投票数的节点作为主节点进行投票广播,在所有节点收到足够多投票消息的同时进行上一轮交易区块确认。对安全性、出块时间和带宽需求进行分析,结果表明,PoVT算法在网络中存在拜占庭节点的情况下能够以较短的时间验证交易和区块,在每秒交易数量相同时,该算法生成区块的时间为PBFT算法的1/3,网络带宽占用也能减少30%,证明所提物联网区块链框架在不同应用场景中具有较高的可扩展性。

关键词: 区块链, 共识算法, 分布式账本技术, 物联网, 可扩展性

Abstract: To manage significant amounts of Internet of Things(IoT) data, an efficient consensus algorithm must be developed to integrate IoT applications for blockchain technology.In this study, to solve issues of high communication overhead, low scalability, and high complexity of consensus mechanism in the large-scale blockchain system of IoT, a blockchain framework for the IoT is constructed based on Hyperledger Fabric and a lightweight consensus algorithm, Proof of Vote and Transaction(PoVT), is designed based on voting and transaction proof.After the chain code of the transaction is verified, the source and target nodes of the transaction are selected as representatives to participate in the consensus based on the transaction initiated and received between nodes.In the consensus stage, a new voting method is designed to simplify the consensus process and to enable only one all-node broadcast to generate new blocks.In this method, the nodes that have garnered a certain number of votes are used as the main nodes for voting broadcast, and the final round of the transaction block is confirmed when all nodes receive sufficient voting messages.Based on an analysis of security, block generation time, and bandwidth requirements, this scheme requires a relatively short duration to verify transactions and blocks in the presence of Byzantine nodes in the network.For the same number of transactions per second, the time required by the PoVT consensus algorithm to generate blocks is one-third that of the Practical Byzantine Fault Tolerance(PBFT) algorithm, and the network bandwidth consumption is reduced by 30%.This confirms that the blockchain framework of the IoT proposed herein exhibits high scalability in different application scenarios.

Key words: blockchain, consensus algorithm, distributed ledger technology, Internet of Things(IoT), scalability

中图分类号: