Fix/backend improvements#1227
Merged
Merged
Conversation
… TransactionsService Replaces on-demand full-scan filtering with a TTL-cached index that supports O(log n) amount range lookups and hash/proposal-based direct access.
Tracks processed event IDs in a bounded set keyed by transactionHash:eventIndex to prevent duplicate processing on replay or restart.
…pers Adds withSpan wrapper, traceMiddleware for Express routes (propagates trace context and sets X-Trace-Id header), and traceRpcCall/traceDbCall helpers to instrument business logic with OpenTelemetry spans.
Tests the complete chain: request → middleware (CORS, auth, request ID) → controller → service → persistence → response for transactions, proposals, health, and error handling paths.
|
@devoclan 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! 🚀 |
510a0fb to
bff2393
Compare
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.
closes #1162
closes #1178
closes #1158
closes #1157
transactions.service.ts makes live RPC calls for each query. There's no local index. Amount range queries (e.g., "all transactions between 100 and 1000 XLM") require fetching everything and filtering in-memory.
consumer.ts has no idempotency guard. Reprocessing an event updates the proposal store twice. There is no deduplication.
tracing.ts initializes the SDK but no spans wrap business logic. HTTP requests have no trace IDs. Database calls and RPC calls are invisible in trace tools.