Swisstronik Docs
  • πŸ‡¨πŸ‡­About Swisstronik
    • What is Swisstronik?
    • Swisstronik vs Ethereum
    • Useful links
  • 🌐General
    • Intel SGX
    • Governance
      • On-Chain Proposal
      • Formatting a Proposal
      • Submitting a Proposal
      • Governable Parameters
    • Community Pool
    • Accounts
    • Transactions
    • Gas and Fees
    • Coin & Tokens
  • βš’οΈDevelopment
    • Endpoints
    • Connect wallets
      • MetaMask (EVM) - Manual
      • Keplr (Cosmos)
      • Testnet Metamask (EVM) - Chainlist
      • Testnet MetaMask (EVM) - Manual
      • Testnet Keplr (Cosmos)
    • Get test coins
    • SwisstronikJS SDK
      • SwisstronikJS Functions
      • Swisstronik & Ethereum transactions
      • Transaction - code sample
      • Swisstronik & Ethereum calls
      • Call - code sample
    • Swisstronik CLI
      • Installation
      • Configuration
      • Key management
      • Queries
      • Sending SWTR
      • For SDI Issuers
    • Guides
      • Contract deployment - Hardhat
        • 1. Setting up the Hardhat environment
        • 2. Configure hardhat.config.js
        • 3. Write and compile the smart contract
        • 4. Deploy the smart contract
        • 5. Interact with the contract - Transaction
        • 6. Interact with the contract - Call
      • Contract deployment - Remix IDE
      • Deployment & Interaction PERC-20
        • ERC-20 & PERC-20
        • Sample PERC20 contract
        • Deployment & Interaction with contract
        • How to use encryption
      • Contract verification
      • SDI for dapp developers
    • Local testnet
    • Web3JS, Ethers, Viem and other third-party libraries
  • πŸ–₯️Node setup
    • Setup SGX
      • Supported Hardware
      • Setup Intel SGX
    • Setup node
      • Mainnet
        • v1.0.1 Upgrade
      • Testnet
        • Install from .deb package
        • Configure node
        • Upgrade your testnet node
          • Swisstronik v3 Testnet
          • Swisstronik v4 Testnet
          • Swisstronik v5 Testnet
          • Swisstronik v5.1 Testnet
          • Swisstronik v6 Testnet
          • Swisstronik v7 Testnet
          • Swisstronik v8 Testnet
        • Seed Node
        • Live Peers
        • Genesis Mirror Download
    • CLI Cheatsheet
  • 🀝Delegators
    • What is a delegator?
    • Delegator Guide (CLI)
    • Delegators Security
Powered by GitBook
On this page
  • Upgrade plan for v1.0.5
  • Backup
  • Manual upgrade
  • Using Cosmovisor
  1. Node setup
  2. Setup node
  3. Testnet
  4. Upgrade your testnet node

Swisstronik v5.1 Testnet

PreviousSwisstronik v5 TestnetNextSwisstronik v6 Testnet

Last updated 8 months ago

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 "" 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.

πŸ–₯️
Upgrade by Cosmovisor