Upgrade to 8.9.0 for Coincashew users

Hi all,

Here’s another quick upgrade guide for 8.9.0 for Coincashew users. Especially those with older Coincashew installs.

There’s a bunch of new things with this version, but it still isn’t a hard fork, so not compulsory.

It does fix an issue that has been occuring where blocks from the future are causing height battles, so it is worth updating.

Update Instructions:

Update your instance:

sudo apt-get update && sudo apt-get upgrade

If you are upgrading from 8.1.2 or earlier, you need to install blst. If you already did this for 8.7.3, you can skip this.

cd $HOME/git
git clone https://github.com/supranational/blst
cd blst
git checkout v0.3.10
./build.sh
cat > libblst.pc << EOF
prefix=/usr/local
exec_prefix=\${prefix}
libdir=\${exec_prefix}/lib
includedir=\${prefix}/include

Name: libblst
Description: Multilingual BLS12-381 signature library
URL: https://github.com/supranational/blst
Version: 0.3.10
Cflags: -I\${includedir}
Libs: -L\${libdir} -lblst
EOF
sudo cp libblst.pc /usr/local/lib/pkgconfig/
sudo cp bindings/blst_aux.h bindings/blst.h bindings/blst.hpp /usr/local/include/
sudo cp libblst.a /usr/local/lib
sudo chmod u=rw,go=r /usr/local/{lib/{libblst.a,pkgconfig/libblst.pc},include/{blst.{h,hpp},blst_aux.h}}

Download latest cardano-node git and checkout latest branch:

cd $HOME/git
git clone https://github.com/IntersectMBO/cardano-node.git cardano-node2
cd cardano-node2/
git fetch --all --recurse-submodules --tags
git checkout tags/8.9.0

Then upgrade ghcup and do a cabal update.

ghcup upgrade
ghcup install ghc 8.10.7
ghcup set ghc 8.10.7
ghcup install cabal 3.8.1.0
ghcup set cabal 3.8.1.0
cabal update
ghc --version
cabal --version

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

Build the node:

cd $HOME/git/cardano-node2
cabal configure -O0 -w ghc-8.10.7
cabal build cardano-node cardano-cli

The build 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

The cardano-node version should be 8.9.0 and cardano-cli is 8.20.3.0 (previous versions had cardano-node and cardano-cli at the same tag but now they’re different for some reason.

Stop your node

sudo systemctl stop cardano-node

Then copy over the new executables

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 is reported:

cardano-node version
cardano-cli version

You also need to download the new Conway Genesis file again (Environments - The Cardano Operations Book ) and it is a good idea to update the config.json file.

Note that p2p is enabled by default in the config.json, TraceMux is also false by default. If you used an older Coincashew guide your config files might be “mainnet-byron-genesis.json” etc, so make sure you update the new config.json file accordingly.

Then start your node.

sudo systemctl start cardano-node

Monitor the progress by either using gliveview or journalctl, and check if there’s any errors starting:

journalctl --unit=cardano-node --follow

Then a quick clean up:

cd $HOME/git/
rm -rf cardano-node-old
mv cardano-node cardano-node-old
mv cardano-node2 cardano-node
9 Likes

Thank you for posting this!

2 Likes

Hi, I’m following your update guide but got stuck on the ghcup and cabal update part:

cardano@vmi1140775:/$ ghcup upgrade
ghcup: Most RTS options are disabled. Link with -rtsopts to enable them.
cardano@vmi1140775:/$ ghcup install ghc 8.10.7
ghcup: Most RTS options are disabled. Link with -rtsopts to enable them.
cardano@vmi1140775:/$ ghcup set ghc 8.10.7
ghcup: Most RTS options are disabled. Link with -rtsopts to enable them.
cardano@vmi1140775:/$ ghcup install cabal 3.8.1.0
ghcup: Most RTS options are disabled. Link with -rtsopts to enable them.
cardano@vmi1140775:/$ ghcup set cabal 3.8.1.0
ghcup: Most RTS options are disabled. Link with -rtsopts to enable them.
cardano@vmi1140775:/$ cabal update
/dist-newstyle: createDirectory: permission denied (Permission denied)
cardano@vmi1140775:/$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.7
cardano@vmi1140775:/$ cabal --version
cabal-install version 3.8.1.0
compiled using version 3.8.1.0 of the Cabal library 

Not sure how to set these RTS options?
I tried the following in the command line without success:

ghcup upgrade -rtsopts[=all]

I think you can also set those variables also in the config files for cabal. Not sure how :frowning:

Also the following happens when only trying to update cabal or when trying to build the node with the guide from above:

cardano@vmi1140775:~/cardano-my-node$ cabal update
Warning: cannot determine version of
/home/cardano/.ghcup/ghc/8.10.7/bin/ghc-pkg-8.10.7 :
""
Error: cabal: The program 'ghc-pkg' is required but the version of
/home/cardano/.ghcup/ghc/8.10.7/bin/ghc-pkg-8.10.7 could not be determined.

I checked the location and seems to exist?

cardano@vmi1140775:~/.ghcup/ghc/8.10.7/bin$ ls
ghc         ghc-pkg         ghci         haddock             hp2ps  hsc2hs  runghc-8.10.7
ghc-8.10.7  ghc-pkg-8.10.7  ghci-8.10.7  haddock-ghc-8.10.7  hpc    runghc  runhaskell

Since the problem relates more to Haskell, I posted the question on this forum and solved it by the help of the community. This is the post:

https://discourse.haskell.org/t/enabling-rts-options-on-linux/9185

Regards,

1 Like

Upgrading from 8.7.3 to 8.9.1

Thanks for posting this @jeremyisme

I’ve reused this 8-9 times to remind me what was missing each time I upgraded a relay.

That Conway Genesis file got me a few times, even though I knew I had to upgrade it.

1 Like

Thanks Peter.

I also use them myself for each relay that I upgrade. I can just roll through each step.

Ah, good to know. Thanks

I’ve edited this to remove the external libsodium reference, as discussed here. Some thoughts concerning the node build process

1 Like

Hi Jeremyisme

Thanks for the tutorial. I have upgraded Block Producer and 2 relays, 1 P2P and 1, not P2P. But my Total Tx and Pending Tx is 0? Any ideas on this?

image

1 Like

If you downloaded the new config.json, then Tracemempool is false by default, so you need to change that to true to see the transaction count.

After Updating from 8.1.1 to 8.9.0

~/cardano-node# cardano-cli --version
cardano-cli 8.20.3.0 - linux-x86_64 - ghc-8.10
git rev 0d98405a60d57e1c8e13406d51cce0e34356bd64

~/cardano-node# cardano-node --version
cardano-node 8.9.0 - linux-x86_64 - ghc-8.10
git rev 0d98405a60d57e1c8e13406d51cce0e34356bd64

I get this error when running

~/cardano-node# cardano-cli query utxo \

–address addrxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
–mainnet > fullUtxo.out
MuxError MuxBearerClosed “<socket: 11> closed when reading data, waiting on next header True”
cardano-cli: MuxBearerClosed “<socket: 11> closed when reading data, waiting on next header True”

Hmm, not sure. I just ran it on my setup (8.9.1) and it runs as expected.

I fixed this, but I am updating the format of the topo file for p2p and legacy nodes.

How did you fix it?

I spoke too soon, and this issue is not resolved. cardano-cli query utxo can’t find socket

What do you get when you run “which cardano-cli”? Maybe there’s anothe exectuable floating around that isn’t working right.

3-2276:~/cardano-node# which cardano-cli
/usr/local/bin/cardano-cli

And still running/reporting 8.9.0?

cardano-node 8.9.0 - linux-x86_64 - ghc-8.10
git rev 0d98405a60d57e1c8e13406d51cce0e34356bd64

cardano-cli 8.20.3.0 - linux-x86_64 - ghc-8.10
git rev 0d98405a60d57e1c8e13406d51cce0e34356bd64

When looking back at your earlier version, I noticed this line is missing from the build command for 8.9.0. I went from 1.35.7 to 8.9.0

echo -e “package cardano-crypto-praos\n flags: -external-libsodium-vrf” >> cabal.project.local

We don’t need to use that flag anymore. My last build didn’t use it and my command is still working correctly.

Can you check your node status? Make sure it is synced?

Is there a node.socket file in the relevant folder? Or node0.socket