Bitcoin Forum

Bitcoin => Electrum => Topic started by: bacada105 on March 11, 2013, 01:58:00 AM



Title: Missing bitcoins after restoring seed.
Post by: bacada105 on March 11, 2013, 01:58:00 AM
Hello, I'm having some trouble with Electrum. Somehow my wallet.dat file got corrupted so I had to remove it and reseed Electrum to rebuild my wallet. After allowing Electrum to sync my balance is not the same as it was before in fact I'm missing upwards to 40btc :(. Any ideas on why this would has happened or what I can to do correct this?

Thanks


Title: Re: Missing bitcoins after restoring seed.
Post by: bacada105 on March 11, 2013, 04:01:44 AM
So i'm looking through my transaction history from yesterday and I'm seeing bitcoins going out to addresses I never send coins to yesterday in amounts I did not enter? An example of this is http://blockchain.info/tx/a2f85338e1b5e42705c4feb5054014c434974e20fc4aada09ad7265b022dab98 (http://blockchain.info/tx/a2f85338e1b5e42705c4feb5054014c434974e20fc4aada09ad7265b022dab98) transaction. I did try one or two simple rolls of about 1 BTC to DiconCrack yesterday for fun, but I never sent 4.65088605BTC to address 1Fr5ZKESoj8PzjzXY4tabrAeDQxnGGzUAV? I'm seeing lots of transactions like this in my history the funny thing is my history was looking exactly as I'd expect before I restored my seed, In fact my history looks completely different from before reseeding. Is it possible my Electrum client had malware that was sending payments out coupled with other transactions I performed or could this happen by connecting to a compromised server?

More examples:
http://blockchain.info/tx-index/59400349/b7eac3ec1b4cb9ed926826cd156d5b3fcbce0575bdd6faed077bab7a2c63d9be (http://blockchain.info/tx-index/59400349/b7eac3ec1b4cb9ed926826cd156d5b3fcbce0575bdd6faed077bab7a2c63d9be)
http://blockchain.info/tx-index/59538635/a585f94f11fb5bee0e00ae2b874936cf3386285122b40316a9f12f014c7eae5d (http://blockchain.info/tx-index/59538635/a585f94f11fb5bee0e00ae2b874936cf3386285122b40316a9f12f014c7eae5d)
http://blockchain.info/tx-index/59402515/676870a302c90fe8416954b4fbf29f64406bd8b863adcf631bf10f5f1fe48f4f (http://blockchain.info/tx-index/59402515/676870a302c90fe8416954b4fbf29f64406bd8b863adcf631bf10f5f1fe48f4f)
http://blockchain.info/tx-index/59531294/af524a783e680962dd1cab2192588edb61ecb1be3f32f4e544e184b8636c752b (http://blockchain.info/tx-index/59531294/af524a783e680962dd1cab2192588edb61ecb1be3f32f4e544e184b8636c752b)


Title: Re: Missing bitcoins after restoring seed.
Post by: odolvlobo on March 11, 2013, 04:12:52 AM
So i'm looking through my transaction history from yesterday and I'm seeing bitcoins going out to addresses I never send coins to yesterday in amounts I did not enter? An example of this is http://blockchain.info/tx/a2f85338e1b5e42705c4feb5054014c434974e20fc4aada09ad7265b022dab98 (http://blockchain.info/tx/a2f85338e1b5e42705c4feb5054014c434974e20fc4aada09ad7265b022dab98) transaction. I did try one or two simple rolls of about 1 BTC to DiconCrack yesterday for fun, but I never sent 4.65088605BTC to address 1Fr5ZKESoj8PzjzXY4tabrAeDQxnGGzUAV? I'm seeing lots of transactions like this in my history the funny thing is my history was looking exactly as I'd expect before I restored my seed, In fact my history looks completely different from before reseeding. Is it possible my Electrum client had malware that was sending payments out coupled with other transactions I performed or could this happen by connecting to a compromised server?

I can't solve your Electrum problem, but the coins being sent to an unknown (to you) address is normal. Read this: https://en.bitcoin.it/wiki/Change


Title: Re: Missing bitcoins after restoring seed.
Post by: bacada105 on March 11, 2013, 04:18:46 AM
Ok I see what your saying I guess the difference is I don't own or have any record of the change addresses bitcoins are being sent to.


Title: Re: Missing bitcoins after restoring seed.
Post by: odolvlobo on March 11, 2013, 04:22:57 AM
Ok I see what your saying I guess the difference is I don't own or have any record of the change addresses bitcoins are being sent to.

Electrum automatically generates and maintains those addresses.


Title: Re: Missing bitcoins after restoring seed.
Post by: bacada105 on March 11, 2013, 04:47:31 AM
Right, but in electrum under receive their should be a nice letter "C" next to the address. In my case the addresses in question don't show up under receive.


Title: Re: Missing bitcoins after restoring seed.
Post by: btcven on March 11, 2013, 08:49:26 AM
Did you have your wallet encrypted? If you restore from a Full server you'll get your entire history.

A compromised server could not broadcast your transactions or not inform you about coins you've received, but never spend your balance as you are the only one carrying your privkeys.

You must have your PC infected, if not with a keylogger encrypted wallet could have helped.


Title: Re: Missing bitcoins after restoring seed.
Post by: lophie on March 12, 2013, 03:16:45 AM
If you ever imported private keys into electrum. They CANNOT be restored from the seed and if you don't have a digital copy of the wallet. They are lost forever.


Title: Re: Missing bitcoins after restoring seed.
Post by: ThomasV on March 13, 2013, 06:14:59 AM
So i'm looking through my transaction history from yesterday and I'm seeing bitcoins going out to addresses I never send coins to yesterday in amounts I did not enter? An example of this is http://blockchain.info/tx/a2f85338e1b5e42705c4feb5054014c434974e20fc4aada09ad7265b022dab98 (http://blockchain.info/tx/a2f85338e1b5e42705c4feb5054014c434974e20fc4aada09ad7265b022dab98) transaction. I did try one or two simple rolls of about 1 BTC to DiconCrack yesterday for fun, but I never sent 4.65088605BTC to address 1Fr5ZKESoj8PzjzXY4tabrAeDQxnGGzUAV? I'm seeing lots of transactions like this in my history the funny thing is my history was looking exactly as I'd expect before I restored my seed, In fact my history looks completely different from before reseeding. Is it possible my Electrum client had malware that was sending payments out coupled with other transactions I performed or could this happen by connecting to a compromised server?

More examples:
http://blockchain.info/tx-index/59400349/b7eac3ec1b4cb9ed926826cd156d5b3fcbce0575bdd6faed077bab7a2c63d9be (http://blockchain.info/tx-index/59400349/b7eac3ec1b4cb9ed926826cd156d5b3fcbce0575bdd6faed077bab7a2c63d9be)
http://blockchain.info/tx-index/59538635/a585f94f11fb5bee0e00ae2b874936cf3386285122b40316a9f12f014c7eae5d (http://blockchain.info/tx-index/59538635/a585f94f11fb5bee0e00ae2b874936cf3386285122b40316a9f12f014c7eae5d)
http://blockchain.info/tx-index/59402515/676870a302c90fe8416954b4fbf29f64406bd8b863adcf631bf10f5f1fe48f4f (http://blockchain.info/tx-index/59402515/676870a302c90fe8416954b4fbf29f64406bd8b863adcf631bf10f5f1fe48f4f)
http://blockchain.info/tx-index/59531294/af524a783e680962dd1cab2192588edb61ecb1be3f32f4e544e184b8636c752b (http://blockchain.info/tx-index/59531294/af524a783e680962dd1cab2192588edb61ecb1be3f32f4e544e184b8636c752b)

there might be a gap in your sequence of change addresses; this is very rare, but I already observed that with another user.
if this is the case, your problem should be fixed with version 1.7
to get a proper diagnostic, PM me your master public key


Title: Re: Missing bitcoins after restoring seed.
Post by: djdollabill on March 16, 2013, 07:48:10 AM
I have had this same problem, and it was a costly one.  It's not really a "feature."  Electrum generates new change addresses when you send money from an imported private key, and these change addresses do not correspond to the imported private key.  I think this is a dangerous unpredictable behavior that needs to get removed from a future version.  At very least, users should be warned when they send money from an imported address not to expect the change to hit that same imported address.  The advice to save all seeds is pointless because it defeats the whole purpose of using a brainwallet--what good is a brainwallet if you have lots of seed files on every machine you touch?


Title: Re: Missing bitcoins after restoring seed.
Post by: ThomasV on March 16, 2013, 08:41:41 AM
I have had this same problem, and it was a costly one.  It's not really a "feature."  Electrum generates new change addresses when you send money from an imported private key, and these change addresses do not correspond to the imported private key.  I think this is a dangerous unpredictable behavior that needs to get removed from a future version. 
No, your problem is completely different from the OP. afaict, the OP's money is not lost.

You imported a private key, sent money from that imported address, and you expected the change to be sent back to your imported address.
However, the change was sent to a change address, which is generated from your seed.
You did not save your seed, and you deleted your wallet, keeping only the private key of your imported address. This is how you lost money.

Concerning your suggestion:
The change coming from an imported key could indeed be sent back to that key, but I am not sure if you really understand all the implications such a behaviour would have:
1. where should change be sent when one transaction input is imported and the other is not? what are the user expectations going to be in that case?
2. in general, it is safer to send change to an Electrum address, because those addresses are recoverable from seed; imported keys are not.

Quote
At very least, users should be warned when they send money from an imported address not to expect the change to hit that same imported address. 

Electrum told you to save your seed, and it also told you to be careful when you imported private keys. You ignored those two warnings.
Do you think that adding a third warning will prevent that? I am not so sure about that...
I am willing to modify the message of the second warning, adding the info you suggest.
However, I do not think it would be a good idea to create a third warning; more warnings result in people paying less attention to them

Quote
The advice to save all seeds is pointless because it defeats the whole purpose of using a brainwallet--what good is a brainwallet if you have lots of seed files on every machine you touch?
You can use the same seed on every machine you use.
This is how people actually use it: create your seed on one machine, and restore your wallet from that seed on other machines.




Title: Re: Missing bitcoins after restoring seed.
Post by: SebastianJu on March 16, 2013, 03:02:38 PM
bacada105... did you use the official version or some versions from the net? I found there are some versions out there beside the normal developers versions and im not sure if they are clean. So if you didnt use the normal versions maybe you was tricked by someone with a changed electrum?


Title: Re: Missing bitcoins after restoring seed.
Post by: btcven on March 16, 2013, 07:59:21 PM
bacada105... did you use the official version or some versions from the net? I found there are some versions out there beside the normal developers versions and im not sure if they are clean. So if you didnt use the normal versions maybe you was tricked by someone with a changed electrum?

Everybody should use the versions from http://electrum.org and check the signed files with the with PGP regularly if downloading from any other source and check they match with the official ones in that given http://electrum.org URL.

Remember Bitcoins are money, please be careful when downloading apps, extensions, plugins in your personal computer.


Title: Re: Missing bitcoins after restoring seed.
Post by: bacada105 on March 23, 2013, 12:09:41 AM
Ok so it turns out I believe at some point I imported private keys into my wallet  :( . I also believe that I found an old version of my wallet that may contain the imported keys. What should my wallet look like if I have imported keys in it? Should I have values under "Imported_Keys, {}"? And finally, how do I decrypt keys inside the wallet manually as I can't us the old wallet with electrum it gives an error?  Here is what my wallet looks like, maybe someone can tell me if I impact do have imported keys.





Title: Re: Missing bitcoins after restoring seed.
Post by: bacada105 on March 23, 2013, 01:32:05 AM
Never mind looks like actually did not have any imported keys in the electrum.dat I found. the value Imported_keys, {} is empty.


Title: Re: Missing bitcoins after restoring seed.
Post by: ThomasV on April 05, 2013, 09:12:29 AM
I have been exchanging several PMs with the OP in order to help him recover his funds.

Since the OP has been completely unresponsive for two weeks, I have decided to post complementary
information here, because the thread title wrongfully suggests that Electrum's recovery from seed may lose some coins.
What I am posting does not contain any private information about the OP's wallet.
I would have preferred him to post such a clarification, and I am doing it myself only because he is not answering.

The OP acknowledged that he had imported private keys in his wallet.
These private keys were generated from his seed, but using a very old version of Electrum (pre 0.31)
At that time, I asked users to move their coins to the new wallet, but instead of that he imported the keys.

Since he believes that he still had the seed for those imported keys, I wrote a python script for him,
that generates addresses and private keys using the pre-0.31 key generation algorithm, and I sent it to him.
I asked him to try that script with his seed, and to see if he could generate the same addresses.

I have not received any answer since then.
I do not know if he has been able to recover his coins using my script, even though I asked him to report back.