Don't run on fumes-Parametric gas bounds for smart contracts
【Author】 Albert, Elvira; Correas, Jesus; Gordillo, Pablo; Roman-Diez, Guillermo; Rubio, Albert
【Source】JOURNAL OF SYSTEMS AND SOFTWARE
【影响因子】3.514
【Abstract】Gas is a measurement unit of the computational effort that it will take to execute every single replicated operation that takes part in the Ethereum blockchain platform. If a transaction exceeds the amount of gas allotted by the user (known as gas limit), an out-of-gas exception is raised and its execution is interrupted. One of the main open problems in the analysis of Ethereum smart contracts is the inference of sound bounds on their gas consumption. We present, to the best of our knowledge, the first static analysis that is able to infer sound parametric (i.e., non-constant) gas bounds for smart contracts. The inferred bounds can be parametric on the sizes of the input parameters for the functions, but also they can be parametric on the contract state, or blockchain data. Our gas analysis is developed at EVM bytecode level, in which Ethereum gas model is defined. Our analysis is implemented in a tool named Gastap, Gas-Aware Smart contracT Analysis Platform, which takes as input a smart contract and automatically infers sound gas upper-bounds for its public functions. Gastap has been applied over 318,093 functions fetched from the Ethereum blockchain, and succeeded to obtain gas bounds for 90.24% of them. (C) 2021 Elsevier Inc. All rights reserved.
【Keywords】Smart contracts; Resource analysis; Static analysis; Decompilation
【发表时间】2021 JUN
【收录时间】2022-01-02
【文献类型】
【主题类别】
--
评论