Upgrade to 1.35.5 for Coincashew users

Hi all,

Here’s an upgrade guide for 1.35.5 for Coincashew users. You should be running this version now, as it provides a fix for a transaction issue that can crash some nodes.

Credit to @Gaia-Stake-Pool as I copied his last one and just amended it. It’s a straight forward upgrade from 1.35.4, but if you’re upgrading from an earlier version (you shouldn’t be running anything earlier now!), there are a few more steps.

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.35.5

Note: make sure you have ghc 8.10.7 and cabal before proceeding.

(There is a newer version of ghc 9.2.2 but it does not work for this version of Cardano Node, so do not upgrade to this version of ghc.)

ghcup upgrade
ghcup install ghc 8.10.7
ghcup set ghc 8.10.7
ghcup install cabal
ghcup set cabal
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

This upgrade takes about 20 minutes.

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

If it shows 1.35.5, you can 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

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


What are your cabal.project.local settings?

The default ones for me are:

ignore-project: False
with-compiler: ghc-8.10.7
optimization: False
package cardano-crypto-praos
 flags: -external-libsodium-vrf

Do you further tweak those for a production build? Asking as those settings seemingly will not optimize the binary so the end result is a larger executable and maybe a slower one…

Asking as from other threads people seem to use additional flags to slim down the executable and probably make it more cpu and memory efficient:

split-sections: True
executable-stripping: True
library-stripping: True
optimization: True

Has anyone seen anything about those flags in the docs? I tried looking up the official build pipelines, in case those are publicly available, to get the configs from there but w/o success.

I’ll give that settings a try. Let’s see how they work.

after upgraded when I try gliveview.sh it gives me this error and I can’t open gliveview. How do I solve this? Thank you


The official guide doesn’t mention those flags, only the external-libsodium-vrf and to force it to use ghc-8.10.7

What does journalctl --unit=cardano-node --follow show?

Yes. If you compare the official binaries those are few times smaller than what gets produced by the default config.

It shows the logs for the cardano-node systemd unit. It’s the configuration that starts the node automatically after a restart. The CoinCashew guide names the unit like this. The follow flag means show new log lines as they come in.

@mcrio my responses were meant to help @Zen_Inv (I know what journalctl does… :wink:)

@jeremyisme hehe sorry I see now :grinning: I guess I was reading too fast

1 Like

Thanks for the guide, works great.

1 Like

I have been using those settings for a while now too. I pass them to cabal configure as follows:

cabal configure --with-compiler=ghc-8.10.7 --enable-optimization --enable-split-sections --enable-executable-stripping --enable-library-stripping

My cabal.project.local has the following:

ignore-project: False
with-compiler: ghc-8.10.7
split-sections: True
executable-stripping: True
library-stripping: True
optimization: True
package cardano-crypto-praos
  flags: -external-libsodium-vrf

package trace-dispatcher
  ghc-options: -Wwarn

  type: git
  location: https://github.com/input-output-hk/bech32
  tag: v1.1.2

  type: git
  location: https://github.com/input-output-hk/hjsonpointer
  tag: bb99294424e0c5b3c2942c743b545e4b01c12ce8

  type: git
  location: https://github.com/input-output-hk/hjsonschema
  tag: 1546af7fc267d5eea805ef223dd2b59ac120b784

  type: git
  location: https://github.com/haskell-works/hw-aeson
  tag: d99d2f3e39a287607418ae605b132a3deb2b753f

  type: git
  location: https://github.com/input-output-hk/cardano-addresses
  tag: 3.12.0


Better still, build the software into a deb package and have your package manager do what it was designed for.

1 Like

Thanks @Terminada I wonder if those flags are documented somewhere in the Cardano Node repo, or better if there might be insights into the production build pipeline where we can see what configuration is being used by the team to build the final binaries.

1 Like

I got them from the GHC documentation. Another thing I do is build with -O2 switch but maybe it is worth trying some of the additional optimisations???: Performance/GHC - HaskellWiki

I don’t know how much benefit I get with these compile switches. I don’t know much about any of this but I am trying to learn to program in Haskell at present by following a university subject. One of the assignments I did involved quite a bit of memory use and compiling this with -O2 switch produced a significantly faster executable.

The critical thing I am worried about is missed slot leader checks and I don’t know specifically what the critical code is for that and therefore don’t know what optimisations are likely to work. I understand that the missed slot leader checks are caused by memory remapping associated with ghc garbage collection. I don’t even know if any or all of those optimisations actually affect ghc garbage collection much. I enabled them because I couldn’t see any likely problems from them aside from increased compilation time.

I still run my block producer with: +RTS -N --nonmoving-gc -RTS
because that is the only thing I found reliably eliminated missed slot leader checks for my low power machines. However, the downside is that I have to restart my bp every day or so. If I don’t restart often then the memory usage gradually increases because ghc version 8.10.7 nonmoving gc doesn’t result in garbage collected memory being released back to the OS. Apparently this ghc problem is fixed in version 9.2 but you can’t compile the cardano-node with that version or later. Arrgh! However, I see that there are plans to move to compiling cardano-node with ghc 9.2 (or maybe 9.4?) on the horizon, but who knows when?


Most likely the build wasn’t successful. Were there any errors after the build line?

Thanks! Good Guide!

1 Like

thx for posting!
iam having trouble with:

$(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

is syntax correct? what is “version”

Yes, that is a command that cardano-cli and cardano-node have to report their respestive versions. If the find command isn’t finding cardano-cli or cardano-node they probably weren’t built.

Did you have any errors after the build command?

d@bpid:~/git/cardano-node2$ cabal build cardano-node cardano-cli
Warning: The package list for 'cardano-haskell-packages' is 26 days old.
Run 'cabal update' to get the latest list of available packages.
Warning: Requested index-state 2023-01-26T18:00:00Z is newer than
'cardano-haskell-packages'! Falling back to older state
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: cardano-api-1.35.5 (user goal)
[__1] next goal: cardano-data (dependency of cardano-api)
[__1] rejecting: cardano-data-, cardano-data-,
cardano-data- (constraint from project config
/home/d/git/cardano-node2/cabal.project requires ==
[__1] fail (backjumping, conflict set: cardano-api, cardano-data)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: cardano-api, cardano-data

i think it did?
also, i downloaded chain image.
upon sync and reorg…it seems to have lots of failures. hmmm

Did you do the cabal update command?