ChainDB Growing 100MB+ Daily

Mining MainNet on RasPi, and my ChainDB folder grows by hundreds of meg a day.

Is it okay to delete this folder?
What will happen if I do?

It’s mining really well right now, so I don’t want to mess anything up.

This is a known problem for the last few days: due to a spam attack. Now we have implemented fix in v1.0.6, so please update.

You Should NOT delete the ChainDB folder: this include the essential blockchain data. Without a complete copy, your node will not be able to mine.

Let me ask a follow-up question then. I built 1.0.6beta last night, and it has been onine & syncing all night. I am looking at my new ChainDB right now and it is back up to 4GB again. So how large should this directory be? And does it ever stop?

This will continue to grow with every day. Because the blockchain is like a database that grows with new transactions that coming in.

The recent fast growth of ChainDB is abnormal (a few GB per week), and is due to a spam attack. Our developer have fixed the problem in 1.0.6 upwards, so the growth will be much slower. e.g. several GB per year.

Is posibble after upgrade (fix problem) shrink database? Used lot of space on my raspberry.

Hi, if you come to our Discord channels, there is a pinned message on #mainnet channel by @yilun giving instruction of how to use pruned blockchain database (which is about 2GB, much less than the non pruned).

I copy here the original instructions:

Yilun09/11/2019
So for everyone who wants to try out our new pruned chaindb (beta version), here is the link to the pruned snapshot:

zip: https://nkn.org/ChainDB_pruned_latest.zip
tar.gz: https://nkn.org/ChainDB_pruned_latest.tar.gz

This is still in public testing phase, and the purpose is to gather feedbacks and find bugs (that’s why we don’t tag everyone here :nerd: ). Feel free to send us feedbacks and/or bug reports.

If you are looking for stable version, you might want to wait a few days for the stable release. In the next one or two version state pruning will be integrated to nknd so you don’t need to download the snapshot manually.

1 Like

I have added the “StatePruningMode is lowmem” added to config.json. You have to stop and start
the service to make it effective

sudo sytemctl stop nkn.service

modify config.json

sudo sytemctl start nkn.service

{
"StatePruningMode": “lowmem”,
“BeneficiaryAddr”: “…”,
“SeedList”: [

This seems to work

2 Likes