Step by Step Guide to Set Up your Private EOS Network — EOSIO

SoluLab
14 min readNov 30, 2019

Hey,

I hope you are doing good.

If you are a true EOS fan, and exploring EOS for a long time then you must be curious in setting up your private EOS called EOSIO.

Yes, the EOSIO software can be used to launch private and public blockchain networks.

So, without wasting any time let’s get started.

Before moving on to our main topic, I would like to discuss some important points and some pre-requisites that you need on your machine before proceeding.

Pre-requisites

  • clang v6.0.0 or later

You can install clang with this command.

sudo apt-get install clang
  • CMake v3.15X or later

You can install CMake with this command.

sudo snap install cmake

Versions I have used to set up EOSIO

  • EOSIO v1.7.0

For installing EOSIO v1.7.0 run the following commands.

wget https://github.com/EOSIO/eos/releases/download/v1.7.0/eosio_1.7.0-1-ubuntu-18.04_amd64.deb
./eosio_1.7.0–1-ubuntu-18.04_amd64.deb
  • EOSIO.CDT v1.5.0

For installing EOSIO.CDT v1.5.0 run the following commands.

wget https://github.com/EOSIO/eosio.cdt/releases/download/v1.5.0/eosio.cdt_1.5.0-1_amd64.deb
./eosio.cdt_1.5.0–1_amd64.deb
  • EOSIO.Contracts v1.6.0

For installing EOSIO.Contracts v1.6.0 run the following commands.

wget https://github.com/EOSIO/eosio.contracts/archive/v1.6.0.zip
unzip v1.6.0.zip
mv eosio.contracts-1.6.0 contracts

(I assume you have unzip package installed on your machine, if you don’t have this package just run this command: sudo apt-get install unzip)

Configuration

I have used 3 AWS instances (Why I have used 3 instances I’ll explain afterwards)

I will use terms like instance1_IP, instance2_IP, instance3_IP.

All the instances having Ubuntu 18.04 LTS OS, 16GB of RAM, 4 vCPUs and 30GB of HDD.

Okay, so let’s move on to the main course

After installing all the pre-requisites and all the versions you are good to configure your private EOSIO

First Instance

Let’s Create Development Wallet.

The wallet is useful for storing all the important public and private keys of accounts.

cleos wallet create --name=YOUR_WALLET_NAME --to-console

It will generate a wallet with your given name i.e

“/usr/opt/eosio/1.8.1/bin/keosd” launched
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
“PW5JWZkAAK6TvCU68yEQ7gfUEXLLSxde4EQ31yAsJpT7VyZEb3RC8”

In the output you can see there is one password, so that password is important whenever your wallet in locked, you can unlock your wallet with the help of that password.

Now, create a directory named bootbios, and run the following commands.

mkdir bootbios
cd bootbios
mkdir genesis

Now, you are in the bootbios directory, run the following command.

vim genesis.json

It will make a JSON file with name genesis and in that paste the following code and save the file.

{
"initial_timestamp": "2018-12-05T08:55:11.000",
"initial_key": "EOS_PUB_DEV_KEY",
"initial_configuration": {
"max_block_net_usage": 1048576,
"target_block_net_usage_pct": 1000,
"max_transaction_net_usage": 524288,
"base_per_transaction_net_usage": 12,
"net_usage_leeway": 500,
"context_free_discount_net_usage_num": 20,
"context_free_discount_net_usage_den": 100,
"max_block_cpu_usage": 100000,
"target_block_cpu_usage_pct": 500,
"max_transaction_cpu_usage": 50000,
"min_transaction_cpu_usage": 100,
"max_transaction_lifetime": 3600,
"deferred_trx_expiration_window": 600,
"max_transaction_delay": 3888000,
"max_inline_action_size": 4096,
"max_inline_action_depth": 4,
"max_authority_depth": 6
},
"initial_chain_id": "0000000000000000000000000000000000000000000000000000000000000000"
}

You have to make a small change in this file, you can see “EOS_PUB_DEV_KEY” so you need to generate the pair of public and private key, for this just save this file and run the following command.

cleos create key --to-console

It will generate a public and private key for you. Save those keys in some file because those keys are important in the future.

Now you need to import that public key in your wallet. First check that your wallet is unlocked or not. You can check your wallet status from this command.

cleos wallet list

It will give you an output something like this

Wallets:
[
"default *"
]

Mine is default, because I don’t pass any “-name” parameter so by delinquency a default wallet is created. You can see a (*) symbol after the name of the wallet which means the status of your wallet is unlocked. The wallet will be locked after every 15 minutes. So whenever your wallet is locked run the following command “if you have not set any name of your wallet so you need to run the below command or if you have set any name of your wallet so you need to run the second command”

cleos wallet unlock

OR

cleos wallet unlock --name=YOUR_WALLET_NAME

In both of this command, it will ask for a wallet password so just enter the password of your wallet and you can see that your wallet is unlocked. Now your wallet is unlocked. Run the following command to import the public key which you have just generated.

cleos wallet import --name=YOUR_WALLET_NAME --private-key

It will ask you for a private key, so from the pair copy the private key and paste it so it will give you the following output.

private key: imported private key for: EOS6e4tLb89Ppfkfnw2U7WBr5umFZb8AiV5VGDgfqpxgTtHHme9Jx

You can check the public key, both public keys will be the same.

Now re-open the genesis.json file

vim genesis.json

In that you can see in initial_key it will ask for your “EOS_PUB_DEV_KEY” which means your public key, copy your public key and paste it there and just save the file.

Now, move to the genesis directory.

cd genesis

You need to create 3 files. You can understand the meaning of each file by its name.

touch genesis_start.sh
touch clean.sh
touch stop.sh

You have to set executable permission for all the files.

sudo chmod +x *.sh

Now open genesis_start.sh file

In genesis_start.sh file copy the following code.

#!/bin/bash
DATADIR="./blockchain"
if [ ! -d $DATADIR ]; then
mkdir -p $DATADIR;
fi
nodeos \
--genesis-json $DATADIR"/../../genesis.json" \
--signature-provider EOS_PUB_DEV_KEY=KEY:EOS_PRIV_DEV_KEY \
--plugin eosio::producer_plugin \
--plugin eosio::chain_api_plugin \
--plugin eosio::http_plugin \
--plugin eosio::history_api_plugin \
--plugin eosio::history_plugin \
--data-dir $DATADIR"/data" \
--blocks-dir $DATADIR"/blocks" \
--config-dir $DATADIR"/config" \
--producer-name YOUR_PRODUCER_NAME \
--http-server-address 0.0.0.0:8888 \
--p2p-listen-endpoint 0.0.0.0:4444 \
--access-control-allow-origin=* \
--contracts-console \
--http-validate-host=false \
--verbose-http-errors \
--enable-stale-production \
--p2p-peer-address INSTANCE2_IP:4444 \
--p2p-peer-address INSTANCE3_IP:4444 \
>> $DATADIR"/nodeos.log" 2>&1 & \
echo $! > $DATADIR"/eosd.pid"

Replace “EOS_PUB_DEV_KEY” with your public key and “EOS_PRIV_DEV_KEY” with your private key.

You can see INSTANCE2_IP and INSTANCE3_IP. In configuration part I mentioned that I have used 3 AWS instances so currently we are working on the first instance, so according to your IPs change INSTANCE2_IP and INSTANCE3_IP and save the file and close it.

Now run the following command

cp genesis_start.sh start.sh

It will create a duplicate copy of the genesis_start.sh with the name start.sh

You need to make a single change in the start.sh file

Open the file start.sh and remove below line and just save the file and close it.

--genesis-json $DATADIR"/../../genesis.json" \

Now open the stop.sh file

#!/bin/bash
DATADIR="./blockchain/"
if [ -f $DATADIR"/eosd.pid" ]; then
pid=`cat $DATADIR"/eosd.pid"`
echo $pid
kill $pid
rm -r $DATADIR"/eosd.pid"
echo -ne "Stoping Node"
while true; do
[ ! -d "/proc/$pid/fd" ] && break
echo -ne "."
sleep 1
done
echo -ne "\rNode Stopped. \n"
fi

Save it and close it.

Now open the clean.sh file

#!/bin/bash
rm -fr blockchain
ls -al

Save it and close it.

Great!! you created all these files now just run following command.

./genesis_start.sh
ls -l

When you run the genesis_start script it will generate a blockchain folder so you can see that folder by entering the ls -l command.

cd blockchain

You will see the 2 directories and 2 files by running the above command.

Run the following command.

tail -f nodeos.log

So you will see your log file is constantly increasing and it will start generating blocks. You could generate some similar output like this:

info  2019-08-08T19:24:48.508 thread-0  producer_plugin.cpp:345       on_incoming_block    ] Received block 7adffaf13fb68222... #61358 @ 2019-08-08T19:24:48.500 signed by virprdcr [trxs: 0, lib: 61320, conf: 0, latency: 8 ms]
info 2019-08-08T19:24:49.008 thread-0 producer_plugin.cpp:345 on_incoming_block ] Received block 4be024069b2a7543... #61359 @ 2019-08-08T19:24:49.000 signed by virprdcr [trxs: 0, lib: 61320, conf: 0, latency: 8 ms]
info 2019-08-08T19:24:49.508 thread-0 producer_plugin.cpp:345 on_incoming_block ] Received block 58c82116ab256ce7... #61360 @ 2019-08-08T19:24:49.500 signed by virprdcr [trxs: 0, lib: 61320, conf: 0, latency: 8 ms]
info 2019-08-08T19:24:50.008 thread-0 producer_plugin.cpp:345 on_incoming_block ] Received block 5d95c68ccc86ba3d... #61361 @ 2019-08-08T19:24:50.000 signed by virprdcr [trxs: 0, lib: 61320, conf: 0, latency: 8 ms]

Now you need to create important system accounts.

Several system accounts are needed, namely the following:

eosio.bpay
eosio.msig
eosio.names
eosio.ram
eosio.ramfee
eosio.saving
eosio.stake
eosio.token
eosio.vpay
eosio.rex

For all eosio* accounts you need a pair of the public and private keys. You can create all the accounts with the same public key but my advice is to use different pairs of public and private keys for each account. So run the following sequence of command for creating all these accounts.

cleos create key --to-console

It will generate a pair of the public and private key

Private key: YOUR_PRIV_KEY
Public key: YOUR_PUB_KEY

Import key to the wallet

cleos wallet import --private-key

It will ask you for a private key. Enter your “YOUR_PRIV_KEY” and then you can see following output.

private key: imported private key for: YOUR_PUB_KEY

Now create an account for eosio.bpay

cleos create account eosio eosio.bpay YOUR_PUB_KEY

So it can generate some similar output like this:

executed transaction: ca68bb3e931898cdd3c72d6efe373ce26e6845fc486b42bc5d185643ea7a90b1  200 bytes  280 us
# eosio <= eosio::newaccount {"creator":"eosio","name":"eosio.bpay","owner":{"threshold":1,"keys":[{"key":"EOS84BLRbGbFahNJEpnnJH...

Repeat the steps from generating the key to create an account for eosio.msig, eosio.names, eosio.ram, eosio.ramfee, eosio.saving, eosio.stake, eosio.token, eosio.vpay, eosio.rex.

Now, you need to build the smart contracts. Run the following commands.

cd
cd contracts
./build.sh -e /usr/opt/eosio/1.7.0 -c /usr/opt/eosio.cdt/1.5.0
pwd

This script may take up to 30–40 minutes to complete the process, and if you have a question in your mind, that what is the use of -e and -c so I specified the location of my eosio and eosio.cdt. I mentioned the script that you’ll find my eosio and eosio.cdt package from there.

Now, you need to install several contracts, before that you have to note your contract directory path, mine is “/home/ubuntu/contracts” yours might be different, so according to your path you can change. Run the following command.

Let’s set the eosio.token contract.

cleos set contract eosio.token YOUR_PATH/build/contracts/eosio.token/

Here, YOUR_PATH means your contract directory entire path.

After setting the contract you’ll see the output like:

Reading WAST/WASM from /home/ubuntu/contracts/build/contracts/eosio.token/eosio.token.wasm...
Using already assembled WASM...
Publishing contract...
executed transaction: 17fa4e06ed0b2f52cadae2cd61dee8fb3d89d3e46d5b133333816a04d23ba991 8024 bytes 974 us
# eosio <= eosio::setcode {"account":"eosio.token","vmtype":0,"vmversion":0,"code":"0061736d01000000017f1560037f7e7f0060057f7e...
# eosio <= eosio::setabi {"account":"eosio.token","abi":{"types":[],"structs":[{"name":"transfer","base":"","fields":[{"name"...

Let’s set the eosio.msig contract.

cleos set contract eosio.msig YOUR_PATH/build/eosio.msig/

The output should look like this:

Reading WAST/WASM from /home/ubuntu/contracts/build/contracts/eosio.msig/eosio.msig.wasm...
Using already assembled WASM...
Publishing contract...
executed transaction: 007507ad01de884377009d7dcf409bc41634e38da2feb6a117ceced8554a75bc 8840 bytes 925 us
# eosio <= eosio::setcode {"account":"eosio.msig","vmtype":0,"vmversion":0,"code":"0061736d010000000198011760017f0060047f7e7e7...
# eosio <= eosio::setabi {"account":"eosio.msig","abi":{"types":[{"new_type_name":"account_name","type":"name"}],"structs":[{...

Let’s create and allocate some currency. Here I have used SYS, so SYS is my currency. You can replace SYS with your currency.

Create the SYS currency with a maximum value of 10 billion tokens.

cleos push action eosio.token create '[ "eosio", "10000000000.0000 SYS" ]' -p eosio.token@active

Output:

executed transaction: 0440461e0d8816b4a8fd9d47c1a6a53536d3c7af54abf53eace884f008429697  120 bytes  326 us
# eosio.token <= eosio.token::create {"issuer":"eosio","maximum_supply":"10000000000.0000 SYS"}

Allocate the SYS currency

cleos push action eosio.token issue '[ "eosio", "1000000000.0000 SYS", "memo" ]' -p eosio@active

Here, you can see “memo”. So you can use any text instead of memo, you can use “How are you”, “I am fine”, “demo memo” etc.

Output:

executed transaction: a53961a566c1faa95531efb422cd952611b17d728edac833c9a55582425f98ed  128 bytes  432 us
# eosio.token <= eosio.token::issue {"to":"eosio","quantity":"1000000000.0000 SYS","memo":"memo"}

Let’s set the eosio.system contract.

cleos set contract eosio YOUR_PATH/build/eosio.system/

Output:

Reading WAST/WASM from /home/ubuntu/contracts/build/contracts/eosio.system/eosio.system.wasm...
Using already assembled WASM...
Publishing contract...
executed transaction: 2150ed87e4564cd3fe98ccdea841dc9ff67351f9315b6384084e8572a35887cc 39968 bytes 4395 us
# eosio <= eosio::setcode {"account":"eosio","vmtype":0,"vmversion":0,"code":"0061736d0100000001be023060027f7e0060067f7e7e7f7f...
# eosio <= eosio::setabi {"account":"eosio","abi":{"types":[],"structs":[{"name":"buyrambytes","base":"","fields":[{"name":"p...

Let’s make eosio.msig a privileged account.

cleos push action eosio setpriv '["eosio.msig", 1]' -p eosio@active

Initialise system account.

cleos push action eosio init '["0", "4,SYS"]' -p eosio@active

Now, you are good for the first instance. Let’s move to the Second Instance.

Second Instance

So this instance will work as a Block Producer and it will constantly generate the blocks. We just need to copy all the files from the first instance and do some minor changes.

Let’s create the same folder structure we created in the first instance

mkdir bootbios
cd bootbios
mkdir genesis

You are in the bootbios directory. Run the following command.

vim genesis.json

Copy entire json file from the first instance and paste the content here. everything must be same. You don’t need to change the public key because it’s a one time file that generates the first block.

{
"initial_timestamp": "2018-12-05T08:55:11.000",
"initial_key": "EOS_PUB_DEV_KEY",
"initial_configuration": {
"max_block_net_usage": 1048576,
"target_block_net_usage_pct": 1000,
"max_transaction_net_usage": 524288,
"base_per_transaction_net_usage": 12,
"net_usage_leeway": 500,
"context_free_discount_net_usage_num": 20,
"context_free_discount_net_usage_den": 100,
"max_block_cpu_usage": 100000,
"target_block_cpu_usage_pct": 500,
"max_transaction_cpu_usage": 50000,
"min_transaction_cpu_usage": 100,
"max_transaction_lifetime": 3600,
"deferred_trx_expiration_window": 600,
"max_transaction_delay": 3888000,
"max_inline_action_size": 4096,
"max_inline_action_depth": 4,
"max_authority_depth": 6
},
"initial_chain_id": "0000000000000000000000000000000000000000000000000000000000000000"
}

Save it and close it.

Let’s move to the genesis folder.

cd genesis

Create some shell script files and you need to do some minor changes in some files.

touch genesis_start.sh
touch stop.sh
touch clean.sh

Give executable permission to all of these shell script files

sudo chmod +x *.pem

Now open the genesis_start.sh file. Copy all the content from the first instance and paste it here.

#!/bin/bash
DATADIR="./blockchain"
if [ ! -d $DATADIR ]; then
mkdir -p $DATADIR;
fi
nodeos \
--genesis-json $DATADIR"/../../genesis.json" \
--signature-provider EOS_PUB_DEV_KEY=KEY:EOS_PRIV_DEV_KEY \
--plugin eosio::producer_plugin \
--plugin eosio::chain_api_plugin \
--plugin eosio::http_plugin \
--plugin eosio::history_api_plugin \
--plugin eosio::history_plugin \
--data-dir $DATADIR"/data" \
--blocks-dir $DATADIR"/blocks" \
--config-dir $DATADIR"/config" \
--producer-name YOUR_PRODUCER_NAME \
--http-server-address 0.0.0.0:8888 \
--p2p-listen-endpoint 0.0.0.0:4444 \
--access-control-allow-origin=* \
--contracts-console \
--http-validate-host=false \
--verbose-http-errors \
--enable-stale-production \
--p2p-peer-address INSTANCE1_IP:4444 \
--p2p-peer-address INSTANCE3_IP:4444 \
>> $DATADIR"/nodeos.log" 2>&1 & \
echo $! > $DATADIR"/eosd.pid"

You just need to change the “EOS_PUB_DEV_KEY”, “EOS_PRIV_DEV_KEY”.
For other pair of public and private key run the following command.

cleos create key --to-console

Now, you have a different pair of public and private key, store it in some file (every pair of keys you have, must be saved somewhere) and use this public and private key into your genesis_start.sh file.

Next, you need to enter the IP of instance 1 and instance 3 and enter your producer name in “YOUR_PRODUCER_NAME

Rest all the thing is good. After making successful changes, save it and close it.

Make a copy of file with name start.sh and copy all the content of the genesis_start.sh.

cp genesis_start.sh start.sh

Open start.sh file, just remove the below line.

--genesis-json $DATADIR"/../../genesis.json" \

Save it and close it.

Now copy stop.sh and clean.sh file from the instance and paste it. You don’t need to change anything in this file.

Now run the following command.

./genesis_start.sh

You will see blockchain folder is created just open the nodeos log file so that you can see the block generation process.

tail -f blockchain/nodeos.log

You can see something like this:

info  2019-08-09T17:37:21.550 thread-0  producer_plugin.cpp:345       on_incoming_block    ] Received block 9c85dd9c06981890... #61972 @ 2019-08-09T17:37:21.500 signed by lonprdcr [trxs: 0, lib: 61928, conf: 0, latency: 50 ms]
info 2019-08-09T17:37:22.050 thread-0 producer_plugin.cpp:345 on_incoming_block ] Received block 2f11342d7d16d73f... #61973 @ 2019-08-09T17:37:22.000 signed by lonprdcr [trxs: 0, lib: 61928, conf: 0, latency: 50 ms]
info 2019-08-09T17:37:22.550 thread-0 producer_plugin.cpp:345 on_incoming_block ] Received block 39679b669d79a888... #61974 @ 2019-08-09T17:37:22.500 signed by lonprdcr [trxs: 0, lib: 61928, conf: 0, latency: 50 ms]
info 2019-08-09T17:37:23.050 thread-0 producer_plugin.cpp:345 on_incoming_block ] Received block e522a7f5a38d0df8... #61975 @ 2019-08-09T17:37:23.000 signed by lonprdcr [trxs: 0, lib: 61928, conf: 0, latency: 50 ms]

Great!! Now only one instance left. Let’s move to the Third Instance.

Third Instance

You need to repeat all the steps which you have followed in the second instance.

  • Make the same folder structure.
  • Copy genesis.json file without change.
  • Make three files, named genesis_start.sh, stop.sh and clean.sh, now give them executable permission.
  • In genesis_start.sh file make the required changes. Generate the other pair of the public and private key, store it somewhere and use them into this file, and write the IP of INSTANCE2 instead of INSTANCE3.
    Now, change the Producer name. That’s it.
  • Copy genesis_start.sh file into start.sh file and remove that line.
  • Start the genesis_start.sh file with given command and see the logs.

Awesome!! Your work is done for two instances which will be working as a Block Producers for your chain

Now, let’s move to the First instance again.

First Instance

Now, you need to create the staked accounts for your chain, here you need 3 staked accounts. Two of them will be registered as a Block Producer’s account and the third one will be used for the vote of the Block Producers.

Run the following command for creating a staked account.

cleos system newaccount eosio --transfer ACCOUNT_NAME EOS_PUB_KEY --stake-net "100000000.0000 SYS" --stake-cpu "100000000.0000 SYS" --buy-ram-kbytes 8192

You can choose any kind of account name like “account11”, “accountAA” etc.

If you don’t have a pair of the public and private key of that account.
So here firstly we will create a pair and import the private key into the wallet and then run the above command.

You can see the output like this:

775292ms thread-0   main.cpp:419                  create_action        ] result: {"binargs":"0000000000ea30551082d4334f4d113200200000"} arg: {"code":"eosio","action":"buyrambytes","args":{"payer":"eosio","receiver":"ACCOUNT_NAME","bytes":8192}} 
775295ms thread-0 main.cpp:419 create_action ] result: {"binargs":"0000000000ea30551082d4334f4d113200ca9a3b00000000045359530000000000ca9a3b00000000045359530000000001"} arg: {"code":"eosio","action":"delegatebw","args":{"from":"eosio","receiver":"ACCOUNT_NAME","stake_net_quantity":"100000.0000 SYS","stake_cpu_quantity":"100000.0000 SYS","transfer":true}}
executed transaction: fb47254c316e736a26873cce1290cdafff07718f04335ea4faa4cb2e58c9982a 336 bytes 1799 us
# eosio <= eosio::newaccount {"creator":"eosio","name":"ACCOUNT_NAME","owner":{"threshold":1,"keys":[{"key":"EOS8mUftJXepGzdQ2TaC...
# eosio <= eosio::buyrambytes {"payer":"eosio","receiver":"ACCOUNT_NAME","bytes":8192}
# eosio <= eosio::delegatebw {"from":"eosio","receiver":"ACCOUNT_NAME","stake_net_quantity":"100000.0000 SYS","stake_cpu_quantity...

Now, create another 2 accounts with the same command, but in that account the name should be same as your producer name.(You had set your producer name in the genesis_start.sh file in both of the instances)

cleos system newaccount eosio --transfer ACCOUNT_NAME EOS_PUB_KEY --stake-net "100000000.0000 SYS" --stake-cpu "100000000.0000 SYS" --buy-ram-kbytes 8192cleos system newaccount eosio --transfer ACCOUNT_NAME EOS_PUB_KEY --stake-net "100000000.0000 SYS" --stake-cpu "100000000.0000 SYS" --buy-ram-kbytes 8192

In this, you can use the public key which you had generated at the time of the genesis_start file. So you can use that public key here.

Okay, Producers account has been created now you have to register them as a block producer.

You are going to build a small chain so you just need to register 3 accounts as block producers — Eosio, your 2nd instance producer and your 3rd instance producer.

Run the following command.

cleos system regproducer eosio EOS_PUB_KEY https://eosioproducer.com

You can use the public key of the first instance. You can some similar output like this:

1487984ms thread-0   main.cpp:419                  create_action        ] result: {"binargs":"1082d4334f4d11320003fedd01e019c7e91cb07c724c614bbf644a36eff83a861b36723f29ec81dc9bdb4e68747470733a2f2f6163636f756e746e756d31312e636f6d2f454f53386d5566744a586570477a64513254614364754e7553504166584a48663232756578347534316162314556763945416857740000"} arg: {"code":"eosio","action":"regproducer","args":{"producer":"eosio","producer_key":"EOS8mUftJXepGzdQ2TaCduNuSPAfXJHf22uex4u41ab1EVv9EAhWt","url":"https://eosio.com/EOS8mUftJXepGzdQ2TaCduNuSPAfXJHf22uex4u41ab1EVv9EAhWt","location":0}} 
executed transaction: 4ebe9258bdf1d9ac8ad3821f6fcdc730823810a345c18509ac41f7ef9b278e0c 216 bytes 896 us
# eosio <= eosio::regproducer {"producer":"eosio","producer_key":"EOS8mUftJXepGzdQ2TaCduNuSPAfXJHf22uex4u41ab1EVv9EAhWt","u...

Run the same command to register other accounts as Producers.

cleos system regproducer YOUR_PRODUCER_NAME EOS_PUB_KEY https://YOUR_PRODUCER_NAME.comcleos system regproducer YOUR_PRODUCER_NAME EOS_PUB_KEY https://YOUR_PRODUCER_NAME.com

You can see the same output when you run the above commands.

Cool! You registered the accounts as the Producers.
Now, let’s check the producers.

cleos system listproducers

So in output, you will see something like this:

Producer      Producer key                                              Url                                                         Scaled votes
eosio EOS5c2J9YJ3129PRM6NpSW5rJiQzYt9fiF2XFwVuMz6hY1J2oiH32 https://www.producer-eosio.com 0.3333
lonprdcr EOS6azmwnuVoyM6PH1uhDTShG3e14HmUmtXzfWqwrA5UDjcowHyq2 https://www.producer-london.com 0.3333
virprdcr EOS8AiHz8K134ugWcfSzf7PE4e6p3wVUMS5q2z8cgB2aHRZiN9c5j https://www.producer-virginia.com 0.3333

Don’t worry, Your output should be different because this is my output so producer name, public key, scaled votes will be different.

You can see all the producers have 0.0000 scaled votes so now we need to vote for the block producers.

Run the following command.

cleos system voteproducer prods ACCOUNT_NAME PRODUCER_ACCOUNT_NAME1 PRODUCER_ACCOUNT_NAME2 PRODUCER_ACCOUNT_NAME3

You just voted for 3 block producers from the ACCOUNT_NAME.

Now last step is check the logs, run the following commands.

cd
tail -f bootbios/genesis/blockchain/nodeos.log

You can see block is constantly generated and somewhere in between you’ll see “signed by XXX”, and this will change after every 6 seconds. If you keep open the log file for a minute, you’ll see your block producer is constantly generating the blocks. If one block producer generates 12 blocks then the name of another block producer will come and it will start generating 12 blocks and this process will be going continuously.

Hey EOS Developer,
Congratulations!! you just started your small chain.

If you want to check the info of your chain, Open your browser and run the following link.

http://INSTANCE1_IP:8888/v1/chain/get_info

I would like to Thank cc32d9 (EOS Developer and Block Producer) and Ami Heines (EOS Developer) and also I would like to mention some great telegram groups where I was able to find the best answers to my doubts.

Reference: https://developers.eos.io/eosio-nodeos/docs/bios-boot-sequence

--

--

SoluLab

A leading blockchain,mobile apps & software development company, started by Ex VP of Goldman Sachs, USA and Ex iOS Lead Engineer of Citrix www.solulab.com