UPDATED: 9/5/2024
Please note after updating it will take up to 6 hours maybe more to sync block replay.
Step 1 - GHC and Cabal Check
Make sure you are using ghc 8.10.7 and cabal 3.8.1.0. If already installed you can skip this step.
Copy ghcup upgrade
ghcup install ghc 8.10.7
ghcup set ghc 8.10.7
ghcup install cabal 3.8.1.0
ghcup set cabal 3.8.1.0
ghc --version
cabal --version
Step 2 - Backup your Configuration file:
Copy cd $NODE_HOME
cp mainnet-config.json mainnet-config.bak
mv mainnet-conway-genesis.json mainnet-conway-genesis.bak
Step 3 - Download the new mainnet conway genesis file:
Copy cd $NODE_HOME
wget https://book.play.dev.cardano.org/environments/mainnet/conway-genesis.json
mv conway-genesis.json mainnet-conway-genesis.json
Step 4 - Update Config file:
Copy cd $NODE_HOME
nano mainnet-config.json
Edit or add THESE TWO LINES to the following:
Copy "ConwayGenesisFile": "mainnet-conway-genesis.json",
"ConwayGenesisHash": "15a199f895e461ec0ffc6dd4e4028af28a492ab4e806d39cb674c88f7643ef62",
Step 5 - Download latest cardano-node git and checkout latest branch
Copy cd $HOME/git
git clone https://github.com/IntersectMBO/cardano-node.git cardano-node2
cd cardano-node2/
cabal update
git fetch --all --recurse-submodules --tags
git checkout tags/9.1.1
Step 6 - Build the node
If you have tmux, it is recommended to open tmux by typing tmux
this will allow to run these commands to build the node without terminal timing out.
Copy cd $HOME/git/cardano-node2
cabal configure -O0 -w ghc-8.10.7
cabal build cardano-node
Step 7 - Check cardano-node that the build was successful
Copy $(find $HOME/git/cardano-node2/dist-newstyle/build -type f -name "cardano-node") version
✅if 9.1.1 - move to next step
Step 8 - Download latest cardano-cli git and checkout latest branch
Copy cd $HOME/git/cardano-node2/
git clone https://github.com/IntersectMBO/cardano-cli.git cardano-cli
cd cardano-cli/
cabal update
git fetch --all --recurse-submodules --tags
git checkout tags/cardano-cli-9.2.1.0
Step 9 - Build the CLI
Copy cd $HOME/git/cardano-node2/cardano-cli
cabal configure -O0 -w ghc-8.10.7
cabal build cardano-cli
Step 10 - Check cardano-cli build was successful
Copy $(find $HOME/git/cardano-node2/cardano-cli -type f -name "cardano-cli") version
✅if 9.2.1.0 - and you were using tmux, close tmux by typing exit
Step 11 - Shut down the node and move the binaries to your bin
If on 9.1.1 node and 9.2.1.0 cli, then shut down the node and move the binaries to your bin
Copy sudo systemctl stop cardano-node
Copy sudo cp $(find $HOME/git/cardano-node2/cardano-cli/dist-newstyle/build -type f -name "cardano-cli") /usr/local/bin/cardano-cli
sudo cp $(find $HOME/git/cardano-node2/dist-newstyle/build -type f -name "cardano-node") /usr/local/bin/cardano-node
Step 12 - Check that successful version upgrades then start back up Cardano node
Copy cardano-node version
cardano-cli version
✅If on 9.1.1 node and 9.2.1.0 cli move to next step
Step 13 - Update and restart your instance
Copy sudo apt-get update && sudo apt-get upgrade -y && sudo reboot
Block replay will now start after reboot. This could take up to 6 hours. To check progress run:
journalctl -fu cardano-node
Use Ctrl+C command to exit the real time view.
Step 14 - Clean up
Copy cd $HOME/git/
rm -rf cardano-node-old
mv cardano-node cardano-node-old
mv cardano-node2 cardano-node
Additional Steps
Copy the cardano-cli binaries to your air gap machine. You can copy from your /usr/local/bin or from the new build to a USB drive
Check to see if you need to update other programs like CNCLI
https://github.com/cardano-community/cncli
Congratulations you did it!
Additional Resources:
Contributors
Thanks to the following pools for helping to put together these guides. Please consider delegating to their pools to support them. Are you a pool? Consider buying them a coffee