Add event replay API for re-indexing specific ledger ranges - #2
Open
oluwaseyi1996-netizen wants to merge 9 commits into
Open
Add event replay API for re-indexing specific ledger ranges#2oluwaseyi1996-netizen wants to merge 9 commits into
oluwaseyi1996-netizen wants to merge 9 commits into
Conversation
…#193) Transaction hashes from blockchain explorers are often uppercase or mixed-case. Rather than rejecting them with 400, normalize to lowercase before validation and querying so clients can copy-paste hashes freely. - validate_tx_hash now accepts both uppercase and lowercase hex chars - get_events_by_tx calls to_lowercase() before validation and querying - OpenAPI doc updated: hashes are case-insensitive - Replaced tx_hash_uppercase_hex_returns_400 test with normalization tests - Added mixed-case normalization test Closes Soroban-Pulse#193
…e#192) Adds a CI job that validates the generated OpenAPI spec and ensures docs/openapi.json stays in sync with the code. - Add src/bin/dump_openapi.rs: binary that dumps the utoipa-generated spec to stdout, usable in CI without starting the server - Commit docs/openapi.json: generated spec checked into the repo so spec changes are visible in PR diffs (like cargo fmt --check) - Add 'openapi' CI job to .github/workflows/ci.yml: - Builds dump_openapi binary - Validates spec with @stoplight/spectral-cli@6.11.1 (pinned) - Fails if docs/openapi.json does not match the generated spec - Fix pre-existing compile errors across handlers.rs, routes.rs, metrics.rs, middleware.rs, models.rs, db.rs, main.rs Closes Soroban-Pulse#192
…ase-normalization feat: normalize tx_hash to lowercase before validation (Soroban-Pulse#193)
…pec-ci feat: add OpenAPI spec CI validation and committed spec (Soroban-Pulse#192)
- Implement POST /v1/admin/replay endpoint with validation - Add API key authentication and advisory lock check - Implement background replay job with idempotency using ON CONFLICT DO NOTHING - Add soroban_pulse_replay_jobs_total metrics counter - Add comprehensive tests for validation and authentication - Update OpenAPI documentation with admin endpoints - Validate ledger range (from_ledger <= to_ledger, max 10,000 ledgers) - Return 403 if current replica is not the active indexer - Support both Authorization: Bearer and X-Api-Key authentication headers Fixes Soroban-Pulse#207
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.
Fixes Soroban-Pulse#207
Summary
Related Issue
Closes #
Changes
Testing
cargo testpassescargo clippyreports no warningsNotes
CLOSES Soroban-Pulse#207