Skip to content

Instantly share code, notes, and snippets.

@QCPOLstakepool
Last active October 4, 2022 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save QCPOLstakepool/68389e26c0abf1b093414ea33038ba53 to your computer and use it in GitHub Desktop.
Save QCPOLstakepool/68389e26c0abf1b093414ea33038ba53 to your computer and use it in GitHub Desktop.

Cardano Stake Pool Migration 1.34.1 -> 1.35.0

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 cabal

sudo apt-get install automake build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev make g++ tmux git jq wget libncursesw5 libtool autoconf liblmdb-dev -y
ghcup install cabal 3.6.2.0
ghcup set cabal 3.6.2.0
ghcup rm cabal 3.4.0.0
echo export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" >> $HOME/.bashrc
source $HOME/.bashrc

Install Secp256k1

cd $HOME/git
git clone https://github.com/bitcoin-core/secp256k1
cd secp256k1
git checkout ac83be33
./autogen.sh
./configure --enable-module-schnorrsig --enable-experimental
make
sudo make install

Building 1.35.0

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

Modify startRelayNode.sh

Add:

export LD_LIBRARY_PATH=/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Stop service

sudo systemctl stop cardano-node
sudo systemctl stop cardano-submit-api

Installing 1.35.0

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

Start service

sudo systemctl start cardano-node
sudo systemctl start cardano-submit-api
@jettpools
Copy link

Fails starting with update cabal section.
No user sessions are running outdated binaries.
[ Warn ] New GHCup version available: 0.1.17.7. To upgrade, run 'ghcup upgrade'
[ Warn ] New GHC version available: 9.0.1. To upgrade, run 'ghcup install ghc 9.0.1'
[ Error ] Unable to find a download for the requested version/distro.
[ Error ] Also check the logs in "/home/trusted/.ghcup/logs"
[ Warn ] New GHCup version available: 0.1.17.7. To upgrade, run 'ghcup upgrade'
[ Warn ] New GHC version available: 9.0.1. To upgrade, run 'ghcup install ghc 9.0.1'
[ Error ] The version "3.6.2.0" of the tool "Cabal" is not installed.
[ Warn ] New GHCup version available: 0.1.17.7. To upgrade, run 'ghcup upgrade'
[ Warn ] New GHC version available: 9.0.1. To upgrade, run 'ghcup install ghc 9.0.1'
[ Warn ] Symlink "/home/trusted/.ghcup/bin/cabal" is broken.

@QCPOLstakepool
Copy link
Author

@jettpools What flavor of Linux are you using ? It looks like cabal 3.6.2.0 isn't available for it. We use Ubuntu 20.04 x64.

@jettpools
Copy link

Ubuntu 21.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment