feat: expose CometBFT reindex-event as 'passage comet reindex-event' - #213
Merged
Merged
Conversation
Validator request post-v4.0.2: the CometBFT v0.38.23 bump supports event re-indexing but the command was not reachable from the passage CLI. Adapted from cometbft cmd/cometbft/commands/reindex_event.go with three changes: config sourced from the SDK server context (correct --home), RunE so failures exit non-zero (upstream printed and exited 0), and a final start/end/blocks summary after the progress bar. Upstream name, reindex_event alias, and --start-height/--end-height semantics preserved. CLI-only; no consensus or application-state impact. Tested on the real-state mainnet fork: 11-block range reindexed with progress output (exit 0), invalid range exits 1, overlapping rerun is idempotent (exit 0). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
FYI — the published |
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.
Summary
Post-v4.0.2 validator request: the CometBFT v0.38.23 bump supports event re-indexing, but the command was never reachable from the passage CLI. This exposes it as
passage comet reindex-event(aliasreindex_event), preserving upstream--start-height/--end-heightsemantics.Adapted from cometbft
cmd/cometbft/commands/reindex_event.go(Apache-2.0) with three deliberate changes, documented in the file header:--homeresolves to the passage home (the upstream command reads a package-level config the SDK CLI never populates).RunEinstead ofRun: failures exit non-zero (upstream prints the error and exits 0).start_height / end_height / blockssummary after the progress bar.CLI-only — no consensus or application-state impact; optional per-validator upgrade, no coordination needed.
Testing
On a real-state mainnet fork: 11-block range reindexed with progress output (exit 0); start-height beyond tip exits 1; overlapping re-run is idempotent (exit 0). Release with reproducible rbuilder binaries + checksums: https://github.com/Ninjaxan/Passage3D/releases/tag/v4.0.3
🤖 Generated with Claude Code