commitment rebuild: add --no-history flag - #20147
Merged
sudeepdino008 merged 3 commits intoMar 25, 2026
Merged
Conversation
When --no-history is set, the commitment rebuild command uses the faster shard-based rebuildCommitment path that only regenerates commitment KV files without regenerating commitment history (.v) and index (.ef) files. This is useful when you only need to rebuild the commitment state without the overhead of full history regeneration. The flag is mutually exclusive with --resume.
sudeepdino008
marked this pull request as ready for review
March 25, 2026 11:13
sudeepdino008
requested review from
AskAlexSharov and
Giulio2002
as code owners
March 25, 2026 11:13
sudeepdino008
enabled auto-merge
March 25, 2026 11:13
sudeepdino008
requested review from
Copilot
and removed request for
AskAlexSharov and
Giulio2002
March 25, 2026 11:14
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a --no-history flag to the integration commitment rebuild command to force the rebuild to skip commitment history regeneration and use the non-history (file/shard-based) rebuild path, without changing default behavior when the flag is not provided.
Changes:
- Introduces a new
--no-historyCLI flag forcommitment rebuild. - Enforces mutual exclusivity between
--no-historyand--resume. - Forces the rebuild flow to avoid history regeneration when
--no-historyis set.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/integration/commands/flags.go | Adds the noHistory flag storage and a helper to register --no-history on a command. |
| cmd/integration/commands/commitment.go | Wires the new flag into commitment rebuild, adds mutual-exclusion validation, and adjusts rebuild-mode selection (withHistory). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… exclusive When --no-history is set, DeleteStateSnapshots runs with OnlyDomain=true, which preserves history/index snapshot files. Combined with --clear-commitment, this would leave stale .v/.ef artifacts after clearing DB tables. Add a validation check to prevent this problematic combination, consistent with the existing --clear-commitment/--resume and --no-history/--resume checks.
1 task
awskii
approved these changes
Mar 25, 2026
sudeepdino008
added a commit
that referenced
this pull request
Apr 1, 2026
Adds a `--no-history` flag to `commitment rebuild` that skips history regeneration and only rebuilds commitment KV files using the faster shard-based path. - When set, history (`.v`) and index (`.ef`) files are left untouched - Mutually exclusive with `--resume` - Default behavior (without the flag) is unchanged --------- Co-authored-by: awskii <awskii@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
--no-historyflag tocommitment rebuildthat skips history regeneration and only rebuilds commitment KV files using the faster shard-based path..v) and index (.ef) files are left untouched--resume