Skip to content

Latest commit

 

History

History
96 lines (63 loc) · 3.2 KB

upgrade.md

File metadata and controls

96 lines (63 loc) · 3.2 KB

Upgrade Guide

This is a step-by-step guide on how to perform a software upgrade for your SignCTRL validator set.

ℹ️ This guide assumes you have completed the Setup Guide before.

Download The New Version

Check out the latest version via

$ git checkout <version_tag>

and install it via

$ make install

Configuration

There is a possibility that the structure of the config.toml might contain breaking changes in which case you'll have to safely port over your old configuration to the new format.

If you're using the default configuration directory, back it up via

$ cp -R /path/to/.signctrl /path/to/.signctrl_old

and delete it via

$ rm -rf /path/to/.signctrl

Initialize the new config directory

Next, create a new configuration directory by initializing SignCTRL via

$ signctrl init

This will give you

/path/to/.mintctrl/
├── config.toml
└── conn.key

ℹ️ The conn.key is only used on a per-connection-basis to authenticate SignCTRL to the validator, so it doesn't need to be ported over from the old configuration.

Copy the key and state files

Now, that you have your new .signctrl/ configuration directory, you can copy over the priv_validator_key.json and priv_validator_state.json files via

$ cp /path/to/./signctrl_old/*.json /path/to/.signctrl

Compare the config.toml files

There is currently now automatic way of porting over old configuration settings into new formats, so for now, this process will remain manual. One way to go about it is to open both config.toml files side by side, copy over known fields from the old config.toml and finally fill in the new fields.

⚠️ IMPORTANT WARNING ⚠️

Before you restart a node, please perform due diligence when porting over the node's rank value.

  1. It's possible that the rank specified in the config.toml doesn't match the validators current rank anymore. Please, check the logs to see which rank the validator is currently at. You'll need a minimum log level of INFO for this.
  2. Make sure that, in the meantime while the node was stopped, there have been no rank updates that might cause the node's rank to become obsolete before it is started.

Rolling Update

ℹ️ Replace all occurrences of simd with the name of your binary.

Alright, we're all set up for the upgrade! The beauty of SignCTRL is that it can be upgraded with minimal or no downtime at all (depending on your ability to quickly copy and paste commands into the terminal, so keep the commands below ready in a text editor).

First thing you need to do is to stop the validator and the SignCTRL daemon (in this order) via

$ sudo systemctl stop simd
$ sudo systemctl stop signctrl

and start them back up again (in reverse order) via

$ sudo systemctl start signctrl
$ sudo systemctl start simd

For convenience, you can also chain all the commands above with small delays in between:

$ sudo systemctl stop simd; sleep 0.5s; sudo systemctl stop signctrl; sleep 0.5s; sudo systemctl start signctrl; sleep 0.5s; sudo systemctl start simd