Upgrade Cardano node version 8.0.0 for cntools users

Here are the steps for upgrading to Cardano node version 8.0.0 from 1.35.x

Step1:- Download and install new branch of libsodium

cd ~/git

mv libsodium libsodium_old

git clone GitHub - input-output-hk/libsodium: A modern, portable, easy to use crypto library.

cd libsodium

git checkout dbb48cc

./autogen.sh

./configure

make

make check

sudo make install

Step2:- Download latest version of Alex script in $CNODE_HOME/script (or your specific dir) directory. Take the backup of existing software_upgrade.sh and rename the newly created file software_upgrade.sh.1 to software_upgrade.sh.

wget https://raw.githubusercontent.com/Alexd1985/node_software_upgrade_script/main/software_upgrade.sh

Step3:- Run the software_upgrade.sh script from $CNODE_HOME/scripts (or your specific dir) directory. Ensure to select “no” option for node start towards installation end.Also, check cardano node and cli version before proceeding to next step. Should result new version 8.0.0

./software_upgrade.sh

cardano-node --version

cardano-cli --version

Step4:- Download the below latest files and rename them. Set tracemempool = true in config.json post rename, if your old file has the same property set.

wget https://raw.githubusercontent.com/cardano-community/guild-operators/cnode-8.0.0/files/config-mainnet.json

wget https://raw.githubusercontent.com/cardano-community/guild-operators/cnode-8.0.0/files/conway-genesis-guild.json

mv config-mainnet.json config.json

mv conway-genesis-guild.json conway-genesis.json

Step5:- Download the latest db snapshot through curl. Download will take approx. ~10mins to ~1hr or more depends on server configuration.

curl -o - https://downloads.csnapshots.io/snapshots/mainnet/$(curl -s https://downloads.csnapshots.io/snapshots/mainnet/mainnet-db-snapshot.json| jq -r ..file_name ) | lz4 -c -d - | tar -x -C $CNODE_HOME

Step6:- Start the cnode service

sudo systemctl start cnode

Thanks to Alex(Charity pool) & StakePool247

7 Likes

been waiting for this ! thanks!

2 Likes

really appreciate this :clap:

2 Likes

Getting this error when running ./software_upgrade.sh
Says successful at the bottom but still showing 1.35.7 when cheching versions.

Selected version: 8.0.0
Checking for current version, please wait…
Current version running: 1.35.7
Stopping cardano-node…
Updating cabal, please wait…
Downloading the latest package lists from:

  • hackage.haskell.org
  • cardano-haskell-packages
    Package list of cardano-haskell-packages has been updated.
    The index-state is set to 2023-06-02T10:52:00Z.
    To revert to previous state run:
    cabal v2-update ‘cardano-haskell-packages,2023-05-17T06:53:34Z’
    Package list of hackage.haskell.org has been updated.
    The index-state is set to 2023-06-04T17:56:44Z.
    To revert to previous state run:
    cabal v2-update ‘hackage.haskell.org,2023-05-17T17:34:46Z’
    Cloning into ‘cardano-node’…
    remote: Enumerating objects: 95670, done.
    remote: Counting objects: 100% (1931/1931), done.
    remote: Compressing objects: 100% (881/881), done.
    remote: Total 95670 (delta 1064), reused 1648 (delta 865), pack-reused 93739
    Receiving objects: 100% (95670/95670), 44.29 MiB | 7.85 MiB/s, done.
    Resolving deltas: 100% (61265/61265), done.
    Fetching origin
    Note: switching to ‘8.0.0’.

You are in ‘detached HEAD’ state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 69a117b7b Merge pull request #5191 from input-output-hk/lehins/expose-config-reader
Starting cardano-node software upgrade, it will take a while, meantime you can enjoy some coffee :slight_smile:
Deleting build config artifact to remove cached version, this prevents invalid Git Rev
Running cabal update to ensure you’re on latest dependencies…
Downloading the latest package lists from:

  • hackage.haskell.org
  • cardano-haskell-packages
    Package list of cardano-haskell-packages is up to date.
    The index-state is set to 2023-06-02T10:52:00Z.
    Package list of hackage.haskell.org is up to date.
    The index-state is set to 2023-06-04T17:56:44Z.
    Building…
    Warning: Requested index-state 2023-04-29T00:00:00Z is newer than
    hackage.haskell.org’! Falling back to older state (2023-04-28T21:53:05Z).
    Resolving dependencies…
    Error: cabal: Could not resolve dependencies:
    [__0] trying: cardano-api-8.0.0 (user goal)
    [__1] next goal: base (dependency of cardano-api)
    [__1] rejecting: base-4.18.0.0/installed-4.18.0.0 (conflict: cardano-api =>
    base>=4.14 && <4.17)
    [__1] skipping: base-4.18.0.0, base-4.17.1.0, base-4.17.0.0 (has the same
    characteristics that caused the previous version to fail: excluded by
    constraint ‘>=4.14 && <4.17’ from ‘cardano-api’)
    [__1] rejecting: base-4.16.4.0, base-4.16.3.0, base-4.16.2.0, base-4.16.1.0,
    base-4.16.0.0, base-4.15.1.0, base-4.15.0.0, base-4.14.3.0, base-4.14.2.0,
    base-4.14.1.0, base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0,
    base-4.11.0.0, base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0,
    base-4.8.2.0, base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1,
    base-4.7.0.0, base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0,
    base-4.4.1.0, base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2,
    base-4.2.0.1, base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2,
    base-3.0.3.1 (constraint from non-upgradeable package requires installed
    instance)
    [__1] fail (backjumping, conflict set: base, cardano-api)
    After searching the rest of the dependency tree exhaustively, these were the
    goals I’ve had most trouble fulfilling: base, cardano-api

Instead of using the script (./software_upgrade.sh), you can simply use these commands :

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 8.0.0

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

Same error with that as well… any ideas? node works fine as is… just doesnt seem to be able to get the upgrade to stick

$$$$$$@$$$$$$:~$ cd ~/git
$$$$$$@$$$$$$:~/git$ cd cardano-node
$$$$$$@$$$$$$:~/git/cardano-node$ git fetch --tags --all
Fetching origin
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 25 (delta 13), reused 25 (delta 13), pack-reused 0
Unpacking objects: 100% (25/25), 4.73 KiB | 692.00 KiB/s, done.
From GitHub - input-output-hk/cardano-node: The core component that is used to participate in a Cardano decentralised blockchain.
f35143e54…efdeeafae nadia.chambers/tx-gen-cleanups-01 → origin/nadia.chambers/tx-gen-cleanups-01
$$$$$$@$$$$$$:~/git/cardano-node$ git checkout 8.0.0
HEAD is now at 69a117b7b Merge pull request #5191 from input-output-hk/lehins/expose-config-reader
$$$$$$@$$$$$$:~/git/cardano-node$ echo -e “package cardano-crypto-praos\n flags: -external-libsodium-vrf” > cabal.project.local
$$$$$$@$$$$$$:~/git/cardano-node$ $CNODE_HOME/scripts/cabal-build-all.sh
Deleting build config artifact to remove cached version, this prevents invalid Git Rev
Running cabal update to ensure you’re on latest dependencies…
Downloading the latest package lists from:

  • hackage.haskell.org
  • cardano-haskell-packages
    Package list of cardano-haskell-packages is up to date.
    The index-state is set to 2023-06-02T10:52:00Z.
    Package list of hackage.haskell.org has been updated.
    The index-state is set to 2023-06-04T21:34:43Z.
    To revert to previous state run:
    cabal v2-update ‘hackage.haskell.org,2023-06-04T17:56:44Z’
    Building…
    Warning: Requested index-state 2023-04-29T00:00:00Z is newer than
    hackage.haskell.org’! Falling back to older state (2023-04-28T21:53:05Z).
    Resolving dependencies…
    Error: cabal: Could not resolve dependencies:
    [__0] trying: cardano-api-8.0.0 (user goal)
    [__1] next goal: base (dependency of cardano-api)
    [__1] rejecting: base-4.18.0.0/installed-4.18.0.0 (conflict: cardano-api =>
    base>=4.14 && <4.17)
    [__1] skipping: base-4.18.0.0, base-4.17.1.0, base-4.17.0.0 (has the same
    characteristics that caused the previous version to fail: excluded by
    constraint ‘>=4.14 && <4.17’ from ‘cardano-api’)
    [__1] rejecting: base-4.16.4.0, base-4.16.3.0, base-4.16.2.0, base-4.16.1.0,
    base-4.16.0.0, base-4.15.1.0, base-4.15.0.0, base-4.14.3.0, base-4.14.2.0,
    base-4.14.1.0, base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0,
    base-4.11.0.0, base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0,
    base-4.8.2.0, base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1,
    base-4.7.0.0, base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0,
    base-4.4.1.0, base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2,
    base-4.2.0.1, base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2,
    base-3.0.3.1 (constraint from non-upgradeable package requires installed
    instance)
    [__1] fail (backjumping, conflict set: base, cardano-api)
    After searching the rest of the dependency tree exhaustively, these were the
    goals I’ve had most trouble fulfilling: base, cardano-api

This part doesn’t work

Looks like i needed a different version of cabal, installation worked after following these steps.

Note: make sure you have ghc 8.10.7 and cabal 3.6.2.0 before proceeding.

(Others have used 9.2.7 for ghc, so you can use that too)

ghcup upgrade
ghcup install ghc 8.10.7
ghcup set ghc 8.10.7
ghcup install cabal 3.6.2.0
ghcup set cabal 3.6.2.0
cabal update
ghc --version
cabal --version
3 Likes

It should work. What error or msg are you getting?

also did u install the latest libsodium package?

image

upgrade cancels at:
Step3:- Run the software_upgrade.sh script from $CNODE_HOME/scripts (or your specific dir) directory. Ensure to select “no” option for node start towards installation end.Also, check cardano node and cli version before proceeding to next step. Should result new version 8.0.0

./software_upgrade.sh

say yes to only 2 options…

caradano-node software upgrade canceled
/opt/cardano/cnode/scripts$

thoughts?

install fail. :frowning:

1@1:/opt/cardano/cnode/scripts$ ./software_upgrade.sh
Update Operating System (Linux)? (yes or [no]): y
Updating Operating System (Linux), please wait
Hit:1 Index of /ubuntu jammy InRelease
Hit:2 Index of /ubuntu jammy-updates InRelease
Hit:3 Index of /ubuntu jammy-backports InRelease
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:5 Index of /ubuntu jammy-security InRelease
Reading package lists… Done
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Calculating upgrade… Done
The following packages have been kept back:
grub-common grub2-common
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Update guild-deploy script and download the latest scripts/files? (yes or [no]): y

screen clears…then iam left with:

caradano-node software upgrade canceled
1@1:/opt/cardano/cnode/scripts$

thoughts? :slight_smile:

hmm u are using my script for software update?
Try to press no for guild-deploy scripts

1 Like

script fail

yes i tried using your script. Y, Y,
this screen quickly clears and gives me:

caradano-node software upgrade canceled
1@1:/opt/cardano/cnode/scripts$

:slight_smile:

Try to download the script again

1 Like

redownloaded script…same issue. does not compile node

same issue. line 116 and 133: home/user/git/cardano-node no such user or directory.

cardano-node wasnt created.

:frowning: no sure what to do

hmm, do u have cntools setup? Its saying no such user or directory

cd ~/git/cardano-node
do u have this folder? If not u can create it

1 Like

yes, its an existing cntools setup…
i did mkdir git/cardano-node/
i get this error…

./software_upgrade.sh : line 116: sleep1: command not found.

caradano-node software upgrade canceled

…screen clears… then:

should be sleep 1
U can edit the script with nano or download it again (I modified)

1 Like