Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: kovalera on February 08, 2014, 03:38:13 AM



Title: Disappearing, then reappearing coins
Post by: kovalera on February 08, 2014, 03:38:13 AM
Not going to bore you with a long story (one that added quite a few white hairs to my bolding head), I have a few important question, which bothered me for the past few days:

I have had a problem with my bitcoin-QT on Mac, it seemed to have a corrupt database and had to reindex the blocks over and over for days, without ever getting to have a fully running bitcoin wallet. So I have decided to dumpprivkeys and import them in my other computer, in another wallet, when I finished moving all of them it seemed that a big part of the bitcoins was gone. Then I have checked all of the addresses on the blockchain.info, and indeed the bitcoins were gone. As a last attempt I just coppied the wallet.dat to that other computer, and weirdly enough, all the coins were there again!!

So, could someone please explain to me how is that possible, and does it mean that if I save all my private keys somewhere, I can somehow lose a part of my bitcoins when I import them to a new wallet?? And is the balance information on the blockchain is incorrect?? are there some hidden keys inside the wallet.dat that I can't see until the blocks are indexed?


Title: Re: Disappearing, then reappearing coins
Post by: nomnomnom on February 08, 2014, 03:45:26 AM
Read about change addresses:
https://en.bitcoin.it/wiki/Change

bitcoin-qt creates one with every transaction.
I would import the wallet into https://blockchain.info/wallet/import-wallet
and from there send the coins to the new wallet.


Title: Re: Disappearing, then reappearing coins
Post by: kovalera on February 08, 2014, 03:53:52 AM
I understand the creation of the new addresses, but I thought that all the address are saved in the "receive" part of the wallet, and so I would be able to dump all of those keys without loss...

I have recovered the coins so luckily for me this is not a problem now , it's just that I don't understand why not all the addresses are shown in the bitcoin client. This is a big problem if I would like to create a paper wallet with many wallets, as I am afraid I'd lose some on the way, no? and the fact that not all the coins are showing up on the blockchain, could also be a pretty scary view. :-\


Title: Re: Disappearing, then reappearing coins
Post by: DannyHamilton on February 09, 2014, 06:14:45 PM
I understand the creation of the new addresses, but I thought that all the address are saved in the "receive" part of the wallet, and so I would be able to dump all of those keys without loss...

I have recovered the coins so luckily for me this is not a problem now , it's just that I don't understand why not all the addresses are shown in the bitcoin client. This is a big problem if I would like to create a paper wallet with many wallets, as I am afraid I'd lose some on the way, no? and the fact that not all the coins are showing up on the blockchain, could also be a pretty scary view. :-\

You should not be messing around with the private keys of a wallet if you don't understand the technical details of how your wallet works.

Bitcoin-Qt only shows in the "Receive" section those addresses that you have chosen to create for the purpose of receiving new transactions from others.  It does not show change addresses that are created with every transaction that you ever send.  This is a design decision made by the creators of Bitcoin-Qt.  For the MANY people who have NO understanding of the underlying technology, and just want to be able to send and receive bitcoins from a computer program, showing change addresses would add confusion and unnecessary complexity to the user interface.  It is expected that if you are going to be messing around with the debug interface or the RPC interface then you should know what you are doing, and understand how the wallet works first.