How To Lower The Disk Space Needed For Full Blockchain?

4

I'm looking to run bitcoind on a virtual machine.

However the main nets Blockchain size is over 21GB, and growing.

Is there a way to compress this down or lower the amount of disk-space needed for the full Blockchain?

Saeed Gatson

Posted 2014-07-19T15:28:21.430

Reputation: 143

in 2017 May the recommended minimum space is 125GB.mixdev 2017-05-26T21:05:52.607

Answers

1

No, there isn't any straightforward way to reduce the disk space requirement. The block chain is the size that it is.

There are various ways proposed for bitcoind to use less disk space (see ), but as far as I know, none of them have yet been added to the standard distribution.

Nate Eldredge

Posted 2014-07-19T15:28:21.430

Reputation: 21 420

0

What you can in your very specific case do is include a symlink to a folder that resides outside of your virtual machine (i.e., a shared folder with the host machine). Then the blockchain can fit in there with plenty of space.

Note, however, that people have sent virus signatures to the blockchain, so if your host is running windows, you'll have to deal with that and not quarentine specific folders.

linhares

Posted 2014-07-19T15:28:21.430

Reputation: 391

moven the data out of the vm would not reduce required space, also two bitcoin instances cant access the same folder at the same time. Also no anti virus tool is blocking blockchain its already kown and ignoredDennis Kriechel 2014-07-19T23:27:45.050

huh? It would reduce disk space inside the VM. Isn't that his use case?linhares 2014-07-21T00:57:00.420

You do lower the space needed by the vm, but the physical disc space is still needed even its not attached directly to the vm, so you dont save any space. A vm disc can always be resized so this should not be the problemDennis Kriechel 2014-07-21T04:49:55.610

So what you're saying is that OP's mentioning a VM in the question is absolutely irrelevant; that it's as relevant as OP talking about his/her hairstyle. Is that correct? At least that's how I'm reading your comment.linhares 2014-07-22T00:58:17.513

Thats right, not the vm is relevant but the general disc space. You see the accepted answer has nothing to do with vm.Dennis Kriechel 2014-07-22T04:03:15.070

0

There's currently no solution built into Bitcoin Core. I think that it would be possible to write a script that periodically moves the blkxxxx.dat files into a compressed filesystem and replaces the original files with symlinks. These files are large and reasonably compressible, so you might save a few GBs this way. The other database files are not very compressible, though.

The large blkxxxx.dat files are actually unused by Bitcoin Core except to transmit old blocks to peers, rescan the block chain for wallet transactions, handle reorgs, and fetch arbitrary blocks/transactions via JSON-RPC. Changing Bitcoin Core to discard this data would be fairly easy, but if everyone did this then the network would collapse, so it's not supported currently. In the future, nodes will probably only store a random subset of this data (maybe a few GBs) and discard the rest.

theymos

Posted 2014-07-19T15:28:21.430

Reputation: 8 228