Author

Topic: Noob question on wallet.dat file size (Read 901 times)

copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
October 10, 2015, 02:30:48 PM
#5
Update: After some testing I just found out that unlocking the wallet with the walletpassphrase command is sufficient. Bitcoin Core will then increase the keypool automatically. Alternatively you can send out some funds, as your wallet needs to be unlocked for this operation.

The more I think about this, the more it makes sense: Writing new private keys to the wallet.dat of course needs this very file to be unlocked with the correct passphrase.

Yes, it will try to maintain 500 (100 by default) hidden private key/address pairs for you. Whenever the wallet gets unlocked it will check and generate new if needed. You can also use getwalletinfo to see whether the hidden keypool is full or not.
newbie
Activity: 10
Merit: 0
October 10, 2015, 11:26:47 AM
#4
Update: After some testing I just found out that unlocking the wallet with the walletpassphrase command is sufficient. Bitcoin Core will then increase the keypool automatically. Alternatively you can send out some funds, as your wallet needs to be unlocked for this operation.

The more I think about this, the more it makes sense: Writing new private keys to the wallet.dat of course needs this very file to be unlocked with the correct passphrase.
newbie
Activity: 10
Merit: 0
October 10, 2015, 11:14:59 AM
#3
Is your wallet unlocked or unencrypted? I don't know if setting the keypool in the startup command will work if the wallet is encrypted.

My wallet is encrypted. And it was locked all the time, as I didn't do anything that would need it to be unlocked (e.g. sending funds) after setting up the -keypool=500 command line option.

I would suggest that you go to the debug console and use the keypoolrefill (https://bitcoin.org/en/developer-reference#keypoolrefill)  command in order to fill your keypool with however many keys. You will need to use the walletpassphrase (https://bitcoin.org/en/developer-reference#walletpassphrase) command to unlock the wallet if it is locked.

This worked instantly. Thanks!

You could watch the wallet.dat file size increase gradually while Bitcoin Core created a new and larger keypool.
staff
Activity: 3458
Merit: 6793
Just writing some code
October 10, 2015, 10:54:23 AM
#2
It should increase.

Is your wallet unlocked or unencrypted? I don't know if setting the keypool in the startup command will work if the wallet is encrypted.

I would suggest that you go to the debug console and use the keypoolrefill (https://bitcoin.org/en/developer-reference#keypoolrefill)  command in order to fill your keypool with however many keys. You will need to use the walletpassphrase (https://bitcoin.org/en/developer-reference#walletpassphrase) command to unlock the wallet if it is locked.
newbie
Activity: 10
Merit: 0
October 10, 2015, 10:01:51 AM
#1
Hello!

First of all: sorry in case this question has already been asked elsewhere. I did a search, but didn't come up with an answer to my question.

I increased my keypool from the default of 100 premade bitcoin addresses to 500, in order to make a long-time future-proof backup.

The command line (put inside a bitcoin.bat file) when starting up Bitcoin Core 0.11.0 on Windows 10 looks as follows:

Quote
bitcoin-qt.exe -datadir=./data -keypool=500 -onlynet=onion

The application starts and works. I also can see my specified commandline options did have an effect, as the wallet.dat in the /data subfolder gets used and only connections to .onion URLs are made.

However, the file size of my wallet.dat did not increase! And that makes me become suspicious. Shouldn't the wallet.dat file size increase by five times when 500 instead of 100 public/private bitcoin keypairs are stored in it?

Sorry when asking a stupid question, but this drives me crazy ATM.
Jump to: