Perseverance
Upgrading 0.8 -> 0.9

Upgrading from 0.8 to 0.9

Prerequisites

Validator node running version 0.8 of the binaries.

If you have changed the default paths of chaindata and/or data.db, make sure to manually delete those directories before running the upgrade commands.

Overview

In short, this upgrade does the following

  1. Downloads new 0.9 binaries.
  2. Purges the chain data.
  3. Removes old log files to free up some space.
  4. Removes any existing systemd overrides.
  5. Updates the Polkadot RPC endpoint.

Upgrade Process

In order to upgrade your Validator from 0.8 to 0.9, get the new binaries by running:

You might need to first update the Chainflip public signing key:

sudo mkdir -p /etc/apt/keyrings
curl -fsSL repo.chainflip.io/keys/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/chainflip.gpg

Then paste the following in your terminal to migrate to 0.8:

sudo rm /etc/apt/sources.list.d/chainflip.list
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/chainflip.gpg] https://repo.chainflip.io/perseverance/$(lsb_release -c -s) $(lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/chainflip.list
sudo apt update
sudo apt --only-upgrade install "chainflip-*"

Finally, after the node is synced to the new chain you'll need to rotate your keys again to be qualified for the next rotation.

sudo chainflip-cli --config-root /etc/chainflip rotate

If you get any errors after running the previous command, make sure your node is fully synced and that the engine is running before trying again.

Post Upgrade

Logs

Verify that your nodes is operating normally:

journalctl -f -u "chainflip-*"

Exposing Chainflip Node Prometheus Metrics

As mentioned above, the upgrade process removes systemd overrides to avoid any instabilities during the upgrade process. After your node is successfully upgraded, you can add the overrides back by running the following:

sudo mkdir -p /etc/systemd/system/chainflip-node.service.d/
cat <<EOF | sudo tee /etc/systemd/system/chainflip-node.service.d/override.conf >/dev/null
[Service]
ExecStart=
ExecStart=/usr/bin/chainflip-node \
  --chain /etc/chainflip/perseverance.chainspec.json \
  --base-path /etc/chainflip/chaindata \
  --node-key-file /etc/chainflip/keys/node_key_file \
  --validator \
  --prometheus-external
EOF
sudo systemctl daemon-reload
sudo systemctl restart chainflip-node.service

Update Promtail Config

If you are streaming logs from your node to chainflip, please make sure to update the promtail config to add the new scraping config:

Run this to edit your promtail config file.

sudo nano /opt/promtail/chainflip-promtail.yaml

Then replace the existing scrape config with this:

scrape_configs:
  - job_name: systemd
    journal:
      max_age: 12h
    relabel_configs:
      - source_labels: ["__journal__systemd_unit"]
        target_label: "unit"

Finally restart promtail

sudo systemctl restart promtail

Update the tFLIP contract address

Luckily for you, we have already moved all your previous funds from Perseverance 0.7 to the new tFLIP contract. However, Metamask does not allow you change the address, so you will need to import the new one. Follow the guide here (opens in a new tab) to do so.

The new tFLIP Token Contract Address is: 0x0485D65da68b2A6b48C3fA28D7CCAce196798B94

For all those that would like their node to show up in "My Nodes", you will need to stake any amount of new tFLIP from the new contract to your node. This should have been airdropped to most of you.

Paste in your existing Node ID and the balance will be restored in the app! https://auctions-perseverance.chainflip.io/nodes (opens in a new tab)

;