Hello! This is my guide for upgrading a node with the pre-compiled hyrdra binaries. Although many prefer to compile their own binaries on at least one node, this method is much faster than compiling your own binaries. I personally believe its best practice to have a few options for upgrading in your tool box. You can also adjust this boilerplate to use it with future upgrades and different node configurations.
- Lets start by updating and rebooting our system. Now is also a good time to create/update server snapshots if you are able.
sudo apt update && sudo apt upgrade -y
sudo reboot
- After our restart, we are ready to fetch and run the most recent version of prereqs.sh
cd ~/tmp
rm prereqs.sh
curl -sS -o prereqs.sh https://raw.githubusercontent.com/cardano-community/guild-operators/master/scripts/cnode-helper-scripts/prereqs.sh
chmod 755 prereqs.sh
./prereqs.sh
. “${HOME}/.bashrc”
- Then we clear and create a file structure for downloading and unpacking the hydra binaries.
rm -r ~/.cabal/hydra-binaries
mkdir ~/.cabal/hydra-binaries
cd ~/.cabal/hydra-binaries
-
Now, open a browser, and navigate to IOHK’s cardano node’s release page: Releases · input-output-hk/cardano-node · GitHub
-
Confirm that you are on the correct release, and scroll down to the “Downloads” section. From there, select “Hydra binaries.”
- Select the correct binary package for you. I am seeking to upgrade to cardano-node 1.35.3 on linux, so I select “cardano-node-1.35.3-linux”
- On the next page, click the “Details” button and copy the URL for the binary distribution tar file.
- Switch back to your terminal, and use this URL to wget the binaries.
wget https://hydra.iohk.io/build/17428010/download/1/cardano-node-1.35.3-linux.tar.gz
- Unpackage the download
tar -xzvf cardano-node-1.35.3-linux.tar.gz
- Remove the download. I am also removing the configuration files, as I already have them.
rm cardano-node-1.35.3-linux.tar.gz
rm -r configuration/
- We are now ready to stop the node. Confirm that the node is stopped.
sudo systemctl stop cnode
sudo systemctl status cnode
- Copy the new binaries over to ~/.cabal/bin/ (Our working directory is ~/.cabal/hydra-binaries)
cp ./* ~/.cabal/bin/
(If you get the error here: “cp: cannot create regular file ‘~/.cabal/bin/cardano-submit-api’: Text file busy” then run the command:
sudo systemctl stop cnode-submit-api
and try again to copy the binaries. You can restart the submit api after restarting the node later.)
- Now check to confirm you have the correct version of the node and cli installed
cardano-cli --version
cardano-node --version
- Due to some minor updates handling node restarts, we need to redeploy our node as a system service.
cd $CNODE_HOME/scripts
./cnode.sh -d
- You are now ready to restart your node! Confirm that your node has started.
sudo systemctl restart cnode
sudo systemctl status cnode
- You can watch the node’s status in gLiveView
cd $CNODE_HOME/scripts
./gLiveView.sh
- The inital startup with 1.35.3 can take over 4 hours. On subsequent nodes, this startup time can be reduced to around 4 minutes by copying your DB folder from fully upgraded/started nodes. You could also decrease start times by downloading a fresh snapshot from https://csnapshots.io/