Context
transactionBackfill.ts replays Soroban contract events for a ledger range to repair indexer gaps. Jobs and progress are tracked in in-memory Map structures.
Problem / Gap
Long-running backfill jobs are lost on process restart. Operators cannot resume partially completed ledger scans or audit historical backfill runs after deploys.
Proposed approach
- Persist backfill job metadata and progress checkpoints in Prisma.
- Resume from the last completed ledger batch on restart.
- Expose job status via existing admin backfill endpoints with durable history.
- Enforce existing
MAX_LEDGER_RANGE and MAX_BATCH_SIZE guards.
Acceptance criteria
Files/areas affected
backend/src/transactionBackfill.ts
backend/src/eventPollingService.ts
backend/prisma/schema.prisma
Context
transactionBackfill.tsreplays Soroban contract events for a ledger range to repair indexer gaps. Jobs and progress are tracked in in-memoryMapstructures.Problem / Gap
Long-running backfill jobs are lost on process restart. Operators cannot resume partially completed ledger scans or audit historical backfill runs after deploys.
Proposed approach
MAX_LEDGER_RANGEandMAX_BATCH_SIZEguards.Acceptance criteria
Files/areas affected
backend/src/transactionBackfill.tsbackend/src/eventPollingService.tsbackend/prisma/schema.prisma