# Migrate Feed (v1.14.3) ## Changelog - Upgraded dependencies - Omnia `v1.14.0` [[release](https://github.com/chronicleprotocol/omnia/releases/tag/v1.14.0)] - Oracle Suite `v0.8.1` [[release](https://github.com/chronicleprotocol/oracle-suite/releases/tag/v0.8.1)] - Setzer `v0.7.0` [[release](https://github.com/chronicleprotocol/setzer/releases/tag/v0.7.0)] - Omnia Feed asset pairs - Added `GNO/USD` - Omnia Relay - Added `GNO/USD` as a new target contract (median) for poke - Maker Teleport - Added support for `Starknet` - Gofer - added `GNO/USD` Data Model - Spire - Added `GNO/USD` ## Prerequisites ### RPC Nodes Feeds require access to Ethereum, Optimism and Arbitrum RPC nodes. Running nodes is currently relatively challenging (requires more attention, frequent upgrades, growing hardware requirements), so for now we do not require that feeds run their own nodes and may instead use a mix of third-party nodes. However, third party nodes cannot be trusted for data integrity and date availability. To protect against compromised or malicious providers, we will use an "RPC Splitter" which queries multiple RPC nodes (3) Even if not required, we encourage you to run your own nodes to use them as your single sources, as these provide additional safety guarantees. This remains the prefered solution and we'll eventually work with you to run individual nodes. You can find setup instructions for L2 nodes in [this guide](https://hackmd.io/@marcandu/Sya0NeY-j). Some suggestions for third-party nodes: - Maker Techops: The Techops CU runs nodes: - [https://optimism1.mainnet.makerops.services/rpc](https://optimism1.mainnet.makerops.services/rpc) - [https://arbitrum1.mainnet.makerops.services/rpc](https://arbitrum1.mainnet.makerops.services/rpc) - Another feed: You may exchange node access with other feeds, to gain redundancy. - Infura (Free plan ok at projected usage level): Enable the free Optimism and Arbitrum Add-ons in your Plan. - Alchemy (Free plan ok at projected usage level) - Not tested by our team, but Feeds have reported working: - Quicknode (1 network in free plan. require $49/m plan to support 2+ networks) - Chainstack: (Free plan supports 1 network, Arbitrum only, not tested) ## Housekeeping on Previous Feed Instance *!!! Extremely Important!!!* **Take SSB Server Offline on Previous Feed** `sudo systemctl disable --now ssb-server` Make sure your SSB Server is not running on the previously existing Feed instance. Otherwise, if there are two ssb-server instances running with the same keys the nodes will fork and other nodes on the network will not replicate your messages <--- this is bad **Backup Your SSB Secret and Gossip Files** `~/.ssb/secret` `~/.ssb/gossip.json` **Backup your Ethereum Keys** Your keystore and password should be located at the respective keystore path and password path defined in `/etc/omnia.conf`. If you have `jq` installed you can quickly find these using: `cat /etc/omnia.conf | jq .ethereum` You will need to scp these to your new VPS you intend to setup your Feed on. ## Installation Instructions for New Feed Instance *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.* **Install Nix** `curl -L https://nixos.org/nix/install | sh` **Install Omnia and Dependencies `v1.14.3`** ``` nix-env --install --verbose \ --file https://github.com/chronicleprotocol/oracles/tarball/v1.14.3 ``` **Configure Gofer, Spire, Scuttlebot, Omnia, and Leeloo** ``` install-omnia feed --from <YOUR_ETH_PUBLIC_KEY> --keystore <PATH_TO_THE DIR_CONTAINING_YOUR_KEYSTORE_FILE> --password <PATH_TO_YOUR_PASSWORD_FILE> --ssb-caps <PATH TO YOUR CAPS FILE> --ssb-external <YOUR IP> --ssb-secret <PATH_TO_YOUR_SSB_SECRET> --ssb-gossip <PATH_TO_YOUR_SSB_GOSSIP_FILE> --eth-rpc-url <ETH_RPC_URL> --eth-rpc-arbitrum <ARBITRUM_RPC_URL> --eth-rpc-optimism <OPTIMISM_RPC_URL> --eth-type ethereum ``` Note that if you're running your own RPC nodes for Ethereum, Arbitrum, and Optimism you will just have to pass the --eth-rpc-url, --eth-rpc-arbitrum, and --eth-rpc-optimism params once each. If you are NOT running your own RPC nodes and instead using 3rd party services such as Infura, Alchemy, or the Maker TechOps nodes, you will have to enter the aforementioned parameters 3 times each. e.g. ``` install-omnia ... --eth-rpc-url $RPC1 --eth-rpc-url $RPC2 --eth-rpc-url $RPC3... ``` **Verify Configs** *check that `/etc/omnia.conf`:* 1. Has your ethereum public key, keystore path, and password path listed under the `ethereum` field. ``` cat /etc/omnia.conf | jq .ethereum ``` *check that `/etc/systemd/system/splitter-agent.service`:* 1. lists your ETH RPC node(s) under ExecStart check that `/etc/leeloo.conf`: 1. Has your ethereum public key, keystore path, and password path listed under the `ethereum` field. ``` cat /etc/leeloo.conf | jq .ethereum ``` 2. Lists your Arbitrum and Optimism node(s) under the `rpc` fields for the respective Arbitrum and Optimism sections. ``` cat /etc/leeloo.conf | jq .leeloo.listeners.teleportEVM[0].ethereum.rpc cat /etc/leeloo.conf | jq .leeloo.listeners.teleportEVM[1].ethereum.rpc ``` **Start Systemd Services** ``` sudo systemctl daemon-reload sudo systemctl enable --now ssb-server sudo systemctl enable --now gofer-agent sudo systemctl enable --now spire-agent sudo systemctl enable --now splitter-agent sudo systemctl enable --now omnia sudo systemctl enable --now leeloo-agent ``` ### Check Status of services ``` sudo systemctl status ssb-server sudo systemctl status gofer-agent sudo systemctl status spire-agent sudo systemctl status splitter-agent sudo systemctl status omnia sudo systemctl status leeloo-agent ``` ### Verify Price Feed is functional **Follow Omnia Logs** `sudo journalctl -u omnia -f` Verify that omnia runs through a whole iteration of asset pairs that are listed in the `/etc/omnia.conf` file without posting any scary sounding errors. **Let @master_chief on Keybase know that you completed the upgrade, so they can confirm that your feed is properly broadcasting both price and attestation messages.**