/simple-taiko-node

Start your Taiko node with a one line command. 💻

Primary LanguageShellMIT LicenseMIT

simple-taiko-node

Inspired by https://github.com/smartcontracts/simple-optimism-node

Start your Taiko node with a one line command.

Prerequisite

  • Docker is installed and running

Install Docker

curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh

Instructions

Clone this repository

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

Configure your node

Copy .env.sample to .env.

cp .env.sample .env

To run your node as a proposer, configure the optional environment varibles in this .env file.

Run the node

Start

docker compose up

This command starts the configured node. If you want to run it in the background, please add the -d flag (docker compose up -d).

If this is the first time you start the node, it will synchronize from the genesis to the present, which may take some time. You can monitor this progress through logs or in the local grafana dashboard and see the latest L2 chain status in Taiko Alpha-1 L2 block explorer.

Stop

docker compose down

This command shuts down the node, but will keep all volumes, so next time you restart the node, it won't need to synchronize from the genesis again.

Wipe

docker compose down -v
rm -f .env

These commands completely remove the node by removing all volumes used by each container.

What's included

Taiko Geth (L2 execution engine)

taiko-geth is a fork of go-ethereum with some changes according to Taiko protocol, it serves as a L2 execution engine, which needs to be coupled to a consensus client (in Taiko network, this will be the taiko client's driver software), like L1 ethereum execution engines, it will listen to new L2 transactions broadcasted in the L2 network, executes them in EVM, and holds the latest state and database of all current L2 data.

Taiko client driver

taiko client's driver software serves as an L2 consensus client. It will listen for new L2 blocks from the Taiko layer 1 protocol contract, then direct the connected L2 execution engine to insert them into its local chain through the Engine API.

Taiko client proposer

taiko client's proposer software will fetch pending transactions in a L2 execution engine's mempool intervally, then try to propose them to the Taiko layer 1 protocol contract.

Prometheus and Grafana

A Grafana dashboard with a Prometheus datasource is also included to display the L2 execution engine's real time status. You can visit it at http://localhost:3000/d/L2ExecutionEngine/l2-execution-engine-overview?orgId=1&refresh=10s.

Proxy your remote Grafana to the localhost (replace USERNAME and REMOTE_IP with your values):

ssh -L 3000:127.0.0.1:3000 -C -N -l USERNAME REMOTE_IP

image