Category Archives: Dogecoin Security

A Reminder – Wallet Backups are not in Sync – And Why Your Public Keys Show Conflicting Amounts in the Blockchain

I created an app for watching the balances of your public addresses on Android, called Cryptowatch, and a lot of people seem to not know that the dogecoin clients, bitcoin clients, litecoin wallet backups do not automatically stay in sync with your current wallet.  This is really important to know if you send a lot of coins out of your wallet.  The more often you do this, the more often you will need to backup your wallet.  This is also why online websites and my app may show a different balance for your address than what you see in the client.

This happens because of how cryptocurrency clients work.  When you send someone money, it is actually getting sent to two places.  First, the person you are sending money to receives it, but the second address is what we call a “change address” that the wallet generates and uses to send the remaining coins.  It is often described like breaking a 20 dollar bill.  You buy something for 9 dollars, and get back 11.  But instead of putting the 11 dollars back into your wallet, you put it into another wallet that belongs to you.  This gives you some small privacy into which address is the payment address and which is the change address, so people can’t guess what you are buying or track your coins as easily.

The client program you use hides these details to you.  You don’t know which change addresses you have and which are being used, you only know about your public key to your main address that shows up in your wallet.  All the change addresses will be grouped under a single public key and show a totaled balance, even though they are actually separate. This creates a few problems.

Wallet Backups are NOT in Sync

This single address actually has many other addresses hiding under it.

First, many of the change addresses are only generated when they are used, or slightly before.  Your client will start you out with 100 addresses, and when it runs out, it will make new ones.  At the moment it begins making new ones, your wallet backups are no longer in sync with your actual wallet, because your coins are actually stored under several different addresses that aren’t saved in your backup.  So if you send coins regularly from your wallet, make sure you do regular backups.  If you have a large amount of coins that you don’t plan on spending, don’t keep them in the same address as an address you use to send coins from.  Create 1 address that you don’t touch, and send coins there that you won’t move.  In case you forget to do a backup, as long as you don’t send your coins from the address you shouldn’t lose any from that address.  You can continue to send coins from the other address, and won’t lose as much if you don’t have the most recent backup.

Programs Can’t Show Balance Information

This creates another problem.  When you go to make use of apps like Cryptowatch, the balance you see won’t be the same as what your client shows you, because you actually have several change addresses that aren’t shown.  To fix this, you can create another public address in your wallet, and send everything from your public address with all the hidden change addresses to the other new address.  You can then either send it back to the first address, or just use the new address to retrieve balance information.  This will pull all the coins back to a single address.

So Again, How do you avoid going out of sync?

Use two addresses, 1 for sending, 1 for receiving and storing.  Receiving/Storing coins does not make your wallet go out of sync.  Only sending.  This way if your wallet does go out of sync and you don’t make a backup you would only lose some coins from your sending address.  Anytime you move coins from your storing/receiving address, make a new wallet backup.  User “loserkids” on reddit pointed out that you can’t specify which address to use when sending through the client using the gui.  So this storage address should be kept in a different wallet to avoid issues.

You can see other guides on wallets here:

Backing up your Wallet

How to Restore Your Dogecoin Wallet

Restoring your dogecoin wallet is pretty easy if you have backed it up, you simply need to do the following:

1) Stop your Dogecoin Client, if it is running.

2) Navigate to the Dogecoin data directory.

A quick way to do this is to type this in: %AppData%/DogeCoin.

Pressing Enter here will take me to my Dogecoin Data Directory.

This is not the same as the installation directory.

This should work on Windows 7 and maybe XP.  If not, You need to navigate to one of these:

  • C:\Users\USERNAME\AppData\Roaming\DogeCoin (Windows 7 Default)
  • c:\Documents and Settings\USERNAME\AppData\Roaming\Dogecoin (Windows XP Default)

It will look like this:


3) This wallet.dat file is whatever your client is currently using, so if it has Dogecoins on it, be sure to make a backup of this wallet.

4) With the default wallet.dat file in the directory backed up, rename it to something like default_wallet.dat, just in case for some reason you need to restore it.

5) Copy your backup wallet into the directory.  Make sure it is named “wallet.dat”

6) Start up your Dogecoin client.  If it is still loading blocks, give it time to load before it will show your balance.

If your blocks are all up then you should be good to go.

Securing and Backing Up Your Wallet and Coins!


This is a very important step not to skip once you start getting coins in your wallet.  Your wallet and addresses are stored in a local file, and if your computer crashes you will lose all the coins you have, and unless you have written down your private keys (which you probably haven’t, and this isn’t really recommended) for each address that is in your wallet, you won’t be able to recover them without a backup.  Also, any viruses running on your computer are able to find this file and if it isn’t password protected, they can easily steal all of your coins. So do this now!

Get Virus Protection If You Don’t Already Have

The first step, is I would recommend getting/having a good virus scanner for your computer and run it.  You should do this before you set your wallet password, to lessen the chance that your password is stolen by reading the keys that you are typing.  If you have windows you should download and run Microsoft Security Essentials/Windows Defender.  They are free and work pretty well.  After that is out of the way, time to move on to setting your password.

Password Protect Your Wallet

I’ve been informed by myturn19 on Reddit that password protecting may crash your client on some PCs and not others.  So you may wish to test by backing up your wallet first, unencrypted, before attempting to encrypt it.  You can use other encryption tools like trucrypt to store the backup as encrypted if the client gives you problems.

The second step is easy, before you make any backups, you need to come up with a secure password.  This password should not be one you use for anything else, and it should contain special characters, uppercase, lower case, numbers and be at least 12 letters long.  But you also must make sure that you don’t forget or lose this password.  So if this is writing it down and putting it where no one will find it in a burn proof container, or another strategy that you use.. that’s up to you. But just make sure you won’t forget it!

Once you come up with a password, go to Settings > Encrypt Wallet and put your password in there.

To double check your password, go to Help > Debug Window > Console

Type this into the console:

walletpassphrase YourPassword 30

If no error message comes back, you were able to unlock your wallet successfully.



to relock your wallet.  Don’t leave it unlocked without needing it.  You generally only have to unlock if you will send someone else money or add a new address.

If you have no viruses on your computer and only you know your password, this should be 100% secure.  But there is always a chance that your virus scanner didn’t catch something.  Avoid downloading any suspicious files and unlocking your wallet unnecessarily.  With the rise of cryptocurrencies it will become even more of a danger of being targeted by viruses looking for unsecured wallets.  But even if you secured it, you must make sure to back it up!

Backing Up Your Wallet

There are a few very important things to keep in mind when backing up your cryptocurrency (dogecoin, bitcoin, litecoin, etc.) wallets.

 The most important thing to know : Backups are NOT in sync.  

This is important in two scenarios:

1. If you change your password on one wallet, a copy of the same wallet will not have the same password change.  So many as few copies of your wallet as possible while still giving you a way to recover it.  I store 1 copy of my wallet online, and 1 on each of my hard drives.  Do not keep ANY copies of your unencrypted wallet, as it would be like leaving open windows in your house but bullet proofing  and triple dead bolting your front door.

So how can I save my wallet online? My wallet is encrypted 2 times by different components, and renamed as well.  So even if I post my wallet online there is no way for anyone to take my coins without first knowing its a wallet, and knowing two separate complex passwords for each level of encryption.  If a computer program can break into my wallet, then the whole system for encryption is broken and digital transactions are now useless anyway.

You can most likely get away with just the encryption that the wallet file has when you do “Encrypt” from the program, provided you use a very complex password.  Again, it should be 12 characters minimum and have at least 1 of all of these numbers, upper, lower, special character, and not used anywhere else by you!

2. If you add new addresses to your wallet, you risk the chance that they won’t be added to the backup versions of the wallet.  Wallets come with 100 premade addresses, that are ready for use.  Once you use all 100 of these, your wallet has to create new ones.  Any backups of your wallet won’t know any of the new addresses.  So if you will be active in creating new addresses, make sure that you update the backups.  I also really advise reading my post here for more details of this.  Your wallet backup may got out of sync even if you don’t realize.

So, with all that said, when your wallet is encrypted with a strong password, to make a backup, simply go to:

Save the file to a location you prefer.  I would then rename the file from wallet.dat to something non obvious like weddingpic.png, and email it to yourself. that should work pretty well.  Just remember to rename your file back to wallet.dat before you try and open it back up.

If you are extra paranoid like me, you can try out a program like trucrypt for an additional level of encryption before you upload to the web.