UPGRADE CARDANO NODE to 1.29.0 - COINCASHEW users

Thanks to @Alexd1985 for his upgrade note for CNTools users.
Here is a quick how-to note for CoinCashew fellas to upgrade to 1.29.0.

This 1.29.0 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.

IMPORTANT: As usual, don’t forget to backup your nodes before starting these updates.

STEP 1 - Clone the latest source and checkout the branch 1.29.0

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

STEP 2 - Make sure to have at least ghc 8.10.4 and cabal 3.4.0.0

ghcup upgrade
ghcup install ghc 8.10.4
ghcup set ghc 8.10.4
ghc --version
ghcup install cabal 3.4.0.0
ghcup set cabal 3.4.0.0
cabal --version
cabal update

STEP 3 - Configure & Compile

cd $HOME/git/cardano-node2
cabal configure -O0 -w ghc-8.10.4
echo -e "package cardano-crypto-praos\n flags: -external-libsodium-vrf" > cabal.project.local
cabal build cardano-node cardano-cli

Now make sure that your version of your freshly built cardano-cli and cardano-node is correct (1.29.0):

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

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

cd $NODE_HOME
wget https://hydra.iohk.io/job/Cardano/iohk-nix/cardano-deployment/latest-finished/download/1/mainnet-alonzo-genesis.json
chmod 755 mainnet-alonzo-genesis.json

Edit the mainnet-config.json

nano mainnet-config.json

and add these 2 lines in it

  "AlonzoGenesisFile": "mainnet-alonzo-genesis.json",
  "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",

for example:

{
  "AlonzoGenesisFile": "mainnet-alonzo-genesis.json",
  "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
  "ApplicationName": "cardano-sl",
  "ApplicationVersion": 1,
  "ByronGenesisFile": "mainnet-byron-genesis.json",
  "ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb",
  "LastKnownBlockVersion-Alt": 0,
  "LastKnownBlockVersion-Major": 3,
  "LastKnownBlockVersion-Minor": 0,
  "MaxKnownMajorProtocolVersion": 2,
  "Protocol": "Cardano",
  "RequiresNetworkMagic": "RequiresNoMagic",
  "ShelleyGenesisFile": "mainnet-shelley-genesis.json",
  "ShelleyGenesisHash": "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81",
[...]

STEP 5 - Shut your node down, replace your old binaries with the new ones in your bin folder and start your node again

Stop the node

sudo systemctl stop cardano-node

Replace old binaries with the new ones

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

Double check the version

cardano-node version
cardano-cli version

Start your node again

sudo systemctl start cardano-node

Check the logs:

journalctl --unit=cardano-node --follow 

Now clean your mess

cd $HOME/git/
mv cardano-node cardano-node-old
mv cardano-node2 cardano-node

Alonzo is almost here guys :slight_smile:
Cheers!

11 Likes

thanks for the post/guide! :raised_hands:

1 Like

You’re welcome mate. :sunglasses:

Thanks for this. Just a stupid question? No specific file to edit for the tesnet? Thanks!

1 Like

Well if you want to configure your cardano node for the testnet, you should download the official testnet config files here (testnet line) : https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/index.html

Same thing for mainnet, you should have these lines in your testnet-config.json file:

  "AlonzoGenesisFile": "testnet-alonzo-genesis.json",
  "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",

Does it answer to your question?

Thanks a lot baocontact.

Yes it answer and it’s exactly what I did yesterday evening and I forgot to update this post.
Thanks again!
(I have noticed my testnet node is still having a delay to sync though, don’t know if it’s something to do with the upgrade)

1 Like

Thanks for the Guide!! I had to upgrade my RAM to 16GB, my nodes couldn’t handle the workload and were getting killed. Everything working fine now.

4 Likes

This was very helpful! Thank you.

1 Like

Anyone else getting stuck in a …starting loop in gLiveView? My BP after the update will run in starting for about 30-50 mins (most likely the db migration) and then kick over to synching, but then immediately fall back to …starting.

Node: 8GB Mem, 4vCPU.

This happends everytime:

Sep 27 23:17:34 node cardano-node[3350]: [ada-node:cardano.node.ChainDB:Info:5] [2021-09-28 03:17:34.14 UTC] Replayed block: slot SlotNo 40283991 of At (SlotNo 40321032)
Sep 27 23:17:37 node cardano-node[3350]: [ada-node:cardano.node.ChainDB:Info:5] [2021-09-28 03:17:37.33 UTC] block replay progress (%) = 100.0
Sep 27 23:17:37 node cardano-node[3350]: [ada-node:cardano.node.ChainDB:Info:5] [2021-09-28 03:17:37.72 UTC] before next, messages elided = 40284006
Sep 27 23:17:37 node cardano-node[3350]: [ada-node:cardano.node.ChainDB:Info:5] [2021-09-28 03:17:37.72 UTC] Replayed block: slot SlotNo 40305522 of At (SlotNo 40321032)
Sep 27 23:17:37 node cardano-node[3350]: [ada-node:cardano.node.ChainDB:Info:5] [2021-09-28 03:17:37.72 UTC] Replayed block: slot SlotNo 40305529 of At (SlotNo 40321032)
Sep 27 23:17:40 node cardano-node[3350]: [ada-node:cardano.node.ChainDB:Info:5] [2021-09-28 03:17:40.52 UTC] block replay progress (%) = 100.0
Sep 27 23:17:40 node cardano-node[3350]: [ada-node:cardano.node.ChainDB:Info:5] [2021-09-28 03:17:40.58 UTC] before next, messages elided = 40305616
Sep 27 23:17:40 node cardano-node[3350]: [ada-node:cardano.node.ChainDB:Info:5] [2021-09-28 03:17:40.58 UTC] Replayed block: slot SlotNo 40321032 of At (SlotNo 40321032)
Sep 27 23:17:40 node cardano-node[3350]: [ada-node:cardano.node.ChainDB:Info:5] [2021-09-28 03:17:40.58 UTC] Opened lgr db
Sep 27 23:18:49 node cardano-node[3346]: /home/cardano/cardano-my-node/startBlockProducingNode.sh: line 11:  3350 Killed  cardano-node run --topology ${TOPOLOGY} --database-path ${DB_PATH} --socket-path ${SOCKET_PATH} --host-addr ${HOSTADDR} --port ${PORT} --config ${CONFIG} --shelley-kes-key ${KES} --shelley-vrf-key ${VRF} --shelley-operational-certificate ${CERT}

To less RAM, 1.29.0 needs more RAM ~10

Setup 2-3’G of SWAP MEM or upgrade the node

1 Like

Yes, I literally just did this haha. Got it to work and it is now sync’ing. Was about to update here I did two things.

  1. Added some additional RTS settings to my startup script
cardano-node run +RTS -N4 -A16m -qg -qb --disable-delayed-os-memory-return -RTS --topology ${TOPOLOGY} --database-path ${DB_PATH} --socket-path ${SOCKET_PATH} --host-addr ${HOSTADDR} --port ${PORT}  --config ${CONFIG} --shelley-kes-key ${KES} --shelley-vrf-key ${VRF} --shelley-operational-certificate ${CERT}
  1. Added 2G of swap space

Helpful and easy to follow swap space documentation.

Honestly, I would actually just shutdown my pool as it would be too expensive to operate since I am not minting blocks at the moment. So I am happy I was able to get this to work without having to resize my nodes.

1 Like