Bitcoin Forum
December 10, 2016, 01:21:31 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: bitcoin-qt 0.5.2 Wallet Doesn't Match Blockchain  (Read 1440 times)
The00Dustin
Hero Member
*****
Offline Offline

Activity: 806


View Profile
January 24, 2012, 10:58:23 AM
 #1

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?
1481332891
Hero Member
*
Offline Offline

Posts: 1481332891

View Profile Personal Message (Offline)

Ignore
1481332891
Reply with quote  #2

1481332891
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481332891
Hero Member
*
Offline Offline

Posts: 1481332891

View Profile Personal Message (Offline)

Ignore
1481332891
Reply with quote  #2

1481332891
Report to moderator
1481332891
Hero Member
*
Offline Offline

Posts: 1481332891

View Profile Personal Message (Offline)

Ignore
1481332891
Reply with quote  #2

1481332891
Report to moderator
1481332891
Hero Member
*
Offline Offline

Posts: 1481332891

View Profile Personal Message (Offline)

Ignore
1481332891
Reply with quote  #2

1481332891
Report to moderator
Revalin
Hero Member
*****
Offline Offline

Activity: 728


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
January 24, 2012, 11:04:24 AM
 #2

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.

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
The00Dustin
Hero Member
*****
Offline Offline

Activity: 806


View Profile
January 24, 2012, 01:32:19 PM
 #3

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.
Costia
Newbie
*
Offline Offline

Activity: 28



View Profile
January 24, 2012, 04:30:25 PM
 #4

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
The00Dustin
Hero Member
*****
Offline Offline

Activity: 806


View Profile
January 24, 2012, 05:30:53 PM
 #5

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.
Costia
Newbie
*
Offline Offline

Activity: 28



View Profile
January 24, 2012, 05:38:43 PM
 #6

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
The00Dustin
Hero Member
*****
Offline Offline

Activity: 806


View Profile
January 24, 2012, 06:24:20 PM
 #7

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.
Revalin
Hero Member
*****
Offline Offline

Activity: 728


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
January 25, 2012, 12:39:23 AM
 #8

Can you post screenshots and blockexplorer links so we can get a better idea what's happening?

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
The00Dustin
Hero Member
*****
Offline Offline

Activity: 806


View Profile
January 25, 2012, 01:35:25 AM
 #9

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.
The00Dustin
Hero Member
*****
Offline Offline

Activity: 806


View Profile
January 25, 2012, 01:58:15 AM
 #10

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.
The00Dustin
Hero Member
*****
Offline Offline

Activity: 806


View Profile
January 27, 2012, 10:48:51 AM
 #11

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).
Gavin Andresen
Legendary
*
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
January 28, 2012, 01:12:18 AM
 #12

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!

How often do you get the chance to work on a potentially world-changing project?
The00Dustin
Hero Member
*****
Offline Offline

Activity: 806


View Profile
January 28, 2012, 01:21:31 AM
 #13

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.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!