Blockchain indexing is the process of reading a blockchain's raw data (blocks, transactions, event logs and traces), decoding it into readable records and storing those records in a database that apps can search. A blockchain indexer is the software that does this work, from the first block it cares about up to the newest one, and keeps the database in step as the chain grows.
Wallets, DeFi dashboards, block explorers and analytics tools all depend on indexers. This guide explains what an indexer does, why apps need one on top of a node, the main types of indexer, how indexers handle reorgs and finality, and how Turtle approaches onchain data with Bedrock.
What does a blockchain indexer do?
A blockchain stores data in the order it happened: one block after another, each holding a list of transactions. That layout is ideal for verifying the chain and slow for answering questions such as "every USDC transfer to this wallet" or "daily swap volume on this pool". An indexer reorganizes the same data around the questions apps ask.
Most indexers run five jobs:
- Read the chain. The indexer pulls blocks, transaction receipts and, when it needs them, traces of internal calls from a node or a data source.
- Filter. It keeps the contracts and events it was built for, or everything, for a general-purpose index.
- Decode. Smart contracts emit events, which Ethereum's documentation describes as the way contracts "communicate with your frontend or other subscribing applications" (ethereum.org). In raw form an event is a log with hex-encoded topics and data. The indexer uses the contract's ABI to turn it into named fields, such as sender, recipient and amount.
- Store. Decoded records go into a database (Postgres, ClickHouse or another store) with indexes on the fields apps filter by: address, block, time, token.
- Serve. Apps read the data through SQL, GraphQL or a REST API, and the indexer keeps adding new blocks as they arrive.
An indexer turns raw blocks into records an app can query.
Why do apps need an indexer on top of an RPC node?
Every Ethereum node exposes a JSON-RPC API. It answers point questions well: the balance of one address, the receipt of one transaction, the logs in a small range of blocks. Questions across history or across many addresses are harder. The Graph's documentation sums up the gap: blockchains "expose only low-level RPC methods (eth_getLogs, eth_call), with no native way to filter, aggregate, sort, or join" (The Graph docs).
Three limits show up quickly.
Block range caps on eth_getLogs. eth_getLogs is the standard way to fetch events, and node providers cap how many blocks one call can cover. Alchemy allows 10 blocks per request on its Free tier, sets wider ranges on paid plans and caps every response at 150 MB (Alchemy docs). QuickNode sets the limit at 5 blocks on its Free Trial and 10,000 blocks on paid plans (QuickNode docs).
History needs an archive node. A full node keeps recent state only, for example the state of the last 128 blocks, and older states are pruned. Reading balances or contract storage at an old block takes an archive node, which ethereum.org notes "might be more tricky to run than a full node" (ethereum.org).
No aggregation. RPC returns raw rows. Totals, rankings, joins across contracts and time series all have to be computed by the app after it has pulled every row.
Here is what the block range cap means in practice. The figures below are illustrative arithmetic based on Ethereum's 12-second slots, so a year holds up to about 2.6 million blocks.
| Block range per eth_getLogs call | Calls to scan one year of Ethereum blocks |
|---|---|
| 5 blocks | about 526,000 |
| 10 blocks | about 263,000 |
| 10,000 blocks | about 263 |
An indexer pays that cost once, during its initial sync, and then answers the same question from its own database in one query.
What types of blockchain indexers are there?
Indexers differ in who runs them, how you define what gets indexed and how you query the result.
| Type | How you define the data | How you query it | Examples |
|---|---|---|---|
| Subgraph | A manifest, a schema and mapping code per app | GraphQL | The Graph Network, self-hosted Graph Node, hosted providers such as Goldsky |
| Self-run indexing framework | Your own code, run on your own servers | Your own database, often Postgres | Ponder, custom scripts |
| Hosted data API | Already defined by the provider | REST, SQL or webhooks | Node providers' token and transfer APIs, data warehouses |
| Full-history index | Every block, log and trace, already loaded | SQL, pipes or RPC | Bedrock by Turtle |
Subgraphs. A subgraph is an open API that indexes the events of chosen contracts and serves them through GraphQL. The Graph introduced the model, and subgraphs can run on The Graph Network, on a self-hosted Graph Node or with a hosted provider. Goldsky, for example, describes its service as "a fully backwards-compatible subgraph indexing service" (Goldsky docs). For high-throughput needs, The Graph also offers Substreams, "a powerful parallel blockchain indexing technology" (The Graph docs).
Self-run frameworks. Teams that want full control write their indexing logic in code and run it themselves. Ponder is one example: "an open-source TypeScript framework for EVM data indexing" that fetches chain data, runs your logic and writes the result to Postgres (Ponder docs). The trade-off is operations: you own the RPC bill, the servers, the database and every resync.
Hosted data APIs. Providers sell ready-made endpoints for common questions such as token balances or transfers. They are quick to start with and cover the questions the provider chose to answer.
Full-history indexes. A newer approach loads every block, log and trace of a chain into an analytical database ahead of time, so any question can be asked with SQL without writing per-app indexing code first. Bedrock, covered below, is Turtle's take on this model.
How do indexers handle reorgs and finality?
A chain reorganization, or reorg, happens when the network switches to a different version of recent history: one or more of the latest blocks are replaced by other blocks. Any data an indexer saved from the replaced blocks is now wrong.
Ethereum's JSON-RPC makes this visible. Logs returned to a filter carry a removed field, which is "true when the log was removed, due to a chain reorganization" (ethereum.org). The same API lets callers ask for the latest, safe or finalized block, which gives indexers three levels of certainty to work with.
On proof-of-stake Ethereum, time runs in slots of 12 seconds and epochs of 32 slots. Finality is settled at checkpoints, the first block of each epoch. Once a block is finalized, reverting it would cost an attacker at least one third of all staked ETH (ethereum.org).
An indexer rolls back records from replaced blocks and replays the new ones.
Indexers handle this in a few common ways:
- Track block hashes. The indexer stores the hash of each block it processed. When a new block's parent hash does not match, it knows a reorg happened.
- Roll back and replay. It deletes or reverses the records from the replaced blocks, then indexes the new ones. Ponder, for example, keeps the data it needs to recover from reorgs for a configurable window, 180 seconds by default (Ponder docs).
- Label confidence. Some apps show data near the chain head right away and mark it as pending until the block is safe or finalized. Others index only finalized blocks and accept a short delay.
Each chain has its own rules for finality, so a multichain indexer needs a reorg policy per network.
What is blockchain indexing used for?
Almost every onchain product that shows history or totals reads from an index:
- Wallets and portfolio apps: balances over time, transaction history and token lists.
- DeFi frontends: pools, positions, swap history and TVL charts.
- Analytics and research: volumes, user counts, cohorts and flows across contracts.
- Incentive and reward programs: measuring each wallet's deposits and time in a vault to calculate rewards.
Turtle relies on onchain data in its own product. It monitors every supported chain and attributes each vault deposit to the distributor that sourced it by reading the distributor ID embedded in the deposit calldata (Turtle docs).
How does Bedrock by Turtle approach indexing?
Bedrock is Turtle's onchain data product. It indexes the full history of 40 EVM chains so teams can query it right away, with no sync to wait for (Bedrock). According to Bedrock's site:
- Genesis to head. Every block, log and trace is already loaded into ClickHouse, ordered and deduplicated, and new blocks land beside the history, so one query can span the whole chain.
- Standard SQL. Teams query the raw tables with joins, aggregations and window functions.
- Decoded datasets. Curated tokens, transfers and contracts tables sit next to the raw data, decoded and normalized.
- Pipes. Any slice of the data, raw or enriched, can be delivered to webhooks, a ClickHouse cluster or Postgres, starting with a backfill of history and then following the chain head.
- RPC from the index. Each chain gets an RPC endpoint where eth_getLogs is answered from the same index, with typical reads in about 100 ms, and other methods pass through to upstream nodes.
The networks directory lists each chain's ID and datasets, with blocks, logs, traces and state diffs available on many of them (Bedrock networks).
If your team spends more time paging eth_getLogs than building, see what Bedrock has indexed at bedrock.turtle.xyz.
FAQ
What is an indexer in blockchain?
An indexer is software that reads a blockchain's blocks, transactions and event logs, decodes them and stores them in a database so apps can search and aggregate the data quickly. On The Graph, Indexers are the node operators who stake GRT to index subgraphs and serve queries (The Graph docs).
What is an EVM indexer?
An EVM indexer is an indexer built for chains that run the Ethereum Virtual Machine, such as Ethereum, BNB Chain, Polygon or Optimism. These chains share the same block, log and trace formats, so one indexer can cover many of them with the same decoding logic.
Is blockchain indexing the same as running a node?
A node stores and verifies the chain and answers RPC calls. An indexer sits on top of one or more nodes or data sources, copies the data into a database built for queries and adds decoding, aggregation and search.
Do I need an indexer to build a dapp?
A simple dapp that reads current balances and sends transactions can work with RPC calls alone. Once it needs history, lists, totals or search, an indexer saves a large number of RPC calls and gives faster, more consistent answers.
What is the difference between a subgraph and an indexer?
A subgraph is one kind of indexer: an app-specific API defined by a manifest, a schema and mapping code, queried with GraphQL. Indexers also include self-run frameworks, hosted data APIs and full-history SQL indexes.
How long does it take to index a blockchain?
It depends on the chain, the start block, the data you need and your RPC limits. An app-specific indexer that starts at a contract's deployment block syncs far faster than a full index of a large chain from genesis, which is why some providers offer the history already indexed.



