mimblewimble / grin

Minimal implementation of the Mimblewimble protocol.
https://grin.mw/
Apache License 2.0
5.04k stars 989 forks source link

Clean old txhashset_snapshot_*.zip periodically #3647

Open noobvie opened 3 years ago

noobvie commented 3 years ago

Is your feature request related to a problem? Please describe. Sometimes the grinnode generated many zip files in ~/.grin/main/chain_data which cost lot of space (around 700MB each) and it consumes space of all nodes in the network. For example: │ -rw-rw-r-- 1 root root 741396605 Jun 30 20:21 txhashset_snapshot_00032512d663.zip │ │ -rw-rw-r-- 1 root root 742231585 Jul 1 07:38 txhashset_snapshot_00033291faad.zip │ │ -rw-rw-r-- 1 root root 741166818 Jun 30 16:39 txhashset_snapshot_00052138ecfe.zip │

Describe the solution you'd like I suggest grinnode should have feature to remove those files periodically beacause most nodes are running on low end boxes with low disk/cpu/ram.

Thanks.

phyro commented 3 years ago

Thank you for reporting this. There is an RFC that solves this called PIBD (Parallel Initial Block Download) which should resolve the issue of having a large zip file for seeding new nodes. The main guy that was working on it is unfortunately not contributing right now so it is stale at the moment. Hopefully someone picks up from where they left and finishes the implementation.

phyro commented 2 years ago

Sorry, I seem to have written this a bit wrong. The zip files won't go away for some time as there will be nodes on the version that does not support PIBD. So they will be around for some time until we know PIBD works really well and people have upgraded.

mojitoo commented 2 years ago

i also ran out of space and node stopped working because of this