From ad466d2dd08467a33637d25a4ca556df1921fd4d Mon Sep 17 00:00:00 2001 From: jlwllmr <95916148+jlwllmr@users.noreply.github.com> Date: Mon, 9 Sep 2024 14:20:33 +0100 Subject: [PATCH] Improve wording --- docs/developers/guides/gas/gas-fees.mdx | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/docs/developers/guides/gas/gas-fees.mdx b/docs/developers/guides/gas/gas-fees.mdx index 3102acdc2..c71e9d721 100644 --- a/docs/developers/guides/gas/gas-fees.mdx +++ b/docs/developers/guides/gas/gas-fees.mdx @@ -15,12 +15,6 @@ Linea supports the [Ethereum EIP-1559 gas price model](https://ethereum.org/deve total fee = units of gas used * (base fee + priority fee) ``` -Using parameters in the [Linea source code](https://github.com/Consensys/linea-monorepo/blob/a001342170768a22988a29b2dca8601199c6e205/sdk/src/clients/blockchain/gas/LineaGasProvider.ts), -the formula can be rendered as: -``` -total fee = gasLimit * (maxBaseFeePerGas + maxPriorityFeePerGas) -``` - Linea fundamentally works exactly the same as Ethereum. The one difference is that **the base fee is constant at 7 wei.** Blocks created by Linea use up to 24 million gas (less than 50% of the maximum Linea block size of 61 million gas), and the fee decreases by 12.5% per block, effectively @@ -32,7 +26,10 @@ components: - **Layer 2 cost**: The execution fee; the cost of including your transaction on the Linea sequencer, and calculated using a similar formula to Ethereum (as described above). - **Layer 1 cost**: The cost of publishing your L2 transaction on Ethereum, which varies - based on the blob fee market, and is covered by the gas you pay on Linea. + based on the blob fee market. + +These two resource costs are abstracted by the rollup and covered by the recommended L2 gas price +and gas used. Learn more about [gas on Linea](./gas-on-linea.mdx). @@ -40,8 +37,8 @@ Learn more about [gas on Linea](./gas-on-linea.mdx). A new API for estimating gas on Linea, `linea_estimateGas`, will be activated soon. See our [reference page](../../reference/api/linea-estimategas.mdx) for more information. -Please get in touch via the [Linea Discord](https://discord.gg/linea) if you intend to use -`linea_estimateGas` once it is available. +If you intend to use `linea_estimateGas` once it is available, you want to find out more, or you +have further questions, please get in touch on [Discord](https://discord.gg/linea). ::: Linea supports [`eth_estimateGas`](https://docs.infura.io/api/networks/linea/json-rpc-methods/eth_estimategas), @@ -52,9 +49,10 @@ You can use `eth_gasPrice` or `eth_feeHistory` to get the gas price, in wei, and `eth_estimateGas` to find out how many units of gas a specific transaction will need. :::note -`eth_estimateGas` returns a total quantity of gas estimated for the transaction, contrasting with -`linea_estimateGas`, which also will return `baseFeePerGas` and `priorityFeePerGas` once available. -`eth_estimateGas` is therefore less precise and generally provides a higher estimate. +`eth_estimateGas` returns a total quantity of gas estimated for the transaction, whereas +`linea_estimateGas` will return `gasLimit`, `baseFeePerGas`, and `priorityFeePerGas` once available. +This makes it more precise; the gas quantity returned by`eth_estimateGas` is generally higher than +the `gasLimit` returned by `linea_estimateGas`. ::: ## `eth_gasPrice`