Skip to main content

Node upgrade

In this chapter, we will see the CLI command lines to install the necessary dependencies to upgrade a Mavryk node.

Upgrade an Mavkit node

As you may know, Mavryk is an evolving blockchain. Through its on-chain governance mechanism, Mavryk smoothly evolves to become more secure and scalable over time.

The following commands help to upgrade your node to the latest Mavkit version.

caution

That version 14.0 changes the storage format. A mavkit-node upgrade storage is mandatory to update your storage. This upgrade is instantaneous but the data-directory used by your node can no longer be used with version 13.0 once upgraded (if you are using docker, see upgrade instructions in Bonus: Quick synchronization from a snapshot).

Docker and docker-compose

Upgrade the docker image
To upgrade your node to the lastest Mavkit version, replace your previous image version (probably v13.0) by the lastest: v19.1. Note that if you run the image latest, a restart of your container is sufficient.

To use the v19.1 image, execute the following command:

docker run mavrykdynamics/mavryk:v19.1 ...

Serokell PPA with Mavryk packages

Upgrade mavryk packages

To fetch the latest node version, run the following command:

sudo apt-get update
sudo apt-get upgrade

From source

From scratch

Upgrade from scratch

Execute the following commands in your tezos repository:

git fetch
git checkout v19.1
opam switch remove .
rm -rf _opam _build
make build-deps
eval $(opam env)
make
caution

A opam switch remove . is only needed if you are updating an already compiled repository, not if you are compiling from a freshly cloned repository.

Mavryk opam packages

Upgrade using opam

Run the following commands:

opam update
opam depext
opam upgrade
caution

Be careful when closing terminal windows because this stops the node.

tip

Use screen, or nohup to keep the node running in the background.