EOS Dawn 3.0 Setup Instructions for Developers - A Beginning to Dawn 3.0steemCreated with Sketch.

in eos •  11 months ago

EOS Setup Guide Banner.png

Before You Start

This Guide I am preparing while learning EOS. I will keep it updating and correcting, if and when there is anything I find or learn new around it. EOS Dawn 3.0 has been released released recently and I have found it really interesting. Follow this guide if you, like me are the one who is intrigued and want to learn a new technology. Let me tell you that if you are new to the programming this is not for you. Also, this guide assumes that you are aware of linux operating system and know how to use the command lines for work.

This guide will also include the code for the sample contracts I will be preparing for my learning or may be executing the once which I will copy from the other Authors. (Please excuse me, if that code you see over here matches your code … it may actually be. I will try to put credit here when and where possible.)

Environment (VM)

  1. Ubuntu 16.04
  2. 8GB RAM
  3. 40GB HDD
  4. 2 Core CPU

If you are not aware of how to create a VM, please follow these 2 videos, where in the first one I have shown how to install VMWare Player in Windows and the second one shows how to create a Ubuntu VM.

Install instructions for VMWare Player on Windows

Install instructions for Ubuntu in VMWare Player

Installation Steps

Install Git

 $ sudo apt install git

Get EOS Source from Git

 $ cd ~
 $ git clone https://github.com/EOSIO/eos --recursive

Build EOS from Source

 $ cd eos
 $ ./eosio_build.sh

… continue installing the dependencies if prompted … and few hours later (for me on the above configuration it took around 4 hours) you will be returned to the command prompt with EOS build complete (of course if there are no errors found during the build). I was thrown out of the build process stating that the Boost library failed to install. Started the process again and all went well this time.

  _______  _______  _______ _________ _______
 (  ____ \(  ___  )(  ____ \\__   __/(  ___  )
 | (    \/| (   ) || (    \/   ) (   | (   ) |
 | (__    | |   | || (_____    | |   | |   | |
 |  __)   | |   | |(_____  )   | |   | |   | |
 | (      | |   | |      ) |   | |   | |   | |
 | (____/\| (___) |/\____) |___) (___| (___) |
 (_______/(_______)\_______)\_______/(_______)
EOS.IO has been successfully built. 1:58:56
To verify your installation run the following commands:
/home/anantanandgupta/opt/mongodb/bin/mongod -f /home/anantanandgupta/opt/mongodb/mongod.conf &
 export PATH=${HOME}/opt/mongodb/bin:$PATH
 cd /home/anantanandgupta/eos/build; make test
 For more information:
 EOS.IO website: https://eos.io
 EOS.IO Telegram channel @ https://t.me/EOSProject
 EOS.IO resources: https://eos.io/resources/
 EOS.IO wiki: https://github.com/EOSIO/eos/wiki

Validate the Build

If you read the above snippet, you will see that there are no issues with your build and it shares the command to validate the build. just run them sequentially. There will be 32 test which all should pass to give you a green signal.

Note: Be patient as it may take a while to install.

Install EOS

 $ cd ~/eos/build
 $ sudo make install

Above should not take you more than a few minutes, so be patient here.

Configuration Steps

Run EOS Node for the First Time

 $ nodeos

Let it run for a couple of seconds and then stop the service by pressing Ctrl+C. This will create the default configuration files in the places, where it should be. At this point before we start modifying the config file, we need to gather a few informations from the system.

Get the location of the genesis.json file

 $ sudo find / -name genesis.json
 /home/anantanandgupta/.local/share/eosio/nodeos/config/genesis.json
 ...
 ...
 ...

The above command can list a few files … copy the file name with its full path which is located under .local folder of your home directory. Now in the same folder where you have found the genesis.json file, you should be able to locate the config.ini too.

Edit the Configuration (Finally)

I am using the vim editor, but you may choose the one you love.

Change the HTTP Server IP Address

This is required, so that you are able to access the services exposed by the nodeos from outside of the system. If you think that it is not required in your case, you can simply ignore this step.

find the config http-server-address and change the IP part of the address:

 http-server-address=0.0.0.0:8888

Change the genesis.json Path

now find the config genesis-json and change the path to the path we have colpied earlier. Remember that you have to provide the absolute path to the file (means from the root /directory )

 genesis-json=/path/to/genesis.json

Enable Stale Production

This is an important step as here we are telling the node to produce the stale blocks as it is being configured as a standalone node. We can talk about this later, when we are going to setup multiple nodes. This can however be done through the command line while starting the node. (Just a food for your thought. I will be happy to see the comments on this and let you find the answer on how to this using the command line parameter)
So find the config enable-stale-production and set it to true.

 enable-stale-production=true

Set the Producer Name

find producer-name and uncomment that (there will be # in front of it). You can be creative here and choose whatever name you want for your producer, but for the sake of this guide let's call it eosio

 producer-name = eosio

Add Plugins

OK, this is the last step in our “change configuration” agenda. Reach to the bottom of the file and insert the below lines:

 plugin=eosio::producer_plugin
 plugin=eosio::wallet_api_plugin 
 plugin=eosio::chain_api_plugin
 plugin=eosio::http_plugin
 plugin=eosio::account_history_api_plugin

Here again, these plugins can also be supplied while starting the node and I will again leave it on you to figure it out. (May be I can help you with that later in this guide … keep reading ;P)

At this point your configuration modifications are done. You can save the file and close the editor.

Run EOS Node for the Second Time

 $ nodeos

Here you should see that the node is running now and producing the blocks.

Our Buddy cleos

This is the command line tool for eos and we use this to issue commands and interact with the running node. This tool connects the server over http on local host (IP:127.0.0.1).

$ cleos get account eosio
{
  "account_name": "eosio",
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
            "weight": 1
          }
        ],
        "accounts": []
      }
    },{
      "perm_name": "owner",
      "parent": "",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
            "weight": 1
          }
        ],
        "accounts": []
      }
    }
  ]
}

Alternately, if you are accessing the node from outside the system (may be from other PC in the network), you can pass the parameters to specify the host and port of the system running the node

cleos -H 192.168.1.11 -p 8888 --wallet-host 192.168.1.11 --wallet-port 8888 get account eosio

At this point you may ask now from where that account came? Remember we have changed the name of the producer, this is what that gets translated into, an account. At this point you have a fully running minimal EOS TestNet node of EOS. I hope that you like this guide and it will help you kick start your development on EOS Blockchain.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thanks Anant for this post - I used these instructions for dawn 4.0 with a minor adjustment

plugin=eosio::account_history_api_plugin

should be

plugin=eosio::history_api_plugin

you may need to resync the blockchain if you encounter errors from an earlier run of nodeos:

nodeos --resync-blockchain

As explained here: https://github.com/EOSIO/eos/issues/2975