Skip to content

v2.1.73

Latest

Choose a tag to compare

@nischitpra nischitpra released this 02 Feb 15:55
ec98297
Feature/tx backfill fallback (#933)

* feat: add transaction backfill fallback for queue ID lookups

- Add ENABLE_TX_BACKFILL_FALLBACK env var (default: false)
- Add backfill methods to TransactionDB (getBackfillHash, setBackfill, bulkSetBackfill)
- Add fallback lookup in /transaction/logs endpoint
- Add POST /admin/backfill endpoint for loading backfill data

When enabled, the /transaction/logs endpoint will check a fallback
Redis table (backfill:<queueId>) when the primary transaction cache
misses. This allows recovering transaction logs for queue IDs that
were pruned from the main cache.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: add DELETE /admin/backfill endpoint to clear backfill table

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: add comments explaining AMEX backfill logic

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: validate backfill hash format before use

Add isHex validation to prevent unexpected behavior if malformed
data exists in the backfill table.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: extend backfill fallback to support /transaction/status endpoint

- Add BackfillEntry interface with status field ("mined" | "errored")
- Update TransactionDB to store/retrieve JSON format for backfill entries
- Add backfill fallback lookup to /transaction/status routes
- Update /transaction/logs to use new getBackfill method
- Update admin backfill schema to accept status field
- Maintain backwards compatibility for plain string tx hash entries

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: add AMEX backfill comments to /transaction/status routes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: use discriminated union for backfill schema and remove duplicate comment

- Use discriminated union so transactionHash is required for mined entries
- Remove duplicated AMEX comment block

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>