Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/dev/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,10 @@ let _ = rustls::crypto::ring::default_provider().install_default();
{% endstep %}
{% endstepper %}

### What does "rabbit hole is full. Please try again later" mean?
### What does `Rate limit exceeded` mean?

It means you are hitting a rate limit.
Older clients or outdated docs may still refer to `rabbit hole is full. Please try again later`, but the public gateway now returns `Rate limit exceeded` with RPC error `-32005`.

### What does "rpc method is not whitelisted" mean?

Expand Down
23 changes: 17 additions & 6 deletions docs/dev/read/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,23 @@ See [Debugging Transactions](../send-tx/debugging.md) for usage of debug methods

## Rate Limiting

All available methods are subject to rate limiting based on two criteria:

- **Compute Unit (CU) Limiting** — limits the computational cost of requests based on their complexity.
- **Network Bandwidth Limiting** — limits the network traffic based on response sizes.

User limits are dynamically updated in response to individual behavior.
Read methods on the public RPC endpoint are rate-limited **per IP address** in **fixed 10-second windows**.
Each method belongs to one of four categories, and each category has its own request budget:

| Category | Limit (per 10 s) | Methods |
| -------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------- |
| Instant | 2,000 | `eth_chainId`, `eth_blockNumber`, `net_version`, `eth_accounts`, `web3_clientVersion`, `eth_getBalance`, `eth_getStorageAt` |
| Simple | 500 | Block/transaction queries, `eth_callAfter`, and all other read methods not listed in another category |
| Compute | 200 | `eth_call`, `eth_callMany`, `eth_estimateGas`, `eth_createAccessList`, `debug_trace*`, `trace_*` |
| IO-heavy | 200 | `eth_getLogs`, `eth_getBlockReceipts` |

Comment thread
claude[bot] marked this conversation as resolved.
Additional notes:

- Transaction submission methods (`eth_sendRawTransaction`, `realtime_sendRawTransaction`) are not subject to these read rate limits.
- Cache hits still consume the method's per-category budget.
- `eth_callMany` consumes one Compute-category request per inner transaction, not one per HTTP request.
- `eth_callAfter` uses the Simple-category budget even though it shares `eth_call`'s 60,000,000 compute-gas cap.
- A rate-limited request is rejected with HTTP `429` and RPC error `-32005` (`Rate limit exceeded`) — see [Error Codes](rpc/error-codes.md). Reduce request frequency, or use batching or WebSocket subscriptions to lower the request count.

## Request Body Limits

Expand Down
22 changes: 12 additions & 10 deletions docs/dev/read/rpc/error-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ description: MegaETH JSON-RPC error codes — HTTP status codes, RPC error codes

# Error Codes

| HTTP Error Code | RPC Error Code | Error Message | Explanation | Mitigation |
| --------------- | -------------- | -------------------------------------------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| 400 | -32700 | `parse error` | The request body contains invalid JSON. | Check the request format and ensure valid JSON syntax. |
| 413 | -32099 | `payload too large` | The request body exceeds the size limit for the method being called. | Stay within the body-size limit for the method class. See [Request Body Limits](../overview.md#request-body-limits). |
| 403 | -32601 | `rpc method is not whitelisted` | The requested RPC method is not allowed by the proxy configuration. | Use only whitelisted RPC methods. Contact MegaETH if you need access to additional methods. |
| 400 | -32019 | `block is out of range` | The requested block number is out of range. | Check the block number and ensure it's within the valid range. |
| 500 | -32020 | `backend response too large` | The backend response is too large. | Reduce the scope of the request or contact MegaETH for assistance. |
| 429 | -32021 | `over network traffic limit, retry in X seconds` | The user is incurring too much network traffic. | Wait for the specified number of seconds before retrying. Reduce the number of requests sent per second. |
| 429 | -32022 | `over compute unit limit, retry in X seconds` | The user is incurring too much computation on the backend RPC server. | Wait for the specified number of seconds before retrying. Reduce the number of requests sent per second. |
| 200 | -32000 | `permanent error forwarding request context deadline exceeded` | The API proxy cannot connect to the backend RPC server. | Pause for a while and retry. Notify MegaETH if the error persists. |
| HTTP Error Code | RPC Error Code | Error Message | Explanation | Mitigation |
| --------------- | -------------- | -------------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| 400 | -32700 | `parse error` | The request body contains invalid JSON. | Check the request format and ensure valid JSON syntax. |
| 413 | -32099 | `payload too large` | The request body exceeds the size limit for the method being called. | Stay within the body-size limit for the method class. See [Request Body Limits](../overview.md#request-body-limits). |
| 403 | -32601 | `rpc method is not whitelisted` | The requested RPC method is not allowed by the proxy configuration. | Use only whitelisted RPC methods. Contact MegaETH if you need access to additional methods. |
| 400 | -32019 | `block is out of range` | The requested block number is out of range. | Check the block number and ensure it's within the valid range. |
| 500 | -32020 | `backend response too large` | The backend response is too large. | Reduce the scope of the request or contact MegaETH for assistance. |
| 429 | -32005 | `Rate limit exceeded` | The request exceeds the rate limit for its method category. | Reduce request frequency, or use batching or WebSocket subscriptions. See [Rate Limiting](../overview.md#rate-limiting). |
| 200 | -32000 | `permanent error forwarding request context deadline exceeded` | The API proxy cannot connect to the backend RPC server. | Pause for a while and retry. Notify MegaETH if the error persists. |

Older references to `-32021` or `-32022` refer to the previous rate-limit codes.
The public gateway now returns `-32005` for rate-limited requests.

## Related Pages

Expand Down
Loading