Skip to content

Instantly share code, notes, and snippets.

@QCPOLstakepool
Last active December 15, 2023 13:41
Show Gist options
  • Save QCPOLstakepool/5ecf470d1274d7ea574661475b557b1c to your computer and use it in GitHub Desktop.
Save QCPOLstakepool/5ecf470d1274d7ea574661475b557b1c to your computer and use it in GitHub Desktop.

Cardano Stake Pool Migration 8.1.2 -> 8.7.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 -y
sudo apt upgrade -y
sudo apt autoremove -y

Install libblst

Source: https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/getting-started/install.md

cd $HOME/git
git clone https://github.com/supranational/blst
cd blst
git checkout v0.3.10
./build.sh
cat > libblst.pc << EOF
prefix=/usr/local
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include

Name: libblst
Description: Multilingual BLS12-381 signature library
URL: https://github.com/supranational/blst
Version: 0.3.10
Cflags: -I\${includedir}
Libs: -L\${libdir} -lblst
EOF
sudo cp libblst.pc /usr/local/lib/pkgconfig/
sudo cp bindings/blst_aux.h bindings/blst.h bindings/blst.hpp  /usr/local/include/
sudo cp libblst.a /usr/local/lib
sudo chmod u=rw,go=r /usr/local/{lib/{libblst.a,pkgconfig/libblst.pc},include/{blst.{h,hpp},blst_aux.h}}

Building 8.7.2

cd $HOME/git
git clone https://github.com/input-output-hk/cardano-node.git cardano-node-8.7.2
cd cardano-node-8.7.2
git fetch --all --recurse-submodules --tags
git checkout tags/8.7.2
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-8.7.2/dist-newstyle/build/x86_64-linux/ghc-8.10.7
cabal update
cabal build cardano-cli cardano-node cardano-submit-api

Stop service

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

Installing 8.7.2

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

Update configuration files

cd $HOME/cardano-my-node
wget https://book.play.dev.cardano.org/environments/mainnet/conway-genesis.json
sed -i ${NODE_CONFIG}-config.json -e "s/ConwayGenesisHash\":.*/ConwayGenesisHash\": \"f7d46bdd3b3c8caf38351c4eef3346a89241707270be0d6106e8a407db294cc6\",/g"
mv conway-genesis.json ${NODE_CONFIG}-conway-genesis.json

Start service

sudo systemctl start cardano-node
sudo systemctl start cardano-submit-api

Versions

  • ghc 8.10.7
  • cabal 3.8.1.0
  • cardano-cli 8.17.0.0
  • cardano-node 8.7.2
  • libsodium dbb48cce5429cb6585c9034f002568964f1ce567
  • secp256k1 ac83be33
  • libblst v0.3.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment