Skip to content

Run a Taiko node

This guide will help you start up a Taiko RPC node using simple-taiko-node.

Prerequisites

  • Docker is installed and running.
  • Git is installed.
  • If using Windows, you should install Git BASH or WSL to use as your terminal.
  • Meet the Geth minimum hardware requirements except for the storage requirement because Taiko nodes will require less storage (at the time of writing).

Run a Taiko node with stn

1. Install stn

Visit stn which has a simple copy-paste command to install stn.

2. Install a Taiko node

Terminal window
stn install

3. Config the Taiko node as a full node

Terminal window
stn config full

4. Start the Taiko node

Terminal window
stn up

5. Verify the Taiko node is running and properly synced

To view the sync status you can execute:

Terminal window
stn status

You can also view the dashboard with:

Terminal window
stn dashboard

Run a Taiko node with simple-taiko-node

1. Clone simple-taiko-node

Terminal window
git clone https://github.com/taikoxyz/simple-taiko-node.git
cd simple-taiko-node

2. Copy the sample .env files

Terminal window
cp .env.sample .env

3. Set the L1 archive node endpoint

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

Terminal window
nano .env

Next, you will set the L1 archive node endpoints. If you are running a local Holesky node, you cannot reference the L1 endpoints as http://127.0.0.1:8545 and ws://127.0.0.1:8546 because that is local to inside the simple-taiko-node Docker networking. Instead you can try:

  • Using host.docker.internal (see: stack overflow).
  • Using the private ip address of your machine (use something like ip addr show to get this ip address).

After getting the address of the Holesky archive node, set the following L1 node endpoints in your .env file. Here is an example:

  • L1_ENDPOINT_HTTP=http://192.168.1.15:8545
  • L1_ENDPOINT_WS=ws://192.168.1.15:8546

4. Remove old testnet volumes

If you ran a testnet node previously, make sure to first remove the old volumes:

Terminal window
docker compose down -v

5. Start the node

Make sure Docker is running and then run the following command to start the node (you may need to use sudo docker compose up -d if your user is not in the docker group):

Terminal window
docker compose up -d

6. Verify node is running

Option 1: 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.

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

Option 2: Check with curl commands

  1. Check if the Execution Layer client is connected to Taiko L2:
Terminal window
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 0x28c60 (167008):

{ "jsonrpc": "2.0", "id": 1, "result": "0x28c60" }
  1. Check if the Execution Layer client is synced by requesting the latest Taiko L2 / L3 block from the Execution Layer client:
Terminal window
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:
Terminal window
docker compose logs -f

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

Video tutorial

See the video tutorial Run a Taiko L2 node (YouTube). It’s for a previous testnet but the overall steps are the same!

Full simple-taiko-node CLI reference

Start node

Terminal window
docker compose up -d

Stop node

Terminal window
docker compose down

Restart node

Terminal window
docker compose down && docker compose up -d

Update node

Terminal window
git pull origin main && docker compose pull

Remove node

Terminal window
docker compose down -v

Start and remove orphan containers

This command will start and remove containers that are not part of the current docker compose file.

Terminal window
docker compose up -d --remove-orphans

View grafana dashboard

Terminal window
open http://localhost:3001/d/L2ExecutionEngine/l2-execution-engine-overview

View all logs

Terminal window
docker compose logs -f

View execution logs

Terminal window
docker compose logs -f l2_execution_engine

View client driver logs

Terminal window
docker compose logs -f taiko_client_driver

View client proposer logs

Terminal window
docker compose logs -f taiko_client_proposer

View system resource usage stats

Terminal window
docker stats

Compare .env and .env.sample

Terminal window
sdiff .env .env.sample

Troubleshooting

  • Visit the Discord for help on any common error codes / issues.
  • View the logs of the node (see above).