Hi all,
Here’s another upgrade guide for 9.1.0 for Coincashew users.
The is the hardfork version. It now includes the Conway Genesis file. If you are happy and want Cardano to move through to the new era, then install this build and get new blocks minted using 9.1.0!
As always, test first, then deploy.
This assumes you’re running a relatively recent build. It also isn’t strictly necessary to build the node from source, as there are executables downloadable from the github repo, but some still like to build, like me. So if you don’t want to build, don’t!
Update your instance:
sudo apt-get update && sudo apt-get upgrade
Download latest cardano-node git and checkout latest branch:
cd $HOME/git
git clone https://github.com/IntersectMBO/cardano-node.git cardano-node2
cd cardano-node2/
git fetch --all --recurse-submodules --tags
git checkout tags/9.1.0
Then upgrade ghcup and do a cabal update.
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
cabal update
ghc --version
cabal --version
Note: make sure you have ghc 8.10.7 and cabal 3.8.1.0 before proceeding.
Build the node:
cd $HOME/git/cardano-node2
cabal configure -O0 -w ghc-8.10.7
cabal build cardano-node cardano-cli
As a note, if you are on Ubuntu 22.04, you will need to add a constraint to your cabal.project.local file to force it to use the right HsOpenSSL, i.e. constraints: HsOpenSSL ==0.11.7.2
Or something like this
cd $HOME/git/cardano-node2
cabal configure -O0 -w ghc-8.10.7
echo "constraints: HsOpenSSL ==0.11.7.2" >> cabal.project.local
cabal build cardano-node cardano-cli
Check cardano-cli and cardano-node that the build was successful:
$(./scripts/bin-path.sh cardano-node) version
$(./scripts/bin-path.sh cardano-cli) version
The cardano-node version should be 9.1.0 and cardano-cli is 9.2.1.0
Stop your node
sudo systemctl stop cardano-node
Then copy over the new executables
sudo cp -p "$(./scripts/bin-path.sh cardano-node)" /usr/local/bin/cardano-node
sudo cp -p "$(./scripts/bin-path.sh cardano-cli)" /usr/local/bin/cardano-cli
Again, check that successful version is reported:
cardano-node version
cardano-cli version
You need to download the new Conway Genesis file. You will also need to download the new node config files (different between BP and relay). Or, edit your current config with the new hash for the new Conway Genesis file.
Take note that if you download the new config file, it includes a “minNodeVersion” variable of 8.12.0, so you can’t mix it with older node versions.
Config files here:
https://book.world.dev.cardano.org/env-mainnet.html
Conway hash:
"ConwayGenesisFile": "conway-genesis.json",
"ConwayGenesisHash": "15a199f895e461ec0ffc6dd4e4028af28a492ab4e806d39cb674c88f7643ef62",
Then start your node.
sudo systemctl start cardano-node
Monitor the progress by either using gliveview or journalctl, and check if there’s any errors starting:
journalctl --unit=cardano-node --follow
Warning - if upgrading from 8.9.4 or earlier, this requires a full replay, so make sure you have many hours free for your relays or BP to work through it.
Then a quick clean up:
cd $HOME/git/
rm -rf cardano-node-old
mv cardano-node cardano-node-old
mv cardano-node2 cardano-node