---
sidebar_position: 1
---

# Mining Lethean

Lethean uses **ProgPoWZ** for Proof of Work mining and a hybrid PoW/PoS consensus — blocks alternate between mined (PoW) and staked (PoS). Attacking the network requires both hashpower and stake.

### Quick Start (Solo Mining)

The simplest way to mine is using the daemon's built-in CPU miner:

```bash
# Start the daemon
./lethean-chain-node --data-dir ./chain-data

# Start mining (in another terminal)
curl -X POST http://127.0.0.1:36941/start_mining \
  -H 'Content-Type: application/json' \
  -d '{"miner_address":"YOUR_iTHN_ADDRESS","threads_count":4}'

# Check if mining is working
curl -X POST http://127.0.0.1:36941/json_rpc \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":"0","method":"getinfo"}'

# Stop mining
curl -X POST http://127.0.0.1:36941/stop_mining \
  -H 'Content-Type: application/json'
```

### Mining Details

| Parameter | Value |
|-----------|-------|
| Algorithm | ProgPoWZ |
| Block time | 120 seconds |
| Block reward | 1 LTHN |
| Coin unlock | 10 confirmations (~20 minutes) |
| Difficulty adjustment | Tri-zone weighted average (720-block window) |

### Pool Mining

Pool operators can integrate Lethean using the [`lethean-util`](https://github.com/lethean-io) Node.js native addon, which provides:

- `convert_blob` — block template conversion
- `get_pow_hash` — PoW hash computation
- `is_address_valid` — miner address validation
- `address_decode` — address decoding
- `get_blob_from_block_template` — block construction

The daemon's `getblocktemplate` RPC provides block templates for pool mining:

```bash
curl -X POST http://127.0.0.1:36941/json_rpc \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":"0","method":"getblocktemplate","params":{"wallet_address":"YOUR_iTHN_ADDRESS"}}'
```

Mined blocks are submitted via `submitblock`:

```bash
curl -X POST http://127.0.0.1:36941/json_rpc \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":"0","method":"submitblock","params":["BLOCK_BLOB_HEX"]}'
```

### GPU Mining

For GPU mining with dedicated miners (e.g. progminer), point the miner at the daemon's stratum-compatible endpoint. Configuration varies by miner software.

> **Verified:** Solo mining tested on Lethean testnet using the `/start_mining` HTTP endpoint. Blocks confirmed at height 10,641+ with 1 LTHN reward each. The `getblocktemplate` RPC returns valid templates with `convert_blob` producing 81-byte blobs for hashing.
