Step By Step Tutorial | How To Update EtherZero Masternode Code?

EtherZero
EtherZero
Aug 13, 2018 · 4 min read

This tutorial is mainly how to update the EtherZero masternode code to lower the threshold for Dapp developers that the maximum gas of every transaction can reach 3.6 million which every ETZ account balance is required to 0.01ETZ. At the same time, the GasPrice can be set to 1, while every Dapp developer doesn’t need to work about insuffient POWER (POWER is the primitive gas in EtherZero’s MPoS mechanism)

Note:make sure that you have already transferred 20,000ETZ to masternode smart contract address, finished syncing blocks and started to mine.

Yes, follow me step by step, it’s not that difficult. we would continue this article according to below sequence.

  • 1.Access to your IP sever with PuTTY or Terminal
  • 2.Check & uninstall current Etherzero Geth and intall new Geth
  • 3.Enter new Etherzero Geth and set up mining.

Access to your IP sever with PuTTY or Terminal

Those who never touch IT or coding will get confused whenever he/she shuts down PuTTY or Terminal, and have no idea where to start, get anxious when google it and don’t know what questions should be typed.

For PuTTY — Windows users: (Click this link to know how to use puTTY)

Open the saved session, for example, ETZ and turn on the PuTTY editor.

Input root, click” Enter” and input your password.

For Terminal — MacBook users:

Find out “ Terminal” in your Mac, input ssh root@ IP address then Click “Return”

Input your password.

Check & Uninstall Current Etherzero Geth and Intall New Geth

The first command we have to once we launch to remote sever after typing IP and password is to check the current Etherzero Geth,follow below command:

ps -aux | grep go-etherzero

Once above command is successfully run, two line code begin with root + would appear, Find out current etherzero geth’s PID, ( shown above picture: PID=21597)

Next, shut down Etherzero’s current Geth, replace pid within below command:

kill -9 <pid>

Example: kill -9 21597 ( PID is different, make sure your PID is accurate and exclude<>)

Then, time to install new version EtherZero Geth, input command:

cd go-etherzero &&  git pull &&  make

As we mentioned last tutorial, we have to wait for 30 seconds to one minute, until Run “/root/go-etherzero/build/bin/geth” to launch geth is shown.

Enter new Etherzero Geth and set up mining

hup /root/go-etherzero/build/bin/geth  —syncmode full —nomaxpeers 100  —masternode &

Note: nohup: ignoring input and appending output to ‘nohup.out’ Must appear, otherwise it means Geth is not yet set up.

To test whether Etherzero Geth is successfully set up or not, continue to type below command:

ps aux | grep go-etherzero

Time to enter amazing Etherzero Geth CONSOLE, type below command:

/root/go-etherzero/build/bin/geth attach

Once “ Welcome to the Geth Javascript console!” Is seen, we are almost finished our work, two steps left.

Set up Mining address. Here please replace your own ETZ address in below command:

miner.setEtherbase("0xFc6d39xxxxx0850a84Cb1B5Efa165202942CaB76")

Start to mine:

miner.start();

Exit your console & finish deploying masternode mining mode.

exit

NOTE: Make sure your “” is under English Input Mode,otherwise, specific error would turn up.

null : means it’s ready to mine, you can enjoy bonus by mining everyday

Make sure you exit the console.

Related command for checking

The following commands show specific info about Etherzero masternode system, please refer to belows for your reference.

Note: below commands would require everyone to access to Etherzero Console

  1. Check the statu of syncing block:
eth.syncing

2. Check your masternode data:

masternode.data

3. Check local masternode infomation:

admin.nodeInfo

4.Check all masternode infomataion:

masternode.list

5.Check number of masternode:

masternode.list.length
EtherZero

Written by

EtherZero

Build daily using DAPPs with EtherZero Platform.0 TX fee, instant pay and high scaling of thousands of TPS.Made by Dapp developers, for Dapp developers.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade