W
W
Wethio
Search…
Wethio MasterNodes
In this section, you will learn how to set up and operate a Masternode.
Topic
Content
Requirements
For operating a Masternode, candidates must take the team announcements regarding updates and technical notices into consideration. The following are the basic recommendations for operating Masternode Candidate
Run a full node
The guide explaining how to operate a Wethio Masternode in Testnet
Applying to become a Masternode
When your entire node is up and operating, applying to make it eligible for becoming a Masternode.
Exploring Wethio Slashing Mechanism
As per the mechanism, if a Masternode fails to sign any block during an entire epoch, it is expelled out of the Masternode list for the next four epochs.

Running a Masternode

Running a Masternode Candidate requires to pay attention to the team's announcements regarding updates and technical notices. Here are the base recommendations for running a Masternode Candidate.

Prerequisites

What are the Minimum Hardware Requirements
Transaction processing is mainly CPU bound. Thus, we suggest you operate CPU optimized servers.
    Directly facing internet (public IP, no NAT)
    16 cores CPU
    32GB of RAM
    SSD storage
Note: 2CPU/8GB RAM is sufficient for running a node in testnet
Given the popularity, reliability, and close to 100% uptime rate, we recommend using cloud providers. The below options are good to begin with
    DigitalOcean: CPU optimized droplet 32GB/16CPU
    Amazon EC2: C5 instance
    Google Cloud Engine: n1-highcpu-16
Organizing a Masternode Candidate on a non-performant or low computing machine might enable poor performance. As a result, it can significantly affect an owner's rewards, as well as the performance of the chain.
Info:
A Masternode might have a few tasks to process like validations and block creation. A Masternode must process the tasks assigned to it efficiently to not affect the rewards distribution negatively. Also, oversizing your masternode will not help you earn more rewards.

Maintenance Requirements

Continuous maintenance is inevitable for almost all IT systems. An owner must fulfill its responsibility to ensure that your node has enough power over time like:
    Disk space to store the new blockchain data
    High processing power to ensure the operation of chain at optimal speed
    Monitoring to react quickly in case of errors
    Strengthened security measures such as firewall, OS security patching, SSH via
    keypairs, etc.
This is a non exhaustive list.
Operating a Full Node Here, you will learn how to operate a full node in Wethio
Basic Hardware Considerations
Our team, at Wethio, has run various extensive trial and test performances to finalize the following requirements for any Wehthio Masternode host.

Testnet

    It must be facing the internet directly (no NAT, public IP)
    It should have at least 2 cores
    It should have minimum 8GB of RAM
    It must use an IaaS ("cloud") provider that you can opt (AWS, Digital Ocean, Google
    Cloud, etc.)
    It should use SSD storage
Our primary recommendation is to prioritize CPU. For instance, with Digital Ocean, you may choose a CPU optimized droplet. For AWS, you can use a C5 type of instance.
The full node will serve on port 30303 UDP and TCP for peer to peer communication with other nodes, 8545 TCP for RPC API and 8546 TCP for WebSocket API. Also, it may require you to edit and configure your firewall accordingly.
Executable Wethio Binary Here you will find details about the executable binary on Wethio.
We begin with the installation of Golang using https://golang.org/doc/install as reference then setting environment variables and at last supporting Go 1.10, 1.11, 1.12
export GOROOT=$HOME/usr/local/go export GOPATH=$HOME/go

Prepare Wethio client software

Build from source code¶
Create new directory for the project
mkdir -p $GOPATH/src/github.com/ethereum/ cd $GOPATH/src/github.com/ethereum/
    1.
    Download source code and build , use branch testnet git clone https://github.com/zynecoin/wethio.git go-ethereum cd go-ethereum
    2.
    Build the project make all
    3.
    Binary file should be generated in build folder $GOPATH/src/github.com/ethereum/go-ethereum/build/bin
alias zyn=$GOPATH/src/github.com/ethereum/go-ethereum/build/bin/zyn
Download Wethio binary from Github release page
alias zyn=path/to/zyn/binary
Download Genesis Block
$GENESIS_PATH : location of genesis file you would like to put
export GENESIS_PATH=path/to/genesis.json
    1.
    Testnet
    1
    curl -L https://raw.githubusercontent.com/zynecoin/wethio/master/genesis/testnet.json -o $GENESIS_PATH
    2
    3
    1 ### Create datadir <a id="create-datadir"></a>
    4
    2
    5
    3 create a folder to store chain data on your machine
    6
    4 export DATA_DIR=/path/to/your/data/folder
    7
    5 mkdir -p $DATA_DIR/zyn
    Copied!
Initialize the chain from genesis
zyn init $GENESIS_PATH --datadir $DATA_DIR
Initialize / Import accounts for the nodes's keystore
Import if you have an existing account. Else, you need to initialize new accounts.
export KEYSTORE_DIR=path/to/keystore
Initialize new accounts
1
1 zyn account new \
2
2 --password [YOUR_PASSWORD_FILE_TO_LOCK_YOUR_ACCOUNT] \
3
3 --keystore $KEYSTORE_DIR
Copied!
Import accounts
    1.
    zyn account import [PRIVATE_KEY_FILE_OF_YOUR_ACCOUNT] \
    2.
    --keystore $KEYSTORE_DIR \
    3.
    --password [YOUR_PASSWORD_FILE_TO_LOCK_YOUR_ACCOUNT]
List all available accounts in keystore folder
zyn account list --datadir $DATA_DIR --keystore $KEYSTORE_DIR
Start a node
Environment variables
1
$IDENTITY: the name of your node
2
$PASSWORD: the password file to unlock your account
3
$YOUR_COINBASE_ADDRESS: address of your account which generated in the
4
previous step
5
$NETWORK_ID: the networkId Testnet 79 , Mainnet 78
6
$BOOTNODES: The comma separated list of bootnodes.
7
$WS_SECRET: The password to send data to the stats website.
Copied!
Let’s start a node
1
1 zyn --syncmode "full" \
2
2 --datadir $DATA_DIR --networkid $NETWORK_ID --port 30303 \
3
3 --keystore $KEYSTORE_DIR --password $PASSWORD \
4
4 --identity $IDENTITY \
5
5 --mine --gasprice 250000000 \
6
6 --bootnodes $BOOTNODES \
7
7 --ethstats $IDENTITY:[email protected]$NETSTATS_HOST:$NETSTATS_PORT
Copied!
If you are a dapp developer, you should open RPC and WS apis:
1
1 zyn --syncmode "full" \
2
2 --datadir $DATA_DIR --networkid $NETWORK_ID --port 30303 \
3
3 --keystore $KEYSTORE_DIR --password $PASSWORD \
4
4 --rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 --rpcport 8545 --rpcvhosts
5
5 --rpcapi "db,eth,net,web3,personal,debug" \
6
6 --gcmode "archive" \
7
7 --ws --wsaddr 0.0.0.0 --wsport 8546 --wsorigins "*" --unlock "$YOUR_COINBASE_ADDRESS" \
8
8 --identity $IDENTITY \
9
9 --mine --gasprice 250000000 \
10
10 --bootnodes $BOOTNODES \
11
11 --ethstats $IDENTITY:[email protected]$NETSTATS_HOST:$NETSTATS_PORT
Copied!
Explaining Flags
1
--verbosity: log level from 1 to 5. Here we're using 4 for debug messages
2
3
--datadir: path to your data directory created above.
4
5
--keystore: path to your account's keystore created above.
6
7
--identity: your full-node's name.
8
9
--password: your account's password.
10
11
--networkid: our network ID.
12
13
--port: your full-node's listening port (default to 30303)
14
15
--rpc, --rpccorsdomain, --rpcaddr, --rpcport, --rpcvhosts: your full-node will accept RPC requests at 8545 TCP.
16
17
--ws, --wsaddr, --wsport, --wsorigins: your full-node will accept Websocket requests at 8546 TCP.
18
19
--mine: your full-node wants to register to be a candidate for masternode selection.
20
21
--gasprice: Minimal gas price to accept for mining a transaction.
22
23
--targetgaslimit: Target gas limit sets the artificial target gas floor for the blocks to mine (default: 4712388)
24
25
--bootnode: bootnode information to help to discover other nodes in the network
26
27
--gcmode: blockchain garbage collection mode ("full", "archive")
28
29
--store-reward: store reward report
Copied!
Check all flags usage
zyn --help

Troubleshoot

If your node seems run smooth with no error logs but still get slash frequently. You need to check system time on your node, your system time have to be synced from NTP server
E.g:
1
1 $ timedatectl
2
2 Local time: Fri 2019-07-26 05:57:40 CEST
3
3 Universal time: Fri 2019-07-26 03:57:40 UTC
4
4 RTC time: Fri 2019-07-26 03:58:01
5
5 Time zone: Europe/Berlin (CEST, +0200)
6
6 Network time on: yes
7
7 NTP synchronized: no
8
8 RTC in local TZ: no
Copied!
NTP synchronized: no denotes your node does not use NTP, you have to enable it.
Apply for a Masternode Here you can learn how to become a masternode by finding how to apply.
Once you have set up a full node, you can apply for a Masternode. Masternodes are entitled to receive rewards that are sufficient enough to exceed the cost spent on operating the infrastructure. Nonetheless, to become a Masternode candidate in Wethio, one has to invest at least 17,000 ZYN as the stake for a long-term. Additionally, if the candidate fails to become one of the top 157 most voted candidates after the initial deposit, they will become an asternode. This will cancel their eligibility to become a Masternode or to receive awards. Hence, it becomes important for the candidates to participate with full zeal, prove their capability, and support Wethio to be in the list of 157 most voted candidates.

Requirements

In order to become a masternode candidate, it is necessary to adhere to the below requirements:
    A candidate must have an up and running node
    He/she must have a minimum required amount of ZYN coins (17,000 ZYN), which will be deposited to the Voting Smart Contract.
    He/she must be on the list of the 157 most voted Masternode Candidates in the system. The voting Dapp enables the ZYN holders to send ZYN through the smart contract protocol.
Applying for a Masternode
Follow the below steps:
    1.
    Visit WethioMaster to apply. You need to connect the wallet having sufficient funds to deposit.
    Warning: The wallet that receives the rewards will be the one that has been used to make the initial deposit.
    2.
    Reach the top right corner and click on the 'Become a Candidate'.
    3.
    Enter the amount of ZYN to be deposited (Minimum 17,000).
    4.
    Submit your Coinbase address, which is the account address that your Masternode is using.
Important note: For security reasons, we recommend using a new account for your Coinbase account or Masternode. Yet, the account where rewards will be deposited will be the one from which you have made the initial deposit of 17,000 ZYN.
    1.
    Confirm with apply and proceed to make the payment.
    2.
    Confirm with apply and proceed further for initiating the payment.
Your Masternode is visible to people interested in voting, with its details on WethioMaster. You become a Masternode candidate if you belong to the top 157 most voted candidates in the epoch.
Info: An epoch is a period of 900 blocks (~ 30 minutes) starting from block #1
When your node is on the list of the top 157 most voted candidates list at a checkpoint between two epochs, it becomes a Masternode. It starts generating blocks in the next epoch.

Reassigning your Masternode

To stop and resign your Masternode and retrieve your locked funds, follow these steps: 1. Resign from a Masternode 2. Visit WethioMaster and access “Candidate Detail Page” 3. Click “Resign”
After resigning your Masternode, you can withdraw your funds 30 days after the resignation (1,296,000 blocks).

Wethio Slashing Mechanism

Here you will find detailed information about the slashing mechanism on Wethio.
Slashing 2.0 is an interesting mechanism to penalize a masternode if it is not able to create any block within an epoch, and results in a delay of 10 seconds at each of their turns, for the next five epochs.
Important: Although a slashed Masternode will have the provision to sign transactions if it's online, it might not receive any rewards for doing so.
Once the penalty period ends, an analysis is done to see if the Masternoder can re-enter or not. If the slashed Masternode succeeds in signing any transaction during the last epoch (signifying that it's up and running), it will regain its Masternode Status and begin receiving rewards as usual. If it fails again, the slashing mechanism will penalize it for the next 5 epochs. It will be a recurring situation for the node, as long as it isn't backed up, or eliminated out of the top 157 most voted candidates.
Another reason for facing the slash can be that the masternode might:
Not have installed the latest Wethio Software Have insufficient memory Have a breakdown due to lack of e-maintenance and lack of operation from the owner of Masternode
Upon visiting WethioMaster, you access a candidate's page and scroll down to the section of 'Masternode Rewards'. Now, find 'Sign number,' and 'Slashing history' under the Masternode Rewards section to assess between a performant and non-performant.
A masternode will be entitled to sign a maximum of 60 blocks per epoch. A performant Masternode will be the one that creates nearly 60 sign transactions in an epoch. The rewards are also calculated based on signed transaction numbers. We also calculate the reward based on sign transactions number.
Last modified 1yr ago