Stuck transactions are probably the most common issue in Dark Forest and they are likely the most frustrating as well!
A stuck transaction occurs when the dotted blue line of a voyage fails to update to a solid blue line. Dotted means pending, and solid means a voyage is traveling properly.
There are two main reasons for the dotted blue line to not update properly:
- The transaction has been accepted by the blockchain, but not yet confirmed.
- The transaction has been accepted and confirmed, but the visual interface isn't updating.
Transaction Status Icons
To find out if a transaction has been accepted or not by the blockchain, look to the right side of the game window at the colored squares with Ethereum logos in them.
- Blue = Transaction has been initialized but not yet accepted by the blockchain.
- Green = Transaction has been accepted by the blockchain, but not yet confirmed.
- Grey = Transaction has been accepted and confirmed by the blockchain, and is complete.
Fixing a Stuck Transaction
Sometimes, transactions will not actually be stuck. A transaction may be confirmed by the blockchain but the game interface will not update and will still show as "initialized" (blue) or "accepted" (green). In this case, a refresh of the game should clear it up and the game should properly show completed moves in the console and the dotted lines should properly update to solid. This is the easy solution that should be hoped for.
Sometimes transactions actually get stuck and this is directly related to the xDai blockchain having congestion or related issues. This will appear as the top transaction in the queue (on the right side of the game window) appearing as "accepted" (green), followed by all the transactions in the queue below it appearing as "initialized" (blue) with none of them updating. This occurs because the first transaction got into the blockchain mempool (aka "accepted" (green)) but never got added to a block, therefore never got "confirmed" (grey). And because that first transaction never got accepted, the rest can't either (because each transaction from an account must happen in the order they were sent - until the first one goes through, none of them will go through).
To troubleshoot a stuck transaction:
- Refresh the game to clear out the queue of un-accepted transactions.
- Before submitting another transaction, check the "gas fee (gwei)" setting in the Settings panel. Try upping it a notch, and also compare it to the gas price tracker at Blockscout.
- Submit one transaction. This will send with the same nonce as the transaction that is stuck, and will replace it with the higher gas fee that was set in the previous step.
- If the transaction gets accepted and confirmed properly, the gas price is sufficient and more transactions can be queued up.
Still having issues? Try refreshing and upping the "gas fee (gwei)" setting again. Most issues are related to gas fees.
If the gas price is getting too high, it may be a good idea to wait a few hours until congestion reduces.
Sometimes, transactions can get stuck even if the gas price is set high enough. This is usually when congestion is extremely high and the default RPC client (aka xDai Node, aka the client that essentially sees transactions and get them put onto the blockchain) gets overloaded. In this case, it's recommended to try using another RPC client or set up a local RPC client.
Sometimes, the queue in the client is backed up, and so the game will not reflect the true state of the game, even if the transactions have gone through. To speed up the processing of the queue, type the following command into either the game or browser console: