An Empirical Study of Solidity Language Features

被引:5
作者
Wang, Ziyan [1 ]
Chen, Xiangping [2 ]
Zhou, Xiaocong [1 ]
Huang, Yuan [3 ]
Zheng, Zibin [1 ]
Wu, Jiajing [1 ]
机构
[1] Sun Yat Sen Univ, Sch Comp Sci & Engn, Guangzhou, Peoples R China
[2] Sun Yat Sen Univ, Sch Commun & Design, Guangdong Key Lab Big Data Anal & Simulat Publ Op, Guangzhou, Peoples R China
[3] Sun Yat Sen Univ, Sch Software Engn, Zhuhai, Peoples R China
来源
2021 21ST INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY COMPANION (QRS-C 2021) | 2021年
基金
中国国家自然科学基金; 国家重点研发计划;
关键词
Solidity; programming language; feature; empirical study; smart contract; Ethereum; CHALLENGES;
D O I
10.1109/QRS-C55045.2021.00105
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Solidity, like other programming languages, is evolving with many new features being introduced and deprecated features being removed. However, not every feature benefits developers and sometimes it may do more harm than good. In the hope of knowing the actual use of language features and helping improving them, we summarize 41 common features, discuss their pros and cons, and conduct an empirical study. We design an extensible feature analysis tool to analyze their distribution in 172,645 real-world smart contracts. We further analyze the reason why some features are popular. We invite readers for a case study to understand the usage patterns and how seemingly benign features produce subtle bugs. It turns out that some features like high-level function invocations, visibility, events, and assertions are popular while developers cares little about some other features like function modifier overloading. After summarizing our findings, we give suggestions to different people in Solidity community.
引用
收藏
页码:698 / 707
页数:10
相关论文
共 19 条
  • [1] Abelson HaroldGerald Jay Sussman Julie Sussman., 1984, STRUCTURE INTERPRETA
  • [2] A Survey of Attacks on Ethereum Smart Contracts (SoK)
    Atzei, Nicola
    Bartoletti, Massimo
    Cimoli, Tiziana
    [J]. PRINCIPLES OF SECURITY AND TRUST (POST 2017), 2017, 10204 : 164 - 186
  • [3] ON UNDERSTANDING TYPES, DATA ABSTRACTION, AND POLYMORPHISM.
    Cardelli, Luca
    Wegner, Peter
    [J]. Computing surveys, 1985, 17 (04): : 471 - 522
  • [4] Coblenz M., 2020, PROC ACM PROGRAM LAN, V4
  • [5] De Win B., 2003, IMPORTANCE SEPARATIO
  • [6] Graham R.L., 1994, Concrete Mathematics: a Foundation for Computer Science, V2
  • [7] Grech N., 2018, P ACM PROGRAM LANG, V2, P1, DOI DOI 10.1145/3276486
  • [8] Harz D., 2018, Towards safer smart contracts: A survey of languages and verification methods
  • [9] Software-Defined Infrastructure for Decentralized Data Lifecycle Governance: Principled Design and Open Challenges
    Huang, Gang
    Luo, Chaoran
    Wu, Kaidong
    Ma, Yun
    Zhang, Ying
    Liu, Xuanzhe
    [J]. 2019 39TH IEEE INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS (ICDCS 2019), 2019, : 1674 - 1683
  • [10] Making Smart Contracts Smarter
    Luu, Loi
    Chu, Duc-Hiep
    Olickel, Hrishi
    Saxena, Prateek
    Hobor, Aquinas
    [J]. CCS'16: PROCEEDINGS OF THE 2016 ACM SIGSAC CONFERENCE ON COMPUTER AND COMMUNICATIONS SECURITY, 2016, : 254 - 269