Skip to content

Files

Latest commit

author
hexxcointakeover
Jul 18, 2018
a2b1d72 · Jul 18, 2018

History

History
175 lines (114 loc) · 4.45 KB

XNODE.md

File metadata and controls

175 lines (114 loc) · 4.45 KB

Xnode Instructions and Notes

  • Version 0.2.1
  • Date: 18 July 2018

Prerequisites

  • Ubuntu 16.04+
  • Port 29100 is open
  • Libraries to build from hexxcoin source if you want to build it yourself

Step 0. ON VPS: Acquire the binaries

Either

Download the prebuilt binaries 0.1 Install prebuild client and full chain
mkdir .hexxcoin
cd .hexxcoin
sudo apt-get install unzip
wget https://github.com/hexxcointakeover/hexxcoin/releases/download/chain/chainfiles.zip
unzip chainfiles.zip
cd ..
wget https://github.com/hexxcointakeover/hexxcoin/releases/download/4.0.4.1/linux-x64.tar.gz
tar xvfz linux-x64.tar.gz

./hexxcoind -daemon
./hexxcoin-cli getinfo

or

Build from source 0.1. Check out from source:
git clone https://github.com/hexxcointakeover/hexxcoin

0.2. See README.md for instructions on building.

Step 1. ON VPS: Open port 29100 (Optional - only if firewall is running)

1.1. Run:

sudo ufw allow ssh 
sudo ufw allow 29100
sudo ufw default allow outgoing
sudo ufw enable

Step 2. ON LOCAL MACHINE: First run on your Local Wallet

If you are using the qt wallet 2.0. Open the wallet

2.1. Click Help -> Debug window -> Console

2.2. Generate xnodeprivkey:

xnode genkey

(Store this key)

2.3. Get wallet address:

getaccountaddress XN1

2.4. Send to received address exactly 2000 HXX in 1 transaction. Wait for 15 confirmations.

2.5. Close the wallet

If you are using the daemon 2.0. Go to the checked out folder or where you extracted the binaries
cd hexxcoin/src

2.1. Start daemon:

./hexxcoind -daemon -server

2.2. Generate xnodeprivkey:

./hexxcoin-cli xnode genkey

(Store this key)

2.3. Get wallet address:

./hexxcoin-cli getaccountaddress XN1

2.4. Send to received address exactly 2000 HXX in 1 transaction. Wait for 15 confirmations.

2.5. Stop daemon:

./hexxcoin-cli stop

For both:

2.6. Create file xnode.conf (in ~/.hexxcoin, C:\Users\USER\AppData\Roaming\hexxcoin or ~/Library/Application Support/hexxcoin depending on your Operating System) containing the following info:

  • LABEL: A one word name you make up to call your node (ex. XN1)
  • IP:PORT: Your xnode VPS's IP, and the port is always 29100.
  • XNODEPRIVKEY: This is the result of your "xnode genkey" from earlier.
  • TRANSACTION HASH: The collateral tx. hash from the 2000 HXX deposit.
  • INDEX: The Index from the transaction hash

To get TRANSACTION HASH, run:

./hexxcoin-cli xnode outputs

or

xnode outputs

depending on your wallet/daemon setup.

The output will look like:

{ "d6fd38868bb8f9958e34d5155437d009b72dfd33fc28874c87fd42e51c0f74fdb" : "0", }

Sample of xnode.conf:

XN1 51.52.53.54:29100 XrxSr3fXpX3dZcU7CoiFuFWqeHYw83r28btCFfIHqf6zkMp1PZ4 d6fd38868bb8f9958e34d5155437d009b72dfd33fc28874c87fd42e51c0f74fdb 0

2.7. Lock unspent

As long as the xnode is listed in your xnode.conf file the funds are automatically locked so you don't accidentially spend them.

Step 3. ON VPS: Update config files

3.1. Create file hexxcoin.conf (in folder ~/.hexxcoin)

server=1
xnode=1
xnodeprivkey=XXXXXXXXXXXXXXXXX  ## Replace with your xnode private key
externalip=XXX.XXX.XXX.XXX ## Replace with your node external IP

Step 4. ON LOCAL MACHINE: Start the xnode

With qt wallet 4.1 Start the xnode via your gui wallet in the xnodes tab
With daemon 4.1 Start xnode:
./hexxcoin-cli xnode start-alias <LABEL>

For example:

./hexxcoin-cli xnode start-alias XN1

4.2 To check node status:

./hexxcoin-cli xnode debug

If not successfully started, just repeat start command