One of the biggest upgrades in the recent Chia Blockchain 1.3 beta that was just released is the ability to upgrade the v1 Chia Database to v2. The promise here was pretty extreme with Chia promising “approximately 45%” space reduction. That’s quite the promise, so let’s see if it holds up.
First, don’t do this on your main farming rig. I have no idea what edge cases might cause catastrophic issues. But for those willing to take the risk, the process is pretty simple. Just open up a terminal or command prompt, navigate to your Chia CLI in ~\chia-blockchain\app-1.2.12269\resources\app.asar.unpacked\daemon (Windows) and type out chia db upgrade. That will kick it off.
The process is very IO intensive, but not particularly hard on the CPU or memory. It runs while your farming runs and didn’t seem to cause any issues for me. I am having an unrelated issue due to the upgrade involving my plot NFTs not getting picked up properly, but that was not related to the DB upgrade. It didn’t fix it either though.
The process took about 37 minutes total and when it was done it left both DB images, so you will have to manually clean up. It runs over 5 phases, each copying a specific section of the database. And what are the results? See for yourself.
Its about 45%. The process reduced my DB from just under 50GB to just under 27GB. This is fantastic and makes farming to small single board computers like the Raspberry Pi possible again. I haven’t made any performance measurements so I have no idea if the new database format lives up to the modest improvements yet, but we should see soon if my farm is out of sync constantly. But I doubt it. Great work, Chia Network.