Data Pruning
All Aptos nodes (e.g., validators, VFNs and PFNs) process transactions and commit new data to the blockchain. As the blockchain grows (indefinitely), nodes can manage the amount of storage disk space required by pruning old blockchain data. To achieve this, Aptos nodes prune the blockchain ledger history in their database, which contains the history of all transactions. The ledger history may be complete (e.g., if you’re operating an archival node), or pruned to a certain window of transactions (to reduce storage requirements).
By default, ledger pruning is enabled on all nodes, and the pruning window can be configured. This document describes how you can configure the behavior of the ledger pruner.
Disable the ledger pruner
Section titled “Disable the ledger pruner”If you wish to disable the ledger pruner entirely, you can do so by adding the following to the node
configuration file, e.g., fullnode.yaml
or validator.yaml
.
storage: storage_pruner_config: ledger_pruner_config: enable: false
Configure the ledger pruner
Section titled “Configure the ledger pruner”If you wish, you can configure the size of the ledger pruning window (i.e., the number of the most recent transactions
to retain in storage). To do this, add the following to the node configuration file, e.g., fullnode.yaml
or validator.yaml
.
storage: storage_pruner_config: ledger_pruner_config: prune_window: 100000000 # 100 million transactions