15

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?

Murch
  • 75,206
  • 34
  • 186
  • 622
Sai
  • 313
  • 2
  • 7

3 Answers3

18

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).

Murch
  • 75,206
  • 34
  • 186
  • 622
Jonas Schnelli
  • 6,052
  • 1
  • 21
  • 34
2

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

Joe White
  • 538
  • 2
  • 9
  • 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 07 '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 07 '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 07 '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 07 '14 at 21:57
  • 1
    This answer is now outdated. – Murch Jul 28 '15 at 09:20
0

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.

Joe Pineda
  • 2,118
  • 2
  • 18
  • 28
  • 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 07 '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 07 '14 at 16:45