Skip to main content
A chain that streams Subblocks publishes a partial block every 200 ms, so your app can show a transaction’s result well before the block containing it is sealed. This guide shows how to read that pre-confirmed state over standard Ethereum JSON-RPC and from the viem and ethers libraries. Most apps need only a change of endpoint and the pending block tag.
  • In production, point your app to a subblocks-aware RPC endpoint from your provider of choice. If your provider doesn’t support subblocks yet, let us know on Discord and we’ll work with them to get it added.
  • To run your own subblocks-aware node, start op-reth with --flashblocks-url=<websocket-url> pointing at the chain’s stream. The node then serves pending from the subblock state. OP Mainnet and OP Sepolia stream URLs are listed on the network information page.
This guide covers reading pre-confirmed state through an RPC endpoint, which is what most apps want. If you consume the WebSocket stream directly instead, four payload fields are zeroed and need handling — see the Subblocks notice.

Supported RPC methods

You read subblock state with the same Ethereum JSON-RPC calls you already use. The difference is using the “pending” tag in some of them to explicitly query the pre-confirmed state instead of the last finalized block.
  • eth_getBlockByNumber: Use the pending tag to retrieve the latest subblock snapshot.
  • eth_call: Use the pending tag to execute calls against the most recent pre-confirmed state.
  • eth_getBalance / eth_getTransactionCount: Use the pending tag to fetch balances or transaction counts respectively as they evolve within the block window. Other methods, like eth_getTransactionReceipt, eth_getTransactionByHash or eth_simulateV1, return data from pre-confirmed transactions without requiring the pending tag. Consult the Flashblocks specification for more details on each of these methods.

Libraries

You need a subblocks‑aware RPC endpoint to use the following libraries:

Viem

Ethers

Next steps