Storage State Analysis and Extraction of Ethereum Blockchain Smart Contracts

Author:

Ayub Maha1ORCID,Saleem Tania1ORCID,Janjua Muhammad1ORCID,Ahmad Talha1ORCID

Affiliation:

1. Information Technology University of Punjab, Lahore, Punjab, Pakistan

Abstract

In migrating and upgrading an Ethereum smart contract, it is necessary to transfer both the code as well as the stored data. Various methods attempt to migrate or upgrade a smart contract, but they are mostly manual, error-prone, and applicable only before deployment. Further, they have challenges in extracting the storage state of complex mapping data structures along with their keys. In this work, we present Smartmuv as an automatic source-code-based static analysis tool to analyze and extract the state from the storage-trie of smart contracts. Based on the abstract syntax tree and the control flow graphs of the Solidity source code, the tool analyzes each state variable including mapping types along the inheritance hierarchy. It also provides the upgrade algorithm that initializes the extracted state in the constructor of new smart contract. Smartmuv safely approximates the origin of the keys used in the mapping to extract values and has been able to extract the mapping state of 23,673 smart contracts with 95.7% overall precision. Moreover, we also validate the Smartmuv’s extracted state with the third-party tool Etherscan.

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Reference44 articles.

1. Bernard Marr. 2018. Blockchain: A Very Short History Of Ethereum Everyone Should Read. Retrieved October 10 2020 from https://www.forbes.com/sites/bernardmarr/2018/02/02/blockchain-a-very-short-history-of-ethereum-everyone-should-read/.

2. OpenZepplin. 2017–2020. Upgrades Plugins. Retrieved September 9 2020 from https://docs.openzeppelin.com/upgrades-plugins/1.x/.

3. Steve Marx. 2018. Understanding Ethereum Smart Contract Storage. Retrieved September 9 2020 from https://programtheblockchain.com/posts/2018/03/09/understanding-ethereum-smart-contract-storage/.

4. Solidity Technical Documentation. 2016–2020. Layout of State Variables in Storage. Retrieved September 9 2020 from https://solidity.readthedocs.io/en/v0.4.24/miscellaneous.html.

Cited by 5 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Nurgle: Exacerbating Resource Consumption in Blockchain State Storage via MPT Manipulation;2024 IEEE Symposium on Security and Privacy (SP);2024-05-19

2. Sound analysis and migration of data from Ethereum smart contracts;Automated Software Engineering;2024-02-29

3. Secure Proof Verification Blockchain Patterns;Lecture Notes in Business Information Processing;2024

4. Early Design Mechanism for Upgrading Smart Contract Business Processes;Lecture Notes on Data Engineering and Communications Technologies;2024

5. Smart contract-based integrity audit method for IoT;Information Sciences;2023-11

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3