Solidity智能合约的效率优化特征

T. Brandstätter, Stefan Schulte, Jürgen Cito, M. Borkowski
{"title":"Solidity智能合约的效率优化特征","authors":"T. Brandstätter, Stefan Schulte, Jürgen Cito, M. Borkowski","doi":"10.1109/Blockchain50366.2020.00042","DOIUrl":null,"url":null,"abstract":"On many blockchain platforms, gas fees have to be paid for deploying and executing smart contracts. These fees depend on the size of the contract code as well as the needed computational steps and required storage space of a smart contract. Because of the large amount of gas cost paid each day, there is an inherent motivation to optimize smart contract code in order to reduce these cost.Within this paper, we discuss the application of 25 strategies for code optimization to Solidity smart contracts. A prototype is developed which detects potential optimizations and partially automatically optimizes the code accordingly. The optimization strategies are evaluated based on 3,018 verified open source smart contracts from etherscan.io. We find 471 rule violations in the test data spread across 204 different contract files.","PeriodicalId":109440,"journal":{"name":"2020 IEEE International Conference on Blockchain (Blockchain)","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-11-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"16","resultStr":"{\"title\":\"Characterizing Efficiency Optimizations in Solidity Smart Contracts\",\"authors\":\"T. Brandstätter, Stefan Schulte, Jürgen Cito, M. Borkowski\",\"doi\":\"10.1109/Blockchain50366.2020.00042\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"On many blockchain platforms, gas fees have to be paid for deploying and executing smart contracts. These fees depend on the size of the contract code as well as the needed computational steps and required storage space of a smart contract. Because of the large amount of gas cost paid each day, there is an inherent motivation to optimize smart contract code in order to reduce these cost.Within this paper, we discuss the application of 25 strategies for code optimization to Solidity smart contracts. A prototype is developed which detects potential optimizations and partially automatically optimizes the code accordingly. The optimization strategies are evaluated based on 3,018 verified open source smart contracts from etherscan.io. We find 471 rule violations in the test data spread across 204 different contract files.\",\"PeriodicalId\":109440,\"journal\":{\"name\":\"2020 IEEE International Conference on Blockchain (Blockchain)\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2020-11-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"16\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2020 IEEE International Conference on Blockchain (Blockchain)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/Blockchain50366.2020.00042\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2020 IEEE International Conference on Blockchain (Blockchain)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/Blockchain50366.2020.00042","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 16

摘要

在许多区块链平台上,部署和执行智能合约必须支付天然气费。这些费用取决于合约代码的大小以及智能合约所需的计算步骤和所需的存储空间。由于每天支付大量的天然气成本,因此有一种内在的动机来优化智能合约代码以降低这些成本。在本文中,我们讨论了25种代码优化策略在Solidity智能合约中的应用。开发了一个原型,它可以检测潜在的优化并相应地部分自动地优化代码。优化策略基于来自etherscan.io的3018个经过验证的开源智能合约进行评估。我们在204个不同的合同文件的测试数据中发现了471条规则违规。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Characterizing Efficiency Optimizations in Solidity Smart Contracts
On many blockchain platforms, gas fees have to be paid for deploying and executing smart contracts. These fees depend on the size of the contract code as well as the needed computational steps and required storage space of a smart contract. Because of the large amount of gas cost paid each day, there is an inherent motivation to optimize smart contract code in order to reduce these cost.Within this paper, we discuss the application of 25 strategies for code optimization to Solidity smart contracts. A prototype is developed which detects potential optimizations and partially automatically optimizes the code accordingly. The optimization strategies are evaluated based on 3,018 verified open source smart contracts from etherscan.io. We find 471 rule violations in the test data spread across 204 different contract files.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信