Update Cardano Node from 1.25.1 to 1.26.1

A new and improved cardano-node version 1.26.1 has been released today. You will find here a step by step guide how to upgrade the cardano node from version 1.25.1 to 1.26.1.

As first step you should update GHC and CABAL as GHC 8.10.4 and CABAL 3.4.0 are required to compile the cardano node version 1.26.1

It is recommanded to use GHCUP to manage your GHC and CABAL versions. Let's install GHCUP:

curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

Install everything except the haskell-language-server.

You should source your bashrc after the GHCUP installation is finished.

source ~/.bashrc

Check if everything ist installed and configured correct:

ghcup upgrade

ghcup install 8.10.4

ghcup set 8.10.4

ghc --version

cabal update

Change to your cardano_node folder:

cd cardano_node

Checkout the latest cardano node tag:

git fetch --all --tags

git tag

git checkout tags/1.26.1

Start the building process with following command:

cabal build all

It is neccesary to stop the cardano node after the cabal build command is finished. You should then make backups of your old cardano-cli and your cardano-node binaries:

mv ~/.local/bin/cardano-cli ~/.local/bin/202104_backup_cardano-cli

mv ~/.local/bin/cardano-node ~/.local/bin/202104_backup_cardano-node

Copy new compiled binaries to ~/.local/bin

cp -p dist-newstyle/build/x86_64-linux/ghc-8.10.2/cardano-node-1.26.1/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin/

cp -p dist-newstyle/build/x86_64-linux/ghc-8.10.2/cardano-cli-1.26.1/x/cardano-cli/build/cardano-cli/cardano-cli ~/.local/bin/

The update is now finished and you can restart your node.

sudo systemctl start cardano-node.service

Please note that the database will be migrated after starting the 1.26.1 node for the first time. This process can take up to 60 minutes.