Objectives
By the end of this tutorial you should be able to:- Deploy and sync a Base node
- Enable Flashblocks for 200ms preconfirmations
Prerequisites
Hardware requirements
We recommend you have this configuration to run a node:- 8-Core CPU
- at least 16 GB RAM
- a locally attached NVMe SSD drive
- Adequate storage capacity:
- Minimum:
(2 × chain_size) + snapshot_size + 20% buffer - Accounts for snapshot restoration (if applicable) and chain data
- Minimum:
If utilizing Amazon Elastic Block Store (EBS), ensure timing buffered disk reads are fast enough in order to avoid latency issues alongside the rate of new blocks added to Base during the initial synchronization process;
io2 block express is recommended.Networking
Ensure the following ports are accessible (not blocked by firewall) for peer discovery and sync:| Port | Protocol | Purpose |
|---|---|---|
30303 | TCP/UDP | P2P Discovery (discv4) & RLPx |
9222 | TCP/UDP | Reth Discovery v5 (discv5) |
Port
9222 is critical for Reth peer discovery. If this port is blocked, your node may have difficulty finding peers and syncing.Docker
This tutorial assumes you are familiar with Docker and have it running on your machine.L1 RPC URL
You’ll need your own L1 RPC URL. This can be one that you run yourself, or via a third-party provider, such as our partners.Running a Node
- Clone the repo.
- Ensure you have an Ethereum L1 full node RPC available (not Base), and set
OP_NODE_L1_ETH_RPC&OP_NODE_L1_BEACON(in the.env.*file if usingdocker-compose). If running your own L1 node, it needs to be synced before Base will be able to fully sync. - Uncomment the line relevant to your network (
.env.sepolia, or.env.mainnet) under the 2env_filekeys indocker-compose.yml. - Run
docker compose up. Confirm you get a response from:
Terminal
Snapshots
Geth Archive Nodes are no longer supported. For Archive functionality, use Reth, which provides significantly better performance in Base’s high-throughput environment.
Syncing
You can monitor the progress of your sync with:Terminal
Error: nonce has already been used if you try to deploy using your node.
Enable Flashblocks
Once your node is synced, you can enable Flashblocks to serve 200ms preconfirmations to your applications.Configuration
To enable Flashblocks, start your node with the following environment variables:| Variable | Description | Values |
|---|---|---|
NODE_TYPE | Enables base reth node with Flashblocks | base |
CLIENT | Execution client | reth |
RETH_FB_WEBSOCKET_URL | Flashblocks WebSocket endpoint | See below |
WebSocket Endpoints
| Network | URL |
|---|---|
| Mainnet | wss://mainnet.flashblocks.base.org/ws |
| Sepolia | wss://sepolia.flashblocks.base.org/ws |
The base binary listens to the Flashblocks WebSocket stream and caches preconfirmation data. When Flashblocks-aware RPC methods are called, it returns data from this cache.
Verify Flashblocks Functionality
Test that your node is properly serving Flashblocks by querying a pending block:Available RPC Methods
Your Flashblocks-aware node supports all standard Ethereum JSON-RPC methods, plus these Flashblocks-enabled endpoints:| Method | Flashblocks Usage |
|---|---|
eth_getBlockByNumber | Use pending tag |
eth_getBalance | Use pending tag |
eth_getTransactionReceipt | Returns preconfirmed receipts |
eth_getTransactionByHash | Use pending tag |
eth_getTransactionCount | Use pending tag |
eth_call | Use pending tag |
eth_simulateV1 | Use pending tag |
eth_estimateGas | Use pending tag |
eth_getLogs | Use pending for toBlock |
eth_subscribe | Stream Flashblock data in real-time (Beta) |
base_transactionStatus | Check if transaction is in mempool (Beta) |