当前位置: X-MOL 学术J. Syst. Softw. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Don’t run on fumes—Parametric gas bounds for smart contracts
Journal of Systems and Software ( IF 3.7 ) Pub Date : 2021-02-26 , DOI: 10.1016/j.jss.2021.110923
Elvira Albert , Jesús Correas , Pablo Gordillo , Guillermo Román-Díez , Albert Rubio

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.



中文翻译:

不要冒烟-智能合约的参数气体界限

Gas是执行参与以太坊区块链平台的每个复制操作所需的计算工作量的度量单位。如果交易超出用户分配的天然气量(称为天然气限额),则会引发天然气不足异常并中断其执行。以太坊智能合约分析中的主要开放问题之一是合理限制其天然气消费量。

据我们所知,我们提出了第一个静态分析,该分析能够推断出智能合约的合理参数(即非恒定)气体界限。推断的边界可以在函数的输入参数的大小上参数化,但也可以在合同状态或区块链数据上参数化。我们的气体分析是在EVM字节码级别开发的,其中定义了以太坊气体模型。

我们的分析是在一个名为工具实现Gastap,天然气感知智能合同分析平台,这需要输入一个聪明的合同,并自动推断气上界为它的公共职能。Gastap已应用于从以太坊区块链中获取的超过318,093个函数,并成功获得其中的90.24%的气体边界。

更新日期:2021-03-04
down
wechat
bug