Auto Disable StateSync
Some node operators were having trouble increasing disk space for the Binance daemon volume, which was being primarily consumed by snapshot data. While the background shell approach here is not ideal, it should provide the most hands-off solution for node operators to maximize their available disk space. Additionally, there is a theory that the snapshot creation caused by the enabling of the state_sync_reactor
causes periodic crashes in the daemon - this change will allow the daemon to benefit from faster snapshot recovery on the initial sync, before disabling to hopefully improve daemon stability.
This adds a shell process that will be spawned by the entrypoint and run in the background, checking every 10 minutes to:
- Remove all but the latest snapshot directory
- If the chain is fully synced, update the configuration to disable the
state_sync_reactor
and restart the daemon
There's an additional earmark to change a few of the logging modules to error
level to reduce some log noise.