Troubleshooting
If you run into any problems, please visit the troubleshooting page for help.
component. -->
This tutorial explains how to run a node for our testnet Taiko Hekla from source code.
Please follow the Building a Node from Source guide before continuing.
This guide presumes you have built the required images already (taiko-geth
and taiko-client
).
These are the recommended specs of a mainnet Geth node; the actual requirements may be lower.
Node operators should plan for future storage needs as the requirements will grow continuously.
taiko-geth
and taiko-client
communicate over the standard Ethereum engine API authrpc. This communication is secured using a shared secret.
You will need to generate a shared secret in the form of a 32 byte hex string.
openssl rand -hex 32 > jwt.txt
taiko-geth
It’s generally better to start taiko-geth
before you start taiko-client
as you will encounter less error messages.
taiko-geth
can be started without taiko-client
and will wait until taiko-client
begins communicating.
Navigate to your taiko-geth
directory
Find the directory where you built the taiko-geth
binary.
Copy the JWT secret you generated into the taiko-geth
directory.
cp /path/to/jwt.txt .
Start taiko-geth
Use the following command to start taiko-geth
in a default configuration.
The JSON-RPC API will become available on port 28545.
./build/bin/geth \ --taiko \ --networkid 167009 \ --gcmode archive \ --datadir ./data/taiko-geth \ --metrics \ --metrics.expensive \ --metrics.addr "0.0.0.0" \ --bootnodes enode://2f7ee605f84362671e7d7c6d47b69a3358b0d87e9ba4648befcae8b19453275ed19059db347c459384c1a3e5486419233c06bf6c4c6f489d81ace6f301a2a446@43.153.55.134:30303,enode://c067356146268d2855ad356c1ce36ba9f78c1633a72f9b7f686679c2ffe04bab6d24e48ef6eefb0e01aa00dff5024f7f94bc583da90b6027f40be4129bbbc5fd@43.153.90.191:30303,enode://acc2bdb6416feddff9734bee1e6de91e684e9df5aeb1d36698cc78b920600aed36a2871e4ad0cf4521afcdc2cde8e2cd410a57038767c356d4ce6c69b9107a5a@170.106.109.12:30303,enode://eb5079aae185d5d8afa01bfd2d349da5b476609aced2b57c90142556cf0ee4a152bcdd724627a7de97adfc2a68af5742a8f58781366e6a857d4bde98de6fe986@34.66.210.65:30303,enode://2294f526cbb7faa778192289c252307420532191438ce821d3c50232e019a797bda8c8f8541de0847e953bb03096123856935e32294de9814d15d120131499ba@34.72.186.213:30303 \ --authrpc.addr "0.0.0.0" \ --authrpc.port 28551 \ --authrpc.vhosts "*" \ --authrpc.jwtsecret ./jwt.txt \ --http \ --http.api admin,debug,eth,net,web3,txpool,miner,taiko \ --http.addr "0.0.0.0" \ --http.port 28545 \ --http.vhosts "*" \ --ws \ --ws.api admin,debug,eth,net,web3,txpool,miner,taiko \ --ws.addr "0.0.0.0" \ --ws.port 28546 \ --ws.origins "*" \ --gpo.ignoreprice "100000000" \ --port 30304 \ --syncmode full \ --state.scheme=path
taiko-client
This guide assumes you are running both taiko-geth
and taiko-client
on the same machine.
If you aren’t, you can configure the ports and addresses so that the services can access each other.
Navigate to your taiko-client
directory
Find the directory where you built the taiko-client
binary.
Copy the JWT secret
cp /path/to/jwt.txt .
Set environment variables
The following URLs should be a Holesky node.
You will need either an RPC provider, or run a full Holesky node yourself.
export L1_WS=... # the WS address for the node to sync from.export L1_BEACON_URL=... # URL address for the L1 Beacon-node HTTP endpoint to use.
Start taiko-client
Use the following command to start taiko-client
in a default configuration.
You can find all other configurable flags by running ./bin/taiko-client driver
.
This command assumes you’ve run the taiko-geth
command as is, if you’ve changed ports please change them accordingly.
./bin/taiko-client driver \ --l1.ws ${L1_ENDPOINT_WS} \ --l2.ws ws://l2_execution_engine:8546 \ --l1.beacon ${L1_BEACON_HTTP} \ --l2.auth http://l2_execution_engine:8551 \ --taikoInbox 0x79C9109b764609df928d16fC4a91e9081F7e87DB \ --taikoAnchor 0x1670090000000000000000000000000000010001 \ --preconfirmation.whitelist 0x4aA38A15109eAbbf09b7967009A2e00D2D15cb84 \ --preconfirmation.serverPort 9871 \ --jwtSecret /data/taiko-geth/geth/jwtsecret \ --p2p.sync \ --p2p.checkPointSyncUrl https://rpc.hekla.taiko.xyz --p2p.bootnodes enode://ea5b8a797985f500afa37ba03ce47b0039792a942f0ac9bee9fa19a7a5410273fe43b4e8a9a28fa42cdec1b6435deb809fcb79479c55cc2ddbaf02de7a83f456@34.46.28.99:4001?discport=30304,enode://404e9493066107431bdf3f47bbb360a353244a6069903c76928fca3067575f2adf62ef396b0a8a74696669ef53cab8373e38ddd9b3d3d2d76f356d2cd2708951@34.30.143.124:4001?discport=30304,enode://b2d094ade1ce68990878b197bf818bd41d5b32e4019d42dc63d91d7020f531532f063833e44e84f78792969f69fd5553370216703c40fcc0cb835f17177fbe07@34.56.54.8:4001?discport=30304 \ --p2p.listen.ip 0.0.0.0 \ --p2p.useragent taiko \ --p2p.listen.tcp 4001 \ --p2p.advertise.tcp 4001 \ --p2p.listen.udp 30303 \ --p2p.advertise.tcp 30303 \ --p2p.peerstore.path /node-keys/peerstore \ --p2p.discovery.path /node-keys/discv5 \ --p2p.advertise.ip ${YOUR_EXTERNAL_IP} \ --p2p.priv.raw ${PRIVATE_KEY}
If you do not wish to set an external IP manually, you may instead replace the --p2p.listen.tcp
and all lines after in the above command with --p2p.nat
. This will automate discovery, and you do not need to manually set ports.
We highly recommend that you configure these manually.
Your node also needs a private key set to acquire a stable peer ID. (--p2p.priv.raw
) This private key should be unique to each node: if you are running multiple, please use different ones for each node. This private key does not need to hold eth or any valuables, it is simply to persist an identity.
You may alternatively set --p2p.priv.path
, which should be a path to a file that contains the hex-encoded 32-byte private key for the peer ID. We recommend using --p2p.priv.raw
for simplicity.
Whether you are running the node on a personal machine or a cloud provider’s machine, you should ensure your the following ports on your machine are open and visible from the internet at your external IP:
4001
OR whichever port you set --p2p.advertise.tcp
to.30303
OR whichever port you set --p2p.advertise.udp
to.These ports are required for p2p gossiping preconfirmed blocks, so if it is not set you will only subscribe to the events that are emitted on chain. You may need to add additional port-forwarding rules in your firewall/router to enable discovery from the internet.
To ensure that your node is actually configured correctly and has joined the P2P network for preconfirmations, please use grep
to find logs regarding peer tick
. You should find something that resembles the following:
INFO [07-30|18:37:38.168] Peer tick peersLen=4 peers="[...]" addrInfo="[...]" id=... advertisedUDP=52700 advertisedTCP=4001 advertisedIP=...
As long as peersLen=X
is greater than or equal to 3, your node should have joined the P2P network correctly! If it is below that, please reach out to us on Discord for troubleshooting help.
Once you’ve started taiko-geth
and taiko-client
properly you should see them communicate with each other and start syncing.
Syncing can take several hours, depending on the size of the chain.
Troubleshooting
If you run into any problems, please visit the troubleshooting page for help.