Skip to content

feat: add Soroban RPC health check at gateway startup (Closes #7) - #60

Open
ZacLou wants to merge 2 commits into
StellarRoute:mainfrom
ZacLou:feat/issue-7-soroban-startup-checks
Open

feat: add Soroban RPC health check at gateway startup (Closes #7)#60
ZacLou wants to merge 2 commits into
StellarRoute:mainfrom
ZacLou:feat/issue-7-soroban-startup-checks

Conversation

@ZacLou

Copy link
Copy Markdown

Closes#7

Changes

Adds startup dependency checks for Soroban RPC connectivity and contract configuration:

  • validate_gateway_config(): Expanded to log warnings for missing ESCROW_CONTRACT_ID, GATEWAY_SECRET_KEY, and empty SOROBAN_RPC_URL
  • check_soroban_rpc_health(): New async function that probes {SOROBAN_RPC_URL}/health at startup
    • Logs success when RPC responds with 2xx
    • Logs warning when response is non-2xx or connection fails
    • Non-fatal: allows startup even when RPC is temporarily unavailable
    • Skipped entirely when SOROBAN_RPC_URL is not configured
  • main.rs: Wired check_soroban_rpc_health into startup sequence after config validation

Files changed

  • crates/gateway/src/startup.rs — Expanded config checks + new RPC health probe
  • crates/gateway/src/main.rs — Import and call the new health check

Sign up for freeto 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.

[gateway] Add startup dependency checks for Soroban RPC and contract config

1 participant

@ZacLou