UPDATE CARDANO NODE to 1.31.0 - FOR CNTOOLS users

Cardano Node 1.31.0

Latest

Cardano node version 1.31.0 introduces a number of new features and provides performance improvements, including
reducing default logging information, and optimising memory and time behaviour. It also provides support for improved rewards logging in db-sync, includes a new CLI command to query stake pools, enhances the transaction build CLI command, fixes an issue where connections were dropped when using query tip , and provides various other CLI enhancements. It allows signatures to be specified when spending from pre-Plutus time-lock/multi-signature scripts, improves error logging for Plutus scripts, adds new logging modes, allows the size of the mempool to be configured, provides support for multiple versions of Plutus, and improves networking behaviour and robustness.
It is recommended that all users upgrade to this new version.

Breaking Changes

  • Update min utxo calculation cli command #3181
    calculate-min-req-utxo requires a transaction output ( TxOut era ) instead of a Value in order to calculate the min required UTxO in the Alonzo era. This is required in the Alonzo era, and the change is made everywhere for consistency.

Technical Specification

Minimum System Requirements

  • An Intel or AMD x86 processor with two or more cores, at 1.6GHz or faster (2GHz or faster for a stake pool or relay)
  • 12GB of RAM
  • 20GB of free storage

if your servers have only 8G of RAM you can configure the SWAP file

free -m

image

next command will alocate 3G for SWAP file (you can configure what value you want - just replace 3G with your needs)

sudo fallocate -l 3G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

now to make it permanently type
sudo nano /etc/fstab

and add to the end, as a new line
/swapfile swap swap defaults 0 0
save the file (Ctrl + x then Y then ENTER)

check if the configuration was successfully

free -m

image

How to update to 1.31.0

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

sudo apt-get update
sudo apt-get upgrade
sudo reboot 
  • 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.31.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 you should see:

Copying unit to /home/user/.cabal/bin/
Copying cardano-topology to /home/user/.cabal/bin/
Copying locli to /home/user/.cabal/bin/
Copying cardano-submit-api to /home/user/.cabal/bin/
Copying plutus-example to /home/user/.cabal/bin/
Copying cardano-cli 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/
:~/git/cardano-node$

this time it took ~60 minutes (a lot of things were compiled) :slight_smile:

START THE NODE

sudo systemctl start cnode
/git/cardano-node$ sudo systemctl status cnode
 Loaded: loaded (/etc/systemd/system/cnode.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2021-11-10 19:44:32 CET; 58s ago
 Main PID: 53871 (cnode.sh)
    Tasks: 10 (limit: 4915)
   CGroup: /system.slice/cnode.service
           ├─53871 /bin/bash /opt/cardano/cnode/scripts/cnode.sh
           └─53968 cardano-node run --topology /opt/cardano/cnode/files/topology.json --config /opt/cardano/cnode/files/config.json --database-path /opt/cardano/cnode/db --socket-path /opt/

Nov 10 19:44:32 vmi438734.contaboserver.net systemd[1]: Started Cardano Node.
Nov 10 19:44:33 vmi438734.contaboserver.net cnode[53871]: WARN: A prior running Cardano node was not cleanly shutdown, socket file still exists. Cleaning up.
Nov 10 19:44:34 vmi438734.contaboserver.net cnode[53871]: Node configuration: NodeConfiguration {ncNodeIPv4Addr = Just 0.0.0.0, ncNodeIPv6Addr = Nothing, ncNodePortNumber = Just 6000, ncCon
lines 1-12/12 (END)

check the status and the revision number, should be 2cbe363874d0261bc62f52185cf23ed492cf4859

438734:~/git/cardano-node$ cardano-node --version
cardano-node 1.31.0 - linux-x86_64 - ghc-8.10
git rev 2cbe363874d0261bc62f52185cf23ed492cf4859

i438734:~/git/cardano-node$ cardano-cli --version
cardano-cli 1.31.0 - linux-x86_64 - ghc-8.10
git rev 2cbe363874d0261bc62f52185cf23ed492cf4859

image

Thank you,

17 Likes

as usual,
we are upgraded :wink:

Enjoy Cardano Network mate

2 Likes

A dumb question, is this 12GB RAM minimum requirement for all servers (Producer and Relay) or just Producer?

I have 3 Relays and 2 of them only have 8GB of RAM…

Thank you…

Same RAM usage as 1.30.1

2 Likes

What changes to this process are required for coincashew guide followers? (No CNtools scripts)

Should be same steps as the last one but replace 1.30.1 with 1.31.0

Thanks again Alexandru! I will update the relays and BP today!:slight_smile: – on another note we are Live and discoverable through daedalus and yoroi (STLL) !! Thankyou for all your tips and support. I need to learn the ropes of building/sending transactions and general pool maintenance/automation and do some marketing to try and to attract some delegators.

1 Like

Since I just found out: don’t forget to update mainnet-config.json for the new version:

wget -N https://hydra.iohk.io/build/7654130/download/1/mainnet-config.json

hmmm, where did u found this info?

Is there a difference, are you sure?

as far as I know should not be, perhaps something for metrics but I am not aware of this

1 Like

diff mainnet-config.json backup/mainnet-config.json
16d15
< “TraceAcceptPolicy”: true,
18c17
< “TraceBlockFetchDecisions”: false,

“TraceBlockFetchDecisions”: true,
27d25
< “TraceConnectionManager”: true,
30d27
< “TraceDiffusionInitialization”: true,
34d30
< “TraceInboundGovernor”: true,
36d31
< “TraceLedgerPeers”: true,
40d34
< “TraceLocalRootPeers”: true,
45,48d38
< “TracePeerSelection”: true,
< “TracePeerSelectionActions”: true,
< “TracePublicRootPeers”: true,
< “TraceServer”: true,

hmmmm… I will check… but should not be a problem if u don’t have it

created an updated version for simplicity:

let me know if anyone needs any help :slight_smile:

Hey there,

i got my relays without any problem up to date but on my BP after the update it still shows version 1.30.1
Update went thru without any errors and the node startet with any errors after that.

jurnalctl shows no errors.

Edit:
Just found out why. and i dont know why is it how it is. It was not a problem before
i needed to uncheck in the env.

CNODEBIN="${HOME}/.cabal/bin/cardano-node"
CCLI="${HOME}/.cabal/bin/cardano-cli"
CNCLI="${HOME}/.cargo/bin/cncli"

that means the automatic detection detects another node there?

cardano-node --version
cardano-node 1.30.1 - linux-x86_64 - ghc-8.10
git rev 0fb43f4e3da8b225f4f86557aed90a183981a64f

in gLiveView it is version 1.31.0

Type which cardano-node

It’s possible to have the old version here

cd /usr/local/bin
ls -l

and the new version here

cd ${HOME}/.cabal/bin/
ls -l

Or viceversa, check the date of the files (cardano-node and cardano-cli)

yes you are right old version is there. Should be no problem because the env use the cabal path or should i delete the old one?

Delete the old files then add back # (comment inside env fie)
restart the node and check again

runs fine now after delete the old one and rebooting.

–version shows the newest with the new revision number

thank you :slight_smile:

1 Like

You are welcome :beers: