Skip to main content
CenXiv.org
此网站处于试运行阶段,支持我们!
我们衷心感谢所有贡献者的支持。
贡献
赞助
cenxiv logo > cs > arXiv:2501.04483

帮助 | 高级搜索

计算机科学 > 软件工程

arXiv:2501.04483 (cs)
[提交于 2025年1月8日 ]

标题: 以太坊智能合约的最小 gas 限制和使用的 gas 的去神秘化及接近完美的估计

标题: Demystification and Near-perfect Estimation of Minimum Gas Limit and Gas Used for Ethereum Smart Contracts

Authors:Danilo Rafael de Lima Cabral, Pedro Antonino, Augusto Sampaio
摘要: 以太坊区块链有一个\emph{气体系统},它将操作与燃气单位的成本关联起来。 该系统两个核心概念是由交易发起者分配的\emph{gas 限制}和由交易执行的\emph{使用的气体}。 前者是一个预算,在交易执行完成之前不能耗尽;否则,执行会失败。 因此,确定一个确保交易不会因缺乏燃气而中止的\emph{最小气体限制}显得尤为重要。 尽管这一概念在实际中有重要意义,但它尚未得到适当解决。 在文献中,燃气使用量和最小燃气限制被混淆了。 本文提出了一种精确的最小燃气限制概念,以及它如何可能不同于交易使用的燃气;通过以太坊区块链的实际交易进行定量研究也证明了这一点。 另一个重要贡献是对这两个指标提出了相当精确的估计器。 同样,这些概念之间的混淆导致了仅针对交易使用的燃气创建估计器。 我们演示了以太坊区块链状态(区块后)的最小燃气限制$t$可以作为区块$t + \Delta$上交易执行的近乎完美的估算值,其中$\Delta \leq 11$;对于估算燃气使用量也是如此。 这些精确的估算器对帮助用户预测交易的燃气预算和开发人员优化智能合约非常有价值;过高或过低估算燃气使用量和最小燃气限制会导致许多实际问题。 总体而言,本文为区块链开发者和用户提供了关于燃气系统如何运作的重要参考。
摘要: The Ethereum blockchain has a \emph{gas system} that associates operations with a cost in gas units. Two central concepts of this system are the \emph{gas limit} assigned by the issuer of a transaction and the \emph{gas used} by a transaction. The former is a budget that must not be exhausted before the completion of the transaction execution; otherwise, the execution fails. Therefore, it seems rather essential to determine the \emph{minimum gas limit} that ensures the execution of a transaction will not abort due to the lack of gas. Despite its practical relevance, this concept has not been properly addressed. In the literature, gas used and minimum gas limit are conflated. This paper proposes a precise notion of minimum gas limit and how it can differ from gas used by a transaction; this is also demonstrated with a quantitative study on real transactions of the Ethereum blockchain. Another significant contribution is the proposition of a fairly precise estimator for each of the two metrics. Again, the confusion between these concepts has led to the creation of estimators only for the gas used by a transaction. We demonstrate that the minimum gas limit for the state of the Ethereum blockchain (after the block) $t$ can serve as a near-perfect estimation for the execution of the transaction at block $t + \Delta$, where $\Delta \leq 11$; the same holds for estimating gas used. These precise estimators can be very valuable in helping the users predict the gas budget of transactions and developers in optimising their smart contracts; over and underestimating gas used and minimum gas limit can lead to a number of practical issues. Overall, this paper serves as an important reference for blockchain developers and users as to how the gas system really works.
主题: 软件工程 (cs.SE) ; 计算工程、金融与科学 (cs.CE); 分布式、并行与集群计算 (cs.DC); 新兴技术 (cs.ET); 网络与互联网架构 (cs.NI)
引用方式: arXiv:2501.04483 [cs.SE]
  (或者 arXiv:2501.04483v1 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2501.04483
通过 DataCite 发表的 arXiv DOI
期刊参考: J Cloud Comp 14, 29 (2025)
相关 DOI: https://doi.org/10.1186/s13677-025-00751-y
链接到相关资源的 DOI

提交历史

来自: Pedro Antonino [查看电子邮件]
[v1] 星期三, 2025 年 1 月 8 日 13:07:34 UTC (892 KB)
全文链接:

获取论文:

    查看标题为《》的 PDF
  • 查看中文 PDF
  • 查看 PDF
  • HTML(实验性)
  • TeX 源代码
  • 其他格式
许可图标 查看许可
当前浏览上下文:
cs.SE
< 上一篇   |   下一篇 >
新的 | 最近的 | 2025-01
切换浏览方式为:
cs
cs.CE
cs.DC
cs.ET
cs.NI

参考文献与引用

  • NASA ADS
  • 谷歌学术搜索
  • 语义学者
a 导出 BibTeX 引用 加载中...

BibTeX 格式的引用

×
数据由提供:

收藏

BibSonomy logo Reddit logo

文献和引用工具

文献资源探索 (什么是资源探索?)
连接的论文 (什么是连接的论文?)
Litmaps (什么是 Litmaps?)
scite 智能引用 (什么是智能引用?)

与本文相关的代码,数据和媒体

alphaXiv (什么是 alphaXiv?)
CatalyzeX 代码查找器 (什么是 CatalyzeX?)
DagsHub (什么是 DagsHub?)
Gotit.pub (什么是 GotitPub?)
Hugging Face (什么是 Huggingface?)
带有代码的论文 (什么是带有代码的论文?)
ScienceCast (什么是 ScienceCast?)

演示

复制 (什么是复制?)
Hugging Face Spaces (什么是 Spaces?)
TXYZ.AI (什么是 TXYZ.AI?)

推荐器和搜索工具

影响之花 (什么是影响之花?)
核心推荐器 (什么是核心?)
IArxiv 推荐器 (什么是 IArxiv?)
  • 作者
  • 地点
  • 机构
  • 主题

arXivLabs:与社区合作伙伴的实验项目

arXivLabs 是一个框架,允许合作伙伴直接在我们的网站上开发和分享新的 arXiv 特性。

与 arXivLabs 合作的个人和组织都接受了我们的价值观,即开放、社区、卓越和用户数据隐私。arXiv 承诺这些价值观,并且只与遵守这些价值观的合作伙伴合作。

有一个为 arXiv 社区增加价值的项目想法吗? 了解更多关于 arXivLabs 的信息.

这篇论文的哪些作者是支持者? | 禁用 MathJax (什么是 MathJax?)
  • 关于
  • 帮助
  • contact arXivClick here to contact arXiv 联系
  • 订阅 arXiv 邮件列表点击这里订阅 订阅
  • 版权
  • 隐私政策
  • 网络无障碍帮助
  • arXiv 运营状态
    通过...获取状态通知 email 或者 slack

京ICP备2025123034号