Gas consumption analysis of Ethereum blockchain transactions

被引:11
|
作者
Khan, Muhammad Milhan Afzal [1 ]
Sarwar, Hafiz Muhammad Azeem [1 ]
Awais, Muhammad [1 ]
机构
[1] Univ Engn & Technol, Dept Comp Sci, Lahore 54000, Pakistan
来源
关键词
blockchain; Ethereum; Ethereum blockchain; gas analysis; gas consumption; gas mechanism; opcodes; smart contracts; solidity;
D O I
10.1002/cpe.6679
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In Ethereum blockchain, whenever a transaction of smart contract is executed, transaction fee is charged in terms of Ethers. To calculate the transaction fee, a computational unit, gas is introduced in smart contracts. Gas consumption is calculated against the smart contract source code execution. The transaction initiator sets the gas price against per unit of gas and the total gas limit. If the gas limit is sufficient, the transaction will be mined otherwise it will be reverted. Smart contracts of Ethereum can be written in any high-level language such as Solidity, Vyper, Python, Java and so forth, but Solidity is massively used for smart contracts creation. In this article, we have examined the 5000 transactions of Solidity based smart contracts from Etherscan and performed statistical analysis on opcodes and source code parameters used in these transactions to identify gas costly patterns. Our statistical results (correlation and regression) analyze the relationship of Solidity parameters and opcodes with the gas consumption. Factors causing an increase or decrease in the gas consumption of smart contracts are highlighted in this article. The regression analysis showed that 87.8% of the variability in the response variable (gas consumption) is due to the parameters used in this analysis. Our results will help the smart contract developers to write the gas optimized smart contracts. The results can be beneficial for end users as they will have to pay gas price for less number of gas units.
引用
收藏
页数:19
相关论文
共 50 条
  • [1] Performance Analysis of Ethereum Transactions in Private Blockchain
    Rouhani, Sara
    Deters, Ralph
    [J]. PROCEEDINGS OF 2017 8TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING AND SERVICE SCIENCE (ICSESS 2017), 2017, : 70 - 74
  • [2] Instant payment and latent transactions on the Ethereum Blockchain
    Popa, Alin Bogdan
    Stan, Ioan Mihail
    Rughinis, Razvan
    [J]. 2018 17TH ROEDUNET IEEE INTERNATIONAL CONFERENCE: NETWORKING IN EDUCATION AND RESEARCH (ROEDUNET), 2018,
  • [3] Transactions Process in Advanced Applications on Ethereum Blockchain Network
    Goyal, Sarthak
    Sanjith, K.
    Sisodia, Ambali
    Suhaas, N. M.
    Akram, Syed
    [J]. 2020 5TH IEEE INTERNATIONAL CONFERENCE ON RECENT TRENDS ON ELECTRONICS, INFORMATION, COMMUNICATION & TECHNOLOGY (RTEICT-2020), 2020, : 275 - 281
  • [4] Gas Cost Analysis of Fractional NFT on the Ethereum Blockchain
    Choi, Wonseok
    Woo, Jongsoo
    Hong, James Won-Ki
    [J]. 2023 IEEE INTERNATIONAL CONFERENCE ON BLOCKCHAIN AND CRYPTOCURRENCY, ICBC, 2023,
  • [5] Impact of EIP-1559 on Transactions in the Ethereum Blockchain and Its Rollups
    Gontara, Salah
    Boufaied, Amine
    Korbaa, Ouajdi
    [J]. RISKS AND SECURITY OF INTERNET AND SYSTEMS, CRISIS 2022, 2023, 13857 : 114 - 126
  • [6] Blockchain-based security management of IoT infrastructure with Ethereum transactions
    S. K. Tanzir Mehedi
    Abdullah Al Mamun Shamim
    Mohammad Badrul Alam Miah
    [J]. Iran Journal of Computer Science, 2019, 2 (3) : 189 - 195
  • [7] Developing Cost-Effective Blockchain-Powered Applications: A Case Study of the Gas Usage of Smart Contract Transactions in the Ethereum Blockchain Platform
    Zarir, Abdullah A.
    Oliva, Gustavo A.
    Jiang, Zhen M.
    Hassan, Ahmed E.
    [J]. ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2021, 30 (03)
  • [8] What makes Ethereum blockchain transactions be processed fast or slow? An empirical study
    Michael Pacheco
    Gustavo A. Oliva
    Gopi Krishnan Rajbahadur
    Ahmed E. Hassan
    [J]. Empirical Software Engineering, 2023, 28
  • [9] What makes Ethereum blockchain transactions be processed fast or slow? An empirical study
    Pacheco, Michael
    Oliva, Gustavo A.
    Rajbahadur, Gopi Krishnan
    Hassan, Ahmed E.
    [J]. EMPIRICAL SOFTWARE ENGINEERING, 2023, 28 (02)
  • [10] An analysis of the Oracles used in Ethereum's blockchain
    Pierro, Giuseppe Antonio
    Mahugnon, Honore
    [J]. 2023 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING, SANER, 2023, : 878 - 885