Skip to content

feat: expose CometBFT reindex-event as 'passage comet reindex-event' - #213

Merged
ECHOAD merged 1 commit into
envadiv:v4.0.xfrom
Ninjaxan:feat/v4.0.3-reindex-event
Jul 20, 2026
Merged

feat: expose CometBFT reindex-event as 'passage comet reindex-event'#213
ECHOAD merged 1 commit into
envadiv:v4.0.xfrom
Ninjaxan:feat/v4.0.3-reindex-event

Conversation

@Ninjaxan

Copy link
Copy Markdown

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 (alias reindex_event), preserving upstream --start-height/--end-height semantics.

Adapted from cometbft cmd/cometbft/commands/reindex_event.go (Apache-2.0) with three deliberate changes, documented in the file header:

  1. Config sourced from the SDK server context, so --home resolves to the passage home (the upstream command reads a package-level config the SDK CLI never populates).
  2. RunE instead of Run: failures exit non-zero (upstream prints the error and exits 0).
  3. Final start_height / end_height / blocks summary 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

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>
@ECHOAD
ECHOAD merged commit eea1f3e into envadiv:v4.0.x Jul 20, 2026
2 of 5 checks passed
@Ninjaxan

Copy link
Copy Markdown
Author

FYI — the published v4.0.3 release tag is pointing at the wrong commit (pre-SDK-upgrade, June 2024) and is bricking validators on upgrade. Filed #214 with the details. This PR is built cleanly on v4.0.2 with zero go.mod/go.sum drift — happy to help get v4.0.3 re-tagged correctly from here.

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.

3 participants