eth_getLogs limits
RouteMesh enforces a maximum block span of 10,000 blocks pereth_getLogs request when both fromBlock and toBlock are fixed hex values. Dynamic tags (latest, safe, finalized, pending) are not pre-validated against this limit.
When a request exceeds a limit, the router returns a normalized JSON-RPC error with an actionable hint in error.message. See RPC Error Codes for the full code table.
Retry pattern: On
-32005, halve the block span and retry until the query succeeds, then widen gradually if needed. On -32602, stay at or below the hinted maximum span.
The hint’s N is your current limit, not always the 10,000 cap. The ; try a block range of at most N blocks suffix reports the largest span RouteMesh can currently route for that chain and access tier. This can be smaller than 10,000 and changes over time — different chains and access tiers can have different limits, and the value moves as providers and their limits change. When you see the hint, use its N as the maximum for that chain.
Allowed domains
API keys can be restricted to specific origins (domains). When an key has allowed domains set, the router checks the request’sOrigin (or Referer) header against that list. If the request comes from a domain that is not allowed, the router returns 403 Forbidden and does not forward the request.
- No allowed domains (empty list): the key is allowed from any origin. Use this for server-side or mobile apps where no browser origin is sent.
- With allowed domains: only requests whose origin matches one of the listed hostnames are accepted. Use this for web apps to limit key usage to your front-end domain(s).
app.example.com), without path or scheme. This reduces the risk of a key being used from an unauthorized site.
Cooldowns and rate limiting
When an upstream node returns a rate-limit (HTTP 429) or service-unavailable (503) response, RouteMesh puts that pathway (node + method) on a short cooldown. During cooldown, the router will not send new requests to that pathway, so you avoid hammering a node that is already overloaded.- Cooldowns are per pathway (node and method), not global. Other nodes or methods are still used.
- If all pathways that can serve your route are on cooldown, the router returns HTTP 429 Too Many Requests and a JSON-RPC error with code -32005 (Limit exceeded) and
error.data.reason=capacity_cooldown. - When you get this cooldown error, retry after a short backoff (e.g. a few seconds). Cooldowns are temporary; once they expire, the same request can succeed.
The cooldown error uses -32005, not -32003. EIP-1474 assigns -32003 to “Transaction rejected”, and some clients (e.g. viem’s
fallback transport) treat that code as terminal — they stop and do not try the next provider. Using -32005 lets standard clients fall back or retry on their own. Distinguish a cooldown (HTTP 429, error.data.reason = capacity_cooldown) from an eth_getLogs query-density error, which also uses -32005 but returns HTTP 400.Batch requests
You can send multiple JSON-RPC requests in a single HTTP request by posting a JSON array of request objects instead of a single object. The response is a JSON array of responses in the same order as the requests.- Order: Response index
icorresponds to request indexi. Use theidfield in each request to match responses to requests if needed. - Partial failures: Each batch item is processed independently. Some entries may have
resultand otherserror. The HTTP status of the batch is derived from the set of per-request statuses (e.g. 200 if any succeeded, 424 if all failed dependency, 429 if all rate limited). - Empty batch: Sending an empty array
[]is invalid and returns 400 with JSON-RPC code -32600 (Invalid request).
eth_call or eth_getBlockByNumber in one HTTP request).
For request debugging (including X-Batch-Id and the Dashboard Logs page), see Debugging.
