How to Rescan XPUBs in Dojo (Samourai Wallet)
view this post on our onion site
4 min read

How to Rescan XPUBs in Dojo (Samourai Wallet)

How to Rescan XPUBs in Dojo (Samourai Wallet)
This is an English translation from @ur_Entropy original Spanish article on @estudiobitcoin:

If you find this post helpful consider sending ur_Entropy some sats via BIP47 PayNym: +tighthaze25c

Have you opened your Samourai wallet and found your balance at zero? Don't worry, it's not a pleasant feeling but your valuable UTXOs are safe on the blockchain. We just have to make them visible to the wallet again, and that happens by rescanning our Master Extended Public Keys.

This problem can happen to us using Samourai Wallet connected to our Dojo, the causes are usually the following:

  • A Wallet has been paired again to the same node, importing through seed + passphrase.
  • After some node upgrade, Dojo does not synchronize two of its components, the DB Dojo and the Tracker.

This problem occurs with different node implementations, both in Dojo / Ronin Dojo of Samourai and with the Dojo in the form of an app provided by Umbrel, Citadel or myNode.

The solution will be similar in all cases, differing mainly in the way we access the Dojo Maintenance Tool on each node. In this guide I have used Umbrel as an example, basically because it is one of the most common. I also think that those of you who use the original Samourai Dojo will be more grappling with the ins and outs of the software.

We are going to solve first the case in which Dojo DB and the Tracker are not updated, when we understand that process, the solution to the case where we import from seed is almost given.

Dojo BD and Tracker do not synchronize

First we always have to see if our Dojo is working correctly, for this we will enter the Dojo Maintenance Tool with our Api Key (in this case from the Dojo app on our Node)

Once inside we have to check that Dojo is working well.

Confirmation checks must be green. If you do not see the balance of your Samourai wallet it will surely not be so in your case, and you will have the DB Dojo and the Tracker in yellow as you can see in the following photo:

Here comes the first step, it requires time and we have to have a little patience. Let's reinstall the Dojo app and let it sync. (Ronin Dojo users can try restarting with "Dojo->Restart")

It usually happens that it still does not synchronize, what we have to do then is flash the sd, boot our node again and install Dojo again. It's okay to do that, the data is saved on your hard drive and you won't lose anything by re-flashing. In the sd there is only the data necessary to "boot" a certain version, the information of your node is safe.

From there patience, you have to wait a day for Dojo to have indexed everything again.

To sleep, your Utxos are still there...

The next day, once we check that everything is green, we will know that Dojo is ready.

Now let's go to the wallet: In Samourai we are going to copy our Master Extended Public Keys, we are going to find them in "Settings->Wallet". Be careful how you treat them, it is sensitive information. If someone accesses them, they can know your balance and past and future movements. We keep them all, including those of Whirlpool: premix, postmix, badbank, etc...

We make a backup of the wallet and "secure erase wallet".

We enter the Dojo Maintenance Tool and go to the XPubs Tool option:

  • It usually automatically detects the derivation path when you are rescan it (you don't have to touch anything in that menu), but you can directly put the correct path before re-importing. You can change it if it doesn't do it automatically (XPub > Bip44, ZPub > Bip84, YPub > Bip49).
  • Surely some do not give you any "hit", this is normal, for example if you have not mixed.
  • In the event that you do not re-scan an address, try to look it up, delete it and then search for it again and re-scan it.

Once we have rescanned all the XPubs, we reopen our Samourai wallet and connect it back to our Dojo. Once we have done so, we recover the backup of our wallet and open it. There the wallet will show again our balance and all the transactions we had made so far.

We have imported a wallet from seed+passphrase

In this case our Dojo is surely working properly. We go into DMT and see that all verification checks are green.

What we have to do is copy our XPubs as we have described above. We enter them in the XPubs tool, delete them first and then re-scan them. When we have finished we restart our Samourai Wallet and wait for it to synchronize.

I hope this guide helps you. As I said at the beginning, it's not nice when it happens, but if you go through this you're going to gain a lot of confidence in the way you relate to your wallet and help you see the importance of backing up your private key. Wallets and software can give us headaches, but in the end, your UTXOs are safe on the blockchain and you can always access them if you take good care of your backup.

Found this post helpful? Consider sending the author a tip