Can you reduce the size of your validator node?

Understanding pruning
When we talk about “pruning” , it means trimming the size of the blockchain to a point where we can make a functional registry with a smaller size.
In order to run a full node, different hardware requirements should be met based on the pruning strategy you would like to use.

Pruning is the term used to identify the periodic action that can be taken in order to free some disk space on your full node. This is done by removing old blocks data from the disk, freeing up space.

Inside FxCore, there are various types of pruning strategies that can be applied. Bu default, the pruning has been set to ‘default’. Also, it is recommended to use ‘default’
The main ones are:

  • default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals;
  • nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node);
  • everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals (At the moment this option is not recommended as it can easily corrupt the database and the node will halt);
  • custom: allow pruning options to be manually configured through ‘pruning-keep-recent’, ‘pruning-keep-every’, and ‘pruning-interval’.

Under .fxcore/config/app.toml

# default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals
# nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node)
# everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals
# custom: allow pruning options to be manually specified through 'pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval'
pruning = "default"

# These are applied if and only if the pruning strategy is custom.
pruning-keep-recent = "0"
pruning-keep-every = "0"
pruning-interval = "0"
3 Likes

@Scissors_FX in short, the pruning has already been in default for fxcore validator settings, you may consider using a cloud provider for a Linux instance to run your full validator node, as the storage /ssd can be added on in future if needed.

2 Likes

Thank you Derrick! Is there any recommendation/viable config which won’t cause data corruption if we go with the custom pruning option?
Also, is there a way to verify the pruning is operating as expected?

@Scissors_FX , you should try to setup a node on TestNet (without creating a validator) and test your configuration.
Actually, even if you’re running on mainnet, you should be able to test it as long as you’re not creating a validator or providing your current validator private key.

Hi @Scissors_FX let me get back to you on that. I have already setup two instances, one with pruning: default , another - pruning: nothing, and compare the size difference between them, now waiting for the blocks to be synced.

There’s a difference of around 50-80gb saved.