Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save QCPOLstakepool/8e7195944a765bfc39beda8262ba9a86 to your computer and use it in GitHub Desktop.
Save QCPOLstakepool/8e7195944a765bfc39beda8262ba9a86 to your computer and use it in GitHub Desktop.

Cardano Stake Pool Migration 1.26.1 -> 1.26.2

THIS GUIDE IS FOR EDUCATIONAL PURPOSE ONLY. IT COMES WITH NO WARRANTY AND SHOULD BE USED AT YOUR OWN RISKS. MAKE THE APPROPRIATE BACKUPS!!! THIS GUIDE ASSUME YOU FOLLOWED https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node

Written by QCPOL (https://qcpol.stakepool.quebec)

Update server

sudo apt update
sudo apt upgrade
sudo apt autoremove

Update GHC to 8.10.4 / Cabal 3.4.0.0 (if not previously done)

Source: https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node#1-install-cabal-and-ghc

cd $HOME
sudo apt-get install -y build-essential curl libffi-dev libffi7 libgmp-dev libgmp10 libncurses-dev libncurses5 libtinfo5
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
  • Answer NO to installing haskell-language-server (HLS).
  • Answer YES to automatically add the required PATH variable to ".bashrc".
cd $HOME
source .bashrc

ghcup upgrade
ghcup install cabal 3.4.0.0
ghcup set cabal 3.4.0.0

ghcup install ghc 8.10.4
ghcup set ghc 8.10.4

Building 1.26.2

cd $HOME
git clone https://github.com/input-output-hk/cardano-node.git cardano-node-1.26.2
cd cardano-node-1.26.2
git fetch --all --recurse-submodules --tags
git checkout tags/1.26.2
cabal update
cabal configure -O0 -w ghc-8.10.4
echo -e "package cardano-crypto-praos\n flags: -external-libsodium-vrf" > cabal.project.local
rm -rf $HOME/cardano-node-1.26.2/dist-newstyle/build/x86_64-linux/ghc-8.10.4
cabal build cardano-cli cardano-node

Stop service

sudo systemctl stop cardano-node

Backup files

cd $HOME
mkdir backup-1.26.1
sudo cp /usr/local/bin/cardano-node backup-1.26.1/cardano-node
sudo cp /usr/local/bin/cardano-cli backup-1.26.1/cardano-cli

Installing 1.26.2

sudo cp $(find $HOME/cardano-node-1.26.2/dist-newstyle/build -type f -name "cardano-cli") /usr/local/bin/cardano-cli
sudo cp $(find $HOME/cardano-node-1.26.2/dist-newstyle/build -type f -name "cardano-node") /usr/local/bin/cardano-node

Start service

sudo systemctl start cardano-node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment