I run Bitcoin-Qt and Bitcoin Armory on a laptop. I don't have the space to store the whole 20 GB (or however big it is now) blockchain.

I understand the need to run through the entire thing for security, but I'd like it to only store relatively recent blocks + the summarized version (for example, the database of unused outputs / computed ledger). I'd like good security; I just don't have the space to store the whole thing.

Is there some way to configure Bitcoin-Qt / bitcoind to trim its data to a more reasonable size after it's gone through and processed the chain?

up vote 1 down vote accepted

This answer is now outdated please see Answer below

At this time, no, you can not strip the block chain (as far as I know). There is one programmer (Mark Freidenbach AKA maaku) who is working on further compressing the blockchain for the Satoshi bitcoin clients.

The entire block chain is currently needed to verify all coins are legitimate from the beginning of time. Plus there are coins in the older blocks that would not be included in new blocks, so some old miners might lose their coins.

1: https://en.bitcoin.it/wiki/Original_Bitcoin_client

  • 1
    If I understand right, the entire block chain need merely be processed to verify coins. All that has to be stored, assuming you trust your storage, is the table of unused outputs & their corresponding values. (And of course all the text portions are highly compressible.) Am I incorrect? – Sai Jan 7 '14 at 15:41
  • I misunderstood you a bit then, it might possible to do that but don't quote me on that one as I've never been able to successfully prune a block chain. I do not have as much experience with in depth blockchain surgery as some of the "older" coders do. Now, on the other hand it is possible to at very least prune the block coinbase block headers where you have messages from pools (like "Mined by AsicMiner" etc) that might save you some disk space. – Joe White Jan 7 '14 at 19:49
  • have you considered getting a 64 gb thumb drive? They run about $25 usd each on amazon usa. you could always save the blockchain there – Joe White Jan 7 '14 at 19:52
  • If I went that route, I'd probably use Armory's split online/offline mode and run the full chain on a server, which I can connect to occasionally via ssh-fs. – Sai Jan 7 '14 at 21:57
  • 1
    This answer is now outdated. – Murch Jul 28 '15 at 9:20

Since Bitcoin-Core 0.11.0 you can prune (trim) the blockchain in Bitcoin-Qt. But not from the UI. You need to add prune=550 to your bitcoin.conf file and restart Bitcoin-Qt.

Explanation: -prune=<target in MiB> will tell bitcoin-core to remove blocks which are older than oldest block that can be kept with a chainsize (sum of block-sizes) of <target> (min. 550MiB as example above shows). A minimum of 550MiB ensures to keep at least 288 blocks (~2 days). (simple explanation not including undo-data)

Restriction: -prune does disable all wallet functions in version 0.11 (will work with a wallet in version 0.12).

  • 2
    What are the tradeoffs here? – Michael Hampton Jul 31 '15 at 1:29
  • 1
    You don't fully participate in the network health because you can't serve most historical blocks. Your node is considered to be a p2p leech. Along to this you can't use -txindex. – Jonas Schnelli Jul 31 '15 at 6:05
  • 1
    I forgot to mention the biggest drawback with pruning in 0.11: it does not work with wallet enabled, though in upcoming version 0.12 it will also work with the wallet. – Jonas Schnelli Jul 31 '15 at 8:42
  • 2
    The prune option is a command-line argument, not a bitcoin.conf setting. – Tim Sylvester Oct 12 '15 at 2:23
  • 1
    @TimSylvester: not true. Command-line argument = bitcoin.conf. – Jonas Schnelli Oct 12 '15 at 7:34

If I recall it correctly, Ufasoft's multi-currency client stores the blockchain in a format of their own in which it gets compressed, so you might switch to it and see a small decrease in the usage of your hard-drive.

Be warned, though, there's no way to import the block-chain from bitcoin-qt's format to Usasoft, so the latter will have to re-download all the blocks from the very beginning.

  • 1
    AFAICT, only bitcoin-qt is interoperable w/ Armory, and I do want to have access to advanced features / good security. It's just the space limitation on my laptop that's a problem. – Sai Jan 7 '14 at 15:44
  • 1
    You're right, Armory so far needs the original bitcoin-qt and can't operate with alternative clients. Too bad :( – Joe Pineda Jan 7 '14 at 16:45

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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