# PoW

Proof-of-work mining, more commonly referred to as PoW mining, is the activity of committing your computer’s hardware and resources to process network transactions and build the blocks that make up the blockchain in the QLC network.

Each time a block is created by a miner, which is then accepted by the majority of nodes, the miner receives a block reward (newly created QGAS).

Each new block reward is then split up as follows:

Party Reward
PoW Miner 60%
DPOS Representative 40%

# Miner

# Staking

Miner MUST have enough pledge vote (staking) to generate new blocks.

# Use gqlc-miner


gqlc-miner is just for develop testing with very poor performance.


# mainnet default port is 9735
# testnet default port is 19735
# SHA256D
gqlc-miner -nodeurl -algo SHA256D -miner qlc_xxx
# or X11
gqlc-miner -nodeurl -algo X11 -miner qlc_xxx
gqlc-miner -nodeurl -algo SCRYPT -miner qlc_xxx

# Use solo stratum pool

gqlc-pool is a very simple mining pool between node and miner, which support stratum mining protocol.


# mainnet default port is 9735
# testnet default port is 19735
# SHA256D
gqlc-pool -nodeurl -algo SHA256D -miner qlc_xxx
# or X11
gqlc-pool -nodeurl -algo X11 -miner qlc_xxx
gqlc-pool -nodeurl -algo SCRYPT -miner qlc_xxx

# Use CPU miner

crypto cpuminer (linux + windows) https://github.com/tpruvot/cpuminer-multi


cpuminer -a sha256d -o stratum+tcp:// -O test.1:test
# add -m 65536 if scrypt is used
cpuminer -a scrypt -m 65536 -o stratum+tcp:// -O test.1:test

# Use GPU miner

OPENCL: https://github.com/luke-jr/bfgminer

support sha256d/scrypt, without x11.

# SHA256D
bfgminer -o stratum+tcp:// -O test.1:test -S opencl:auto --no-gbt --no-getwork
bfgminer --scrypt -o stratum+tcp:// -O test.1:test -S opencl:auto --no-gbt --no-getwork

CUDA: https://github.com/KlausT/ccminer

Pls follow ccminer's guide, support sha256d/x11/scrypt.

# Use ASIC miner

Pls check your miner's guides, and config the miner to use gqlc stratum pool, such as "stratum+tcp://".

# Use stratum mining pool

Please contact mining pool operator which support QLC merged mining. Following their guides, config your GPU/FPGA/ASIC miners to use stratum mining pool, such as "stratum+tcp://IP:Port".

# Developer

# Get work

Calling pov_getWork rpc to get new work from node, at 15/30/60 seconds interval.

All hashes's byte order is little-endian, and workHash is used for unique identify for work.

func getWork() {
    nodeClient, err := rpc.Dial("")
    getWorkRsp := make(map[string]interface{})
    err := nodeClient.Call(&getWorkRsp, "pov_getWork", minerAddr, flagAlgo)
        "id": "1",
        "jsonrpc": "2.0",
        "result": {

# Search nonce for QLC blockchain

Now you can search valid nonce meet the difficulty requirement.

QLC block header and hash is same with BTC/LTC/Dash.

func doWork() {
    timestamp := time.Now().Unix()
    minerInfo := "miner's or mining pool's info"
    extra_nonce1 := miner_session_id
    for extra_nonce2:=0; extra_nonce2 <= uint64_max; extra_nonce2++ {
        coinbaseExtra := minerInfo + extra_nonce1 + extra_nonce2
        coinbaseData := coinbase1 + coinbaseExtra + coinbase2
        coinbaseHash := sha256d(coinbaseHash)
        merkleRoot := merkle root of sha256d(coinbaseHash and merkleBranch)
        for nonce = 0; nonce <= uint32_max; nonce++ {
            hashData := version + previous + merkleRoot + timestamp + bits + nonce
            blockHash := sha256d/x11/scrypt(hashData)
            if blockHash <= nbits {
                Check latest block and previous is or not, cancel current searching if changed.

# Submit work

After find nonce, calling pov_submitWork rpc to node as soon as possible.

func submitWork() {
    nodeClient, err := rpc.Dial("")
    submitReq := make(map[string]interface{})
    coinbaseExtra := minerInfo + extra_nonce1 + extra_nonce2
    err := nodeClient.Call(nil, "pov_submitWork", submitReq)