Bitcoin Forum
November 13, 2024, 05:55:38 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Help me understand how private keys work in wallet.dat  (Read 1403 times)
BusyBeaverHP (OP)
Full Member
***
Offline Offline

Activity: 209
Merit: 100


View Profile
May 06, 2014, 02:44:15 AM
 #21

I just opened Bitcoin Core in CMD with bitcoin-qt -keypool=10000. The time it took from launch to UI, with regard to the 10,000 key pool, wasn't noticable.

How do I verify that my wallet has 10,000 keys in its pool? Should I notice an increase in the my wallet filesize?

It should be noted that I opened Bitcoin Core with an existing wallet with roughly 0.16 BTC in it.

So did this expand my existing wallet's keypool to 10,000?
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
May 06, 2014, 03:49:52 AM
 #22

from the debug console type getinfo to get some stats including the number of keys currently in the keypool.  I forgot that if your wallet is encrypted the client will wai until the first time you unlock it (like sending coins) to expand the keypool.  You can force the wallet to unlock to generate the additional keys now.  You can do that from the debug console as well with walletpassphrase <your passphrase> <time to remain unlocked>.  I would set time to remain unlocked to something like 600 seconds to ensure sufficient time to generate all the keys.   Once it completes you can lock the wallet early if neccessary with lockwallet IIRC (type help in debug console to verify exact command).
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4851



View Profile
May 07, 2014, 11:25:27 AM
 #23

- snip -
I forgot that if your wallet is encrypted the client will wai until the first time you unlock it (like sending coins) to expand the keypool.
- snip -

This is new behavior in 0.9.x right?
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
May 07, 2014, 01:59:44 PM
 #24

- snip -
I forgot that if your wallet is encrypted the client will wai until the first time you unlock it (like sending coins) to expand the keypool.
- snip -

This is new behavior in 0.9.x right?

I think it has always been this way as it doesn't write unecrypted keys to an encrypted wallet.  Without the wallet passphrase that is what it would have to do in order to expand the keypool.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3486
Merit: 4851



View Profile
May 07, 2014, 02:10:56 PM
 #25

- snip -
I forgot that if your wallet is encrypted the client will wai until the first time you unlock it (like sending coins) to expand the keypool.
- snip -
This is new behavior in 0.9.x right?
I think it has always been this way as it doesn't write unecrypted keys to an encrypted wallet.  Without the wallet passphrase that is what it would have to do in order to expand the keypool.

Duh.  I really didn't think that one through.  Thanks.
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!