> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# SV Pruning

> Sequencer and participant pruning on Super Validator nodes

The sequencer and participant have pruning options that can be used to ensure storage use is kept within reasonable bounds.

## Sequencer pruning

Can be enabled in helm through the following config:

```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
synchronizers:
  current:
    sequencerPruningConfig:
      # Enable or disable sequencer pruning
      enabled: true
      # The pruning interval is the time between two consecutive prunings.
      pruningInterval: "1 hour"
      # The retention period is the time for which the sequencer will retain the data.
      retentionPeriod: "30 days"
    # Set to true when using CantonBFT
    enableBftSequencer: false
```

> [!NOTE]
>
> It is recommended that sequencer pruning is enabled and the `pruningInterval` is set to `1 hour` and the `retentionPeriod` to `30 days`.

The `retentionPeriod` limits how far behind a node can fall. When the SV app prunes, it disables any other node on your sequencer, such as a validator's participant, that has not acknowledged events from within the `retentionPeriod`, and a disabled node cannot reconnect to your sequencer. After a [logical synchronizer upgrade](https://docs.canton.network/global-synchronizer/production-operations/logical-synchronizer-upgrade.md#sequencer-pruning-after-an-upgrade), this includes validators that have not yet connected to the successor synchronizer.

## Participant pruning

Participant pruning is also supported and recommend. To enable it, set the following helm value on your validator chart:

```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
participantPruningSchedule:
  cron: 0 /10 * * * ? # Run every 10min
  maxDuration: 5m # Run for a max of 5min per iteration
  retention: 30d # Retain history that is newer than 30d.
```

You also need to tell the participant to continue pruning even if it has not received an ACS commitment from one of its counter participant in the last 30 days. Without this pruning will essentially never run on mainnet as validators get shut down relatively frequently: To do so, set the following through the `additionalEnvVars` on your participant:

```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
additionalEnvVars:
    - name: ADDITIONAL_CONFIG_PRUNING_ACS_COMMITMENTS
      value: |
        canton.participants.participant.parameters.stores.safe-to-prune-commitment-state = "all"
```
