# Be a Miner

Miners are accounts that run TOP Network nodes and earn TOP tokens.

Nodes are computers or servers that provide computing, storage, and routing capabilities in the TOP Network. Different networks correspond to different types of nodes, such as edge nodes of edge networks. Since a computer or server can join different networks, it can serve as multiple types of nodes.

This guide will show you how to apply to become a mainnet miner on the TOP Network Staking DApp (opens new window).

To be a miner, you need to:

  1. Configure the Cloud Server
  2. Create TOP Account
  3. Obtain TOP Tokens
  4. Register Miner and Start Node

# Step 1 Configure the Cloud Server

In TOP Staking, click Set Up Cloud Server (opens new window).

# Set Up Cloud Server

To set up a server for running TOPIO, it is recommended that you rent a cloud server, and then remotely access it through an SSH terminal on your personal computer.

# Remove Control the Server

You can remotely control your cloud host through an SSH terminal.

# Install TOPIO

Some Linux system commands are required for installing TOPIO. If you are unfamiliar with Linux system commands, please go to Install TOPIO and follow the guide to install TOPIO.

If you are familiar with Linux systems, and have installed "wget" download tool, please run the following command in SSH terminal to install TOPIO.

wget https://github.com/telosprotocol/TOP-chain/releases/download/v1.2.4/topio-1.2.4-release.tar.gz -O topio-1.2.4-release.tar.gz && tar zxvf topio-1.2.4-release.tar.gz && cd topio-1.2.4-release && sudo sh install.sh

After the installation is complete, run topio -v to verify whether TOPIO is installed successfully. If the following information is printed, the installation is successful.

topio version: 1.2.4
git commit info: b8202cae
git submodule: xtopcom/xbase:12eecba|xtopcom/xdepends:415349d|xtopcom/xvm:384ac1b
build date: Aug 20 2021 09:14:40
MD5:ce0a897392d59b0f2e791dc75e0753df

WARNING

If the MD5 code is inconsistent with the MD5 code displayed on the official website, although your installation is successful, the installation file may be tampered with!

# Step 2 Create TOP Account

In TOP Staking, click Miner Registration in the left navigation bar.

Copy the command in the figure above and execute the command in the SSH terminal to create a TOP account.

topio wallet createAccount

Note: The TOP account created by this command is a passwordless account, if you want to set a password when creating the account, you can try topio wallet createAccount -p, see Create an account.

When the account is successfully created, the account address (such as T8000085a8e8acd53c72dca85dcb002a6710796975b4ba) and the public key of owner key will be printed.

WARNING

Your account address, public/private keys are stored in the keystore file. Please keep your keystore file properly and do not share your keystore file with others. If the file is lost, you will lose control of any funds in this account!

Keystore file default storage directory:

  • root user: /root/topnetwork/keystore

  • Non-root user: /home/Your username to log in to the server/topnetwork/keystore

# Step 3 Obtain TOP Tokens

Enter the created TOP account address in TOP Staking, and transfer TOP token into this account.

You can obtain TOP token in the following way.

  • Exchange TOP through Mapping Dapp: If you have ever purchased TOP (ERC20) tokens in Ethereum, you can exchange TOP (ERC20) tokens in Ethereum into mainnet TOP tokens via Map Dapp.

After that, click Next.

# Step 4 Register Miner and Start Node

# Register miner

In TOP Staking, select miner type, enter the miner name, and set the dividend ratio, then copy the command generated in the page.

In SSH terminal, paste the command to register miner, set miner name, and set the dividend ration.

Taking registering advanced miner as an example, the command is as follows:

topio mining registerMiner 1000000 advance great_miner --dividend_ratio 50

In which:

  • 1000000 is the deposit for miner. Validator miners need at least 502,000 TOP, advanced miners need at least 1,002,000 TOP (the additional 2,000 TOP are used as gas).
  • advance is the miner type. The advance in this example means advanced miner.
  • great_miner is the miner name. Customizable, 4-16 characters, only letters, Numbers, or underscores are allowed.
  • --dividend_ratio 50 is the dividend ratio (which is 50% in this example) for voters who vote for advanced miner. All rewards (work rewards, vote rewards) received by advance miner will be distributed to voters who support them according to the set dividend ratio. dividend ratio ∈[0,100]. Dividend ratio can be modified every 14 days.

The commands of registering other types of miners are as follows:

Miner type to be registered Command sample Description
Edge miner topio mining registerMiner 200000 edge miner_name
  • 200000 is the minimum registration deposit required to become an edge miner.
  • edge is the miner type.
  • miner_name is the miner name.
Validator miner topio mining registerMiner 500000 validator miner_name
  • 500000 is the minimum registration deposit required to become a validator miner.
  • validator is the miner type.
  • miner_name is the miner name.
Advanced miner topio mining registerMiner 1000000 advance miner_name --dividend_ratio 50
  • 1000000 is the minimum registration deposit required to become an advanced miner.
  • advance is the miner type.
  • miner_name is the miner name.
  • --dividend_ratio 50 is setting the dividend ratio to 50%, the percentage can be customized.

If the following information is returned, the registration is successful.

Successfully registering to the mining pool.

# Start node

After the miner is successfully registered, the node process needs to be started to join the TOP Network.

Run the following command to start node process:

topio node startNode

If the following information is returned, the node process is started successfully.

Start node successfully.

Run the following command to query whether the node has successfully joined the network:

topio node isJoined
  • If it returns "YES", the node has successfully joined the network. It is now in the node candidate pool, waiting for election.

  • If it returns "No", the node has failed to join the network, possibly due to network failure.

After 1~2 minutes, you can go to TOP Network Block Explorer TOPScan (opens new window) to check the node election information.

# Other Operations

# Modify miner information

After the miner registration and node start are completed, you can log in to TOP Staking and enter the Miner profile page to set up your miner profile, including the region, logo, declaration, etc. This information will be displayed on the Staking DApp node list page.

How to log in:

  1. Click Log in on the TOP Staking welcome page.
  2. Enter the keystore content and account password of your miner account in the login box.
    • Obtain Keystore content: Run the command cat ~/topnetwork/keystore/account address in TOPIO to print the keystore information of the address, copy and paste it into the login box.
    • Password: It is the password you set when you created the TOP account. If you haven't set a password, just enter a space.
  3. Click Login to successfully log in to TOP Staking.