Consensys / teku

Open-source Ethereum consensus client written in Java
https://consensys.io/teku
Apache License 2.0
679 stars 284 forks source link

8525 beacon states cleanup #8725

Closed mehdi-aouadi closed 1 month ago

mehdi-aouadi commented 1 month ago

PR Description

Clean up the finalized states after switching from ARCHIVE to MINIMAL or PRUNE mode.

Fixed Issue(s)

fixes #8525

Documentation

Changelog

mehdi-aouadi commented 1 month ago

LGTM. It'll recover slowly this way but im not sure if we want to configure it to clean up more aggressively.... we'd easily be able to delete 1 state per minute for example, which would be x5 faster that this.

We have the --Xdata-storage-state-pruning-limit and the --Xdata-storage-state-pruning-interval if we want to make it more agressive...

rolfyone commented 1 month ago

We have the --Xdata-storage-state-pruning-limit and the --Xdata-storage-state-pruning-interval if we want to make it more agressive...

sure, but would you expect to need to set either of those options when you're just changing to minimal or prune mode ?

mehdi-aouadi commented 1 month ago

We have the --Xdata-storage-state-pruning-limit and the --Xdata-storage-state-pruning-interval if we want to make it more agressive...

sure, but would you expect to need to set either of those options when you're just changing to minimal or prune mode ?

Definitely not obvious. We can configure the pruner to delete 1 state per minute (if none of the --Xdata-storage-state-pruning-limit and --Xdata-storage-state-pruning-interval is set) when switching the storage mode as you suggested then, wdyt? Here's a PR https://github.com/Consensys/teku/pull/8734