Swisstronik v5.1 Testnet

Upgrade plan for v1.0.5

The v1.0.5 upgrade includes the following changes:

  • Increased balance of faucet addresses to handle increased demand in SWTR coins;

  • Various minor improvements for testing.

Backup

Before the upgrade, validators are strongly encouraged to take a full data snapshot. The snapshotting process depends on your infrastructure, but generally, it can be done by backing up the .swisstronik directory. If you use Cosmovisor for the upgrade, it will automatically back up your data upon upgrading by default. For more details, refer to the "Upgrade by Cosmovisor" section below.

It is critically important for validator operators to back-up the .swisstronik/data/priv_validator_state.json file after stopping the swisstronikdprocess. This file is updated every block as your validator participates in consensus rounds and is essential to prevent double-signing if the upgrade fails and the previous chain needs to be restarted.

Manual upgrade

If you're not using Cosmovisor, you can perform the upgrade manually by following these steps:

Prepare new binary

  1. Download the new binary:

wget https://github.com/SigmaGmbH/swisstronik-chain/releases/download/testnet-v1.0.5/swisstronikd.zip
  1. Extract the downloaded archive:

unzip swisstronikd.zip

In bin folder you will be able to find required files.

Copy libsgx_wrapper_v1.0.5.x86_64.so library:

sudo cp bin/libsgx_wrapper_v1.0.5.x86_64.so /usr/lib

Copy v1.0.5_enclave.signed.so to ENCLAVE_HOME directory (by default it is $HOME/.swisstronik-enclave):

cp bin/v1.0.5_enclave.signed.so $ENCLAVE_HOME

DURING UPGRADE: Modify your .service file

When your validator reaches the upgrade height, it will automatically stop producing new blocks. After your node has stopped, update the .service file to switch the binary you’re using to swisstronikd v1.0.5 by modifying the ExecStart line.

Note: The swisstronikd v 1.0.5 binary is located in the bin folder from the previous step where you unpacked the .zip archive.

To apply the changes, run:

sudo systemctl daemon-reload

Then, restart your validator.

Using Cosmovisor

If you're running your node using Cosmovisor, please follow these steps.

Download binaries

  1. Download new binary:

wget https://github.com/SigmaGmbH/swisstronik-chain/releases/download/testnet-v1.0.5/swisstronikd.zip
  1. Extract downloaded archive:

unzip swisstronikd.zip

You will find the required files in the bin folder.

  1. Copy libsgx_wrapper_v1.0.5.x86_64.so library:

sudo cp bin/libsgx_wrapper_v1.0.5.x86_64.so /usr/lib
  1. Copy v1.0.5_enclave.signed.so to ENCLAVE_HOME directory (by default it is $HOME/.swisstronik-enclave):

cp bin/v1.0.5_enclave.signed.so $ENCLAVE_HOME

Setup Cosmovisor

If you haven't configured Cosmovisor before, follow these steps:

  1. Install the latest version of Cosmovisor (1.5.0):

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
  1. Verify the installation:

cosmovisor version
# Expected output: cosmovisor version: v1.5.0
  1. Copy old swisstronikd binary:

cp $(whereis swisstronikd) .
  1. Initialize Cosmovisor:

Set the following environment variables:

export DAEMON_HOME=/path/to/.swisstronik
export DAEMON_NAME=swisstronikd

Then, initialize Cosmovisor:

cosmovisor init swisstronikd

Put v1.0.5 binaries

Copy swisstronikd v1.0.5 to the correct directory:

Create the upgrade directory:

mkdir -p  $HOME/.swisstronik/cosmovisor/upgrades/v1.0.5/bin

Copy the new binary:

cp bin/swisstronikd $HOME/.swisstronik/cosmovisor/upgrades/v1.0.5/bin

NOTE: swisstronikd v1.0.5 binary is located in the bin folder from the previous step where you unpacked the .zip archive.

Check folder structure

At this point, you should have the following directory structure:

.
├── current -> genesis or upgrades/<name>
├── genesis
│   └── bin
│       └── swisstronikd  # old: v1.0.4
└── upgrades
    └── v1.0.5
        └── bin
            └── swisstronikd  # new: v1.0.5

Export the environmental variables:

export DAEMON_NAME=swisstronikd
# please change to your own swisstronik home dir
# please note `DAEMON_HOME` has to be absolute path
export DAEMON_HOME=$HOME/.swisstronik
export DAEMON_RESTART_AFTER_UPGRADE=true

Disable auto downloading of binaries

To prevent Cosmovisor from automatically downloading binaries, set DAEMON_ALLOW_DOWNLOAD_BINARIES to false:

export DAEMON_ALLOW_DOWNLOAD_BINARIES=false

Start the node

Start your node with the following command:

cosmovisor run start --x-crisis-skip-assert-invariants --home $DAEMON_HOME

Skipping the invariant checks is strongly encouraged, as it significantly decreases the upgrade time. Additionally, further improvements to the crisis module are expected in the next release of the Cosmos SDK.

Last updated