UPDATE CARDANO NODE to 1.26.1 - FOR CNTOOLS users

Cardano Node 1.26.1

This release includes significant performance improvements and numerous other minor improvements and feature additions. In particular the reward calculation pause is eliminated, and the CPU load for relays handling lots of incoming transactions should be significantly reduced.
The focus of the current development work is on completing and integrating support for the Alonzo era. This release includes many of the internal changes but does not yet include support for the new era.


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

Few recommendation before to start:

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

  • try to update the Relay first

  • STEP 1 - download the prereqs.

cd "$HOME/tmp"
curl -sS -o prereqs.sh https://raw.githubusercontent.com/cardano-community/guild-operators/master/scripts/cnode-helper-scripts/prereqs.sh
chmod 755 prereqs.sh
./prereqs.sh 
. "${HOME}/.bashrc"
  • STEP 2 - 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.26.1
git pull origin master

echo -e "package cardano-crypto-praos\n  flags: -external-libsodium-vrf" > cabal.project.local
$CNODE_HOME/scripts/cabal-build-all.sh
  • wait till the node will be build and start it again:

after 40-50 minutes:
:~/git/cardano-node$ cardano-node --version
cardano-node 1.26.1 - linux-x86_64 - ghc-8.10
git rev 2b4b387cc6175b8eac40c30003bfdb92c7b359c2

now you can start the node

sudo systemctl restart cnode
#check the status
sudo systemctl status cnode

start glive

image

grab a coffee and let it sync (it will take 30-40 minutes)

Don’t panic… it took over 1h:30m but the results is:

image

run again the bellow script (press Y for topology updater only for the RELAYS)

./deploy-as-systemd.sh
  • Note that this release will automatically perform a DB migration on the first startup after the update. The migration should take 10-20 minutes however it can take up to 60 minutes depending on your CPU. If this is a problem for your use, then see below for steps to mitigate this.
  • The format of the cardano-cli query tip query has changed - see release notes for the CLI below.

Steps to mitigate downtime for this update

This release will automatically perform a DB migration on the first startup after the update. The migration should take 10-20 minutes however it can take up to 60 minutes depending on your CPU.

To mitigate downtime:

  1. Update a non-production mainnet node
  2. Take a DB snapshot
  3. Stop production node
  4. Backup and replace DB with snapshot
  5. Restart production node on 1.26.1
  6. Repeat steps 3-5 for all production nodes

Thanks

20 Likes

great job to post it as usual so fast :slight_smile:

just another option- i prefer to delete old version
cd ~/git
rm -rf cardano-node (I like to use clean code)
git clone GitHub - input-output-hk/cardano-node: The core component that is used to participate in a Cardano decentralised blockchain.
cd cardano-node
git fetch --tags --all
git tag -l
git checkout tags/1.26.1
echo -e “package cardano-crypto-praos\n flags: -external-libsodium-vrf” > cabal.project.local
$CNODE_HOME/scripts/cabal-build-all.sh

4 Likes

Is there any deadline to upgrade the node? What happens if the network is on 1.26.1 and someone is still running 1.25.1? Just out of curiosity

the new deadline should be Alfonzo era I think… for the moment u can run 1.25.1, Now I’m updating my test relay, keep it under monitoring and after few days I will update also my Producer and the Relays

no problem, updated :wink:
thx;

Thanks for the snapshoot … I was thinking I made something wrong … so going to grab a cofee :slight_smile:

1 Like

Nope, you will need to wait… it will re-sync all the db

1 Like

yeah I did everything from another host, moved files on relay and it was this exact screen… finaly made everthing from scratch and just saw your post :slight_smile:

So that means you can skip this update and use the next version?

My BP, after one hour, still have the following screen… Do I need to start to worry? I have 4 VCPU… image

Now looks better but still not synced image

wait… they said that for first time it will take more time to re-sync the DB

not so much time… but enough… you will need to upgrade until Alonzo era …

Thanks for this! I built my node from scratch using primarily the coincashew guide. I like the simplicity of CNTOOLS. Would I run into problem rebuilding the node with your guide instead as I update to 1.26.1? Would I just need to copy my current keys and addr files to their respective appropriate places once it is built?

It will be fine but u will need to migrate/rename some files… cntools using a specific folder structure

Thanks Alex!

Did you set

TraceMemPool = true

?

The bug is still open: [BUG] - TraceMemPool set to true lead to missed slots on block producers · Issue #2565 · input-output-hk/cardano-node · GitHub

However there is also a hint that the issue might have been solved by some other change which is part of 1.26.1:

Any observations on the CPU utilization so far?

Your feedback is very much appreciated!

1 Like

I never disabled it;
I am driving right now… I will provide an update later

Cheers,

1 Like

it’s a unbelievable update speed. thx @Alexd1985

1 Like

After compilation I needed to copy cardano-cli and cardano-node to bin folder, because it showed 1.25 version instead 1.26:

sudo cp $(find $HOME/git/cardano-node/dist-newstyle/build -type f -name "cardano-cli") /usr/local/bin/cardano-cli

sudo cp $(find $HOME/git/cardano-node/dist-newstyle/build -type f -name “cardano-node”) /usr/local/bin/cardano-node

Now it works, thank you anyway!

1 Like

It depends how u installed first time the node