I was missing Alex’s wonderful upgrade guide, so I’ve decided to write one up myself for version 1.33.0.
Although I have not used it, Alex has released a script for updating your nodes, which can be found here. This script has been met with positive response, and I’m sure he would like all the testing and feedback available.
I’m opting for the manual update process I am familiar with. I thought others may want to follow along.
Lets begin!
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 initialisation, and changes have been made to improve the handling of unexpected shutdowns when initialising 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 synchronisation 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
sudo apt update && sudo apt upgrade -y
sudo reboot
- Run prereqs.sh
cd ~/tmp
./prereqs.sh
- Update Cabal
cabal update
Building the Node 1.33.0
- Stop your node
sudo systemctl stop cnode
- Build the Node
cd ~/git
sudo rm -R cardano-node
git clone https://github.com/input-output-hk/cardano-node
cd cardano-node
git fetch --tags --all
git checkout 1.33.0
echo -e "package cardano-crypto-praos\n flags: -external-libsodium-vrf" > cabal.project.local
$CNODE_HOME/scripts/cabal-build-all.sh
At the end it should look like:
Copying cardano-topology to /home/user/.cabal/bin/
Copying trace-dispatcher-examples to /home/user/.cabal/bin/
Copying locli to /home/user/.cabal/bin/
Copying cardano-submit-api to /home/user/.cabal/bin/
Copying cardano-cli to /home/user/.cabal/bin/
Copying plutus-example to /home/user/.cabal/bin/
Copying create-script-context to /home/user/.cabal/bin/
Copying cardano-node to /home/user/.cabal/bin/
Copying cardano-node-chairman to /home/user/.cabal/bin/
Copying tx-generator to /home/user/.cabal/bin/
- Check your versions
cardano-node --version
cardano-node 1.33.0 - linux-x86_64 - ghc-8.10
git rev 814df2c146f5d56f8c35a681fe75e85b905aed5d
cardano-cli --version
cardano-cli 1.33.0 - linux-x86_64 - ghc-8.10
git rev 814df2c146f5d56f8c35a681fe75e85b905aed5d
Start the Node
- Restart the Node
sudo systemctl restart cnode
- The node will now replay the ledger. This may take most people 2 - 4 hours. During this time, gLiveView will show “starting.”
- After a few hours, my ledger was rebuilt and my node is ready to contribute to the chain!
Afterthoughts
This will only work for additional nodes after fully upgrading/starting a node
I was able to cut down on the time required to restart subsequent nodes by the following:
- Upgraded subsequent nodes to 1.33.0
- Before restarting cnode, I copied the newly synced /opt/cardano/cnode/db/ledger files from my fully synced relay to subsequent nodes.
- Restarted cnode, start time was reduced to about 10 mins
Thanks for reading along!