Disclaimer: These instructions are made for Ubuntu 20.04. The commands may not match 100% on other distros, nor is there any guarantee that it will work.
Oracles-v2 v1.6 introduces two new software components, gofer
and spire
, which will improve the robustness of Maker Oracles, as well as set the stage for future growth.
Gofer is a service that continuously polls the data sources and provide aggregated data to omnia. gofer
duplicates the functionality of setzer
and will become the primary data source for omnia
. Omnia reverts to setzer
when gofer
fails.
gofer
caches the API responses, which will greatly reduce the quantity of API requests and will allow omnia to cycle much more quickly through the expanding list of asset pairs.
For more information about gofer
:
https://github.com/makerdao/oracle-suite/tree/master/cmd/gofer
By default, gofer is enabled after installing v1.16. Omnia will query the price information from gofer
and falls to setzer
on errors.
Spire is a new P2P network to transport signed price messages from feeds to relayers. Based on libp2p, developed for ipfs and now used by Ethereum 2.0, filecoin and Polkadot, spire
will allow an easier and more open access to the oracle network.
Both Scuttlebut and Spire will now be used to broadcast signed messages, and relayers will pick the most recent message from either transport. This will add redundancy on a critical element of the network.
By default, spire
is turned off and will remain disabled for now. We'll instruct you to activate it at a later date, once we've established that gofer doesn't introduce undesirable effects.
For more information about spire
:
https://github.com/makerdao/oracle-suite/tree/master/cmd/spire
Take a backup of your existing configuration.
cp /etc/omnia.conf ~/omnia-15.conf
Install Omnia and Dependencies
nix-env --install --verbose --file https://github.com/makerdao/oracles-v2/tarball/stable
Configure Gofer, Scuttlebot and Omnia
install-omnia feed --ssb-caps ~/caps.json --ssb-external <your external ip here>
Configure Gofer Config File
install-omnia will have copied the gofer configuration file to /etc/gofer.json
This file defines the data models, and under normal circunstances you shouldn't need to play with that file, except to set some API-specific (called 'origins' in gofer) configs.
sudo vim /etc/gofer.json
In rpc
, set the address
to 127.0.0.1
to an arbitrary port:
"rpc": {
"address": "127.0.0.1:31822"
},
In origins
, set the API_KEY
for openexchangerates
as below:
"origins": {
"openexchangerates": {
"type": "openexchangerates",
"name": "openexchangerates",
"params": {
"apiKey": "41d14458c27c46c1a5c91a92ab5959dc"
}
}
},
Set Scuttlebot, Omnia and Gofer as systemd services and schedule to run on system boot
sudo systemctl daemon-reload
sudo systemctl enable gofer-agent.service
sudo systemctl enable ssb-server.service
sudo systemctl enable omnia.service
Start gofer for the first time
sudo systemctl start gofer-agent
Restart omnia and ssb to run the latest versions
sudo systemctl restart ssb-server
sudo systemctl restart omnia
[fyi] To stop running Omnia, Gofer and Scuttlebot
sudo systemctl stop ssb-server
sudo systemctl stop omnia
sudo systemctl stop gofer-agent
[fyi] To stop Omnia and Scuttlebot from starting on system boot
sudo systemctl disable --now ssb-server
sudo systemctl disable --now omnia
sudo systemctl disable --now gofer-agent
[fyi] To query gofer and confirm that the agent works
gofer prices MANA/USD --config /etc/gofer.json --format=trace
This should return an aggregated price, and the trace for its calculations. Then you can check the agent logs (sudo journalctl -feu gofer-agent
) and confirm that there are no errors in the agent logs either.
Check Status of Omnia and Scuttlebot
sudo systemctl status ssb-server
sudo systemctl status omnia
sudo systemctl status gofer-agent
Check Scuttlebot logs
sudo journalctl --follow --unit ssb-server
Check Omnia logs
sudo journalctl --follow --unit omnia
Here, we want to make sure that omnia is publishing messages to Scuttlebot (e.g. Publishing SOLUSD price message with transport-ssb
) and that it is obtaining the data from gofer
(e.g. Querying AAVE/USD prices and calculating median with setzer...
). It is normal for omnia
to use setzer to query prices when gofer-agent
was just started, as it will take 1 or 2 minutes to the agent to fetch the initial state.
Check Gofer logs
sudo journalctl --follow --unit gofer-agent
There shouldn't be any errors in the gofer logs.
Verify that ssb-server is running on ports 8007 and 8988.
If these ports are not correct, your Feed will not function correctly!
sudo lsof -i -P -n | grep LISTEN | grep ssb-serve
Notify
Let @marcandu on Keybase know that you completed the upgrade, so they can confirm that your feed is properly broadcasting messages.