Skip to content

feat(indexer): add Stellar RPC connectivity check to health endpoint#175

Open
sulaimonifeoluwa4-blip wants to merge 2 commits into
Betta-Pay:mainfrom
sulaimonifeoluwa4-blip:feat/issue-78-stellar-rpc-health-check
Open

feat(indexer): add Stellar RPC connectivity check to health endpoint#175
sulaimonifeoluwa4-blip wants to merge 2 commits into
Betta-Pay:mainfrom
sulaimonifeoluwa4-blip:feat/issue-78-stellar-rpc-health-check

Conversation

@sulaimonifeoluwa4-blip

Copy link
Copy Markdown
Contributor

closes #78

Description

This PR adds a downstream Stellar RPC connectivity check to our health tracking endpoint. The health payload now verifies that our interface can actively establish communication with the Stellar network cluster without creating a cascading point-of-failure if the provider drops temporarily.

Changes

  • 🩺 RPC Health Verification: Added an async probe checking server.getLatestLedger() inside the main health router context.
  • ⏱️ Timeout Guard: Wrapped the network network call with a strict 5-second timeout execution boundary.
  • 📦 Payload Extension: Enriched the API JSON response to supply rpc.connected indicators alongside optional rpc.latestLedger sequence heights.
  • 🛡️ Fault Tolerance: Out-of-bounds networks or remote exceptions drop the connection flag gracefully instead of throwing unhandled 500 app panics.

Acceptance Criteria Verification

  • RPC Tracking: Appends { rpc: { connected: boolean, latestLedger?: number } } into the active telemetry.
  • Timeout Enforcement: Slashing connection attempts at the 5-second limit cleanly.
  • Isolation: Top-level global service status remains uninhibited during targeted connection drops.

How to Test

  1. Make a payload request to your local health route:
    curl http://localhost:3000/health## Description

Ref #78. This PR adds a downstream Stellar RPC connectivity check to our health tracking endpoint. The health payload now verifies that our interface can actively establish communication with the Stellar network cluster without creating a cascading point-of-failure if the provider drops temporarily.

Changes

  • 🩺 RPC Health Verification: Added an async probe checking server.getLatestLedger() inside the main health router context.
  • ⏱️ Timeout Guard: Wrapped the network network call with a strict 5-second timeout execution boundary.
  • 📦 Payload Extension: Enriched the API JSON response to supply rpc.connected indicators alongside optional rpc.latestLedger sequence heights.
  • 🛡️ Fault Tolerance: Out-of-bounds networks or remote exceptions drop the connection flag gracefully instead of throwing unhandled 500 app panics.

Acceptance Criteria Verification

  • RPC Tracking: Appends { rpc: { connected: boolean, latestLedger?: number } } into the active telemetry.
  • Timeout Enforcement: Slashing connection attempts at the 5-second limit cleanly.
  • Isolation: Top-level global service status remains uninhibited during targeted connection drops.

How to Test

  1. Make a payload request to your local health route:
    curl http://localhost:3000/health

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@sulaimonifeoluwa4-blip 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Stellar RPC connectivity check to health endpoint

2 participants