Skip to content

feat(backend): improve transaction reliability and migration safety - #1203

Merged
SheyeJDev merged 3 commits into
Split-Naira:mainfrom
eyooTech:sheyiss
Aug 30, 2026
Merged

feat(backend): improve transaction reliability and migration safety#1203
SheyeJDev merged 3 commits into
Split-Naira:mainfrom
eyooTech:sheyiss

Conversation

@eyooTech

Copy link
Copy Markdown
Contributor

Summary

This PR introduces backend reliability and operational-safety improvements across payout history backfills, database migration validation, and RPC-backed read caching.

Changes

  • Added a payout history backfill dry-run mode that allows operators to preview:

    • Ledger ranges being processed
    • Events discovered
    • Existing records
    • Records that would be created
    • Sample records
    • Without making any database writes
  • Added database migration checksum verification to detect modified or missing applied migrations before the application starts serving traffic.

    • Production fails fast when migration checksums differ.
    • Non-production environments can report mismatches as warnings.
    • Added documentation covering detection and recovery procedures.
  • Added stale-if-error behavior for eligible read-cache entries during transient RPC failures.

    • Stale data is only served when explicitly enabled for an endpoint.
    • Cached values are subject to a maximum stale age.
    • Responses/logs expose stale-state metadata.
    • Added failure and RPC recovery test coverage.

Testing

  • Added unit tests for backfill dry-run behavior and verified that no database writes occur during preview mode.
  • Added migration checksum tests for matching, modified, missing, and production-failure scenarios.
  • Added stale-cache tests covering fresh reads, RPC failures, expired cache entries, disabled fallback, and RPC recovery.

Issues

Closes #1036
Closes #1035
Closes #1034
Closes #1037

@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@eyooTech 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! 🚀

Learn more about application limits

@SheyeJDev
SheyeJDev merged commit dafd116 into Split-Naira:main Aug 30, 2026
7 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants