Update Cardano Node to 1.33.0 - for Coincashew users

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 :pray:

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

Latest

@LaurenceIO LaurenceIO released this yesterday

· 14 commits to master since this release

1.33.0

814df2c

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:

  1. Update and restart your instance:
sudo apt-get update && sudo apt-get upgrade -y && sudo reboot
  1. 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
  1. 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
  1. Check cardano-cli and cardano-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
  1. 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
  1. 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.”

1.33.0starting

  • It takes a few hours to rebuild the ledger, so be ready for this!

running1.33.0

  1. 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! :slightly_smiling_face:

I may make a similar guide for 1.32.1 for Coincashew users if this is desired.

10 Likes

Thank you @Gaia-Stake-Pool for your contribution. Amazing!

About ghc version, there is reference of version 8.10.7 here: cardano-node/install.md at master · input-output-hk/cardano-node · GitHub

Do you use 8.10.4 version for any special reason?

Thanks a lot for your time!

2 Likes

You’re welcome Ma-xi , happy to help :slightly_smiling_face:

No special reason, I actually didn’t see reference of this in the guide from BlocksWell or in the Cardano node 1.33.0 release notes, so that’s why I missed it :laughing:

I’ll update the guide to include this change, thank you very much for mentioning this!:pray:

Thanks again @Gaia-Stake-Pool, tomorrow I will use this guide for update my nodes. :+1:t4:

1 Like

Thanks for the guide. Handy.

Just a minor issue with the command to copy binaries to bin. The line for the cardano-node binary is missing “/usr/local/bin/cardano-node” at the end.

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”)

You’re welcome, glad this was helpful MnMCharityPool_0pct!

Sorry about that, I must have missed pasting that part in, my mistake :laughing:

Thanks for letting me know, I’ve updated the code :pray:

Thanks @Gaia-Stake-Pool :pray:

2 Likes

Thank you!!

1 Like

This worked perfectly! Thank you @Gaia-Stake-Pool

1 Like

You’re welcome TranCuong!

1 Like

You’re welcome BlocksWell!

You’re welcome StakeWithPride , glad this worked well!

Could you share some suggestions please, I am able to update Relay sing these commands but BP refuses to pick up 1.33.0 and always reverts back to 1.32.1.

Running:-

echo’s out 1.33.0

but after stopping node and running:-

it comes back to 1.32.1 repeated process several times from beginning deleting cardano-node2 directory each time same results, even tried deleting cli & node from /usr/local/bin but still gets replaced with 1.32.1.

Any suggestions would be helpful thank you

Did you do step 5. between the two you are quoting?

yes ran stop and status to make sure node was shut down

What do

which cardano-cli
which cardano-node

say?

1.32.1 I’m presuming something is failing during copy over to usr/local/bin but because i’m not getting any messages I can’t think what it is.

If you even deleted the ones in /usr/local/bin you probably have binaries of them somewhere else that get used before the copied ones.

…, which means you probably were not following the Coincashew guide when setting up the machine or did something else in between.

which should give you a full path of the binary that gets executed, when you run cardano-cli/cardano-node.

Either you do as @Gaia-Stake-Pool said or you just remove them, so that the ones in /usr/local/bin get picked up instead (and the next update goes more smoothly, because they are, where the guide thinks they are).

Yeah, you may have your 1.33.0 files stored in a different place. If you use:

whereis cardano-node
whereis cardano-cli

You can see where all cardano-node and cardano-cli files are located. Then you can manually copy over the new ones to where your cardano-node and cardano-cli are running from:

which cardano-node
which cardano-cli

Sometimes you may need to use “sudo” before your copy command depending on your write permissions.

1 Like

Thank you all for your help, looks like the location did move on the last upgrade to a new location when I followed one from Alex and I didn’t catch it.

But successful this time

2 Likes