# Data Pruning

All Endless 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, Endless 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.

{% hint style="info" %}
Default pruning window The default configuration of the ledger pruner is to keep only the most recent 150 million transactions. This roughly corresponds to around \~200G of disk space, depending on transaction types and outputs. Almost all Endless nodes in testnet and mainnet use the default configuration. If you instead wish to run an archival node, follow the instructions, here.
{% endhint %}

### 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`.

```yaml
storage:
  storage_pruner_config:
    ledger_pruner_config:
      enable: false
```

{% hint style="info" %}
Unbounded storage growth Be warned that disabling the ledger pruner will result in unbounded storage growth. This can lead to the storage disk filling up very quickly.
{% endhint %}

### 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`.

```yaml
storage:
  storage_pruner_config:
    ledger_pruner_config:
      prune_window: 100000000 # 100 million transactions
```

{% hint style="info" %}
Minimum pruning window Setting the pruning window smaller than 100 million transactions can lead to runtime errors and damage the health of the node.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.endless.link/endless/devbuild/nodes/configure-a-node/data-pruning.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
