haskoin / haskoin-store

Haskoin Store is a blockchain storage service with a RESTful API
27 stars 14 forks source link

Storage disk size for app deployment #26

Closed Markeli closed 2 years ago

Markeli commented 2 years ago

Hi there!

I'm not a Haskell developer, so it's quite difficult for me to understand code logic. Am I right that haskoin-store downloads all specified blockchain (BTC/BCH), parses it, and saves data into RocksDB? Nowadays BTC blockchain size is 380 GB. How much free disk space do I need to deploy your app to a server?

jprupp commented 2 years ago

On Haskoin Store, the BTC block chain takes roughtly 800 GB today. The BCH block chain some 400 GB. There is some denormalisation of data and extra indices that are responsible for this doubling of required space.

A recent upgrade that I'm working on consolidates transaction objects. This reduces space utilisation a bit, making transaction queries faster, but increases the time required to synchronise the block chain (from scratch) from roughly two weeks to a almost a full month for BTC.

A full node like bitcoind stores the block chain, some indexing information, and the UTXO set. It also allows to prune the block chain, getting rid of old blocks. This is the reason why it does not use much space, but its querying API cannot return information like balances and transactions for arbitrary addresses.