UPDATE CARDANO NODE to 1.29.0 - FOR CNTOOLS users

Cardano Node 1.29.0

@github-actions github-actions released this 2 hours ago

This release is an important update to the node that provides the functionality that is needed following the Alonzo hard fork.
All users, including stake pool operators, must upgrade to this version (or a later version) of the node.

The release includes features that will enable the use of the node in the Alonzo era, allowing the on-chain execution of Plutus scripts,
including extended CLI commands to support the construction of transactions that include Plutus scripts, datums and redeemers.
It incorporates several improvements, including a new transaction build command that calculates transaction fees and Plutus script execution units, and a new version of the query tip command that provides additional information, including node synchronisation progress. The transaction build command requires a local instance of the node in order to check Plutus script validity and to provide information that is used by the fee calculation. The Shelley specification has also been updated with respect to rewards calculation.

Note that this release changes the log format of traces configured by TraceChainSyncHeaderServer and TraceChainSyncClient . See #2746 for more detail.

When migrating to 1.29.0, SPOs need to make the following changes:

  • Download mainnet-alonzo-genesis.json file
  • Update mainnet-config.json file to include the following 2 lines:
  "AlonzoGenesisFile": "mainnet-alonzo-genesis.json",
  "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",

How to update to 1.29.0

!!! YOU MUST KNOW THAT 1.29.0 version will use ~8,1G RAM !!!

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

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


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

Download the mainnet-alonzo-genesis.json file and modify the config.json file

I saw that the prereqs.sh script was not updated for alonzo-genesis file so, we will need to download it manually;

Download the mainnet-alonzo-genesis.json file (for cntools I renamed the file to alonzo-genesis.json only and also the name should match with the filename from config.json file)

cd $CNODE_HOME/files or cd /opt/cardano/cnode/files
curl -sL -f -o alonzo-genesis.json https://hydra.iohk.io/job/Cardano/iohk-nix/cardano-deployment/latest-finished/download/1/mainnet-alonzo-genesis.json
chmod 755 alonzo-genesis.json
ls -l

Modify the config.json file

nano config.json

add the 2 lines inside the file (I added on top)

 "AlonzoGenesisFile": "/opt/cardano/cnode/files/alonzo-genesis.json",
 "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",

save the file

example:

{
 "AlonzoGenesisFile": "/opt/cardano/cnode/files/alonzo-genesis.json",
 "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
  "ApplicationName": "cardano-sl",
  "ApplicationVersion": 1,
  "ByronGenesisFile": "/opt/cardano/cnode/files/byron-genesis.json",
  "ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb",
  "LastKnownBlockVersion-Alt": 0,
  "LastKnownBlockVersion-Major": 3,
  "LastKnownBlockVersion-Minor": 0,
  "MaxKnownMajorProtocolVersion": 2,
  "Protocol": "Cardano",
  "RequiresNetworkMagic": "RequiresNoMagic",
  "ShelleyGenesisFile": "/opt/cardano/cnode/files/genesis.json",
  "ShelleyGenesisHash": "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81",
  "MaxConcurrencyDeadline": 4,
  "TraceBlockFetchClient": true,

START THE NODE

sudo systemctl start cnode

check the status and the revision (should be 4c59442)

sudo systemctl status cnode

 sudo systemctl status cnode
â—Ź cnode.service - Cardano Node
   Loaded: loaded (/etc/systemd/system/cnode.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2021-08-27 23:55:56 CEST; 10s ago
  Process: 20897 ExecStop=/bin/bash -l -c exec kill -2 $(ps -ef | grep [c]ardano-node.*./opt/cardano/cnode/ | tr -s ' ' | cut -d ' ' -f2) &>/dev/null (code=exited, status=0/SUCCESS)
 Main PID: 25368 (cnode.sh)
    Tasks: 10 (limit: 9830)
   CGroup: /system.slice/cnode.service
           ├─25368 /bin/bash /opt/cardano/cnode/scripts/cnode.sh
           └─25455 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/

Aug 27 23:55:56 r.net systemd[1]: Started Cardano Node.
Aug 27 23:55:56 .net cnode[25368]: WARN: A prior running Cardano node was not cleanly shutdown, socket file still exists. Cleaning up.
Aug 27 23:55:58 .net cnode[25368]: Listening on http://0.0.0.0:12798

image

that’s all!!

Thank you

30 Likes

properly updated like all time my friend Alex :slight_smile:

you do amazing job and all of the people know this.

everything works properly :wink:

Enjoy Alonzo guys,
TTS17Screenshot 2021-08-28 at 12.39.20 AM

6 Likes

thank you!!!

1 Like

Are you deliberately overwriting existing cabal.project.local?

Hello Alex:
Thank you very much for helping the community.
I followed the steps on a relay and the cnode service will not start, I have cntools and also ran and update for cncli and postgres
any ideas?
Thanks

type journalctl -e -f -u cnode

All relays and producer nodes updated to 1.29.0 :grin:

Thanks Alex :bowing_man:

2 Likes

I think i had a problem or its still compiling. my relay worked perfectly. I was updating / compiling the block and my internet disconnected/ dropped ssh. When I went back in I check cardano-node version and its still 1.27 and I have no idea how to check if its still compiling or if I should start over.

You will need to start again but also u can copy the bin file from updated node to this one… should be located to cd /.cabal/bin folder

Can you explain this better?

Aa ok, I thought u already updated one node succesfully :slight_smile: sorry … rebuild the node again if the ssh disconected… if u will want to not have this issue run the commands on tmux terminal

1 Like

Yes I did build 1 node succesfully, so copy the cardano-node / cli to my block?

Exactly, check on the updates node which files from bin folder where updated (check the date) and just copy those files to producer
Should work

So should I just copy everything in the cabal folder?

image

I copied everything in the .cabal folder

I have a feeling im going to still have this infinite starting loop

But the node shows tx processed, peers, etc

1 Like

I figured it out, its because I changed my max peers in topologyUpdater from 15-22 it put it into an endless loop, its working now.

2 Likes

Hey Alex and all,
I just wanted to add a tip to this Alex’s excellent article.

Instead of these two lines…

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

You should use the following single line with the switch at the end. The CNTools shell script overwrites the work that gets done with the echo line but the switch at the end of the line causes the script to add the work before building…

$CNODE_HOME/scripts/cabal-build-all.sh -l

Hope that helps someone.

2 Likes

1.29.0 passed Q&A for mainnet? or is it still approved for just testnet only so far?

Yeah 1.29.0 is only testnet for now, QA engineer and Release Manager needs to approve.

2 Likes

Will be tonight, updated, blocks are coming… so far so good