DVM ENV Config
Find configuration options for your DVM.
DVM related variables to monitor and dispute feeds are set in disputable-values-monitor
folder.
Slack variables
These variables control what types of alerts should be prioritized and which Slack channels they will be sent to. It also controls which of them should trigger an SMS alert.
MOCK_SLACK=
Either to mock or actually send the alerts to the Slack channels. This value can either be true
or false
.
Set it to false
to actually send the alerts.
Example: MOCK_SLACK=false
High, Mid and Low Slack Channels
To set these, you need the Slack WebHooks for the Slack channels you want to send the alerts to.
Use the hooks according to their priorities in your Slack channel. Examples: SLACK_WEBHOOK_HIGH="https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
SLACK_WEBHOOK_MID="https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
SLACK_WEBHOOK_LOW="https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
You'll need to configure what type of alerts to send to each channel in the next variable.
High, Mid, and Low Alerts
Each category will send its respective alerts to their respective Slack channels.
HIGH_ALERTS will also trigger an SMS alert. Only set the alerts you also want to receive an SMS in this category.
You can exchange the alerts between categories. Just copy the alerts and their quotes, separated by commas.
Example:
HIGH_ALERTS='["DISPUTE_AGAINST_REPORTER", "BEGAN_DISPUTE", "REMOVE_REPORT", "ALL_REPORTERS_STOP"]'
MID_ALERTS='["DISPUTABLE_REPORT", "REPORTER_STOP", "REORG_DETECTED"]'
LOW_ALERTS='["REPORTER_BALANCE", "DISPUTER_BALANCE"]'
SLACK_WEBHOOK_URL=
Slack Webhook URL. You can use one of the ones from high, mid or low alerts, too. Set it to something if you want to have the Slack alerts enabled. Example: SLACK_WEBHOOK_URL=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
INITIAL_BLOCK_OFFSET=
This is the block to be used by DVM to start monitoring the chain.
The defaults is 0, meaning it will start monitoring the chain from the current block. It won’t look into past submissions.
Example: INITIAL_BLOCK_OFFSET="0"
CHAIN_REORG=
This is the number of blocks to go back in case of a chain reorganization, so that the DVM can reprocess the blocks that were affected by the reorganization and not miss any event.
Example: CHAIN_REORG="10"
NOTIFICATION_SERVICE=
This is a comma-separated list of notification services to be used by DVM to send alerts. Defaults to an empty string, meaning it will not send any alerts.
Using "Slack", for example, would only send alerts to Slack channels once set up.
If you don’t have the other variables to set the rest of the services, like SMS and email, just leave this value as "Slack" or leave it blank.
Example: NOTIFICATION_SERVICE="slack"
Docker variables
Variables to set if you are running the DVM in a Docker container. If not, leave as is.
TELLIOT_BRANCH="main"
This is the branch to be used by the initialize_docker.py
script. It checkouts to the HEAD of TELLIOT_BRANCH
when building the DVM Docker image.
ACC_NAME="abc"
This is the name of the wallet added to the disputer in docker container (used by the initialize_docker.py
script).
ACC_PWD="123456"
This is the password for the ACC_NAME
wallet (used by the initialize_docker.py
script).
PK=<privatekey>
This is the private key to be used by the DVM disputer account in the Docker container (it is also used in runtime.sh script).
Twilio SMS alerts variables
If you don’t have the credentials to use Twilio, leave the MOCK_SES=
variable as true
. Otherwise, set it to false
and set up the variables with your Twilio credentials.
MOCK_TWILIO=true
MOCK_TWILIO
is a boolean variable to setup the Twilio MockClient, it needs the stoplight/prism:4 image at docker-compose.yml.
TWILIO_AUTH_TOKEN=""
Auth Token provided by Twilio.
TWILIO_ACCOUNT_SID=""
Account SID provided by Twilio.
TWILIO_FROM="+1231231234"
Twilio phone number to send messages from.
ALERT_RECIPIENTS="+1231231234,+1231231234,+1231231234"
Comma-separated list of phone numbers to send alerts to.
DVM AWS SES email alert
MOCK_SES=true
Set it to true or false.
AWS_ACCESS_KEY_ID=""
AWS Access Key ID.
AWS_SECRET_ACCESS_KEY=""
AWS Secret Access Key AWS_REGION
=us-east-1 # AWS Region.
AWS_REGION=
AWS Region.
[email protected]
AWS Source Email, must be verified in AWS SES.
AWS_DESTINATION_EMAILS="[email protected],[email protected]"
Comma-separated list of emails to send alerts to.
AWS_TEAM_EMAILS="[email protected],[email protected]"
Comma-separated list of emails to send alerts to.
DVM reporters and disputers config
REPORTERS=
This is a comma-separated list of addresses to monitor.
Example: REPORTERS="0x0000000000000000000000000000000000000000,0x0000000000000000000000000000000000000000"
It will be monitoring those addresses to send alerts according to the specification below.
REPORT_TIME_MARGIN=
This is the margin in seconds before sending an alert that a reporter hasn't reported. This is an additional time (a margin) that, when triggered, starts a countdown to send an alert. It’s to account for possible chain delays.
Example: REPORT_TIME_MARGIN=60
REPORT_INTERVALS=
This is a comma-separated list of intervals in seconds for REPORTERS= variable. It is used to send an alert if a reporter hasn't reported in the last interval set.
Example: REPORT_INTERVALS="900,900"
So, first and second reporter’s addresses set in REPORTERS= will get the alert triggered after 900s
ALL_REPORTERS_INTERVAL=
It triggers an alert, in seconds, if all reporters in REPORTERS= don’t submit.
Example: ALL_REPORTERS_INTERVAL="120"
REPORTERS_PLS_BALANCE_THRESHOLD=
This is the treshold in PLS to send an alert if a reporter's balance is below it.
Example: REPORTERS_PLS_BALANCE_THRESHOLD="200,200"
It also follows the 'first address, second address…' order from REPORTERS=.
DISPUTER_PLS_BALANCE_THRESHOLD=
Threshold in PLS to send an alert if the disputer's balance is below the threshold. When setting DVM to dispute, the wallet you choose as the disputer is the one being monitored.
Example: DISPUTER_PLS_BALANCE_THRESHOLD="200"
DISPUTE FetchRNG feeds (beta)
This is an experimental feature that is still in beta and should not be used for live data.
DISPUTE_RNG_QUERIES=
Either true
or false
in case you want to initiate disputes on RNG feeds submitted.
Leave this as 'false' so it doesn't try to dispute RNGs, unless you want to test this with testnet.
Last updated