bitpay / bitcore

A full stack for bitcoin and blockchain-based applications
https://bitcore.io/
MIT License
4.81k stars 2.08k forks source link

Question: What's the purpose of the "bitcore-node.db" folder? #1409

Closed LAMike310 closed 8 years ago

LAMike310 commented 8 years ago

So I was planning to put the bitcore project on a 128gb USB drive, but then I realized my folder was 168GB. so I looked into each folder and saw that the "bitcore-node.db" folder had 88GB inside of it.

I deleted the "bitcore-node.db" folder and started up the node again, and everything seemed to work. It did create a new "bitcore-node.db" folder with a few files in it, but I couldn't open any of them on my Mac. (.idb file extension).

Just curious why this folder is needed? And will I be ok if I delete this folder every few weeks in case it gets too big?

Thanks, Mike

braydonf commented 8 years ago

If you're running bitcore v4 (and bitcore-node v3), the bitcore-node.db folder is no longer necessary, and can be removed, as detailed in upgrade docs: https://github.com/bitpay/bitcore-node/blob/master/docs/upgrade.md.

If you're running bitcore v3 (and bitcore-node v2), the directory is important and should not be removed. The files in it are for leveldb for the various additional indexes.

BTW, the prerequisites list ~200GB with ~8GB of RAM now: https://github.com/bitpay/bitcore-node#prerequisites

LAMike310 commented 8 years ago

Got it, so if I upgrade to 4.0, I'll be able to get rid of the bitcore-node.db folder, but the node won't be able to fit on a 128gb drive. Maybe I'll have to upgrade to a 256GB. Are there any plans to create a node that takes up less hard drive space? 200GB could be a big commitment for a hobby project to some developers, especially if they don't have a great internet connection.

LAMike310 commented 8 years ago

Do you think running it off of this card would cause problems?

https://www.amazon.com/PNY-Elite-Performance-Speed-P-SDX256U395-GE/dp/B00WWBCS1Y/ref=cm_cr_arp_d_product_top?ie=UTF8

Thanks for your advice!

braydonf commented 8 years ago

You can run Bitcoin Core pruned. However the Bitcore build with address indexes doesn't support prunning while address index is enabled currently. I spawned an issue (https://github.com/bitpay/bitcoin/issues/19) regarding that (though I do not know if/when would be planned to be implemented).

braydonf commented 8 years ago

I don't have any experience with that flash card to give any input there. I think this question has been answered at this point. Let us know if you have any issues.