Troubleshooting Common Tornado Cash Errors

Tornado Cash is a decentralized, non-custodial privacy solution built on Ethereum and other EVM-compatible blockchains. Since it was sanctioned by the U.S Treasury in 2022, users have encountered various errors when interacting with the protocol. This is due largely to censorship by RPC endpoints and other external parties that the protocol hinges on for functioning properly.

To help everyone along, this guide has been created to provide an overview of the most common errors encountered when using the Tornado Cash app, an explanation of what they mean, and specific instructions on how to go about resolving them.

When Depositing

Due to censored RPC endpoints, depositing using a default setup is likely to fail. Hence, there is the need to configure Metamask properly prior to depositing and changing the RPC if there is still an issue.

Configuring Metamask

To deposit successfully, Metamask must be configured properly. This can be done in several steps:

  1. Go to Settings > Network
  2. Select Add a network manually
  3. Use https://tornadocash-rpc.com/ under New RPC URL
  4. Fill up other details like the screenshot below and Save.
  5. Switch to the new network you just created.

Note: For Binance Smart Chain, remember to set the Chain ID as 56.

Change RPC

If Metamask is setup properly and deposits still fail, follow the steps here to find an RPC from chainlist.org and change it in the Tornado Cash app.

When Withdrawing

As withdrawing is a more complex process from a technical perspective, errors are more commonplace.

Invalid root

The “Invalid root” error typically occurs when the Merkle root provided does not match the current state of the Merkle tree in the Tornado Cash contract. This Merkle root is essential for verifying the integrity and validity of the zero-knowledge proofs used in Tornado Cash.

Solution
This is relatively straightforward. Clear your cache or use a different browser.

This is a common error across Ethereum and Binance Smart Chain. Despite a deposit being valid, it still indicates that the system cannot find the corresponding deposit for the note you are trying to use for withdrawal.

Solution
Do not worry! As long as the deposit was done correctly, it is still valid and easily retrievable. All you need to do is change the RPC endpoint.

Head to Settings > Change RPC and switch to a different RPC from the dropdown. If it still does not work, visit chainlist.org to find a custom RPC for the chain that you are on (eg. Ethereum). When selecting a custom RPC from there, ensure that the ‘Score’ and ‘Privacy’ columns are both checked.

Failed to fetch relayers

The “Failed to fetch relayers” error typically indicates an issue with retrieving the list of available relayers that facilitate the withdrawal process in Tornado Cash. This tends to happen for lesser used chains like Optimism or Gnosis.

Solution
If there are no relayers available for the chain you are on, the only solution will be to use your own wallet as a relayer. However, we recommend to use a wallet that is in no way linked to the one that was used for depositing so as to not compromise on privacy.

If you are on Ethereum or Binance Smart Chain and experience this error, it indicates a connection issue. Check your internet connection and/or change VPN location to resolve the issue.

Failed to fetch deposit events or proving keys

This section refers specifically to the errors ‘Failed to fetch all deposit events from contract’ and ‘Failed to fetch proving keys.’ They indicate issues with retrieving event logs from the Tornado Cash smart contract and the necessary cryptographic proving keys required to generate zero-knowledge proofs respectively.

Nothing to worry about if you are getting such errors, as they are almost entirely connection-related.

Solution
Ensure that you have a stable internet connection. Try changing the location too if you are on a VPN. If it still does not work after several attempts, proceed with changing the RPC.

Relayer could not send transaction

This error ‘Selected relayer could not send your transaction’ typically indicates an issue with the chosen relayer. It is unable to broadcast your transaction to the network you are on.

Solution
Change the relayer. Hit the config icon at the top right of the withdraw widget and select a different relayer from the dropdown.

Note has been spent

Unlike the rest of the issues explained in this article, this notice of ‘Note has been spent’ is not an error. The note is literally spent, and your deposit is gone.

If you did not initiate a withdrawal, it simply means that someone else had access to your note. In this case, do check that you are using the official Tornado Cash app for deposits and withdrawals.

Generic Tips for Troubleshooting

To complement this guide, here are some generic tips for a faster and more effective troubleshooting experience.

  • Stay Updated: Continuously monitor updates and announcements from the Tornado Cash community and this website to stay informed about new features, bug fixes, and potential issues.
  • Seek Help When Needed: On a similar note, do not hesitate to reach out for help within the Telegram community if needed.
  • Document Your Process: Keep a record of the errors you encounter and the steps you take to resolve them. Such documentation can be invaluable for future reference and for helping others within the community.

Conclusion

The common errors that emerge when using Tornado Cash are small and easily resolvable. As you have seen, solutions mostly revolve around the same few actions such as getting a better internet connection or changing the RPC.

If you are new to Tornado Cash, usage of the protocol may seem a little daunting at the start. However, rest assured that you are backed by extensive available knowledge, tools and active expertise to understand new and existing errors, their causes, and how to resolve them effectively.

Privacy is a fundamental human right, and Tornado Cash is fully up and running in the post-sanctions environment for anyone to rely on for on-chain privacy.

Further Reading

Should you want to find out more about the technical aspects of Tornado Cash, here are some material that you can refer to.

  • GitHub Repository: The primary source for all Tornado Cash smart contract code, including detailed documentation on how to interact with the contracts.
  • Docs: In-depth technical details on the Tornado Cash protocol and its implementation.
  • zk-SNARKs: An in-depth look into the tech behind the Tornado Cash protocol.

Whenever interacting with any Tornado Cash material across the web, be sure to double check that you are using official links.