1

I'm a bit confused.

According to https://bitcoincore.org/en/2018/02/26/release-0.16.0/#hd-wallets-by-default HD wallet is enabled by default. However there is still keypool option of bitcoind which sets how many addresses will be pregenerated on wallet loading. keypool assumes regular wallet backups in order to not to loose keys generated above keypool value and keypool restore.

So, my question is: with HD wallets does keypool option have any meaning? And do I still need to do these regular backups?

1

The keypool is how Bitcoin Core achieves the lookahead functionality when you restore a backup. It is effectively the "gap limit". While BIP 32 does mean that one backup should be sufficient, it is possible that the keypool is too small (if you somehow hand out thousands of addresses but never receive at them) so backing up routinely is still a good thing to do. Also, backing up routinely allows you to keep metadata like labels when you restore.

The keypool is also useful for encrypted wallets as it allows getting new addresses to give out without having to unlock the wallet every time.

  • What if the keypool of an HD-enabled wallet.dat is exhausted? Is it possible that the wallet may silently ignore some funds when an old backup is imported? – Chris Chen Jan 15 at 20:26
  • As keys from the keypool are used, new keys are generated. So the keypool is constantly being refilled during a rescan which means that funds will not be skipped. – Andrew Chow Jan 15 at 22:45
  • What if the backup is encrypted? Would the sync/rescan process be paused, to ask the user for passphrase? – Chris Chen Jan 15 at 23:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.