Initial Setup

Build and Configure layerd

There are 9 steps in this part.

  1. Clone the Layer repo, change directory to layer

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

go build ./cmd/layerd
  1. An ethereum RPC is used for reporting tellor bridge transactions Using your favorite text editor, create a file called secrets.yaml:

nano secrets.yaml

Add this code to the file, replacing `your_sepolia_testnet_rpc_url` with the url of a reliable sepolia rpc:

eth_rpc_url: "wss://your_sepolia_testnet_rpc_url"

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

  1. Add variables to .bashrc (or .zshrc) Setting variables in .bashrc or .zshrc is not required, but it helps to avoid many common errors.

Open your .bashrc or .zshrc file:

nano ~/.bashrc # if linux
nano ~/.zshrc # if mac

Add these lines at the end, editing NODE_MONIKER be to whatever you'd like to name your node. Edit the ACCOUNT_NAME to whatever you'd like to call your wallet account:

# layer
export LAYER_NODE_URL=tellorlayer.com
export TELLORNODE_ID=18f58b3bc1756ad3872b00b349429fd4f56d2b34
export KEYRING_BACKEND="test"
export NODE_MONIKER="bobmoniker"
export ACCOUNT_NAME="bob"
export LAYERD_NODE_HOME="$HOME/.layer/$ACCOUNT_NAME"

Exit nano with ctrl^x then enter y to save the changes. Restart your terminal, or use source ~/.bashrc before you continue. (if Linux) Restart your terminal, or use source ~/.zshrc before you continue. (if mac)

Note: We may need to reset the chain again as we are still cooking. This causes the TELLORNODE_ID to change. You can check the current correct id with:

curl tellorlayer.com:26657/status
  1. Initialize .layer folder in your home directory

./layerd init layer --chain-id layertest-1
  1. Create and Run the configure_layer script We need to change the config files a bit using one of the provided configure_layer_nix.sh or configure_layer_mac.sh scripts from the layerdocs repo.

    If on linux:

    • create the script file locally:

    nano configure_layer_nix.sh # or configure_layer_mac.sh if mac
    • Navigate here, select all and copy the code to your clipboard.

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

    If on Mac:

    • create the script file locally:

    nano configure_layer_mac.sh # or configure_layer_mac.sh if mac
    • Navigate here, select all and copy the code to your clipboard.

    • 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 #if linux
    chmod +x configure_layer_mac.sh && ./configure_layer_mac.sh #if mac

    You're now ready to start your node with default sync settings. If you want to do a state sync, do the additional config steps here before you continue.

Last updated