wave4: add reliability, performance, and data accuracy improvements#188
Merged
ritik4ever merged 1 commit intoritik4ever:mainfrom Apr 25, 2026
Merged
Conversation
…ents Implements four interconnected enhancements: 1. Retry with exponential backoff (#133): Add retryWithBackoff helper to handle transient network errors in RPC calls. Retries up to 3 times with delays of 1s, 2s, 4s for timeout/network errors only. 2. RPC response caching (#132): Implement in-memory TTL cache (5s) for get_stream calls to reduce redundant RPC requests. Cache is invalidated on createStream and cancelStream operations. 3. Refund amount propagation (#134): Extract refund amount from on-chain cancel transaction response. Add refunded_amount column to streams table and include in API responses and webhooks. 4. Stream archival (#137): Add stream_archive table and archiveOldStreams() function to move completed streams older than 30 days. Runs on startup and every 24 hours. Archived streams excluded from listStreams() by default but can be included via ?include_archived=true query param. Also fixes bugs in cancelStream and updateStreamStartAt API handlers. Refs #133 #132 #134 #137
|
@silhilston is attempting to deploy a commit to the ritik4ever's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@silhilston 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! 🚀 |
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.
Summary
Wave 4 backend improvements focused on reliability, performance, and data accuracy for the StellarStream payment system.
Changes
Reliability (#133): Add retry with exponential backoff
retryWithBackoff()helper retries transient RPC errors up to 3 timessendTransaction()andgetTransaction()in createStreamPerformance (#132): Cache Soroban RPC responses
get_streamsimulation resultsData Accuracy (#134): Propagate refund amounts from on-chain responses
refunded_amountcolumn to streams tablerefundedAmountin StreamRecord interfacePerformance & Maintenance (#137): Archive completed streams
stream_archivetable with identical schema plusarchived_atcolumnarchiveOldStreams()function moves streams completed > 30 days agolistStreams()by default?include_archived=truequery param includes archived streamsBug Fixes:
canceledStreamvariable in cancel endpointnewStartAtvariable in start time update endpointTesting
Related Issues
Closes #133
Closes #132
Closes #134
Closes #137