Node Setup Quick Start (testnet)

Use the guided setup shell scripts!

1. Install Prerequisites:

jq, yq, sed, curl, wget, make, and Go are required for running the various commands and config scripts and commands in this guide:

  • jq : sudo apt install jq

  • sed : sudo apt install sed

  • curl: sudo apt install curl

  • wget : sudo apt install wget

Download the latest binary:

mkdir -p ~/layer/binaries && cd ~/layer/binaries && mkdir v5.1.1 && cd v5.1.1 && wget https://github.com/tellor-io/layer/releases/download/v5.1.1/layer_Linux_x86_64.tar.gz && tar -xvzf layer_Linux_x86_64.tar.gz

2. Download the script that matches your system:

Additional info about the scripts can be found here. We will give the script permission to execute in the same command.

curl -O https://raw.githubusercontent.com/tellor-io/layer/refs/heads/main/scripts/setup/initial_config/configure_palmito_linux.sh && chmod +x configure_palmito_linux.sh

2.1 (optional) Edit the environment variables

If you'd like to use a custom home directory, custom peers or RPCs you can configure those at the top of the script. The defaults are:

# ...
export LAYER_NODE_URL=https://node-palmito.tellorlayer.com/rpc/
export RPC_NODE_ID=ac7c10dc3de67c4394271c564671eeed4ac6f0e0
export KEYRING_BACKEND="test"
export PEERS="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"
export LAYER_HOME="/home/$(logname)/.layer"
export STATE_SYNC_RPC="https://node-palmito.tellorlayer.com/rpc/"
export KEY_NAME="test"
# ...

Use your favorite text editor to change these before running the script if desired.

nano configure_palmito_linux.sh # if linux
# --or--
nano configure_palmito_mac.sh # if mac

3. Give the script permission to execute, and run it:

./configure_palmito_linux.sh # if linux
# --or--
./configure_palmito_mac.sh # if mac

The script should greet you and begin the guided setup!

Options:

  • Snapshot sync: Download a snapshot from a server, extract it into your data folder, and start the node. The node will need time to catch up downloading blocks. At the time of writing this takes about 6 hours to complete.

  • State sync: Sync up to the network using snapshots from peers and a good RPC. At the time of writing this takes 12-24 hours to finish.

  • If you want to sync from a snapshot, be sure to select option 2 when asked if you want to set up a state sync, and option 2 again when asked if you want to start the node:

  • Download the snapshot:

curl -O https://layer-node.com/download/1756215466_palmito.tar
  • Extract the snapshot to your home directory, and move the chain data from the extracted .layer_snapshot into your layer home directory:

tar -xvf 1756215466_palmito.tar
sudo chown -R $(id -un):$(id -gn) .layer_snapshot
sudo chmod -R u+rwX .layer_snapshot
mv -f .layer_snapshot/data/application.db ~/.layer/data/application.db
mv -f .layer_snapshot/data/blockstore.db ~/.layer/data/blockstore.db
mv -f .layer_snapshot/data/cs.wal ~/.layer/data/cs.wal
mv -f .layer_snapshot/data/evidence.db ~/.layer/data/evidence.db
mv -f .layer_snapshot/data/snapshots ~/.layer/data/snapshots
mv -f .layer_snapshot/data/state.db ~/.layer/data/state.db
mv -f .layer_snapshot/data/tx_index.db ~/.layer/data/tx_index.db
  • Remove the temporary .layer_snapshot folder

rm -rf .layer_snapshot
  • Start the node!

./layerd start --home ~/.layer --keyring-backend test --key-name KEYNAME --api.enable --api.swagger

Last updated