Full Staking Node
This is a quick guide on how to setup a full Vaporum Coin staking node utilizong all of the 64 segID addresses possible.
Requirements to run the node
Enterprise class (recommended) linux server that is able to run 24/7. Following setup tested on ubuntu 18/04 server but may work on other versions.
minimum specifications should be 4 cores, 120gb hdd, and a minimum of 4gb ram (8gb recommended)
Security and backup. This staking node will be holding coins, make sure it is secure and has proper backups.
coins: Since you are staking you will need a decent number of coins for this setup. Coins are distributed across 64 segID addresses, you should have enough coins to distribute evenly to these 64 addresses.
CLI commend line experience.
Recommend you start with small amount of your coins to ensure staking node is operational and functioning as it should before large amounts of coins are moved over.
The following assumes your server is operational
Install Vaporum Coin Daemon
Log into server terminal using SSH, or start terminal on machine.
Intal needed dependencies
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget libcurl4-gnutls-dev bsdmainutils automake curl libsodium-dev
Clone and Build Vaporum Coin
# Clone the VaporumCoin repo
git clone https://github.com/VaporumCoin/vaporum.git --single-branch
# Change master branch to other branch you wish to compile
cd vaporum
./zcutil/fetch-params.sh
./zcutil/build.sh -j4
# Change -j4 to specify the number of cores to use. ex: -j2
# This can take some time.
Setup Vaporum Coin
Change directory to vaporumcoin
cd vaporum/src
Start new screen for vaporumcoin deamonpendencies
screen -S vaporum
Start vaporumcoin
./vaporumcoind
Vaporum coin daemon will startup and begin syncing.
To exit this screen use ctrl + A + ctrl +D to exit screen. you can return to this screen at any time but typing screen -r vaporum
Type ./vaporumcoin-cli getnewaddress to get a new vaporum address.
You fund your Vaporum staking node by sending funds to this address.
Check to see if vaporum is fully sync'd by typing ./vaporumcoin-cli getinfo when the node is fully sync'd it will read true under sync.
You will also use command above to check the balance of the staking node.
Install pos64staker
Intal needed dependencies
cd
sudo apt-get install python3-dev
sudo apt-get install python3 libgnutls28-dev libssl-dev
sudo apt-get install python3-pip
pip3 install setuptools
pip3 install wheel
pip3 install base58 slick-bitcoinrpc
Clone pos64staker and enter directory
git clone https://github.com/KMDLabs/pos64staker
cd pos64staker
Setup pos64staker
Run the genaddresses script to create your 64 addresses
./genaddresses.py
It will ask you to specify which chain you want to stake with. Type VPRM at prompt.
Please specify chain:VPRM
This will then create a list.json file in the current directory (/home/pos64staker)
THIS FILE CONTAINS YOUR PRIVATE KEYS ***DO NOT SHARE***
Copy the list.json file to the directory vaporumcoin is located in.
cp list.json ~/vaporumcoin/src/list.json
Open the list.json file so you can retrieve your pubkey.
nano list.json
Copy /paste the pubkey of the first segID to a txt file so you can use it later.
Use ctrl + x to exist file.
Distribute your vaporum to all 64 addresses
./sendmany64.py
Specify VPRM as your chain and decide on the size and amount of UTXOS to send.
Best you try to use all the whole balance you sent to vaporum node.
Example
Please specify chain:VPRM
Balance:1200
Please specify the size of UTXOs:9
Please specify the amount of UTXOs to send to each segID:2
Please review what is being asked here:
The above example will send 1152 coins in total. It will send 18 coins in 2 UTXOs (9 each) to each of the 64 addresses (segIDs) - ((9*2)*64)=1152
It will give an error if you enter amounts more than you balance. It will tell you how much available you have for each segID
Launch Vaporumcoin
change directory to vaporum/src
cd && cd vaporum/src
Stop the running vaporum coin daemon.
./vaprorumcoin-cli stop
resume the vaporum coin screen
screen -r vaporum
restart the vaporumcoin chain with -pubkey and -blocknotify parameters.
./vaporumcond -pubkey=<pubkey_from_list.json> '-blocknotify=/<path_to>/pos64staker/staker.py %s VPRM'
Make sure to replace <pubkey_from_list.json> with pubkey you copied earlier from the list.json file.
Make sure to replace <path_to> in -blocknotify= with the correct path to the staker.py script file. Example /home/$USER/pos64staker/staker.py
Use ctrl + A + ctrl + D to exit screen
Enable staking
./vaporumcoin-cli setgenerate true 0
Verify
Your Vaporum coin staking node should be finished and staking
To verify you are staking type
./vaporumcoin-cli getgenerate
you are looking for "staking": True,
for staking info type
./vaporumcoin-cli getbalance64
After some time you balance will begin to grow, to see type
./vaporumcoin-cli getinfo
As blocks are staked and you ern more coins, pos64staker will distrubute the new coins to each of your 64 segID addresses.
Note: If you stop vaporumcoin at all for updated, reboots etc. simply follow the steps from Launch Vaporumcoin to start staking again.
Withdraw
If you'd like to withdraw funds from the staking node without messing up the 64 segID distribution do the following
```
cd && cd pos64staker
./withdraw.py
```
It will walk you through the withdraw steps.
If you have issues running ./withdraw.py returning Permission denied. Run chmod +x withdraw.py to fix the permission.