NG
HydraDX

HydraDX

Setup Guide

1. Installing dependencies

First we should install Rust and Substrate. To do it enter the following:

sudo apt update
apt install curl
sudo curl https://getsubstrate.io -sSf | bash -s -- --fast
source ~/.cargo/env

Output should be like that:
HydraDX-0

2. HydraDX compile

Now we should compile the HydraDX node:

git clone https://github.com/galacticcouncil/HydraDX-node.git
cd HydraDX-node
cargo build --release

3. Benchmark our server

HydraDX has a own benchmark. Let’s test our system:

sudo apt update
sudo apt install python3.8 -y
alias python3='/usr/bin/python3.8'
apt install python3-pip
python3 -m pip install bench-wizard
rustup default nightly
./scripts/check_performance.sh

Output should be like that:
HydraDX-1

4. Starting

We will running our node as a service. To do it enter the following:

echo "[Unit]
Description=HydraDX Node
After=network-online.target
[Service]
User=root
WorkingDirectory=/root/HydraDX-node/
ExecStart=/root/HydraDX-node/target/release/hydra-dx --chain lerna --name NodesGuru --validator
Restart=always
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
" >hydradx.service
sudo mv hydradx.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable hydradx.service
sudo systemctl start hydradx.service

Check status:

sudo service hydradx status

Output should be like that:
HydraDX-2

5. Node update

Input following commands to update the node:

cd $HOME/HydraDX-node
git reset --hard
git pull
cargo build --release

If directory HydraDX-node is not found, do following and then repeat previous commands:

cd $HOME
git clone https://github.com/galacticcouncil/HydraDX-node.git

You should see results like this:
HydraDX-3

Then restart node:

sudo service hydradx restart
sudo journalctl -u hydradx -f

Check journal, it should not show any errors:
HydraDX-4

Check version of node to confirm update:

$HOME/HydraDX-node/target/release/hydra-dx --version

Major version should be 5 (starting with 5.0.0…):
HydraDX-5

Stuck? Ask!

By continuing to use our website, you consent to our use of cookies in accordance with our cookie policy