Studying differentiated code to support smart contract update
【Author】 Chen, Xiangping; Liao, Peiyong; Kong, Queping; Huang, Yuan; Zhou, Xiaocong
【Source】EMPIRICAL SOFTWARE ENGINEERING
【影响因子】3.762
【Abstract】Smart contracts have received a lot of attention. A smart contract is a program that runs on a blockchain. Some recent studies reveal that most of the smart contracts on the Ethereum blockchain are highly similar. An inexperienced smart contract developer can refer to some existing smart contracts that is similar to their own contracts to help their development by applying the differentiated code from the existing similar contracts. How to identify similar contracts and extract differentiated code to recommend to the developers as guidance is what we aim for in this work. Differentiated code is defined as the source code excluding the repeated part in two similar smart contracts, which usually illustrates how a software feature is implemented or a programming issue is solved. Thus, differentiated code might be used to guide the update of a smart contract. In this paper, we propose a differentiated code recommendation approach, SmartDiffrec, for supporting smart contract update. Specifically, we apply syntax and semantic similarities to discover the similar contracts for a given target contract, and then recommend the differentiated code to the target contract. Moreover, we investigate three research questions to analyze the effectiveness of our approach from the whole to the specific. The results show that the differentiated codes extracted found by our approach can effectively support smart contract update.
【Keywords】Smart contract; Differentiated code; Contract update; Evolution analysis; Code retrieval
【发表时间】2023 SEP
【收录时间】2023-10-13
【文献类型】实验仿真
【主题类别】
区块链技术-核心技术-智能合约
评论