Fantom-foundation / Sonic

go-opera fork for Carmen and Tosca integration
GNU Lesser General Public License v3.0
14 stars 16 forks source link

Can not run after client after shutdown #158

Closed alexandersazonof closed 2 months ago

alexandersazonof commented 2 months ago

After shutdown I got error:

failed to initialize the node: failed to make consensus engine: failed to open existing databases: dirty state: gossip: DE
thaarok commented 2 months ago

This happens when you kill the process forcefully, before it can close the database. When stopping Sonic, make sure to wait until it produce this log message:

INFO [05-15|17:36:10.855] State DB closed                          module=evm-store

Closing the DB may take a while, you need to wait until the process terminates correctly.

alexandersazonof commented 2 months ago

If I need to run the Sonic client again, what should I do?

thaarok commented 2 months ago

You need to delete the database (chaindata and carmen directories in datadir), reinitialize it from a genesis file and start again.

pc-quiknode commented 2 months ago

Is there a way to repair the db from broken state?