# Be a Miner
Miners are accounts that run TOP AI Network nodes and earn TOP tokens.
Nodes are computers or servers that provide computing, storage, and routing capabilities in the TOP AI 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 AI Network Staking DApp (opens new window).
To be a miner, you need to:
# 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.
Note
During setting up the cloud server, if you need to configure the ports, see Set Up a Cloud Server.
# 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 the "wget" download tool, please run the following command in the SSH terminal to install TOPIO.
Root users can directly run the following command, while non-root users need administrator privileges before running. You can click here to see how to add administrator privileges to non-root users.
wget https://github.com/telosprotocol/TOP-chain/releases/download/v1.14.0/topio-1.14.0-release.tar.gz -O topio-1.14.0-release.tar.gz && tar zxvf topio-1.14.0-release.tar.gz && cd topio-1.14.0-release && sudo bash install.sh && source /etc/profile && bash set_topio.sh && source ~/.bashrc && ulimit -n 65535
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.14.0
git commit info: d42d833c2
git submodule: xbase:4b3b8a4|xdepends/GSL:8e6d4e2|xdepends/boringssl:10fef972e|xdepends/googletest:ec44c6c1|xdepends/gperftools:bf8b714|xdepends/jemalloc:46c0af68|xdepends/libevent:5df3037d|xdepends/xquic:53a8708|
build date: Nov 17 2023 14:35:36
build options: release
MD5:47491e1e1e7d65b5335699b0ffda1121
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!
# Download database (recommended)
For new servers, it is recommended that you download the database before starting the node, which can reduce the time of data synchronization and start getting rewards early.
If you want to be an advanced miner, the database must be downloaded.
Run the following command in the SSH terminal:
topio db download https://top-mainnet-space.nyc3.digitaloceanspaces.com/db_20220323_v3_ebc276e0d5ef0b0f37fe6313c36c7655.tar.gz
In the returned message, if the download progress is 100% and the following content is included, the database is downloaded.
download database ok.
md5sum check ok.
# 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 passwordless, 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 tokens in the following ways.
Purchase TOP through an exchange: If it is the first time you participate in TOP mining, you can purchase TOP tokens through Hotbit exchange (validator miners need at least 502,000 TOP, advanced miners need at least 1,002,000 TOP).
Transfer TOP from other accounts: If you already have mainnet TOP tokens in other accounts, you can transfer TOP tokens from other TOP accounts to the created TOP mining account.
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 on the page.
In the SSH terminal, paste the command to register miner, set miner name, and set the dividend ratio.
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 the advanced miner. All rewards (work rewards, vote rewards) received by the advance miner will be distributed to voters who support them according to the set dividend ratio. dividend ratio ∈[0,100]. The 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 |
|
Validator miner | topio mining registerMiner 500000 validator miner_name |
|
Advanced miner | topio mining registerMiner 1000000 advance miner_name --dividend_ratio 50 |
|
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 AI Network.
Run the following command to start the 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
topio not ready
, TOPIO is temporarily not ready, please retry one minute later. - If it returns
YES
, the node has successfully joined the network. It is now in the node candidate pool, waiting for the 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 AI 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, 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:
- Click Log in on the TOP Staking welcome page.
- 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.
- Obtain Keystore content: Run the command
- Click Login to successfully log in to TOP Staking.