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

8 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