Skip to content

Instantly share code, notes, and snippets.

@QCPOLstakepool
Last active May 10, 2023 16:32
Show Gist options
  • Save QCPOLstakepool/0ae85f073904ca6a2267e42bf95d699e to your computer and use it in GitHub Desktop.
Save QCPOLstakepool/0ae85f073904ca6a2267e42bf95d699e to your computer and use it in GitHub Desktop.

Cardano Stake Pool Migration 1.35.7 -> 8.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
sudo apt upgrade
sudo apt autoremove

Updating libsodium

cd $HOME/git
rm -rf libsodium
git clone https://github.com/input-output-hk/libsodium
cd libsodium
git checkout dbb48cce5429cb6585c9034f002568964f1ce567
./autogen.sh
./configure
make
sudo make install

Building 8.0.0

cd $HOME/git
git clone https://github.com/input-output-hk/cardano-node.git cardano-node-8.0.0
cd cardano-node-8.0.0
git fetch --all --recurse-submodules --tags
git checkout tags/8.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-8.0.0/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.0.0

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

Configuration files

cd $HOME/cardano-my-node
wget -O ${NODE_CONFIG}-config.json https://book.world.dev.cardano.org/environments/${NODE_CONFIG}/config.json
wget -O ${NODE_CONFIG}-byron-genesis.json https://book.world.dev.cardano.org/environments/${NODE_CONFIG}/byron-genesis.json
wget -O ${NODE_CONFIG}-shelley-genesis.json https://book.world.dev.cardano.org/environments/${NODE_CONFIG}/shelley-genesis.json
wget -O ${NODE_CONFIG}-alonzo-genesis.json https://book.world.dev.cardano.org/environments/${NODE_CONFIG}/alonzo-genesis.json
wget -O ${NODE_CONFIG}-conway-genesis.json https://book.world.dev.cardano.org/environments/${NODE_CONFIG}/conway-genesis.json

sed -i ${NODE_CONFIG}-config.json -e "s/ByronGenesisFile\":.*/ByronGenesisFile\": \"${NODE_CONFIG}-byron-genesis.json\",/g"
sed -i ${NODE_CONFIG}-config.json -e "s/ShelleyGenesisFile\":.*/ShelleyGenesisFile\": \"${NODE_CONFIG}-shelley-genesis.json\",/g"
sed -i ${NODE_CONFIG}-config.json -e "s/AlonzoGenesisFile\":.*/AlonzoGenesisFile\": \"${NODE_CONFIG}-alonzo-genesis.json\",/g"
sed -i ${NODE_CONFIG}-config.json -e "s/ConwayGenesisFile\":.*/ConwayGenesisFile\": \"${NODE_CONFIG}-conway-genesis.json\",/g"

Start service

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