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

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

  1. Mark Ravitz

    “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.”

    I wish I could turn this off. It’s too too complicated. So I’ve money in wallets I didn’t create, and I don’t know their addresses? And I presume this can’t be backed up on paper. WTF?

    Reply
    1. poor shibe Post author

      Hey, I found a way to show the hidden addresses. They are backed up when you backup your wallet though. If you want to see your hidden addresses, go to Help > Debug Window > Console > Type listaddressgroupings. It will show all your addresses, even the hidden ones.

      Reply
      1. Mark Ravitz

        On my installation listaddressgroupings only shows the one address with money in it, though I’ve never sent money from Dogecoin-Qt (noob) and maybe that why. What’s got me confused is that from my experience, no accountant in their right mind would would use an application which hid accounts with money in them, or which made it impossible to crosscheck totals (to the penny) with other applications. The above documentation says sending transaction change back to a different address is more secure. Why? If a public key is uncrackable, what’s the problem with using it as both the ‘send’ and ‘receive change’ addresses in a transaction? Do you have any thoughts about this?

        Reply
  2. ups

    What’s up friends, its great piece of writing about educationand entirely defined,
    keep it up all the time.

    Reply
  3. swiat fizyki 3 sprawdziany chomikuj

    Wow, wonderful weblog layout! How long have you ever been running a blog for?
    you make blogging glance easy. The total look of your site is wonderful, as smartly as the content material!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: