Search…
Downloading and running the node
After completing this section, your node will be connected to the Aleph Zero Testnet and will start receiving blocks from the network.

Prerequisites

You will need docker and wget. If you are using Linux, we recommend that you add your user to the docker group so that using docker doesn’t require sudo access. You can find the Docker installation instructions here and using it without sudo access here (if you can't use Docker without sudo, simply add sudo before running the script.
You will also need to make sure that the port 9944 is not busy. On Linux, you can check this with:
sudo lsof -i -P -n | grep LISTEN | grep 9944
Before you proceed, please take a minute to read the section about exposing ports in context of validators and archivists as that is crucial to the correct functioning of your node within the Aleph network.
Clone the Aleph Node Runner repo:
git clone https://github.com/Cardinal-Cryptography/aleph-node-runner
cd aleph-node-runner
IMPORTANT: don't delete your aleph-node-runner repo when trying to update the node. It will prevent your validator from functioning correctly.

Setup and running

Once inside the aleph-node-runner folder, run:
./run_node.sh -n <your_nodes_name> # or --name <your_nodes_name>
The choice of your_nodes_name is entirely up to you but for the sake of more comprehensible logs please try using something unique and memorable. If you don’t provide the name, the script will do its best to generate one for you based on your username but it is not recommended as it might result in potential name clashes and make the logs harder to read. On Testnet, it's best to have this name be the same as the identity you'll set in the next section and the name you use in the form.
It might take quite some time before you actually get the node running: the script will first download required files, including a database snapshot (sized ~100GB). It will then run the node for you and you can inspect the logs by running docker logs <your_nodes_name>
2022-07-04 12:32:09 〽️ Prometheus exporter started at 0.0.0.0:9615
2022-07-04 12:32:09 Running session 4013.
2022-07-04 12:32:10 🔍 Discovered new external address for our node: /ip4/195.150.192.250/tcp/30333/p2p/12D3KooWFGUSW3DMq92JSoGKkBM5WTNJ4bFiJ88PDCX6ttnXadQU
2022-07-04 12:32:11 ✅ no migration for System
2022-07-04 12:32:11 ✅ no migration for RandomnessCollectiveFlip
2022-07-04 12:32:11 ✅ no migration for Scheduler
2022-07-04 12:32:11 ✅ no migration for Aura
2022-07-04 12:32:11 ✅ no migration for Timestamp
2022-07-04 12:32:11 ✅ no migration for Balances
2022-07-04 12:32:11 ✅ no migration for TransactionPayment
2022-07-04 12:32:11 ✅ no migration for Authorship
2022-07-04 12:32:11 ✅ no migration for Staking
2022-07-04 12:32:11 ✅ no migration for History
2022-07-04 12:32:11 ✅ no migration for Session
2022-07-04 12:32:11 ⚠️ Aleph declares internal migrations (which *might* execute). On-chain `StorageVersion(2)` vs current storage version `StorageVersion(2)`
2022-07-04 12:32:11 ⚠️ Elections declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(2)`
2022-07-04 12:32:11 Running migration from STORAGE_VERSION 0 to 1 for pallet elections
2022-07-04 12:32:11 Running migration from STORAGE_VERSION 1 to 2 for pallet elections
2022-07-04 12:32:11 ✅ no migration for Treasury
2022-07-04 12:32:11 ✅ no migration for Vesting
2022-07-04 12:32:11 ✅ no migration for Utility
2022-07-04 12:32:11 ✅ no migration for Multisig
2022-07-04 12:32:11 ✅ no migration for Sudo
2022-07-04 12:32:11 ✅ no migration for Contracts
2022-07-04 12:32:11 ✅ no migration for NominationPools
2022-07-04 12:32:11 ✅ no migration for Identity
2022-07-04 12:32:14 Running session 4014.
2022-07-04 12:32:14 ⚙️ Syncing, target=#4662784 (16 peers), best: #3618503 (0xe8a9…47c8), finalized #3612599 (0xf40d…de62), ⬇ 927.5kiB/s ⬆ 16.5kiB/s
2022-07-04 12:32:18 Running session 4015.
2022-07-04 12:32:19 ⚙️ Syncing 1668.2 bps, target=#4662789 (16 peers), best: #3626844 (0x0ee0…03b6), finalized #3613499 (0x03fd…669d), ⬇ 793.5kiB/s ⬆ 6.1kiB/s
2022-07-04 12:32:22 Running session 4016.
You can connect to other nodes before obtaining a full database by providing the --sync_from_genesis flag: it will start with the genesis and perform a full sync by using data from other nodes. Note that in most cases it will be slower than using the default way with the DB snapshot.
And that’s it!
Your node is now connected to the Aleph Zero Testnet and is able to communicate with other nodes and receive blocks.
Please read on if you would like to know about customizing your setup and verifying that the node actually works.
Note that the node will be running in background, so you can safely close the terminal window you used to run it.
We strongly recommend that you set up telemetry for your node, as described here.

Managing the node

The setup done by the script is based on Docker, so you can treat Aleph Node like any other container. To execute the commands below, you will need to provide the name of your container. The name assigned to the container will be the same as the name you have chosen for your node.
For instance, you might want to:

Stop the node

docker stop <your_nodes_name>

Start the node after stopping it

You have two options:
  • The first one doesn't require you to execute the script again: docker start <your_nodes_name>
  • while the second is to simply run the script again and let it take care of container management

Updating your node

IMPORTANT: do not delete your aleph-node-runner repository.
To update your node, you need to run two things:
  • docker stop <your_nodes_name>
  • ./run_node.sh --name <your_nodes_name>
That will take care of downloading the newest available version and starting the node again. Note that you don't need to manually clone or pull the repo.
docker logs <your_nodes_name>
Or, if you want to keep getting the logs in real-time:
docker logs --follow <your_nodes_name>

Check running containers and their key properties

docker ps (or docker ps -a if you want to see stopped containers as well)
It will allow you to check which container is running and whether the ports are mapped correctly.
Copy link
Outline
Prerequisites
Setup and running
Managing the node