Skip to content

feat(backend): refactor legacy codebase in Smart Contract Oracle Integrator#1258

Merged
emdevelopa merged 1 commit into
emdevelopa:mainfrom
aetheron06:feat
Jul 26, 2026
Merged

feat(backend): refactor legacy codebase in Smart Contract Oracle Integrator#1258
emdevelopa merged 1 commit into
emdevelopa:mainfrom
aetheron06:feat

Conversation

@aetheron06

Copy link
Copy Markdown

Closes #1122
Closes #1123
Closes #1124
Closes #1125

Summary

  • Refactor backend/src/lib/transaction-signer.js for clearer validation, replay protection, structured logging, and granular metrics instrumentation.
  • Add granular transaction-signer metrics in backend/src/lib/metrics.js:
    • tx_signature_verification_total (outcome)
    • tx_signature_verification_latency_seconds (label)
    • tx_signature_verification_errors_total (error_type)
    • tx_signature_replay_attempts_total
    • tx_signature_validation_failures_total (reason)
    • tx_signature_cache_size
  • Add robust merchant-notification caching to backend/src/lib/horizon-poller.js (MerchantConfigCache with LRU eviction and TTL) and use it in batch preload + per-payment fallback.
  • Load/robustness coverage is exercised in backend/src/lib/horizon-poller.test.js, including high-volume batch processing and merchant-cache behavior.

Security & performance notes

  • Replay cache size is bounded and stale entries are pruned on each verification.
  • Merchant config cache reduces DB load and avoids N+1 lookups during poll cycles.
  • Metrics are recorded on validation failures, replay attempts, verifier exceptions, and successful/failed outcomes for observability.

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

@gelluisaac is attempting to deploy a commit to the Emmanuel's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@aetheron06 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

@emdevelopa
emdevelopa merged commit 503ab08 into emdevelopa:main Jul 26, 2026
1 of 2 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

3 participants