Skip to content

cmd/utils: add --only-history flag to rm-state command#20899

Merged
AskAlexSharov merged 4 commits intomainfrom
alex/rm_state_hist_35
Apr 30, 2026
Merged

cmd/utils: add --only-history flag to rm-state command#20899
AskAlexSharov merged 4 commits intomainfrom
alex/rm_state_hist_35

Conversation

@AskAlexSharov
Copy link
Copy Markdown
Collaborator

Adds --only-history (alias --history) to erigon seg rm-state.

When set, restricts deletion to history files (SnapHistory + SnapIdx) only — leaving domain data (.kv files in SnapDomain, accessor files) untouched.

Useful when combined with --step from-to to prune old history without touching domain snapshots.

Adds `--only-history` (alias `--history`) to `erigon seg rm-state` to
restrict deletion to history files (SnapHistory+SnapIdx) only, leaving
domain data (.kv files in SnapDomain, accessors) untouched.
SnapAccessors holds .efi and .vi files (ef accessor and value index),
both history-related. Domain accessors (.bt, .kvi) live in SnapDomain.
Copy link
Copy Markdown
Collaborator

@Giulio2002 Giulio2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — small, obvious CLI flag addition to remove only history snapshots, with matching docs.

@AskAlexSharov AskAlexSharov added this pull request to the merge queue Apr 30, 2026
Merged via the queue into main with commit e4ed80c Apr 30, 2026
38 checks passed
@AskAlexSharov AskAlexSharov deleted the alex/rm_state_hist_35 branch April 30, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants