W
W
Wethio
Search…
Wethio Network
Here you will learn about the networks on the Wethio ecosystem in detail.

Wethio Mainnet Spec

Following contains the details of the mainnet wethio blockchain

The Specifications

Chain id: 78 HD derivation path: m/44'/77777'/0'/0/ Consensus Mechanism: PoSV Block finality: >75% Consensus nodes: up to 157 (masternodes) Genesis block date: `` Transaction fee: gas price 0.25 Gwei The fee for Smart contract creation: gas price 10000 Gwei, gas limit >= 1000000 The version of Solidity Compiler: < 0.5

Resources

WethioWallet (Wethio Wallet) WethioScan (Block explorer) WethioMaster (Governance dApp)

Wethio Testnet Spec

As the name suggests, a Testnet is for testing new features and to give a demo of upcoming products. The Wethio testnet network has its own specifications that makes it possible to conduct testing processes smoothly.

The Specifications

Chain id: 79 RPC endpoint: https://rpc.testnet.wethio.io HD derivation path: m/44'/77777'/0'/0/ Consensus Mechanism: PoSV Block finality: >75% Consensus nodes: up to 150 (masternodes) Genesis block date: `` Transaction fee: gas price 0.25 Gwei The fee for Smart contract creation: gas price 10000 Gwei, gas limit >= 1000000 The version of Solidity Compiler: < 0.5

Resources

WethioWallet (Wethio Wallet) WethioScan (Block explorer) WethioMaster (Governance dApp) Faucet (To request testnet ZYN)

Zyn Command Line Interface

A list of commands that can ease the developers interaction with Wethio client Zyn
Command: $ zyn [OPTIONS]
--verbosity: log level from 1 to 5.
--datadir: path to your data directory
--keystore: path to your account's keystore
--identity: your full-node's name.
--password: your account's password.
--networkid: our network ID.
--port: your full-node's listening port (default to 30303)
--rpc, --rpccorsdomain, --rpcaddr, --rpcport, --rpcvhosts: your full-node will accept RPC requests at 8545 TCP.
--ws, --wsaddr, --wsport, --wsorigins: your full-node will accept Websocket requests at 8546 TCP.
--mine: [required] your full-node wants to register to be a candidate for masternode selection.
--gasprice: Minimal gas price to accept for mining a transaction.
--targetgaslimit: Target gas limit sets the artificial target gas floor for the blocks to mine (default: 4712388)
--bootnode: bootnode information to help to discover other nodes in the network
--gcmode: blockchain garbage collection mode ("full", "archive")
--store-reward: store reward report

Setting up a Private Network

In this brief tutorial, you will learn how to set up a private Wethio Testnet on a local machine. It intends to familiarize developers with Wethio's source code and initial setup.

Configuring the Wethio Private Testnet Setup

Here are step-by-step instructions for setting up a Wethio private net with three Masternodes.
Use https://golang.org/doc/install as a reference to install Golan and set environment variables
1
set GOROOT=$HOME/usr/local/go
2
set GOPATH=$HOME/go
Copied!

How to set up the Wethio Client Software

Go to cd $GOPATH/src/github.com/ethereum/go-ethereum to download source code and build
1
git init
2
<!-- git remote add [email protected]:-->
3
git pull origin master
4
make all
Copied!
1
Get easy access by creating shortcuts/alias
2
3
alias zyn=$GOPATH/src/github.com/ethereum/go-ethereum/build/bin/zyn
4
alias bootnode=$GOPATH/src/github.com/ethereum/go-ethereum/build/bin/bootnode
5
alias puppeth=$GOPATH/src/github.com/ethereum/go-ethereum/build/bin/puppeth
Copied!

How to Setup Chain Fata Folders datadir and Correspond keystore Folders for 3 Masternodes

1
mkdir $HOME/wethio
2
mkdir $HOME/wethio/nodes
3
mkdir $HOME/wethio/nodes/1 $HOME/wethio/nodes/2 $HOME/wethio/nodes/3
4
mkdir $HOME/wethio/keystore/1 $HOME/wethio/keystore/2 $HOME/wethio/keystore/3
Copied!

How to Initialize / Import Accounts For the Masternodes's Keystore

  1. 1.
    Initialize new accounts- Ignore this step if there are existing accounts and an option to import them
1
zyn account new \
2
--password [YOUR_PASSWORD_FILE_TO_LOCK_YOUR_ACCOUNT] \
3
--keystore $HOME/wethio/keystore/1
4
5
zyn account new \
6
--password [YOUR_PASSWORD_FILE_TO_LOCK_YOUR_ACCOUNT] \
7
--keystore $HOME/wethio/keystore/2
8
9
zyn account new \
10
--password [YOUR_PASSWORD_FILE_TO_LOCK_YOUR_ACCOUNT] \
11
--keystore $HOME/wethio/keystore/3
Copied!
  1. 1.
    Import accounts
1
zyn account import [PRIVATE_KEY_FILE_OF_YOUR_ACCOUNT] \
2
--keystore $HOME/wethio/keystore/1 \
3
--password [YOUR_PASSWORD_FILE_TO_LOCK_YOUR_ACCOUNT]
Copied!
You must repeat this step twice in order to import two more private keys for our three masternodes

How to customize Genesis Block by Using the puppeth Tool

  1. 1.
    Command puppeth and give answers to questions related to your private chain as follows:
    puppeth
  2. 2.
    Now set a chain name
    > local
wethio
<
  1. 1.
    For configuring new genesis, enter 2
  2. 2.
    For selecting PoSV Consensus, enter 3
  3. 3.
    Set blocktime (default 2 seconds)
  4. 4.
    Set each epoch reward
  5. 5.
    Set addresses for initial masternodes
  6. 6.
    Set number of blocks of each epoch (default 900). For customizing epoch number,
  7. 7.
    update the code here common/constants.go:14 EpocBlockRandomize = 900
  8. 8.
    Set gap (How many blocks before the checkpoint needs to be prepared for a new masternodes < set ?)
  9. 9.
    suggestedGap = 5
  10. 10.
    Enter foundation address which you hold private key
  11. 11.
    Enter accounts through which you control private keys to unlock MultiSig wallet
  12. 12.
    Enter swap wallet address for fund 55 million ZYN
  13. 13.
    Export genesis file by selecting 2. Manage existing genesis - Select 2. Export genesis configuration to enter genesis filename
  14. 14.
    Exit by pressing Control + C
    How to Initialize Your Private Chain with Above Genesis Block
    1
    zyn --datadir $HOME/wethio/nodes/1 init [PATH/TO/GENESIS_FILE]
    2
    zyn --datadir $HOME/wethio/nodes/2 init [PATH/TO/GENESIS_FILE]
    3
    zyn --datadir $HOME/wethio/nodes/3 init [PATH/TO/GENESIS_FILE]
    Copied!
    How to Setup Bootnode
Initializing the bootnode key
bootnode -genkey bootnode.key
Running bootnode and copying bootnode information
bootnode -nodekey ./bootnode.key
enode://7e59324b1e54f8c282719465eb96786fb3a04a0265deee2cdb0f62e912337ca
6f[email protected][::]:30301
Could not load image
wethio

Operating Masternodes

  1. 1.
    How to operate Masternode 1
    1
    zyn --syncmode "full" \
    2
    --datadir $HOME/wethio/nodes/1 --networkid [YOUR_NETWORK_ID] --port 10303 \
    3
    --keystore $HOME/wethio/keystore/1 --password [YOUR_PASSWORD_FILE_TO_UNLOCK_YOUR_ACCOUNT] \
    4
    --rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 --rpcport 1545 --rpcvhosts "*" \
    5
    --rpcapi "db,eth,net,web3,personal,debug" \
    6
    --gcmode "archive" \
    7
    --ws --wsaddr 0.0.0.0 --wsport 1546 --wsorigins "*" --unlock "[ADDRESS_MASTERNODE_1]" \
    8
    --identity "NODE1" \
    9
    --mine --gasprice 2500 \
    10
    --bootnodes [YOUR_BOOTNODE_INFORMATION] \
    11
    console
    Copied!
  2. 2.
    How to operate Masternode 2
    1
    zyn --syncmode "full" \
    2
    --datadir $HOME/wethio/nodes/2 --networkid [YOUR_NETWORK_ID] --port 20303 \
    3
    --keystore $HOME/wethio/keystore/2 --password [YOUR_PASSWORD_FILE_TO_UNLOCK_YOUR_ACCOUNT] \
    4
    --rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 --rpcport 2545 --rpcvhosts "*" \
    5
    --rpcapi "db,eth,net,web3,personal,debug" \
    6
    --gcmode "archive" \
    7
    --ws --wsaddr 0.0.0.0 --wsport 2546 --wsorigins "*" --unlock "[ADDRESS_MASTERNODE_2]" \
    8
    --identity "NODE2" \
    9
    --mine --gasprice 2500 \
    10
    --bootnodes [YOUR_BOOTNODE_INFORMATION] \
    11
    console
    Copied!
  3. 3.
    How to operate Masternode 3
    1
    zyn --syncmode "full" \
    2
    --datadir $HOME/wethio/nodes/3 --networkid [YOUR_NETWORK_ID] --port 30303 \
    3
    --keystore $HOME/wethio/keystore/3 --password [YOUR_PASSWORD_FILE_TO_UNLOCK_YOUR_ACCOUNT] \
    4
    --rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 --rpcport 3545 --rpcvhosts "*" \
    5
    --rpcapi "db,eth,net,web3,personal,debug" \
    6
    --gcmode "archive" \
    7
    --ws --wsaddr 0.0.0.0 --wsport 3546 --wsorigins "*" --unlock "[ADDRESS_MASTERNODE_3]" \
    8
    --identity "NODE3" \
    9
    --mine --gasprice 2500 \
    10
    --bootnodes [YOUR_BOOTNODE_INFORMATION] \
    11
    console
    Copied!
  4. 4.
    Explaining Flags
    1
    --verbosity: log level from 1 to 5.
    2
    --datadir: path to your data director
    3
    --keystore: path to your account's keystore
    4
    --identity: your full-node's name.
    5
    --password: your account's password.
    6
    --networkid: our network ID.
    7
    --port: your full-node's listening port (default to 30303)
    8
    --rpc, --rpccorsdomain, --rpcaddr, --rpcport, --rpcvhosts: your full-node will accept RPC requests at 8545 TCP.
    9
    --ws, --wsaddr, --wsport, --wsorigins: your full-node will accept Websocket requests at 8546 TCP.
    10
    --mine: [required] your full-node wants to register to be a candidate for masternode selection.
    11
    --gasprice: Minimal gas price to accept for mining a transaction.
    12
    --targetgaslimit: Target gas limit sets the artificial target gas floor for the blocks to mine (default: 4712388)
    13
    --bootnode: bootnode information to help to discover other nodes in the network
    14
    --gcmode: blockchain garbage collection mode ("full", "archive")
    15
    --store-reward: store reward report
    Copied!
    You can check usage of all flags here: zyn --help

Verifying Your Private Chain

Follow the below steps to do so:
  1. 1.
    First, connect ipc
    1
    zyn attach $HOME/wethio/nodes/1/zyn.ipc
    2
    admin.nodeInfo
    3
    eth.getBlock(0)
    4
    eth.getBlock(1)
    Copied!
  2. 2.
    Then, connect rpc zyn attach http://localhost:1545 eth.getBlock(0) eth.getBlock(1)
  3. 3.
    At last, verify Checkpoints
    After 30 minutes you can see if your chain has passed the first checkpoint
    zyn attach http://0.0.0.0:1545
    eth.getBlock(900)

How to troubleshoot

  1. 1.
    Resetting your chain
    1
    rm -rf $HOME/wethio/nodes/1/zyn $HOME/wethio/nodes/2/zyn $HOME/wethio/nodes/3/zyn
    2
    zyn --datadir $HOME/wethio/nodes/1 init genesis.json
    3
    zyn --datadir $HOME/wethio/nodes/2 init genesis.json
    4
    zyn --datadir $HOME/wethio/nodes/3 init genesis.json
    Copied!
Note: Use the Gnosis Multisig Wallet: https://github.com/gnosis/MultiSigWallet