Adaptive Parallel Scheduling Scheme for Smart Contract

Wenjin Yang,Meng Ao,Jing Sun,Guoan Wang,Yongxuan Li,Chunhai Li,Zhuguang Shao
DOI: https://doi.org/10.3390/math12091347
IF: 2.4
2024-04-30
Mathematics
Abstract:With the increasing demand for decentralized systems and the widespread usage of blockchain, low throughput and high latency have become the biggest stumbling blocks in the development of blockchain systems. This problem seriously hinders the expansion of blockchain and its application in production. Most existing smart contract scheduling solutions use static feature analysis to prevent contract conflicts during parallel execution. However, the conflicts between transactions are complex; static feature analysis is not accurate enough. In this paper, we first build the dependency between smart contracts by analyzing the features. After numerous experiments, we propose a conflict model to adjust the relationship between threads and conflict to achieve high throughput and low latency. Based on these works, we propose adaptive parallel scheduling for smart contracts on the blockchain. Our adaptive parallel scheduling can distinguish conflicts between smart contracts and dynamically adjust the execution strategy of smart contracts based on the conflict factors we define. We implement our scheme on ChainMaker, one of the most popular open-source permissioned blockchains, and build experiments to verify our solution. Regarding latency, our solution demonstrates remarkable efficiency compared with the fully parallel scheme, particularly in high-conflict transaction scenarios, where our solution achieves latency levels just one-twentieth of the fully parallel scheme. Regarding throughput, our solution significantly outperforms the fully parallel scheme, achieving 30 times higher throughput in high-conflict transaction scenarios. These results highlight the superior performance and effectiveness of our solution in addressing latency and throughput challenges, particularly in environments with high transaction conflicts.
mathematics
What problem does this paper attempt to address?
### Problems the Paper Attempts to Solve The paper primarily addresses the issues of low throughput and high latency during the execution of smart contracts in blockchain systems. Specifically: 1. **Smart Contract Conflict Handling**: During the parallel execution of smart contracts, conflicts caused by cross-contract calls require re-execution of conflicting transactions, which can reduce overall efficiency and even result in worse performance than serial execution. How to resolve these conflicts in cross-contract calls is a key focus of the research. 2. **Dynamic Scheduling Strategy**: Static analysis methods struggle to handle dynamic cross-contract calls because contract access patterns are unpredictable. Therefore, a method for dynamically adjusting execution strategies based on conflict factors is proposed. 3. **Efficient Implementation**: When implementing parallel scheduling, especially on permissioned blockchains like ChainMaker, optimizing data structures is crucial for improving both space and time efficiency. How to better implement this technology in engineering practice is also part of the research. Through the above research, the paper proposes an adaptive parallel scheduling scheme to solve these issues and validates its effectiveness through practical experiments. Specifically, the scheme can dynamically adjust execution strategies based on conflicts encountered during the actual execution process, thereby significantly improving throughput and reducing latency.