I end up in some sort of bad loop where lighthouse could no longer sync blocks, so I wanted to purge the db and have it re-download everything to get past that.
There is no command to do so however.
Something like lighthouse beacon purge-db or lighthouse purge beacon db, etc.
Add such a command
As a temporary current work-around users can delete the datadir, default ~/.lighthouse/beacon
I'll take a look at this :)
As a temporary current work-around users can delete the datadir, default
~/.lighthouse/beacon
Unfortunately, this deletes the network key and enr.db. Usually you only want to purge the beacon chain database without touching any keys. I tried manually removing the chain and freezer db, but I'll get:
Failed to start Lighthouse: Failed to start beacon node: No database found in datadir. Please make sure the directory provided is valid, or specify a different `--datadir`.
Unfortunately, there is no way to recover from that besides removing the entire beacon directory including the keys.
Unfortunately, this deletes the network key and
enr.db. Usually you only want to purge the
Unfortunately, there is no way to recover from that besides removing the entire beacon directory including the keys.
There will be if my PR from 2 days ago gets merged ;)
Unfortunately, there is no way to recover from that besides removing the entire beacon directory including the keys.
This is true, but for the record you can backup the network directory and then replace it after a new datadir has been created. Not an ideal workaround, but just making it known :)
This issue was fixed by #971 so we can close this :)
Most helpful comment
There will be if my PR from 2 days ago gets merged ;)