当前位置:网站首页>Arbitrum:二维费用
Arbitrum:二维费用
2022-07-05 00:49:00 【chinadefi】
Arbitrum:二维费用
在上周的Arbitrum Odyssey期间,Arbitrum One的流量达到了创纪录的水平。一些眼光敏锐的用户发现了一个奇怪的现象:随着L2中的gas价格上涨,给定交易使用的L2中的gas数量实际上会减少。
事实证明,这是系统的工作原理,但对于外行来说,可能看起来有点混乱。
二维费用
在经济设计的系统(如Arbitrum)中,我们实际上是同时为两种东西付费:L1原生资源和L2原生资源。Arbitrum One是一个Rollup,我们支付的L1资源本质上只是以太坊调用数据;也就是说,我们支付交易原始数据的大小乘以 L2考虑的 L1 调用数据价格。我们需要支付的L2资源是交易在Arbitrum的通用VM中进行的任何计算——执行、写入存储等等。该值是L2的gas价格乘以ArbGas(Arbitrum的基本计算单位)的数量。交易成功所需要支付的L2总费用是这两个部分的总和。
在一维的世界里
棘手的是,尽管像Arbitrum这样的L2的费用本质上是二维的,但目前的以太坊生态系统主要是为L1建立的,其费用可以表示为一维。这意味着当前的基础设施——钱包、开发者库等——假定交易格式为单个 gas 单位和单个 gas 价格的乘积;那么当在Arbitrum上进行交易时,我们不得不把L1和L2维度都塞进这种限制性的格式中。那么我们该怎么做呢?
我们是如何做到的?
总结一下,我们的限制是,总费用——必须包括L1和L2成本——需要用两个值的乘积来表示,我们称之为“类似gas价格的东西”§和“类似gas限制的东西”(G)。
我们为P使用的值(由 Arbitrum 的估计 gas 价格 RPC 返回),事实上,只是L2的gas价格(估计的 gas RPC 增加了一个小百分比的增加缓冲;任何超出的部分都会得到退款)。G表示L1维度;调用 Arbitrum的估计gas价格RPC给出了一个值,表示用于L2计算的ArbGas加上一个额外的缓冲区(B),这样P*G最终足以覆盖全部交易成本。换句话说,我们增加了“gas limit”之类的领域,使在给定的gas价格下支付的总金额足以涵盖L1和L2维度的费用。
通过一点代数运算,我们发现这个缓冲区B必须等于(L1 calldata cost)/ P。
所以总的来说,G解包为:
L2 gas used + ( L1 calldata price * L1 calldata size) / (L2 gas price)
…其中的 “L2 gas price” 分母说明了为什么所有其他值都相等,L2的gas价格的增加实际上减少了G的值。
迈向二维收费标准
我们目前被困在生态系统现阶段支持的一维费用基础设施中,但理想情况是,多维费用标准被商定并广泛采用。这里有几个建议:https://ethresear.ch/t/multidimensional-eip-1559/11651
Source:https://ethresear.ch/t/multidimensional-eip-1559/11651
关于
ChinaDeFi - ChinaDeFi.com 是一个研究驱动的DeFi创新组织,同时我们也是区块链开发团队。每天从全球超过500个优质信息源的近900篇内容中,寻找思考更具深度、梳理更为系统的内容,以最快的速度同步到中国市场提供决策辅助材料。
Layer 2道友 - 欢迎对Layer 2感兴趣的区块链技术爱好者、研究分析人与Gavin(微信: chinadefi)联系,共同探讨Layer 2带来的落地机遇。敬请关注我们的微信公众号 “去中心化金融社区”。
边栏推荐
- Multilingual Wikipedia website source code development part II
- 有哪些收益稳定的理财产品,这两个都不错
- Applet live + e-commerce, if you want to be a new retail e-commerce, use it!
- Life is changeable, and the large intestine covers the small intestine. This time, I can really go home to see my daughter-in-law...
- There is a new Post-00 exam king in the testing department. I really can't do it in my old age. I have
- URLs and URIs
- Verilog tutorial (11) initial block in Verilog
- Detailed explanation of openharmony resource management
- Skills in analyzing the trend chart of London Silver
- He worked as a foreign lead and paid off all the housing loans in a year
猜你喜欢
Consolidated expression C case simple variable operation
兩個數相互替換
Reasons and solutions of redis cache penetration and avalanche
创新引领方向 华为智慧生活全场景新品齐发
Complete knapsack problem (template)
大专学历,33岁宝妈又怎样?我照样销售转测试,月入13k+
4. Scala writes HelloWorld in idea, in-depth analysis of accompanying objects, and association of source packages
Parameter passing mechanism of member methods
2022.07.03 (lc_6111_counts the number of ways to place houses)
Inventory of more than 17 typical security incidents in January 2022
随机推荐
Detailed explanation of openharmony resource management
POAP:NFT的采用入口?
What if the programmer's SQL data script coding ability is weak and Bi can't do it?
Two numbers replace each other
Apifox (postman + swagger + mock + JMeter), an artifact of full stack development and efficiency improvement
||Interview questions you will encounter
Getting started with Paxos
分布式BASE理论
Daily practice (18): stack containing min function
P4408 [NOI2003] 逃学的小孩(树的直径)
有哪些收益稳定的理财产品,这两个都不错
What did I pay for it transfer to testing post from confusion to firmness?
[circuit design] optocoupler use and circuit design summary
Acwing164. Accessibility Statistics (topological sorting +bitset)
【selenium自动化】常用注解
Innovation leads the direction. Huawei Smart Life launches new products in the whole scene
GDB common commands
《论文笔记》Multi-UAV Collaborative Monocular SLAM
pycharm专业版下载安装教程
挖财学院开户安全的吗?开户怎么开?