ErlangShen:Efficient Transaction Execution Mechanism for Graphical Blockchain Based on Pipeline with Low Access Cost
Directed Acyclic Graph(DAG)-based blockchain can significantly improve system performance and have become a research topic in both academia and industry.Compared with the traditional chain-based blockchains with serialization,DAG-based blockchains can process multiple blocks concurrently to package significant transactions into the chain.With the surge in transaction throughput,DAG-based blockchain faces the issue of low transaction execution efficiency,i.e.,the demand for state data access for massive transaction execution increases dramatically,resulting in high Input/Output(I/O)overhead.Enabling low I/O state access mainly encounters two new challenges.On the one hand,if DAG-based blockchain directly adopts the traditional state prefetch mechanism,it will introduce a large number of stale reads due to inconsistent execution logic.On the other hand,state access for different accounts causes duplicate I/O overhead in the upper nodes of the Merkle tree.To this end,an efficient transaction execution mechanism based on pipelining—ErlangShen is designed,including the epoch granularity state prefetch mechanism and Merkle high-level path buffer mechanism to reduce the number of stale reads and duplicate I/O overhead,respectively.Specifically,ErlangShen leverages the complicated logic and severe conflicts of transactions accessing hotspot states to parallelize the execution of hotspot transactions and the prefetch of states accessed by cold transactions,to avoid the implication of the state prefetching on the transaction execution.Furthermore,the customized concurrency control methods is designed according to the data access pattern of hotspot and cold states to further improve the system throughput.Experimental results show that ErlangShen can reduce the number of stale reads by about 90% and improve transaction processing performance by 3~4 times compared to Nezha,the state-of-the-art DAG-based blockchain transaction processing solution.