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 https://azero-snapshots.dev/testnet/rocksdb-pruned.html

CHAIN_DIR="chains/testnet/"
mkdir -p $CHAIN_DIR
cd $CHAIN_DIR
wget -q -O - https://azero-snapshots.dev/testnet/rocksdb-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:

version=$(curl --silent https://rest.azero.dev/testnet-version)
wget -O chainspec.json "https://github.com/Cardinal-Cryptography/aleph-node/raw/${version}/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 RocksDB, you can use the following steps to keep the downtime during the upgrade to the minimum:

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

  2. You should end up with two directories: db and paritydb (the latter we will later be able to delete, the former is the new RocksDB 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 paritydb folder to save space.

Congratulations, you're now running a RocksDB validator!

Last updated

Was this helpful?