Skip to main content

Chain Upgrade

This guide outlines the steps required to upgrade your Sentinel Hub software. Follow these instructions carefully to ensure a smooth process.

Upgrade List

Upgrade #Binary VersionNameBlock HeightProposal #Commit Hash
0 (Hard Fork)v0.6.2sentinelhub-2901,801/4cd6b2b
1v0.7.0upgrade-11,272,0003600fd5f
2v0.8.3upgrade-22,586,0005fa7cd3c
3v0.9.2upgrade-35,125,0009d04a400
4v0.10.1upgrade-49,348,47519bbe6fab
5v0.11.2v1112,310,0053054c28ae
6v12.0.0v12_0_023,997,75564eb3c5c4

Build the Binary

When the upgrade is available clone the Sentinel Hub repository, checkout at the new version and install it

git clone https://github.com/sentinel-official/sentinelhub.git "${HOME}/sentinelhub"
cd "${HOME}/sentinelhub"
git checkout <new_version>
make install

Automatic Upgrade: Cosmovisor

If you’re using or planning to use Cosmovisor (see the guide), the upgrade process will be mostly automatic. Once the new binary is built and placed in the correct directory, Cosmovisor will take care of the rest.

note

Upgrades can be either consensus-breaking or non-consensus-breaking. Follow the appropriate section below depending on the upgrade type.

Consensus Breaking (Chain Upgrade)

Create the upgrade directory inside Cosmovisor with the name of the version (for the last upgrade was v12_0_0 as you can see here under the section plan, tab name)

mkdir -p ~/.sentinelhub/cosmovisor/upgrades/<upgrade_name>/bin

Copy sentinelhub binary in it

cp ~/go/bin/sentinelhub ~/.sentinelhub/cosmovisor/upgrades/<upgrade_name>/bin

Check if the sentinelhub binary upgrade was copied and if it is the correct version:

~/.sentinelhub/cosmovisor/upgrades/<upgrade_name>/bin/sentinelhub version

Now that you have prepared and deployed the new binary, the remaining steps will be managed by Cosmovisor when the upgrade is scheduled to take place. Here's a breakdown of the process:

When the designated block height is reached, the blockchain temporarily halts its operations. Following this, an upgrade-info.json file is generated and put into the folder .sentinelhub/cosmovisor/upgrades/<upgrade_name>/.

The content of this file will be the following, based on the last hub upgrade:

.sentinelhub/cosmovisor/upgrades/<upgrade_name>/
{"name":"v12_0_0","time":"0001-01-01T00:00:00Z","height":23997755}

The Cosmovisor system identifies the existence of this file and triggers the required sequence of actions. These actions include pausing the node, inserting the relevant binary into the specified directory, and subsequently restarting the node.

This carefully orchestrated sequence guarantees a seamless transition and successful execution of the blockchain upgrade.

Non Consensus Breaking

For non-consensus upgrades, you only need to replace the running binary with the new one.

Stop cosmovisor

sudo systemctl stop cosmovisor.service

Copy the newly created Sentinel Hub binary into Cosmovisor

cp go/bin/sentinelhub .sentinelhub/cosmovisor/current/bin/

Verify that the cosmovisor version is current

cosmovisor version

Start cosmovisor

sudo systemctl start cosmovisor

Monitor the logs to confirm the successful execution of the process

journalctl -u cosmovisor.service -f --output=cat

Manual Upgrade

If you’re not using Cosmovisor, follow these manual steps once the blockchain halts at the upgrade block height.

Stop the node

Check the current block height to confirm it matches the upgrade height:

curl -fsLS http://127.0.0.1:26657/status | jq -r '.result.sync_info.latest_block_height'

Then stop the Sentinel Hub service:

sudo systemctl stop sentinelhub.service

Install the new version

Link the new binary:

# For Ubuntu installation
sudo ln -s "${GOBIN}/sentinelhub" /usr/bin/sentinelhub

# For manual installation
sudo ln -s "${GOBIN}/sentinelhub" /usr/local/bin/sentinelhub

Start the node

Verify the version:

sentinelhub version --long

Restart the service:

sudo systemctl start sentinelhub.service

In Case of Upgrade Failure

  • Roll back to the previous version (e.g., if upgrade-6 fails, use version v0.11.2).

  • Confirm the rollback version matches the upgrade table above.

  • Restart the node using the --unsafe-skip-upgrades flag at the upgrade height:

sentinelhub start --unsafe-skip-upgrades <block_height>

This allows the node to continue syncing while minimizing downtime.