Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: mrjoebruno on June 10, 2011, 09:17:45 PM



Title: Question about wallet
Post by: mrjoebruno on June 10, 2011, 09:17:45 PM
Does the wallet.dat need to be backed up after each transaction? Its not clear. I've back it up plenty of times and was just wondering if it was necessary after each new BTC received. I'm guessing yes but wanted to make sure.


Title: Re: Question about wallet
Post by: lonestranger on June 10, 2011, 09:22:45 PM
I want to see the answers to this because I am so confused about the wallet! I just encrypted my wallet.dat, I think, using truecrypt. That is, I encrypted a BACKUP of wallet.dat. But the original wallet.dat is sitting there on my drive unencrypted and seemingly vulnerable as hell! I still don't get how to have a long-term, deep storage wallet and another spending money wallet.

Any help with this stuff would be most appreciated. Might even get a tip!


Title: Re: Question about wallet
Post by: Pieter Wuille on June 10, 2011, 09:25:12 PM
Each wallet already contains 100 "future" keys that aren't used yet, but will be for new transactions. If you have a backup and did at most 100 transactions (sent) since then, you should be fine.


Title: Re: Question about wallet
Post by: lonestranger on June 10, 2011, 09:32:48 PM
Question 1: Why should I generate new addresses?


Title: Re: Question about wallet
Post by: Garrett Burgwardt on June 10, 2011, 09:34:11 PM
You don't have to, but it's just default policy to use a new address for every transaction.


Title: Re: Question about wallet
Post by: foo on June 10, 2011, 10:17:09 PM
I want to see the answers to this because I am so confused about the wallet! I just encrypted my wallet.dat, I think, using truecrypt. That is, I encrypted a BACKUP of wallet.dat. But the original wallet.dat is sitting there on my drive unencrypted and seemingly vulnerable as hell! I still don't get how to have a long-term, deep storage wallet and another spending money wallet.

Any help with this stuff would be most appreciated. Might even get a tip!
Bitcoin will eventually encrypt wallet.dat, but it does not yet do that.

To have a secure "savings account" wallet, I would suggest installing Bitcoin inside a VirtualBox VM. That way any viruses on the host computer can't access the wallet. You only need to boot up the VM when you want to spend coins, you can receive them while Bitcoin isn't running, and check the balance on blockexplorer.com.


Title: Re: Question about wallet
Post by: MoonShadow on June 10, 2011, 10:33:30 PM
Does the wallet.dat need to be backed up after each transaction? Its not clear. I've back it up plenty of times and was just wondering if it was necessary after each new BTC received. I'm guessing yes but wanted to make sure.

No, because the client automaticly generates 100 keypairs for future use upon first boot.  It will use a new keypair with each send by default, and everytime that you hit the 'new address' button.  Those keypairs (and addresses) are good forever, so as long as you back up at least as often as once every 100 transactions you will be okay.
You can also tell it to make a lot more for you by starting it with
 the -keypool=somenumber switch.


Title: Re: Question about wallet
Post by: Dude65535 on June 10, 2011, 10:35:13 PM
Question 1: Why should I generate new addresses?

The practical reason is that it helps you know where the bitcoins came from. If you give each person you deal with a different address you know who sent the bitcoins by which address received them. The paranoid reason is that by using a different address each time it makes it harder to tell which transactions came or went from a single person.

You must backup again when the number of times you have sent coins + the number of new addresses you have created is 100 higher than the last time you backed up. For safety you should do so at 50 or earlier. If you want to be paranoid about wallet backups you should back up every time you make a new address or send bitcoins. Receiving bitcoins does not require a new backup.

The wallet stores proof of ownership of an address rather than the bitcoins. The bitcoins are stored on every computer with a copy of the block chain but your wallet is what allows you to spend yours.

The reason you may need a new backup after sending coins is that one or more group of coins you have received is sent with part going to the address you sent them to and the rest going back to you at a new address. If that new address is not in your old backup you will lose those bitcoins.


Title: Re: Question about wallet
Post by: MoonShadow on June 10, 2011, 10:36:18 PM
You don't have to, but it's just default policy to use a new address for every transaction.

Using a different address can improve your anonimity, but if you would rather just give a different address to each person that you transact with, those addresses are still good forever.  So you don't have to tell a new address to your friends just because you changed the address that the client displays.


Title: Re: Question about wallet
Post by: lonestranger on June 11, 2011, 01:35:34 AM
Question 2: Why does the client create a new address every time I receive coins?


Title: Re: Question about wallet
Post by: MoonShadow on June 11, 2011, 01:37:08 AM
Question 2: Why does the client create a new address every time I receive coins?

It doesn't.  It creates a new address every time you send coins, or ask it to do so.


Title: Re: Question about wallet
Post by: lonestranger on June 11, 2011, 01:54:25 AM
I'm pretty sure when I send coins from Mt Gox to my account the string in "Your Bitcoin address:" changes. You don't think so?


Title: Re: Question about wallet
Post by: MoonShadow on June 11, 2011, 02:09:43 AM
I'm pretty sure when I send coins from Mt Gox to my account the string in "Your Bitcoin address:" changes. You don't think so?

MtGox is not your wallet.  It's a website.


Title: Re: Question about wallet
Post by: bitlotto on June 11, 2011, 02:12:34 AM
No, because the client automaticly generates 100 keypairs for future use upon first boot. 
I think there is a bug that this isn't the case? I think you have to receive or send something first then wait a while...I think?


Title: Re: Question about wallet
Post by: lonestranger on June 11, 2011, 02:15:43 AM
MtGox is not your wallet.  It's a website.

No, I'm saying the "Your bitcoin address:" in my local client. The address changes each time I receive coins from Mt Gox.


Title: Re: Question about wallet
Post by: Dude65535 on June 11, 2011, 02:21:47 AM
I think it only changes the first time you receive coins at a new address and only if the address that received the coins is still the one displayed. This is to encourage you to use a new address for each transaction. This improves both your ability to track where your bitcoins came from and also your privacy.


Title: Re: Question about wallet
Post by: MoonShadow on June 11, 2011, 02:22:10 AM
MtGox is not your wallet.  It's a website.

No, I'm saying the "Your bitcoin address:" in my local client. The address changes each time I receive coins from Mt Gox.

Ah, must be a new thing.  I've never noticed my older client changing the address without me explicitly telling it to do so.


Title: Re: Question about wallet
Post by: lonestranger on June 11, 2011, 02:25:29 AM
I'm running 0.3.21-beta


Title: Re: Question about wallet
Post by: 2_Thumbs_Up on June 11, 2011, 02:32:02 AM
Question 2: Why does the client create a new address every time I receive coins?
It does so because it's recommended to use a new adress for every transaction. Your old adresses are still valid though.


Title: Re: Question about wallet
Post by: lonestranger on June 11, 2011, 02:40:47 AM
It does so because it's recommended to use a new adress for every transaction. Your old adresses are still valid though.

Yes, but why?


Title: Re: Question about wallet
Post by: lonestranger on June 11, 2011, 02:41:48 AM
Question 3: Why are we advised to turn off the bitcoin client before copying wallet.dat?


Title: Re: Question about wallet
Post by: 2_Thumbs_Up on June 11, 2011, 02:59:33 AM
It does so because it's recommended to use a new adress for every transaction. Your old adresses are still valid though.

Yes, but why?

Main reason is privacy.

If you only use one adress and that adress is somehow linked to your person, then every single transaction you ever made would be public. If an adress is compromised now, only a fraction of your activity will be known.


Title: Re: Question about wallet
Post by: ArdaXi on June 11, 2011, 07:29:25 AM
Question 3: Why are we advised to turn off the bitcoin client before copying wallet.dat?
Because otherwise it's possible that the client is writing to it as you're backing up. You can also backup using the RPC interface if you run it using -server.


Title: Re: Question about wallet
Post by: lonestranger on June 12, 2011, 06:08:49 PM
You can also backup using the RPC interface if you run it using -server.

Sorry, you lost me there.


Title: Re: Question about wallet
Post by: lonestranger on June 12, 2011, 06:11:34 PM
Another wallet question!:

If I want to create a wallet with one, single, unique bitcoin address to be used for long-term, deep-storage HOW do I do it? (Is this where I load bitcoin client onto a fresh computer and note the address given in "Your bitcoin address:"?) What then?


Title: Re: Question about wallet
Post by: bcearl on June 12, 2011, 06:30:39 PM
Another wallet question!:

If I want to create a wallet with one, single, unique bitcoin address to be used for long-term, deep-storage HOW do I do it? (Is this where I load bitcoin client onto a fresh computer and note the address given in "Your bitcoin address:"?) What then?

Then you can send money there. You only have to get the wallet online when you want to spend money from that wallet.


Title: Re: Question about wallet
Post by: bcearl on June 12, 2011, 06:34:32 PM
To have a secure "savings account" wallet, I would suggest installing Bitcoin inside a VirtualBox VM. That way any viruses on the host computer can't access the wallet. You only need to boot up the VM when you want to spend coins, you can receive them while Bitcoin isn't running, and check the balance on blockexplorer.com.

Bullshit. That will protect your viruses against Bitcoin, not the other way around.


Title: Re: Question about wallet
Post by: foo on June 13, 2011, 09:11:20 AM
To have a secure "savings account" wallet, I would suggest installing Bitcoin inside a VirtualBox VM. That way any viruses on the host computer can't access the wallet. You only need to boot up the VM when you want to spend coins, you can receive them while Bitcoin isn't running, and check the balance on blockexplorer.com.

Bullshit. That will protect your viruses against Bitcoin, not the other way around.
Fuck you. Hey look, I can be a potty mouth too! Put a TrueCrypt drive inside the VM and I'd like to see the virus that gets at the wallet.dat...


Title: Re: Question about wallet
Post by: bcearl on June 13, 2011, 09:32:41 AM
To have a secure "savings account" wallet, I would suggest installing Bitcoin inside a VirtualBox VM. That way any viruses on the host computer can't access the wallet. You only need to boot up the VM when you want to spend coins, you can receive them while Bitcoin isn't running, and check the balance on blockexplorer.com.

Bullshit. That will protect your viruses against Bitcoin, not the other way around.
Fuck you. Hey look, I can be a potty mouth too! Put a TrueCrypt drive inside the VM and I'd like to see the virus that gets at the wallet.dat...

Then it's only protected while the machine is not running. There is no advantage over a encrypted wallet file without VM.