Bitcoin Forum
December 05, 2016, 12:40:39 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: block explorer, bitcoin client BTC amount discrepancy  (Read 1470 times)
EDImuU1t9bu144d5Ct49
Newbie
*
Offline Offline

Activity: 5



View Profile
January 13, 2012, 09:52:16 PM
 #1

Hi Bitcontalk!

I just bought my first bitcoins! Blockexplorer shows that I have >14 BTC, but my bitcoin client reads 0.00 BTC. Can you please help me find out why?

Here's what I did (perhaps there is an error in my process):

1. Booted to a live-CD (TAILS)
2. Downloaded bitcoin. ran ./bitcoin-qt
3. Wrote down my Bitcoin Address
4. Closed bitcoin-qt.
5. Copied wallet.dat to an encrypted tarball on an external drive.
6. Shutdown live OS environment.
7. Used get-bitcoin.com to send USD->BTC to my Bitcoin Address in (3).
8. Waited until  blockexplorer showed a balance at my Bitcoin Address.
9. Booted to the live-CD.
10. Downloaded bitcoin.
11. Created an encrypted folder ".bitcoin" on an external drive using Cryptkeeper. Created a symlink to the ".bitcoin" directory on the external drive at "~/.bitcoin".
12. Decrypted tarball from external drive. Copied wallet.dat to "~/.bitcoin"
13. ran ./bitcoin-qt
14. Waited for the entire blockchain to be downloaded.
15. Saw 0.00 BTC
16. Re-checked blockexplorer; verified I should have >14 BTC.
17. WTF
18. Registered for bitcointalk forums.

Also, I'm using TOR, so bitcoin-qt is configured to connect to the 127.0.0.1 SOCKS proxy--in case that makes any differences.

TIA!

-Ed Imu
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480941639
Hero Member
*
Offline Offline

Posts: 1480941639

View Profile Personal Message (Offline)

Ignore
1480941639
Reply with quote  #2

1480941639
Report to moderator
1480941639
Hero Member
*
Offline Offline

Posts: 1480941639

View Profile Personal Message (Offline)

Ignore
1480941639
Reply with quote  #2

1480941639
Report to moderator
jake262144
Full Member
***
Offline Offline

Activity: 210


View Profile
January 13, 2012, 10:09:00 PM
 #2

Wow, been through hell to purchase those bitcoins?

Firstly, unless plausible deniability is what you're striving at, there is a much simpler approach to securing the wallet. The client now has the option to encrypt the wallet using a passphrase. Select any decent passphrase and you're good to go.

Secondly, the first thing which comes to my mind is please double-check whether the bitcoin client is actually using the wallet you think it is using. If for some reason (file permissions?) the client can't read your symlinked wallet, it'll generate a new one silently. I had such an issue once with a symlinked config file when I messed up ln syntax but failed to notice the mistake.

If you're absolutely sure the client is using the symlinked wallet file (have verified it empirically), consider running the client with the --rescan parameter.

If this was the first time you attempted to use bitcoin this way, you should have used a test monkey bit-cent. Free bit-cents can be had here: http://freebitcoins.appspot.com/
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
January 13, 2012, 10:12:36 PM
 #3

The address in #3 is still showing in the client?

You can try launching bitcoin from the command line with -rescan option.  It will recheck entire block chain for your transaction.

I agree w/ jake though I think you are making this way to difficult.  There are btw usb linux distros which are secure and come w/ the client.
jake262144
Full Member
***
Offline Offline

Activity: 210


View Profile
January 13, 2012, 10:20:05 PM
 #4

I'm obliged, DAT Smiley

As to using TOR, if you were able to contact the outside world and download the entire blockchain (that is 162055 blocks), I can't see how it could have been harmful.

EDIT :: Damn it, just lost two miners! It must be some connectivity issue as the remote router doesn't respond either. I won't be able to bring them back online until Monday so let's hope it's the ISP who messed up :<
EDImuU1t9bu144d5Ct49
Newbie
*
Offline Offline

Activity: 5



View Profile
January 13, 2012, 10:51:10 PM
 #5

I was thinking: Is it necessary to have your bitcoin client download the entire blockchain before backing up the wallet.dat file?

The address in #3 is still showing in the client?

Yes. Clicking "Recieve Coins" in the bitcoin client shows me the same address that I recorded in step #3.

If you're absolutely sure the client is using the symlinked wallet file (have verified it empirically), consider running the client with the --rescan parameter.

Can you define "verify emperically?" Is there anything I should check besides checking the Bitcoin Address showing in the client after clicking "Recieve Coins" to verify that all is well with my wallet.dat file (permissions, integrity, etc)?

If this was the first time you attempted to use bitcoin this way, you should have used a test monkey bit-cent. Free bit-cents can be had here: http://freebitcoins.appspot.com/

Definietly. I absolutely should have tested my method with a few BTC before dropping >50 USD hoping that theory would match implementation without a test run. Thanks for the link, I'll check it out.

-Ed Imu
jake262144
Full Member
***
Offline Offline

Activity: 210


View Profile
January 13, 2012, 11:03:52 PM
 #6

Can you define "verify emperically?" Is there anything I should check besides checking the Bitcoin Address showing in the client after clicking "Recieve Coins" to verify that all is well with my wallet.dat file (permissions, integrity, etc)?

That's pretty much it. If you'd created multiple receiving addresses, you'd see at a glance whether or not they were there.
...or you could debug bitcoin-qt Smiley

You DON'T need the blockchain at all. Just grab the wallet.dat and you're good to go. BTW, did you check the number of downloaded blocks against my value?
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
January 13, 2012, 11:29:40 PM
 #7

EDImuU1t9bu144d5Ct49,

if you can't get it working you could extract the private key and import it into an online wallet like strong coin then make your payment/transfer from there.

Don't worry strongcoin uses client side encryption so your funds are safe.
EDImuU1t9bu144d5Ct49
Newbie
*
Offline Offline

Activity: 5



View Profile
January 14, 2012, 12:00:18 AM
 #8

did you check the number of downloaded blocks against my value?

Not yet. Just before posting this message I created a fresh, new .bitcoin directory and started downloading the blockchain again (when all else fails, reboot). Pulling from TOR while the .bitcoin directory is stored on an encrypted folder on an external drive, the whole blockchain takes >6 hours to download x_x.

I know. I know. I'm ridiculioius..but it's fun for me to do things bullet-proof Smiley [so long as I don't loose BTC in the process!]

My plan:

1. finish getting downloading the blockchain
2. verify the blockchain is fully downloaded (162055 blocks)
3. If 0.00 BTC, Close bitcoin-qt. Run `./bitcoin-qt -rescan`
4. If still 0.00 BTC, checkout strong coin

Side question: Is there a manual page on the bitcoin-qt command outlining its accepted arguments (ie: -rescan)?

Thanks again,
-Ed

-Ed Imu
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
January 14, 2012, 12:01:54 AM
 #9

did you check the number of downloaded blocks against my value?

Not yet. Just before posting this message I created a fresh, new .bitcoin directory and started downloading the blockchain again (when all else fails, reboot). Pulling from TOR while the .bitcoin directory is stored on an encrypted folder on an external drive, the whole blockchain takes >6 hours to download x_x.

I know. I know. I'm ridiculioius..but it's fun for me to do things bullet-proof Smiley [so long as I don't loose BTC in the process!]

My plan:

1. finish getting downloading the blockchain
2. verify the blockchain is fully downloaded (162055 blocks)
3. If 0.00 BTC, Close bitcoin-qt. Run `./bitcoin-qt -rescan`
4. If still 0.00 BTC, checkout strong coin

Side question: Is there a manual page on the bitcoin-qt command outlining its accepted arguments (ie: -rescan)?

Thanks again,
-Ed

https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments

EDImuU1t9bu144d5Ct49
Newbie
*
Offline Offline

Activity: 5



View Profile
January 14, 2012, 02:23:08 AM
 #10

Welp, my blockchain finishe downloading, and my coins registered! Not sure why this didn't happen the first time, but I'm fantastically relieved Cheesy

Thanks for all your help!

-Ed Imu
EDImuU1t9bu144d5Ct49
Newbie
*
Offline Offline

Activity: 5



View Profile
January 14, 2012, 02:43:17 AM
 #11

Eh, I spoke too soon. After I verified that my bitcoin client registered my coins, I:

1. deleted my wallet from "~/.bitcoin" (no data loss; my backup is still intact)
2. re-ran ./bitcoin-qt so that it would generate a new wallet
3. moved the new wallet.dat file to a backup
4. re-copied my origianl wallet from my backup into "~/.bitcoin"
5. ran ./bitcoin-qt

Bitcoin started and again displayed 0.00 BTC. So, I:

1. closed my bitcoin client
2. executed `./bitcoin-qt -rescan`

This successfully registered my coins agian.

Is this a bug? ...or is it normal behaviour to have to execute " -rescan" when switching wallet files?

-Ed Imu
notme
Legendary
*
Offline Offline

Activity: 1526


View Profile
January 14, 2012, 02:51:50 AM
 #12

Eh, I spoke too soon. After I verified that my bitcoin client registered my coins, I:

1. deleted my wallet from "~/.bitcoin" (no data loss; my backup is still intact)
2. re-ran ./bitcoin-qt so that it would generate a new wallet
3. moved the new wallet.dat file to a backup
4. re-copied my origianl wallet from my backup into "~/.bitcoin"
5. ran ./bitcoin-qt

Bitcoin started and again displayed 0.00 BTC. So, I:

1. closed my bitcoin client
2. executed `./bitcoin-qt -rescan`

This successfully registered my coins agian.

Is this a bug? ...or is it normal behaviour to have to execute " -rescan" when switching wallet files?

The client only remembers transactions involving the addresses in the wallet file you are using.  It has to reread all the block when you change wallets.  That is what -rescan does.

https://www.bitcoin.org/bitcoin.pdf
While no idea is perfect, some ideas are useful.
12jh3odyAAaR2XedPKZNCR4X4sebuotQzN
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
January 14, 2012, 03:02:48 AM
 #13

Is this a bug? ...or is it normal behaviour to have to execute " -rescan" when switching wallet files?

Normal.  The client only looks for new transactions.  The reason why is an old wallet could have hundreds (maybe thousands) of addresses and those addresses could be involved in transactions back to block 1 (if your are Satoshi).

To query the entire blockchain every single time you start would be massive amount of work.

SO the client remembers what it has last seen.  If the client knows your balance is 20 BTC @ block 100 and you turn it off, when you turn it on it downloads block 101 to 105.  It only needs to look for transactions in blocks 101 to 105.  Right?

When you switch wallets that confuses the client.  You need to do a rescan to force it to check blocks it considers "already checked".
MoreCowbell
Newbie
*
Offline Offline

Activity: 24


View Profile
January 14, 2012, 06:46:29 AM
 #14

Is this a bug? ...or is it normal behaviour to have to execute " -rescan" when switching wallet files?

Normal.  The client only looks for new transactions.  The reason why is an old wallet could have hundreds (maybe thousands) of addresses and those addresses could be involved in transactions back to block 1 (if your are Satoshi).

To query the entire blockchain every single time you start would be massive amount of work.

SO the client remembers what it has last seen.  If the client knows your balance is 20 BTC @ block 100 and you turn it off, when you turn it on it downloads block 101 to 105.  It only needs to look for transactions in blocks 101 to 105.  Right?

When you switch wallets that confuses the client.  You need to do a rescan to force it to check blocks it considers "already checked".

Thanks for this explanation.  I had the same problem as the OP when I first started because I was experimenting sending between different wallets.  I did find the recommendation on doing a -rescan, but didn't get the whole explanation as to why switching wallets caused problems.

"bitcoins not showing up in wallet" <---(for the search engines)
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!