Testnet Instructions — Linux

Hcash
6 min readMar 8, 2018

In order to increase security and stability of the Main Chain, rigorous RC1 load testing must be conducted. To achieve this, we need to simulate a load on the network. This load is important, as it will expose any instabilities or flaws in the system, so they can be reviewed and updated.

The following is a detailed explanation on how to participate using a Linux system — provided by the Hybrid Network team. There are 3 parts. The first is how to create a node on the testnet itself, the second is how to participate in staking and mining, and lastly is a set of important links to report any bugs which are found.

Please note that these instructions require the use of command lines, which requires some skill.

Part 1

How to participate in the Testnet:

Please follow the instructions below to build from source.

Video Guide (Linux)

Hx Testnet Build from Source Linux Part 1
Hx Testnet Build from Source Linux Part 2

Written Instructions to Build from Source (Linux)

Download the most recent version of Go at https://golang.org/dl.

Select the appropriate operating system to build from source with.

Intermediate Level — Step 1 (Linux)

After the Go download is complete, open Terminal using Ctrl + Alt + T or search for Terminal.

With your Terminal up, enter the following commands in order. During this string you will be installing dependencies and setting up environment variables. Please wait till you are prompted for the next input.

(Use Shift + the \ key to create a | character)

cd Downloads

sudo tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz

export PATH=$PATH:/usr/local/go/bin

sudo apt-get install git

sudo apt-get install curl

mkdir $HOME/go

mkdir $HOME/go/src

mkdir $HOME/go/bin

mkdir $HOME/go/src/github.com

mkdir $HOME/go/src/github.com/hybridnetwork

export GOPATH=$HOME/go

export PATH=$PATH:$HOME/go/bin

curl https://glide.sh/get | sh

cd $HOME/go/src/github.com/hybridnetwork

git clone https://github.com/hybridnetwork/hxd

git clone https://github.com/hybridnetwork/hxwallet

cd hxd

glide install

go install $(glide nv)

cd ..

cd hxwallet

glide install

go install $(glide nv)

Running a Test Node

Open up another Terminal window like in the last step. Enter the following commands:

export GOPATH=$HOME/go

export PATH=$PATH:$HOME/go/bin

hxd -u user -P pass --testnet

The node (hxd) has now been created, leave this window running.

Creating a Wallet

Open up another Terminal window. Type the following commands:

export GOPATH=$HOME/go

export PATH=$PATH:$HOME/go/bin

hxwallet -u user -P pass --create

Type a priv passphrase for your new wallet and press Enter.

Type the same priv passphrase again and press Enter to confirm.

**For the purposes of testing, press Enter on the next two lines to choose default options**

***IMPORTANT*** WRITE your wallet information down. It contains your wallet generation seed and Hex, which will be needed if you want to recover your wallet.

Running your Wallet

In the same Terminal window, enter the following command:

hxwallet -u user -P pass --testnet

**Leave this Terminal window (hxwallet) open and running**

Testing your Wallet

Open up a new Terminal. Enter the following commands:

export GOPATH=$HOME/go

export PATH=$PATH:$HOME/go/bin

hxctl -u user -P pass --testnet --wallet getnewaddress default

OR

hxctl -u user -P pass --testnet --wallet getnewaddress postquantum

This will generate a Default or Post Quantum address. Copy this address to your clipboard.

Using the Faucet and Block Explorer

Open up your web browser. Navigate to http://faucet1.hybrid.network. Paste your wallet address into the space provided and press send. You will receive a transaction id (txid).

Open up a new tab in your web browser. Navigate to http://explorer1.hybrid.network.

Paste your wallet address into the search bar at the top and press enter. Refresh if you do not see that your wallet has received Testnet tokens. It may take up to 5 minutes for your transaction to show and up to another 5 minutes to complete. Feel free to relax and stretch during this time and refresh your browser until it looks like this.

**Depending on the difficulty and hashrate on the Tesnet, this may take longer depending on the size mempool**

You can click on the blue down arrow to get more information on the transaction.

Congratulations! You should now have 2 coins. Now you can verify the transaction in the Terminal.

Return to the Terminal window that you are currently using and type:

hxctl -u user -P pass --testnet --wallet getreceivedbyaddress walletaddresshere

You can also get a detailed view of your wallet and balance by entering:

hxctl -u user -P pass --testnet --wallet getbalance

You now have a running node and a Command-line wallet for Hx! Please stay tuned for an additional article regarding mining on the RC1 Public Testnet.

Part 2

Written Instructions to Staking through Command-line (Linux)

Create a Terminal window and type the following commands:

cp $HOME/go/src/github.com/hybridnetwork/hxwallet/sample-hxwallet.conf $HOME/.hxwallet/hxwallet.conf

nano $HOME/.hxwallet/hxwallet.conf

This will open the .conf file to edit inside the Terminal. Add the following lines to the top of the file:

enablevoting=1

enableticketbuyer=1

Press Ctrl + X to Save. Enter Y to confirm the update to hxwallet.conf.

If you already have a wallet running, shut the process down (Ctrl + C ) when you’re in that Terminal. Start it up again. If not, open up a new Terminal window and type the following commands:

export GOPATH=$HOME/go

export PATH=$PATH:$HOME/go/bin

hxwallet -u user -P pass --testnet

Enter your wallet priv passphrase.

Leave the hxwallet Terminal open.

Written Instructions for Mining through Command-line (Linux)

If you already have hxd in an open a Terminal, shut the process down (Ctrl + C ) when you’re in that Terminal. To start it up again, type the following:

hxd -u user -P pass --testnet --miningaddr=walletaddresshere

OR if you would like to see your hashrate

hxd -u user -P pass --testnet --miningaddr=walletaddresshere --debuglevel=debug

If not, open up a new Terminal window and enter:

export GOPATH=$HOME/go

export PATH=$PATH:$HOME/go/bin

hxd -u user -P pass --testnet --miningaddr=walletaddresshere

OR if you would like to see your hashrate

hxd -u user -P pass --testnet --miningaddr=walletaddresshere --debuglevel=debug

Keep the hxd Terminal window open.

Create a third Terminal window. These commands will call to the hxd Daemon to begin mining:

export GOPATH=$HOME/go

export PATH=$PATH:$HOME/go/bin

hxctl -u user -P pass --testnet setgenerate true

Congratulations, you are now Staking and Mining in the Hx RC1 Testnet!

Part 3

Bug Reporting

Report bugs using integrated tracking in GitHub. Please follow the corresponding links. When reporting bugs please include as much information as possible, but not limited to the date, summary of the issue encountered, and suggested workaround.

hxd

hxwallet

hxify

testnetfaucet

hxstakepool

Block Explorer

--

--