Skip to content

Add RPC health monitoring with auto-failover#2

Merged
wakamex merged 1 commit intomainfrom
worktree-agent-a00806ab
Mar 1, 2026
Merged

Add RPC health monitoring with auto-failover#2
wakamex merged 1 commit intomainfrom
worktree-agent-a00806ab

Conversation

@wakamex
Copy link
Owner

@wakamex wakamex commented Mar 1, 2026

Summary

  • Introduce periodic eth_blockNumber health checks (every 30s) on the primary RPC connection, measuring round-trip latency and tracking consecutive errors
  • Classify endpoints as healthy (<2s), degraded (2-5s), or down (>5s / 3+ errors) and auto-failover to secondary when primary degrades
  • Display RPC health status in the Chains detail view with a colour-coded StatusDot indicator and latency badge

Test plan

  • All 853 main process unit tests pass
  • All 55 component tests pass
  • All 116 resource tests pass
  • TypeScript compiles cleanly (tsc --noEmit)
  • Vite bundle builds successfully
  • Manual: Open Chains view, select a connected network, verify RPC Health section appears with latency and status dot
  • Manual: Disconnect primary RPC, verify status transitions to degraded/down

🤖 Generated with Claude Code

Introduce periodic eth_blockNumber health checks (every 30s) on the
primary RPC connection.  The health checker measures round-trip latency,
tracks consecutive errors, and classifies the endpoint as healthy
(<2s), degraded (2-5s), or down (>5s / 3+ errors).

When the primary degrades and a secondary provider is connected, the
connection automatically falls back to the secondary by marking the
primary as disconnected, which the existing send() method handles.

Health data is stored transiently in networksMeta.ethereum[chainId].rpcHealth
and displayed in the Chains detail view as a latency badge with a
colour-coded StatusDot indicator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wakamex wakamex merged commit 18b1876 into main Mar 1, 2026
1 check failed
wakamex added a commit that referenced this pull request Mar 2, 2026
Resolve conflicts in app/types.ts and main/store/actions/index.ts.
Health checker runs 30s polls on primary RPC, shows status in chain detail,
falls back to secondary when primary degrades.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
wakamex added a commit that referenced this pull request Mar 2, 2026
Resolve conflicts in app/types.ts and main/store/actions/index.ts.
Health checker runs 30s polls on primary RPC, shows status in chain detail,
falls back to secondary when primary degrades.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant