Steps for 1.26.1 (non CNTOOLS , Coincashew users)

1.25.1 > 1.26.1
Two guides below

1 Like

Here are my steps:
Backup server / do snapshot (also you can snapshot the db folder in the cardano-relay-node)
In git cardano-node folder - fetch all new tags

git fetch --all --recurse-submodules --tags
git checkout tags/1.26.1
git reset --hard

Install ghcup (optional - if not yet installed)

  curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
  source ~/.bashrc

OR Upgrade ghcup

ghcup upgrade  (just to make sure ghcup is on the latest version)
ghcup install ghc 8.10.4
ghcup set ghc 8.10.4
ghc --version   (just to check the correct version)
ghcup install cabal 3.4.0.0
ghcup set cabal 3.4.0.0
cabal --version   (just to check the correct version)
cabal update  (just to make sure all dependencies are in the info)

Prepare config

cd ~/git/cardano-node
cabal configure -O0 -w ghc-8.10.4

Check for this folder to be removed

rm -rf ~/git/cardano-node/dist-newstyle/build/x86_64-linux/ghc-8.10.2

Build cardano cli and node

cabal build cardano-cli cardano-node

Verify version to be 1.25.1

cardano-node version
cardano-cli version

STOP service

sudo systemctl stop cardano-node.service

Copy the compiled files to right location

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

Verify version to be 1.26.1

cardano-node version
cardano-cli version

Update the NODE_BULD_NUM

export NODE_BUILD_NUM=$(curl https://hydra.iohk.io/job/Cardano/iohk-nix/cardano-deployment/latest-finished/download/1/index.html | grep -e "build" | sed 's/.*build\/\([0-9]*\)\/download.*/\1/g')
sed -i $HOME/.bashrc \
    -e "s/export NODE_BUILD_NUM=[0-9]\+/export NODE_BUILD_NUM=${NODE_BUILD_NUM}/g"
source $HOME/.bashrc

Restart service & sync db

sudo systemctl restart cardano-node.service

For other relays/bp => Copy just the db/ledger to the other nodes - no need for other folders!!! (for me this reduced the sync time to ~5-10 min from 1h+)

Do gliveView updates now (if any)

Check tip

cardano-cli query tip --mainnet

In “topologyUpdater.sh” change the script to query the tip from blockNo to block line 21

blockNo=$(/usr/local/bin/cardano-cli query tip ${NETWORK_IDENTIFIER} | jq -r .block )

1 Like

What is the terminology “snapshot” mean?

Snapshot is usually a complex backup (gcp create snapshot). Usually if you have a VM (virtual machine) you can take a snapshot at a point of time and then some time passes and let’s say after 1 year if you play the snapshot you have the same state as 1 year before.

1 Like

I use AWS so snapshots I can do, I was just wondering if you met a DB or an entire snapshot of my server.

$ ghcup upgrade
ghcup: command not found

Just tried this after this command:
curl --proto ‘=https’ --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
source ~/.bashrc

I skipped the editor or did I need that?

you decide :smiley: I said no to that, and snapshot of both VM and db is advisable. (if something goes wrong with the db is maybe faster to restore it from db-snapshot, as restoring the whole VM)

1 Like

Wouldnt a DB snapshot just be copying the database folder?

Also this command:

$ git fetch --all --recurse-submodules --tags
fatal: not a git repository (or any of the parent directories): .git

Do you know why the ghcup upgrade command isnt working/ ---- its working now (edit)
$ ghcup upgrade
[ Info ] Upgrading GHCup…
[ Warn ] No GHCup update available

ghcup install ghc 8.10.4
[ Warn ] New GHC version available: 9.0.1. To upgrade, run ‘ghcup install ghc 9 .0.1’
[ Warn ] GHC ver 8.10.4 already installed; if you really want to reinstall it, you may want to run ‘ghcup rm ghc 8.10.4’ first

DB snapshot yes is the copy of the database folder.
And to do the git fetch you should be in the folder where you cloned the cardano-node from github for 1.25.1

What does clone mean ? copy?

usually you clone a repository from a location: like git clone https://github/my-repository (you can think as download from remote)

1 Like

Also do you know what GHC 9.0.1 means? Is there two ghc I need to install? 8.10.4 and 9.0.1?

I’m not familiar with ghcup, What is it? Is it necessary?

you need ghc 8.10.4 and cabal 3.4.0.0

1 Like

it’s like the official package manager for ghc and cabal

2 Likes

I received this error while trying to copy the compiled files to right location "cp : missing destination file operand after ‘/usr/local/bin/cardano-cli’ "

Verify version to be 1.26.1

cardano-node version
cardano-cli version

im on this step after building and it still shows 1.25.1 know any reason why?

seems like you didn’t copy the right command…you need cp with 2 arguments cp (or copy) source-file destination-file (you miss this one)