|
1 | 1 | --- |
2 | | -description: Raw data tables are the basic building blocks of our database. |
| 2 | +description: 原始数据表是我们数据库的基本构建块。 |
3 | 3 | --- |
4 | 4 |
|
5 | 5 | # Arbitrum |
6 | 6 |
|
7 | | -Arbitrum is an optimistic rollup that settles it's transactions on Ethereum Mainnet. You can read all about Arbitrum's approach to scaling and building a rollup [in their docs](https://developer.offchainlabs.com/docs/inside\_arbitrum). |
| 7 | +Arbitrum是一个通过乐观的汇总(rollup)来结清其在以太坊主网上的交易的L2区块链。您可以在他们的[文档](https://developer.offchainlabs.com/docs/inside\_arbitrum)中阅读有关Arbitrum扩展和构建汇总的方法的所有信息。 |
8 | 8 |
|
9 | | -Arbitrum's execution environment differs from the Mainnet EVM implementation in it's calculation of gas costs. Since Arbitrum is an optimistic rollup that publishes it's transaction on Ethereum Mainnet, the gas calculations have to account for additional factors. |
| 9 | +Arbitrum的执行环境与主网EVM实施的不同之处在于它计算燃料成本的方式。由于Arbitrum是在以太坊主网上发布其交易的乐观汇总方案,因此其燃料计算必须考虑其他的因素。 |
10 | 10 |
|
11 | | -## Gas costs for L1 |
| 11 | +## L1的燃料成本 |
12 | 12 |
|
13 | | -Transactions on Arbitrum have to pay for both L1 and L2 resources. The L1 resources are essentially just Ethereum calldata; i.e., you pay the size in raw data of your transaction times Arbitrum's view of the L1 calldata price. This already factors in L1's fluctuating gas prices. The L2 resources in a given transaction are the natively emerging costs for computation and storage that you invoke with your transaction, similar to any other EVM. |
| 13 | +Arbitrum上的交易必须同时为L1和L2资源支付燃料。L1资源本质上只是以太坊调用数据;即,您支付交易原始数据的大小乘以Arbitrum对L1调用数据的价格定价。这已经将L1的燃料价格波动考虑在内。给定交易中的L2资源是您在交易中调用的计算和存储的本地新增成本,类似于任何其他EVM链。 |
14 | 14 |
|
15 | | -Since the "normal" implementation of the Ethereum Virtual Machine does not possess multiple ways to pay gas fees, Arbitrum solved this by including the cost for L1 resources inside of the computational gas units used (`gas_limit` or `gas_used`). Whenever somebody tries to transact on Arbitrum, the RPC endpoint that is called for estimating a sufficient "gas limit" returns an amount of computational gas units that exceeds the standard costs that would incur in a "normal" EVM. |
| 15 | +由于以太坊虚拟机的“正常”实现不具备多种支付燃料费用的方式,Arbitrum通过将L1资源的成本包含在使用的计算燃料单位(`gas_limit`或`gas_used`)中解决了这个问题。每当有人尝试在Arbitrum上进行交易时,RPC端点被调用以估算足够的“燃料限制”,其返回的计算燃料单位数量超过了“正常”EVM中会产生的标准成本。 |
16 | 16 |
|
17 | 17 | ``` |
18 | | -P = "Gas Price" on Arbitrum = Arbitrum's native gas price |
19 | | -G = traditionally "Gas Limit" = L2 gas used + L1 resources used |
| 18 | +P = Arbitrum上的“燃料价格” = Arbitrum的本地燃料价格 |
| 19 | +G = 传统上的“燃料限制” = L2消耗的燃料 + L1资源消耗的燃料 |
20 | 20 | ``` |
21 | 21 |
|
22 | | -Arbitrum's transactions costs are calculated with the following formula: |
| 22 | +Arbitrum的交易成本使用以下公式计算: |
23 | 23 |
|
24 | 24 | $$ |
25 | | -P*G = Costs |
| 25 | +P*G = 交易成本(Costs) |
26 | 26 | $$ |
27 | 27 |
|
28 | | -G consists of: |
| 28 | +G包括: |
29 | 29 |
|
30 | 30 | $$ |
31 | | -(L2 \ gas \ used) +\frac{(L1 \ gas \ price * L1\ calldata)}{P} = G |
| 31 | +(L2消耗的燃料) +\frac{(L1的燃料价格 * L1调用数据)}{P} = G |
32 | 32 | $$ |
33 | 33 |
|
34 | | -The complete calculation therefore consists of: |
| 34 | +因此,完整的计算包括: |
35 | 35 |
|
36 | 36 | $$ |
37 | | -P * ((L2 \ gas \ used) +\frac{(L1 \ gas \ price * L1\ calldata)}{P}) = Costs |
| 37 | +P * ((L2消耗的燃料) +\frac{(L1的燃料价格 * L1调用数据)}{P}) = 交易成本 |
38 | 38 | $$ |
39 | 39 |
|
40 | | -Looking at this formula, we can now understand that an increasing gas price on Arbitrum leads to cheaper transactions. This is due to the fact that Arbitrum will always publish it's transactions on Ethereum mainnet, whether there is one transaction that needs to be published on mainnet or a thousand. Fees on Arbitrum will only rise if there is an increased demand for blockspace. The increased demand for blockspace in return means that more abritrum transactions get published on mainnet in one "batch publish" transaction, significantly reducing the costs for individual transactions. |
| 40 | +通过这个公式我们可以理解Arbitrum上的燃料价格上涨会导致交易更便宜。这是因为无论是需要发布一个还是一千个交易,Arbitrum将始终在以太坊主网上发布其交易。只有在对区块空间的需求增加时,Arbitrum的费用才会上涨。作为回报,对区块空间的需求增加意味着更多Abritrum交易在一次“批量发布”交易中被发布到主网上,因而显著降低了单个交易的成本。 |
41 | 41 |
|
42 | | -We are reflecting the L1 resources used for Arbitrum Transactions in the column `gas_used_for_l1`. |
| 42 | +我们在`gas_used_for_l1`列中反映了用于Arbitrum交易的L1资源的燃料消耗。 |
43 | 43 |
|
44 | | -### Gas Price Mechanism |
| 44 | +### 燃料价格机制 |
45 | 45 |
|
46 | | -Arbitrum does not follow the EIP1559 standard and instead has its own mechanism for determining gas costs. A transaction will have a `gas_price`, which is treated as the maximum price that the user is willing to pay for this transaction. The actual `gas_price` that is paid by the user will be determined by an [algorithm](https://developer.offchainlabs.com/docs/inside\_arbitrum#price-for-arbgas) within the Arbitrum EVM. This actual `gas_price` that the user pays is reflected in the columnn `effective_gas_price`. |
| 46 | +Arbitrum不遵循EIP1559标准,而是有自己的机制来确定燃料成本。一笔交易会有一个`gas_price`,它被视为用户愿意为此交易支付的最高价格。用户支付的实际`gas_price`将由Arbitrum EVM中的 [算法](https://developer.offchainlabs.com/docs/inside\_arbitrum#price-for-arbgas)确定。用户支付的实际`gas_price`反映在`effective_gas_price`列中。 |
47 | 47 |
|
48 | | -### Calculation of Gas Usage |
| 48 | +### 燃料使用量计算 |
49 | 49 |
|
50 | | -Arbitrum does not follow the standard EVM standards and rules to calculate how much gas is being used by a transaction. That is including and excluding the L1 Resource costs, the costs within Arbitrum's EVM are just calculated differently all together. You can look at the specifications of Arbitrum's AVM opcode costs [in their documentation](https://developer.offchainlabs.com/docs/avm\_specification#instructions). |
| 50 | +Arbitrum不遵循标准的EVM规范和规则来计算交易使用了多少燃料。Arbitrum的EVM中的成本以不同的方式计算到一起,其中涉及包括和排除相应的L1资源成本。您可以[在他们的文档中](https://developer.offchainlabs.com/docs/avm\_specification#instructions)查看Arbitrum的AVM操作码成本规范。 |
51 | 51 |
|
52 | | -**You can't compare Arbitrum gas costs to other EVM chains gas costs!** |
| 52 | +**您不能将Arbitrum的燃料成本与其他EVM链的燃料成本进行比较!** |
53 | 53 |
|
54 | | -### TL;DR |
| 54 | +### 简而言之 |
55 | 55 |
|
56 | | -Use `effective_gas_price` for calculating gas costs on Arbitrum. |
| 56 | +使用`effective_gas_price`计算Arbitrum上的燃料成本。 |
57 | 57 |
|
58 | | -To look at only the gas costs that occur within the Arbitrum EVM, substract the `gas_used_for_l1` amount from the `effective_gas_price` field. |
| 58 | +要查看仅在Arbitrum EVM中发生的燃料成本,请从`effective_gas_price`字段中减去`gas_used_for_l1`的金额。 |
59 | 59 |
|
60 | | -That being said, you can't compare Arbitrum's gas consumption to other EVM chains gas costs. |
| 60 | +话虽如此,您仍然不能将Arbitrum的燃料消耗与其他EVM链的燃料成本进行比较。 |
61 | 61 |
|
62 | | -### Raw data tables |
| 62 | +### 原始数据表 |
63 | 63 |
|
64 | 64 | <div class="cards grid" markdown> |
65 | | -- [Blocks](blocks.md) |
66 | | -- [Transactions](transactions.md) |
67 | | -- [Event logs](event-logs.md) |
68 | | -- [Traces](traces.md) |
| 65 | +- [区块表(Blocks)](blocks.md) |
| 66 | +- [交易表(Transactions)](transactions.md) |
| 67 | +- [事件日志表(Logs)](event-logs.md) |
| 68 | +- [内部合约调用表(Traces)](traces.md) |
69 | 69 | </div> |
0 commit comments