Bitcoin Forum
May 05, 2024, 02:04:35 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: You never backuped your wallet.dat?  (Read 2310 times)
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
September 01, 2012, 10:38:57 AM
 #21

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)

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
1714917875
Hero Member
*
Offline Offline

Posts: 1714917875

View Profile Personal Message (Offline)

Ignore
1714917875
Reply with quote  #2

1714917875
Report to moderator
1714917875
Hero Member
*
Offline Offline

Posts: 1714917875

View Profile Personal Message (Offline)

Ignore
1714917875
Reply with quote  #2

1714917875
Report to moderator
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714917875
Hero Member
*
Offline Offline

Posts: 1714917875

View Profile Personal Message (Offline)

Ignore
1714917875
Reply with quote  #2

1714917875
Report to moderator
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
September 01, 2012, 11:34:58 AM
 #22

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.


PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
stevegee58
Legendary
*
Offline Offline

Activity: 916
Merit: 1003



View Profile
September 01, 2012, 11:40:06 AM
 #23


You are in a maze of twisty little passages, all alike.
tpantlik
Full Member
***
Offline Offline

Activity: 136
Merit: 100


View Profile
September 01, 2012, 01:16:41 PM
 #24

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.   Cool

Gods sent us a powerful tool - cryptography - to fight with those who are trying to exploit us. USE IT!!
TangibleCryptography
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


Tangible Cryptography LLC


View Profile WWW
September 01, 2012, 01:33:48 PM
Last edit: September 01, 2012, 01:48:33 PM by TangibleCryptography
 #25

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.

TangibleCryptography
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


Tangible Cryptography LLC


View Profile WWW
September 01, 2012, 01:47:16 PM
 #26

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.
meebs
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500



View Profile
September 01, 2012, 03:06:57 PM
 #27

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'.

 Grin

              ▄▄▄█████████████▄▄▄
           ▄████████▀▀▀▀▀▀▀████████▄
        ▄██████▀▀             ▀▀██████▄
      ▄█████▀▀                    ▀▀█████▄
     █████▀                          ▀█████
    ████▀          ▄▄███████▄▄         ▀████
   ████▌        ▄██▀▀▀    ▀▀▀██▄        ▐████
  ████▌       ▄██▀            ▀██▄       ▐████
 ▐████       ██▀   ▄▄█▀▀▀█▄▄    ▀██       ████▌
 ████▌      ▐█▌   █▀  ▄▄   ▀▀             ▐████
▐████       ██  █▌  █▌ █████████████      ████▌
▐████       ██  ▐█  ▐█                     ████▌
▐████       ██  █▌  █▌ █████████████      ████▌
 ████▌      ▐█▌   █▄  ▀▀   ▄▄    ██▀      ▐████
 ▐████       ██▄   ▀▀█▄▄▄█▀▀    ██▌       ████▌
  █████       ▀██▄            ▄██▀       █████
   █████        ▀██▄▄▄    ▄▄▄██▀        █████
    █████          ▀▀███████▀▀         █████
     █████▄                          ▄█████
      ▀█████▄▄                    ▄▄█████▀
        ▀██████▄▄             ▄▄██████▀
           ▀████████▄▄▄▄▄▄▄████████▀
              ▀▀▀█████████████▀▀▀
Global Cryptocurrency
          ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

  DECENTRALISING PRODUCTION, LOGISTICS AND PAYMENT 
                ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬   3D SERVICE      32 BAY     GCC WEBWALLET
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

mendoza
Newbie
*
Offline Offline

Activity: 45
Merit: 0



View Profile
September 01, 2012, 07:00:12 PM
 #28

Now everything is clearer, many thanks TangibleCryptography!
Akka
Legendary
*
Offline Offline

Activity: 1232
Merit: 1001



View Profile
September 01, 2012, 07:40:01 PM
 #29

TangibleCryptography, thanks from me too.

You have helped a lot.

All previous versions of currency will no longer be supported as of this update
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
September 01, 2012, 07:52:28 PM
 #30

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.

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
TangibleCryptography
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


Tangible Cryptography LLC


View Profile WWW
September 01, 2012, 08:00:52 PM
 #31

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.
molecular
Donator
Legendary
*
Offline Offline

Activity: 2772
Merit: 1019



View Profile
September 01, 2012, 08:03:00 PM
 #32

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!

PGP key molecular F9B70769 fingerprint 9CDD C0D3 20F8 279F 6BE0  3F39 FC49 2362 F9B7 0769
saddambitcoin
Legendary
*
Offline Offline

Activity: 1610
Merit: 1004



View Profile
September 01, 2012, 11:37:06 PM
 #33

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. 

MadHZ
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile
September 02, 2012, 07:29:51 AM
 #34

i never backup the wallet before.. but i backup entirely computer every day heh
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!