Become a miner

How to become a miner and earn rewards.

Introduction

Miners are responsible for generating all proofs in the network, so they need not only computing power support, but also stake guarantee. At the same time, miners will receive most of the rewards in the network.

Because there are various prover programs in the network, different programs have different hardware requirements, so even laptops and mobile phones also have the opportunity to participate in mining and get rewards. Of course, high-computing power devices will complete more prover tasks and get more opportunities.

Let's running a miner program in your devices.

Setup

  1. Install latest docker
  2. Download or copy miner docker-compose template
version: '3'

networks:
  default:
    name: pozk

services:
  pozk-miner:
    image: zyphernetwork/pozk-miner:0.0.17
    container_name: pozk-miner
    ports:
      - "9098:9098"
    volumes:
      - ./:/usr/pozk
      - /var/run/docker.sock:/var/run/docker.sock
    command:
      - --miner=0x0000000000000000000000000000000000000000
      - --endpoints=https://linea-mainnet-zytron.zypher.game
      - --network=testnet
      # - --config=/usr/pozk/config.toml # advance configure, default is none
      # - --base-path=/usr/pozk # change host base path for docker use, default is /usr/pozk
      # - --server=http://pozk-miner:9098 # the pozk-miner server with default networks: pozk
      # - --docker-proxy=xxx # if need use docker proxy server
      # - --zero-gas=xxx # if need other zero gas server uri, default is zytron 0 gas service

  pozk-frontend:
    image: zyphernetwork/pozk-frontend:0.0.10
    container_name: pozk-frontend
    ports:
      - "4000:4000"
    environment:
      - API_BASE_URL=http://localhost:9098
      - NETWORK=testnet
  1. Run docker compose up -d

TIPS: if you use nginx, you can use the config to proxy:

server {
    listen 80;
    server_name xxx.com;

    location ~ ^/(api|login|tasks) {
        proxy_pass http://127.0.0.1:9098;
    }

    location / {
        proxy_pass http://127.0.0.1:4000;
    }
}

Stake a prover (game)

Open browser, and visit: https://localhost:4000

  1. Connect wallet use your miner account Miner 0

  2. You need to setup a local controller for mining Miner 1

  3. You can choose generate new or import one Miner 2

  4. You need enable the controller and submit it to the chain Miner 3

  5. Now, you can view the dashboard Miner 4

Install the prover

  1. You will see the provers list in the dashboard, and your staking status. Miner 5

  2. You can download the prover in local device and then stake the prover.

  3. It will automatically start accepting orders for mining after you download the prover.

Collect rewards

  1. You can see all rewards which can collect by epoch. Miner 6

  2. After you collected the rewards, it will in collected rewards, and after an epoch, you can make a claim. Miner 7

  3. After claim, it will send to you wallet directly.