Feature/ledger backfill 419#502
Merged
Merged
Conversation
|
@Babigdk Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
Author
|
Resolved |
Contributor
|
please fix workflow |
Contributor
|
Please fix lint error, workflow failed again |
115c515 to
da98e47
Compare
Cedarich
approved these changes
Jun 1, 2026
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.
Ledger Backfill Service for Testnet Contract Events (#419)
Closes #419
Overview
This PR implements a comprehensive ledger backfill service that scans historical contract events from the Stellar Testnet and populates analytics and timelines. The implementation follows best practices for idempotency, resumability, and observability.
✨ Key Features
1. Configurable Ledger Backfill
2. Progress Checkpoint System
3. Idempotent Event Storage
ContractEventmodel(contractId, ledgerSequence, transactionHash, eventIndex)4. Resilient Job Processing
📦 Database Changes
New Models
BackfillCheckpoint
id,jobId,contractId,startLedger,endLedger,lastProcessedLedgerContractEvent
🔌 API Endpoints
All endpoints require admin role and API authentication.
POST
/v1/admin/ledger/backfillTrigger a new backfill job
Request:
{ "contractId": "CCONTRACTID...", "startLedger": 1000, "endLedger": 2000, "campaignId": "campaign_123", "batchSize": 100 }