Bitcoin Forum
November 21, 2017, 10:36:25 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Which balance should I believe? Client 7.0 version or blockchain.info  (Read 778 times)
johnyj
Legendary
*
Offline Offline

Activity: 1834


Beyond Imagination


View Profile
February 08, 2013, 02:58:13 AM
 #1

I just discovered that some old transactions do not displayed the same way:

In my bitcoin client 7.0 beta, the transaction I sent out is an integer, for example 40
But in blockchain.info, same transaction include 2 transactions, besides the original transaction, there is another one charging the transaction fee:

xxxxxxxxxxxxxxxxxxxx  0.55126951 BTC
yyyyyyyyyyyyyyyyyyyy          40 BTC
                           -40.49513626 BTC

The transaction towards xxxxxxxxxxxxxxxx in the above case did not get recorded in my QT client, so client recorded only -40 BTC spending,  but the blockchain.info recorded -40.49513626 BTC, which is not the total of these 2 transactions either, very confusing...

The result is that my QT client showed a higher total balance than the blockchain.info for a certain address

currently I'm not able to check this out in blockexplorer.com (seems search function dead), so I have no other more authoritive info

1511260585
Hero Member
*
Offline Offline

Posts: 1511260585

View Profile Personal Message (Offline)

Ignore
1511260585
Reply with quote  #2

1511260585
Report to moderator
1511260585
Hero Member
*
Offline Offline

Posts: 1511260585

View Profile Personal Message (Offline)

Ignore
1511260585
Reply with quote  #2

1511260585
Report to moderator
1511260585
Hero Member
*
Offline Offline

Posts: 1511260585

View Profile Personal Message (Offline)

Ignore
1511260585
Reply with quote  #2

1511260585
Report to moderator
Join ICO Now A blockchain platform for effective freelancing
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511260585
Hero Member
*
Offline Offline

Posts: 1511260585

View Profile Personal Message (Offline)

Ignore
1511260585
Reply with quote  #2

1511260585
Report to moderator
1511260585
Hero Member
*
Offline Offline

Posts: 1511260585

View Profile Personal Message (Offline)

Ignore
1511260585
Reply with quote  #2

1511260585
Report to moderator
1511260585
Hero Member
*
Offline Offline

Posts: 1511260585

View Profile Personal Message (Offline)

Ignore
1511260585
Reply with quote  #2

1511260585
Report to moderator
grue
Global Moderator
Legendary
*
Offline Offline

Activity: 2030



View Profile
February 08, 2013, 03:05:13 AM
 #2

pretty sure that was the "change" address

It is pitch black. You are likely to be eaten by a grue.

Tired of annoying signature ads? Ad block for signatures
deepceleron
Legendary
*
Offline Offline

Activity: 1512



View Profile WWW
February 08, 2013, 05:37:30 AM
 #3

Bitcoin "the wallet" has many addresses that are yours (and are not show to you if it is a reserve or change address), which all add up to your balance. Other people's Bitcoins, or web services, can't know your balance because they don't know what addresses belong to you.

DannyHamilton
Legendary
*
Offline Offline

Activity: 1974



View Profile
February 08, 2013, 03:46:40 PM
 #4

As grue and deepceleron have explained, this is probably "change" from your transaction.  Here is a more detailed explanation:

With the way bitcoin works, you can't partially spend a previous output that you received.  It has to be completely spent.  So, if you receive 10 BTC all in a single transaction from someone/somewhere at an address, then that address now has a single 10 BTC output.

Later if you want to send 2 BTC to somebody, the program can use the previous 10 BTC output as an input into the transaction, and create a 2 BTC output to the address where you want to send it.  This leaves 8 BTC leftover in the transaction.  If you don't send those 8 BTC somewhere, then they become miner fees and end up in the coinbase transaction of the new block for the miner to keep.  If you don't want to give those 8 BTC away as fees to the miner, then you need to include a second output in your transaction sending the 8 BTC back to your own wallet.  As an analogy, think of pulling a $10 bill out of your pocket to pay for something that costs $2, you get $8 back in "change".

The way Bitcoin-Qt does this is to create a new bitcoin address that it doesn't tell you about and keep track of that address and the associated private key in your wallet.dat.  Since this isn't an address that you requested in the "Receive Coins" tab of the user interface, it doesn't show up in that list.  Bitcoin-Qt knows about the address since it is in the wallet.dat file, so it includes it in the balance that it shows you.  Bitcoin-Qt uses a new change address for every transaction.  So if you create 10 different transactions, each sending bitcoins somewhere, then your wallet will have used 10 different change addresses (although some of them may be empty if Bitcoin-Qt used the bitcoins associated with some of those address as inputs into other transactions).

johnyj
Legendary
*
Offline Offline

Activity: 1834


Beyond Imagination


View Profile
February 09, 2013, 03:18:17 PM
 #5

Thanks for the explaination!  Smiley

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!