UPDATE CARDANO NODE to 1.27.0 - FOR CNTOOLS users

Cardano Node 1.27.0

@LaurenceIO LaurenceIO released this 4 hours ago

Node version 1.27.0 provides important new functionality, including supporting new CLI commands that have been requested by stake pools, providing garbage collection metrics.
It includes the performance fixes for the epoch boundary calculation that were released in node version 1.26.2, plus a number of bug fixes and code improvements.
It also includes many fundamental changes that are needed to prepare for forthcoming feature releases (notably Plutus scripts in the Alonzo era).
Note that this release includes breaking changes to the API and CLI commands, and that compilation using GHC version 8.6.5 is no longer supported.


!!! AFTER UPDATE I SEE A MEMORY INCREASE (7G) so be sure u have enough memory before to UPDATE !!!

How to update to 1.27.0

bofore to start it’s better also to update the server

sudo apt-get update
sudo apt-get upgrade
sudo reboot 

UPDATE STEPS to 1.27.0

Few recommendation before to start:

  • perform a snapshot for server (if u have this option offered by your provider) before to start the update
  • update the Relays first (one by one)

==============================

BUILDING THE NODE

  • stop the 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.27.0


echo -e "package cardano-crypto-praos\n  flags: -external-libsodium-vrf" > cabal.project.local
$CNODE_HOME/scripts/cabal-build-all.sh

IF u are receiving this error when u are trying to build the node:

scripts/cabal-build-all.sh
Running cabal update to ensure you're on latest dependencies..
/opt/cardano/cnode/scripts/cabal-build-all.sh: line 20: cabal: command not found
Building..
/opt/cardano/cnode/scripts/cabal-build-all.sh: line 22: cabal: command not found

!!! The error is shown only when the cabal is missing, if u have cabal version 3.2.0.0 should work fine

  • check the cabal version
 cabal --version

Command 'cabal' not found, but can be installed with:
  • upgrade ghcup and cabal
ghcup install cabal 3.4.0.0
[ Warn  ] New GHCup version available: 0.1.14. To upgrade, run 'ghcup upgrade'
[ Warn  ] New GHC version available: 8.10.3. To upgrade, run 'ghcup install ghc 8.10.3'
[ Error ] No available Cabal version for 3.4.0.0
  • upgrade ghcup
ghcup upgrade
[ Info  ] Upgrading GHCup...
[ Info  ] downloading: https://downloads.haskell.org/~ghcup/0.1.14/x86_64-linux-ghcup-0.1.14
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20.1M  100 20.1M    0     0  37.3M      0 --:--:-- --:--:-- --:--:-- 37.2M
[ Info  ] verifying digest of: ghcup
[ Info  ] Successfully upgraded GHCup to version 0.1.14
  • try to build again the node, and if the error persist install cabal
ghcup install cabal 3.4.0.0
[ Warn  ] New GHCup version available: 0.1.14.1. To upgrade, run 'ghcup upgrade'
[ Warn  ] New GHC version available: 9.0.1. To upgrade, run 'ghcup install ghc 9.0.1'
[ Info  ] downloading: https://downloads.haskell.org/~cabal/cabal-install-3.4.0.0/cabal-install-3.4.0.0-x86_64-ubuntu-16.04.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3631k  100 3631k    0     0  12.9M      0 --:--:-- --:--:-- --:--:-- 12.9M
[ Info  ] verifying digest of: cabal-install-3.4.0.0-x86_64-ubuntu-16.04.tar.xz
[ Info  ] Unpacking: cabal-install-3.4.0.0-x86_64-ubuntu-16.04.tar.xz to /tmp/ghcup-JFAeAo
[ Info  ] Installing cabal
[ Info  ] Cabal installation successful
  • check cabal version
cabal --version
cabal-install version 3.4.0.0
compiled using version 3.4.0.0 of the Cabal library
  • try to build again the node (now should working - in my case it worked):
scripts/cabal-build-all.sh
Running cabal update to ensure you're on latest dependencies..
Cloning into '/home/x/git/cardano-node/dist-newstyle/src/Win32-net_-5b9448ed2f179086'...
HEAD is now at 94153b6 Fixed title of haddock page
Cloning into '/home/x/git/cardano-node/dist-newstyle/src/cardano-b_-c8db9876882556ed'...
HEAD is now at 47db5b8 Merge pull request #212 from input-output-hk/nfrisby/issue-205-time-conversions-in-EpochInfo
Cloning into '/home/x/git/cardano-node/dist-newstyle/src/cardano-c_-253fd88117badd8f'...
HEAD is now at f730793 Merge pull request #69 from newhoggy/add-ghc-8.6.5-and-8.10.2-to-ci
Cloning into '/home/x/git/cardano-node/dist-newstyle/src/cardano-l_-48e3a74bf8b61f34'...

  • enjoy the cafe, it will take more time (more than usual - 40 min);

  • check the version

cardano-node version
cardano-node 1.27.0 - linux-x86_64 - ghc-8.10
git rev 8fe46140a52810b6ca456be01d652ca08fe730bf

cardano-cli version
cardano-cli 1.27.0 - linux-x86_64 - ghc-8.10
git rev 8fe46140a52810b6ca456be01d652ca08fe730bf
  • start the node
sudo systemctl start cnode
  • check the status of the node
 sudo systemctl status cnode

● cnode.service - Cardano Node
   Loaded: loaded (/etc/systemd/system/cnode.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2021-05-13 16:10:55 CEST; 3min 21s ago
 Main PID: 21524 (cnode.sh)
    Tasks: 10 (limit: 4915)
   CGroup: /system.slice/cnode.service
           ├─21524 /bin/bash /opt/cardano/cnode/scripts/cnode.sh
  • start gLiveView
 ./gLiveView.sh

IF u see the error bellow just let the node to start/sync (it was offline more time)

Guild LiveView version check…
Looks like cardano-node is running with socket-path as /opt/cardano/cnode/sockets/node0.socket, but the actual socket file does not exist.
This could occur if the node hasnt completed startup or if a second instance of node startup was attempted!
If this does not resolve automatically in a few minutes, you might want to restart your node and try again.

ERROR: CNTools failed to load common env file
Please verify set values in ‘User Variables’ section in env file or log an issue on GitHub

if u type top u will see the CPU 100% - that means it’s working

after 10-15 minutes you should see:

image

You finished the upgrade successfully
All the best!

16 Likes

More or less that is what I did as well.

However, I had no issues with cabal or anything else.

1 Like

Yes I know, No one should have that error but I added the infos just in case

2 Likes

Thank you Alex, you are great!

1 Like

THX Alex! great as always

1 Like

@Alexd1985 for President :grinning_face_with_smiling_eyes::+1:
Thanks again mate.

1 Like

Thank you guys, anytime!

2 Likes

Thx!, I will be updating tonight.

1 Like

Hi Alex, is it ok using cabal 3.2.0.0 or do we need to upgrade to 3.4.? Thank you again, for what you doing!

It’s ok, that error is shown when the cabal is missing; I added the info; ty

1 Like

After the update on my first relay chrony seems to be less accurate?

image

Do you guys see the same thing? Or am I forgetting something? Have restarted the services.

Try to restart the chrony service

I did sudo systemctl restart chrony
also
sudo systemctl stop cnode
and
sudo systemctl restart cnode

I updated all relays and producer and not seeing anything unusual with chrony. Maybe try to remove and re-install chrony?

Just upgraded my second relay and there is no change in chrony behavior. Strange.

Can happen from time to time… both nodes are pointing to
The same ntp server?

Anyone else get a series of errors:

src/Cardano/Chain/UTxO/UTxO.hs: warning: [-Wmissed-specialisations]
Could not specialise imported function ‘Data.Map.Internal.$fEqMap_$c==’
when specialising ‘Data.Map.Internal.$fEqMap_$c/=’
Probable fix: add INLINABLE pragma on ‘Data.Map.Internal.$fEqMap_$c==’
etc…

In file included from cbits/private/ed25519_ref10_fe_25_5.h:3,
from cbits/private/ed25519_ref10.h:27,

             from cbits/convert.c:27:0: error: 

cbits/private/common.h:5:3: error:
warning: #warning *** This is unstable, untested, development code. [-Wcpp]
5 | # warning *** This is unstable, untested, development code.
| ^~~~~~~
|
5 | # warning *** This is unstable, untested, development code.
| ^

And this - a whole lot of those as well.

Both relays have the exact same conf file:

pool time.google.com iburst minpoll 2 maxpoll 2 maxsources 3 prefer
pool time.facebook.com iburst minpoll 2 maxpoll 2 maxsources 3 maxdelay 0.3
pool time.euro.apple.com iburst minpoll 2 maxpoll 2 maxsources 3 maxdelay 0.3
pool time.apple.com iburst minpoll 2 maxpoll 2 maxsources 3 maxdelay 0.3
pool ntp.ubuntu.com iburst minpoll 2 maxpoll 2 maxsources 3 maxdelay 0.3

The only difference is that one relay is in amsterdam (does not have this problem) and the other node is in singapore (has this problem)

And sudo systemctl status chrony returns some different Ip addresses:

Amsterdam node:
May 15 11:35:51 RelayNode1 chronyd[696]: Received KoD RATE from 91.189.91.157
May 15 11:35:53 RelayNode1 chronyd[696]: Received KoD RATE from 91.189.89.198
May 15 11:36:09 RelayNode1 chronyd[696]: Received KoD RATE from 91.189.89.199
May 15 11:36:20 RelayNode1 chronyd[696]: Received KoD RATE from 91.189.91.157
May 15 11:36:21 RelayNode1 chronyd[696]: Received KoD RATE from 91.189.89.198

Singapre node:
May 15 11:35:35 RelayNode1 chronyd[52556]: Received KoD RATE from 91.189.94.4
May 15 11:36:00 RelayNode1 chronyd[52556]: Received KoD RATE from 91.189.89.198
May 15 11:36:14 RelayNode1 chronyd[52556]: Received KoD RATE from 91.189.94.4
May 15 11:36:29 RelayNode1 chronyd[52556]: Received KoD RATE from 91.189.89.198
May 15 11:36:43 RelayNode1 chronyd[52556]: Received KoD RATE from 91.189.94.4

I had this issue with my relay from SUA

But it is ok, ~25 ms will not be an issue
My producer has ~15 sometimes and never missed a block ; what is under 1seconds it’s fine