Description:
Currently, the katana db prune command immediately executes database pruning operations which permanently delete historical trie data. This poses a risk for users who might accidentally run the wrong command or want to preview the impact before execution.
Feature Request:
Add a --dry-run flag that:
- Simulates the pruning operation without actually deleting data
- Reports what would be deleted (number of entries, affected tables, estimated space to be reclaimed)
- Shows which blocks would be pruned
- Validates the operation parameters
Example Usage:
# Preview what would be deleted
katana db prune --latest --dry-run -p path/to/db
# Preview keeping last 1000 blocks
katana db prune --keep-last 1000 --dry-run -p path/to/db
Implementation Notes:
- Modify
bin/katana/src/cli/db/prune.rs to add the dry-run flag
- Count entries that would be deleted without performing actual deletions
- Display summary statistics after the dry run
Description:
Currently, the
katana db prunecommand immediately executes database pruning operations which permanently delete historical trie data. This poses a risk for users who might accidentally run the wrong command or want to preview the impact before execution.Feature Request:
Add a
--dry-runflag that:Example Usage:
Implementation Notes:
bin/katana/src/cli/db/prune.rsto add the dry-run flag