-
Notifications
You must be signed in to change notification settings - Fork 43
ZelNode Advanced Guide | Build from Source
This guide walks through the setup to build a ZelNode from source, and uses the ZELmate (Swing) full node wallet as the Control Wallet
Source Code Repository
ZELmate/Swing Full Node Wallet
Ubuntu 16.04.5 and 18.04.5 are supported. Other Linux distributions are not currently supported. Use at your own risk.
Before Getting Started <<-- Read about security implications
Benchmarking Scripts used by ZelCore <<-- Read about how benchmarking is performed
Selecting VPS/hardware <<-- Read notes on selecting hardware for ZelNodes
ZelNodes FAQ <<-- Self-explanatory
- Your VPS/hardware is stood up properly and ready to begin installing ZelNodes.
- You have your personal computer ready to install the control wallet.
- You have your collateral ready to send in the EXACT amount in ONE transaction.
- You know the basics of the Linux command line and terminal programs (like PuTTY)
- Dont copy the
$
when pasting commands, it denotes a single command
- Log into your VPS via your terminal program as root user.
-
Change your root password if not done already:
$ passwd root
Enter a new root password
Confirm new root password -
Create a new user:
$ adduser [NEWUSERNAME]
Enter new user password
Confirm new user password
Hit enter to skip through user information entry
Confirm new user withY
-
Grant new user with sudo permissions:
$ usermod -aG sudo [NEWUSERNAME]
- Log out of root, then log back in to VPS with your new username and password.
-
Update Linux sources
$ sudo apt-get update && sudo apt-get upgrade -y
- Install 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 curl bsdmainutils automake nano
-
Clone the master repository
$ sudo git clone https://github.com/zelcash/zelcash.git
-
Change to correct directory
$ cd zelcash/
-
Start build script
$ sudo ./zcutil/build.sh -j$(nproc)
The build process will take a long time. If the build is successful, you will see the following, and be back at the command prompt.
6. Generate the zelcash.conf file
mkdir ~/.zelcash
echo "rpcuser=username" >> ~/.zelcash/zelcash.conf
echo "rpcpassword=`head -c 32 /dev/urandom | base64`" >> ~/.zelcash/zelcash.conf
echo "rpcallowip=127.0.0.1" >> ~/.zelcash/zelcash.conf
echo "listen=1" >> ~/.zelcash/zelcash.conf
echo "server=1" >> ~/.zelcash/zelcash.conf
echo "daemon=1" >> ~/.zelcash/zelcash.conf
echo "txindex=1" >> ~/.zelcash/zelcash.conf
echo "logtimestamps=1" >> ~/.zelcash/zelcash.conf
echo "maxconnections=512" >> ~/.zelcash/zelcash.conf
echo "addnode=explorer.zel.cash" >> ~/.zelcash/zelcash.conf
echo "addnode=explorer.zel.zelcore.io" >> ~/.zelcash/zelcash.conf
-
Fetch proving keys
$ sudo ./zcutil/fetch-params.sh
-
Download bootstrap and unzip
$ cd ~/.zelcash/
$ wget https://zelcore.io/zelcashbootstraptxindex.zip
$ unzip zelcashbootstraptxindex.zip
$ rm zelcashbootstraptxindex.zip
$ cd ~/zelcash/
-
Start daemon and fully sync
$ sudo ./src/zelcashd
Allow time for blockchain to fully sync. Run the command below to check synced height and check against the ZelCash Block Explorer
$ ./src/zelcash-cli getinfo
-
Shut down daemon to get ready to switch to Control Wallet setup
$ ./src/zelcash-cli stop
Now its time to set up the ZELmate (Swing) full node Control wallet here.
Copy the Zelnodeprivkey from the wallet setup into Notepad. You will need this key to finish VPS setup.
-
Add ZelNode info to zelcash.conf file
$ sudo nano ~/.zelcash/zelcash.conf
Add the lines below into the zelcash.conf file
zelnode=1
zelnodeprivkey=[zelnodeprivkey copied from your Control Wallet]
<<-- no brackets
externalip=[VPS IP ADDRESS]
<<--no brackets, no port
bind=[VPS IP ADDRESS]
<<--no brackets, no port
CTRL+X, Y, Enter to save and close zelcash.conf -
Start ZelNode daemon
$ cd ~/zelcash/src/
$ sudo ./zelcashd
- The daemon will launch and start benchmarking. This process takes about 5 minutes.
-
Get back to command prompt
CTRL + X -
Check your benchmark outputs
$ ./zelcash-cli getnodebenchmarks
Check the results against the required performance specifications here - Go back to your Control Wallet and start the ZelNode
- Starting the ZelNode requires at least 15 block confirmations. Allow 30+ minutes.
- You can check the status of your ZelNode on the VPS with command
$ ./zelcash-cli getzelnodestatus
- You can also check the ZelNode Block Explorer page to see the status of your VPS (find your IP address).
Written and maintained by the Zel Core Team - 2019
ZelCash is a cryptocurrency that holds a central role in the Zel Ecosystem. It gives the incentive for ZelNode ownership to enable the creation of ZelEx and the ZelDev Platform, enabling us to create a truly decentralized development platform.
ZelCash is minable making distribution fair. ZelNodes are soon to be added, and will allow holders of ZelCash to operate a ZelNode, receiving a portion of blockreward for operating it. ZelCash is the means of transacting in the Zel Ecosystem. It will always be a key part of the Zel Ecosystem.