Like BlocksWell I was missing the excellent upgrade guides from Alexd1985 and DavidNC , so I’ve decided to write one up myself for version 1.33.0.
This guide was compiled from a combination of BlocksWell’s guide and David’s guide for 1.31.0, so thank you very much to both of these great contributors
You can find David’s guide for 1.31.0 here for Coincashew users:
If you are a CNTOOLS user, please check out BlocksWell’s guide here for 1.33.0:
If you are a CNTOOLS user and need to update to 1.32,1, please check out Alex’s guide here:
If you have additional questions, some of your answers could be found in the comments of these guides.
Ready to start? Let’s go!
Cardano Node 1.33.0
LaurenceIO released this yesterday
· 14 commits to master since this release
Cardano Node version 1.33.0 is a performance-focused release, bringing significant improvements in sync time, block propagation time, and reduced memory usage. Incremental stake aggregation and reward calculation allows much more uniform computation across the epoch, reducing the likelihood of spikes in CPU usage during the reward calculation period and so improving the consistency of block production.
In addition, more information is provided during node initialization, and changes have been made to improve the handling of unexpected shutdowns when initializing the node. DNS support for IPv6 has been added. Tracing has been provided for Plutus scripts, making it easier to debug failure conditions.
Breaking Changes
With this version, the ledger state will need to be replayed from the genesis block, meaning that the initial synchronization may be slow. Users should account for this when deploying the node.
** Note the Breaking Changes will require extra time for the initial synchronization. You’ll want to allow 2 - 4 hours for the ledger to sync. After you’ve completed the sync on 1 relay, it is possible to copy the ledger to subsequent nodes. This will decrease your sync time to around 10 mins/node after the initial node.
Prepare for Upgrade 1.33.0
- If available, create snapshots of your servers
- Upgrade a relay first!
- Update your server/OS
Update Instructions:
- Update and restart your instance:
sudo apt-get update && sudo apt-get upgrade -y && sudo reboot
- Download latest cardano-node git and checkout latest branch
cd $HOME/git
git clone https://github.com/input-output-hk/cardano-node.git cardano-node2
cd cardano-node2/
git fetch --all --recurse-submodules --tags
git checkout tags/1.33.0
Note: make sure you to have at least ghc 8.10.7 and cabal 3.4.0 before proceeding.
(There is a newer version of cabal 3.6.2.0 but I don’t think it’s required for this upgrade - cardano-node/install.md at master · input-output-hk/cardano-node · GitHub - I tested compiling with this version and all seems to be working correctly, but use at your own risk. I suggest to stick with 3.4.0 for this build if you are concerned.)
ghcup upgrade
ghcup install ghc 8.10.7
ghcup set ghc 8.10.7
ghcup install cabal 3.4.0.0
ghcup set cabal 3.4.0.0
cabal update
ghc --version
cabal --version
- Build the node.
cd $HOME/git/cardano-node2
cabal configure -O0 -w ghc-8.10.7
echo -e "package cardano-crypto-praos\n flags: -external-libsodium-vrf" > cabal.project.local
cabal build cardano-node cardano-cli
- Check
cardano-cli
andcardano-node
that the build was successful
$(find $HOME/git/cardano-node2/dist-newstyle/build -type f -name "cardano-cli") version
$(find $HOME/git/cardano-node2/dist-newstyle/build -type f -name "cardano-node") version
- If on 1.33.0, shut down the node and move the binaries to your bin
sudo systemctl stop cardano-node
sudo cp $(find $HOME/git/cardano-node2/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
- Check that successful version upgrades then start back up Cardano node
cardano-node version
cardano-cli version
sudo systemctl start cardano-node
- The node will now replay the ledger. This may take most people 2 - 4 hours. During this time, gLiveView will show “starting.”
- It takes a few hours to rebuild the ledger, so be ready for this!
- Clean up
cd $HOME/git/
rm -rf cardano-node-old
mv cardano-node cardano-node-old
mv cardano-node2 cardano-node
Monitor the progress by either using gliveview or journalctl
journalctl --unit=cardano-node --follow
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
sudo cp $(find $HOME/git/cardano-node2/dist-newstyle/build -type f -name "cardano-cli")
/media/usb
On the airgap - plug in USB to airgap and copy files to /usr/local/bin
sudo cp cardano-cli /usr/local/bin
Afterthoughts
This will only work for additional nodes after fully upgrading/starting a node
You can cut down on the time required to restart subsequent nodes by the following:
- Upgraded subsequent nodes to 1.33.0
- Before restarting cnode, copy the newly synced /opt/cardano/cnode/db/ledger files from a fully synced relay to subsequent nodes.
- Restarted cnode, start time is reduced to about 10 mins
Additional Help
If you are running into issues with your cabal or ghc versions being incorrect, your file path locations are likely different
To find out where your cabal, ghc, cardano-node, and cardano-cli are running from:
which cabal
which ghc
which cardano-node
which cardano-cli
To find the location of all files of the same type:
whereis cabal
whereis ghc
whereis cardano-node
whereis cardano-cli
Once you know where your files are stored, you can copy the new versions over to where they should be running from.
Good luck everyone, I hope you find this useful!
I may make a similar guide for 1.32.1 for Coincashew users if this is desired.