Journal of Cloud Computing: Advances, Systems and Applications (Jun 2020)

Studying gas exceptions in blockchain-based cloud applications

  • Chao Liu,
  • Jianbo Gao,
  • Yue Li,
  • Huihui Wang,
  • Zhong Chen

DOI
https://doi.org/10.1186/s13677-020-00176-9
Journal volume & issue
Vol. 9, no. 1
pp. 1 – 25

Abstract

Read online

Abstract Blockchain-based cloud application (BCP) is an emerging cloud application architecture. By moving trust-critical functions onto blockchain, BCP offers unprecedented function transparency and data integrity. Ethereum is by far the most popular blockchain platform chosen for BCP. In Ethereum, special programs named smart contracts are often used to implement key components for BCP. By design, users can send transactions to smart contracts, which will automatically lead to code execution and state modification. However, unlike regular programs, smart contracts are restricted in execution by gas limit, i.e., a form of runtime resource. If a transaction uses up all available gas, an out of gas exception (OG) will trigger, reverting state until right before that transaction.In this work, we study the out of gas exceptions (or gas exceptions in short) on Ethereum empirically for the very first time. In particular, we collect exception transactions using an instrumented Ethereum client. By investigation, we found gas exceptions stand out in terms of both occurrences and losses. Moreover, we focused on individual contracts and transactions, aiming at discovering and identifying common causing factors triggering these exceptions. At last, we also investigate existing tools in preventing gas exceptions. Our results suggest further research and study in this direction.

Keywords