GPU miner
The lotus-miner-cli command line, the Lotus Miner desktop app, the Docker images and the browser miner, with every flag.
The GPU miner is lotus-miner-cli, an OpenCL program in the gpuminer/ directory of the node's repository. The Lotus Miner desktop app and the Docker images run that same program.
Command line #
Mine on a pool node, or on your own node's stratum server:
./lotus-miner-cli -g 0 -o YOUR_LOTUS_ADDRESS \
--stratum stratum+tcp://POOL_NODE:PORT \
--stratum-user YOUR_LOTUS_ADDRESS.rig1The node's How to mine page shows the address and port to use. One process drives one card: start one per card, with -g 0, -g 1, and so on.
Mine against your own node's RPC instead of stratum (LotusHash only):
./lotus-miner-cli -g 0 -o YOUR_LOTUS_ADDRESS \
-a http://127.0.0.1:10604 -u RPC_USER -p RPC_PASSWORD -i 1Always pass your own address with -o. Up to 12.4.15 the miner has a built-in default address, written to ~/.lotus-miner/config.toml on first run. Started without -o, it mines to that address, not yours.
Build it from the repository:
cd gpuminer
cargo build --release -p lotus-miner-cli
./target/release/lotus-miner-cli --helpRelease archives are named lotus-gpu-miner-nvidia-<version>-linux-x86_64.tar.gz and lotus-gpu-miner-amd-<version>-linux-x86_64.tar.gz. Downloads: https://lotusia.network/downloads/
Coming in 12.4.16: one miner binary and one image for NVIDIA and AMD cards, with --backend auto|nvidia|amd and --list-devices. The built-in payout address is removed: without an address the miner refuses to start. With only -o, it mines on the pool by default.
Algorithms #
--algo | What the card does | Transport |
|---|---|---|
lotushash (default) | Lotus' own proof of work | stratum (--stratum) or RPC (-a) |
sha256d | Acts as a Bitcoin ASIC | standard Stratum V1, needs --stratum |
scrypt | Acts as a Litecoin ASIC | standard Stratum V1, needs --stratum |
sha256d and scrypt are for the node's merged-mining listeners. In those modes the miner runs a known-answer self-test at startup and refuses to mine (exit code 3) if the card disagrees with the CPU.
On mainnet, blocks mined with sha256d or scrypt are valid only from the Napoleon activation. Until then, use these modes on a test network.
LotusHash has two OpenCL kernels, chosen with --kernel-type: lotus_og (default) and poclbm.
Flags #
| Flag | Default | Meaning |
|---|---|---|
-o, --mine-to-address | see the warning above | The Lotus address that is paid. |
--stratum <URL> (alias --stratum-url) | none | stratum+tcp://host:port. Repeat it, or give a comma list, for failover: the first is the primary. Without it the miner uses RPC. |
--stratum-user | the -o address | <Lotus address>[.worker]. One for all URLs, or one per URL in the same order. |
--stratum-password | x | Ignored by the node on LotusHash listeners. |
--algo | lotushash | lotushash, sha256d or scrypt. |
-g, --gpu-index | 0 | Which card. |
-s, --kernel-size | 23 | The batch is 2 to this power. For sha256d: 2^N work items of 16 nonces, default 22. |
--kernel-type | lotus_og | lotus_og or poclbm. |
--failover-after | 2 | Failed sessions in a row before moving to the next URL. |
--primary-retry | 300 | On a backup URL, seconds between probes of the primary. 0 = never return. |
--reconnect-max | 15 | Cap of the reconnect backoff, in seconds. It starts at 1 s. |
--job-timeout | 30 | Reconnect if no job this long after authorize. 0 = off. |
--idle-timeout | 600 | Reconnect if no job or difficulty this long. 0 = off. |
--submit-timeout | 30 | Seconds after which a submit counts as unanswered. 0 = off. |
--max-unanswered-submits | 3 | Reconnect after this many unanswered submits in a row. 0 = off. |
--stable-after | 60 | Seconds with a job after which the backoff is reset. |
--tcp-keepalive | 30 | Keepalive idle seconds. 0 = system default. |
--suggest-difficulty | none | sha256d and scrypt: difficulty asked from the server after login. |
--no-version-rolling | off | sha256d: do not ask for version rolling. |
--scrypt-concurrency | 8192 | Scrypt: hashes per launch. |
--scrypt-lookup-gap | 2 | Scrypt: keep one scratchpad entry out of N. |
-a, --rpc-url | http://127.0.0.1:10604 | RPC mode: the node's address. |
-u, --rpc-user, -p, --rpc-password | lotus, lotus | RPC mode: credentials. |
-i, --rpc-poll-interval | 3 | RPC mode: seconds between requests for new work. |
-m, --poolmining | off | RPC mode: submit shares to an RPC pool. |
--debug | off | Verbose output. |
The miner reads its defaults from ~/.lotus-miner/config.toml and creates that file on first run. Command-line flags win over it. The -c, --config flag is accepted but another file is not loaded in 12.4.15: edit the default file instead.
The miner writes lotus-miner.log in its working directory. An invalid command line exits with code 2.
Lotus Miner app #
Lotus Miner is the desktop app for Windows, macOS and Linux, in desktop/lotus-miner-gui. It starts and supervises lotus-miner-cli, one process per card.
- Download the archive for your system from https://lotusia.network/downloads/ and unpack it into a folder you can write to.
- Start the app and paste your Lotus address.
- Press Start.
What it does:
- Easy mode: an address and one button, with a hashrate chart, accepted and rejected shares, an estimate per day, the pending balance and the pool blocks that paid you.
- Advanced mode: per-card on/off, intensity, kernel, instances and a pause temperature; the algorithm; the pool's nodes or your own list of pools in priority order; profiles; the log; and the equivalent command line.
- Failover: it probes the pool's nodes every minute, starts on the fastest healthy one and gives the others to the miner as its failover list.
The app is portable. Settings, hashrate history and sessions are in lotus-miner.sqlite in the app's own folder, with its logs. To uninstall, delete the folder. On Windows the miner also creates %USERPROFILE%\.lotus-miner\config.toml on first run.
The app talks only to the chosen pool and to the pool's public API. The payout address is the only identifier sent.
Docker #
Images are published as ghcr.io/lotusdevorg/lotus-gpu-miner (NVIDIA) and ghcr.io/lotusdevorg/lotus-gpu-miner-amd (AMD).
docker run --rm --gpus all ghcr.io/lotusdevorg/lotus-gpu-miner \
-o YOUR_LOTUS_ADDRESS \
--stratum stratum+tcp://POOL_NODE:PORTThe container detects the cards and starts INSTANCES_PER_GPU miners per card (default 1). It restarts a miner that exits unexpectedly. KERNEL_SIZE (default 22) and the usual flags are accepted.
Started without -o, the image mines to one of its built-in addresses, not to yours.
Browser miner #
A node can let visitors mine in their browser, from the Mine in your browser view of its Pool page. The browser speaks the same LotusHash stratum as a GPU miner, over a WebSocket. It is meant for trying mining out, not for earning.
The operator turns it on with a WebSocket listener, next to the stratum server:
stratum=1
stratumwslisten=127.0.0.1:3335Put a reverse proxy in front of it that forwards the path /api/v1/mining/ws with the WebSocket upgrade headers. Never bind the listener to a public address without a proxy. The limits and the other -stratumws* options are on the Stratum server page.
In the browser, nothing starts without a click. The page tests its hashing code before mining and refuses to start on a mismatch. It uses the CPU through WebAssembly, or the graphics card through WebGPU when that is faster and passes its self-test.
