计算机科学 ›› 2025, Vol. 52 ›› Issue (11A): 250100133-8.doi: 10.11896/jsjkx.250100133

• 信息安全 • 上一篇    下一篇

基于贪心策略的区块链动态分片与跨分片交易协议优化

艾渊1, 李家浩1, 赵毅涛1, 胡凯2,3   

  1. 1 云南电网有限责任公司计量中心 昆明 650200
    2 北京航空航天大学云南创新研究院 昆明 650233
    3 北京航空航天大学计算机学院 北京 100191
  • 出版日期:2025-11-15 发布日期:2025-11-10
  • 通讯作者: 艾渊(aiyuan19890929@163.com)
  • 基金资助:
    中国南方电网有限责任公司科技项目(YNKJXM20222256)

Optimization of Blockchain Dynamic Sharding and Cross-shard Transaction Protocol Based on Greedy Strategy

AI Yuan1, LI Jiahao1, ZHAO Yitao1, HU Kai2,3   

  1. 1 Metrology Center,Yunnan Power Grid Co.,Ltd.,Kunming 650200,China
    2 Yunnan Innovation Research Institute,Beihang University,Kunming 650233,China
    3 School of Computer Science,Beihang University,Beijing 100191,China
  • Online:2025-11-15 Published:2025-11-10
  • Supported by:
    Science and Technology Project of China Southern Power Grid Co.,Ltd.(YNKJXM20222256).

摘要: 针对区块链技术中分片机制所面临的挑战,包括负载不均衡、跨分片交易验证的复杂性以及跨分片交易原子性的保障问题,提出了一种优化的动态分片算法和跨分片交易协议。首先基于区块链交易数据,开发了一种基于贪心策略的动态分片算法,该算法通过权值计算动态调整分片,以实现负载均衡。进一步地,针对跨分片交易的原子性和延迟问题,结合交易锁定与回滚机制,提出了一种创新的跨分片交易协议和分片迁移策略,以确保跨分片交易的原子性。实验结果表明,该方法在降低交易延迟方面具有显著效果。

关键词: 区块链, 分片技术, 负载均衡, 动态分片算法

Abstract: An optimized dynamic sharding algorithm,along with a cross-sharding transaction protocol,is proposed to tackle the challenges associated with the sharding mechanism in blockchain technology.These challenges include load imbalance,the complexity of verifying cross-sharding transactions,and ensuring the atomicity of such transactions.To address these issues,this paper develops a dynamic slicing algorithm utilizing a greedy strategy,which adjusts the slicing dynamically through weight calculations to achieve load balancing based on blockchain transaction data.Additionally,to resolve the atomicity and latency issues of cross-slicing transactions,it introduces an innovative cross-slicing transaction protocol and a slice migration strategy.This approach ensures the atomicity of cross-slicing transactions by incorporating a transaction locking and rollback mechanism.Experimental results indicate that this method significantly reduces transaction latency.

Key words: Blockchain, Sharding technology, Load balancing, Dynamic sharding algorithm

中图分类号: 

  • TP302.1
[1]NAKAMOTO S.Bitcoin:A peer-to-peer electronic cash system[J/OL].2008.https://www.semanticscholar.org/paper/Bit-coin%3A-A-Peer-to-Peer-Electronic-Cash-System-Hunt/4e9ec92a90c5d571d2f1d496f8df01f0a8f38596?p2df.
[2]BUTERIN V.A next-generation smart contract anddecentrali-zed application platform[J].White Paper,2014,3(37):2-1.
[3]ANDROULAKI E,BARGER A,BORTNIKOV V,et al.Hy-perledger fabric:a distributed operating system for permissioned blockchains[C]//Proceedings of the Thirteenth EuroSys Conference.2018:1-15.
[4]POON J,DRYJA T.The bitcoin lightning network:Scalable off-chain instant payments[J].2016.
[5]FILIBA J.Ethereum breaks one million transactions in a single day[J].Arch.from Orig,2017,22.
[6]IMTIAZ M A,STAROBINSKI D,TRACHTENBERG A.Em-pirical comparison of block relay protocols[J].IEEE Transactions on Network and Service Management,2022,19(4):3960-3974.
[7]CROMAN K,DECKER C,EYAL I,et al.On Scaling Decentralized Blockchains:(A Position Paper)[C]//International Conference on Financial Cryptography and Data Security.Berlin,Heidelberg:Springer Berlin Heidelberg,2016:106-125.
[8]LERNER S D,CID-FUENTES J Á,LEN J,et al.RSK:A Bitcoin sidechain with stateful smart-contracts[J].Cryptology ePrint Archive,2022.
[9]WANG J,WANG H.Monoxide:Scale out blockchains withasynchronous consensus zones[C]//16th USENIX Symposium on Networked Systems Design and Implementation(NSDI 19).2019:95-112.
[10]LUU L,NARAYANAN V,ZHENG C,et al.A Secure Sharding Protocol For Open Blockchains[C]//the 2016 ACM SIGSAC Conference.ACM,2016.
[11]KOKORIS-KOGIAS E,JOVANOVIC P,GASSER L,et al.Omniledger:A secure,scale-out,decentralized ledger via sharding[C]//2018 IEEE Symposium on Security and Privacy(SP).IEEE,2018:583-598.
[12]ZAMANI M,MOVAHEDI M,RAYKOVA M.Rapidchain:Scaling blockchain via full sharding[C]//Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security.2018:931-948.
[13]HONG Z,GUO S,LI P,et al.Pyramid:A layered shardingblockchain system[C]//IEEE INFOCOM 2021-IEEE Conference on Computer Communications.IEEE,2021:1-10.
[14]HONG Z,GUO S,LI P,et al.Pyramid:A layered shardingblockchain system[C]//IEEE INFOCOM 2021-IEEE Conference on Computer Communications.IEEE,2021:1-10.
[15]Xi’an Shiyou University.A blockchain sharding method based on transaction frequency analysis:CN202210589229.8[P].2022-05-26.
[16]CROMAN K,DECKER C,EYAL I,et al.On Scaling Decentralized Blockchains:(A Position Paper)[C]//Financial Cryptography and Data Security:FC 2016 International Workshops,BITCOIN,VOTING,and WAHC.Berlin:Springer,2016:106-125.
[17]WANG J P,WANG H.Monoxide:Scale out Blockchains withAsynchronous Consensus Zones[C]//NSDI 2019.New York:ACM,2019:95-112.
[18]HONG Z,GUO S,ZHOUE,et al.Gridb:Scaling blockchain database via sharding and off-chain cross-shard mechanism[J].arXiv:2407.03750,2024.
[19]ZHANG Y,PAN S,YU J.TxAllo:Dynamic Transaction Allocation in Sharded Blockchain Systems[J].arXiv:2022[2025-03-18].
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!