Skip to content

feat: add RPC infrastructure — fallback chain, circuit breaker, rate limiter, health monitor#6

Merged
linuxninja39 merged 1 commit into
mainfrom
merge/ev-otl3
Feb 18, 2026
Merged

feat: add RPC infrastructure — fallback chain, circuit breaker, rate limiter, health monitor#6
linuxninja39 merged 1 commit into
mainfrom
merge/ev-otl3

Conversation

@linuxninja39

Copy link
Copy Markdown
Contributor

Summary

  • Adds RPC provider infrastructure with fallback chain, circuit breaker, rate limiter, health monitor, and metrics
  • New src/rpc/ module with 6 components: RpcFallbackChain, RpcCircuitBreakerManager, RpcRateLimiter, RpcHealthMonitor, ProviderMetrics, and types
  • Full test coverage: 64 new tests across 5 test files
  • Updated src/index.ts with RPC module exports

Test plan

  • All 866 tests pass (38 test files)
  • Clean rebase on main, no conflicts
  • New RPC tests: ProviderMetrics (16), CircuitBreakerManager (14), FallbackChain (14), HealthMonitor (11), RateLimiter (9)

MQ: ev-otl3 | Branch: polecat/obsidian/ev-zwqy@mlr9d1op

…limiter, health monitor, metrics

Phase 3 of RPC provider fallback chain (ev-zwqy per en-25w5 directive).

- RpcCircuitBreakerManager: per-(chainId, provider) circuit breakers with
  5 failures/60s → OPEN, 30s timeout, 3 successes to close
- RpcRateLimiter: per-endpoint token bucket rate limiting from rateLimitRps
- RpcFallbackChain: ordered endpoint traversal with CB + RL integration,
  cache fallback, 30s total timeout, retry maxAttempts=2 with exponential
  backoff, skip retry on 401/403
- RpcHealthMonitor: background ping per provider/chain (60s interval,
  accepts eth_blockNumber health check fn)
- ProviderMetrics: P50/P95/P99 latency, rolling 5-min error rate

64 new tests across 5 test files. All 842 project tests passing.
All classes exported for sol-integration to import.
@linuxninja39 linuxninja39 merged commit b3c24da into main Feb 18, 2026
1 check passed
@linuxninja39 linuxninja39 deleted the merge/ev-otl3 branch February 18, 2026 00:11
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