My disk is 65% full and I would like to start saving some space before it’s too late. Is there any tutorial out there to prune geth on a dAppnode? Or any recommendation?
Thanks!
My disk is 65% full and I would like to start saving some space before it’s too late. Is there any tutorial out there to prune geth on a dAppnode? Or any recommendation?
Thanks!
Hello Clem,
I haven’t tested this myself yet. I grabbed this from the discord channel.
Set a fallback ETH1 node like Infura (because your Geth node will be offline while pruning) then go to the Geth package, Config tab and set the EXTRA_OPTIONS field to snapshot prune-state and click update, when it restarts Geth it will prune the DB. When done copy back the default --http.api eth,net,web3,txpool settings again and restart. Warning though if the pruning doesn’t work for some reason you will likely need to do a full re-sync from scratch so be prepared for that as a worst case scenario.
Thanks, seems to be working; will know for sure in a week, after it’s finished (:
Starting to loose hope this will ever happen, 4 days in and a week still remaining…
elapsed=97h27m18.883s eta=180h32m27.532s
Hello Vanjan,
It took me a week to sync blocks and states from scratch with default settings, so I wouldn’t be surprised if it takes at least that time to prune. Can you keep me updated if you finish doing it?
Thanks
Dylan
Thanks guys.
Vanjan, I would love to have an update too!
It finished generating snapshots last night, but if you use the latest version (1.10.3) it should be “10x quicker” according to their release notes. I was using 1.10.2.
Now failing with the following error:
ERROR[05-26|09:23:19.025] Failed to prune state err="snapshot not old enough yet: need 120 more blocks"
snapshot not old enough yet: need 120 more blocks
I’ve raised an issue with geth about this, let’s see what comes back: snapshot not old enough yet: need 120 more blocks · Issue #22947 · ethereum/go-ethereum · GitHub
Hello all,
About to attempt this myself. After some googling I found a couple of tips.
Geth has to finish the snapshot. If it’s on 1.10.x, it will do so automatically by default. If you no longer see an ETA, it has finished with that. The ETA is accurate after about 12 hours. On machines with very slow IOPS, such as Contabo VPS, it can take 2 weeks+ to generate the snapshot. On mainstream SSD, it takes 3-4 days; and on fast SSD, about a day.
If you are having the same issue with very long estimates for creating the snapshot. Another suggestion:
delete your leveldb database (chaindata without the ancient folder within); and start a
snap
sync (--syncmode=snap
). By keeping the ancients you will not need to download 200GB of blocks, only the latest state.
Someone completed the process with the following specs:
CPU: Ryzen 5 3600
RAM: 32GB (16GBx2) - 3600MHz CL18
SSD: Silicon Power 1TB NVMe Gen4
Here are two ethstaker post about it.
https://www.reddit.com/r/ethstaker/comments/n7mnx5/psa_if_youre_running_geth_prune/
https://www.reddit.com/r/ethstaker/comments/m8ppq6/just_got_back_200gb_of_disk_space_from_geth/
Also, for those wanting to know how to set a fallback node for Prysm:
https://docs.prylabs.network/docs/prysm-usage/setup-eth1/#adding-fallback-eth1-nodes
Hope that helps.
Dylan
Hello all,
I have successfully pruned the geth DB on a system with similar specs to the DAppNodeAdvanced. I’m also using Geth v1.10.3. The process was rather straight forward and easy to complete. I’ll detail below.
** Duration on my setup:**
pruned=176.65GiB
Here are the detailed steps:
Setup Prysm to use a Infura fallback.
(You don’t have to use Infura, it is just one example)
Pruning Geth DB
Dylan
Thanks Dylan. I’m going to try this week end and will let you guys know if it worked for me.
I also managed to finish with the result being around 400 gb reclaimed.
Same, it worked! 115gb saved. Definitely lower than expected but I guess I’ll just re-prune in a few months! Thanks so much guys.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.