Node Setup

How to set up a Tellor Layer Node.

Note: Steps may have multiple options. Be sure to choose the tab that matches your machine / desired setup.

Running a node for development or as a personal RPC can be done using any modern pc with at least 16gb ram.

If running a validator / reporter:

  • Modern cpu with at least 8 cores / threads

  • ram: 32 gb

  • storage: 500gb+ @ nvme gen3

  • network: 500mb/s DL, 100mb/s UL (the faster the better)

Pre-requisites

Golang is required for running layer. jq, yq, and sed are required for running the various config scripts:

  • Golang (install latest version here)

  • jq : sudo apt install jq

  • yq : sudo apt install yq

  • sed : sudo apt install sed

Build and Configure layerd

  1. Clone the Layer repo, change directory to layer

git clone https://github.com/tellor-io/layer -b v2.0.0-alpha1 && cd layer
  1. Build layerd with the command:

go build ./cmd/layerd
  1. Configure system variables with RPC url and contract address for the bridge. Using your favorite text editor, upen up your .bashrc or .zshrc file.

nano ~/.bashrc

Add these lines to the bottom of the file. Be sure to replace the example URL with your Sepolia testnet RPC url. (If you're using systemd, be sure to make them part of your start script or .service file):

# layer
export ETH_RPC_URL='https://any_good_sepolia_rpc_url'
export TOKEN_BRIDGE_CONTRACT="0xFC1C57F1E466605e3Dd40840bC3e7DdAa400528c"

Exit nano with ctrl^x then enter y to save the changes.

  1. Initialize .layer folder in your home directory

./layerd init layer --chain-id layertest-2
  1. Configure layer for the layertest-2 test network. This is done using a shell script.

  • Create the script file for setting up on linux. We'll use nano in this example:

nano configure_layer_nix.sh
  • Open a browser, navigate to the layer repo, and grab the latest setup script. Or copy it from here.

  • Paste the code, then exit nano with ctrl^x then enter y to save the changes.

Give your new script permission to execute and run it to replace the default configs with proper layer chain configs:

chmod +x configure_layer_nix.sh && ./configure_layer_nix.sh

You're now ready to start syncing your node.

Choose How you will Sync your Node

There are two basic ways to sync your node. Choose your adventure:

Note: genesis sync steps are not needed and are not compatible with a snapshot sync. likewise, the snapshot sync steps are not compatible with a genesis sync.

Additionally cosmovisor can be used to help make upgrades automatic. An example of a cosmovisor setup can be found here.

Last updated