Skip to content

Fix 4 backend bugs: ledger caching, error format, metrics, distributed locking - #765

Open
Muhammadcodes112 wants to merge 4 commits into
SoroLabs:mainfrom
Muhammadcodes112:fix/issue-batch-1
Open

Fix 4 backend bugs: ledger caching, error format, metrics, distributed locking#765
Muhammadcodes112 wants to merge 4 commits into
SoroLabs:mainfrom
Muhammadcodes112:fix/issue-batch-1

Conversation

@Muhammadcodes112

Copy link
Copy Markdown
  • Add a thread-safe in-memory LRU cache with configurable TTL in front of the disk-backed ledger entry store in core/.
  • Standardize Axum API error responses to RFC 7807 Problem Details (type, title, status, detail, instance).
  • Expose Prometheus metrics for ledger indexing latency, event throughput, error counts, and job queue depth on the existing /metrics endpoint.
  • Add a Redis-backed leader lease lock so only one Core instance performs ledger fee collection at a time, avoiding duplicate processing across multiple instances.

Manually traced each changed code path (cache read/write flow, error response construction, metrics registration/recording, and leader-lock acquire/renew logic) since the repo has no working automated test/build verification available in this environment.

Closes #560
Closes #561
Closes #563
Closes #564

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment