The CLI support only linux and is provided as a pre-built binary with every release and also as a docker image.
.env - keeps private information(private keys, api keys etc.). Most commands require some secrets and these are kept in this file as a precaution against accidental exposure. For a working setup it is required to at least add one private key in your
"ETH_PRIVATE_KEYS" environment variable. Multiple private keys are supported separated by
index.json - all api endpoint for data providers. The cli uses these provider endpoints to gather data which is then used to submit to the onchain oracle.
manualdata.json - for providing data manually. There is currently one data point which must be manually created. The rolling 3 month average of the US PCE . It is updated monthly. Make sure to keep this file up to date.
For testing purposes, or if you want to hardcode in a specific value, you can use the file to add manual data for a given requestID. Add the request ID, a given value (with granularity), and a date on which the manual data expires.
The following example shows request ID 4, inputting a value of 9000 with 6 digits granularity. Note the date is a unix timestamp.
config.json - optional config file to override any of the defaults. See the configuration page for full reference.
by default the cli looks for these in the
./configsfolder relative to the cli folder.
mkdir ./configscd ./configswget https://raw.githubusercontent.com/tellor-io/telliot/master/configs/index.jsonwget https://raw.githubusercontent.com/tellor-io/telliot/master/configs/manualData.jsonwget https://raw.githubusercontent.com/tellor-io/telliot/master/configs/.env.examplemv .env.example .envcd ../wget https://github.com/tellor-io/telliot/releases/latest/download/telliotchmod +x telliot
As of now, mining requires you to deposit 500 TRB to be allowed to submit values to the oracle and earn rewards. This is a security deposit. If you are a malicious actor (aka submit a bad value), the community can vote to slash your 500 tokens. Your stake is locked for a minimum of 7 days after you run the command to request withdrawal.
Run the following command to deposit your stake:
./telliot stake deposit
To unstake your tokens, you need to request a withdraw:
./telliot stake request
One week after the request, the tokens are free to move at your discretion after running the command:
./telliot stake withdraw
Telliot supports submiting data to different contracts and the config folder contains examples for that. For example:
./telliot mine --config=configs/configTellorMesosphere.json
Some oracle feeds require 24h avarages and for these enough historical data is needed. Running a dataserver is the solution to always have enough historical data to generate these averages.
The network topology of this setup looks like the diagram below. One ore more miners are connected to the same data server for fetching current or historical data to submit to the oracle. The data server pulls data from the API providers, the 5 staked miners pull data from the data server and submit on-chain to the Tellor Core smart contracts.
/(0xE037)\Miner | (0xcdd8) |Tellor <-> (multiple | (0xb9dD) | <-> Data Server <-> Data APIs(on chain) keys) | (0x2305) |\(0x3233)/
cp configs/.env.example configs/.env # Edit the file after the copy.docker run -v $(pwd)/configs:/configs tellor/telliot:master mine
gcloud auth login --project projectNamegcloud container clusters get-credentials main --zone europe-west2-a --project projectName
cli (by default deployed to run as a miner)
git clone https://github.com/tellor-io/telliotcd telliotexport INSTANCE_NAME=lat # Use max 3 characters due to k8s limitation for port names.export DEPL_NAME=telliot-m # This is the name of the deployment file.export CFG_FOLDER=.local/configs/$DEPL_NAME-$INSTANCE_NAME # Configs will be copied to this folder.export DEPL_INSTANCE_NAME=$DEPL_NAME-$INSTANCE_NAMEmkdir -p $CFG_FOLDER# Create the secret file.cp configs/.env.example $CFG_FOLDER/.env # Edit the file after the copy.touch $CFG_FOLDER/config.json # Create an empty file and if needed overwrite the defaults.# Copy the manual data file.cp configs/manualData.json $CFG_FOLDER/manualData.json# Apply the configs.kubectl create secret generic $DEPL_INSTANCE_NAME --from-env-file=$CFG_FOLDER/.envkubectl create configmap $DEPL_INSTANCE_NAME \--from-file=configs/index.json \--from-file=$CFG_FOLDER/config.json \--from-file=$CFG_FOLDER/manualData.json \-o yaml --dry-run=client | kubectl apply -f -# Copy the manifest and run it.cp configs/manifests/$DEPL_NAME.yml $CFG_FOLDER/$DEPL_NAME.ymlsed -i "s/$DEPL_NAME/$DEPL_INSTANCE_NAME/g" $CFG_FOLDER/$DEPL_NAME.ymlkubectl apply -f $CFG_FOLDER/$DEPL_NAME.yml
export INSTANCE_NAME=lat # Use max 3 characters due to k8s limitation for port names.export CFG_FOLDER=.local/configs/dbexport DEPL_NAME=telliot-dbmkdir -p $CFG_FOLDER# Run the same commands as the mining deployment.See [configuration page](configuration.md) on how to setup other instances to connect to this remote dataserver### To run another instance.```bashexport NAME= # Put an instance name here. Something short as some properties are limited by length(e.g `export NAME=PR1`).# Run all the other commands from initial k8s setup.
kubectl delete statefulsets.apps $DEPL_INSTANCE_NAMEkubectl delete service $DEPL_INSTANCE_NAMEkubectl delete configmap $DEPL_INSTANCE_NAMEkubectl delete secret $DEPL_INSTANCE_NAMEkubectl delete persistentvolumeclaims $DEPL_INSTANCE_NAME
export REPO= # Your docker repository name.docker build . -t $REPO/telliot:customdocker push $REPO/telliot:latestsed -i "s/tellor\/telliot:latest/$REPO\/telliot:custom/g" $CFG_FOLDER/telliot-m.ymlkubectl apply -f $CFG_FOLDER/telliot-m.yml
kubectl apply -f configs/manifests/monitoring-persist.ymlkubectl apply -f configs/manifests/monitoring.yml
This uses the alertmanager bot. see here for more info and available commands.
# Create a secret for the telegram authentication.kubectl create secret generic alertmanager-bot \--from-literal=admin='<telegram admin>' \--from-literal=token='<telegram token>'kubectl apply -f configs/manifests/alerting-persist.ymlkubectl apply -f configs/manifests/alerting.yml