Skip to main content

Introduction

Quai Network includes a built-in Stratum v1 compatible server that allows you to mine directly to your node without a mining pool. This is a solo mining setup where you receive 100% of any block rewards directly to your configured address - there are no pool fees. The Stratum server translates between the standard Stratum mining protocol and Quai’s workshare system. Miners connect using standard stratum-compatible software and receive jobs derived from pending Quai headers. Valid shares that meet the workshare difficulty are submitted to the node.

Requirements

In order to solo mine on Quai Network, you’ll need the following:

Synced go-quai node

Quai or Qi address

Mining hardware

Quick Start

Enable the Stratum server by adding these flags when starting your go-quai node:
Do not start mining before confirming your node has fully synced. Mining while your node is not synced will result in the mining of invalid blocks and wasted hash.

Configuration Flags

The Stratum server can be configured using the following command-line flags:

Supported Algorithms

Each algorithm has its own dedicated port: Connect your miner to the appropriate port for your hardware.

Miner Configuration

Configure your mining software with the following settings:

Payout Address

You can mine to either a Quai or Qi address:
  • Quai address: Rewards paid in Quai
  • Qi address: Rewards paid in Qi

Password Field (Optional)

The password field accepts optional parameters: Combine multiple parameters with , separator:
  • d=1000 - Submit shares at difficulty 1000
  • d=500,frequency=2 - Difficulty 500, jobs every 2 seconds
  • d=500,lock=3 - Difficulty 500, lock rewards for 12 months
  • x or empty - Use default workshare difficulty
Custom difficulty only affects share submission rate for liveness tracking. Only shares meeting the network workshare difficulty are submitted to the node for rewards.

Mining Examples

SHA-256 Mining

Scrypt Mining

KawPoW Mining (GPU)

If your miner and node are on the same machine, use 127.0.0.1 or localhost. If they are on different machines, use the IP address of your node and ensure the ports are accessible (check firewall settings).

Monitoring & Statistics

The Stratum server exposes an HTTP API for statistics and monitoring at the configured --node.stratum-api-addr (default: 0.0.0.0:3336).

Available Endpoints

Pool-wide Statistics

Miner-specific Statistics

Real-time Updates

Standard Pool Format

Example API Response

GET /api/pool/stats

Logging

Stratum logs are written to nodelogs/stratum.log. Set log level with --global.log-level. Log entries include:
  • Connection events
  • Job notifications
  • Share submissions (accepted/rejected)
  • Difficulty adjustments

Troubleshooting

”no pending header” errors

The node may not be synced. Ensure your node is fully synced and connected to the network.

”authorization failed”

Verify your Quai/Qi address format is correct. The address should be a valid Ethereum-style address (0x…).

High reject rate

  • Ensure you’re connecting to the correct port for your hardware
  • Verify miner supports the difficulty being sent
  • Check nodelogs/stratum.log for errors
  • Confirm your node is fully synced

Connection timeout

The server uses TCP keepalive. Stale connections are detected when writes fail. Ensure your firewall allows connections to the configured ports.

Cannot connect to node

  • Verify the Stratum server is enabled with --node.stratum-enabled
  • Check that the node is running and accessible
  • Ensure firewall rules allow connections on ports 3333-3336
  • If connecting from a remote machine, use the node’s IP address instead of 127.0.0.1

How It Works

The Stratum server acts as a bridge between standard mining hardware/software and Quai Network’s workshare system:

Job Flow

  1. Miner connects to algorithm-specific port and subscribes (mining.subscribe)
  2. Miner authorizes with address (mining.authorize)
  3. Server fetches pending header from node
  4. Server constructs stratum job from AuxPow data
  5. Server sends difficulty and job to miner
  6. Miner finds valid nonce and submits (mining.submit)
  7. Server validates share against workshare target
  8. If valid, server submits workshare to node
  9. Server sends new job to miner
Jobs refresh every second to keep miners on latest work.

Difficulty Calculation

Stratum difficulty is derived from Quai workshare difficulty:
  • SHA-256: minerDiff = ShaDiff / 2^32
  • Scrypt: minerDiff = ScryptDiff / 65536
  • KawPoW: minerDiff = KawpowDiff / 2^32

Version Rolling (ASICBoost)

The server supports version rolling for compatible ASICs. When a miner sends mining.configure with version-rolling capability, the server acknowledges and sends the allowed version mask.