Bitcoin Forum

Other => Beginners & Help => Topic started by: Gabi on August 31, 2012, 01:57:52 PM



Title: You never backuped your wallet.dat?
Post by: Gabi on August 31, 2012, 01:57:52 PM
You never backuped your wallet? Then you deserve to lost that btc.


Title: Did you backup your wallet.dat?
Post by: kjj on August 31, 2012, 02:04:54 PM
You never backuped your wallet? Then you deserve to lost that btc.

Heh.  Maybe we can get the devs to make the client pop up a dialog box with this quote the first time it starts.


Title: Did you backup your wallet.dat?
Post by: Gabi on August 31, 2012, 02:08:06 PM
You never backuped your wallet? Then you deserve to lost that btc.

Heh.  Maybe we can get the devs to make the client pop up a dialog box with this quote the first time it starts.
Would be nice  :D

But well, it's not a bitcoin-only thing. Almost no one do backups, not until they lose something of value. Then they will cry and then maybe they will start backuping.


Title: Did you backup your wallet.dat?
Post by: Fiyasko on August 31, 2012, 07:00:19 PM
You never backuped your wallet? Then you deserve to lost that btc.

Heh.  Maybe we can get the devs to make the client pop up a dialog box with this quote the first time it starts.

WE NEED THIS, I could Definitly use a 30 day reminder of "Hey dude... You should backup your wallet..."


Title: Did you backup your wallet.dat?
Post by: mendoza on August 31, 2012, 07:54:35 PM
...

WE NEED THIS, I could Definitly use a 30 day reminder of "Hey dude... You should backup your wallet..."

Why backup so often? i think no one use the online wallet for storing much coin and the old backup till contains all money... or not???

I missed something????


Title: Did you backup your wallet.dat?
Post by: Gabi on August 31, 2012, 08:32:39 PM
You need to backup it before you put money into it. And then backup it when you create new address in it.


Title: Did you backup your wallet.dat?
Post by: live627 on August 31, 2012, 08:44:07 PM
You need to backup it before you put money into it. And then backup it when you create new address in it.
You don't trust your wallet? Are you in an internet cafe?


Title: Did you backup your wallet.dat?
Post by: btrash on August 31, 2012, 09:53:55 PM
i'm surprised the client itself doesn't ask you to backup your wallet when it first runs.

It stupid how they oversimplified to a point where the product is IMO defective (how many new computer semi literate people can be bothered to unhide their files and backup that wallet?)

Its like microsoft removing the file extensions of known file types...


Title: Did you backup your wallet.dat?
Post by: DeathAndTaxes on August 31, 2012, 10:05:34 PM
i'm surprised the client itself doesn't ask you to backup your wallet when it first runs.

It stupid how they oversimplified to a point where the product is IMO defective (how many new computer semi literate people can be bothered to unhide their files and backup that wallet?)

Its like microsoft removing the file extensions of known file types...

You do realize the satoshi client is considered beta right?  The developers have expressed that security, and improved performance are their goals at this point.  Of course if you feel security and improved performance are silly near term goals you are free to fork it and develop a client which is user friendly.

Alternatively wait 10 years and the popular clients will all be polished and user friendly.


Title: Did you backup your wallet.dat?
Post by: billotronic on September 01, 2012, 01:57:26 AM
maybe a nice plugin system in the basic client? hell, make the client do backups for you.


Title: Re: You never backuped your wallet.dat?
Post by: kjj on September 01, 2012, 02:06:00 AM
There is an RPC call that can do it, and I'm pretty sure the GUI has a button for it.


Title: Re: You never backuped your wallet.dat?
Post by: meebs on September 01, 2012, 02:46:33 AM
What is the relationship between a "regular" wallet and a "backup" file of the wallet?

for example.. I backup a wallet on 8/31 with 1btc in it. On 9/1 I receive 10btc (same addresses as the original wallet had) and on 9/5 the original file is lost but the backup is ok.

Would I still have the 11btc, or would I need to backup again after receiving that 10btc for it to be safe?


Title: Re: You never backuped your wallet.dat?
Post by: kjj on September 01, 2012, 02:49:56 AM
What is the relationship between a "regular" wallet and a "backup" file of the wallet?

for example.. I backup a wallet on 8/31 with 1btc in it. On 9/1 I receive 10btc (same addresses as the original wallet had) and on 9/5 the original file is lost but the backup is ok.

Would I still have the 11btc, or would I need to backup again after receiving that 10btc for it to be safe?

Depends.

If the 10 BTC is received to a key that was already in the wallet at the time it was backed up, you'd still have it.  If not, it would be lost forever.


Title: Re: You never backuped your wallet.dat?
Post by: DeathAndTaxes on September 01, 2012, 02:52:05 AM
What is the relationship between a "regular" wallet and a "backup" file of the wallet?

for example.. I backup a wallet on 8/31 with 1btc in it. On 9/1 I receive 10btc (same addresses as the original wallet had) and on 9/5 the original file is lost but the backup is ok.

Would I still have the 11btc, or would I need to backup again after receiving that 10btc for it to be safe?

There is no difference.  The backup is a copy of the wallet.dat

In your example no second backup is necessary.  The satoshi client wallet file uses a concept of a "keypool".  By default the wallet keypool is 100 private keys.  So a backup contains all the used keys PLUS the next 100 keys.

Receiving coins to an existing address uses no keys.
Sending coins uses 1 new address/key for each send (change address).
Getting a new address from the wallet uses 1 new address/key (clicking new address button).

If your keypool is 100 then you are good for the next 100 new addresses/keys.  The tx involving the 101st address/key will be lost forever.

You can make the keypool as large as you want although anything over 1,000 addresses can take a while to generate.  IMHO the default keypool should likely be increased to 300 or 500.


Title: Re: You never backuped your wallet.dat?
Post by: meebs on September 01, 2012, 03:01:49 AM
What is the relationship between a "regular" wallet and a "backup" file of the wallet?

for example.. I backup a wallet on 8/31 with 1btc in it. On 9/1 I receive 10btc (same addresses as the original wallet had) and on 9/5 the original file is lost but the backup is ok.

Would I still have the 11btc, or would I need to backup again after receiving that 10btc for it to be safe?

There is no difference.  The backup is a copy of the wallet.dat

In your example no second backup is necessary.  The satoshi client wallet file uses a concept of a "keypool".  By default the wallet keypool is 100 private keys.  So a backup contains all the used keys PLUS the next 100 keys.

Receiving coins to an existing address uses no keys.
Sending coins uses 1 new address/key for each send (change address).
Getting a new address from the wallet uses 1 new address/key (clicking new address button).

If your keypool is 100 then you are good for the next 100 new addresses/keys.  The tx involving the 101st address/key will be lost forever.

You can make the keypool as large as you want although anything over 1,000 addresses can take a while to generate.  IMHO the default keypool should likely be increased to 300 or 500.

Thanks for the great explanation!


Title: Re: You never backuped your wallet.dat?
Post by: mendoza on September 01, 2012, 07:27:16 AM
...

There is no difference.  The backup is a copy of the wallet.dat

In your example no second backup is necessary.  The satoshi client wallet file uses a concept of a "keypool".  By default the wallet keypool is 100 private keys.  So a backup contains all the used keys PLUS the next 100 keys.

Receiving coins to an existing address uses no keys.
Sending coins uses 1 new address/key for each send (change address).
Getting a new address from the wallet uses 1 new address/key (clicking new address button).

If your keypool is 100 then you are good for the next 100 new addresses/keys.  The tx involving the 101st address/key will be lost forever.

You can make the keypool as large as you want although anything over 1,000 addresses can take a while to generate.  IMHO the default keypool should likely be increased to 300 or 500.

So, sending coins burns keys always? or only when sending to different addresses??


Title: Re: You never backuped your wallet.dat?
Post by: ricklandman on September 01, 2012, 10:03:37 AM
Nice thread, great for the learning process of this newbie
Quote
So, sending coins burns keys always? or only when sending to different addresses??
I can't answer theoretical, but I did some wild transfer testing between different wallets. Sometimes it was send with new addresses and sometimes it was send with the same address the bitcoins arrived at in the first place. It is very difficult to follow what happens in the client, because you (at least I am) not able to see the addresses which are used in the client for sending. I needed to use blockchain.info to figure out which sending adresses happened to be mine.

During the testing (12h ago) I created a wallet (I call it the mystery wallet) with one address (I call it the mystery address) and send some btc's to it (I call it the mystery transaction). The whole blockchain is already downloaded, but no coins  did arrive. If I look in blockchain.info the mystery transaction is plain visible as I made it. I send another testcoin which promptly arrives in the mystery adress in my mystery wallet. Can anybody shine some light on this mystery ?


Title: Re: You never backuped your wallet.dat?
Post by: ildubbioso on September 01, 2012, 10:24:13 AM
when do we know that we have ran out of keys?


Title: Re: You never backuped your wallet.dat?
Post by: Akka on September 01, 2012, 10:32:56 AM
So if I backup my wallet everytime I revived BTC to a new andress I'm good?


Title: Re: Did you backup your wallet.dat?
Post by: molecular on September 01, 2012, 10:37:54 AM
You need to backup it before you put money into it. And then backup it when you create new address in it.

addresses are pre-generated (default 100?)


Title: Re: Did you backup your wallet.dat?
Post by: molecular on September 01, 2012, 10:38:57 AM
i'm surprised the client itself doesn't ask you to backup your wallet when it first runs.

It stupid how they oversimplified to a point where the product is IMO defective (how many new computer semi literate people can be bothered to unhide their files and backup that wallet?)

What? There's a menu item to back up your wallet (File -> Backup Wallet)


Title: Re: You never backuped your wallet.dat?
Post by: molecular on September 01, 2012, 11:34:58 AM
when do we know that we have ran out of keys?


too lazy to google, I asked on irc:

Quote from: #bitcoin-dev
<molecular> Is there a way to check how many unused keys are in the keypool?
<freewil> molecular, from my understanding you should always have keypoolsize unused keys
<freewil> unless your wallet is locked
<freewil> in which case it wont generate more keys until it's unlocked
<freewil> bitcoind getinfo has "keypoolsize" and "keypoololdest"
<molecular> freewil, allright, thanks for the info
<freewil> you're welcome

makes sense. I guess this clears up many questions here.



Title: Re: You never backuped your wallet.dat?
Post by: stevegee58 on September 01, 2012, 11:40:06 AM
http://cdn.memegenerator.net/instances/400x/26011581.jpg


Title: Re: You never backuped your wallet.dat?
Post by: tpantlik on September 01, 2012, 01:16:41 PM
I consider myself a little more experienced bitcoin user, so I backup my wallets regularly and I also have securely stored a lot of private keys for addresses.   8)


Title: Re: You never backuped your wallet.dat?
Post by: TangibleCryptography on September 01, 2012, 01:33:48 PM
So if I backup my wallet everytime I revived BTC to a new andress I'm good?

Maybe not.  You also use new keys every time you SEND coins to a new address.  You also use a new key everytime you click NEW ADDRESS even if you never use it.
Now you don't need to backup after every tx (although it won't hurt).  The wallet has a "keypool" which by default has the next 100 addresses you will use.

So hypothetically you could:
make a backup
send our 20 tx (20 new addresses used for change)
receive 500 tx TO existing addresses (0 new addresses used)
click the [New Address] button 30 times for no reason (30 new addresses used)
send out another 30 tx (30 new addresses used for change)

and your backup would still be good for the next 20 new addresses.

Now it is unlikely and probably not important to keep track of every address you use.  If you on average use 50 new addresses a month and make a new backup every week you probably are fine.
If on the other hand you are running a business and generate 3,000 new addresses a week you probably should make the keypool larger and make backups once a day.

A useful feature would be for the wallet/client to record the last address backed up and warn the user when they are down to say less than 10 new addresses remaining in the last backup.


when do we know that we have ran out of keys?

You never run out of keys.  If your keypool is 100 keys (default) then your wallet will always contain the next 100 keys.  However your backup will become out of date after 101 tx involving a new key.
You should backup your wallet regularly to ensure that doesn't happen.

So, sending coins burns keys always? or only when sending to different addresses??

Technically not "always".   Bitcoin uses a concept of change.  If you have an unspent output worth 10 BTC and want to tx 1 BTC, Bitcoin can't just send 1 BTC (the reason why is probably beyond the scope of this thread so for right now just accept it can't).  Your client will SPEND 10 BTC.  The tx will have 2 outputs.  1 BTC to the person you are sending coins to and 9 BTC as CHANGE to a NEW UNUSED address from your keypool.  Hypothetically if you wanted to spend 10 BTC and had an input that would exactly 10 BTC there is no change.  It doesn't matter if it is the first time you are sending to/from a particular address or not.  A change address will almost always be used.

It probably is simpler to just assume all SENDS use 1 key (even if technically not correct).  At worst you are just slightly too conservative.  

Since the wallet provides no mechanism to easily determine how many keys in the keypool are in the last backup really you should use this as a rule of thumb.

If you look at your tx volume and in one week have
a) generated 5 new addresses
b) SENT 15 outgoing tx
c) remember incoming tx don't use new addresses unless they involve "a".

then you have used ~20 new keys per week.  Your backup will be good for ~5 weeks.  To be conservative I would back it up at least twice a month (or weekly).  With that kind of tx volume daily or hourly backups are probably overkill.

On the other hand our company cold wallet generates a new address for EVERY tx.  In one week we have about 500 incoming tx and about 50 outgong tx.  A keypool of 100 is insufficient and would leave us at risk of losing coins.  We use a keypool of 3,000 (warning very large keypools can take a long time to generate the first time) which means the backup is probably good for ~7 to 10 days and then combine that with daily automated backups.



Title: Re: You never backuped your wallet.dat?
Post by: TangibleCryptography on September 01, 2012, 01:47:16 PM
One last thing.  The keypool is by default "the next 100 keys".  You can change the size of the keypool but only from the command line.

Code:
 bitcoin -keypool=300

will change the keypool to the next 300 keys.  It does take some time to generate the keys so if you pick a larger number and the computer seems like it is "frozen" just wait. It will generate enough keys to expand the keypool and launch the client.  Once you change the size of the keypool you can start the client "normally" after that.  Don't go crazy though.  If you use a hundred or so keys per week making your keypool 3,000 keys is probably overkill but maybe 300 gives you a larger margin of error.

Also the keys obviously do take up some space so your wallet.dat and backups will be larger but in todays age of TB sized drives the increased space in minimal.
Even with a keypool of 3,600 keys and months worth of tx data (involving thousands of txs) our company wallet.dat is ~8MB.


Title: Re: You never backuped your wallet.dat?
Post by: meebs on September 01, 2012, 03:06:57 PM
Thanks for the great explanations TangibleCryptography. Also, thank for creating the FastCash4Bitcoins website. While I have not specifically used your services yet, it seems like it'll be the easiest way to 'cash out'.

 ;D


Title: Re: You never backuped your wallet.dat?
Post by: mendoza on September 01, 2012, 07:00:12 PM
Now everything is clearer, many thanks TangibleCryptography!


Title: Re: You never backuped your wallet.dat?
Post by: Akka on September 01, 2012, 07:40:01 PM
TangibleCryptography, thanks from me too.

You have helped a lot.


Title: Re: You never backuped your wallet.dat?
Post by: molecular on September 01, 2012, 07:52:28 PM
A useful feature would be for the wallet/client to record the last address backed up and warn the user when they are down to say less than 10 new addresses remaining in the last backup.

Not necessary. According to freewil (see my above post: https://bitcointalk.org/index.php?topic=105183.msg1151980#msg1151980), the keypool is constantly being refreshed to contain <keypoolsize> unused keys (unless the wallet is kept in a locked state). Since the wallet is being unlocked when you get a new address, the suggested warning should never be displayed.


Title: Re: You never backuped your wallet.dat?
Post by: TangibleCryptography on September 01, 2012, 08:00:52 PM
A useful feature would be for the wallet/client to record the last address backed up and warn the user when they are down to say less than 10 new addresses remaining in the last backup.

Not necessary. According to freewil (see my above post: https://bitcointalk.org/index.php?topic=105183.msg1151980#msg1151980), the keypool is constantly being refreshed to contain <keypoolsize> unused keys (unless the wallet is kept in a locked state). Since the wallet is being unlocked when you get a new address, the suggested warning should never be displayed.

I think you misunderstand.

"less than 10 new addresses remaining in the last backup"

I am not saying warn the user once the keypool has less than 10 addresses (which will likely never happen).
I am saying warn the user when less than 10 addresses existing in the keypool which are also recorded in the last backup.

If the client records in the wallet file, the "newest" (last to be used) key in the keypool at the time of the last backup, then the client will know how many more new keys can be used before the backup is out of date.


Title: Re: You never backuped your wallet.dat?
Post by: molecular on September 01, 2012, 08:03:00 PM
A useful feature would be for the wallet/client to record the last address backed up and warn the user when they are down to say less than 10 new addresses remaining in the last backup.

Not necessary. According to freewil (see my above post: https://bitcointalk.org/index.php?topic=105183.msg1151980#msg1151980), the keypool is constantly being refreshed to contain <keypoolsize> unused keys (unless the wallet is kept in a locked state). Since the wallet is being unlocked when you get a new address, the suggested warning should never be displayed.

I think you misunderstand.

"less than 10 new addresses remaining in the last backup"

I am not saying warn the user once the keypool has less than 10 addresses (which will likely never happen).
I am saying warn the user when less than 10 addresses existing in the keypool which are also recorded in the last backup.

If the client records in the wallet the newest key in the keypool at the time of the last backup it can know at any time how many more keys can be used before the backup is out of date.

oops, you're right. I read too fast. Sorry 'bout that.

This is a good idea!


Title: Re: You never backuped your wallet.dat?
Post by: saddambitcoin on September 01, 2012, 11:37:06 PM
i just backed up my wallet.dat - i do not deserve to lose my BTC!

however i intend to store some of my future bitcoin wealth in a brainwallet. 


Title: Re: You never backuped your wallet.dat?
Post by: MadHZ on September 02, 2012, 07:29:51 AM
i never backup the wallet before.. but i backup entirely computer every day heh