This document lists high-level test scenarios for rpcsmartrouter.
It is a centralized solution that relays directly to RPC endpoints, without providers or blockchain interactions.
- Static endpoints only - load
static-providersand build direct connections - Protocol detection - http/https/ws/wss/grpc based on URL or api-interface
- Auth headers and auth path -
auth-configapplied to requests - Per-endpoint timeout - NodeUrl timeout overrides honored
- IP forwarding -
ip-forwardingheader set when enabled
- Basic relay - JSON-RPC over HTTP/HTTPS (eth_blockNumber, eth_getBalance)
- Batch requests - multiple JSON-RPC calls in one request
- Error handling - correct JSON-RPC error codes and shapes
- Block params - latest/earliest/pending/specific block number
- Basic relay - GET/POST/PUT/DELETE to REST endpoints
- Path and query params - correct URL joining and encoding
- Response formats - JSON and non-JSON responses handled
- Error responses - HTTP status and body forwarded correctly
- Basic relay - Tendermint RPC method calls
- Block height queries - specific blocks by height
- ABCI queries - ABCI request handling
- Unary calls - request/response with dynamic descriptors
- Metadata forwarding - request and response metadata handling
- Error codes - gRPC status mapping
- Descriptor source - reflection + descriptor set fallback
- Streaming not supported - clear error on streaming methods
- Direct-only flow - no provider-relay path reachable
- Retry on 5xx/429/timeouts - endpoint rotation with backoff
- No retry on 4xx - client errors are terminal
- Timeout handling - per-request timeout and overrides
- Endpoint health - mark unhealthy on node errors, reset on success
- Cache bypass - stateful and quorum requests skip cache
- LATEST_BLOCK consistency - seen-block based cache keys
- Unsupported method caching - cache unsupported method errors
- No cache for node errors - errors not stored as success
- Force cache refresh - header bypass works
- Cache unavailability - graceful degradation on cache failure
- Quorum selection - multi-endpoint consensus when enabled
- Best result selection - prefer highest block / lowest latency
- Partial success - accept when at least one endpoint succeeds
- Stateful fanout - broadcast to all endpoints for stateful APIs
- WS connection setup - connect to ws/wss endpoints
- Subscription create - eth_subscribe/newHeads/logs
- Message routing - upstream events forwarded to clients
- Cleanup - disconnects remove upstream subscriptions
- Reconnect/backoff - retry with endpoint rotation
- Lava-Provider-Address - endpoint identity (not provider address)
- Lava-Retries - retry count included
- Provider-Latest-Block - latest block header set
- Lava-Guid - request GUID propagated
- lava-identified-node-error - node error flag set correctly
- lava-fast-tx-participants - stateful fanout participants
- lava-quorum-all-providers - quorum participants list
- Lava-Relay-Protocol - transport protocol reported
- Provider pairing/epochs - no pairing, no epoch updates
- Relay signing/payments - no signatures or payment flows
- Conflict reporting - no on-chain conflict detection/reporting
- On-chain QoS - no staking or reputation updates