Author

Topic: Bitcoin core wallet keys (Read 604 times)

legendary
Activity: 1453
Merit: 1030
December 20, 2015, 01:26:48 PM
#5
Yes, I manually created addresses via 'getnewaddress'. I tested it just now by manually making a new one, but the keys after a restart were still 10017. But it might be that though.
I think the wallet needs to be unlocked in order to generate new keys, so the keypool size will probably increase the next time you unlock the wallet.

How the 5000 turned into 10000 is still a mystery.
I think the wallet marks all of the keys in the keypool before an encryption as used so it regenerates the keypool after encrypting which is how 5000 became 10000

Ah ok, makes sense! Thanks.
staff
Activity: 3458
Merit: 6793
Just writing some code
December 20, 2015, 12:34:39 PM
#4
Yes, I manually created addresses via 'getnewaddress'. I tested it just now by manually making a new one, but the keys after a restart were still 10017. But it might be that though.
I think the wallet needs to be unlocked in order to generate new keys, so the keypool size will probably increase the next time you unlock the wallet.

How the 5000 turned into 10000 is still a mystery.
I think the wallet marks all of the keys in the keypool before an encryption as used so it regenerates the keypool after encrypting which is how 5000 became 10000
legendary
Activity: 1453
Merit: 1030
December 20, 2015, 11:57:58 AM
#3
How did you set the keypool? The increase to 10000 might have been caused by the way that you had set the keypool size.

Did you get a new address 17 times? It looks like Bitcoin Core is trying to keep 10000 address in the keypool, so if you request a new address, it will generate another and add it to the keypool. This will happen even if you don't have any transactions.

I set the keypool size in the .conf via -keypool=5000. After wallet encryption, I noticed that in the debug.log it said it loaded 10000 keys, all encrypted.

Yes, I manually created addresses via 'getnewaddress'. I tested it just now by manually making a new one, but the keys after a restart were still 10017. But it might be that though.
How the 5000 turned into 10000 is still a mystery.
staff
Activity: 3458
Merit: 6793
Just writing some code
December 20, 2015, 11:26:56 AM
#2
How did you set the keypool? The increase to 10000 might have been caused by the way that you had set the keypool size.

Did you get a new address 17 times? It looks like Bitcoin Core is trying to keep 10000 address in the keypool, so if you request a new address, it will generate another and add it to the keypool. This will happen even if you don't have any transactions.
legendary
Activity: 1453
Merit: 1030
December 20, 2015, 11:21:58 AM
#1
Hi,

Made a new wallet, a fresh start. I initially had a keypool of 5000, so I won't need to back up that often.
After encryption, the keypool is 10000, according to the debug.log.

Now , without having done any transactions, I noticed that the keypool is 10017.

Why are there keys being added, without transactions? Does anyone know?

Thanks, Sam
Jump to: