Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Frodek on April 29, 2012, 03:16:51 PM



Title: Why wallet.dat.rewrite ?
Post by: Frodek on April 29, 2012, 03:16:51 PM
Near wallet.dat I have wallet.dat.rewrite? If I delete this file I send bitcoins without fee, if I restore this file, fee is again.
What about this file? This file is encrypted or not? If not encrypted, this is dangerous.


Title: Re: Why wallet.dat.rewrite ?
Post by: Rothgar on April 29, 2012, 08:19:26 PM
I don't have this file.  I am interested in the answer to this question.  Maybe someone knows?   ???


Title: Re: Why wallet.dat.rewrite ?
Post by: FreeMoney on April 29, 2012, 08:20:27 PM
Seems odd, what version of Bitcoin?


Title: Re: Why wallet.dat.rewrite ?
Post by: mcorlett on April 29, 2012, 08:21:06 PM
https://bitcointalk.org/index.php?topic=54717.msg653898#msg653898


Title: Re: Why wallet.dat.rewrite ?
Post by: neo_rage on April 29, 2012, 10:13:52 PM
I think so this file is backup of your wallet, which occurs when you update the client.


Title: Re: Why wallet.dat.rewrite ?
Post by: Stephen Gornick on April 29, 2012, 10:59:09 PM
Near wallet.dat I have wallet.dat.rewrite? If I delete this file I send bitcoins without fee, if I restore this file, fee is again.

Having a fee required has nothing to do with whether or not that file exists.  When a spend transaction occurs, the code looks at your wallet and based on the makeup of the coins it will determine if a fee will be required.  So that is why one transaction might not require any fee, and the next transaction, nearly identical and just a few seconds later might differ and a fee is required.

As far as wallet.dat.rewrite, that can be purged.  If you are worried about security, you can spend your entire balance to a new address (that is now protected with encryption)  so that the old addresses (prior to when you started encryption) have no balance.   And, of course, no longer use those old addresses for any incoming payments.


Title: Re: Why wallet.dat.rewrite ?
Post by: Frodek on April 30, 2012, 10:12:23 AM
Seems odd, what version of Bitcoin?
I install client Bitcoin a few days ago from Ubuntu PPA. Unfortunately has not menu About with version number.


Title: Re: Why wallet.dat.rewrite ?
Post by: Frodek on April 30, 2012, 10:15:45 AM
https://bitcointalk.org/index.php?topic=54717.msg653898#msg653898
"wallet.dat.rewrite SHOULD be automatically removed as part of the upgrade-to-0.5 process; I don't know why it isn't in some cases-- and, frankly, I would much rather spend time getting really, truly secure wallet solutions working."

wallet.dat.rewrite not removed - it is very dangerous because it is not crypted


Title: Re: Why wallet.dat.rewrite ?
Post by: foo on August 03, 2012, 04:32:03 AM
Bumping this old thread because I noticed that I still have a wallet.dat.rewrite in my data directory, even though I'm now on 0.6.3...

What exactly does this file contain? If it's true that it contains unencrypted private keys, then it is quite dangerous to leave it lying around.


Title: Re: Why wallet.dat.rewrite ?
Post by: Pieter Wuille on August 03, 2012, 11:24:54 AM
Bumping this old thread because I noticed that I still have a wallet.dat.rewrite in my data directory, even though I'm now on 0.6.3...

What exactly does this file contain? If it's true that it contains unencrypted private keys, then it is quite dangerous to leave it lying around.

If you don't delete the file, it will remain there.

What happens is that when you encrypt your wallet, a new encrypted version of the wallet is written to wallet.dat.rewrite. Then the old one is closed, and the rewrite is renamed to wallet.dat. If for any reason that rename fails, the rewrite file stays there. This file does not contain unencrypted private keys, ever.