Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 71 additions & 17 deletions docs/base-chain/flashblocks/apps.mdx
Original file line number Diff line number Diff line change
@@ -1,29 +1,79 @@
---
title: Flashblocks
title: Flashblocks Integration
sidebarTitle: Apps
description: Experience lightning-fast transaction confirmations of Base by using Flashblocks. Preconfirmations happen in just 200 milliseconds—designed for real-time apps, games, and seamless UX.
description: Integrate Flashblocks into your app for 200ms transaction confirmations using RPC APIs and popular libraries like Ethers, Wagmi and Viem.
---

## Overview
Get **200ms transaction confirmations** on Base—10x faster than the standard 2-second block time.

Flashblocks enable up to 200 millisecond transaction confirmations on Base by leveraging preconfirmations, ultra-fast signals that arrive before the next block is sealed. Built for developers who demand instant UX, it's ideal for high-frequency apps, games, and real-time interactions where waiting even a few seconds is too long. By integrating directly within Base's infrastructure, Flashblocks enables, seamless, ultrafast and snappy user experiences without compromising security.
## Endpoints

## Integrating Flashblocks
| Network | RPC URL | Status |
|---------|---------|--------|
| **Mainnet** | `https://mainnet-preconf.base.org` | ✅ Live |
| **Sepolia** | `https://sepolia-preconf.base.org` | ✅ Live |

Flashblocks is enabled for developers on Base. There are two ways you can integrate with Flashblocks data. You can either use the WebSocket API to stream real-time block updates, or use the RPC API to query the Flashblocks-aware RPC endpoint.
<Tip>
**Already using a node provider?** Alchemy, Infura, QuickNode, and dRPC all support Flashblocks—just use the `pending` tag with your existing endpoint.
</Tip>

### RPC API
<Note>
Public endpoints are rate-limited. For production, use a [node provider with Flashblocks support](/base-chain/tools/node-providers) or [run your own node](/base-chain/node-operators/run-a-base-node#enable-flashblocks).
</Note>

Base offers the following public Flashblocks aware RPC endpoints. These are rate limited and may not be suitable for production use - we recommend using a node provider that runs Flashblocks integrated nodes.
Major node providers such as Alchemy, Infura, QuickNode and dRPC have Flashblocks-aware RPCs that can be leveraged
---

## Quick Start

Use the `pending` tag with any supported RPC method:

```bash
curl https://mainnet-preconf.base.org -X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["pending",false],"id":1}'
```

| Network | URL |
| :----------------- | :------------------------------- |
| Mainnet | https://mainnet-preconf.base.org |
| Sepolia | https://sepolia-preconf.base.org |
That's it—your app now receives 200ms preconfirmations instead of waiting 2 seconds.

---

## Use Cases

Flashblocks is ideal for:

The following RPC methods can return Flashblocks specific data. All standard Ethereum JSON-RPC methods are still supported as usual.
- **Decentralized exchanges** — Near-instant trade confirmations
- **Onchain games** — Real-time state updates for responsive gameplay
- **Trading bots** — Faster feedback loops for automated strategies
- **Live dashboards** — Real-time balance and transaction monitoring
- **Any app requiring instant feedback** — Improved UX across the board

---

## Supported RPC Methods

| Method | Description |
|--------|-------------|
| `eth_getBlockByNumber` | With `pending`, returns the most recent Flashblock |
| `eth_getBalance` | With `pending`, reflects balances from the latest Flashblock |
| `eth_getTransactionReceipt` | Returns receipts for preconfirmed transactions |
| `eth_getTransactionByHash` | Returns preconfirmed transaction details |
| `eth_getTransactionCount` | With `pending`, returns the updated nonce from Flashblocks |
| `eth_call` | With `pending`, executes against the latest Flashblock state |
| `eth_estimateGas` | With `pending`, estimates gas against the latest Flashblock |
| `eth_getLogs` | With `pending`, returns logs from the latest Flashblock |
| `eth_simulateV1` | Simulates transactions against the latest Flashblock state |
| `eth_subscribe` | Stream Flashblock data in real-time (Beta) |
| `base_transactionStatus` | Check if a transaction is in the mempool (Beta) |

<Warning>
**WebSocket Note:** Do not connect directly to `wss://mainnet.flashblocks.base.org/ws`. This endpoint is reserved for infrastructure-to-node data syncing. For real-time streaming, use `eth_subscribe` via your RPC node or node provider's WebSocket.
</Warning>

---

## RPC API Reference

Detailed documentation for each Flashblocks-enabled RPC method.

#### eth_getBlockByNumber

Expand Down Expand Up @@ -214,9 +264,13 @@ Each subscription returns **one item per WebSocket message** and emits events ev

| Subscription | Description | Response |
|--------------|-------------|----------|
| `newFlashblockTransactions` | Stream transactions as they're included | One transaction per message |
| `pendingLogs` | Stream logs matching a filter | One log per message |
| `newFlashblocks` | Stream block state updates | Block state per Flashblock |
| `newFlashblockTransactions` | Stream [transactions](/base-chain/flashblocks/websocket-reference#diff-object) as they're included | One transaction per message |
| `pendingLogs` | Stream [logs](/base-chain/flashblocks/websocket-reference#log-object) matching a filter | One log per message |
| `newFlashblocks` | Stream [Flashblock](/base-chain/flashblocks/websocket-reference#flashblock-object) state updates | Full Flashblock per message |

<Info>
For detailed response schema documentation (Flashblock, Diff, Metadata, Receipt, Log objects), see the [WebSocket Reference](/base-chain/flashblocks/websocket-reference#schema).
</Info>

---

Expand Down
39 changes: 39 additions & 0 deletions docs/base-chain/flashblocks/architecture.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Flashblocks Architecture
sidebarTitle: Architecture
description: Understand the sequencer architecture and infrastructure components that power Flashblocks on Base.
---

## Before Flashblocks

Base operates a high-availability sequencer system with five sequencer instances:

| Component | Role |
|-----------|------|
| **op-node** | Standard OP Stack consensus layer (CL) |
| **op-geth** | Standard OP Stack execution layer (EL) |
| **op-conductor** | High availability controller with Raft consensus for leader election |

One sequencer instance acts as the **leader**, responsible for building blocks and propagating them via P2P. The remaining four act as **followers** that sync the chain. Leadership transfers if the current leader stops producing blocks.

## With Flashblocks

Flashblocks introduce several new infrastructure components:

| Component | Purpose | What It Unlocks |
|-----------|---------|-----------------|
| **rollup-boost** | CL↔EL Engine API proxy | Enables sharing Flashblocks with the EL without modifying the CL. Provides a stable seam for future block-building evolutions (multi-builder, etc.) |
| **op-rbuilder** | Out-of-protocol builder at 200ms cadence | Produces the sub-second Flashblocks, decoupled from the EL. Enables pluggable builder mechanisms |
| **websocket-proxy** | Flashblocks stream fan-out | Broadcast layer so many consumers can read the stream without overwhelming the builder |
| **[base](https://github.com/base/base)** | RPC surface exposing preconfirmations | Converts streamed Flashblocks into familiar RPCs so apps and wallets can consume preconfirmation state |

Both [rollup-boost](https://github.com/flashbots/rollup-boost) and [op-rbuilder](https://github.com/flashbots/op-rbuilder) are built and maintained by Flashbots, while Base maintains the websocket-proxy and [base](https://github.com/base/base) components.

---

## Further Reading

- [Flashblocks Overview](/base-chain/flashblocks/overview) — Key concepts and transaction lifecycle
- [Enable Flashblocks](/base-chain/node-operators/run-a-base-node#enable-flashblocks) — Run your own Flashblocks-aware RPC node
- [WebSocket Reference](/base-chain/flashblocks/websocket-reference) — Technical reference for infrastructure-to-node data syncing
- [Flashblocks Deep Dive](https://blog.base.dev/flashblocks-deep-dive) — Engineering blog post with implementation details
76 changes: 0 additions & 76 deletions docs/base-chain/flashblocks/docs.mdx

This file was deleted.

Loading