Docs
πŸ₯ Run a Taiko node

Run a Taiko node

This guide will help you start up a Taiko RPC node using simple-taiko-node (opens in a new tab).

Prerequisites

Steps

Clone simple-taiko-node

Copy the sample .env files

cp .env.sample .env

Set the required values in the .env file

First, open the .env in your preferred text editor:

Next, you will set the L1 archive node endpoints.

πŸ’‘

You can get a L1 endpoint from a few places, but it must point to an archive node to access the state trie beyond the last 128 blocks.

Recommended: Run your own Sepolia archive node, see: Run a Sepolia node. This is recommended because you will eventually be rate-limited by public RPC providers.

Alternative: Alchemy (opens in a new tab) and Infura (opens in a new tab) are two popular RPC providers. Make sure you select the RPC as Sepolia testnet, and not Ethereum mainnet.

Finally, set the following L1 node endpoints in your .env file:

  • L1_ENDPOINT_HTTP
  • L1_ENDPOINT_WS

Take a look at the comments above these values in the .env.sample to see how to set them up.

Start a node

Make sure Docker is running and then run the following command to start the node:

docker compose up -d

Note: You may need to use sudo docker compose up -d if you are not in the docker group.

Verify node is running

Check with the node dashboard

A node dashboard will be running on localhost on the GRAFANA_PORT you set in your .env file, which defaults to 3001: http://localhost:3001/d/L2ExecutionEngine/l2-execution-engine-overview (opens in a new tab).


taiko node dashboard

You can verify that your node is syncing by checking that the chain head on the dashboard (see above) is increasing. Once the chain head matches what's on the block explorer, you are fully synced.

Check with curl commands

  1. Check if the Execution Layer client is connected to Taiko L2:
curl http://localhost:8547 \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_chainId","params":[],"id":1,"jsonrpc":"2.0"}'

which should return the chainId as 0x28c5f (167007):

{ "jsonrpc": "2.0", "id": 1, "result": "0x28c5f" }
  1. Check if the Execution Layer client is synced by requesting the latest Taiko L2 / L3 block from the Execution Layer client:
curl http://localhost:8547 \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}'
  1. If the blockNumber response value is 0 or not growing, check the Taiko L2 logs here:
docker compose logs -f

Note: You may need to use sudo docker compose logs -f if you are not in the docker group.

Operate the node

You can find all node operations (eg. stop node, update node, remove node, view logs) in the Node runner manual.

Videos

Troubleshooting