Blockchain Indexing: Backfill, Checkpoints and Reorganizations
Understand how a repeatable indexing workflow selects records, tracks progress and revises observations when the accepted chain changes.

Overview
When translating these concepts into an integration, keep the scope described by the wallet history api with the result. The examples in wallet transaction history and smart contract event logs show how the same distinction affects neighbouring data questions.
Blockchain indexing makes selected network records easier to query for a particular application. A wallet view, contract activity feed and analytics table can all depend on an index, but they need different selection rules and record shapes.
A dependable workflow does more than process blocks quickly. It defines its starting range, preserves technical identities, tracks durable progress and explains changes near the chain tip. These concerns matter both when processing older ranges and when following new activity, because failures can happen at any point between retrieval and storage.
Define the range and record selection contract
Start with the network, relevant contracts or accounts, record types and bounded block range. State whether the interval endpoints are inclusive and retain block references alongside convenient time labels. A broad instruction to index everything is difficult to validate.
Selection should be independent from a later display label. An event can be retained as a technical observation even if the application cannot yet classify its economic meaning. Write acceptance cases for an empty range, multiple observations in one transaction and an unsupported event interpretation. These cases establish what processing completed means, including the difference between no matching records and a range whose retrieval or interpretation has not finished.
Use bounded work units for older ranges
A backfill establishes an initial dataset or fills a declared gap. Divide the requested interval into bounded work units, retain their status and keep the original selection contract stable. Completing one unit does not establish that the entire requested range is complete.
Choose work sizes according to response limits, storage behavior and failure recovery rather than only headline throughput. If a unit must be split, preserve the relationship between its parts and the requested interval. Test a large unit that is divided and a smaller unit processed directly. Their accepted technical identities should match. Store unresolved gaps explicitly so later requests can target them without pretending the initial run established complete coverage.
Commit records before advancing progress
A checkpoint should represent safely accepted work, not merely a response that arrived. If storage fails after retrieval but before the checkpoint update, repeating the unit should be possible without duplicating its observations. Keep the write and progress policy deliberate.
A synthetic test can stop between accepting records and marking a unit complete. Resume the work and compare stable record identities with an uninterrupted run. Row counts alone are weaker evidence because a duplicate can conceal a missing record. Where transactional storage is used, understand its isolation behavior; the PostgreSQL isolation documentation is one reference for this separate storage responsibility.
Retain block identity and replacement relationships
A block height is a useful position, but the block associated with that position can change before the application accepts it under its settlement policy. Preserve the block reference and parent context needed by the workflow instead of treating height alone as immutable evidence.
Define how an affected observation is replaced, removed or marked as no longer part of the accepted view. Keep the earlier relationship available when a completed report depends on it. The Ethereum block documentation provides network context. A consumer still needs a policy for provisional observations, accepted observations and any later correction communicated by its retrieval contract.
Version interpretation while retaining technical evidence
A decoder or normalization rule can improve after records have been processed. Keep raw event fields and references where the workflow needs them, and identify which interpretation produced the application record. Reprocessing should not look like unrelated new activity.
Separate technical deduplication from the version of a derived view. One observed log can support several interpretations over time while preserving its scoped identity. Test a known event, an unresolved event and a revised decoder output. Readers should be able to distinguish changed interpretation from changed network evidence. This makes schema evolution a controlled revision rather than an unexplained overwrite of previously accepted rows or a second import of the same activity.
Measure completed useful work and unresolved scope
Track accepted ranges, unresolved units, retry outcomes and durable storage progress. A request rate or blocks-per-second figure alone does not establish that the resulting dataset can answer the application's question. Include validation and recovery in throughput measurements.
Compare outputs against a small independently inspectable fixture and exercise interruption, duplication and replacement cases. Keep operational logs free of confidential credentials and customer payload dumps. A useful indexing workflow makes its progress and boundaries understandable to downstream queries. It can say which range was requested, which observations were accepted and which gaps remain, allowing later features to consume the data without assuming more completeness than the processing evidence supports.
Questions about the topic
Frequently asked questions
Is indexing the same as querying an RPC method?
No. Indexing selects and organizes observations for later queries. RPC can supply specific network observations, while the indexing workflow adds selection, storage and application contracts.
When should a checkpoint advance?
After the corresponding records have been durably accepted under the documented storage policy. Receiving a response alone does not establish safe progress or prevent data loss on restart.
Can a block height serve as an immutable record identity?
Height alone does not preserve which block was observed. Retain block references and the workflow policy for replacements, provisional observations and accepted results.
Standards & technical documentation


