From 887a6c353a9b780187e281f6adc9e49098a01be5 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Mon, 17 Jul 2023 09:39:56 -0500 Subject: [PATCH 1/3] feat(known-issues): Add EIP 1559 stuck tnx issue Closing: https://linear.app/optimism/issue/DEVRL-1067/add-the-stuck-transaction-issue-to-known-issues --- src/docs/developers/known-issues.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/docs/developers/known-issues.md b/src/docs/developers/known-issues.md index e460881ab..e0a83aef3 100644 --- a/src/docs/developers/known-issues.md +++ b/src/docs/developers/known-issues.md @@ -1,9 +1,24 @@ --- -title: Known Issues (none) +title: Known Issues lang: en-US --- -**None at present** +## Transactions stuck in the transaction pool + +OP Chain uses EIP-1559, but with different parameters than L1 Ethereum. +As a result, while the base fee on L1 can grow by up to 12.5% in a twelve second period (in the case of a single 30M gas block), the L2 base fee can grow by up to 77% (in the case of six 30M gas blocks). +However, it still shrinks by only up to 12.5% in the same twelve second period (if all the blocks are empty). + +If the maximum base fee specified by the transaction is less than the block base fee, it does not get included until the base fee drops to below the value in the transaction. + +### Recommendation + +Set the maximum base fee for transactions to a relatively high value, such as 0.1 gwei. +This will *not* increase the transaction cost because the same base fee, determined by a formula, is charged to all the transactions in the block. +[See here for more details](../guides/wallet-dev.md#base-fee). + +If you already have a transaction that is stuck and you want to cancel it, or increase its base fee, submit another transaction with the same nonce value. +[See the help center for information on how to do it](https://help.optimism.io/hc/en-us/articles/17045804513307-What-to-do-with-a-stuck-pending-transaction-). From 1cd21ff3a14e361229156767cf94963949240176 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Mon, 17 Jul 2023 14:46:14 -0500 Subject: [PATCH 2/3] feat(known-issues): Add EIP-1559 and stuck transactions Divide the workaround between wallets, dapps, and users. --- src/docs/developers/known-issues.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/docs/developers/known-issues.md b/src/docs/developers/known-issues.md index e0a83aef3..d13f914f0 100644 --- a/src/docs/developers/known-issues.md +++ b/src/docs/developers/known-issues.md @@ -9,13 +9,33 @@ OP Chain uses EIP-1559, but with different parameters than L1 Ethereum. As a result, while the base fee on L1 can grow by up to 12.5% in a twelve second period (in the case of a single 30M gas block), the L2 base fee can grow by up to 77% (in the case of six 30M gas blocks). However, it still shrinks by only up to 12.5% in the same twelve second period (if all the blocks are empty). -If the maximum base fee specified by the transaction is less than the block base fee, it does not get included until the base fee drops to below the value in the transaction. +If the maximum fee per gas specified by the transaction is less than the block base fee, it does not get included until the base fee drops to below the value in the transaction. ### Recommendation -Set the maximum base fee for transactions to a relatively high value, such as 0.1 gwei. +Set the maximum fee per gas for transactions to a relatively high value, such as 0.1 gwei. This will *not* increase the transaction cost because the same base fee, determined by a formula, is charged to all the transactions in the block. [See here for more details](../guides/wallet-dev.md#base-fee). +To save on the cost of L2 gas you want to minimize the max priority fee. + +Also, if the [current base fee](https://optimism.io/gas-tracker) is comparable to 0.1 gwei or higher, you might want to suggest to users a higher multiple of the base fee than you would on L1 Ethereum, because it can grow faster in the time interval between transaction creation and transaction signing and submission. + +#### Recommendations for wallet developers + +Wallets are usually in charge of determining the default priority fee and max fee that a transaction would include, so the above recommendations can be applied directly. + + +#### Recommendations for dapp developers + +As a dapp developer you can usually override the default recommendation of the wallet +(see, for example, [ethers](https://github.com/ethers-io/ethers.js/blob/v5.7/packages/contracts/lib/index.d.ts#L10-L11)). +As long as not all wallets are upgraded according to our recommendations, it makes sense for dapps to get the current base fee and recommend a value based on that. + + +#### Recommendations for users + +As a user you are the final authority on transaction fields. +[See the help center](https://help.optimism.io/hc/en-us/articles/16711400204315-Managing-the-gas-fees-that-make-up-the-L2-execution-fee) for an explanation of how to modify the fees. If you already have a transaction that is stuck and you want to cancel it, or increase its base fee, submit another transaction with the same nonce value. [See the help center for information on how to do it](https://help.optimism.io/hc/en-us/articles/17045804513307-What-to-do-with-a-stuck-pending-transaction-). From 17d4c6845c1211c0c939a520398151b7c80b3574 Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Mon, 17 Jul 2023 17:11:48 -0500 Subject: [PATCH 3/3] Update known-issues.md --- src/docs/developers/known-issues.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/docs/developers/known-issues.md b/src/docs/developers/known-issues.md index d13f914f0..4c19be37c 100644 --- a/src/docs/developers/known-issues.md +++ b/src/docs/developers/known-issues.md @@ -10,6 +10,10 @@ As a result, while the base fee on L1 can grow by up to 12.5% in a twelve second However, it still shrinks by only up to 12.5% in the same twelve second period (if all the blocks are empty). If the maximum fee per gas specified by the transaction is less than the block base fee, it does not get included until the base fee drops to below the value in the transaction. +When this happens, some users may see their transaction become stuck. +No funds are lost, but the transaction does not clear on its own. + +We have a workaround that users and wallet operators can implement immediately, and we expect a protocol-level fix to be live by the end of Q4. ### Recommendation