Pages:
Author

Topic: Help me understand how private keys work in wallet.dat - page 2. (Read 1430 times)

legendary
Activity: 3514
Merit: 4895
It keeps 100 unused keys.  So every time you use one it will generate another one.  You should back it up frequently.

You don't need to back it up frequently.

I suppose that depends on how many transactions you are sending, how many receiving addresses you are generating, and what you mean when you say "frequently".

You only need to back it up as often as every 100 keys. One key is used every time you send bitcoins and one is used every time you allocate a new key to receive bitcoins.

While this is technically true, I tend to be concerned about the possibility that the most recent backup is unusable (for example, backing up a corrupted file before realizing that it is corrupted).

Instead, I prefer to back up every 25 keys, and keep the 3 most recent backups.  If you use a new address for every transaction (like you should), and you average 4 transactions per day, then backing up weekly would make sense.  Some people might use the word "frequent" to describe weekly backups.
legendary
Activity: 4522
Merit: 3426
It keeps 100 unused keys.  So every time you use one it will generate another one.  You should back it up frequently.

You don't need to back it up frequently. You only need to back it up as often as every 100 keys. One key is used every time you send bitcoins and one is used every time you allocate a new key to receive bitcoins.
legendary
Activity: 3514
Merit: 4895
I read that wallet.dat in Bitcoin Core has 100 private keys in it.

Starts with a default of 100 private keys.  Additional keys are generated as needed.

I also know that everytime you spend, a private key is used up by mechanics of sending and reallocation. For simple assumption, suppose that I've used my 99th private key, what would actually happen once the keypool refreshes itself?

Example: Suppose I have 2 BTC stored in a wallet.dat that already has 99 transactions, what would happen when the keypool refresh itself?

The keypool remains refreshed all the time.  It acts like a queue.  Each time the software needs a new address and private key (if you request a new receiving address, or if the software needs an address for the change from the transaction), it takes the next one from the front of the queue.  At the same time, it generates a new address and private key and adds it to the back of the queue.
cp1
hero member
Activity: 616
Merit: 500
Stop using branwallets
It keeps 100 unused keys.  So every time you use one it will generate another one.  You should back it up frequently.
full member
Activity: 209
Merit: 100
I read that wallet.dat in Bitcoin Core has 100 private keys in it.

I also know that everytime you spend, a private key is used up by mechanics of sending and reallocation. For simple assumption, suppose that I've used my 99th private key, what would actually happen once the keypool refreshes itself?

Example: Suppose I have 2 BTC stored in a wallet.dat that already has 99 transactions, what would happen when the keypool refresh itself?
Pages:
Jump to: