Key Pool
A cache of pre-generated keys (and addresses) in Bitcoin Core wallets, so fresh addresses are instantly available and a backup stays valid for the next batch of them.
The key pool is a Bitcoin Core wallet implementation detail: a cache of pre-generated keys (and addresses) so that fresh addresses are instantly available without on-demand key generation, and so backups remain valid across some window of address creation.
In the original legacy (non-HD) wallets, the key pool was load-bearing. Each generated key was independent random data; if the user requested addresses faster than the wallet backed itself up, the backup could become stale and addresses created after the backup wouldn't be recoverable. The pool (default 100 keys) was a buffer: as long as you backed up after the pool was generated, you were covered for the next 100 addresses.
After HD wallet support landed in Bitcoin Core 0.13.0 (2016), the keypool became less load-bearing. HD derivation lets the wallet regenerate any future key from the seed, so a backup made at any time covers keys that did not exist yet. But the keypool stayed, for two reasons. Addresses are still pre-generated. And the pool doubles as a lookahead window: a restored backup only notices payments to keys it has already derived, so Bitcoin Core raised the default from 100 to 1,000 keys in 0.15.0 (2017) to make recovery more robust. Other HD wallets use a much smaller window, the BIP 44 gap limit: a recovering wallet stops scanning after 20 unused addresses in a row.
Bitcoin Core's descriptor wallets, the only kind since 30.0 (2025) dropped legacy wallets, keep the same idea in a different shape: each output descriptor covers a range of keys, 0 to 1,000 by default, and the wallet derives ahead within it. For users, it's invisible. Wallets just produce fresh addresses on demand, and backup is one seed phrase. The keypool plumbing is one of those things that makes "just use the wallet" work.
Key takeaways
- Ensures unique addresses without generating them on demand
- Keeps a backup valid for addresses handed out after it was made
- Part of older or internal wallet logic, now usually hidden by HD frameworks
Related chapters
Corrected
-
Was: The entry said Bitcoin Core keeps its keypool as a derivation window for gap-limit scanning, with addresses beyond 20 unused derivations not scanned.
Now: The 20-address gap limit is BIP 44's convention for other HD wallets. Bitcoin Core's keypool is its own lookahead window, raised from 100 to 1,000 keys in 0.15.0 (2017) so a restored backup still finds payments to addresses handed out after it was made. Details
Sources (6)
- BIP-32 - Hierarchical Deterministic Wallets: the reference client caches (by default) 100 keys in a pool of reserve keys to avoid a backup after every transaction; nodes can keep a pool of N look-ahead keys to watch for incoming payments (2012)
- Bitcoin Core - 0.13.0 release notes: newly created wallets use hierarchical deterministic key generation per BIP 32; backups of HD wallets can re-generate all possible private keys, even ones not yet generated at the time of the backup (23 August 2016)
- Bitcoin Core - 0.15.0 release notes: the default keypool increased to 1000 keys to make recovery more robust (14 September 2017)
- BIP-44 - Multi-Account Hierarchy for Deterministic Wallets: address gap limit is currently set to 20 (2014)
- Bitcoin Core - doc/descriptors.md: ranged descriptors cover child keys in a configurable range, by default 0-1000 (accessed 2026-10-14)
- Bitcoin Core - 30.0 release notes: BDB legacy wallets can no longer be created or loaded and can be migrated to the descriptor wallet format (10 October 2025)
Related terms (4)
Published . Revised . One correction logged for this page.
Edit this page on GitHub