-
Notifications
You must be signed in to change notification settings - Fork 362
Failed transactions with safeTxGas 0 seem stuck to users #3126
Comments
If I understand @mikheevm, it sounds like an error notification was shown to the user. It's strange that the transaction location didn't change if that was the previous behaviour. |
Yes, it should've been shown. But the problem is mostly about what to do after the notification. Previously such transactions would disappear from history and consider execute because it'd change the Safe nonce, now it stays in the queue
The thing is that the current behaviour is expected because of how Ethereum works under the hood and our back-end indexes. |
Odd that it didn't show. I guess this ticket will also require looking into the error notifications as well then. Do you have details of the transaction in question? |
It's not odd, this is expected because the backend only indexes transactions that make state changes to the contract. This transaction didn't make any changes because it reverted. |
According to German, this was fixed on the Core SDK side, and we'll use the SDK for this estimation. |
@liliya-soroka says:
|
If the error message is shown, this is not a bug but an educational issue for the behavior of failing txs without state change. |
Current result: #3772 - The general error "unable to decode contract error message" is displayed instead of GS013 |
We went for that generic message in the notification because we found |
Background story
A user popped up on discord and asked if there were any problems with indexing on the backend because the execution transaction failed with
GS013
(Safe 1.3.0, safeTxGas 0), but the status wasn't reflected in the UI. So we had to tell them to replace/cancel a transaction.Overview
Our previous setup with 1.3.0 and 1.1.1 would always use the Safe nonce and move the transaction to the "History" tab regardless of whether it was successful or not.
Goals
Requirements
Screens
Technical background
Backend only indexes state-changing transactions
State-changing means a transaction made a change to the Safe contract (e.g., increases the nonce)
With 1.3.0 contracts and safeTxGas 0, the internal transaction is required to be successful to change the Safe smart contract state (nonce)
https://github.com/gnosis/safe-contracts/blob/main/contracts/GnosisSafe.sol#L180
We did it to improve gas limit estimation because the way the estimation works is it tries to simulate the transaction and increases the gas limit until the transaction is successful (successful = doesn't throw any exceptions). With safe 1.1.1 (and previous 1.3.0 setup), in any case, a transaction would be state-changing and use Safe nonce, but the underlying transaction would fail. With 1.3.0, there is a
require
statement in the smart contract, and such statement reverts all the changes if an exception is thrownThe text was updated successfully, but these errors were encountered: