Guide 01 · Historical data
Retrieve complete blockchain history
Define coverage, plan the backfill and verify the dataset before you rely on it.
- Who it is for
- Developers and data engineers building historical datasets, wallet analytics or protocol reporting.
- What you leave with
- A coverage specification, a reproducible extraction plan and a clear record of what your dataset contains.
- Why it matters
- A successful request tells you that an endpoint responded. It does not tell you whether your dataset covers the right contracts, time period and event types. This guide starts with those boundaries, then connects extraction, verification and the transition to live data.
Define what complete means
Start with the question your dataset must answer. A wallet activity view, a protocol event archive and a historical balance report require different inputs. Write down the network, contracts or programs, time range, event types and expected level of detail before selecting a provider.
Separate coverage from interpretation. Coverage asks whether you obtained the required records. Interpretation asks whether those records support the metric you want to calculate. A collection of transfers, for example, should not be labelled a complete profit-and-loss history without a separate definition of positions, fees and valuation.
| Define | Record in the specification |
|---|---|
| Network and entities | Chain identifier, contract or program addresses, and the versions in scope. |
| Historical boundary | First required block or slot, last included point and the corresponding time range. |
| Data contract | Required fields, event types, exclusions and how provisional data is labelled. |
| Acceptance evidence | Reference records and independent checks that demonstrate the required coverage. |
For Ethereum log queries, the official RPC specification exposes block-range, address and topic filters. These are useful inputs to a coverage definition, but they do not by themselves establish that every business-relevant state change emits the event you selected.
Choose an extraction path that fits the scope
Compare extraction options against the specification. Ask each provider for the available history on your network, the exact data model, filtering behaviour and any restrictions that affect retrieval. Keep those answers alongside the configuration. A network appearing on a supported-chain list is only the beginning of that review.
StreamingFast separates blockchain extraction through Firehose from programmable transformation through Substreams. This gives a team a way to define an output and deliver it to a downstream destination. The application still owns the meaning of that output and the checks that make it fit for use.
Keep three boundaries visible
- Source availability: the earliest data the selected service can supply.
- Transformation history: the earlier inputs your computation requires to establish state.
- Requested output: the interval you intend to store or publish.
These boundaries may differ. A report starting this month can depend on balances accumulated before the reporting window. Treating the requested start date as the start of all required computation can therefore leave an incomplete model.
For Substreams, inspect the package, its network configuration and its dependencies before using it as the basis of a full import. Its execution architecture distinguishes processing needed before the requested start from processing the requested historical range.
[2] StreamingFast: extraction and transformation · [3] Substreams architecture and parallel execution
Plan a backfill you can explain and repeat
A backfill is the import of historical data into a destination that needs to catch up. Give each import a written specification: package version, parameters, network, range, output schema and destination. Keep credentials outside this record. If any of those choices changes, record why the new import differs.
Substreams can process historical segments in parallel, subject to the module dependencies and the provider's resources. Forward parallel processing is associated with production mode. Do not turn that architecture into a fixed completion-time promise for a particular dataset.
Record whether an import uses previously cached work. Substreams associates cached execution with module hashes; a code or dependency change that changes the hash can require fresh processing. A repeated import using existing cache and a first import should not be described as equivalent work.
Use an import ledger
| Record | Why it matters |
|---|---|
| Package and output identity | Connects the stored data to the transformation that produced it. |
| Range and progress | Distinguishes the intended interval from the interval durably written. |
| Input, emitted and stored records | Makes filtering and destination failures visible as separate effects. |
| Errors and exclusions | Preserves gaps for investigation instead of silently treating them as empty activity. |
[3] Substreams architecture and parallel execution · [4] Substreams module caching
Verify coverage at the boundaries and inside the range
Use several kinds of evidence. A first and last block check can reveal an incorrect range, while detailed record comparisons can reveal filtering or decoding problems inside it. Keep the checks specific to the chain and the output model.
An event table is intentionally sparse: a block with no matching event should not create a fabricated event row. Conversely, an empty result must not hide an extraction error. Keep import progress and error records separate from the business table so that both situations remain distinguishable.
| Question | Evidence to retain |
|---|---|
| Did the import cover the requested interval? | Recorded start, stop and durable progress, with any unresolved gaps. |
| Did the filters retain the intended activity? | Known relevant transactions and their corresponding output records. |
| Are quantities interpreted consistently? | Raw amounts, units and any transformation or decimal rules. |
| Can a discrepancy be investigated? | Network, block identity, transaction identity and decoder version. |
For stateful reports, compare values at the same chain point with an appropriate independent reference. A value from the current head cannot settle a disagreement about an earlier block. Likewise, an explorer and your pipeline may rely on the same upstream source; describe that dependency when presenting the comparison.
Connect historical and live data without losing progress
Design the handoff as part of the original import. Record which historical data has been durably stored and which point the live consumer should resume from. A value held only in process memory is lost when that process stops.
Substreams responses include a cursor that consumers must persist for reconnection. They also expose undo signals for forks. A consumer needs to handle the associated data changes and the corresponding resume position; saving an ordinary block number is not a substitute for implementing the cursor and undo contract.
Review the destination contract
- Progress must describe data that has actually reached durable storage.
- A repeated input must have a defined effect, such as replacing the same logical record rather than adding another copy.
- Provisional records need a defined correction path when their chain history changes.
- Downstream reports need to know whether they consume provisional or finalized data.
For a custom consumer, prefer a design that commits data changes and progress together where the destination supports it. Where this cannot be atomic, document the recovery sequence and how repeated delivery is handled. These are application design decisions; the presence of a streaming connection does not implement them automatically.
Deliver the dataset with its coverage record
The useful output of a backfill is a dataset someone can interpret and maintain. Deliver its scope and provenance with it, rather than leaving those details in a terminal history or a private conversation.
Include these six items
- Coverage: networks, entities, historical boundaries and exclusions.
- Meaning: schema, units, identifiers and how each derived field is calculated.
- Provenance: source service, package or decoder version, parameters and extraction date.
- Verification: checks performed on the actual dataset, outcomes and unresolved differences.
- Operations: durable progress, live handoff, finality policy and ownership.
- Resource record: observed processing usage, storage requirements and the assumptions behind future estimates.
A scope change should trigger a review of these items. Adding a network, extending history or changing a decoder can affect both the data and the amount of work needed to reproduce it. Preserve the previous dataset until the replacement is reconciled and its consumers have a clear migration path.
When discussing an extraction project with StreamingFast, bring the coverage specification, a sample of the desired output and the intended destination. Those inputs make it possible to assess the appropriate modules and infrastructure against a concrete workload.
Sources and further reading
Documentation reviewed on 15 September 2026. Consult the current documentation for the release and service you use.
- Ethereum JSON-RPC specificationhttps://ethereum.org/developers/docs/apis/json-rpc/
- StreamingFast: extraction and transformationhttps://www.streamingfast.io/
- Substreams architecture and parallel executionhttps://docs.substreams.dev/reference-material/core-concepts/architecture
- Substreams module cachinghttps://docs.substreams.dev/reference-material/core-concepts/module-caching
- Substreams reliability guaranteeshttps://docs.substreams.dev/reference-material/core-concepts/reliability-guarantees
- Substreams introductionhttps://docs.substreams.dev/
The planning checklists are editorial recommendations. Technical product statements refer to the documentation linked in each chapter. The guides do not report measured pipeline performance.