<p>The page you are referring to on the Bitcoin wiki is pretty dated and doesn't really relate to current behavior in Bitcoin Core. Be aware that a lot of the wiki is like this. "Default key" isn't a phrase in common use, I can't fathom what that page could have been talking about in the context of Bitcoin Core. </p>

<p>Reserve keys and the keypool are essentially one and the same. The concept is born out of the problem that people would make a wallet backup, create a few new addresses and receive coins there, restore from a day old backup and find that all their money had disappeared. </p>

<p>The basic solution is to pre-generate a number of addresses and store them in the wallet file, when the client needs a new address it uses the oldest fresh key it has available. The resulting wallet file backup can be safe for as many future transactions as there are keys in the keypool (100 has been the default for a long time), after which point the backup will again become stale and money lost if the user has to recover from it. It's important to keep in mind that making outgoing transactions also consumes a reserved key as one needs to be used for a change address as well, this property makes it difficult for users to know when they need to make a new backup.  </p>

<p>The keypool design prevents some very simple mistakes, but it's still easy to lose money to poor backup practices. Hierarchical Deterministic (BIP32) wallets are significantly safer as the backups never become stake, and this is instead used in more modern wallets. The Bitcoin Core wallet tends to be the most conservative and so is slow to move away from the keypool, but it will eventually happen. </p>

CC BY-SA 3.0
2015-07-14T08:50:45.270Z
2015-07-17T22:29:28.750Z
2015-07-17T22:29:28.750Z
Claris
<p>There is this <a href="https://en.bitcoin.it/wiki/Wallet" rel="nofollow">https://en.bitcoin.it/wiki/Wallet</a> simple explanation of the contents of a wallet.dat file from bitcoin-core/bitcoin-qt.</p>

<p>I have some questions about this:</p>

<ul>
<li>What is the <strong>default key</strong>? Does this refer to the address is use by default for spending bitcoins? So, does it refer to the private key?</li>
<li>What are <strong>reserve keys</strong>? Are these the public/privte keypairs representing my addresses? But why <em>reserve?</em> </li>
<li>What is the <strong>Key pool</strong>? Is it a collection of addresses (i.e. private/public keypairs), and if so, why are they pregenerated, if I can generate a new address at any time with no cost?</li>
</ul>

<p>So, if I have two addresses in use in my bitcoin-core client, does that mean, that I am using 2 keypairs from the keypool? And the others are just not showing yet in the user interface, but are already created?</p>

<p>What does the following sentence mean (it is refering to the key pool): </p>

<ul>
<li><em>This pooling feature was added so backups of the wallet would have a certain number of keys that would be used in the future.</em></li>
</ul>

<wallet.dat><keypool>
What are the contents of the wallet.dat file? What is Key pool, default key and reserve keys?
erik
# What are the contents of the wallet.dat file? What is Key pool, default key and reserve keys?

(Asked by: username_0 on 2015-07-14)

There is this <https://en.bitcoin.it/wiki/Wallet> simple explanation of the contents of a wallet.dat file from bitcoin-core/bitcoin-qt.

I have some questions about this:

* What is the **default key**? Does this refer to the address is use by default for spending bitcoins? So, does it refer to the private key?
* What are **reserve keys**? Are these the public/privte keypairs representing my addresses? But why *reserve?*
* What is the **Key pool**? Is it a collection of addresses (i.e. private/public keypairs), and if so, why are they pregenerated, if I can generate a new address at any time with no cost?

So, if I have two addresses in use in my bitcoin-core client, does that mean, that I am using 2 keypairs from the keypool? And the others are just not showing yet in the user interface, but are already created?

What does the following sentence mean (it is refering to the key pool):

* *This pooling feature was added so backups of the wallet would have a certain number of keys that would be used in the future.*

**Tags:** wallet.dat, keypool


---

## 1 answers

### Answer by username_1 on 2015-07-14. Score: 2

The page you are referring to on the Bitcoin wiki is pretty dated and doesn't really relate to current behavior in Bitcoin Core. Be aware that a lot of the wiki is like this. "Default key" isn't a phrase in common use, I can't fathom what that page could have been talking about in the context of Bitcoin Core.

Reserve keys and the keypool are essentially one and the same. The concept is born out of the problem that people would make a wallet backup, create a few new addresses and receive coins there, restore from a day old backup and find that all their money had disappeared.

The basic solution is to pre-generate a number of addresses and store them in the wallet file, when the client needs a new address it uses the oldest fresh key it has available. The resulting wallet file backup can be safe for as many future transactions as there are keys in the keypool (100 has been the default for a long time), after which point the backup will again become stale and money lost if the user has to recover from it. It's important to keep in mind that making outgoing transactions also consumes a reserved key as one needs to be used for a change address as well, this property makes it difficult for users to know when they need to make a new backup.

The keypool design prevents some very simple mistakes, but it's still easy to lose money to poor backup practices. Hierarchical Deterministic (BIP32) wallets are significantly safer as the backups never become stake, and this is instead used in more modern wallets. The Bitcoin Core wallet tends to be the most conservative and so is slow to move away from the keypool, but it will eventually happen.


---

