Find in Library
Search millions of books, articles, and more
Indexed Open Access Databases
Function-Level Dynamic Monitoring and Analysis System for Smart Contract
oleh: Yi Ding, Chenshuo Wang, Qionghui Zhong, Haisheng Li, Jinjing Tan, Jie Li
Format: | Article |
---|---|
Diterbitkan: | IEEE 2020-01-01 |
Deskripsi
The close integration of blockchain and smart contract technology has become an important foundation for current trusted applications. High-quality, high-efficiency and high-security codes have become basic requirements for smart contract applications because they are not easy to be modified after being deployed on blockchain. This paper proposes a function-level dynamic monitoring and analysis method for smart contract, and implements a prototype system. The method adds a “shadow stack” and related data structures to virtual machine of testing blockchain platform by analyzing the principle of function management with original stack, then monitors the bytecode after code instrumentation, records the function calling relationships as well as the relevant metrics of time, instruction number and gas consumption. The prototype system identifies contract inefficient behaviors using visualization and intelligent analysis methods, then forms a smart contract optimization closed loop through iterative improvement. Finally, the paper verified the high feasibility and applicability of the monitoring and analyzing method as well as prototype system's performance through experiments.