Building a crypto full node

Since March of last year I started getting into cryptocurrencies and have learned a lot of things about it and truly believe in the technology behind it (blockchain).  Bitcoin was just one application of the blockchain technology and people are now trying to build more uses with blockchain technology.

Alot of different altcoins have spun off of Bitcoin, most known ones include Litecoin (LTC), Dogecoin (DOGE), Darkcoin (DRK).  However almost a new alt launches everyday and most turn out to be a scam with devs claiming huge pre-mines or ICOs then dump the coins once it is listed on an exchange.  I won’t get into all the different scam coins since this isn’t really the post for it, but I have decided to help run a full node for the altcoin PAYCON (CON).  Check out the thread for why the coin was created.

Back to the intention of this post, I wanted to build a full node for a coin and tried to search on how to build it with CentOS (Bad idea).  It seems most nodes are built on Ubuntu but information seems to be scatter around in different posts so I decided to put everything in one location and hopefully it can help people out.  You will need to use Ubuntu 12.04 LTS, I’ve tried Ubuntu 12.10 (apt-get issues) and Ubuntu 14.04 LTS (libqt5core5 issues).  This guide is done assuming you are building from source and a minimal install of Ubuntu.

 

Update all repos and install git

sudo apt-get install python-software-properties
sudo apt-add-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
sudo apt-get install git

Obtain coin source code from git (Paycon example)

git clone https://github.com/Crestington/PayCon

Install prerequisite packages for Bitcoin or any altcoin.

sudo apt-get install build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev libminiupnpc-dev qt5-qmake libqt5gui5 libqt5core5 libqt5dbus5 qttools5-dev-tools

Once all prerequisite packages have been installed move to the coins src directory to compile it. (Paycon example)

cd PayCon/src/
make -f makefile.unix

**Troubleshooting tips**
If you get the following errors
g++: error: /home/user/PayCon/src/leveldb/libleveldb.a: No such file or directory
g++: error: /home/user/PayCon/src/leveldb/libmemenv.a: No such file or directory
make: *** [PayCond] Error 1

Here’s how to solve it
cd /home/user/PayCon/src/leveldb/
chmod 755 build_detect_platform
make libleveldb.a libmemenv.a
cd ..
make -f makefile.unix

Once it finishes compiling you will have PayCond inside your working directory. You can move it to /usr/bin to maintain consistency.

sudo mv PayCond /usr/bin/

Now to create a user to run PayCon

sudo adduser paycon

Now you’ll have to run PayCond to create the configuration file.

PayCond
Error: To use PayCond, you must set a rpcpassword in the configuration file:
/home/paycon/.PayCon/paycon.conf
It is recommended you use the following random password:
rpcuser=payconrpc
rpcpassword=GLGwQQ5RE3KYaBdZgQE4aXdtHapFFiCe2UN9Pnr6tTG9

Once you get the output for rpcuser and rpcpassword and paste it into /home/paycon/.PayCon/paycon.conf

Now you are ready to start the daemon by logging in as the new user you created.

PayCond&

To ensure everything is working you can check the debug log and if it is loading the blockchain you are all set.

tail -f ~paycon/.PayCon/debug.log

Enjoy and hopefully this has helped out.

Leave a Reply

Your email address will not be published. Required fields are marked *