Posts tagged #tutorial

24 posts.

August 29, 2026 · 4 min read

trace_filter and trace_transaction: Beyond Receipts

Receipts show that a transaction succeeded; traces show what it did. How trace_transaction and trace_filter expose internal calls, where the Parity trace namespace actually works in 2026 (we probe it weekly — it's 11 of 54 EVM chains), and the param quirks that trip people up.

Read →
August 28, 2026 · 4 min read

JSON-RPC Error Codes: Retry, Fix, or Accept?

-32601, -32000, code 3, HTTP 429 — every RPC error belongs to one of three families: try another node, fix your request, or accept the chain's answer. A field guide with real error payloads.

Read →
August 23, 2026 · 4 min read

eth_getProof: Verify State Without Trusting RPC

Every eth_call answer is just something a server told you. eth_getProof returns state with a Merkle proof you can check yourself — the primitive behind bridges, light clients, and trust-minimized reads.

Read →
August 10, 2026 · 5 min read

Is Your RPC Node at the Chain Tip? eth_syncing

eth_syncing returns false when a node is fully synced — and also when it hasn't started syncing. That trap, plus how to really tell if an RPC node (your own or a provider's) is at the chain tip: compare block height to a reference, check block-timestamp freshness, and the Solana equivalents (getHealth, catchup). A liveness check is not a freshness check.

Read →
August 7, 2026 · 5 min read

Decoding Event Logs: Topics and Signatures

You can fetch logs with eth_getLogs and eth_subscribe — but the raw log is address + topics + data, not a readable event. This tutorial explains how logs are encoded (topic0 = the event signature hash, indexed params in topics, the rest in data), how to decode them in viem/ethers/web3.py, and the traps: indexed dynamic types, address padding, and anonymous events.

Read →
July 31, 2026 · 5 min read

Reading Balances: eth_getBalance vs balanceOf

Reading a balance sounds trivial, but it's where indexers quietly go wrong: native vs token, wrong decimals, summing Transfer events, rebasing and fee-on-transfer tokens, and latest-vs-historical reads. Here's how to read balances correctly over RPC, with viem/ethers/web3.py examples.

Read →
July 10, 2026 · 5 min read

Nonce Management for High-Throughput Senders

One stuck nonce can freeze every transaction behind it. If you're sending from a hot wallet at volume — a relayer, a market maker, a bridge — leaning on eth_getTransactionCount('pending') will eventually stall you. Here's how nonces actually work and how to manage them locally at scale.

Read →
July 6, 2026 · 4 min read

eth_getBlockReceipts: Every Receipt in a Block, One Call

Fetching every receipt in a block one transaction at a time is the N+1 problem in disguise — hundreds of round-trips per block. eth_getBlockReceipts returns all of them in a single call. Here's how it works, when to use it over JSON-RPC batching, and how to fall back when a node doesn't support it.

Read →
July 4, 2026 · 5 min read

Did It Actually Succeed? Reading eth_getTransactionReceipt

A transaction being mined does not mean it worked — a reverted transaction still lands in a block and still costs you gas. The receipt is where the truth lives: the status flag, the event logs, the real gas paid, and how many confirmations you should wait. Here's how to read one.

Read →
July 3, 2026 · 6 min read

Estimating Gas Right: eth_estimateGas, EIP-1559, and Buffers

Half of failed transactions are gas mistakes: an 'out of gas' revert or a fee too low to ever get mined. Here's how eth_estimateGas actually works, how EIP-1559 fees are built, why you buffer the gas limit, and how to put it all together without overpaying.

Read →
June 30, 2026 · 5 min read

Handling Chain Reorgs in Your Indexer

Your indexer works perfectly in testing, then a reorg silently corrupts your database with transactions that no longer exist. Here's how reorgs break indexers and two proven patterns to handle them — confirmation lag and reorg detection with rollback.

Read →
June 25, 2026 · 4 min read

Reading Historical State with eth_call

eth_call defaults to the latest block, but you can point it at any past block to read state as it was then — a balance last Tuesday, an oracle price at a specific block. The catch: historical state reads need an archive node. Here's how to do it in viem, ethers, and web3.py, and why a full node returns 'missing trie node'.

Read →
June 21, 2026 · 6 min read

Retrying RPC Calls: Backoff, Idempotency, Failover

A naive retry loop turns a brief blip into an outage. Here's how to retry RPC calls correctly: exponential backoff with jitter, knowing which calls are safe to retry, and failing over across providers — with copy-paste examples in viem, ethers, and web3.py.

Read →
June 12, 2026 · 6 min read

How to Handle WebSocket Reconnections Without Losing Events

A WebSocket subscription that silently drops is worse than no subscription at all — you keep running, but events vanish into the gap. Here's how to build reconnect logic that detects the drop, backs off, re-subscribes, and backfills the missed events so your indexer never loses a log.

Read →
June 5, 2026 · 8 min read

The Real Cost of debug_traceTransaction

Tracing a transaction costs 20-30× more than reading its receipt. Sometimes that's worth it; usually it isn't. Here's what trace actually tells you, the four tracer modes, and when a cheaper RPC method gets the same answer.

Read →
June 4, 2026 · 7 min read

Multicall3 Cheat Sheet: One eth_call Does It All

Multicall3 lives at the same address on every EVM chain and turns 100 contract reads into one RPC call. Here's how it actually works, when to use which variant, and the gotchas that bite people in production.

Read →
June 3, 2026 · 6 min read

Connecting MetaMask to Sonic, Berachain, and Monad

Three of 2025's biggest EVM chain launches, three sets of MetaMask configuration values. The exact fields to paste, why the official public RPCs aren't enough for real use, and the errors to expect when you mistype something.

Read →
June 1, 2026 · 6 min read

How eth_getLogs Range Caps Bite in Production

Your indexer works fine until it hits a single dense block range, then everything stops. Here's the cap mechanics across providers, the adaptive chunking pattern that actually works, and the code to do it right.

Read →
May 30, 2026 · 6 min read

Solana WebSocket vs HTTP RPC for Bots

Most Solana bots burn 80% of their RPC budget polling for state that WebSocket subscriptions would push to them for free. Here's when to use which, with the commitment-level gotchas that bite people in production.

Read →