Build a blockchain in 2 minutes with aelf enterprise — Part 1

How to Build the Blockchain
To follow along with the tutorial guide see here.
1. Setup the environment
For the majority of users, including myself, we have never done any coding on our personal computers and as such will likely not have the right environment setup. I first had to get a few programs and extensions installed before I could start the build process.
The program we use to run the blockchain and editing the code is Visual Studio. This is called an Integrated development environment (IDE), and since the blockchain will be written in C# language we also need to download the C# extension. The other programs we’ll need are git and Dotnet core SDK. All of these are very simple to download and install as they are executables which install themselves.
2. Get the tutorial ready
Now that we have a basic environment ready, we need to get the files we’ll use in the tutorial, within the command terminal in your computer there is a clone function which basically downloads all the files from github and puts them in a corresponding folder, called ‘aelf-boilerplate’
“git clone https://github.com/AElfProject/aelf-boilerplate”
So far the process is really simple and now we need to open the boilerplate folder in VS (Visual Studio)
Now comes the part that caused me so much stress! Protobuf is a love hate relationship for many of our windows users. It is critical but also can be the point where you run into an error if you are using a windows machine. There are about 3 or 4 different solutions depending on the error you may run into — I won’t go through all the solutions here but you can simply join the telegram group and someone there will direct you with a specific fix since people have already resolved them there. But push through this part if you do have an error. Protobuf, or Protocol Buffer is something which will facilitate network communication and is really important for the future interoperability with other languages and systems in the future, and thus is why our team have incorporated it into the system.
3. Build and run the Blockchain
Now we get to the fun part and you will realize just how simple it is to build a blockchain on aelf!
You should still be in the VS terminal and with two simple lines the blockchain will be automatically built:
“cd chain/src/AElf.Boilerplate.Launcher/
dotnet build”
Once you run these codes it may take a few seconds to build but that is literally all you will need to do. Then to run a node simple input this command:
“dotnet run bin/Debug/netcoreapp2.2/AElf.Boilerplate.Launcher”
Published at Thu, 20 Jun 2019 02:43:45 +0000
