Skip to content

Instantly share code, notes, and snippets.

@QCPOLstakepool
Last active July 17, 2024 02:07
Show Gist options
  • Save QCPOLstakepool/de9f7b58a4c4e689d6f8f7c2a255b896 to your computer and use it in GitHub Desktop.
Save QCPOLstakepool/de9f7b58a4c4e689d6f8f7c2a255b896 to your computer and use it in GitHub Desktop.

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

Building cardano-node 9.0.0

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

Building cardano-cli 9.0.0.1

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

Stop service

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

Installing 9.0.0

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

Update configuration files

Conway genesis file will be shipped in a future release

cd $HOME/cardano-my-node
sed -i '/ConwayGenesisFile/d' ${NODE_CONFIG}-config.json
sed -i '/ConwayGenesisHash/d' ${NODE_CONFIG}-config.json
sed -i ${NODE_CONFIG}-config.json -e "s/ExperimentalHardForksEnabled\":.*/ExperimentalHardForksEnabled\": false,/g"
sed -i ${NODE_CONFIG}-config.json -e "s/ExperimentalProtocolsEnabled\":.*/ExperimentalProtocolsEnabled\": false,/g"

Relay

jq '. += {MinNodeVersion: "8.12.0", PeerSharing: true, TraceLocalConnectionManager: false}' ${NODE_CONFIG}-config.json > tmp && mv tmp ${NODE_CONFIG}-config.json

Block Producer

jq '. += {MinNodeVersion: "8.12.0", PeerSharing: false, TraceLocalConnectionManager: false}' ${NODE_CONFIG}-config.json > tmp && mv tmp ${NODE_CONFIG}-config.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 9.0.0.1
  • cardano-node 9.0.0
  • 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