Skip to content

Issue with pruning when state-sync snapshot generation is active #25400

@alejandro-zigchain

Description

@alejandro-zigchain

We have nodes that:

  • should prune to keep just the last 362,880 states (default pruning) and that, as well,
  • generate state-sync snapshots every 1,000 blocks, keeping the last 2 sets only.

Since only 2 sets of state-sync snapshots are kept, the nodes with this setup should never have snapshots older than 2,999 blocks. As the pruning is set to target states older than 362,880, this two settings should not overlap and the prune should be done normally.

The issue is that the nodes set like this are not pruning and are keeping all the states. This causes 2 issues:

  1. The disk usage grows more than expected, since those nodes are intended to prune.
  2. If we eventually disable state-sync snap generation, they start tu aggressively prune, what causes CPU usage peaks above 80% for long time periods until the prune is complete. Additionally, the error 'ERR Error while pruning err="version does not exist" module=server' is registered every second on the log.

Were are using cosmos_sdk_version: v0.50.14.

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions