You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement a reorg-aware Stellar event ingestion pipeline that detects ledger rollbacks and reverses affected database state #724
The current event ingestion pipeline assumes Stellar ledgers are final on first observation. In practice, a network partition or validator disagreement can cause a short ledger rollback (reorg), invalidating previously ingested events. The pipeline must detect when the next ledger's previousLedgerHash does not match the stored hash of the last ingested ledger, trigger a rollback of all affected database records, and re-ingest from the fork point.
Scope
Store ledgerSequence and ledgerHash for every ingested event in a LedgerCheckpoint table
On each new ledger, verify incoming.previousLedgerHash === checkpoint[incoming.sequence - 1].hash
On mismatch: identify the fork point by walking backwards through LedgerCheckpoint until hashes agree, mark all events from the fork point forward as REORGED, reverse their database side effects (key balance changes, holder count changes, transaction history entries) inside a single database transaction, then re-ingest from the fork point
Emit a warn-level structured log with forkPoint, reorgedLedgerCount, and affectedEventCount on every reorg
Gate all buy/sell API responses on confirmed ledger depth ≥ 2 (no response until the ledger is 2 deep) to reduce reorg exposure
Add integration tests: clean ingestion advances the checkpoint, a simulated reorg triggers rollback and re-ingestion, rolled-back balance changes are correctly reversed, re-ingested events produce the same final state as if the reorg never happened
Acceptance Criteria
LedgerCheckpoint table stores hash and sequence for every ingested ledger
Hash mismatch triggers rollback of all events from the fork point forward
Rolled-back database side effects fully reversed in a single atomic transaction
Warn log emitted with fork point and affected counts on every reorg
Buy/sell responses gated on ledger depth ≥ 2
Re-ingestion after rollback produces identical final state
I’m interested in this issue because it combines backend engineering, database consistency, and Stellar blockchain event processing. I have experience building backend APIs and working with databases, and I’m confident I can implement reliable ledger checkpointing, reorg detection, atomic state rollback, and re-ingestion with thorough integration tests. I’m committed to delivering a robust solution that preserves data integrity and handles reorgs safely.
I have experience with web development and programming, particularly HTML, CSS, JavaScript, and Python. I approach technical issues by first understanding the problem, reproducing it when possible, identifying the root cause, and then testing a clear solution. I also value clean, maintainable code and documenting the changes so others can easily understand and contribute.
Hello I’ve reviewed the issue description and I’m confident and competent to give you exactly your insight view on this issue I can work on it effectively.
I will implement and fix this issue according to the requirement and to fit your acceptance criteria.
I would like to resolve this issue. Here is my proposed execution plan:
Implementation: Implement Implement a reorg-aware Stellar event ingestion pipeline that detects ledger rollbacks and reverses affected database state with thorough authorization verification and clean data structures.
Testing: Ensure contract compiles cleanly and passes all cargo tests without warnings.
I am ready to start immediately—please feel free to assign this to me!
Structure Soroban contract handlers for Implement a reorg-aware Stellar event ingestion pipeline that detects ledger rollbacks and reverses affected database state following project idioms and storage invariants.
Ensure contract compiles cleanly and passes all cargo tests without warnings.
Looking forward to collaborating on this—please assign!
@damilare0813 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hello, I'd like to work on this. I have experience with Rust/Soroban and I've worked on similar tests before. I can start now and open PR within 2 days. Here is my GitHub: [your link]"
@timiturn3r has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
Hello @maintainer, I’d like to work on this issue. I have experience handling similar tasks and can start immediately. And I will deliver at the shortest possible time.
@DanbabaJr has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
I'm an active contributor with a solid track record on Drips, having consistently taken on issues, delivered quality work, and contributed to successful project outcomes. I've gained valuable experience working with different repositories, understanding codebases, and collaborating with maintainers.
I'm looking forward to another productive wave. I'm ready to take on challenging issues, deliver reliable results, and maintain the standard I've built so far. I'd appreciate the opportunity to contribute again.
Congratulations, @DanbabaJr! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @DanbabaJr: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
😎 @DanbabaJr: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.
Activity
datagerl commentedon Aug 15, 2026
Hi dev please allow me work on this issue
devkryssie commentedon Aug 16, 2026
I’m interested in this issue because it combines backend engineering, database consistency, and Stellar blockchain event processing. I have experience building backend APIs and working with databases, and I’m confident I can implement reliable ledger checkpointing, reorg detection, atomic state rollback, and re-ingestion with thorough integration tests. I’m committed to delivering a robust solution that preserves data integrity and handles reorgs safely.
bytebinders commentedon Aug 16, 2026
@Chucks1093 Follow-up on issue #724 Please assign this task to Bytebinders for implementation.
lekanay2005-coder commentedon Aug 17, 2026
i will like to work on this issue pls
AUWALANCHAU commentedon Aug 19, 2026
I have experience with web development and programming, particularly HTML, CSS, JavaScript, and Python. I approach technical issues by first understanding the problem, reproducing it when possible, identifying the root cause, and then testing a clear solution. I also value clean, maintainable code and documenting the changes so others can easily understand and contribute.
dami-005 commentedon Aug 20, 2026
hello maintainer, after reviewing this issue i am confident i can resolve in due time
Ridwan-001-bip commentedon Aug 20, 2026
Hello I’ve reviewed the issue description and I’m confident and competent to give you exactly your insight view on this issue I can work on it effectively.
I will implement and fix this issue according to the requirement and to fit your acceptance criteria.
nomsoscript commentedon Aug 24, 2026
Can I work on this?
ubongante7-create commentedon Aug 29, 2026
Gm maintainer please i would love to work on this issue and contribute to your project
Please can you assign it to me
guptakumarranjeet150 commentedon Sep 14, 2026
Hello! I would like to work on this issue.
I would like to resolve this issue. Here is my proposed execution plan:
Implement a reorg-aware Stellar event ingestion pipeline that detects ledger rollbacks and reverses affected database statewith thorough authorization verification and clean data structures.I am ready to start immediately—please feel free to assign this to me!
guptakumarranjeet150 commentedon Sep 27, 2026
Hello team,
I am interested in working on this issue.
Plan:
Implement a reorg-aware Stellar event ingestion pipeline that detects ledger rollbacks and reverses affected database statefollowing project idioms and storage invariants.Looking forward to collaborating on this—please assign!
12 remaining items
damilare0813 commentedon Oct 17, 2026
@damilare0813 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @damilare0813 to this issue.
Ayfataan commentedon Oct 17, 2026
@Ayfataan has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Ayfataan to this issue.
timiturn3r commentedon Oct 17, 2026
@timiturn3r has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @timiturn3r to this issue.
Anorakthegr8 commentedon Oct 17, 2026
@Anorakthegr8 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Anorakthegr8 to this issue.
DanbabaJr commentedon Oct 17, 2026
@DanbabaJr has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @DanbabaJr to this issue.
mysterio123865 commentedon Oct 17, 2026
@mysterio123865 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @mysterio123865 to this issue.
drips-wave commentedon Oct 17, 2026
Congratulations, @DanbabaJr! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.
🧑💻 @DanbabaJr: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
Warning
When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
Merge upstream main into the reorg-aware ingestion branch (accesslaye…
fix(invoice): return latestLedger from the invoice-protocol RPC stub
feat(indexer): reorg-aware event ingestion with ledger rollback (#724)
Merge pull request #1184 from DanbabaJr/freebuff/6731e6c1c61eeee7ae9e…
grantfox-oss commentedon Oct 22, 2026
🎉 This issue has been marked as completed on GrantFox!
@DanbabaJr's PR #1184 was approved and merged by @Chucks1093.
🏆 @DanbabaJr: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (560 total points). Track your full progress on GrantFox.
👏 Great work, @DanbabaJr! Keep contributing to accesslayerorg.
drips-wave commentedon Oct 22, 2026
This issue has been completed by @DanbabaJr as part of the Stellar Wave Program's 10th Wave 🥳
😎 @DanbabaJr: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.