Download DB snapshot

Download a database snapshot to run an Aleph node on the testnet for validating transactions.

Create a directory for the data. Note that this will host the chain database, so it has to have access to reasonable amounts of space.

mkdir $BASE_PATH && cd $BASE_PATH

Download the latest DB snapshot from http://db.test.azero.dev.s3-website.eu-central-1.amazonaws.com/latest-parity-pruned.html. This is the pruned version, which allows you to save hundreds of gigabytes of storage.

CHAIN_DIR="chains/testnet/"
mkdir -p $CHAIN_DIR
cd $CHAIN_DIR
wget -q -O - http://db.test.azero.dev.s3-website.eu-central-1.amazonaws.com/latest-parity-pruned.html | tar xzf -

The command above downloads and unpacks the snapshot in one step: it only needs as much storage as the [unpacked] snapshot itself, as it doesn't store the archive. Now we can go back to the previous directory:

cd ../../

Download the chainspec:

wget -O chainspec.json https://github.com/Cardinal-Cryptography/aleph-node/raw/r-12.2/bin/node/src/resources/testnet_chainspec.json

No-downtime upgrade

If you're already running a validator node and would like to switch to using pruning, you can use the following steps to keep the downtime during the upgrade to the minimum:

Before you start: ensure that your node has enough space to accommodate an additional 60GB of storage for the new snapshot

  1. Without stopping the node: download the snapshot and unpack it in the same directory where you unpacked the legacy, non-pruned snapshot.

  2. You should end up with two directories: db and paritydb (the former we will later be able to delete, the latter is the new pruned database)

  3. Ensure your validator is not in the active committee (the best time for an upgrade is right after your validator has stopped being in the active committee).

  4. Stop your node.

  5. Start your node with pruning enabled (see the Running the binary section).

  6. Now you can remove the db folder to save space.

Congratulations, you're now running a space-efficient validator!

Last updated