Author

Topic: new backup of wallet.dat every transaction? (Read 792 times)

hero member
Activity: 533
Merit: 500
^Bitcoin Library of Congress.
You can change the number of addresses in the keypool with the -keypool="number_of_keys" option or by adding keypool="number_of_keys" to your bitcoin.conf file.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
If I understand correctly, the bitcoin-qt wallet always keeps 100 unused addresses with their public and private keys in the wallet.dat file, so you can perform up to 100 transactions without backing up the wallet.dat file in between and you will still be able to access the funds in the wallet when you recovered it from the last backup.

This is correct. As the private keys are non-deterministic it is necessary to back them up at least every 100 txs as new ones are generated which have no correlation with the past.
-snip-

I cant quite follow this in the code, can you point me in the right direction?

Here is what happens when I send coins. https://dev.visucore.com/bitcoin/doxygen/class_send_coins_dialog.html#a2cab7cf9ea5040b9e2189297f7d3c764
There is "::newPossibleKeyChange", but it newer calls "GenerateNewKey()" https://github.com/bitcoin/bitcoin/search?q=GenerateNewKey%28%29

Which as far as I understand the code, is what makes a new key.
full member
Activity: 196
Merit: 100
If I understand correctly, the bitcoin-qt wallet always keeps 100 unused addresses with their public and private keys in the wallet.dat file, so you can perform up to 100 transactions without backing up the wallet.dat file in between and you will still be able to access the funds in the wallet when you recovered it from the last backup.

This is correct. As the private keys are non-deterministic it is necessary to back them up at least every 100 txs as new ones are generated which have no correlation with the past.

My advice if you're looking for a secure client would be Electrum - memorising a 12 word seed or encrypting a copy and storing it is easier and safer than having to remember to back up every 100 txs and then label the wallets accordingly. Not to mention if you somehow lose access to your newest backup you may be in a bit of strife.
is it safe to say 100txs is the standard for alt coins as well?
hero member
Activity: 742
Merit: 502
Circa 2010
If I understand correctly, the bitcoin-qt wallet always keeps 100 unused addresses with their public and private keys in the wallet.dat file, so you can perform up to 100 transactions without backing up the wallet.dat file in between and you will still be able to access the funds in the wallet when you recovered it from the last backup.

This is correct. As the private keys are non-deterministic it is necessary to back them up at least every 100 txs as new ones are generated which have no correlation with the past.

My advice if you're looking for a secure client would be Electrum - memorising a 12 word seed or encrypting a copy and storing it is easier and safer than having to remember to back up every 100 txs and then label the wallets accordingly. Not to mention if you somehow lose access to your newest backup you may be in a bit of strife.
legendary
Activity: 1039
Merit: 1005
If I understand correctly, the bitcoin-qt wallet always keeps 100 unused addresses with their public and private keys in the wallet.dat file, so you can perform up to 100 transactions without backing up the wallet.dat file in between and you will still be able to access the funds in the wallet when you recovered it from the last backup.
As anything that can go wrong will go wrong eventually, it is wise to make a backup at least around every 30 transactions. If you make regular backups of your data anyway (which is highly recommended) and you don't generate huge numbers of transactions, your wallet should be safe enough with your normal backups. Otherwise you should save a backup copy every 30-40 transactions so even if the last backup turns out to be unusable the second-to-last backup still covers your new transactions.

Onkel Paul
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
do i need to make a new backup of a wallet.dat file after every transaction?

for example, lets say i have saved my wallet.dat on a usb, the next day i make a few deposits as well a withdrawl and then the hard drive crashes erases all files... will i be able to retrieve my account from the wallet.dat file that was saved prior to my transactions? 

Assuming this is about bitcoin core wallets:

Your initial wallet comes with 100 addresses. As long as you dont generate the 101st you dont have to make another backup, you can still access all your funds, even if the old wallet did not "create" the address #42 yet. The incomming transaction will look a bit funny (grey) in the front end, but you can still spend the coins. On the other hand more than one backup can help because you will "survive" several failing backups. E.g. usb stick broken, flash card burned, hard disk crashed, but you still have an encrypted file on the old laptop of your good friend X.
full member
Activity: 196
Merit: 100
do i need to make a new backup of a wallet.dat file after every transaction?

for example, lets say i have saved my wallet.dat on a usb, the next day i make a few deposits as well a withdrawl and then the hard drive crashes erases all files... will i be able to retrieve my account from the wallet.dat file that was saved prior to my transactions? 
Jump to: