Tellor Docs
Search…
Setup and usage
Here are the nuts and bolts for using the CLI
The CLI supports only linux and is provided as a pre-built binary with every release and also as a docker image.

Get the telliot CLI and set up default configs.

1
wget https://raw.githubusercontent.com/tellor-io/telliot/master/get-telliot.sh && source get-telliot.sh
Copied!

Edit config files.

  • .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.
1
"4":{
2
"VALUE":9000.123456,
3
"DATE":1596153600
4
}
Copied!
  • 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 ./configs folder relative to the cli folder.

Deposit or withdraw a stake

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:
1
./telliot stake deposit
Copied!
To unstake your tokens, you need to request a withdraw:
1
./telliot stake request
Copied!
One week after the request, the tokens are free to move at your discretion after running the command:
1
./telliot stake withdraw
Copied!

Start mining.

The same instance can be used with multiple private keys in the .env file separated by a comma.
1
./telliot mine
Copied!
Telliot supports submiting data to different contracts and the config folder contains examples for that. For example:
1
./telliot mine --config=configs/configTellorMesosphere.json
Copied!

DataServer - a shared data API feeds.

Advanced usage! If you are setting up a Tellor miner for the first time, it might be a good idea to skip this section and come back after you're up and running with one miner. See the configuration page for the required configs.
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.
1
/(0xE037)\
2
Miner | (0xcdd8) |
3
Tellor <-> (multiple | (0xb9dD) | <-> Data Server <-> Data APIs
4
(on chain) keys) | (0x2305) |
5
\(0x3233)/
Copied!

Run with Docker - https://hub.docker.com/u/tellor

1
cp configs/.env.example configs/.env # Edit the file after the copy.
2
docker run -v $(pwd)/configs:/configs tellor/telliot:master mine
Copied!

Run on Kubernetes with Helm Chart

A Helm chart for installing telliot on Kubernetes

telliot Configuration

Include telliot configuration files in the files directory of this chart.
These files should be:
  • .env
  • index.json
  • manualData.json
Run the following to use the default configuration files:
1
cp configs/index.json configs/manualData.json configs/helm/files/
2
cp configs/.env.example configs/helm/files/.env # you will need to edit this file with your own secrets after copying
Copied!
Optionally you can also include config.json if you would like to override any default config values.
If you would like to use separate .env or config.json files for the mining and dataserver instances, copy those files under their respective directory in config/helm/files. For example to use a unique config.json and .env for mining and dataserver instances run:
1
# Mining instance
2
cp configs/config.json configs/helm/files/mine/
3
cp configs/.env.example configs/helm/files/mine/.env
4
# dataserver instance
5
cp configs/config.json configs/helm/files/dataserver/
6
cp configs/.env.example configs/helm/files/dataserver/.env
Copied!

Usage

After you have moved your configuration files to config/helm/files, you can install this chart using the following command:
1
export INSTANCE_NAME=lat
2
helm install $INSTANCE_NAME configs/helm/ \
3
--namespace tellor --create-namespace
Copied!
INSTANCE_NAME being a string you would use to denote this instance of telliot.
Keep in mind this command is using all default values.

Values

The default helm values will install a mining instance of telliot.
To override these values during installation include --set $key=$value in the helm upgrade command.
For example, to run a dataserver instance of telliot using a custom image with 5Gi of storage:
1
export INSTANCE_NAME=lat
2
helm install $INSTANCE_NAME configs/helm/telliot \
3
--namespace tellor --create-namespace \
4
--set "container.image=mytelliot:01" \
5
--set "storage=5Gi" \
6
--set "modes={dataserver}" \
Copied!
If I instead only wanted to run a mining instance of telliot:
1
export INSTANCE_NAME=lat
2
helm install $INSTANCE_NAME configs/helm/telliot \
3
--namespace tellor --create-namespace \
4
--set "modes={mine}" \
Copied!
A full list of values and their description can be found here

Monitoring

Monitoring is recommended and can be installed using a separate helm chart.
To install monitoring with the default values run:
1
helm install monitoring /configs/helm/monitoring \
2
--namespace tellor
Copied!
A full list of values and their description can be found here

Upgrade

To upgrade your instance simply run
1
helm upgrade $INSTANCE_NAME configs/helm/ --namespace tellor --set $key=$value
Copied!
With $key=$value being the desired value changes you would like to make.
If you would like to make any config changes, move the updated configuration file to configs/helm/files/ and run
1
helm upgrade $INSTANCE_NAME configs/helm/ --namespace tellor
Copied!

Removal

Uninstalling an instance of telliot using helm is as simple as
1
helm uninstall $INSTANCE_NAME --namespace tellor
Copied!
Where instance name was the name for the release you specified during installation. You can find this value by running
1
helm list --namespace tellor
Copied!
Last modified 27d ago