Author

Topic: bitcoin-qt 0.5.2 Wallet Doesn't Match Blockchain (Read 1637 times)

hero member
Activity: 807
Merit: 500
The confusion I refer to happens with created addresses in the receiving list too.  It turned out the "change" addresses had nothing to do with it.  Receipts to multiple addresses in the same transaction (not just same block) is what caused the confusion, and it is consistent even on old versions.
legendary
Activity: 1652
Merit: 2301
Chief Scientist
Yes, you will confuse the GUI if you send coins to 'change' addresses.

My advice would be "don't do that."

Thanks very much for helping to test, though, it is very appreciated!
hero member
Activity: 807
Merit: 500
OK, I caused another transaction like this on a normal new receiving addresses in a separate wallet from the sending one and got the same behavior.  I then closed the wallet in bitcoin-qt and and opened it in bitcoin, the list of transactions there did the same thing.  I will assume this is also normal and I had just never come across it.  At least I know to double-check the blockchain and / or bitcoind listtransactions if the numbers don't seem to be matching up.  So I am assuming Costia was right about the reasoning as well, although it doesn't make sense to me to have an inaccurate transaction list for shortness when you can't selectively show/hide receiving addresses (not being able to show addresses you rceive on that are "invisible" prevents you from editing their labels, which is trivial if you actually had someone send BTC to them manually, but being able to hide ones you don't plan to use anymore is a given if this transaction display function is meant to shorten the list).
hero member
Activity: 807
Merit: 500
That was fast.  It's not very often that I try to make a transaction and 3 blocks are immediately found.  Here is a transaction that would (in theory) cause what I saw:

http://blockexplorer.com/tx/3dfae2bb769192c7abcb748e1f6ef26efa614fa788568f5ec1254bf7b33e0a00

However, this didn't work because I sent the BTC to and from the same wallet.  If the BTC had been sent to a different wallet, I am fairly confident that I would have seen what I expected.  As such I can't provide screenshots (although I'm not sure where I'd host them anyway).

What I expected in this case (from experience, as opposed to what I expected when I started this thread) was that bitcoin-qt would show a receipt for .001 BTC to either address 1MQJCDXDRC3sLuBToWE6J2S4r5dKEAr9xq or 1Db8pWCyhkyVCVALyGTsMraBP9uP4vAdK9 in spite of the fact that there was actually .0005 sent to each of them.  However, running bitcoind listtransactions would show the proper separate .0005 BTC receipts.

In this transaction, both of those receiving addresses are "invisible" addresses I know about from block explorer due to change from previous send transactions (although I doubt that has anything to do with the behavior I saw; I suspect the same would happen if they were receiving addresses I generated manually as long as both receipts were in the same transaction).  Also, just for the record, 12gBPYgF8w5gBmHYhvc2Fs4EUTy6RtMiv8 is a new "invisible" address for .0005 BTC left over from a previous receipt.  Finally, as I now only have .0015 BTC, I can't really test this again today.
hero member
Activity: 807
Merit: 500
Can you post screenshots and blockexplorer links so we can get a better idea what's happening?
I was actually setting up a composite screenshot to show everything I have been trying to describe when I noticed the cause of what I was seeing.  I then discarded my work and described what had happened in my previous post.  I am reproducing it and will post if successful.
hero member
Activity: 728
Merit: 500
165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
Can you post screenshots and blockexplorer links so we can get a better idea what's happening?
hero member
Activity: 807
Merit: 500
I still don't think you understand what I'm seeing, however, your explanation appears to be accuarte.  I believe the information the GUI shows is technically wrong in this case, but I did figure out why the behavior was different, and if it is a a bug, it is only in the GUI's list of transactions (it could be intentional as suggested).

The first time, address A received .001 in Tx 1 while address B received .001 in Tx 2 (both were in the same block, so I didn't think about the transactions being separate).  The second time, addresses X and Y each received .001 in Tx 3.  Since both receipts were in the same Tx, bitcoin-qt's Recent Transactions section and Transactions tab only show one of the receiving addresses for that transaction, but show the entire amount of the transaction.  However, I verified that the information in wallet.dat is correct by switching to bitcoind on the machine in question and confirming that "bitcoind listtransactions" actually shows the X and Y receipts separately, by address.
newbie
Activity: 28
Merit: 0
if you want all the technical data on how it works look at the block chain
the gui doesnt show much
you have atleast 100 valid addresses in your wallet
the gui only shows a few that have been in use, dont know how it chooses which to show and which not
there is no corruption or coins that dont exist. its just the way the gui decided to show it  so you wont get plagued with dozens of addresses later on
if your wallet was corrupt you wouldnt be able to send those bitcoins from the "corrupt" address
the totals that are shown by the GUI are correct
hero member
Activity: 807
Merit: 500
the gui usually shows just one address
and it doesnt show the change you recieved as a transaction
I think the purpose is to simplify waht you see in the GUI
it doesnt match 1:1 with the transactions in the block chain - it mostly shows you the totals
The GUI only shows receipt addresses.  I sent .001 BTC to address X and .001 BTC to address Y.  The gui shows .002 received on address Y which is not accurate per the blockchain.  I am running the wallet in two places, though, and the second place shows it right with "bitcoind listtransactions" so I have a copy of the wallet that isn't corrupt even if the problem is wallet corruption.  OTOH, if the problem isn't wallet corruption, I'm wondering whether I'm seeing a display bug or whether bitcoin-qt would try to send coins that don't exist on my next spend.  Also, for the record, I did the same thing the day before with addresses A and B, which are also addresses I am calling "invisible," but each of them showed a receive of .001 as expected that time.
newbie
Activity: 28
Merit: 0
the gui usually shows just one address
and it doesnt show the change you recieved as a transaction
I think the purpose is to simplify waht you see in the GUI
it doesnt match 1:1 with the transactions in the block chain - it mostly shows you the totals
hero member
Activity: 807
Merit: 500
Change addresses aren't invisible.  They're stored in the public blockchain - the change isn't yours until the network sees it, so it has to be this way.
They are invisible to the receive coins section of bitcoin-qt, this is what I meant by invisible.  My problem is that the transactions section of bitcoin-qt doesn't match the public blockchain.  I am unsure what to do about this.
hero member
Activity: 728
Merit: 500
165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
Change addresses aren't invisible.  They're stored in the public blockchain - the change isn't yours until the network sees it, so it has to be this way.
hero member
Activity: 807
Merit: 500
Overnight I received .001 BTC on address X and .001 BTC on address Y.  Both of these addresses are the invisible kind (the ones leftover BTC are moved to when you do a send).  My transaction history shows .002 BTC being shown on address X.  At first I thought this was a glitch in the sending software and address Y wasn't used, then in looking at block explorer, I saw that it was a glitch in bitcoin-qt.  Seeing as how it has already happened, I'm not sure there is much I can do about it as far as trying to figure out why it did that, but should I continue to trust my wallet.dat, or is it time to switch to a new one in case this one is corrupted?
Jump to: