Bitcoin Forum

Other => Beginners & Help => Topic started by: Rick on August 24, 2011, 06:08:12 PM



Title: Help, I think i lost some BTC
Post by: Rick on August 24, 2011, 06:08:12 PM
So I had a backup of my wallet file on a USB key. The other day I cashed out of my mining pool so I put a copy of the wallet.dat on the computer and transfered the coins to it, I then left the wallet.dat of my harddrive(didn't back this version up to USB). Fast forward a week and I bought a new harddrive, so I decided to install windows on it and format my old drive.

I did this thinking as long as I had the wallet.dat file on the USB stick that the bitcoin client would catch up on my latest transactions and that there was no need to continuously make backups everytime i send/recieve coins.

So I get everything up and running on my fresh install of windows, copy over the wallet.dat from the usb stick. To my horror the last transation, the cashout from my mining pool is not shown in the transactions window of the bitcoin client  D:

Are my coins gone forever?


Title: Re: Help, I think i lost some BTC
Post by: memvola on August 24, 2011, 06:14:01 PM
Are my coins gone forever?

Probably not, but the transaction should have appeared there. Try starting bitcoin with the -rescan option.

Next question if the above doesn't work: Did you send the coins to a newly generated address or one that was already on your wallet?


Title: Re: Help, I think i lost some BTC
Post by: Rick on August 24, 2011, 06:16:29 PM
I will try that, it was a new address, its not in this wallet's address book :\


Title: Re: Help, I think i lost some BTC
Post by: Rick on August 24, 2011, 06:22:45 PM
So I tried "C:\Program Files (x86)\Bitcoin\bitcoin.exe" -rescan and nothing different happened.


Title: Re: Help, I think i lost some BTC
Post by: Rick on August 24, 2011, 06:48:55 PM
Is there anything I can do to reclaim my coins? I still have the address that I sent the coins to.


Title: Re: Help, I think i lost some BTC
Post by: SgtSpike on August 24, 2011, 06:53:51 PM
What block has your client downloaded up to?


Title: Re: Help, I think i lost some BTC
Post by: Dorkslayz on August 24, 2011, 06:56:00 PM
Mine is up to 142423 if that helps.


Title: Re: Help, I think i lost some BTC
Post by: Rick on August 24, 2011, 07:00:52 PM
Its at 92905 blocks right now, but only showing 3 transactions, there should be 4.


Title: Re: Help, I think i lost some BTC
Post by: jackjack on August 24, 2011, 07:13:47 PM
I will try that, it was a new address, its not in this wallet's address book :\
If it was a new address you generated after the backup I'm afraid I have bad news for you :(


Title: Re: Help, I think i lost some BTC
Post by: Rick on August 24, 2011, 07:22:41 PM
awh :(  I tried Recuva, it recovered the wallet.dat but it was corrupted  :-\

Thanks anyways guys.


Title: Re: Help, I think i lost some BTC
Post by: dayfall on August 24, 2011, 07:51:30 PM
I have gotten my private keys from a wallet.dat using a hex editor.  I modified a python script to accept hex formatted keys and let it insert them into a working wallet.


Title: Re: Help, I think i lost some BTC
Post by: jackjack on August 24, 2011, 09:03:52 PM
awh :(  I tried Recuva, it recovered the wallet.dat but it was corrupted  :-\

Thanks anyways guys.
Keep it
Download Hexedit and open your corrupted wallet.dat
Each "02010104" is followed by 64 characters (ie 32 bytes), which are a private key
Save them all, import them with pywallet and hope the good key was recovered, not likely but it's worth trying


I have gotten my private keys from a wallet.dat using a hex editor.  I modified a python script to accept hex formatted keys and let it insert them into a working wallet.
You modified which tool? Pywallet accept hex keys and I don't know other python scripts


Title: Re: Help, I think i lost some BTC
Post by: dayfall on August 24, 2011, 10:18:37 PM
You modified which tool? Pywallet accept hex keys and I don't know other python scripts

Odd.   Im pretty sure I wrote this code.  I think the python script I got only accepted base58, base64 and binary.

Code:
def privkey_hex_bin(priv_hex):
    # Cut out whitespace
    priv_hex = re.sub("[ \t\n]", "", priv_hex)
    binary_string = ''
    for i in range(0, 279*2, 2):
        binary_string = binary_string + binascii.unhexlify(priv_hex[i]+priv_hex[i+1])
    if len(priv_hex) == (279*2):
        return binary_string
    else:
        raise ValueError("Expected a key of 279*2 digits")


Title: Re: Help, I think i lost some BTC
Post by: memvola on August 25, 2011, 05:01:41 PM
Its at 92905 blocks right now, but only showing 3 transactions, there should be 4.

Sorry, I don't know if you solved the problem but your above comment indicates that you haven't downloaded the complete blockchain, so it would be expected for the transaction to not show up.

And an additional point: Even if you don't see a receiving address in the GUI, your next 100 addresses are actually stored in your wallet, so you probably already have the private key in your backup wallet.


Title: Re: Help, I think i lost some BTC
Post by: joulesbeef on August 25, 2011, 05:08:50 PM
awh :(  I tried Recuva, it recovered the wallet.dat but it was corrupted  :-\

Thanks anyways guys.


happened to me, dont give up hope


I used fixwallet from bitcoin tools (https://bitcointalk.org/index.php?topic=11331.0)

if that doesnt work you can still get it back manually..i you can see the kyes from the dump, but couldnt rebuild pywallet is great.. if not you can still get some keys back with a hex editor... depending on how many coins are in there and how much effort you want to do.


Title: Re: Help, I think i lost some BTC
Post by: kokjo on August 25, 2011, 05:14:17 PM
Its at 92905 blocks right now, but only showing 3 transactions, there should be 4.
then WAIT!!!

the transaction is not broadcasted anylonger, when its included in a block. just wait for that block to be downloaded.

most problem with bitcoin transactions are sloved by waiting.


Title: Re: Help, I think i lost some BTC
Post by: joulesbeef on August 25, 2011, 05:22:44 PM
Quote
most problem with bitcoin transactions are sloved by waiting.



....



Quote
I will try that, it was a new address, its not in this wallet's address book :\

He can wait until the cows come home....the backups not going to have his new keys.

Did I mention that wallet is a horrible term for wallet.dat when it should be keys.dat.. your coin isnt stored there, your keys are.
You dont have to rebackup every time money changes hands, you do when you make a new key.


Title: Re: Help, I think i lost some BTC
Post by: kokjo on August 25, 2011, 05:26:33 PM
Did I mention that wallet is a horrible term for wallet.dat when it should be keys.dat.. your coin isnt stored there, your keys are.
You dont have to rebackup every time money changes hands, you do when you make a new key.
no.
the wallet contains 100 unused keys. they may be used for change.
its every 100 outgoing transaction you need to backup your wallet, or 100 creates of new addresses.

some how i don't think you much about bitcoin...


Title: Re: Help, I think i lost some BTC
Post by: joulesbeef on August 25, 2011, 05:56:20 PM
Did I mention that wallet is a horrible term for wallet.dat when it should be keys.dat.. your coin isnt stored there, your keys are.
You dont have to rebackup every time money changes hands, you do when you make a new key.
no.
the wallet contains 100 unused keys. they may be used for change.
its every 100 outgoing transaction you need to backup your wallet, or 100 creates of new addresses.

some how i don't think you much about bitcoin...


are you just a jerk were ever you go?

jackjack said simular above

Quote
If it was a new address you generated after the backup I'm afraid I have bad news for you

you are correct on this one (https://en.bitcoin.it/wiki/Securing_your_wallet) which is amazing, since you were so incorrect in talking about bitparking fees and suggesting they had zero and that doublec probably did need to steal that guys 4.5 coins.

How about follow someone else around and be a jerk to them



Title: Re: Help, I think i lost some BTC
Post by: kokjo on August 25, 2011, 06:01:56 PM
Did I mention that wallet is a horrible term for wallet.dat when it should be keys.dat.. your coin isnt stored there, your keys are.
You dont have to rebackup every time money changes hands, you do when you make a new key.
no.
the wallet contains 100 unused keys. they may be used for change.
its every 100 outgoing transaction you need to backup your wallet, or 100 creates of new addresses.

some how i don't think you much about bitcoin...


are you just a jerk were ever you go?

jackjack said simular above
no but you apparently are. you are talking about things that you don't understand.
go read: https://en.bitcoin.it/wiki/Man_page#Why_must_users_back_up_their_wallets_every_100_actions.3F

the dude only generated 4 addresses, there should be around 96 usable back in the wallet.

no need for panicking, just wait it will solve it self.


Title: Re: Help, I think i lost some BTC
Post by: joulesbeef on August 25, 2011, 09:11:25 PM
Did I mention that wallet is a horrible term for wallet.dat when it should be keys.dat.. your coin isnt stored there, your keys are.
You dont have to rebackup every time money changes hands, you do when you make a new key.
no.
the wallet contains 100 unused keys. they may be used for change.
its every 100 outgoing transaction you need to backup your wallet, or 100 creates of new addresses.

some how i don't think you much about bitcoin...


are you just a jerk were ever you go?

jackjack said simular above
no but you apparently are. you are talking about things that you don't understand.
go read: https://en.bitcoin.it/wiki/Man_page#Why_must_users_back_up_their_wallets_every_100_actions.3F

the dude only generated 4 addresses, there should be around 96 usable back in the wallet.

no need for panicking, just wait it will solve it self.

I just linked that site dude. How about read a little bit and cut down on the profanity and the abrasiveness. You got way too pissed off when i said it was unlikely that bitparking would steal 4 BTC since they charge fees on trades. Started throwing the fbomb all over.. what is wrong with you dude?  Someone run over your dog, or just a jerk 24/7 for no cause?



Title: Re: Help, I think i lost some BTC
Post by: memvola on August 25, 2011, 10:03:11 PM
I just linked that site dude. How about read a little bit and cut down on the profanity and the abrasiveness. You got way too pissed off when i said it was unlikely that bitparking would steal 4 BTC since they charge fees on trades. Started throwing the fbomb all over.. what is wrong with you dude?  Someone run over your dog, or just a jerk 24/7 for no cause?

Can you take it elsewhere?

It's already been stated many times, if you see the transaction in block explorer (http://blockexplorer.com/) AND the block chain is fully downloaded AND transaction still doesn't appear, there is a real problem somewhere, because the backup wallet already contains the keys that were created (actually, pulled off the queue) later.

The reason I had asked if the address was newly created is this; there was a bug in the client (not sure about the version) which delayed the creation of the 100 queued keys until the second key is created. So if you install the client, create a wallet, immediately back it up and then continue using it without updating the backup, you won't be able to restore newer keys from the first backup wallet. I'm sure it's fixed now though... At any rate, if you already had more than one key in your backup wallet, this won't affect you.


Title: Re: Help, I think i lost some BTC
Post by: kokjo on August 26, 2011, 07:47:02 AM
You got way too pissed off when i said it was unlikely that bitparking would steal 4 BTC since they charge fees on trades.
its the thread derailing and you limited knowledge about the subject you are pretending to be an expert on, im pissed off about.
i know they have fees, but thats not what the dude was talking about.