典型区块链存储与查询技术综述A Survey of Typical Blockchain Storage and Query Technologies
潘恒;钱海洋;姚中原;刘炜;斯雪明;
摘要(Abstract):
区块链系统可以作为一种新型分布式数据库系统,适用于医疗、政务、教育等众多领域。然而,目前区块链自身存在着节点存储压力大、存取效率低、查询单一化等问题,限制了区块链应用的发展。为探明以上问题的原因以及找到合适的优化方法,选取比特币、以太坊、Hyperledger Fabric、FISCO BCOS四个在数据存储与查询方面极具代表性的区块链系统,对其在数据存储及查询处理机制上进行总结、分析。在此基础上,归纳了现有区块链系统存储、查询方面存在的常见问题,总结了现有区块链存储与查询技术的优化方法,并对未来主要研究问题进行展望。
关键词(KeyWords): 比特币;以太坊;Hyperledger Fabric;FISCO BCOS;数据结构;存储系统;查询处理
基金项目(Foundation): 国家重点研发计划项目(2018YFB1201403)
作者(Authors): 潘恒;钱海洋;姚中原;刘炜;斯雪明;
DOI: 10.13705/j.issn.1671-6841.2022104
参考文献(References):
- [1] 邵奇峰,金澈清,张召,等.区块链技术:架构及进展[J].计算机学报,2018,41(5):969-988.SHAO Q F,JIN C Q,ZHANG Z,et al.Blockchain:architecture and research progress[J].Chinese journal of computers,2018,41(5):969-988.
- [2] XIA Q,SIFAH E B,ASAMOAH K O,et al.MeDShare:trust-less medical data sharing among cloud service providers via blockchain[J].IEEE access,2017,5:14757-14767.
- [3] CHEN G,XU B,LU M L,et al.Exploring blockchain technology and its potential applications for education[J].Smart learning environments,2018,5:1.
- [4] 李中振,高超越,刘敏,等.基于区块链技术的学籍管理系统[J].四川大学学报(自然科学版),2019,56(3):450-456.LI Z Z,GAO C Y,LIU M,et al.Blockchain-based student status management system[J].Journal of Sichuan university (natural science edition),2019,56(3):450-456.
- [5] UNDERWOOD S.Blockchain beyond bitcoin[J].Communications of the acm,2016,59(11):15-17.
- [6] HOU H.The application of blockchain technology in e-government in China[C]//2017 26th International Con-ference on Computer Communication and Networks (ICCCN).Vancouver:IEEE Press,2017:1-4.
- [7] JUN M.Blockchain government-a next form of infrastructure for the twenty-first century[J].Journal of open innovation:technology,market,and complexity,2018,4:7.
- [8] TOYODA K,MATHIOPOULOS P T,SASASE I,et al.A novel blockchain-based product ownership management system (POMS) for anti-counterfeits in the post supply chain[J].IEEE access,2017,5:17465-17477.
- [9] ZHANG X W,YIN Y J.Research on digital copyright management system based on blockchain technology[C]//2019 IEEE 3rd Information Technology,Networking,Electronic and Automation Control Conference.Chengdu:IEEE Press,2019:2093-2097.
- [10] CASADO-VARA R,DE L A PRIETA F,PRIETO J,et al.Blockchain framework for IoT data quality via edge computing[C]//Proceedings of the 1st Workshop on Blockchain-enabled Networked Sensor Systems.Shenzhen:ACM Press,2018:19-24.
- [11] 袁勇,王飞跃.区块链技术发展现状与展望[J].自动化学报,2016,42(4):481-494.YUAN Y,WANG F Y.Blockchain:the state of the art and future trends[J].Acta automatica sinica,2016,42(4):481-494.
- [12] 于戈,聂铁铮,李晓华,等.区块链系统中的分布式数据管理技术:挑战与展望[J].计算机学报,2021,44(1):28-54.YU G,NIE T Z,LI X H,et al.The challenge and prospect of distributed data management techniques in blockchain systems[J].Chinese journal of computers,2021,44(1):28-54.
- [13] 钱卫宁,邵奇峰,朱燕超,等.区块链与可信数据管理:问题与方法[J].软件学报,2018,29(1):150-159.QIAN W N,SHAO Q F,ZHU Y C,et al.Research problems and methods in blockchain and trusted data management[J].Journal of software,2018,29(1):150-159.
- [14] 张志威,王国仁,徐建良,等.区块链的数据管理技术综述[J].软件学报,2020,31(9):2903-2925.ZHANG Z W,WANG G R,XU J L,et al.Survey on data management in blockchain systems[J].Journal of software,2020,31(9):2903-2925.
- [15] PAIK H Y,XU X W,BANDARA H M N D,et al.Analysis of data management in blockchain-based systems:from architecture to governance[J].IEEE access,2019,7:186091-186107.
- [16] VO H T,KUNDU A,MOHANIA M K.Research directions in blockchain data management and analytics[C]//Proceedings of Int conf on extending database technology.Bordeaux:Springer,2018:445-448.
- [17] NAKAMOTO S.Bitcoin:a peer-to-peer electronic cash system[EB/OL].[2021-12-22].http://bitcoin.org/bitcoin.pdf.
- [18] WOOD G.Ethereum:a secure decentralized generalized transaction ledger[J].Ethereum project yellow paper,2014,151(2014):1-32.
- [19] CACHIN C.Architecture of the hyperledger blockchain fabric[C]//Workshop on Distributed Cryptocurrencies and Consensus Ledgers.Chicago:Routledge Press,2016:1-4.
- [20] 李辉忠,李陈希,李昊轩,等.FISCO BCOS技术应用实践[J].信息通信技术与政策,2020(1):52-60.LI H Z,LI C X,LI H X,et al.Anoverview on practice of FISCO BCOS technology and application[J].Information and communications technology and policy,2020(1):52-60.
- [21] LI J R,WOLF T.A one-way proof-of-work protocol to protect controllers in software-defined networks[C]//2016 ACM/IEEE Symposium on Architectures for Networking and Communications Systems.Santa Clara:IEEE Press 2016:123-124.
- [22] SZABO N.The idea of smart contracts[J].Nick Szabo′s papers and concise tutorials,1997,6(1):2016-2056.
- [23] ONGARO D,OUSTERHOUT J.In search of an understandable consensus algorithm[C]//2014 USENIX An-nual Technical Conference.Philadelphia:USENIX,2014:305-319.
- [24] LAMPORT L.Paxos made simple[J].ACM SIGACT news,2001,32(4):51-58.
- [25] LINUX.Hyperledger fabric[EB/OL].(2021-04-24) [2022-01-06].https://www.hyperledger.org/projects/fabric.
- [26] BODON F,RóNYAI L.Trie:an alternative data structure for data mining algorithms[J].Mathematical and computer modelling,2003,38(7/8/9):739-751.
- [27] BONNEAU J.EthIKS:using ethereum to audit a CONIKS key transparency log[C]//International Conference on Financial Cryptography and Data Security.Berlin Heidelberg:Springer,2016:95-105.
- [28] GERVAIS A,CAPKUN S,KARAME G O,et al.On the privacy provisions of Bloom filters in lightweight bitcoin clients[C]//ACM Annual Computer Security Applications Conference.New Orleans:ACM Press,2014:326-335.
- [29] ROCKSDB.A persistent key-value store [EB/OL].(2021-12-17) [2022-01-27].https://rocksdb.org/.
- [30] ANDERSON J C,LEHNARDT J,SLATER N.CouchDB:the definitive guide:time to relax[M].California:O′Reilly Media,2010.
- [31] GERVAIS A,CAPKUN S,KARAME G O,et al.On the privacy provisions of Bloom filters in lightweight bitcoin clients[C]//Proceedings of the 30th Annual Computer Security Applications Conference.New Orleans Louisiana USA.New York:ACM Press,2014:326-335.
- [32] PAGH A,PAGH R,RAO S S.An optimal Bloom filter replacement[C]//Proceedings of the 16th annual ACM-SIAM Symposium on Discrete Algorithms.Philadelphia:Routledge,2005:823-829.
- [33] HONG A L,SUN C P,CHEN M X.A survey of distributed database systems based on blockchain[C]//2020 3rd International Conference on Smart BlockChain (SmartBlock).Zhengzhou:IEEE Press,2020:191-196.
- [34] BLOCKSTREAM CORPORATION INC.Redefine trust[EB/OL].[2021-12-10].https://blockstream.com/.
- [35] BUTERIN V.State tree pruning [EB/OL].(2015-06-26) [2021-12-10].https://blog.ethereum.org.state-tree pruning.
- [36] FISCO BCOS.数据仓库组件[EB/OL].(2021-05-21) [2022-01-22].https://data-doc.readthedocs.io/zh_CN/latest/docs/WeBankBlockchain-Data-Export/outline.html FISCO BCOS.Data warehouse components[EB/OL].(2021-05-21)[2022-01-22].https://data-doc.readthedocs.io/zh_CN/latest/docs/WeBankBlockchain-Data-Export/outl-ine.html.
- [37] 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.San Francisco:IEEE Press,2018:583-598.
- [38] 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.Toronto:ACM Press,2018:931-948.
- [39] JIA D Y,XIN J C,WANG Z Q,et al.ElasticChain:support very large blockchain by reducing data redundancy[M]//Web and Big Data.Cham:Springer International Publishing,2018:440-454.
- [40] RAMAN R K,VARSHNEY L R.Dynamic distributed storage for blockchains[C]//2018 IEEE International Symposium on Information Theory.Vail,Colorado:IEEE Press,2619-2623.
- [41] DINH A,WANG J,WANG S,et al.UStore:a distributed storage with rich semantics[EB/OL].(2017-02-09) [2021-12-26].https://arxiv.org/pdf/1702.02799.pdf.
- [42] WANG S,DINH T T A,LIN Q,et al.ForkBase:an efficient storage engine for blockchain and forkable applications[EB/OL].(2018-02-14) [2021-12-26].http://arxiv.org/pdf/1802.04949.pdf.
- [43] LUU L,NARAYANAN V,ZHENG C,et al.A secure sharding protocol for open blockchains[C]//The 2016 ACM SIGSAC Conference on Computer and Communications Security.Vienna:ACM Press,2016:17-30.
- [44] 梅颖.安全存储医疗记录的区块链方法研究[J].江西师范大学学报(自然科学版),2017,41(5):484-490.MEI Y.The utilizing blockchain-based method of the secure storage of medical records[J].Journal of Jiangxi normal university (natural science edition),2017,41(5):484-490.
- [45] ESPOSITO C,DE SANTIS A,TORTORA G,et al.Blockchain:a panacea for healthcare cloud-based data security and privacy?[J].IEEE cloud computing,2018,5(1):31-37.
- [46] KAUR H,ALAM M A,JAMEEL R,et al.A proposed solution and future direction for blockchain-based heterogeneous medicare data in cloud environment[J].Journal of medical systems,2018,42(8):156.
- [47] HE G B,SU W,GAO S.Chameleon:a scalable and adaptive permissioned blockchain architecture[C]//2018 1st IEEE International Conference on Hot Information-Centric Networking (HotICN).Shenzhen:IEEE Press,2018:87-93.
- [48] 谭海波,周桐,赵赫,等.基于区块链的档案数据保护与共享方法[J].软件学报,2019,30(9):2620-2635.TAN H B,ZHOU T,ZHAO H,et al.Archival data protection and sharing method based on blockchain[J].Journal of software,2019,30(9):2620-2635.
- [49] 范贤丽,范春晓,吴岳辛.基于区块链和IPFS技术实现粮食供应链隐私信息保护[J].应用科学学报,2019,37(2):179-190.FAN X L,FAN C X,WU Y X.Realization of privacy protection of food supply chain based on blockchain and IPFS[J].Journal of applied sciences,2019,37(2):179-190.
- [50] HAO J,SUN Y,LUO H.A safe and efficient storage scheme based on blockchain and IPFs for agricultural products tracking[J].Journal of computers (Taiwan),2018,29(6):158-167.
- [51] SUN J,YAO X M,WANG S P,et al.Blockchain-based secure storage and access scheme for electronic medical records in IPFS[J].IEEE access,2020,8:59389-59401.
- [52] ZHENG Q H,LI Y,CHEN P,et al.An innovative IPFS-based storage model for blockchain[C]//2018 IEEE/WIC/ACM International Conference on Web Intelligence (WI).Santiago:IEEE Press,2018:704-708.
- [53] NORVILL R,FIZ PONTIVEROS B B,STATE R,et al.IPFS for reduction of chain size in ethereum[C]//2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber,Physical and Social Computing (CPSCom) and IEEE Smart Data.Canada:IEEE Press,2018:1121-1128.
- [54] 赖业宁,封科,于同伟,等.基于DHT和区块链技术的电网安全稳定控制终端分布式认证[J].中国电力,2022,55(4):44-53.LAI Y N,FENG K,YU T W,et al.Distributed authentication of power grid safety and stability control terminals based on DHT and blockchain[J].Electric power,2022,55(4):44-53.
- [55] ALI S,WANG G J,WHITE B,et al.A blockchain-based decentralized data storage and access framework for PingER[C]//2018 17th IEEE International Conference on Trust,Security and Privacy In Computing and Communications/12th IEEE International Conference on Big Data Science and Engineering (TrustCom/BigDataSE).New York:IEEE Press,2018:1303-1308.
- [56] 贾大宇,信俊昌,王之琼,等.存储容量可扩展区块链系统的高效查询模型[J].软件学报,2019,30(9):2655-2670.JIA D Y,XIN J C,WANG Z Q,et al.Efficient query model for storage capacity scalable blockchain system[J].Journal of software,2019,30(9):2655-2670.
- [57] 张学旺,冯家琦,殷梓杰,等.基于区块链的数据溯源可信查询方法[J].应用科学学报,2021,39(1):42-54.ZHANG X W,FENG J Q,YIN Z J,et al.Trusted query method for data provenance based on blockchain[J].Journal of applied sciences,2021,39(1):42-54.
- [58] XU C,ZHANG C,XU J L.vChain:enabling verifiable Boolean range queries over blockchain databases[C]//Proceedings of the 2019 International Conference on Management of Data.Amsterdam Netherlands.New York:ACM Press,2019:45-56.
- [59] 郑浩瀚,申德荣,聂铁铮,等.面向混合索引的区块链系统的可查询性优化[J].计算机科学,2020,47(10):301-308.ZHENG H H,SHEN D R,NIE T Z,et al.Queryability optimization of blockchain system for hybrid index[J].Computer science,2020,47(10):301-308.
- [60] 蔡维德,郁莲,王荣,等.基于区块链的应用系统开发方法研究[J].软件学报,2017,28(6):1474-1487.TSAI W T,YU L,WANG R,et al.Blockchain application development techniques[J].Journal of software,2017,28(6):1474-1487.
- [61] 尤瑶,孔兰菊,肖宗水,等.一种支持区块链交易溯源的混合索引机制[J].计算机集成制造系统,2019,25(4):978-984.YOU Y,KONG L J,XIAO Z S,et al.Hybrid indexing scheme supporting blockchain transaction tracing[J].Computer integrated manufacturing systems,2019,25(4):978-984.
- [62] XING X G,CHEN Y L,LI T,et al.A blockchain index structure based on subchain query[J].Journal of cloud computing,2021,10:52.
- [63] YANG L,KAI Z,YING Y,et al.EtherQL:a query layer for blockchain system[C]//International Conference on Database Systems for Advanced Applications.Shenzhen:Routledge Press,2017:58-95.
- [64] 余涛,牛保宁,樊星.FabricSQL:区块链数据的关系查询[J].计算机工程与设计,2020,41(10):2988-2995.YU T,NIU B N,FAN X.FabricSQL:Relational query of blockchain data[J].Computer engineering and design,2020,41(10):2988-2995.
- [65] MCCONAGHY T,MARQUES R,MüLLER A,et al.BigchainDB:a scalable blockchain database[J].white paper,BigChainDB,2016,53-72.
- [66] 焦通,申德荣,聂铁铮,等.区块链数据库:一种可查询且防篡改的数据库[J].软件学报,2019,30(9):2671-2685.JIAO T,SHEN D R,NIE T Z,et al.BlockchainDB:querable and immutable database[J].Journal of software,2019,30(9):2671-2685.
- [67] BEIJING PEER SAFE TECHNOLOGY.White paper for blockchain database application platform[EB/OL].(2020-05-16)[2022-01-09].http://www.chainsql.net.
- [68] TENCENT.2019 Tencent blockchain white paper[EB/OL].(2019-12-15) [2022-01-10].https://www.zhuanzhi.ai/document/cc48c3620e255e6ec2078e1bdd92d1cf.
- [69] 王群,李馥娟,王振力,等.区块链原理及关键技术[J].计算机科学与探索,2020,14(10):1621-1643.WANG Q,LI F J,WANG Z L,et al.Principle and core technology of blockchain[J].Journal of frontiers of computer science and technology,2020,14(10):1621-1643.
- [70] BENET J.IPFS-content addressed,versioned,p2p file system[EB/OL].(2014-06-14) [2021-12-27].http://arxiv.org/pdf/1407.3564.pdf.
- [71] VORICK D,CHAMPINE L.Sia:simple decentralized storage[EB/OL].[2022-01-10].https://sia.Tech/sia.pdf.
- [72] WILKINSON S,LOWRY J,BOSHEVSKI T.Metadi-sk a blockchain-based decentralized file storage applic-ation[EB/OL].(2014-08-20) [2022-01-10].https://www.s-torj.io/metadisk.pdf.
- [73] 陈贵海,吴帆,李宏兴,等.基于DHT的P2P系统中高可用数据冗余机制[J].计算机学报,2008,31(10):1695-1704.CHEN G H,WU F,LI H X,et al.Redundancy schemes for high availability in DHTs[J].Chinese journal of computers,2008,31(10):1695-1704.
- [74] BAI C.State-of-the-art and future trends of blockchain based on DAG structure[C]//International Workshop on Structured Object-oriented Formal Language and Method,November 16,2018,Gold Coast:Springer,2019:183-196.
- [75] 张长贵,张岩峰,李晓华,等.区块链新技术综述:图型区块链和分区型区块链[J].计算机科学,2020,47(10):282-289.ZHANG C G,ZHANG Y F,LI X H,et al.Survey of new blockchain techniques:DAG based blockchain and sharding based blockchain[J].Computer science,2020,47(10):282-289.
- [76] TONG W,DONG X W,SHEN Y L,et al.A hierarchical sharding protocol for multi-domain IoT blockchains[C]//IEEE International Conference on Communications.Shanghai:IEEE Press,2019:1-6.
- [77] THE ZILLIQA TEAM.The zilliqa project:a secure,scalable blockchain platform[EB/OL].(2017-11-05) [2022-01-10].https://cryptorating.eu/whitepapers/Zilliqa/posi-tionpaper.pdf.