Skip to main content

Per-Chain & Method Quirks

Some errors aren't about a malformed request — they're about what a given chain or method supports. The same call can succeed on one chain and return an error on another. The patterns below are the common ones; codes are detailed in the Error Reference.

Archive vs full nodes

Full nodes keep recent state and a limited history; archive nodes keep full historical state. Calls that read old state or replay execution need an archive node:

  • trace_*, debug_trace*, eth_call/eth_getBalance/eth_getStorageAt at an old block.
  • If no archive node is available, the gateway returns -32061 No archive nodes available (retryable).
  • If a full node is asked for state it has pruned, the node itself answers with a node-level error (e.g. -32000 "missing trie node" / "header not found"). That's expected — use an archive-tier endpoint for that history.

Block-range limits on eth_getLogs and trace_*

Wide ranges are capped to protect latency. Too wide → -32062 Block range is too large. Split the range into smaller windows and page through them:

const STEP = 2_000n; // tune per chain
for (let from = start; from <= end; from += STEP) {
const to = from + STEP - 1n > end ? end : from + STEP - 1n;
await getLogs({ fromBlock: hex(from), toBlock: hex(to), address, topics });
}

Method support varies by chain

Not every method exists on every chain. Calling one that doesn't returns -32601 Method not found, or -32075 Method disabled if it's gated on the gateway. Check the chain's page under Supported Chains for the methods it serves — for example, trace_*/debug_* availability differs across EVM chains, and non-EVM chains (Solana, TON, Sui, TRON, Aptos, …) expose entirely different method sets.

WebSocket subscriptions vary

Subscription support is per-chain and per-node. If no node currently serves a subscription type you'll get a specific code — -32086 (newHeads), -32087 (logs), -32088 (newPendingTransactions), -32089 (transactionReceipts), or -32085 (no alive WS nodes at all). These are transient: retry, or fall back to HTTP polling for that data.

Batch size

Large JSON-RPC batches are capped — too many sub-calls returns -32062 Batch size too large. Send fewer calls per batch (and remember every sub-call in a batch is billed and rate-limited individually).

Historical data on non-EVM chains

Non-EVM chains keep history differently, and "missing" history surfaces as a node-level response (not a -326xx gateway error):

  • Solana — a full node serves a rolling ledger window; getTransaction / getSignaturesForAddress for older history returns null. Use an archive source or an explorer for data beyond the window.
  • Other chains have their own retention; when a node legitimately doesn't have the data, you get the node's own "not found"/null answer, not an Ankr error.

For these, the request did reach a node — see Errors from the blockchain node.

FAQ

Why does trace_filter / debug_traceTransaction work on one chain but not another?

Trace and debug namespaces require an archive node and aren't enabled on every chain. You'll get -32601/-32075 where they aren't served, or -32061 if no archive node is momentarily available. Check the chain's API reference.

My eth_getLogs call returns -32062. What's the fix?

The block range is too wide. Split it into smaller windows (start around ~2,000 blocks and tune) and page through them.

getTransaction returns null on Solana for an old signature — is that an error?

No. Full nodes keep a limited ledger window; older transactions return null. Query an archive source or explorer for history beyond the window.