Hi all,
Here’s another upgrade guide for 9.0.0 for Coincashew users.
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!
This guide has been written before the hardfork has been started, i.e. the Conway Genesis file isn’t in play yet. But there will be a new version, maybe 9.1.0 when it is hardfork time. Release Cardano Node 9.0.0 · IntersectMBO/cardano-node · GitHub
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.0.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.0.0 and cardano-cli is 9.0.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
There is no Conway Genesis file for 9.0.0 yet, so remove the two lines that refer to it in the config.json to allow the new build to start. Make sure you check your config file for the minNodeVersion variable and make sure your relays and BP are consistent and have the right versions.
"ConwayGenesisFile": "conway-genesis.json",
"ConwayGenesisHash": "de609b281cb3d8ae91a9d63a00c87092975612d603aa54c0f1c6a781e33d6e1e",
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
At the moment, gLiveView hasn’t been updated to work with 9.0.0, so if you want that to run that, there are a couple of work arounds. One is to use the env file from this branch, https://github.com/cardano-community/guild-operators/blob/mgu_v8.12.x/scripts/cnode-helper-scripts/env
Or, thanks to @ParadoxicalSphere, force the cardano-node to use a different config.json from gLiveView, as follows:
Download https://book.play.dev.cardano.org/environments-pre/mainnet/config.json and then customize the file as may be needed for the Cardano Node 9.0.0 instance.
Create a copy of the config.json created in step 1 in the same folder. Open the copy using a text editor, then add the following two lines, and then save and close the file:
“ConwayGenesisFile”: “conway-genesis.json”,
“ConwayGenesisHash”: “de609b281cb3d8ae91a9d63a00c87092975612d603aa54c0f1c6a781e33d6e1e”,
Download https://book.play.dev.cardano.org/environments/mainnet/conway-genesis.json to the same folder as the config.json file and config.json copy that you created in steps 1 and 2
Using the --config option in the cardano-node run command, set Cardano Node 9.0.0 to use the config.json file that you created in step 1
In the env file that gLiveView uses, edit the CONFIG user variable to use the copy of config.json that you created in step 2
Now both CN 9.0.0 and gLiveView v1.29.1 should start. Make any edits to config.json to both files. When either gLiveView is updated or a conway-genesis.json file is released for CN 9.x, set the CONFIG user variable back so that gLiveView uses the same config.json file as CN again.