Stone Man



Offline



Activity: 28

Merit: 0







NewbieActivity: 28Merit: 0 Lost large number of bitcoins August 10, 2010, 11:15:16 PM #1



1) Bought 9,000 BTC on one of the exchanges over time.

2) Transferred them to my client running on a linux live CD distro of Debian.

3) Backed up the wallet file to a flash drive.

4) Sent 1 BTC to myself

5) Closed client before any confirmations

6) Shut down system (wiped system disk loaded into memory and therefore the ./bitcoin folder

7) Loaded system back up

Copied old wallet.dat file into ./bitcoin folder

9) After some confirmations appeared the balance was 1 BTC and there was a transaction saying I spent 8,900 BTC to an address I did not recognize

10) I read on the forum threads that people have had problems like this but it seemed only when they were trying to double-spend by sending coins to another address and reloading an old wallet file





Is there anything I can do?



I do have the address that the 8,900 were supposedly sent to but the old wallet file is gone for good.



Thanks,

Stone Man Here are the details.1) Bought 9,000 BTC on one of the exchanges over time.2) Transferred them to my client running on a linux live CD distro of Debian.3) Backed up the wallet file to a flash drive.4) Sent 1 BTC to myself5) Closed client before any confirmations6) Shut down system (wiped system disk loaded into memory and therefore the ./bitcoin folder7) Loaded system back upCopied old wallet.dat file into ./bitcoin folder9) After some confirmations appeared the balance was 1 BTC and there was a transaction saying I spent 8,900 BTC to an address I did not recognize10) I read on the forum threads that people have had problems like this but it seemed only when they were trying to double-spend by sending coins to another address and reloading an old wallet fileIs there anything I can do?I do have the address that the 8,900 were supposedly sent to but the old wallet file is gone for good.Thanks,Stone Man

Insti



Offline



Activity: 294

Merit: 251





Firstbits: 1duzy







Sr. MemberActivity: 294Merit: 251Firstbits: 1duzy Re: Lost large number of bitcoins August 10, 2010, 11:23:11 PM

Last edit: August 10, 2010, 11:36:40 PM by Insti #3







Lesson to other people: Remember you need to back your wallet up after every transaction!

(The wallet metaphor is actually a bad one, because it makes problems like this more common than they should be.)



Edit: (more explaination)



When you do a transaction you always spend ALL of the coins in that address, part of the money goes to whoever you're paying, and there rest is returned to you an a new 'change' address. (This helps your anonymity as someone watching cannot tell which amount you spent and which amount you kept.)



Before transaction:

Address1: 9000

Address2: 0



After transaction:

Address1: 0

Address2: 1

Address3: 8999



It sounds like you have wallet.dat that contains the private keys for Address1 and Address2, but not Address3.

(Although the numbers in your story don't add up.)

What were the Bitcoin addresses? (If we know these we can do some more in-depth block chain research)







It sounds like they are lost for good.Lesson to other people: Remember you need to back your wallet up after every transaction!(The wallet metaphor is actually a bad one, because it makes problems like this more common than they should be.)Edit: (more explaination)When you do a transaction you always spend ALL of the coins in that address, part of the money goes to whoever you're paying, and there rest is returned to you an a new 'change' address. (This helps your anonymity as someone watching cannot tell which amount you spent and which amount you kept.)Before transaction:Address1: 9000Address2: 0After transaction:Address1: 0Address2: 1Address3: 8999It sounds like you have wallet.dat that contains the private keys for Address1 and Address2, but not Address3.(Although the numbers in your story don't add up.)What were the Bitcoin addresses? (If we know these we can do some more in-depth block chain research)

Insti



Offline



Activity: 294

Merit: 251





Firstbits: 1duzy







Sr. MemberActivity: 294Merit: 251Firstbits: 1duzy Re: Lost large number of bitcoins August 11, 2010, 01:08:08 AM

Last edit: August 11, 2010, 01:21:37 AM by Insti #7

To look for your transactions in the block chain.



(Here are the edited highlights)

Code: python dbdump.py --search-blocks 157PiPgqphedUvrco3mKU3Xoof7yzhj9pW



Block: 73261

Time: Mon Aug 9 22:08:34

734 tx in, 1 out

['TxIn: .... <snipped. There were a lot> ']

['TxOut: value: 9000.00 pubkey: 157PiPgqphedUvrco3mKU3Xoof7yzhj9pW Script: DUP HASH160 20:2d15...8e7a EQUALVERIFY CHECKSIG']



Block: 73272

Time: Mon Aug 9 23:35:11 2010

1 tx in, 2 out

['TxIn: prev(8bda...4675:0) pubkey: 157PiPgqphedUvrco3mKU3Xoof7yzhj9pW sig: 72:3045...5301 65:04bc...2d42']

['TxOut: value: 1.00 pubkey: 157PiPgqphedUvrco3mKU3Xoof7yzhj9pW Script: DUP HASH160 20:2d15...8e7a EQUALVERIFY CHECKSIG',

'TxOut: value: 8999.00 pubkey: 167ZWTT8n6s4ya8cGjqNNQjDwDGY31vmHg Script: DUP HASH160 20:3816...7437 EQUALVERIFY CHECK SIG']



So the transactions are definitly in there.

Your only hope is to have the private key for the 167ZWTT8n6s4ya8cGjqNNQjDwDGY31vmHg address.



If you can get bitcointools working you can dump your wallet.dat using:

Code: python dbdump.py --wallet

which will show you all the keys you know about in your wallet.

But you'll probably find that 167ZWTT8n6s4ya8cGjqNNQjDwDGY31vmHg is not in there



On the upside, (although it is probably of no consolation to you) there is now a decent bounty for anyone who can find an address collision...



Edit: I'd pasted the wrong block number and date for the first block. Fixed. I used bitcointools: http://github.com/gavinandresen/bitcointools To look for your transactions in the block chain.(Here are the edited highlights)So the transactions are definitly in there.Your only hope is to have the private key for the 167ZWTT8n6s4ya8cGjqNNQjDwDGY31vmHg address.If you can get bitcointools working you can dump your wallet.dat using:which will show you all the keys you know about in your wallet.But you'll probably find that 167ZWTT8n6s4ya8cGjqNNQjDwDGY31vmHg is not in thereOn the upside, (although it is probably of no consolation to you) there is now a decent bounty for anyone who can find an address collision...

Stone Man



Offline



Activity: 28

Merit: 0







NewbieActivity: 28Merit: 0 Re: Lost large number of bitcoins August 11, 2010, 01:10:43 AM #8 Quote from: FreeMoney on August 10, 2010, 11:56:19 PM Oh, man. Why did you send the 1? Were you just testing to see how the backup worked? Why with so many coins?



That sucks.



Actually, the sad part was I wasn't even testing the wallet backup when this happened. I was trying to watch when the network should have confirmed a payment to a website that takes bitcoins by paying myself 1 coin at about the same time. I never dreamed it could compromise my whole balance, especially since I was sending to myself.



Actually, the sad part was I wasn't even testing the wallet backup when this happened. I was trying to watch when the network should have confirmed a payment to a website that takes bitcoins by paying myself 1 coin at about the same time. I never dreamed it could compromise my whole balance, especially since I was sending to myself.

gridecon



Offline



Activity: 35

Merit: 0







NewbieActivity: 35Merit: 0 Re: Lost large number of bitcoins August 11, 2010, 01:44:09 AM #10 Until this thread I was totally unaware of this behavior and risk. The usual behavior of a "backup" of a file is to preserve the contents of that file, and the intuitive understand of the wallet.dat file is that it "contains" the coins. I understand this is a case of the system behaving as designed, but the information that you need to backup your wallet after every transaction and each transaction makes your old wallet backups useless needs to be communicated much more clearly to users, I think. It also seems to me that it would be useful to add features for 'automatic backup' of a wallet after each transaction and easy support for multiple wallets - a "savings account" and a "checking account" so to speak.



Sorry about your loss, Stone Man.

BioMike



Offline



Activity: 1658

Merit: 1001







LegendaryActivity: 1658Merit: 1001 Re: Lost large number of bitcoins August 11, 2010, 05:38:22 AM #12 Quote from: Wiki page "address" This has the implication that if you create a receiving address and receive coins to that address, then restore the wallet from an earlier backup, before the address was generated, then the coins associated with that address are lost. If you lose your wallet entirely, all of your coins are lost and can never be recovered.



Quote from: Insti on August 11, 2010, 01:08:08 AM On the upside, (although it is probably of no consolation to you) there is now a decent bounty for anyone who can find an address collision...



So, they aren't lost forever? I guess it is more likely to generate the key of the address of someone else then from this specific address. So, they aren't lost forever? I guess it is more likely to generate the key of the address of someone else then from this specific address.

Insti



Offline



Activity: 294

Merit: 251





Firstbits: 1duzy







Sr. MemberActivity: 294Merit: 251Firstbits: 1duzy Re: Lost large number of bitcoins August 11, 2010, 07:38:32 AM #13 Quote from: gridecon on August 11, 2010, 01:44:09 AM Until this thread I was totally unaware of this behavior and risk. The usual behavior of a "backup" of a file is to preserve the contents of that file, and the intuitive understand of the wallet.dat file is that it "contains" the coins. I understand this is a case of the system behaving as designed, but the information that you need to backup your wallet after every transaction and each transaction makes your old wallet backups useless needs to be communicated much more clearly to users, I think. It also seems to me that it would be useful to add features for 'automatic backup' of a wallet after each transaction and easy support for multiple wallets - a "savings account" and a "checking account" so to speak.

If you backup a spreadsheet, do you not expect to lose changes you made after that backup when you restore?



There are many types of transactions that will survive a wallet restore. This is one of the circumstances in which you will lose coins.

If he'd transferred all 9000 to the address he would still have them.



I'm not trying to blame the user. I agree this is a problem that needs to be fixed.



This problem has been previously identified and there are plans to implement a fix, which has been talked about in the



Perhaps a bounty is in order?



Quote from: BioMike on August 11, 2010, 05:38:22 AM Quote from: Insti on August 11, 2010, 01:08:08 AM On the upside, (although it is probably of no consolation to you) there is now a decent bounty for anyone who can find an address collision...

So, they aren't lost forever? I guess it is more likely to generate the key of the address of someone else then from this specific address.

So, they aren't lost forever? I guess it is more likely to generate the key of the address of someone else then from this specific address.

(You're more likely to get struck by lightning, win all the worlds lotteries, and then get abducted by aliens on the same day.)



However if you manage to find a weakness in a) the encryption method or b) Bitcoins implementation of it. it may make it easy enough that you don't have to get abducted by aliens as well.



So they practically are lost forever.



If you backup a spreadsheet, do you not expect to lose changes you made after that backup when you restore?There are many types of transactions that will survive a wallet restore. This is one of the circumstances in which you will lose coins.If he'd transferred all 9000 to the address he would still have them.I'm not trying to blame the user. I agree this is a problem that needs to be fixed.This problem has been previously identified and there are plans to implement a fix, which has been talked about in the Privacy versus Safety: handling change thread. But it has not been implemented yet.Perhaps a bounty is in order?According to the theory, generating a address collision is so remotely unlikely as to never happen.(You're more likely to get struck by lightning, win all the worlds lotteries, and then get abducted by aliens on the same day.)However if you manage to find a weakness in a) the encryption method or b) Bitcoins implementation of it. it may make it easy enough that you don't have to get abducted by aliens as well.So they practicallylost forever.

caveden



Offline



Activity: 1106

Merit: 1002









LegendaryActivity: 1106Merit: 1002 Re: Lost large number of bitcoins August 11, 2010, 07:54:01 AM #14 Quote from: gridecon on August 11, 2010, 01:44:09 AM Until this thread I was totally unaware of this behavior and risk. The usual behavior of a "backup" of a file is to preserve the contents of that file, and the intuitive understand of the wallet.dat file is that it "contains" the coins. I understand this is a case of the system behaving as designed, but the information that you need to backup your wallet after every transaction and each transaction makes your old wallet backups useless needs to be communicated much more clearly to users, I think. It also seems to me that it would be useful to add features for 'automatic backup' of a wallet after each transaction and easy support for multiple wallets - a "savings account" and a "checking account" so to speak.



Sorry about your loss, Stone Man.



+1



This shocked me actually. The poor guy didn't do anything stupid.



Automatic backups are really important after knowing that. And while that cannot be implemented, I think a sort of information message explained this in short words should be displayed every time someone sends coins. A popup saying something like, if I have T coins and I send S coins:

"S coins where sent to address X.

(T-S) coins where sent to address Y, which belongs to you, in order to improve privacy. Please, realize that old backups you might have of your wallet will now be useless. You should make a new one."



This simple message would have avoided this awful lost. (of course, you may also add a "Don't display this again" check box)



Regards +1This shocked me actually. The poor guy didn't do anything stupid.Automatic backups are really important after knowing that. And while that cannot be implemented, I think a sort of information message explained this in short words should be displayed every time someone sends coins. A popup saying something like, if I have T coins and I send S coins:"S coins where sent to address X.(T-S) coins where sent to address Y, which belongs to you, in order to improve privacy. Please, realize that old backups you might have of your wallet will now be useless. You should make a new one."This simple message would have avoided this awful lost. (of course, you may also add a "Don't display this again" check box)Regards

QuantumMechanic



Offline



Activity: 110

Merit: 16







MemberActivity: 110Merit: 16 Re: Lost large number of bitcoins August 11, 2010, 08:10:19 AM #15



Quote from: satoshi on July 17, 2010, 04:27:39 PM We should queue up a supply of pre-made addresses in the wallet to use when a new address is needed. They aren't very big, so it wouldn't hurt to have a lot of them. This would more generally cover the case also where someone backs up, then requests a new address and receives a big payment with it. Maybe there should be separate queues so one type of demand on addresses doesn't deplete it for the others.



The addresses would be created and stored in the normal place, but also listed on a separate list of created-but-never-used addresses. When an address is requested, the address at the front of the never-used queue is handed out, and a new address is created and added to the back.



There's some kind of rescan in the block loading code that was made to repair the case where someone copied their wallet.dat. I would need to check that the rescan handles the case of rediscovering received payments in blocks that were already received, but are forgotten because the wallet was restored.

I think Satoshi proposed a protection against this in the following post:

skull88



Offline



Activity: 683

Merit: 500









Hero MemberActivity: 683Merit: 500 Re: Lost large number of bitcoins August 11, 2010, 10:45:55 AM #17

Stoneman didn't really do anything stupid. Good to know this, I thougt I was save with my backups, but it could have happened to me to.Stoneman didn't really do anything stupid. BTC: 1MifMqtqqwMMAbb6zr8u6qEzWqq3CQeGUr

LTC: LhvMYEngkKS2B8FAcbnzHb2dvW8n9eHkdp

Ground Loop



Offline



Activity: 111

Merit: 10







MemberActivity: 111Merit: 10 Re: Lost large number of bitcoins August 11, 2010, 05:31:24 PM #18 News to me is that *all* your coins are at risk. I thought it was just clumps of coins (previously received transactions) involved in the transaction, not my aggregate balance. Yikes.



As a countermeasure, I've manually split my wallet up into five new wallets of distributed value. Now only one is at risk at any given time.

Bitcoin accepted here: 1HrAmQk9EuH3Ak6ugsw3qi3g23DG6YUNPq