Skip to content

Instantly share code, notes, and snippets.

@QCPOLstakepool
Last active January 23, 2022 19:31
Show Gist options
  • Save QCPOLstakepool/08438be9514887115edbb4079bd0013c to your computer and use it in GitHub Desktop.
Save QCPOLstakepool/08438be9514887115edbb4079bd0013c to your computer and use it in GitHub Desktop.

Cardano Stake Pool Migration 1.32.1 -> 1.33.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 tools

ghcup upgrade
ghcup install cabal 3.4.0.0
ghcup install ghc 8.10.7
ghcup set cabal 3.4.0.0
ghcup set ghc 8.10.7

Building 1.33.0

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

Stop service

sudo systemctl stop cardano-node

Installing 1.33.0

sed -i $HOME/.bashrc -e "s/export NODE_BUILD_NUM=.*/export NODE_BUILD_NUM=8111119/"
source $HOME/.bashrc

cd $HOME/cardano-my-node
cp mainnet-byron-genesis.json mainnet-byron-genesis.json.bkp
cp mainnet-shelley-genesis.json mainnet-shelley-genesis.json.bkp
cp mainnet-alonzo-genesis.json mainnet-alonzo-genesis.json.bkp
cp mainnet-config.json mainnet-config.json.bkp

wget -N https://hydra.iohk.io/build/${NODE_BUILD_NUM}/download/1/${NODE_CONFIG}-byron-genesis.json
wget -N https://hydra.iohk.io/build/${NODE_BUILD_NUM}/download/1/${NODE_CONFIG}-shelley-genesis.json
wget -N https://hydra.iohk.io/build/${NODE_BUILD_NUM}/download/1/${NODE_CONFIG}-alonzo-genesis.json
wget -N https://hydra.iohk.io/build/${NODE_BUILD_NUM}/download/1/${NODE_CONFIG}-config.json

sed -i ${NODE_CONFIG}-config.json -e "s/TraceBlockFetchDecisions\": false/TraceBlockFetchDecisions\": true/g"
    
sudo cp $(find $HOME/cardano-node-1.33.0/dist-newstyle/build -type f -name "cardano-cli") /usr/local/bin/cardano-cli
sudo cp $(find $HOME/cardano-node-1.33.0/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