Swisstronik v3 Testnet
Upgrading Swisstronik to 1.0.2
This guide provides instructions for upgrading Swisstronik to 1.0.2 version
NOTE: This upgrade including some breaking changes (such as changing denom from uswtr
to aswtr
), so it's not possible to perform just a Software Upgrade
Before upgrade
Backup
Before the upgrade, please ensure, that you backuped following folders:
.swisstronik
. This is required to be able to rollback upgrade.swisstronik-enclave
folder andenclave.signed.so
file. This is required to be able to restore encryption key
Also it is recommended to backup swisstronikd
binary
Install Intel SGX DCAP
Check DCAP Driver
Ensure that user under which you're running your node has access to SGX, by running the following command:
If you cannot see sgx
and sgx_prv
groups, add your user to them:
Then run groups $USER
again. If groups we're not updated, login again.
Install DCAP Libraries
Install required libraries by running the following command:
NOTE: If you have 5th Generation Xeon SP, you have to install additional package:
Configure Intel PCCS
You should configure Intel Quote Provider. Configuration file can be found here:
Update pccs_url
value in that file and set it to:
NOTE: If you're using Microsoft Azure to run your node, please refer their documentation, to set correct value for pccs_url
. https://learn.microsoft.com/en-us/azure/security/fundamentals/trusted-hardware-identity-management
Download and install binaries
Download 1.0.2 binaries:
Extract downloaded archive and install binary:
Install extracted deb package:
NOTE: if you have issue with libsnappy1v5
, install it using:
To simplify process, you can copy v1.0.2_enclave.signed.so
from /usr/lib
to directory with already existing enclave.signed.so
file. DO NOT replace enclave.signed.so
, just put updated enclave file in the same folder.
Pass Remote Attestation
NOTE: Updated binary swisstronikd_v1.0.2
by default stored in /usr/local/bin
. Updated enclave file by default stored in /usr/lib
.
NOTE: SEED_HOME
env var was renamed to KEYMANAGER_HOME
and should lead to directory with .keymanager
(~/.swisstronik-enclave
by default)
Request encryption keys using one of the following commands:
Using EPID:
Using DCAP:
NOTE: Do not replace your current binaries for now, use v1.0.1 swisstronikd
to run your node
Set halt-height
Upgrade will take place at 5430000
block. Set halt-height
in ~/.swisstronik/config/app.toml
to 5430000
to stop your node on exact height.
NOTE: Once you changed app.toml
file, please restart your validator
NOTE: Disable Restart=always
in your .service
file and run sudo systemctl daemon-reload
. Otherwise, your validator will restart and continue produce blocks after halt height.
During the upgrade
NOTE: This part will be executed once block height will reach 5430000
. You should wait until that moment.
Backup
Backup everything again. Please ensure, that you backuped following folders:
.swisstronik
. This is required to be able to rollback upgrade.swisstronik-enclave
folder andenclave.signed.so
file. This is required to be able to restore encryption key
Download latest genesis.json
Download genesis.json
file from v1.0.2 release:
https://github.com/SigmaGmbH/swisstronik-chain/releases/download/testnet-v1.0.2/genesis.json
Update validator
Backup
.swisstronik/data/priv_validator_state.json
,.swisstronik/config/priv_validator_key.json
and.swisstronik/config/node_key.json
Run
swisstronikd tendermint unsafe-reset-all --keep-addr-book
to clean all states. Also you should remove file.swisstronik/config/genesis.json.bak
Replace
.swisstronik/config/genesis.json
with downloaded oneUpdate min gas prices in
app.toml
to correct denom. Sample command:sed -i 's/minimum-gas-prices = "7uswtr"/minimum-gas-prices = "7aswtr"/' ~/.swisstronik/config/app.toml
Restore
.swisstronik/config/priv_validator_key.json
and.swisstronik/config/node_key.json
and `priv_validator_state.json`
from backup.Set
halt-height
in.swisstronik/config/app.toml
to0
Update
.service
file for your validator with updated binaries. Updated binaryswisstronikd_v1.0.2
by default stored in/usr/local/bin
. Updated enclave file by default stored in/usr/lib
.Reload daemon
sudo systemctl daemon-reload
Restart your validator
NOTE: SEED_HOME
env var was renamed to KEYMANAGER_HOME
and should lead to directory with .keymanager
(~/.swisstronik-enclave
by default)
Troubleshooting
Cannot find `swisstronikd` binary
Download archive with old binaries from release https://github.com/SigmaGmbH/swisstronik-chain/releases/download/testnet-v1.0.2/old-binaries.zip
In case of missing libsgx_wrapper.x86_64.so
copy that file from archive and put it in /usr/lib
folder
Last updated