OP Mainnet public RPC eth_getLogs limits
7 keyless OP Mainnet RPC endpoints tested on 2026-11-13. Largest range that worked: 100,000 blocks on optimism.gateway.tenderly.co.
| Endpoint | Largest eth_getLogs range that worked | Latency (median of 3) | Previous (2026-10-23) | Archive (block 1 balance) | Error at next size |
|---|---|---|---|---|---|
| optimism.gateway.tenderly.co | 100,000+ blocks | 243 ms | 100,000+ | no | |
| mainnet.optimism.io | 10,000 blocks | 270 ms | 10,000 | yes | eth_getLogs is limited to a 10,000 range |
| optimism-rpc.publicnode.com | 5,000 blocks | 168 ms | 5,000 | no | Archive requests require a personal token. Get one at: https://www.allnodes.com/publicnode |
| optimism-rpc.blockreq.com/v1/rpc/public | 1,000 blocks | 149 ms | 1,000 | no | public endpoint only serves recent blocks (last 1024). Register at blockreq.com for historical / archive access. |
| optimism.drpc.org | 100 blocks | 149 ms | 100 | yes | ranges over 10000 blocks are not supported on free plan |
| 1rpc.io/op | 10 blocks | 155 ms | 10 | no | eth_getLogs is limited to 0 - 50 blocks range |
| xrpc.cl/optimism | down / error | - | down | - | XRPC Cluster: Backend optimism node currently syncing and fallbacks busy |
Chunk your queries
// Chunked eth_getLogs that adapts to the provider's limit (viem)
async function getLogsChunked(client, filter, from, to, step = 2000n) {
const out = [];
for (let start = from; start <= to; ) {
const end = start + step - 1n > to ? to : start + step - 1n;
try {
out.push(...await client.getLogs({ ...filter, fromBlock: start, toBlock: end }));
start = end + 1n;
} catch (e) {
if (step === 1n) throw e;
step = step / 2n; // range or result-size limit: halve and retry
}
}
return out;
}