This contains the Oracle feeder software that is used for periodically submitting oracle votes for the exchange rate of the different assets offered by the oracle chain. This implementation can be used as-is, but also can serve as a reference for creating your own custom oracle feeder.
Every validator must participate in the oracle process and periodically submit a vote for the exchange rate of LUNC in all whitelisted denominations. Because this process occurs every 30 seconds, validators must set up an automated process to avoid getting slashed and jailed.
This solution has 2 components:
price-server
)docker-compose
(Recommended) (Experimental)Install Docker
curl -o docker-compose.yml https://raw.githubusercontent.com/classic-terra/oracle-feeder/main/docker-compose.yml
Review the docker-compose.yml service oracle-feeder and change ENV accordingly
Bring up your stack by running
docker-compose up -d
Install Node.js (https://nodejs.org/)
Clone this repository
git clone https://github.com/classic-terra/oracle-feeder
cd oracle-feeder
price-server
, following instructions here.cd price-server
npm install
# Copy sample config file
cp ./config/default-sample.js ./config/default.js
# make edits
vim ./config/default.js
# price is available at `http://127.0.0.1:8532/latest`
npm run start
feeder
, following instructions here.cd feeder
npm install
# configure to use feeder account
npm start add-key
# start voting (note: multiple lcd-url and validators can be specified)
$ npm start vote -- \
--data-source-url http://localhost:8532/latest \
--lcd-url https://terra-classic-lcd.publicnode.com \
--lcd-url https://lcd.terraclassic.community \
--chain-id columbus-5 \
--validators <terravaloper address> \
--password <password>
docker-compose up -d
docker-compose stop
docker-compose down
docker-compose logs -f
docker-compose down
docker-compose pull
docker-compose up -d
docker-compose -f docker-compose.yml -f docker-compose.build.yml build --no-cache