Sort:
Regular Paper Issue
Characterizing and Detecting Gas-Inefficient Patterns in Smart Contracts
Journal of Computer Science and Technology 2022, 37(1): 67-82
Published: 31 January 2022
Abstract Collect

Ethereum blockchain is a new internetware with tens of millions of smart contracts running on it. Different from general programs, smart contracts are decentralized, tamper-resistant and permanently running. Moreover, to avoid resource abuse, Ethereum charges users for deploying and invoking smart contracts according to the size of contract and the operations executed by contracts. It is necessary to optimize smart contracts to save money. However, since developers are not familiar with the operating environment of smart contracts (i.e., Ethereum virtual machine) or do not pay attention to resource consumption during development, there are many optimization opportunities for smart contracts. To fill this gap, this paper defines six gas-inefficient patterns from more than 25000 posts and proposes an optimization approach at the source code level to let users know clearly where the contract is optimized. To evaluate the prevalence and economic benefits of gas-inefficient patterns, this paper conducts an empirical study on more than 160000 real smart contracts. The promising experimental results demonstrate that 52.75% of contracts contain at least one gas-inefficient pattern proposed in this paper. If these patterns are removed from the contract, at least $0.30 can be saved per contract.

Editorial Issue
Preface
Journal of Computer Science and Technology 2020, 35(6): 1231-1233
Published: 30 November 2020
Abstract Collect
Regular Paper Issue
SmartPipe: Towards Interoperability of Industrial Applications via Computational Reflection
Journal of Computer Science and Technology 2020, 35(1): 161-178
Published: 17 January 2020
Abstract Collect

With the advancement of new information technologies, a revolution is being taken place to bring the industry into a new era of intelligent manufacturing. One of the key requirements of intelligent manufacturing is the interoperability of industrial applications. However, it is challenging to realize the interoperability for legacy industrial applications due to 1) the deficient semantic information of data transmitted over heterogeneous communication protocols, 2) the difficulty to understand the complex process of business logic with no source code, and 3) the high cost and potential risk of reengineering the applications. To address the issues, in this paper, we propose an approach named SmartPipe to exposing existing functionalities of an industrial application as APIs without source code while simultaneously allowing the application to remain unchanged. We design a behavioral runtime model (BRM) as the self-representation of the industrial applications, based on which a computational reflection framework is designed to flexibly construct the model and generate APIs that encapsulate specific functionalities. We validate SmartPipe on a real industrial application that controls the spin-draw winding machine. Results show that our approach is effective and more suitable for industrial scenes compared with traditional approaches.

Total 3