Real-time streams

Get the block.
Stop asking for it.

A continuous stream rather than a polling loop, with a cursor to resume from and reorganizations stated explicitly.

  • Push, not poll
  • Cursor and resume
  • Explicit reorgs
  • Same path as history
≪SF / 01
FirehoseBlockchain extraction
HistoricalStreaming
≫SF / 02
SubstreamsParallel transformation
ComposableRust
Ethereum → Firehose → Substreams → PostgreSQL
Interactive illustration
Built in the open. Explore the code A core developer on The Graph

StreamingFast
ecosystem

The GraphMessariDecentralandAirstack

01 Real-time streams

Looks familiar?

Want to watch your own chain arrive?

Get an API key
RUST → WEBASSEMBLY

Push beats poll, and it is not close.

Polling pays for the question, not the answer, and a missed poll looks exactly like silence. A pushed stream delivers the block when it exists, carries a cursor you persist, and signals a reorganization instead of quietly rewriting history underneath you. And it is the same path your backfill used, so the two cannot drift.

Read the guide
FilterMapAggregateDeliver
▧ substreams.yamlPACKAGE STRUCTURE
01 specVersion: v0.1.0
02 package:
03   name: token_transfers
04   version: v0.1.0
05
06 modules:
07   - name: map_transfers
08     kind: map
09     inputs:
10       - source: sf.ethereum.type.v2.Block
11     output:
12       type: proto:transfers.Transfers
Illustrative excerpt Build a complete package ↗

What you get

01 /

Blocks pushed as produced

No loop, no polling budget.

02 /

A cursor

Reconnect where you stopped, not at the head.

03 /

Explicit reorganizations

A signal you can act on, not a number that changed.

04 /

Decoded at the head

The same entities you get from history.

05 /

One implementation

History and live share the path, so they cannot disagree.

02 Real-time streams

How it works

FROM HISTORY TO THE CHAIN HEAD
Historical blocks
New blocks
TRANSACTIONS
TRACES & LOGS
STATE CHANGES
Rich block data. One continuous stream.
01

Open the stream

Blocks arrive with their decoded content.

02

Hold the cursor

Persist it. That is the whole recovery story.

03

Handle the undo

Reorganizations are explicit, so your database can follow.

Want to watch your own chain arrive?

Get an API key

03 Real-time streams

What you stop owning

[01]

A polling loop and its quota

[02]

The gap detection nobody built

[03]

A second code path for live data