How to set up the Price Server & Oracle Feeder for your Terra Classic Validator

TL;DR

git clone https://github.com/terra-rebels/oracle-feeder
cd oracle-feeder
CURR=`pwd`
cd $CURR/price-server/config
cp default-sample.js default.js
# Modify default.js
npm install
npm start
# From another terminal
cd $CURR/feeder
npm install
npm start update-key
npm start vote -- \
--source http://localhost:8532/latest \
--lcd https://lcd.terra.dev \
--chain-id columbus-5 \
--validator terravaloperxxx
--password "<password>"

Prerequisites

  • Your validator node should already be configured.
  • Node.js version 12 or later.

Pre-setup

1. Download the source code

git clone https://github.com/terra-rebels/oracle-feeder

2. Check out the correct branch

cd oracle-feeder
ORACLE=`pwd`

Price Server Setup

1. Modify the configuration file

cd $ORACLE/price-server/config
cp default-sample.js default.js

2. Start the Price Server

cd $ORACLE/price-server
npm install
npm start

Oracle Feeder Setup

1. Set up the key for the Oracle Feeder

terrad keys add feeder
terrad keys show feeder
terrad tx oracle set-feeder <feeder-address> --from=validator-wallet
  • <feeder-address> is the address of the newly created wallet that you noted from the step before.
  • validator-wallet is the name of hte wallet that is the key for your validator.

2. Set up the Oracle Feeder

cd $ORACLE/feeder
npm install
npm start update-key

3. Start the Oracle Feeder

npm start vote -- \
--source http://localhost:8532/latest \
--lcd https://lcd.terra.dev \
--chain-id columbus-5 \
--validator terravaloperxxx
--password "<password>"
  • --source specifies the Price Server providing the information.
  • --lcd specifies the Light Client Daemon from which the information of the chain is read. If your validator node is running the LCD, you can specify your own node (http://localhost:1317). Otherwise, you can use https://lcd.terra.dev
  • --chain-id is the name of the chain (duh).
  • --validator specifies the address of the validator (starting with terravaloper).
  • --password is the passphrase that you entered in the earlier step.

Post set-up notes

--

--

Dedicated to a Better Web3 Experience

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store