Split wallet.dat into two parts, private keys and other #1402

issue rPman opened this issue on May 31, 2012
  1. rPman commented at 7:25 AM on May 31, 2012: none

    wallet.dat have too often rewritten, it have too big size, that make some inconvenience for backup and maintenance.

    1. wallet-private.dat: private key part file must contains only that information to give full access to wallet, now it can be only list of wallet addresses with its public and private keys
    2. wallet-cache.dat: other information (wallet account labels, comments, transaction cache and etc.) must be moved into second file. Most important information for this can be restored from blockchain and first private file with -rescan command line option p.s. also two different command line switches can be added to setup different locations for this files (i think private key wallet can be located on removable disk, and in future, for example, other device with api, similar Electrum client
  2. tcatm commented at 7:44 AM on May 31, 2012: none

    Thanks to the keypool feature there is no need to backup your wallet that often. For most users, a backup once per months is probably enough. Make sure to never backup your wallet while bitcoin is running!

  3. rPman commented at 8:47 AM on May 31, 2012: none

    hmm, how man new addresses generated with keypoolrefill? I think olso i must compute used addresses itself to determine correct usage keypool command .

  4. sipa commented at 9:07 AM on May 31, 2012: member

    Wallets essentially consist of transactions and keys. Having only keys or only transactions is useless. Yes, transactions can be reconstructed from the blockchain, but this is slow, will not be possible in headers-only mode, does not reconstruct comments and other metadata about transactions, and does not work for transactions that are not confirmed yet.

    In general, you really want to keep both keys and transactions in a wallet file, in a synchronized way. There is a keypool of 100 "future" keys (which is refilled when one is used), so you need only make a backup every 100 sent transactions or generated receive addresses.

  5. jgarzik commented at 10:12 PM on July 5, 2012: contributor

    You can increase the keypool size to something like 10,000, then back up very infrequently. For the rest... this merges with issue #68

  6. jgarzik closed this on Jul 5, 2012

  7. lateminer referenced this in commit 023e7719f2 on May 6, 2020
  8. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-29 03:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me