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.
splitter-agent
to cross-validate ethereum RPC answers and provide redundancyThese instructions are for those running 1.7
Ethereum node
Starting from this release, feeds require access to Ethereum RPC nodes. Because running its own Ethereum node can be challenging, and using third-party nodes expose feed to potentially compromised or malicious providers, we built a mechanism to cross-validate RPC responses. This allows two configuration options:
One trusted node
If you run your own Ethereum node, you may configure it as your single RPC source. Because you run your own node, you do not need to trust any third party to provide correct data, and the risk of MITM attacks is mitigated. If you don't operate the node yourself, please pick one of the other options.
Three nodes
Identify three reliable nodes, which can be a mix of nodes operated by you or by third parties. splitter-agent
will query every node and compare their output. If there is a discrepancy, an error will be generated and your feed will not publish a price update for some pairs. The third node adds redundancy, so if one node is unreachable or falls behind, splitter-agent
will compare the output of the remaining two nodes.
To encourage a diversity in the configuration of the feeds, we will not provide list of RPC URL for the use by every feed, and request that each feed operator select their own nodes.
Suggestions for nodes:
Optional: cleanup nix storage
This might free up several gigabytes of storage.
nix-collect-garbage
Upgrade Omnia and Dependencies to version 1.8.1
nix-env --install --verbose --file https://github.com/makerdao/oracles-v2/tarball/stable
Configure Gofer, Spire, Scuttlebot and Omniainstall-omnia feed --ssb-caps ~/caps.json --ssb-external <your external ip here> --eth-rpc <https://node1[:port]/path> --eth-rpc <https://node2[:port]/path> --eth-rpc <https://node3[:port]/path>
Configure the RPC splitter agentsplitter-agent
is used for both 1 node and 3 node configurations
sudo systemctl daemon-reload
sudo systemctl enable splitter-agent.service
sudo systemctl start splitter-agent.service
Restart services
sudo systemctl restart gofer-agent
sudo systemctl restart spire-agent
sudo systemctl restart ssb-server
sudo systemctl restart omnia
note: restarting spire-agent can take a few minutes
node reconfiguration:
If you need to change the node list, run the following command to override the rpc node configuration:
install-omnia feed --eth-rpc <https://node1[:port]/path> --eth-rpc <https://node2[:port]/path> --eth-rpc <https://node3[:port]/path>
and restart splitter-agent
:
sudo systemctl restart spire-agent
Check that gofer returns a price for WSTETH/ETH
gofer -c /etc/gofer.json prices WSTETH/USD --format=trace
note: if you get the error not enough sources to calculate median
, wait two minutes and try again
Check Status of Omnia and Scuttlebot
sudo systemctl status ssb-server
sudo systemctl status omnia
sudo systemctl status gofer-agent
sudo systemctl status spire-agent
Recommended: cleanup temporary ssb files
Your /tmp
directory may contain hundreds of thousands of uncessary files that may be safely removed
find /tmp -name "multiserver*" -delete
Notify
Let @marcandu on Keybase know that you completed the upgrade, so they can confirm that your feed is properly broadcasting messages on both Spire and Scuttlebot.