Guide for Raspberry Pi

Setup for Debian Buster (instructions below for 64bit ubuntu desktop 20.10)

Here's a quick start start script for 32bit Raspberry Pi OS that you can run that automates the instructions below to download and copy all files and start the Hydra wallet in daemon Mainnet mode:

wget -O - https://raw.githubusercontent.com/meshungina/hydra/main/install-run-gui-wallet-pi.sh | bash

Once done please see: Getting information through the cli

Manual installation:

Step 1 - Download

Before starting ensure that your system is up to date by executing:

sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev libgmp3-dev
sudo apt-get install software-properties-common
sudo apt-get update
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler qrencode

Select the latest wallet version from the link below:

Latest Releases

Here you will find wallets for different types of operating systems. You will need to download the arm-linux version for your Raspberry.

Create a directory called Hydra and download the zip file to it:

mkdir ~/Hydra
cd ~/Hydra/
wget -N https://github.com/Hydra-Chain/node/releases/download/hydra_v0.18.5.6/hydra-0.18.5.5-arm-linux-gnueabihf.zip

Make sure to replace the above link with the newest version available.

Step 2 - Unzip

Extract the archive

unzip -o hydra-0.18.5.6-arm-linux-gnueabihf.zip

Your file may be named differently, depending on the wallet version.

Step 2b - Copy config file

Note: For the current Hydra testnet you will also need to copy the latest hydra.conf file from the zip and place into the /.hydra/ folder. This is a different directory from ~/Hydra. Notice there is a dot before the name and it is lower case.

Create ~/.hydra folder then and copy the hydra.conf from the current directory into it.

mkdir ~/.hydra
cp ~/Hydra/hydra.conf ~/.hydra

Step 3 - Run

The binaries will then be in ~/Hydra/bin/ where you can cd into with

cd ~/Hydra/bin/

Either run the command-line daemon (add '-testnet' if you wish to connect to testnet):

./hydrad -daemon

Call the daemon using(add '-testnet' if you are connected to testnet):

./hydra-cli getinfo

Or you can run the GUI(add '-testnet' if you are connecting to testnet):

./hydra-qt

If you are updating your node and experience issues try starting with these flags to rebuild:

-rescan -reindex

If you are experiencing errors with libboost you can try fixing it with these commands:

sudo apt-get update
sudo apt upgrade -y
sudo apt-get install git autoconf libtool libboost-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-random-dev libssl-dev libevent-dev libboost-test-dev

The node runs on port TCP 13333 for the Hydra Testnet and TCP 3338 for Mainnet. You may need to open these ports on the router and operating system. For additional information please see the Firewall Settings section.

Setup for 64 bit Ubuntu Desktop 20.10 for pi

Here's a quick start script for Arm 64 bit devices. You can run that automates the instructions below to download and copy all files and run the Hydra wallet daemon in Mainnet:

wget -O - https://raw.githubusercontent.com/meshungina/hydra/main/install-run-gui-wallet.20.10PI64.sh | bash

Manual installation

Step 1 - Download

Before starting ensure that your system is up to date:

sudo apt update -y
sudo apt upgrade -y
sudo apt -y install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils git cmake libboost-all-dev libgmp3-dev libzmq3-dev
sudo apt-get -y install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler qrencode

Select the latest wallet version from the link below:

Latest Releases

Here you will find wallets for different types of operating systems. You will need to download the aarch64 version for your Raspberry or other arm device running 64 bit OS.

Create a directory called Hydra and download the zip file to it:

mkdir ~/Hydra
wget -N https://github.com/Hydra-Chain/node/releases/download/hydra_v0.18.5.6/hydra-0.18.5.5-aarch64-linux-gnu.zip -P ~/Hydra

Make sure to replace the above link with the newest version available.

Step 2 - Unzip

Extract the archive

unzip -o hydra-0.18.5.6-aarch64-linux-gnu.zip

Your file may be named differently, depending on the wallet version.

Step 2b - Copy config file

Note: For the current Hydra testnet you will also need to copy the latest hydra.conf file from the ~/Hydra directory and place it into the /.hydra/ folder. This is a different directory from ~/Hydra - Notice there is a dot before the name and it is in lower case.

Create .hydra folder and copy the hydra.conf file into it.

mkdir ~/.hydra
cp ~/Hydra/hydra.conf ~/.hydra

You can now navigate to where the Hydra binaries are to initialize them:

Step 3 - Run

If you have unzipped the file in the ~/hydra folder the binaries will then be in ~/Hydra/bin/ where you can cd into with

cd ~/Hydra/bin/

Either run the command-line daemon (add '-testnet' if you want to connect to testnet):

./hydrad -daemon

Call the daemon using(add'-testnet' if you are connected to testnet)::

./hydra-cli getinfo

Or you can run the GUI(add '-testnet' if you want to connect to testnet):

./hydra-qt

It is recommended when updating binaries to start with these additional flags the first time:

-rescan -reindex

If you are experiencing errors with libboost you can try fixing it with these commands:

sudo apt-get update
sudo apt upgrade -y
sudo apt-get install git autoconf libtool libboost-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-random-dev libssl-dev libevent-dev libboost-test-dev

The node runs on port TCP 13333 for the Hydra Testnet and TCP 3338 for Mainnet. You may need to open these ports on the router and operating system. For additional information please see the Firewall Settings section.

Getting information through the cli

General wallet information balance/staking

You can view your Coin balance and amount currently staked with the following command:

./hydra-cli getwalletinfo

Retrieving your LOC token balance through the cli:

This is slightly involved, first we'll need to find out the HEX equivalent of our address. We can do this through the cli with this command:

./hydra-cli gethexaddress <YOURADDRESS>

We can then call the contract with the "getbalance" identifier appended, which is 70a08231and replacing the last part <YOURHEXADDRESS> with your own hex address here:

./hydra-cli callcontract 4ab26aaa1803daa638910d71075c06386e391147 70a08231000000000000000000000000<YOURHEXADDRESS> | grep -e "output"

Finally convert the "output" section of the response from hex to decimal to arrive at your LOC balance.

echo $((0x<YOUROUTPUT>))

Below is a full example:

Amount displayed is adjusted by 8 decimal places. It is 64,172.22773141.

Time until expected block creation

To see expected time enter the following command:

./hydra-cli getstakinginfo

Note below the section "expectedtime".

The "expectedtime" can be converted to human readable format using the following command (replace 351955with your expectedtime value:

secs=351955 && echo $(($secs/86400))d $(($(($secs - $secs/86400*86400))/3600))h:$(($(($secs - $secs/86400*86400))%3600/60))m

Update Hydra on Raspberry PI

Please follow these steps:

  • Close the wallet (./hydra-cli stop or clicking X in the Hydra gui)

  • Ensure that you have a backup copy of your wallet.dat file and data folder (.hydra) before you proceed. Updating the client generally does not touch the wallet or blockchain data but it is good practise to always have the latest backup in case something goes wrong.

  • Download the latest version for your operating system from https://github.com/Hydra-Chain/node/releases and replace the files in the corresponding folders.

  • Voila! you've updated Hydra to the latest version available!

When updating your node to avoid any issues, it is recommended to add the flags -reindex -rescan

Links

The Webwallet can be found at: https://webwallet.hydrachain.org/

The Testnet Explorer can be viewed at: https://testexplorer.hydrachain.org/

The Testnet Faucet is at: https://faucet.hydrachain.org/

The Mainnet Explorer can be viewed at: https://explorer.hydachain.org/