How to make cryptocurrency itself is basically not so difficult, considering bitcoin itself is open source. So far there have been thousands of crypto types other than bitcoin, or so-called Altcoin. Most of them are also not made from scratch, but take the same source code comes from bitcoin, then lowered into another type.
While the other major is a token, built on a particular blockchain. Although there have been thousands of altcoin species, there will still be new crypto names emerging, and growing. People in the world seem to enjoy how easy it is to make their own version of money, once the spaces are monopolized and manipulated by the world's central banks. They mentasbihkan himself as the god of the ruler of the creation of currency.
What happens if everyone in the world makes its own currency? Where will the central bank position and role be? That's about the picture that needs to be a prologue on this occasion. Rather than increasingly digress: D, let's try to start a discussion on how to create a cryptocurrency itself.
As has been pointed out earlier, that of the thousands of crypto types that exist, most of the many take from existing source code. In this discussion, we will use the existing source code. However, such ways remain a good starting point for trying to recognize more deeply about cryptocurrency, bitcoin in particular, because it has become the bodyguard of the cryptocurrency world.
Souce code that we take will be Litecoin version 0.8, consideration, because it is still simple, and yet complex as it is today. For those who already experience coding, maybe reference programming blockchain with C # can be useful to further explore.
Do not take it seriously, because this is only a discussion only, not aimed at making new crypto like in general. Prepare snacks, coffee, because the process will take a fairly long time. Let's get started.
Part One - Install All Required Dependencies
These dependencies are the files needed when we want to install something. In order to create a cryptocurrency itself runs smoothly, would require so many dependencies needed. Immediately, open a terminal in ubuntu you, then one by one paste the following command:
sudo apt-get install git
sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
sudo apt-get install libboost-all-dev
sudo apt-get install software-properties-common
sudo add-apt-repository ppa: bitcoin / bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8 ++ - dev
sudo apt-get install libminiupnpc-dev
sudo apt-get install libzmq3-dev
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
sudo apt-get install libqt4-dev libprotobuf-dev protobuf-compiler
If you ask why we need a bitcoin repository? True, because Litecoin does come from the same source, Bitcoin. Furthermore we will know for ourselves how this Litecoin will not be much different from Bitcoin, other than some basic consensus that distinguishes, such as total supply and some other things.
Continue the process by starting the clone of the Litecoin source code version 0.8 in github. For convenience, you should save the Litecoin clone file in the Desktop folder on ubuntu you use. Paste the command below:
cd Desktop
git clone -b 0.8 https://github.com/litecoin-project/litecoin.git
The first time after the clone, it's good you change the name of the clone folder, so it is easy to remember. Here, EB renames its folder with "ebina". So for the next, you just stay adjust it with your own folder.
If so, continue with changing all Litecoin names, to whatever you like. Just paste the following command:
cd ebina
find. -type f -print0 | xargs -0 sed -i 's / litecoin / ebina / g'
find. -type f -print0 | xargs -0 sed -i's / Litecoin / Ebina / g '
find. -type f -print0 | xargs -0 sed -i's / LiteCoin / EbinaCoin / g '
find. -type f -print0 | xargs -0 sed -i's / LITECOIN / EBINA / g '
find. -type f -print0 | xargs -0 sed -i's / LTC / INA / g '
So with the above command, we have changed all the words in the clone files, with our own version.
Especially for the Litecoin source code in this version, there is a bit of trouble in the rpcrawtransaction.cpp file. So we need to change it first. Open your clone folder and open the /src folder. Right on line 242, just paste it like this:
const CScriptID & hash = boost :: get (address);
After that, now we try to compile the clone. The first compilation process is enough to determine we can continue further or not. So make sure all the above steps have been done correctly.
If successful, furthermore we will also repeat the compile several times. Do not worry, you can also compile how many times you want, as long as it does not harm your neighbor. But before, make sure you are in the /src folder, then use this command to start compiling:
make -f makefile.unix