create account

Block Producer Guide on starting EOS Producer Node by eluzgin

View this thread on: hive.blogpeakd.comecency.com
· @eluzgin ·
$0.04
Block Producer Guide on starting EOS Producer Node
## The material posted here used in technical training sessions for BPs :

### 1. Compile latest EOS source code and install.
You should use following repo to clone: git clone https://github.com/EOS-Mainnet/eos 

### 2. Create node folder and place genesis.json into the folder. 
Here is the copy of Mainnet genesis but please verify it with multiple sources:
{
  "initial_timestamp": "2018-06-08T08:08:08.888",
  "initial_key": "EOS7EarnUhcyYqmdnPon8rm7mBCTnBoot6o7fE2WzjvEX2TdggbL3",
  "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": 200000,
    "target_block_cpu_usage_pct": 1000,
    "max_transaction_cpu_usage": 150000,
    "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
  }
}

### 3. Create producer config.ini file using following template:
You can try using <ip-address> instead of 0.0.0.0 for http-server-address and p2p-listen-endpoint  settings below. However if you are running on a cloud instance and get network error - use 0.0.0.0

get-transactions-time-limit = 3 
block-log-dir = "blocks”

http-server-address = 0.0.0.0:8888 
p2p-listen-endpoint = 0.0.0.0:9856
p2p-server-address = <ip address>:9856

allowed-connection = any 
 
log-level-net-plugin = info
max-clients = 100
connection-cleanup-period = 30
network-version-match = 0
sync-fetch-span = 2000
enable-stale-production = false
required-participation = 33

plugin = eosio::chain_api_plugin
plugin = eosio::history_plugin
plugin = eosio::history_api_plugin

peer-private-key = ["<EOS...public key>","<private-key>"]
signature-provider = <public--key>=KEY:<private-key>
producer-name = <12 chars name>
plugin = eosio::producer_plugin

p2p-peer-address = 209.41.67.115:7115

#### Complete list of peers available here: 
https://docs.google.com/spreadsheets/d/1HLAIZ242dc0R8IcHnTRjVur4-wguQ6AjRxzXia-2esU/edit#gid=0 

### 4. Create start script: vi start.sh 
#!/bin/bash
NODEOS=/home/ubuntu/eos/build/programs/nodeos/nodeos
DATADIR=/home/ubuntu/node

$NODEOS --data-dir $DATADIR --config-dir $DATADIR "$@" > $DATADIR/stdout.txt 2> $DATADIR/stderr.txt &  echo $! > $DATADIR/nodeos.pid

### 5. Create stop.sh :
#!/bin/bash
DIR=/home/ubuntu/node
    if [ -f $DIR"/nodeos.pid" ]; then
        pid=$(cat $DIR"/nodeos.pid")
        echo $pid
        kill $pid
        rm -r $DIR"/nodeos.pid"
        echo -ne "Stopping Nodeos"
        while true; do
            [ ! -d "/proc/$pid/fd" ] && break
            echo -ne "."
            sleep 1
        done
        echo -ne "\rNodeos stopped. \n"
    fi

### 6. Make scripts executable: chmod +x *.sh 

### 7. Start your producer node for the first time passing genesis*:
./start.sh  --genesis-json genesis.json
*) For any future node restarts just use: ./start.sh and do not pass genesis again!

### 8. Check if process running: pgrep nodeos 
- returns process id like: 1738

### 9. Tail and monitor your log for any errors: tail -f stderr.log 
![Screen Shot 2018-06-15 at 10.42.32 AM.png](https://ipfs.busy.org/ipfs/QmRkkqaPT3Kfd8iS9KAf6s7VxUJ7Z6HSnve6rpPJFmnGYn)

👍  , ,
properties (23)
authoreluzgin
permlinkblock-producer-guide-on-starting-eos-producer-node
categoryeos
json_metadata{"community":"busy","app":"busy/2.4.0","format":"markdown","tags":["eos","bp","howoto","guide"],"links":["https://github.com/EOS-Mainnet/eos","https://docs.google.com/spreadsheets/d/1HLAIZ242dc0R8IcHnTRjVur4-wguQ6AjRxzXia-2esU/edit#gid=0"]}
created2018-06-15 16:43:24
last_update2018-06-15 16:43:24
depth0
children0
last_payout2018-06-22 16:43:24
cashout_time1969-12-31 23:59:59
total_payout_value0.035 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,473
author_reputation48,344,025,750
root_title"Block Producer Guide on starting EOS Producer Node"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id60,880,099
net_rshares14,289,793,174
author_curate_reward""
vote details (3)